mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-25 03:04:15 +01:00
Rename GF Gname, Rfu, finish bulk of Union Room, more link doc
This commit is contained in:
parent
4efa6c882a
commit
6aaf50ee27
@ -1,2 +1,2 @@
|
||||
gf_rfu_REQ_api
|
||||
Rfu
|
||||
gRfuAPIBuffer
|
||||
gRfu
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,14 @@
|
||||
#include <limits.h>
|
||||
#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;
|
||||
|
1365
src/link_rfu_2.c
1365
src/link_rfu_2.c
File diff suppressed because it is too large
Load Diff
178
src/link_rfu_3.c
178
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);
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
|
60
src/trade.c
60
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)
|
||||
|
1190
src/union_room.c
1190
src/union_room.c
File diff suppressed because it is too large
Load Diff
@ -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));
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user