pokeemerald/include/union_room.h

173 lines
3.4 KiB
C
Raw Normal View History

2019-03-27 04:41:05 +01:00
#ifndef GUARD_UNION_ROOM_H
#define GUARD_UNION_ROOM_H
2020-01-15 21:46:17 +01:00
#include "link_rfu.h"
2019-03-30 19:36:52 +01:00
// Exported type declarations
2020-05-30 10:09:21 +02:00
struct WirelessGnameUnamePair
2019-03-30 19:36:52 +01:00
{
2020-05-30 10:09:21 +02:00
struct GFtgtGname gname;
2019-03-30 19:36:52 +01:00
u8 ALIGNED(4) playerName[PLAYER_NAME_LENGTH + 1];
};
2020-05-30 10:09:21 +02:00
struct UnkStruct_x1C // WirelessLink_Member?
2019-03-30 19:36:52 +01:00
{
2020-05-30 10:09:21 +02:00
struct WirelessGnameUnamePair gname_uname;
u8 active:1;
2019-03-30 19:36:52 +01:00
};
2020-05-30 10:09:21 +02:00
struct UnkStruct_x20 // WirelessLink_Member?
2019-03-30 19:36:52 +01:00
{
2020-05-30 10:09:21 +02:00
struct WirelessGnameUnamePair gname_uname;
2019-03-30 19:36:52 +01:00
u16 field_18;
2020-05-30 10:09:21 +02:00
u8 groupScheduledAnim:2;
2019-03-30 19:36:52 +01:00
u8 field_1A_1:1;
u8 field_1B;
u8 field_1D;
u8 field_1E;
u8 field_1F;
};
struct UnkStruct_Main0
{
struct UnkStruct_x20 arr[8];
};
struct UnkStruct_Main4
{
struct UnkStruct_x1C arr[5];
};
struct UnkStruct_Main8
{
struct UnkStruct_x20 arr[5];
};
2020-05-30 10:09:21 +02:00
struct WirelessLink_Leader
2019-03-30 19:36:52 +01:00
{
struct UnkStruct_Main0 *field_0;
struct UnkStruct_Main4 *field_4;
struct UnkStruct_Main8 *field_8;
u8 state;
u8 textState;
2020-05-30 10:09:21 +02:00
u8 delayTimerAfterOk;
2019-03-30 19:36:52 +01:00
u8 listWindowId;
2020-05-30 10:09:21 +02:00
u8 bButtonCancelWindowId;
u8 nPlayerModeWindowId;
2019-03-30 19:36:52 +01:00
u8 listTaskId;
2020-05-30 10:09:21 +02:00
u8 playerCount;
u16 field_14;
2019-03-30 19:36:52 +01:00
u8 field_16;
2020-05-30 10:09:21 +02:00
u8 listenTaskId;
u8 activity;
2019-03-30 19:36:52 +01:00
u8 field_19;
u16 field_1A;
};
2020-05-30 10:09:21 +02:00
struct WirelessLink_Group
2019-03-30 19:36:52 +01:00
{
struct UnkStruct_Main0 *field_0;
struct UnkStruct_Main4 *field_4;
u8 state;
u8 textState;
u8 field_A;
u8 listWindowId;
2020-05-30 10:09:21 +02:00
u8 bButtonCancelWindowId;
u8 playerNameAndIdWindowId;
2019-03-30 19:36:52 +01:00
u8 listTaskId;
2020-05-30 10:09:21 +02:00
u8 leaderId;
2019-03-30 19:36:52 +01:00
u8 field_10;
2020-05-30 10:09:21 +02:00
u8 listenTaskId;
u8 isWonderNews;
2019-03-30 19:36:52 +01:00
u8 field_13;
2020-05-30 10:09:21 +02:00
u8 refreshTimer;
u8 delayBeforePrint;
2019-03-30 19:36:52 +01:00
};
struct UnkStruct_8019BA8
{
u8 field_0;
u8 field_1;
2019-04-01 18:05:58 +02:00
s8 field_2;
2019-03-30 19:36:52 +01:00
u8 field_3;
};
2019-03-27 04:41:05 +01:00
2020-05-30 10:09:21 +02:00
struct WirelessLink_URoom
2019-03-30 19:36:52 +01:00
{
struct UnkStruct_Main0 *field_0;
struct UnkStruct_Main4 *field_4;
struct UnkStruct_Main0 *field_8;
struct UnkStruct_Main4 *field_C;
u16 field_10;
u16 field_12;
u8 state;
u8 stateAfterPrint;
u8 textState;
u8 field_17;
u8 field_18;
u8 field_19;
u8 field_1A;
2020-05-30 10:09:21 +02:00
u8 topListMenuWindowId;
u8 topListMenuId;
u8 tradeBoardSelectWindowId;
u8 tradeBoardDetailsWindowId;
2019-03-30 19:36:52 +01:00
u8 field_1F;
u8 field_20;
u8 spriteIds[40];
u8 field_49;
u8 field_4A;
2020-05-30 10:09:21 +02:00
u16 playerSendBuffer[6];
u8 activityRequestStrbufs[4][16];
u16 partnerYesNoResponse;
u16 recvActivityRequest[3];
2019-03-30 19:36:52 +01:00
struct UnkStruct_8019BA8 field_A0[8];
u8 field_C0[12][15];
u8 field_174[48];
u8 field_1A4[200];
};
2020-05-30 10:09:21 +02:00
union WirelessLink_Main
2019-03-30 19:36:52 +01:00
{
2020-05-30 10:09:21 +02:00
struct WirelessLink_Leader *leader;
struct WirelessLink_Group *group;
struct WirelessLink_URoom *uRoom;
2019-03-30 19:36:52 +01:00
};
struct UnionRoomTrade
2019-03-30 19:36:52 +01:00
{
u16 field_0;
u16 type;
u32 playerPersonality;
u8 field_8;
u8 field_9;
u16 playerSpecies;
u16 playerLevel;
u16 species;
u16 level;
u16 field_12;
u32 personality;
};
// Exported RAM declarations
2020-05-30 10:09:21 +02:00
extern u8 gPlayerCurrActivity;
extern union WirelessLink_Main gUnknown_02022C30;
extern struct GFtgtGnameSub gPartnerTgtGnameSub;
2019-03-30 19:36:52 +01:00
2019-10-04 23:24:03 +02:00
extern u16 gUnionRoomOfferedSpecies;
extern u8 gUnionRoomRequestedMonType;
2019-03-30 19:36:52 +01:00
// Exported ROM declarations
2020-05-30 10:09:21 +02:00
u8 CreateTask_ReturnFromLinkTrade(void);
2019-03-30 19:36:52 +01:00
void nullsub_89(u8 taskId);
void var_800D_set_xB(void);
2019-04-01 00:59:52 +02:00
void MEvent_CreateTask_CardOrNewsWithFriend(u32 arg0);
void MEvent_CreateTask_CardOrNewsOverWireless(u32 arg0);
void MEvent_CreateTask_Leader(u32 arg0);
2020-05-30 10:09:21 +02:00
u8 CreateTask_ListenToWireless(void);
void StartUnionRoomBattle(u16 battleFlags);
2019-03-27 04:41:05 +01:00
#endif //GUARD_UNION_ROOM_H