Merge remote-tracking branch 'origin/master' into modern_ld

This commit is contained in:
PikalaxALT
2021-06-04 09:10:09 -04:00
134 changed files with 2931 additions and 2363 deletions
+1 -1
View File
@@ -977,7 +977,7 @@ CableClub_EventScript_WirelessBerryCrush:: @ 81BBD35
msgbox CableClub_Text_UseBerryCrush, MSGBOX_YESNO
compare VAR_RESULT, NO
goto_if_eq CableClub_EventScript_AbortLink
special CheckHasAtLeastOneBerry
special HasAtLeastOneBerry
compare VAR_RESULT, FALSE
goto_if_eq CableClub_EventScript_NeedBerryForBerryCrush
setvar VAR_0x8004, LINK_GROUP_BERRY_CRUSH
+1 -1
View File
@@ -419,7 +419,7 @@ gSpecials:: @ 815FD60
def_special HelpSystem_Disable
def_special HelpSystem_Enable
def_special SetPostgameFlags
def_special CheckHasAtLeastOneBerry
def_special HasAtLeastOneBerry
def_special DisplayBerryPowderVendorMenu
def_special RemoveBerryPowderVendorMenu
def_special Script_HasEnoughBerryPowder
Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 461 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 629 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 834 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 883 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 910 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 864 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 806 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

Before

Width:  |  Height:  |  Size: 639 B

After

Width:  |  Height:  |  Size: 639 B

Before

Width:  |  Height:  |  Size: 655 B

After

Width:  |  Height:  |  Size: 655 B

Before

Width:  |  Height:  |  Size: 342 B

After

Width:  |  Height:  |  Size: 342 B

Before

Width:  |  Height:  |  Size: 295 B

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
銕銕鈿銕闔銕毫鋤沱晳櫚持晳廊刃銕銕銕錮銕諏毫琮烟旱¬鯖算]Z]歃U睆[Z鯖ズU桍攴菅歃算沱賛沱桍菅框算桍睆烟桍歃菅歃算毫毫毫毫毫菅桍算桍睆烝燵毫毫烟毫毫
-1
View File
@@ -1 +0,0 @@
銕銕銕銕銕郢賛櫑鮫硤絜銕銕銕銕試銕睆毯硤曉]]算U紀攤[[[U櫑愰Ⅰ桍歃菅欹算沱賛沱歃菅歃算菅算桍睆烟桍菅桍算桍沱賛沱毫毫沱毫毫睆烟烟烟毫毫毯
-1
View File
@@ -1 +0,0 @@
傳傳全엉靖嚮簿傳傳용鎣靖ズ好빳빳뻣챎かZ]ず阜U쁨쁨슥뻣好[풸せ빽ふオ糧팙百웝百뻣百뼁翡阜웝阜뻣翡뼁互乷百웝百뻣百互塞翡硼샛硼슥硼硼硼硼硼硼百옐硼쁜硼硼硼硼硼硼硼
-1
View File
@@ -1 +0,0 @@
銕銕銕銕銕郢賛櫑鮫硤絜銕銕銕銕試銕睆毯硤曉]]算U紀攤[[[U櫑愰Ⅰ桍沱歃菅歃算沱賛沱桍菅朖算桍睆烟烟歃歃菅歃算毫賛毫毫毫毫毫毫毫桍菅桍算桍睆毫烟毫毫毫毫毫毫
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+3
View File
@@ -590,3 +590,6 @@ $(BERRYPOUCHGFXDIR)/background.4bpp: %.4bpp: %.png
$(HALLOFFAMEGFXDIR)/hall_of_fame.4bpp: %.4bpp: %.png
$(GFX) $< $@ -num_tiles 29
$(TILESETGFXDIR)/primary/general/anim/water_current_landwatersedge/7.4bpp: %.4bpp: %.png
$(GFX) $< $@ -num_tiles 47
+2 -2
View File
@@ -68,10 +68,10 @@ const struct Berry * GetBerryInfo(u8 berryIdx);
extern const struct Berry gBerries[];
struct BerryCrushStats {
u8 unk0;
u8 difficulty;
u16 powder;
};
extern const struct BerryCrushStats gBerryCrushStats[];
extern const struct BerryCrushStats gBerryCrush_BerryData[];
#endif // GUARD_BERRY_H
+1
View File
@@ -4,5 +4,6 @@
#include "main.h"
void StartBerryCrush(MainCallback callback);
void ShowBerryCrushRankings(void);
#endif // GUARD_BERRY_CRUSH_H
+1 -1
View File
@@ -24,7 +24,7 @@ extern const u32 gUnknown_8479688[];
extern const u32 gUnknown_8479748[];
bool32 DigitObjUtil_Init(u32 count);
void DigitObjUtil_Teardown(void);
void DigitObjUtil_Free(void);
bool32 DigitObjUtil_CreatePrinter(u32 id, s32 num, const struct DigitObjUtilTemplate *template);
void DigitObjUtil_PrintNumOn(u32 id, s32 num);
void DigitObjUtil_DeletePrinter(u32 id);
+18
View File
@@ -45,9 +45,27 @@
// Converts a number to Q8.8 fixed-point format
#define Q_8_8(n) ((s16)((n) * 256))
// Converts a number from Q8.8 fixed-point format
#define Q_8_8_TO_INT(n) ((s16)((n) >> 8))
// Converts a number to Q4.12 fixed-point format
#define Q_4_12(n) ((s16)((n) * 4096))
// Converts a number from Q4.12 fixed-point format
#define Q_4_12_TO_INT(n) ((s16)((n) >> 12))
// Converts a number to QN.S fixed-point format (16-bits)
#define Q_N_S(s, n) ((s16)((n) * (1 << (s))))
// converts a number from QN.S fixed-point format (16-bits)
#define Q_N_S_TO_INT(s, n) ((s16)((n) >> (s)))
// Converts a number to Q24.8 fixed-point format
#define Q_24_8(n) ((s32)((n) << 8))
// Converts a number from Q24.8 fixed-point format
#define Q_24_8_TO_INT(n) ((s32)((n) >> 8))
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) >= (b) ? (a) : (b))
+3 -3
View File
@@ -4888,9 +4888,9 @@ extern const u32 gFile_graphics_battle_transitions_vs_frame_palette[];
extern const u32 gFile_graphics_battle_transitions_vs_frame_tilemap[];
// berry_crush
extern const u16 gUnknown_8EAFEA0[];
extern const u32 gUnknown_8EAFFC0[];
extern const u32 gUnknown_8EB0ADC[];
extern const u16 gBerryCrush_Crusher_Pal[];
extern const u32 gBerryCrush_Crusher_Gfx[];
extern const u32 gBerryCrush_Crusher_Tilemap[];
// easy_chat_3
extern const u32 gEasyChatWindow_Gfx[];
+1 -1
View File
@@ -79,6 +79,6 @@ void RemovePCItem(u16 itemId, u16 quantity);
void SortAndCompactBagPocket(struct BagPocket * pocket);
u8 CountItemsInPC(void);
void ApplyNewEncryptionKeyToBagItems_(u32 newKey);
bool8 CheckHasAtLeastOneBerry(void);
bool8 HasAtLeastOneBerry(void);
#endif // GUARD_ITEM_H
+11 -6
View File
@@ -65,7 +65,7 @@
#define LINKCMD_SEND_HELD_KEYS_2 0xCAFE
#define LINKCMD_0xCCCC 0xCCCC
#define LINKTYPE_0x1111 0x1111 // trade
#define LINKTYPE_TRADE 0x1111 // trade
#define LINKTYPE_0x1122 0x1122 // trade
#define LINKTYPE_0x1133 0x1133 // trade
#define LINKTYPE_0x1144 0x1144 // trade
@@ -85,6 +85,8 @@
#define MASTER_HANDSHAKE 0x8FFF
#define SLAVE_HANDSHAKE 0xB9A0
#define IsSendCmdComplete() (gSendCmd[0] == 0)
enum
{
LINK_STATE_START0,
@@ -125,7 +127,10 @@ struct LinkPlayer
/* 0x00 */ u16 version;
/* 0x02 */ u16 lp_field_2;
/* 0x04 */ u32 trainerId;
/* 0x08 */ u8 name[11];
/* 0x08 */ u8 name[PLAYER_NAME_LENGTH + 1];
/* 0x10 */ u8 progressFlags; // (& 0x0F) is hasNationalDex, (& 0xF0) is hasClearedGame
/* 0x11 */ u8 neverRead;
/* 0x12 */ u8 progressFlagsCopy;
/* 0x13 */ u8 gender;
/* 0x14 */ u32 linkType;
/* 0x18 */ u16 id; // battle bank in battles
@@ -274,15 +279,15 @@ void LoadWirelessStatusIndicatorSpriteGfx(void);
void CreateWirelessStatusIndicatorSprite(u8, u8);
void sub_8009FE8(void);
void ClearLinkCallback_2(void);
void LinkRfu_SetRfuFuncToSend6600(void);
void IntlConvertLinkPlayerName(struct LinkPlayer * linkPlayer);
void Rfu_SetLinkStandbyCallback(void);
void ConvertLinkPlayerName(struct LinkPlayer * linkPlayer);
bool8 IsWirelessAdapterConnected(void);
bool8 Link_PrepareCmd0xCCCC_Rfu0xA100(u8 blockRequestType);
void LinkVSync(void);
bool8 HandleLinkConnection(void);
void PrepareLocalLinkPlayerBlock(void);
void LocalLinkPlayerToBlock(void);
void LinkPlayerFromBlock(u32 who);
void SetLinkErrorFromRfu(u32 status, u8 lastSendQueueCount, u8 lastRecvQueueCount, u8 unk_06);
void SetLinkErrorFromRfu(u32 status, u8 lastSendQueueCount, u8 lastRecvQueueCount, u8 isConnectionError);
u8 sub_800A8D4(void);
void sub_800AA24(void);
void sub_800A900(u8 a0);
+113 -90
View File
@@ -3,19 +3,56 @@
#include "global.h"
#include "librfu.h"
#include "link.h"
#include "AgbRfu_LinkManager.h"
#define RFU_COMMAND_0x8800 0x8800
#define RFU_COMMAND_0x8900 0x8900
#define RFU_COMMAND_0xa100 0xa100
#define RFU_COMMAND_0x7700 0x7700
#define RFU_COMMAND_0x7800 0x7800
#define RFU_COMMAND_0x6600 0x6600
#define RFU_COMMAND_0x5f00 0x5f00
#define RFU_COMMAND_0x2f00 0x2f00
#define RFU_COMMAND_0xbe00 0xbe00
#define RFU_COMMAND_0xee00 0xee00
#define RFU_COMMAND_0xed00 0xed00
#define RFUCMD_SEND_PACKET 0x2F00
#define RFUCMD_READY_CLOSE_LINK 0x5f00
#define RFUCMD_READY_EXIT_STANDBY 0x6600
#define RFUCMD_PLAYERS_LIST 0x7700
#define RFUCMD_PLAYERS_LIST_2 0x7800
#define RFUCMD_SEND_BLOCK_INIT 0x8800
#define RFUCMD_SEND_BLOCK_STEP 0x8900
#define RFUCMD_SEND_BLOCK_REQ 0xa100
#define RFUCMD_SEND_HELD_KEYS 0xbe00
#define RFUCMD_PARENT_DISCONNECT 0xed00
#define RFUCMD_CHILD_DISCONNECT 0xee00
#define RFU_PACKET_SIZE 6
#define RFU_SERIAL_7F7D 0x7F7D
#define RECV_QUEUE_NUM_SLOTS 20
#define RECV_QUEUE_SLOT_LENGTH (14 * MAX_RFU_PLAYERS)
#define SEND_QUEUE_NUM_SLOTS 40
#define SEND_QUEUE_SLOT_LENGTH 14
#define BACKUP_QUEUE_NUM_SLOTS 2
#define BACKUP_QUEUE_SLOT_LENGTH 14
#define UNUSED_QUEUE_NUM_SLOTS 2
#define UNUSED_QUEUE_SLOT_LENGTH 256
#define RFU_PACKET_SIZE 6
#define RFU_STATUS_OK 0
#define RFU_STATUS_FATAL_ERROR 1
#define RFU_STATUS_CONNECTION_ERROR 2
#define RFU_STATUS_CHILD_SEND_COMPLETE 3
#define RFU_STATUS_NEW_CHILD_DETECTED 4
#define RFU_STATUS_JOIN_GROUP_OK 5
#define RFU_STATUS_JOIN_GROUP_NO 6
#define RFU_STATUS_WAIT_ACK_JOIN_GROUP 7
#define RFU_STATUS_LEAVE_GROUP_NOTICE 8
#define RFU_STATUS_LEAVE_GROUP 9
#define RFU_STATUS_10 10
#define RFU_STATUS_11 11
#define RFU_STATUS_ACK_JOIN_GROUP 12
#define RFU_RECV_IDLE 0
#define RFU_RECV_RECEIVING 1
#define RFU_RECV_FINISHED 2
// RfuTgtData.gname is read as these structs.
struct GFtgtGnameSub
@@ -23,7 +60,7 @@ struct GFtgtGnameSub
u16 language:4;
u16 hasNews:1;
u16 hasCard:1;
u16 unk_00_6:1;
u16 unknown:1;
u16 isChampion:1;
u16 hasNationalDex:1;
u16 gameClear:1;
@@ -53,20 +90,6 @@ struct Padded_U8
u8 value;
};
struct UnkLinkRfuStruct_02022B44
{
u8 fill_00[6];
u16 unk_06;
u8 fill_08[6];
vu8 unk_0e;
u8 unk_0f;
u8 fill_10[0x54];
u16 unk_64;
u8 fill_66[0x1d];
u8 unk_83;
u8 fill_84[0x58];
};
struct RfuBlockSend
{
/* 0x00 */ u16 next;
@@ -79,9 +102,9 @@ struct RfuBlockSend
/* 0x12 */ u8 receiving;
};
struct UnkRfuStruct_2_Sub_124
struct RfuRecvQueue
{
/* 0x000 */ u8 slots[20][70];
/* 0x000 */ u8 slots[RECV_QUEUE_NUM_SLOTS][RECV_QUEUE_SLOT_LENGTH];
/* 0x578 */ vu8 recv_slot;
/* 0x579 */ vu8 send_slot;
/* 0x57a */ vu8 count;
@@ -90,24 +113,24 @@ struct UnkRfuStruct_2_Sub_124
struct RfuSendQueue
{
/* 0x000 */ u8 slots[40][14];
/* 0x000 */ u8 slots[SEND_QUEUE_NUM_SLOTS][SEND_QUEUE_SLOT_LENGTH];
/* 0x230 */ vu8 recv_slot;
/* 0x231 */ vu8 send_slot;
/* 0x232 */ vu8 count;
/* 0x233 */ vu8 full;
};
struct UnkRfuStruct_2_Sub_c1c
struct RfuBackupQueue
{
/* 0x00 */ u8 slots[2][14];
/* 0x00 */ u8 slots[BACKUP_QUEUE_NUM_SLOTS][BACKUP_QUEUE_SLOT_LENGTH];
/* 0x1c */ vu8 recv_slot;
/* 0x1d */ vu8 send_slot;
/* 0x1e */ vu8 count;
};
struct UnkRfuStruct_Sub_Unused
struct RfuUnusedQueue
{
/* 0x000 */ u8 slots[2][256];
/* 0x000 */ u8 slots[UNUSED_QUEUE_NUM_SLOTS][UNUSED_QUEUE_SLOT_LENGTH];
/* 0x200 */ vu8 recv_slot;
/* 0x201 */ vu8 send_slot;
/* 0x202 */ vu8 count;
@@ -125,57 +148,57 @@ typedef struct UnkRfuStruct_2
/* 0x00e */ u8 unk_0e;
/* 0x00f */ u8 unk_0f;
/* 0x010 */ u16 linkman_param[2];
/* 0x014 */ u8 unk_14[RFU_CHILD_MAX][14];
/* 0x04c */ u8 unk_4c[14];
/* 0x014 */ u8 main_UNI_recvBuffer[RFU_CHILD_MAX][14];
/* 0x04c */ u8 lastCmdBeforeCommInterrupt[14];
/* 0x05a */ u8 cmdA100_blockRequestType;
/* 0x05b */ u8 unk_5b;
/* 0x05c */ u8 unk_5c[5];
/* 0x061 */ u8 unk_61[5];
/* 0x066 */ u8 unk_66;
/* 0x067 */ u8 unk_67;
/* 0x05b */ u8 sendBlockInitDelay;
/* 0x05c */ bool8 blockReceived[MAX_RFU_PLAYERS];
/* 0x061 */ u8 numBlocksReceived[MAX_RFU_PLAYERS];
/* 0x066 */ u8 idleTaskId;
/* 0x067 */ u8 searchTaskId;
/* 0x068 */ u8 filler_68[4];
/* 0x06c */ struct RfuBlockSend cmd_8800_sendbuf;
/* 0x080 */ struct RfuBlockSend cmd_8800_recvbuf[5];
/* 0x0e4 */ u8 cmd5f00Ack[5];
/* 0x0e9 */ u8 cmd_6600_recvd[5];
/* 0x06c */ struct RfuBlockSend sendBlock;
/* 0x080 */ struct RfuBlockSend recvBlock[MAX_RFU_PLAYERS];
/* 0x0e4 */ bool8 readyCloseLink[MAX_RFU_PLAYERS];
/* 0x0e9 */ bool8 readyExitStandby[MAX_RFU_PLAYERS];
/* 0x0ee */ vu8 errorState;
/* 0x0ef */ bool8 isShuttingDown;
/* 0x0f0 */ u8 linkLossRecoveryState;
/* 0x0f1 */ u8 unk_f1;
/* 0x0f2 */ u16 unk_f2[6];
/* 0x0fe */ u16 cmd_6600_timer;
/* 0x100 */ u16 cmd_6600_count;
/* 0x0f1 */ u8 status;
/* 0x0f2 */ u16 packet[RFU_PACKET_SIZE];
/* 0x0fe */ u16 resendExitStandbyTimer;
/* 0x100 */ u16 resendExitStandbyCount;
/* 0x102 */ u8 unk_102;
/* 0x104 */ struct RfuTgtData unk_104;
/* 0x124 */ struct UnkRfuStruct_2_Sub_124 unk_124;
/* 0x104 */ struct RfuTgtData tgtData;
/* 0x124 */ struct RfuRecvQueue recvQueue;
/* 0x6a0 */ struct RfuSendQueue sendQueue;
/* 0x8d4 */ struct UnkRfuStruct_2_Sub_c1c unk_c1c;
/* 0x8f4 */ vu8 unk_c3c;
/* 0x8d4 */ struct RfuBackupQueue backupQueue;
/* 0x8f4 */ vu8 linkRecovered;
/* 0x8f5 */ u8 reconnectedParentIdx;
/* 0x8f6 */ vu8 child_slot;
/* 0x8f7 */ u8 unk_c3f[70];
/* 0x93d */ u8 unk_c85;
/* 0x93e */ u8 unk_c86;
/* 0x93f */ u8 recvCmds[5][7][2];
/* 0x93d */ u8 sendStatus;
/* 0x93e */ u8 recvStatus;
/* 0x93f */ u8 recvCmds[MAX_RFU_PLAYERS][7][2];
/* 0x985 */ u8 parentId;
/* 0x986 */ u8 unk_cce; // childId
/* 0x986 */ u8 multiplayerId; // childId
/* 0x987 */ u8 unk_ccf;
/* 0x988 */ vu8 unk_cd0;
/* 0x989 */ u8 unk_cd1[RFU_CHILD_MAX];
/* 0x98d */ u8 unk_cd5[RFU_CHILD_MAX];
/* 0x991 */ u8 unk_cd9;
/* 0x988 */ vu8 sem_UNI_SendRecv;
/* 0x989 */ u8 partnerSendStatuses[RFU_CHILD_MAX];
/* 0x98d */ u8 partnerRecvStatuses[RFU_CHILD_MAX];
/* 0x991 */ u8 linkClosing;
/* 0x992 */ u8 unk_cda;
/* 0x993 */ vu8 unk_cdb;
/* 0x994 */ vu8 unk_cdc;
/* 0x993 */ volatile bool8 unk_cdb;
/* 0x994 */ volatile bool8 unk_cdc;
/* 0x995 */ u8 unk_cdd;
/* 0x996 */ u8 linkPlayerIdx[RFU_CHILD_MAX];
/* 0x99a */ u8 bm_PartnerFlags;
/* 0x99b */ u8 bm_DisconnectSlot;
/* 0x99c */ u8 unk_ce4;
/* 0x99d */ u8 unk_ce5;
/* 0x99d */ u8 bmChatLeaderMaybe;
/* 0x99e */ u8 unionRoomChatters;
/* 0x99f */ u8 acceptSlot_flag;
/* 0x9a0 */ bool8 unk_ce8;
/* 0x9a0 */ bool8 foundNewLeaderMaybe;
/* 0x9a1 */ u8 unk_ce9;
/* 0x9a2 */ u8 unk_cea[RFU_CHILD_MAX];
/* 0x9a6 */ u8 unk_cee[RFU_CHILD_MAX];
@@ -190,27 +213,27 @@ void AddTextPrinterToWindow1(const u8 *str);
bool32 MG_PrintTextOnWindow1AndWaitButton(u8 * cmdPtr, const u8 * src);
void LinkRfu_FatalError(void);
void MG_DrawCheckerboardPattern(void);
void Rfu_BeginBuildAndSendCommand5F(void);
void Rfu_SetCloseLinkCallback(void);
bool8 IsLinkRfuTaskFinished(void);
void DestroyWirelessStatusIndicatorSprite(void);
void MEvent_CreateTask_CardOrNewsWithFriend(u32 arg0);
void MEvent_CreateTask_CardOrNewsOverWireless(u32 arg0);
void MEvent_CreateTask_Leader(u32 arg0);
void RfuPrepareSend0x2f00(void * data);
void Rfu_SendPacket(void * data);
u8 CreateTask_ListenToWireless(void);
void LinkRfu_DestroyIdleTask(void);
void sub_80F86F4(void);
void InitRFUAPI(void);
void sub_80FB128(bool32 a0);
bool32 IsSendingKeysToRfu(void);
void Rfu_set_zero(void);
void ClearLinkRfuCallback(void);
u8 GetRfuPlayerCount(void);
void StartSendingKeysToRfu(void);
u8 LinkRfu_GetMultiplayerId(void);
bool32 Rfu_InitBlockSend(const u8 * src, size_t size);
bool8 LinkRfu_PrepareCmd0xA100(u8 blockRequestType);
bool8 Rfu_SendBlockRequest(u8 blockRequestType);
u8 Rfu_GetBlockReceivedStatus(void);
void Rfu_SetBlockReceivedFlag(u8 who);
void Rfu_ResetBlockReceivedFlag(u8 who);
void Rfu_SetBlockReceivedFlag(u8 linkPlayerId);
void Rfu_ResetBlockReceivedFlag(u8 linkPlayerId);
bool8 Rfu_IsMaster(void);
void ResetLinkRfuGFLayer(void);
bool32 LinkRfuMain1(void);
@@ -219,34 +242,34 @@ bool32 IsRfuRecvQueueEmpty(void);
u32 GetRfuRecvQueueLength(void);
void LinkRfu_Shutdown(void);
void LinkRfu_CreateIdleTask(void);
bool8 ToggleLMANlinkRecovery(bool32 a0);
bool8 ToggleLMANlinkRecovery(bool32 enable);
void var_800D_set_xB(void);
struct GFtgtGname *GetHostRFUtgtGname(void);
void UpdateWirelessStatusIndicatorSprite(void);
void InitRFU(void);
bool32 RfuIsErrorStatus1or2(void);
bool32 RfuHasErrored(void);
void RFU_queue_20_70_reset(struct UnkRfuStruct_2_Sub_124 *ptr);
void RFU_queue_40_14_reset(struct RfuSendQueue *ptr);
void RfuRecvQueue_Reset(struct RfuRecvQueue *queue);
void RfuSendQueue_Reset(struct RfuSendQueue *queue);
void RfuSetErrorStatus(u8 a0, u16 msg);
u8 RfuGetErrorStatus(void);
void RFU_queue_20_70_recv(struct UnkRfuStruct_2_Sub_124 *q1, u8 *q2);
bool8 RFU_queue_40_14_send(struct RfuSendQueue *q1, u8 *q2);
bool8 RFU_queue_2_14_send(struct UnkRfuStruct_2_Sub_c1c *q1, u8 *q2);
void RFU_queue_2_14_recv(struct UnkRfuStruct_2_Sub_c1c *q1, const u8 *q2);
bool8 RFU_queue_20_70_send(struct UnkRfuStruct_2_Sub_124 * a0, u8 *a1);
void RFU_queue_40_14_recv(struct RfuSendQueue * a0, u8 *a1);
void RfuSetStatus(u8 status, u16 msg);
u8 RfuGetStatus(void);
void RfuRecvQueue_Enqueue(struct RfuRecvQueue *queue, u8 *src);
bool8 RfuSendQueue_Dequeue(struct RfuSendQueue *queue, u8 *dest);
bool8 RfuBackupQueue_Dequeue(struct RfuBackupQueue *queue, u8 *dest);
void RfuBackupQueue_Enqueue(struct RfuBackupQueue *queue, const u8 *dest);
bool8 RfuRecvQueue_Dequeue(struct RfuRecvQueue * queue, u8 *dest);
void RfuSendQueue_Enqueue(struct RfuSendQueue * queue, u8 *src);
void InitHostRFUtgtGname(struct GFtgtGname *data, u8 activity, bool32 started, s32 child_sprite_genders);
void UpdateGameData_GroupLockedIn(bool8 started);
bool32 RfuSerialNumberIsValid(u32 a0);
bool8 sub_80FC1B0(void);
bool32 IsRfuSerialNumberValid(u32 serialNo);
bool8 IsRfuRecoveringFromLinkLoss(void);
bool8 LmanAcceptSlotFlagIsNotZero(void);
void LinkRfu_StopManagerAndFinalizeSlots(void);
bool32 sub_80FA5D4(void);
bool32 sub_80FC1CC(void);
bool32 WaitRfuState(bool32 a0);
bool32 TrainerIdAndNameStillInPartnersList(u16 trainerId, const u8 *trainerName);
bool32 CheckTrainerHasLeftByIdAndName(u16 trainerId, const u8 *trainerName);
void SendByteToPartnerByIdAndName(u8 a0, u16 a1, const u8 *a2);
u32 WaitSendByteToPartnerByIdAndName(u16 a0, const u8 *a1);
void SetHostRFUtgtGname(u8 activity, u32 child_sprite_genders, u32 a2);
@@ -254,7 +277,7 @@ void InitializeRfuLinkManager_LinkLeader(u32 availSlots);
void RequestDisconnectSlotByTrainerNameAndId(const u8 *trainerName, u16 trainerId);
void LinkRfu3_SetGnameUnameFromStaticBuffers(struct GFtgtGname *gname, u8 *uname);
void InitializeRfuLinkManager_JoinGroup(void);
void LinkRfuNIsend8(void);
void SendLeaveGroupNotice(void);
void CreateTask_RfuReconnectWithParent(const u8 *src, u16 trainerId);
void UpdateGameDataWithActivitySpriteGendersFlag(u8 activity, u32 child_sprite_genders, u32 started);
void RecordMixTrainerNames(void);
@@ -271,11 +294,11 @@ void sub_80FC114(const u8 *name, struct GFtgtGname *structPtr, u8 a2);
bool32 PlayerHasMetTrainerBefore(u16 id, u8 *name);
bool8 LinkRfu_GetNameIfCompatible(struct GFtgtGname *gname, u8 *uname, u8 idx);
bool8 LinkRfu_GetNameIfSerial7F7D(struct GFtgtGname *gname, u8 *uname, u8 idx);
bool32 GetRfuUnkCE8(void);
void sub_80FA4A8(void);
bool32 RfuHasFoundNewLeader(void);
void Rfu_UnionRoomChat_StopLinkManager(void);
void sub_80FB9D0(void);
void sub_80FB030(u32 a0);
void sub_80FBA44(void);
void ClearRecvCommands(void);
#include "mevent_server.h"
extern const struct mevent_server_cmd gMEventSrvScript_OtherTrainerCanceled[];
+16 -6
View File
@@ -1,11 +1,21 @@
#ifndef GUARD_MATH_UTIL_H
#define GUARD_MATH_UTIL_H
s16 MathUtil_Inv16(s16 y);
s16 MathUtil_Mul16(s16 x, s16 y);
s32 MathUtil_Div32(s32 x, s32 y);
s32 MathUtil_Mul32(s32 x, s32 y);
s16 MathUtil_Div16Shift(u8 s, s16 x, s16 y);
s16 MathUtil_Mul16Shift(u8 s, s16 x, s16 y);
// Fixed-point arithmetic library.
// x * y
s16 Q_8_8_mul(s16 x, s16 y);
s16 Q_N_S_mul(u8 s, s16 x, s16 y);
s32 Q_24_8_mul(s32 x, s32 y);
// x / y
s16 Q_8_8_div(s16 x, s16 y);
s16 Q_N_S_div(u8 s, s16 x, s16 y);
s32 Q_24_8_div(s32 x, s32 y);
// 1.0 / y
s16 Q_8_8_inv(s16 y);
s16 Q_N_S_inv(u8 s, s16 y);
s32 Q_24_8_inv(s32 y);
#endif //GUARD_MATH_UTIL_H
+1 -1
View File
@@ -20,7 +20,7 @@ void CopyToBufferFromBgTilemap(u8 bgId, u16 *dest, u8 left, u8 top, u8 width, u8
void ResetBgPositions(void);
void InitStandardTextBoxWindows(void);
void FreeAllOverworldWindowBuffers(void);
void ResetBg0(void);
void InitTextBoxGfxAndPrinters(void);
u16 RunTextPrinters_CheckPrinter0Active(void);
u16 AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *str, u8 speed, void (*callback)(struct TextPrinterTemplate *, u16), u8 fgColor, u8 bgColor, u8 shadowColor);
void AddTextPrinterDiffStyle(bool8 allowSkippingDelayWithButtonPress);
+4
View File
@@ -16,6 +16,10 @@
#define PALETTE_FADE_STATUS_DONE 0
#define PALETTE_FADE_STATUS_LOADING 0xFF
#define PALETTES_BG 0x0000FFFF
#define PALETTES_OBJECTS 0xFFFF0000
#define PALETTES_ALL (PALETTES_BG | PALETTES_OBJECTS)
enum
{
FAST_FADE_IN_FROM_WHITE,
-1
View File
@@ -319,7 +319,6 @@ extern u8 gEnemyPartyCount;
extern struct Pokemon gEnemyParty[PARTY_SIZE];
extern const struct BaseStats gBaseStats[];
extern const u8 *const gItemEffectTable[];
extern const struct Evolution gEvolutionTable[][EVOS_PER_MON];
extern const u8 gStatStageRatios[][2];
extern struct SpriteTemplate gMultiuseSpriteTemplate;
extern struct PokemonStorage* gPokemonStoragePtr;

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