diff options
author | jiangzhengwenjz <jiangzhengwenjzw@qq.com> | 2019-11-14 12:57:49 +0800 |
---|---|---|
committer | jiangzhengwenjz <jiangzhengwenjzw@qq.com> | 2019-11-19 10:26:40 +0800 |
commit | 1d3ae2fe78823a6a0d4d9d93a988aa5ca1092801 (patch) | |
tree | acb385b82e1b361e36e6075b13329563fe93f415 /include | |
parent | 17b55f50dbcdf9797d0aecfba356bc8681dea8f5 (diff) | |
parent | f6dfeba742c415d964b415bfefb859c3a3764930 (diff) |
Merge branch 'master' into battle
Diffstat (limited to 'include')
-rw-r--r-- | include/battle.h | 2 | ||||
-rw-r--r-- | include/battle_tower.h | 4 | ||||
-rw-r--r-- | include/constants/battle_tower.h | 7 | ||||
-rw-r--r-- | include/field_camera.h | 1 | ||||
-rw-r--r-- | include/field_door.h | 10 | ||||
-rw-r--r-- | include/gba/macro.h | 14 | ||||
-rw-r--r-- | include/global.fieldmap.h | 2 | ||||
-rw-r--r-- | include/graphics.h | 6 | ||||
-rw-r--r-- | include/link_rfu.h | 3 | ||||
-rw-r--r-- | include/map_name_popup.h | 8 | ||||
-rw-r--r-- | include/metatile_behavior.h | 1 | ||||
-rw-r--r-- | include/mevent_server.h | 32 | ||||
-rw-r--r-- | include/party_menu.h | 1 | ||||
-rw-r--r-- | include/save_menu_util.h | 3 | ||||
-rw-r--r-- | include/script_pokemon_util_80A0058.h | 1 | ||||
-rw-r--r-- | include/strings.h | 17 | ||||
-rw-r--r-- | include/text_window.h | 1 |
17 files changed, 88 insertions, 25 deletions
diff --git a/include/battle.h b/include/battle.h index 0a441df1c..00f7dcea9 100644 --- a/include/battle.h +++ b/include/battle.h @@ -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; diff --git a/include/battle_tower.h b/include/battle_tower.h index b7b106107..9bb93f1c2 100644 --- a/include/battle_tower.h +++ b/include/battle_tower.h @@ -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); diff --git a/include/constants/battle_tower.h b/include/constants/battle_tower.h index b0080caff..6e37d15ec 100644 --- a/include/constants/battle_tower.h +++ b/include/constants/battle_tower.h @@ -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 diff --git a/include/field_camera.h b/include/field_camera.h index d2165780a..fb9861014 100644 --- a/include/field_camera.h +++ b/include/field_camera.h @@ -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 diff --git a/include/field_door.h b/include/field_door.h index 0059cbe1a..777afffce 100644 --- a/include/field_door.h +++ b/include/field_door.h @@ -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 diff --git a/include/gba/macro.h b/include/gba/macro.h index 01bb85b7a..e416c3577 100644 --- a/include/gba/macro.h +++ b/include/gba/macro.h @@ -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); \ } diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h index c0f25fa93..70e806266 100644 --- a/include/global.fieldmap.h +++ b/include/global.fieldmap.h @@ -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; }; diff --git a/include/graphics.h b/include/graphics.h index 340b737aa..354339235 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -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 diff --git a/include/link_rfu.h b/include/link_rfu.h index 6e6e5f7a3..671488be0 100644 --- a/include/link_rfu.h +++ b/include/link_rfu.h @@ -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 diff --git a/include/map_name_popup.h b/include/map_name_popup.h index cf9b005d9..c8ce02c30 100644 --- a/include/map_name_popup.h +++ b/include/map_name_popup.h @@ -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 diff --git a/include/metatile_behavior.h b/include/metatile_behavior.h index df03001bf..d567ab77c 100644 --- a/include/metatile_behavior.h +++ b/include/metatile_behavior.h @@ -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 diff --git a/include/mevent_server.h b/include/mevent_server.h index ddc00b978..b691e9e1f 100644 --- a/include/mevent_server.h +++ b/include/mevent_server.h @@ -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; diff --git a/include/party_menu.h b/include/party_menu.h index d7c2f1248..19cdda1dc 100644 --- a/include/party_menu.h +++ b/include/party_menu.h @@ -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); diff --git a/include/save_menu_util.h b/include/save_menu_util.h index f2a18a777..7085520b4 100644 --- a/include/save_menu_util.h +++ b/include/save_menu_util.h @@ -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); diff --git a/include/script_pokemon_util_80A0058.h b/include/script_pokemon_util_80A0058.h index 768e838dd..b63a7b0ef 100644 --- a/include/script_pokemon_util_80A0058.h +++ b/include/script_pokemon_util_80A0058.h @@ -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 diff --git a/include/strings.h b/include/strings.h index c55e05eaf..377b6ea39 100644 --- a/include/strings.h +++ b/include/strings.h @@ -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 diff --git a/include/text_window.h b/include/text_window.h index c1463a9c7..8e8466145 100644 --- a/include/text_window.h +++ b/include/text_window.h @@ -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 |