Merge branch 'master' into battle

This commit is contained in:
jiangzhengwenjz
2019-11-14 12:57:49 +08:00
188 changed files with 15683 additions and 8215 deletions
+1 -1
View File
@@ -432,7 +432,7 @@ struct BattleStruct
u16 changedItems[MAX_BATTLERS_COUNT];
u8 intimidateBattler;
u8 switchInItemsCounter;
u8 arenaTurnCounter; // not used in FR?
u8 field_DA; // battle tower related
u8 turnSideTracker;
u8 fillerDC[0xDF-0xDC];
u8 givenExpMons;
+2 -2
View File
@@ -12,7 +12,7 @@ struct BattleTowerTrainer
u8 trainerClass;
u8 name[3];
u8 teamFlags;
u16 speech[6];
u16 greeting[6];
};
struct BattleTowerPokemonTemplate
@@ -26,7 +26,7 @@ struct BattleTowerPokemonTemplate
};
u16 sub_8164FCC(u8, u8);
void sub_80E7524(struct BattleTowerEReaderTrainer *);
void ClearEReaderTrainer(struct BattleTowerEReaderTrainer *);
void ValidateEReaderTrainer(void);
u8 GetBattleTowerTrainerFrontSpriteId(void);
u8 GetEreaderTrainerFrontSpriteId(void);
+7
View File
@@ -72,4 +72,11 @@
#define BATTLE_TOWER_ITEM_LUCKY_PUNCH 61
#define BATTLE_TOWER_ITEM_GANLON_BERRY 62
#define BTSPECIAL_TEST 0
#define BTSPECIAL_RESULT_SAVE_SCUM 1
#define BTSPECIAL_RESULT_WON7 2
#define BTSPECIAL_RESULT_LOST 3
#define BTSPECIAL_RESULT_QUICKSAVE 4
#define BTSPECIAL_RESULT_INACTIVE 5
#endif //GUARD_CONSTANTS_BATTLE_TOWER_H
+1
View File
@@ -30,5 +30,6 @@ void sub_805A658(s16 *x, s16 *y);
void SetCameraPanningCallback(void (*cb)(void));
void SetCameraPanning(s16 x, s16 y);
void InstallCameraPanAheadCallback(void);
void DrawDoorMetatileAt(int x, int y, const u16 *data);
#endif //GUARD_FIELD_CAMERA_H
+5 -5
View File
@@ -3,11 +3,11 @@
#include "global.h"
void FieldSetDoorOpened(u32, u32);
void FieldSetDoorClosed(u32, u32);
s8 FieldAnimateDoorClose(u32, u32);
s8 FieldAnimateDoorOpen(u32, u32);
void FieldSetDoorOpened(int x, int y);
void FieldSetDoorClosed(int x, int y);
s8 FieldAnimateDoorClose(int x, int y);
s8 FieldAnimateDoorOpen(int x, int y);
bool8 FieldIsDoorAnimationRunning(void);
u32 GetDoorSoundEffect(u32 x, u32 y);
u16 GetDoorSoundEffect(int x, int y);
#endif
+7 -7
View File
@@ -110,12 +110,12 @@
u32 _size = size; \
while (1) \
{ \
DmaFill##bit(dmaNum, 0, dest, (block)); \
dest += (block); \
DmaFill##bit(dmaNum, 0, dest, (block)); \
dest += (block); \
_size -= (block); \
if (_size <= (block)) \
{ \
DmaFill##bit(dmaNum, 0, dest, _size); \
DmaFill##bit(dmaNum, 0, dest, _size); \
break; \
} \
} \
@@ -123,16 +123,16 @@
#define DmaFillLarge(dmaNum, value, dest, size, block, bit) \
{ \
void *_dest = (void *)dest; \
void *_dest = (void *)dest; \
u32 _size = size; \
while (1) \
{ \
DmaFill##bit(dmaNum, value, _dest, (block)); \
DmaFill##bit(dmaNum, value, _dest, (block)); \
_dest += (block); \
_size -= (block); \
if (_size <= (block)) \
{ \
DmaFill##bit(dmaNum, value, _dest, _size); \
DmaFill##bit(dmaNum, value, _dest, _size); \
break; \
} \
} \
@@ -162,7 +162,7 @@
#define DmaFillDefvars(dmaNum, value, dest, size, bit) \
{ \
void *_dest = (void *)dest; \
void *_dest = (void *)dest; \
u32 _size = size; \
DmaFill##bit(dmaNum, value, _dest, _size); \
}
+1 -1
View File
@@ -163,7 +163,7 @@ struct MapHeader
/* 0x17 */ u8 mapType;
/* 0x18 */ u8 filler_18;
/* 0x19 */ u8 escapeRope;
/* 0x1A */ u8 flags;
/* 0x1A */ s8 flags;
/* 0x1B */ u8 battleType;
};
+6
View File
@@ -4230,7 +4230,13 @@ extern const u16 gTradeMenuMonBox_Tilemap[];
extern const u16 gUnknown_8E9CBBC[];
extern const u16 gUnknown_8E9CB9C[];
// hall_of_fame
extern const u32 gFile_graphics_misc_confetti_sheet[];
extern const u32 gFile_graphics_misc_confetti_palette[];
// learn_move
extern const u16 gUnknown_8E97DDC[];
extern const u32 gUnknown_8E97DFC[];
extern const u32 gUnknown_8E97EC4[];
#endif //GUARD_GRAPHICS_H
+3
View File
@@ -43,4 +43,7 @@ void sub_80FBB20(void);
bool8 sub_80FA484(bool32 a0);
void var_800D_set_xB(void);
#include "mevent_server.h"
extern const struct mevent_server_cmd gMEventSrvScript_OtherTrainerCanceled[];
#endif //GUARD_LINK_RFU_H
+1 -7
View File
@@ -3,12 +3,6 @@
#include "global.h"
// Exported type declarations
// Exported RAM declarations
// Exported ROM declarations
void HideMapNamePopUpWindow(void);
void sub_8098110(u8);
void CreateMapNamePopupIfNotAlreadyRunning(bool32 palIntoFadedBuffer);
#endif //GUARD_MAP_NAME_POPUP_H
-1
View File
@@ -151,6 +151,5 @@ bool8 MetatileBehavior_IsImpressiveMachine(u8 metatileBehavior);
bool8 MetatileBehavior_IsVideoGame(u8 metatileBehavior);
bool8 MetatileBehavior_IsBurglary(u8 metatileBehavior);
bool8 MetatileBehavior_IsMBA3(u8 metatileBehavior);
extern u8 gUnknown_8353068[];
#endif // GUARD_METATILE_BEHAVIOR
+32
View File
@@ -37,6 +37,20 @@ struct mevent_client_cmd
u32 parameter;
};
// Client commands
#define CLI_RETURN(x) {.instr = 1, .parameter = x}
#define CLI_RECEIVE(x) {.instr = 2, .parameter = x}
#define CLI_WAITSND {.instr = 3, .parameter = 0}
#define CLI_JUMPBUF {.instr = 4, .parameter = 0}
#define CLI_SNDHEAD {.instr = 8, .parameter = 0}
#define CLI_VLDNEWS {.instr = 9, .parameter = 0}
#define CLI_RECVSAV {.instr = 10, .parameter = 0}
#define CLI_RECVBUF {.instr = 12, .parameter = 0}
#define CLI_REQWORD {.instr = 13, .parameter = 0}
#define CLI_SNDWORD {.instr = 14, .parameter = 0}
#define CLI_RECVRAM {.instr = 17, .parameter = 0}
#define CLI_SENDALL {.instr = 20, .parameter = 0}
struct mevent_client
{
u32 unk_00;
@@ -58,6 +72,24 @@ struct mevent_server_cmd
void * parameter;
};
// Server commands
#define SRV_RETURN(x) {.instr = 0, .flag = x}
#define SRV_WAITSND {.instr = 1}
#define SRV_RECV(x) {.instr = 2, .flag = x}
#define SRV_BRANCH(y) {.instr = 3, .parameter = (void *)y}
#define SRV_BRANCHIF(x, y) {.instr = 4, .flag = x, .parameter = (void *)y}
#define SRV_READ_1442CC {.instr = 5}
#define SRV_VALID_1442CC {.instr = 6}
#define SRV_CHECK_1442CC_14 {.instr = 7}
#define SRV_READWORD {.instr = 8}
#define SRV_SEND_CARD {.instr = 13}
#define SRV_SEND_NEWS {.instr = 14}
#define SRV_BUFFER_SEND {.instr = 15}
#define SRV_SEND(x, y) {.instr = 18, .flag = x, .parameter = (void *)y}
#define SRV_BUFFER_CARD {.instr = 26}
#define SRV_BUFFER_NEWS {.instr = 27}
#define SRV_RAM_SCRIPT_IF_VALID {.instr = 28}
struct mevent_srv_common
{
u32 unk_00;
+1
View File
@@ -45,6 +45,7 @@ extern u8 gUnknown_203B0C0;
extern u8 gUnknown_203B0C1;
extern u8 gUnknown_203B0DC[3];
extern void (*gUnknown_3005E98)(u8 taskId, TaskFunc func);
extern u8 gSelectedOrderFromParty[3];
bool8 FieldCallback_PrepareFadeInFromMenu(void);
bool8 MonKnowsMove(struct Pokemon *, u16);
+2 -1
View File
@@ -7,7 +7,8 @@ enum SaveStat
SAVE_STAT_POKEDEX,
SAVE_STAT_TIME,
SAVE_STAT_LOCATION,
SAVE_STAT_BADGES
SAVE_STAT_BADGES,
SAVE_STAT_TIME_HR_RT_ALIGN
};
void SaveStatToString(u8 a0, u8 *a1, u8 a2);
+1
View File
@@ -5,5 +5,6 @@ bool8 ScriptGiveMon(u16 species, u8 level, u16 item, u32 unk1, u32 unk2, u8 unk3
bool8 ScriptGiveEgg(u16 species);
void ScriptSetMonMoveSlot(u8 partyIdx, u16 move, u8 slot);
void sp000_heal_pokemon(void);
void ReducePlayerPartyToThree(void);
#endif //GUARD_SCRIPT_POKEMON_UTIL_80A0058_H
+17
View File
@@ -746,4 +746,21 @@ extern const u8 gText_IDNumber[];
extern const u8 gText_Name[];
extern const u8 gText_MainMenuTime[];
// learn_move
extern const u8 gText_TeachWhichMoveToMon[];
extern const u8 gText_MonLearnedMove[];
extern const u8 gText_MonIsTryingToLearnMove[];
extern const u8 gText_StopLearningMove[];
extern const u8 gText_1_2_and_Poof[];
extern const u8 gText_MonForgotOldMoveAndMonLearnedNewMove[];
extern const u8 gText_WhichMoveShouldBeForgotten[];
extern const u8 gText_TeachMoveQues[];
extern const u8 gText_GiveUpTryingToTeachNewMove[];
// pokemon_size_record
extern const u8 gText_DecimalPoint[];
// map_name_popup
extern const u8 gUnknown_841D18D[];
#endif //GUARD_STRINGS_H
+1
View File
@@ -29,5 +29,6 @@ void DrawTextBorderOuter(u8 windowId, u16 tileStart, u8 palette);
void TextWindow_LoadTilesStdFrame1(u8 windowId, u16 destOffset);
void sub_814FE6C(u8 windowId, u16 destOffset, u8 palIdx);
void sub_814FEEC(u8 windowId, u16 destOffset, u8 palIdx);
void sub_814FF6C(u8 windowId, u16 destOffset);
#endif // GUARD_TEXT_WINDOW_H