Merge branch 'master' of https://github.com/pret/pokefirered into doc-ql
This commit is contained in:
@@ -493,6 +493,8 @@ extern struct BattleStruct *gBattleStruct;
|
||||
|
||||
#define SET_STATCHANGER(statId, stage, goesDown)(gBattleScripting.statChanger = (statId) + (stage << 4) + (goesDown << 7))
|
||||
|
||||
// NOTE: The members of this struct have hard-coded offsets
|
||||
// in include/constants/battle_script_commands.h
|
||||
struct BattleScripting
|
||||
{
|
||||
s32 painSplitHp;
|
||||
|
||||
+5
-5
@@ -6,11 +6,11 @@
|
||||
// Player speeds
|
||||
enum
|
||||
{
|
||||
SPEED_STANDING,
|
||||
SPEED_NORMAL,
|
||||
SPEED_FAST,
|
||||
SPEED_FASTER,
|
||||
SPEED_FASTEST,
|
||||
PLAYER_SPEED_STANDING,
|
||||
PLAYER_SPEED_NORMAL,
|
||||
PLAYER_SPEED_FAST,
|
||||
PLAYER_SPEED_FASTER,
|
||||
PLAYER_SPEED_FASTEST,
|
||||
};
|
||||
|
||||
enum {
|
||||
|
||||
@@ -1,34 +1,31 @@
|
||||
#ifndef GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H
|
||||
#define GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H
|
||||
|
||||
// Battle Scripting and BattleCommunication addresses
|
||||
#define sPAINSPLIT_HP gBattleScripting
|
||||
#define sBIDE_DMG gBattleScripting + 4
|
||||
#define sMULTIHIT_STRING gBattleScripting + 8
|
||||
#define sDMG_MULTIPLIER gBattleScripting + 0xE
|
||||
#define sTWOTURN_STRINGID gBattleScripting + 0xF
|
||||
#define sB_ANIM_ARG1 gBattleScripting + 0x10
|
||||
#define sB_ANIM_ARG2 gBattleScripting + 0x11
|
||||
#define sTRIPLE_KICK_POWER gBattleScripting + 0x12
|
||||
#define sMOVEEND_STATE gBattleScripting + 0x14
|
||||
#define sBATTLER_WITH_ABILITY gBattleScripting + 0x15
|
||||
#define sMULTIHIT_EFFECT gBattleScripting + 0x16
|
||||
#define sBATTLER gBattleScripting + 0x17
|
||||
#define sB_ANIM_TURN gBattleScripting + 0x18
|
||||
#define sB_ANIM_TARGETS_HIT gBattleScripting + 0x19
|
||||
#define sSTATCHANGER gBattleScripting + 0x1A
|
||||
#define sSTAT_ANIM_PLAYED gBattleScripting + 0x1B
|
||||
#define sGIVEEXP_STATE gBattleScripting + 0x1C
|
||||
#define sBATTLE_STYLE gBattleScripting + 0x1D
|
||||
#define sLVLBOX_STATE gBattleScripting + 0x1E
|
||||
#define sLEARNMOVE_STATE gBattleScripting + 0x1F
|
||||
#define sFIELD_20 gBattleScripting + 0x20
|
||||
#define sRESHOW_MAIN_STATE gBattleScripting + 0x21
|
||||
#define sRESHOW_HELPER_STATE gBattleScripting + 0x22
|
||||
#define sFIELD_23 gBattleScripting + 0x23
|
||||
#define sWINDOWS_TYPE gBattleScripting + 0x24
|
||||
#define sMULTIPLAYER_ID gBattleScripting + 0x25
|
||||
#define sSPECIAL_TRAINER_BATTLE_TYPE gBattleScripting + 0x26
|
||||
// The following correspond to the struct members of BattleScripting by adding their offset
|
||||
#define sPAINSPLIT_HP gBattleScripting + 0x00 // painSplitHp
|
||||
#define sBIDE_DMG gBattleScripting + 0x04 // bideDmg
|
||||
#define sMULTIHIT_STRING gBattleScripting + 0x08 // multihitString
|
||||
#define sDMG_MULTIPLIER gBattleScripting + 0x0E // dmgMultiplier
|
||||
#define sTWOTURN_STRINGID gBattleScripting + 0x0F // twoTurnsMoveStringId
|
||||
#define sB_ANIM_ARG1 gBattleScripting + 0x10 // animArg1
|
||||
#define sB_ANIM_ARG2 gBattleScripting + 0x11 // animArg2
|
||||
#define sTRIPLE_KICK_POWER gBattleScripting + 0x12 // tripleKickPower
|
||||
#define sMOVEEND_STATE gBattleScripting + 0x14 // moveendState
|
||||
#define sBATTLER_WITH_ABILITY gBattleScripting + 0x15 // battlerWithAbility
|
||||
#define sMULTIHIT_EFFECT gBattleScripting + 0x16 // multihitMoveEffect
|
||||
#define sBATTLER gBattleScripting + 0x17 // battler
|
||||
#define sB_ANIM_TURN gBattleScripting + 0x18 // animTurn
|
||||
#define sB_ANIM_TARGETS_HIT gBattleScripting + 0x19 // animTargetsHit
|
||||
#define sSTATCHANGER gBattleScripting + 0x1A // statChanger
|
||||
#define sSTAT_ANIM_PLAYED gBattleScripting + 0x1B // statAnimPlayed
|
||||
#define sGIVEEXP_STATE gBattleScripting + 0x1C // getexpState
|
||||
#define sBATTLE_STYLE gBattleScripting + 0x1D // battleStyle
|
||||
#define sLVLBOX_STATE gBattleScripting + 0x1E // drawlvlupboxState
|
||||
#define sLEARNMOVE_STATE gBattleScripting + 0x1F // learnMoveState
|
||||
#define sPURSUIT_DOUBLES_ATTACKER gBattleScripting + 0x20 // pursuitDoublesAttacker
|
||||
#define sRESHOW_MAIN_STATE gBattleScripting + 0x21 // reshowMainState
|
||||
#define sRESHOW_HELPER_STATE gBattleScripting + 0x22 // reshowHelperState
|
||||
#define sLVLUP_HP gBattleScripting + 0x23 // levelUpHP
|
||||
|
||||
// Array entries for battle communication
|
||||
#define MULTIUSE_STATE 0
|
||||
|
||||
@@ -177,9 +177,16 @@
|
||||
#define ITEM_LANSAT_BERRY 173
|
||||
#define ITEM_STARF_BERRY 174
|
||||
#define ITEM_ENIGMA_BERRY 175
|
||||
#define ITEM_0B0 176
|
||||
#define ITEM_0B1 177
|
||||
#define ITEM_0B2 178
|
||||
|
||||
#define FIRST_BERRY_INDEX ITEM_CHERI_BERRY
|
||||
#define LAST_BERRY_INDEX ITEM_ENIGMA_BERRY
|
||||
|
||||
#define ITEM_UNUSED_BERRY_1 176
|
||||
#define ITEM_UNUSED_BERRY_2 177
|
||||
#define ITEM_UNUSED_BERRY_3 178
|
||||
|
||||
#define MAX_BERRY_INDEX ITEM_UNUSED_BERRY_3
|
||||
|
||||
#define ITEM_BRIGHT_POWDER 179
|
||||
#define ITEM_WHITE_HERB 180
|
||||
#define ITEM_MACHO_BRACE 181
|
||||
@@ -440,8 +447,6 @@
|
||||
|
||||
#define ITEMS_COUNT 375
|
||||
|
||||
#define FIRST_BERRY_INDEX ITEM_CHERI_BERRY
|
||||
#define LAST_BERRY_INDEX ITEM_ENIGMA_BERRY
|
||||
#define ITEM_TO_BERRY(itemId)(((itemId - FIRST_BERRY_INDEX) + 1))
|
||||
#define MAIL_NONE 0xFF
|
||||
|
||||
@@ -454,6 +459,6 @@
|
||||
#define SUPER_ROD 2
|
||||
|
||||
// Check if the item is one that can be used on a Pokemon.
|
||||
#define IS_POKEMON_ITEM(item) ((item) >= ITEM_POTION && (item) <= ITEM_0B2)
|
||||
#define IS_POKEMON_ITEM(item) ((item) >= ITEM_POTION && (item) <= MAX_BERRY_INDEX)
|
||||
|
||||
#endif // GUARD_CONSTANTS_ITEMS_H
|
||||
|
||||
@@ -35,6 +35,10 @@
|
||||
// gTileset_DepartmentStore
|
||||
#define METATILE_DepartmentStore_ElevatorDoor 0x28D
|
||||
|
||||
// gTileset_Fallarbor
|
||||
#define METATILE_Fallarbor_AshGrass 0x20A
|
||||
#define METATILE_Fallarbor_NormalGrass 0x212
|
||||
|
||||
// gTileset_FuchsiaCity
|
||||
#define METATILE_FuchsiaCity_Door 0x2BF
|
||||
#define METATILE_FuchsiaCity_SafariZoneDoor 0x2D2
|
||||
@@ -74,6 +78,9 @@
|
||||
#define METATILE_GenericBuilding1_PlayersPCOff 0x28F
|
||||
#define METATILE_GenericBuilding1_PlayersPCOn 0x28A
|
||||
|
||||
// gTileset_Lavaridge
|
||||
#define METATILE_Lavaridge_NormalGrass 0x206
|
||||
|
||||
// gTileset_LavenderTown
|
||||
#define METATILE_LavenderTown_Door 0x2A2
|
||||
|
||||
@@ -84,6 +91,9 @@
|
||||
// gTileset_MtEmber
|
||||
#define METATILE_MtEmber_CaveEntrance 0x346
|
||||
|
||||
// gTileset_Pacifidlog
|
||||
#define METATILE_Pacifidlog_SkyPillar_CrackedFloor_Hole 0x237
|
||||
|
||||
// gTileset_PalletTown
|
||||
#define METATILE_PalletTown_Door 0x2A3
|
||||
#define METATILE_PalletTown_OaksLabDoor 0x2AC
|
||||
@@ -165,6 +175,10 @@
|
||||
#define METATILE_PokemonMansion_Wall_EndPost_Bottom 0x2AD
|
||||
#define METATILE_PokemonMansion_Wall_EndPost_Mid 0x2A5
|
||||
|
||||
// gTileset_RSCave
|
||||
#define METATILE_RSCave_CrackedFloor 0x22F
|
||||
#define METATILE_RSCave_CrackedFloor_Hole 0x206
|
||||
|
||||
// gTileset_SSAnne
|
||||
#define METATILE_SSAnne_Door 0x281
|
||||
|
||||
|
||||
@@ -71,7 +71,6 @@ u8 GetECSelectGroupRowsAbove(void);
|
||||
void GetECSelectWordCursorCoords(s8 *arg0, s8 *arg1);
|
||||
u8 GetECSelectWordRowsAbove(void);
|
||||
u8 GetECSelectWordNumRows(void);
|
||||
u8 unref_sub_80FFE60(void);
|
||||
bool32 ShouldDrawECUpArrow(void);
|
||||
bool32 ShouldDrawECDownArrow(void);
|
||||
|
||||
|
||||
@@ -7,15 +7,6 @@
|
||||
|
||||
#include "global.h"
|
||||
|
||||
extern const u8 gUnknown_0823B4E8[];
|
||||
extern const u8 gUnknown_0823B5E9[];
|
||||
extern const u8 EventScript_275BB7[];
|
||||
extern const u8 EventScript_275D0C[];
|
||||
extern const u8 EventScript_275D1F[];
|
||||
extern const u8 EventScript_275D2E[];
|
||||
extern const u8 EventScript_2766A2[];
|
||||
extern const u8 EventScript_2766A6[];
|
||||
|
||||
extern const u8 gTVBravoTrainerText00[];
|
||||
extern const u8 gTVBravoTrainerText01[];
|
||||
extern const u8 gTVBravoTrainerText02[];
|
||||
@@ -364,16 +355,6 @@ extern const u8 gPokeNewsTextLilycove_Ending[];
|
||||
extern const u8 gPokeNewsTextBlendMaster_Upcoming[];
|
||||
extern const u8 gPokeNewsTextBlendMaster_Ongoing[];
|
||||
extern const u8 gPokeNewsTextBlendMaster_Ending[];
|
||||
extern const u8 SecretBase_RedCave1_Text_274966[];
|
||||
extern const u8 SecretBase_RedCave1_Text_274D13[];
|
||||
extern const u8 SecretBase_RedCave1_Text_274FFE[];
|
||||
extern const u8 SecretBase_RedCave1_Text_275367[];
|
||||
extern const u8 SecretBase_RedCave1_Text_2756C7[];
|
||||
extern const u8 SecretBase_RedCave1_Text_274B24[];
|
||||
extern const u8 SecretBase_RedCave1_Text_274E75[];
|
||||
extern const u8 SecretBase_RedCave1_Text_2751E1[];
|
||||
extern const u8 SecretBase_RedCave1_Text_2754F6[];
|
||||
extern const u8 SecretBase_RedCave1_Text_2758CC[];
|
||||
|
||||
extern const u8 gText_LtSurge[];
|
||||
extern const u8 gText_Koga[];
|
||||
@@ -780,7 +761,6 @@ extern const u8 Help_Text_AboutThisGame[];
|
||||
extern const u8 Help_Text_TypeMatchupList[];
|
||||
extern const u8 Help_Text_Exit[];
|
||||
extern const u8 Help_Text_Cancel[];
|
||||
extern const u8 gUnknown_81B2E76[];
|
||||
extern const u8 Help_Text_DescWhatShouldIDo[];
|
||||
extern const u8 Help_Text_DescHowDoIDoThis[];
|
||||
extern const u8 Help_Text_DescWhatDoesThisTermMean[];
|
||||
|
||||
+11
-7
@@ -31,14 +31,12 @@
|
||||
#define IWRAM_START 0x03000000
|
||||
#define IWRAM_END (IWRAM_START + 0x8000)
|
||||
|
||||
#define PLTT 0x5000000
|
||||
#define PLTT_SIZE 0x400
|
||||
|
||||
#define BG_PLTT PLTT
|
||||
#define BG_PLTT_SIZE 0x200
|
||||
|
||||
#define OBJ_PLTT (PLTT + 0x200)
|
||||
#define PLTT 0x5000000
|
||||
#define BG_PLTT PLTT
|
||||
#define BG_PLTT_SIZE 0x200
|
||||
#define OBJ_PLTT (PLTT + BG_PLTT_SIZE)
|
||||
#define OBJ_PLTT_SIZE 0x200
|
||||
#define PLTT_SIZE (BG_PLTT_SIZE + OBJ_PLTT_SIZE)
|
||||
|
||||
#define VRAM 0x6000000
|
||||
#define VRAM_SIZE 0x18000
|
||||
@@ -79,6 +77,12 @@
|
||||
|
||||
#define TOTAL_OBJ_TILE_COUNT 1024
|
||||
|
||||
#define PLTT_SIZEOF(n) ((n) * sizeof(u16))
|
||||
#define PLTT_SIZE_4BPP PLTT_SIZEOF(16)
|
||||
#define PLTT_SIZE_8BPP PLTT_SIZEOF(256)
|
||||
|
||||
#define PLTT_OFFSET_4BPP(n) ((n) * PLTT_SIZE_4BPP)
|
||||
|
||||
// Some functions are strictly inline asm
|
||||
#define NAKED __attribute__((naked))
|
||||
#define UNUSED __attribute__((unused))
|
||||
|
||||
+478
-758
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,12 @@
|
||||
|
||||
#include "global.h"
|
||||
|
||||
// Values for 2nd argument to GetItemIconGfxPtr
|
||||
enum {
|
||||
ITEMICON_TILES,
|
||||
ITEMICON_PAL,
|
||||
};
|
||||
|
||||
extern const struct CompressedSpriteSheet gSpriteSheet_BagMale;
|
||||
extern const struct CompressedSpriteSheet gSpriteSheet_BagFemale;
|
||||
extern const struct CompressedSpritePalette gSpritePalette_Bag;
|
||||
@@ -22,7 +28,7 @@ void UpdateSwapLinePos(s16 x, u16 y);
|
||||
void SetSwapLineInvisibility(bool8 invisible);
|
||||
void SetBagVisualPocketId(u8);
|
||||
void ShakeBagSprite(void);
|
||||
const void *GetItemIconGfxPtr(u16 itemId, u8 ptrId);
|
||||
const u32 *GetItemIconGfxPtr(u16 itemId, u8 ptrId);
|
||||
void CreateBagSprite(u8 animNum);
|
||||
|
||||
#endif // GUARD_ITEM_MENU_ICONS
|
||||
|
||||
@@ -44,7 +44,6 @@ struct Main
|
||||
/*0x439*/ u8 field_439_x4:1;
|
||||
};
|
||||
|
||||
extern u8 gUnknown_3001764;
|
||||
extern struct Main gMain;
|
||||
extern bool8 gSoftResetDisabled;
|
||||
extern bool8 gLinkVSyncDisabled;
|
||||
|
||||
+8
-1
@@ -8,6 +8,13 @@
|
||||
#define MENU_NOTHING_CHOSEN -2
|
||||
#define MENU_B_PRESSED -1
|
||||
|
||||
#define MENU_INFO_ICON_CAUGHT 0
|
||||
#define MENU_INFO_ICON_TYPE (NUMBER_OF_MON_TYPES + 1)
|
||||
#define MENU_INFO_ICON_POWER (NUMBER_OF_MON_TYPES + 2)
|
||||
#define MENU_INFO_ICON_ACCURACY (NUMBER_OF_MON_TYPES + 3)
|
||||
#define MENU_INFO_ICON_PP (NUMBER_OF_MON_TYPES + 4)
|
||||
#define MENU_INFO_ICON_EFFECT (NUMBER_OF_MON_TYPES + 5)
|
||||
|
||||
struct MenuAction
|
||||
{
|
||||
const u8 *text;
|
||||
@@ -31,7 +38,7 @@ s8 Menu2_GetMonSpriteAnchorCoordMinusx20(u16 species, u32 personality, u8 a2);
|
||||
void ListMenu_LoadMonIconPalette(u8 palOffset, u16 speciesId);
|
||||
void ListMenu_DrawMonIconGraphics(u8 windowId, u16 speciesId, u32 personality, u16 x, u16 y);
|
||||
void ListMenuLoadStdPalAt(u8 palOffset, u8 palId);
|
||||
void BlitMoveInfoIcon(u8 windowId, u8 iconId, u16 x, u16 y);
|
||||
void BlitMenuInfoIcon(u8 windowId, u8 iconId, u16 x, u16 y);
|
||||
|
||||
// menu
|
||||
s8 Menu_ProcessInputGridLayout(void);
|
||||
|
||||
+18
-2
@@ -8,8 +8,7 @@
|
||||
#define gPaletteFade_delay (gPaletteFade.multipurpose2) // normal and hardware fade
|
||||
#define gPaletteFade_submode (gPaletteFade.multipurpose2) // fast fade
|
||||
|
||||
#define PLTT_BUFFER_SIZE 0x200
|
||||
#define PLTT_DECOMP_BUFFER_SIZE (PLTT_BUFFER_SIZE * 2)
|
||||
#define PLTT_BUFFER_SIZE (PLTT_SIZE / sizeof(u16))
|
||||
|
||||
#define PALETTE_FADE_STATUS_DELAY 2
|
||||
#define PALETTE_FADE_STATUS_ACTIVE 1
|
||||
@@ -20,6 +19,13 @@
|
||||
#define PALETTES_OBJECTS 0xFFFF0000
|
||||
#define PALETTES_ALL (PALETTES_BG | PALETTES_OBJECTS)
|
||||
|
||||
#define PLTT_ID(n) ((n) * 16)
|
||||
#define BG_PLTT_OFFSET 0x000
|
||||
#define OBJ_PLTT_OFFSET 0x100
|
||||
#define BG_PLTT_ID(n) (BG_PLTT_OFFSET + PLTT_ID(n))
|
||||
#define OBJ_PLTT_ID(n) (OBJ_PLTT_OFFSET + PLTT_ID(n))
|
||||
#define OBJ_PLTT_ID2(n) (PLTT_ID((n) + 16))
|
||||
|
||||
enum
|
||||
{
|
||||
FAST_FADE_IN_FROM_WHITE,
|
||||
@@ -80,4 +86,14 @@ void BlendPalettesGradually(u32 selectedPalettes, s8 delay, u8 coeff, u8 coeffTa
|
||||
bool32 IsBlendPalettesGraduallyTaskActive(u8 var);
|
||||
void DestroyBlendPalettesGraduallyTask(void);
|
||||
|
||||
static inline void SetBackdropFromColor(u16 color)
|
||||
{
|
||||
FillPalette(color, 0, PLTT_SIZEOF(1));
|
||||
}
|
||||
|
||||
static inline void SetBackdropFromPalette(const u16 *palette)
|
||||
{
|
||||
LoadPalette(palette, 0, PLTT_SIZEOF(1));
|
||||
}
|
||||
|
||||
#endif // GUARD_PALETTE_H
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
|
||||
#define INDEX_CANCEL -2
|
||||
|
||||
extern EWRAM_DATA struct ItemSlot gUnknown_02039F80[3];
|
||||
|
||||
void CreatePokemartMenu(const u16 *itemsForSale);
|
||||
void CreateDecorationShop1Menu(const u16 *);
|
||||
void CreateDecorationShop2Menu(const u16 *);
|
||||
|
||||
@@ -80,7 +80,6 @@ extern const u8 gText_ApostropheSBase[];
|
||||
extern const u8 gText_NoRegistry[];
|
||||
extern const u8 gText_OkayToDeleteFromRegistry[];
|
||||
extern const u8 gText_RegisteredDataDeleted[];
|
||||
extern const u8 gUnknown_085EA79D[];
|
||||
extern const u8 gText_Confirm3[];
|
||||
extern const u8 gText_Cancel4[];
|
||||
extern const u8 gText_IsThisTheCorrectTime[];
|
||||
|
||||
Reference in New Issue
Block a user