Merge branch 'master' of github.com:pret/pokeemerald into trade
This commit is contained in:
@@ -419,7 +419,7 @@ struct BattleStruct
|
||||
u8 wildVictorySong;
|
||||
u8 dynamicMoveType;
|
||||
u8 wrappedBy[MAX_BATTLERS_COUNT];
|
||||
u16 assistPossibleMoves[PARTY_SIZE * 4]; // Each of mons can know max 4 moves.
|
||||
u16 assistPossibleMoves[PARTY_SIZE * MAX_MON_MOVES]; // Each of mons can know max 4 moves.
|
||||
u8 focusPunchBattlerId;
|
||||
u8 battlerPreventingSwitchout;
|
||||
u8 moneyMultiplier;
|
||||
|
||||
@@ -94,7 +94,7 @@ void sub_80A66DC(struct Sprite *sprite);
|
||||
void SetSpriteCoordsToAnimAttackerCoords(struct Sprite *sprite);
|
||||
void RunStoredCallbackWhenAnimEnds(struct Sprite *sprite);
|
||||
void SetAnimSpriteInitialXOffset(struct Sprite *sprite, s16 a2);
|
||||
s16 sub_80A861C(u8 battlerId, u8 a2);
|
||||
s16 GetBattlerSpriteCoordAttr(u8 battlerId, u8 a2);
|
||||
u8 GetBattlerYCoordWithElevation(u8 battlerId);
|
||||
void WaitAnimForDuration(struct Sprite *sprite);
|
||||
void sub_80A7938(struct Sprite *sprite);
|
||||
@@ -148,8 +148,8 @@ void sub_80A6BFC(struct UnknownAnimStruct2 *unk, u8 unused);
|
||||
u8 sub_80A8394(u16 species, bool8 isBackpic, u8 a3, s16 x, s16 y, u8 subpriority, u32 personality, u32 trainerId, u32 battlerId, u32 a10);
|
||||
void sub_80A749C(struct Sprite *sprite);
|
||||
void sub_80A6814(u8 taskId);
|
||||
void sub_80A8610(struct Sprite *sprite);
|
||||
void sub_80A6DEC(struct Sprite *sprite);
|
||||
void DestroySpriteAndFreeResources_(struct Sprite *sprite);
|
||||
void SetBattlerSpriteYOffsetFromOtherYScale(u8 spriteId, u8 otherSpriteId);
|
||||
|
||||
enum
|
||||
@@ -161,6 +161,17 @@ enum
|
||||
BATTLER_COORD_Y_PIC_OFFSET_DEFAULT,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
BATTLER_COORD_ATTR_HEIGHT,
|
||||
BATTLER_COORD_ATTR_WIDTH,
|
||||
BATTLER_COORD_ATTR_TOP,
|
||||
BATTLER_COORD_ATTR_BOTTOM,
|
||||
BATTLER_COORD_ATTR_LEFT,
|
||||
BATTLER_COORD_ATTR_RIGHT,
|
||||
BATTLER_COORD_ATTR_RAW_BOTTOM,
|
||||
};
|
||||
|
||||
u8 GetBattlerSpriteCoord(u8 battlerId, u8 attributeId);
|
||||
|
||||
bool8 IsBattlerSpritePresent(u8 battlerId);
|
||||
|
||||
20
include/bg.h
20
include/bg.h
@@ -13,14 +13,16 @@ struct BGCntrlBitfield // for the I/O registers
|
||||
|
||||
enum
|
||||
{
|
||||
BG_CTRL_ATTR_VISIBLE = 1,
|
||||
BG_CTRL_ATTR_CHARBASEINDEX = 2,
|
||||
BG_CTRL_ATTR_MAPBASEINDEX = 3,
|
||||
BG_CTRL_ATTR_SCREENSIZE = 4,
|
||||
BG_CTRL_ATTR_PALETTEMODE = 5,
|
||||
BG_CTRL_ATTR_PRIORITY = 6,
|
||||
BG_CTRL_ATTR_MOSAIC = 7,
|
||||
BG_CTRL_ATTR_WRAPAROUND = 8,
|
||||
BG_ATTR_CHARBASEINDEX = 1,
|
||||
BG_ATTR_MAPBASEINDEX,
|
||||
BG_ATTR_SCREENSIZE,
|
||||
BG_ATTR_PALETTEMODE,
|
||||
BG_ATTR_MOSAIC,
|
||||
BG_ATTR_WRAPAROUND,
|
||||
BG_ATTR_PRIORITY,
|
||||
BG_ATTR_METRIC,
|
||||
BG_ATTR_TYPE,
|
||||
BG_ATTR_BASETILE,
|
||||
};
|
||||
|
||||
struct BgTemplate
|
||||
@@ -38,8 +40,6 @@ void ResetBgs(void);
|
||||
u8 GetBgMode(void);
|
||||
void ResetBgControlStructs(void);
|
||||
void Unused_ResetBgControlStruct(u8 bg);
|
||||
void SetBgControlAttributes(u8 bg, u8 charBaseIndex, u8 mapBaseIndex, u8 screenSize, u8 paletteMode, u8 priority, u8 mosaic, u8 wraparound);
|
||||
u16 GetBgControlAttribute(u8 bg, u8 attributeId);
|
||||
u8 LoadBgVram(u8 bg, const void *src, u16 size, u16 destOffset, u8 mode);
|
||||
void SetTextModeAndHideBgs(void);
|
||||
bool8 IsInvalidBg(u8 bg);
|
||||
|
||||
@@ -241,12 +241,26 @@
|
||||
#define EVENT_OBJ_GFX_LUGIA 237
|
||||
#define EVENT_OBJ_GFX_HOOH 238
|
||||
#define EVENT_OBJ_GFX_BARD_2 239
|
||||
#define EVENT_OBJ_GFX_HIPSTER 240
|
||||
#define EVENT_OBJ_GFX_TRADER 241
|
||||
#define EVENT_OBJ_GFX_STORYTELLER 242
|
||||
#define EVENT_OBJ_GFX_GIDDY 243
|
||||
#define EVENT_OBJ_GFX_PLACEHOLDER_1 244
|
||||
#define EVENT_OBJ_GFX_PLACEHOLDER_2 245
|
||||
|
||||
// These are dynamic object gfx ids.
|
||||
// They correspond with the values of the VAR_OBJ_GFX_ID_X vars.
|
||||
// More info about them in include/constants/vars.h
|
||||
#define EVENT_OBJ_GFX_VAR_0 240
|
||||
#define EVENT_OBJ_GFX_VAR_1 241
|
||||
#define EVENT_OBJ_GFX_VAR_2 242
|
||||
#define EVENT_OBJ_GFX_VAR_3 243
|
||||
#define EVENT_OBJ_GFX_VAR_4 244
|
||||
#define EVENT_OBJ_GFX_VAR_5 245
|
||||
#define EVENT_OBJ_GFX_VAR_6 246
|
||||
#define EVENT_OBJ_GFX_VAR_7 247
|
||||
#define EVENT_OBJ_GFX_VAR_8 248
|
||||
#define EVENT_OBJ_GFX_VAR_9 249
|
||||
#define EVENT_OBJ_GFX_VAR_A 250
|
||||
#define EVENT_OBJ_GFX_VAR_B 251
|
||||
#define EVENT_OBJ_GFX_VAR_C 252
|
||||
#define EVENT_OBJ_GFX_VAR_D 253
|
||||
#define EVENT_OBJ_GFX_VAR_E 254
|
||||
#define EVENT_OBJ_GFX_VAR_F 255
|
||||
|
||||
#define SHADOW_SIZE_S 0
|
||||
#define SHADOW_SIZE_M 1
|
||||
|
||||
@@ -67,6 +67,6 @@
|
||||
#define FLDEFF_USE_TELEPORT 63
|
||||
#define FLDEFF_64 64
|
||||
#define FLDEFF_65 65
|
||||
#define FLDEFF_66 66
|
||||
#define FLDEFF_MOVE_DEOXYS_ROCK 66
|
||||
|
||||
#endif
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
#define FLAG_0x09A 0x9A
|
||||
#define FLAG_0x09B 0x9B
|
||||
#define FLAG_0x09C 0x9C
|
||||
#define FLAG_0x09D 0x9D
|
||||
#define FLAG_FORCE_MIRAGE_TOWER_VISIBLE 0x9D
|
||||
#define FLAG_0x09E 0x9E
|
||||
#define FLAG_0x09F 0x9F
|
||||
#define FLAG_0x0A0 0xA0
|
||||
@@ -344,7 +344,7 @@
|
||||
#define FLAG_0x14B 0x14B
|
||||
#define FLAG_0x14C 0x14C
|
||||
#define FLAG_0x14D 0x14D
|
||||
#define FLAG_0x14E 0x14E
|
||||
#define FLAG_MIRAGE_TOWER_VISIBLE 0x14E
|
||||
#define FLAG_0x14F 0x14F// PLAYER CHOSE CLAW FOSSIL
|
||||
#define FLAG_0x150 0x150// PLAYER CHOSE ROOT FOSSIL
|
||||
#define FLAG_0x151 0x151
|
||||
@@ -804,7 +804,7 @@
|
||||
#define FLAG_HIDE_TRICK_HOUSE_ENTRANCE_MAN 0x368
|
||||
#define FLAG_HIDE_LILYCOVE_CONTEST_HALL_POKEBLOCK_EXPERT 0x369
|
||||
#define FLAG_HIDE_DESERT_UNDERPASS_FOSSIL 0x36A
|
||||
#define FLAG_HIDE_ROUTE_111_DESERT_RIVAL 0x36B
|
||||
#define FLAG_HIDE_ROUTE_111_PLAYER_DESCENT 0x36B
|
||||
#define FLAG_HIDE_ROUTE_111_DESERT_FOSSIL 0x36C
|
||||
#define FLAG_HIDE_MT_CHIMNEY_TRAINERS 0x36D
|
||||
#define FLAG_HIDE_RUSTURF_TUNNEL_AQUA_GRUNT 0x36E
|
||||
@@ -1355,10 +1355,10 @@
|
||||
#define FLAG_SYS_PYRAMID_GOLD (SYSTEM_FLAGS + 0x71)
|
||||
#define FLAG_SYS_FRONTIER_PASS (SYSTEM_FLAGS + 0x72)
|
||||
|
||||
#define FLAG_0x8D3 (SYSTEM_FLAGS + 0x73)
|
||||
#define FLAG_0x8D4 (SYSTEM_FLAGS + 0x74)
|
||||
#define FLAG_0x8D5 (SYSTEM_FLAGS + 0x75)
|
||||
#define FLAG_0x8D6 (SYSTEM_FLAGS + 0x76)
|
||||
#define FLAG_0x8D3 (SYSTEM_FLAGS + 0x73)
|
||||
#define FLAG_DEOXYS_ROCK_COMPLETE (SYSTEM_FLAGS + 0x74)
|
||||
#define FLAG_0x8D5 (SYSTEM_FLAGS + 0x75)
|
||||
#define FLAG_0x8D6 (SYSTEM_FLAGS + 0x76)
|
||||
|
||||
#define FLAG_SYS_STORAGE_UNKNOWN_FLAG (SYSTEM_FLAGS + 0x77)
|
||||
|
||||
|
||||
77
include/constants/global.h
Normal file
77
include/constants/global.h
Normal file
@@ -0,0 +1,77 @@
|
||||
#ifndef GUARD_CONSTANTS_GLOBAL_H
|
||||
#define GUARD_CONSTANTS_GLOBAL_H
|
||||
// Invalid Versions show as "----------" in Gen 4 and Gen 5's summary screen.
|
||||
// In Gens 6 and 7, invalid versions instead show "a distant land" in the summary screen.
|
||||
// In Gen 4 only, migrated Pokemon with Diamond, Pearl, or Platinum's ID show as "----------".
|
||||
// Gen 5 and up read Diamond, Pearl, or Platinum's ID as "Sinnoh".
|
||||
// In Gen 4 and up, migrated Pokemon with HeartGold or SoulSilver's ID show the otherwise unused "Johto" string.
|
||||
#define VERSION_SAPPHIRE 1
|
||||
#define VERSION_RUBY 2
|
||||
#define VERSION_EMERALD 3
|
||||
#define VERSION_FIRE_RED 4
|
||||
#define VERSION_LEAF_GREEN 5
|
||||
#define VERSION_HEART_GOLD 7
|
||||
#define VERSION_SOUL_SILVER 8
|
||||
#define VERSION_DIAMOND 10
|
||||
#define VERSION_PEARL 11
|
||||
#define VERSION_PLATINUM 12
|
||||
#define VERSION_GAMECUBE 15
|
||||
|
||||
#define LANGUAGE_JAPANESE 1
|
||||
#define LANGUAGE_ENGLISH 2
|
||||
#define LANGUAGE_FRENCH 3
|
||||
#define LANGUAGE_ITALIAN 4
|
||||
#define LANGUAGE_GERMAN 5
|
||||
#define LANGUAGE_KOREAN 6 // 6 goes unused but the theory is it was meant to be Korean
|
||||
#define LANGUAGE_SPANISH 7
|
||||
|
||||
#define GAME_VERSION (VERSION_EMERALD)
|
||||
#define GAME_LANGUAGE (LANGUAGE_ENGLISH)
|
||||
|
||||
// capacities of various saveblock objects
|
||||
#define DAYCARE_MON_COUNT 2
|
||||
#define POKEBLOCKS_COUNT 40
|
||||
#define EVENT_OBJECTS_COUNT 16
|
||||
#define BERRY_TREES_COUNT 128
|
||||
#define FLAGS_COUNT 300
|
||||
#define VARS_COUNT 256
|
||||
#define MAIL_COUNT 16
|
||||
#define SECRET_BASES_COUNT 20
|
||||
#define TV_SHOWS_COUNT 25
|
||||
#define POKE_NEWS_COUNT 16
|
||||
#define PC_ITEMS_COUNT 50
|
||||
#define BAG_ITEMS_COUNT 30
|
||||
#define BAG_KEYITEMS_COUNT 30
|
||||
#define BAG_POKEBALLS_COUNT 16
|
||||
#define BAG_TMHM_COUNT 64
|
||||
#define BAG_BERRIES_COUNT 46
|
||||
#define EVENT_OBJECT_TEMPLATES_COUNT 64
|
||||
|
||||
#define PYRAMID_BAG_ITEMS_COUNT 10
|
||||
#define HALL_FACILITIES_COUNT 9 // 7 facilities for single mode + tower double mode + tower multi mode.
|
||||
|
||||
// string lengths
|
||||
#define ITEM_NAME_LENGTH 14
|
||||
#define POKEMON_NAME_LENGTH 10
|
||||
#define PLAYER_NAME_LENGTH 7
|
||||
#define MAIL_WORDS_COUNT 9
|
||||
#define MOVE_NAME_LENGTH 12
|
||||
|
||||
#define MALE 0
|
||||
#define FEMALE 1
|
||||
|
||||
#define OPTIONS_BUTTON_MODE_NORMAL 0
|
||||
#define OPTIONS_BUTTON_MODE_LR 1
|
||||
#define OPTIONS_BUTTON_MODE_L_EQUALS_A 2
|
||||
|
||||
#define OPTIONS_TEXT_SPEED_SLOW 0
|
||||
#define OPTIONS_TEXT_SPEED_MID 1
|
||||
#define OPTIONS_TEXT_SPEED_FAST 2
|
||||
|
||||
#define OPTIONS_SOUND_MONO 0
|
||||
#define OPTIONS_SOUND_STEREO 1
|
||||
|
||||
#define OPTIONS_BATTLE_STYLE_SHIFT 0
|
||||
#define OPTIONS_BATTLE_STYLE_SET 1
|
||||
|
||||
#endif // GUARD_CONSTANTS_GLOBAL_H
|
||||
@@ -2,6 +2,7 @@
|
||||
#define GUARD_RGB_H
|
||||
|
||||
#define RGB(r, g, b) ((r) | ((g) << 5) | ((b) << 10))
|
||||
#define RGB2(r, g, b) (((b) << 10) | ((g) << 5) | (r))
|
||||
#define _RGB(r, g, b) ((((b) & 0x1F) << 10) + (((g) & 0x1F) << 5) + ((r) & 0x1F))
|
||||
|
||||
#define RGB_BLACK RGB(0, 0, 0)
|
||||
@@ -12,6 +13,6 @@
|
||||
#define RGB_YELLOW RGB(31, 31, 0)
|
||||
#define RGB_MAGENTA RGB(31, 0, 31)
|
||||
#define RGB_CYAN RGB(0, 31, 31)
|
||||
#define RGB_WHITEALPHA RGB_WHITE | 0x8000
|
||||
#define RGB_WHITEALPHA (RGB_WHITE | 0x8000)
|
||||
|
||||
#endif // GUARD_RGB_H
|
||||
|
||||
@@ -536,6 +536,6 @@
|
||||
#define PH_NURSE_HELD 608
|
||||
#define PH_NURSE_SOLO 609
|
||||
|
||||
#define MUS_ROUTE_118 0x7FFF // What is this for?
|
||||
#define MUS_ROUTE_118 0x7FFF // map is split into 2 music sections. controlled by GetCurrLocationDefaultMusic().
|
||||
|
||||
#endif // GUARD_CONSTANTS_SONGS_H
|
||||
|
||||
@@ -68,8 +68,8 @@
|
||||
#define VAR_FRONTIER_GAMBLER_AMOUNT_BET 0x4032
|
||||
#define VAR_FRONTIER_GAMBLER_PLACED_BET_F 0x4033
|
||||
|
||||
#define VAR_0x4034 0x4034
|
||||
#define VAR_0x4035 0x4035
|
||||
#define VAR_DEOXYS_ROCK_STEP_COUNT 0x4034
|
||||
#define VAR_DEOXYS_ROCK_LEVEL 0x4035
|
||||
#define VAR_STORAGE_UNKNOWN 0x4036
|
||||
#define VAR_0x4037 0x4037
|
||||
#define VAR_0x4038 0x4038
|
||||
@@ -81,8 +81,8 @@
|
||||
#define VAR_ALTERING_CAVE_WILD_SET 0x403E
|
||||
#define VAR_0x403F 0x403F
|
||||
#define VAR_DAYS 0x4040
|
||||
#define VAR_FANCLUB_UNKNOWN_1 0x4041
|
||||
#define VAR_FANCLUB_UNKNOWN_2 0x4042
|
||||
#define VAR_FANCLUB_UNKNOWN_1 0x4041
|
||||
#define VAR_FANCLUB_UNKNOWN_2 0x4042
|
||||
#define VAR_DEPT_STORE_FLOOR 0x4043
|
||||
#define VAR_0x4044 0x4044
|
||||
#define VAR_POKELOT_PRIZE 0x4045
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef GUARD_DATA2_H
|
||||
#define GUARD_DATA2_H
|
||||
|
||||
#define MOVE_NAME_LENGTH 12
|
||||
|
||||
struct MonCoords
|
||||
{
|
||||
// This would use a bitfield, but some function
|
||||
|
||||
@@ -538,7 +538,7 @@ extern const u8 EventScript_TV[];
|
||||
extern const u8 EventScript_ClosedSootopolisDoor[];
|
||||
extern const u8 SkyPillar_Outside_EventScript_2393F9[];
|
||||
extern const u8 EventScript_CableBoxResults[];
|
||||
extern const u8 EventScript_2A4BAC[];
|
||||
extern const u8 EventScript_PokeBlockFeeder[];
|
||||
extern const u8 Route110_TrickHouseEntrance_EventScript_26A22A[];
|
||||
extern const u8 EventScript_RegionMap[];
|
||||
extern const u8 EventScript_RunningShoesManual[];
|
||||
|
||||
@@ -7,8 +7,8 @@ struct FieldInput
|
||||
bool8 checkStandardWildEncounter:1;
|
||||
bool8 pressedStartButton:1;
|
||||
bool8 pressedSelectButton:1;
|
||||
bool8 input_field_0_4:1;
|
||||
bool8 input_field_0_5:1;
|
||||
bool8 heldDirection:1;
|
||||
bool8 heldDirection2:1;
|
||||
bool8 tookStep:1;
|
||||
bool8 pressedBButton:1;
|
||||
bool8 input_field_1_0:1;
|
||||
@@ -20,7 +20,6 @@ struct FieldInput
|
||||
bool8 input_field_1_6:1;
|
||||
bool8 input_field_1_7:1;
|
||||
u8 dpadDirection;
|
||||
u8 input_field_3;
|
||||
};
|
||||
|
||||
void FieldClearPlayerInput(struct FieldInput *pStruct);
|
||||
|
||||
@@ -19,11 +19,11 @@ void sub_80AF688(void);
|
||||
bool8 sub_80AF6A4(void);
|
||||
void sub_80AF6D4(void);
|
||||
void sub_80AF6F0(void);
|
||||
void sub_80AF734(void);
|
||||
void sp13E_warp_to_last_warp(void);
|
||||
void DoWarp(void);
|
||||
void DoDiveWarp(void);
|
||||
void sub_80AF79C(void);
|
||||
void sub_80AF7D0(void);
|
||||
void sp13F_fall_to_last_warp(void);
|
||||
void DoDoorWarp(void);
|
||||
void DoFallWarp(void);
|
||||
void sub_80AF80C(u8 metatileBehavior);
|
||||
void sub_80AF828(void);
|
||||
void sub_80AF838(void);
|
||||
|
||||
@@ -6,7 +6,7 @@ u8 sub_813B260(void);
|
||||
u16 get_unknown_box_id(void);
|
||||
bool8 InMultiBattleRoom(void);
|
||||
void sub_813BF10(void);
|
||||
void increment_var_x4026_on_birth_island_modulo_100(void);
|
||||
void IncrementBirthIslandRockStepCount(void);
|
||||
bool8 sub_813B3B0(void);
|
||||
bool8 ShouldDoBrailleRegicePuzzle(void);
|
||||
bool32 is_tile_that_overrides_player_control(void);
|
||||
|
||||
@@ -7,8 +7,9 @@
|
||||
#define NUM_METATILES_TOTAL 1024
|
||||
#define NUM_PALS_IN_PRIMARY 6
|
||||
#define NUM_PALS_TOTAL 13
|
||||
#define MAX_MAP_DATA_SIZE 0x2800
|
||||
|
||||
extern struct BackupMapLayout gUnknown_03005DC0;
|
||||
extern struct BackupMapLayout gBackupMapLayout;
|
||||
|
||||
u32 MapGridGetMetatileIdAt(int, int);
|
||||
u32 MapGridGetMetatileBehaviorAt(int, int);
|
||||
@@ -19,23 +20,19 @@ bool8 MapGridIsImpassableAt(int, int);
|
||||
int GetMapBorderIdAt(int x, int y);
|
||||
int CanCameraMoveInDirection(int direction);
|
||||
u16 GetBehaviorByMetatileId(u16 metatileId);
|
||||
void sav1_camera_get_focus_coords(u16 *x, u16 *y);
|
||||
void GetCameraFocusCoords(u16 *x, u16 *y);
|
||||
u8 MapGridGetMetatileLayerTypeAt(s32 x, s32 y);
|
||||
u8 MapGridGetZCoordAt(int x, int y);
|
||||
u8 CameraMove(s32 deltaX, s32 deltaY);
|
||||
void mapheader_copy_mapdata_with_padding(struct MapHeader *mapHeader);
|
||||
void map_copy_with_padding(u16 *map, u16 width, u16 height);
|
||||
void mapheader_copy_mapdata_of_adjacent_maps(struct MapHeader *);
|
||||
void fillSouthConnection(struct MapHeader const *, struct MapHeader const *, s32);
|
||||
void fillNorthConnection(struct MapHeader const *, struct MapHeader const *, s32);
|
||||
void fillWestConnection(struct MapHeader const *, struct MapHeader const *, s32);
|
||||
void fillEastConnection(struct MapHeader const *, struct MapHeader const *, s32);
|
||||
void mapdata_from_sav2(void);
|
||||
bool8 sub_8088BF0(u16*, u16, u8);
|
||||
struct MapConnection *sub_8088950(u8 direction, int x, int y);
|
||||
bool8 sub_80889A8(u8 direction, int x, int y, struct MapConnection *connection);
|
||||
bool8 sub_8088A0C(int x, int src_width, int dest_width, int offset);
|
||||
void save_serialize_map(void);
|
||||
void sub_8088B3C(u16 x, u16 y);
|
||||
void InitMap(void);
|
||||
void InitMapFromSavedGame(void);
|
||||
void InitTrainerHillMap(void);
|
||||
void InitBattlePyramidMap(u8 a0);
|
||||
|
||||
void SpriteCB_PokeballGlow(struct Sprite *);
|
||||
void SpriteCB_PokecenterMonitor(struct Sprite *);
|
||||
|
||||
@@ -6,8 +6,8 @@ bool8 SetUpFieldMove_Cut(void);
|
||||
bool8 FldEff_UseCutOnGrass(void);
|
||||
bool8 FldEff_UseCutOnTree(void);
|
||||
bool8 FldEff_CutGrass(void);
|
||||
void sub_80D423C(s16 x, s16 y);
|
||||
void sub_80D42B8(s16 x, s16 y);
|
||||
void FixLongGrassMetatilesWindowTop(s16 x, s16 y);
|
||||
void FixLongGrassMetatilesWindowBottom(s16 x, s16 y);
|
||||
|
||||
extern const struct SpritePalette gFieldEffectObjectPaletteInfo6;
|
||||
|
||||
|
||||
105
include/global.h
105
include/global.h
@@ -4,6 +4,7 @@
|
||||
#include <string.h>
|
||||
#include "config.h" // we need to define config before gba headers as print stuff needs the functions nulled before defines.
|
||||
#include "gba/gba.h"
|
||||
#include "constants/global.h"
|
||||
|
||||
// Prevent cross-jump optimization.
|
||||
#define BLOCK_CROSS_JUMP asm("");
|
||||
@@ -93,100 +94,6 @@
|
||||
f; \
|
||||
})
|
||||
|
||||
// Invalid Versions show as "----------" in Gen 4 and Gen 5's summary screen.
|
||||
// In Gens 6 and 7, invalid versions instead show "a distant land" in the summary screen.
|
||||
// In Gen 4 only, migrated Pokemon with Diamond, Pearl, or Platinum's ID show as "----------".
|
||||
// Gen 5 and up read Diamond, Pearl, or Platinum's ID as "Sinnoh".
|
||||
// In Gen 4 and up, migrated Pokemon with HeartGold or SoulSilver's ID show the otherwise unused "Johto" string.
|
||||
enum
|
||||
{
|
||||
VERSION_SAPPHIRE = 1,
|
||||
VERSION_RUBY = 2,
|
||||
VERSION_EMERALD = 3,
|
||||
VERSION_FIRE_RED = 4,
|
||||
VERSION_LEAF_GREEN = 5,
|
||||
VERSION_HEART_GOLD = 7,
|
||||
VERSION_SOUL_SILVER = 8,
|
||||
VERSION_DIAMOND = 10,
|
||||
VERSION_PEARL = 11,
|
||||
VERSION_PLATINUM = 12,
|
||||
VERSION_GAMECUBE = 15,
|
||||
};
|
||||
|
||||
enum LanguageId
|
||||
{
|
||||
LANGUAGE_JAPANESE = 1,
|
||||
LANGUAGE_ENGLISH = 2,
|
||||
LANGUAGE_FRENCH = 3,
|
||||
LANGUAGE_ITALIAN = 4,
|
||||
LANGUAGE_GERMAN = 5,
|
||||
// 6 goes unused but the theory is it was meant to be Korean
|
||||
LANGUAGE_SPANISH = 7,
|
||||
};
|
||||
|
||||
#define GAME_VERSION (VERSION_EMERALD)
|
||||
#define GAME_LANGUAGE (LANGUAGE_ENGLISH)
|
||||
|
||||
// capacities of various saveblock objects
|
||||
#define DAYCARE_MON_COUNT 2
|
||||
#define POKEBLOCKS_COUNT 40
|
||||
#define EVENT_OBJECTS_COUNT 16
|
||||
#define BERRY_TREES_COUNT 128
|
||||
#define FLAGS_COUNT 300
|
||||
#define VARS_COUNT 256
|
||||
#define MAIL_COUNT 16
|
||||
#define SECRET_BASES_COUNT 20
|
||||
#define TV_SHOWS_COUNT 25
|
||||
#define POKE_NEWS_COUNT 16
|
||||
#define PC_ITEMS_COUNT 50
|
||||
#define BAG_ITEMS_COUNT 30
|
||||
#define BAG_KEYITEMS_COUNT 30
|
||||
#define BAG_POKEBALLS_COUNT 16
|
||||
#define BAG_TMHM_COUNT 64
|
||||
#define BAG_BERRIES_COUNT 46
|
||||
#define EVENT_OBJECT_TEMPLATES_COUNT 64
|
||||
|
||||
#define PYRAMID_BAG_ITEMS_COUNT 10
|
||||
#define HALL_FACILITIES_COUNT 9 // 7 facilities for single mode + tower double mode + tower multi mode.
|
||||
|
||||
// string lengths
|
||||
#define ITEM_NAME_LENGTH 14
|
||||
#define POKEMON_NAME_LENGTH 10
|
||||
#define PLAYER_NAME_LENGTH 7
|
||||
#define MAIL_WORDS_COUNT 9
|
||||
|
||||
enum
|
||||
{
|
||||
MALE,
|
||||
FEMALE
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
OPTIONS_BUTTON_MODE_NORMAL,
|
||||
OPTIONS_BUTTON_MODE_LR,
|
||||
OPTIONS_BUTTON_MODE_L_EQUALS_A
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
OPTIONS_TEXT_SPEED_SLOW,
|
||||
OPTIONS_TEXT_SPEED_MID,
|
||||
OPTIONS_TEXT_SPEED_FAST
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
OPTIONS_SOUND_MONO,
|
||||
OPTIONS_SOUND_STEREO
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
OPTIONS_BATTLE_STYLE_SHIFT,
|
||||
OPTIONS_BATTLE_STYLE_SET
|
||||
};
|
||||
|
||||
struct Coords8
|
||||
{
|
||||
s8 x;
|
||||
@@ -521,7 +428,7 @@ struct SaveBlock2
|
||||
{
|
||||
/*0x00*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x08*/ u8 playerGender; // MALE, FEMALE
|
||||
/*0x09*/ u8 specialSaveWarp;
|
||||
/*0x09*/ u8 specialSaveWarpFlags;
|
||||
/*0x0A*/ u8 playerTrainerId[4];
|
||||
/*0x0E*/ u16 playTimeHours;
|
||||
/*0x10*/ u8 playTimeMinutes;
|
||||
@@ -889,10 +796,10 @@ struct SaveBlock1
|
||||
{
|
||||
/*0x00*/ struct Coords16 pos;
|
||||
/*0x04*/ struct WarpData location;
|
||||
/*0x0C*/ struct WarpData warp1;
|
||||
/*0x14*/ struct WarpData warp2;
|
||||
/*0x1C*/ struct WarpData lastHealLocation;
|
||||
/*0x24*/ struct WarpData warp4;
|
||||
/*0x0C*/ struct WarpData continueGameWarp;
|
||||
/*0x14*/ struct WarpData dynamicWarp;
|
||||
/*0x1C*/ struct WarpData lastHealLocation; // used by white-out and teleport
|
||||
/*0x24*/ struct WarpData escapeWarp; // used by Dig and Escape Rope
|
||||
/*0x2C*/ u16 savedMusic;
|
||||
/*0x2E*/ u8 weather;
|
||||
/*0x2F*/ u8 weatherCycleStage;
|
||||
|
||||
@@ -15,11 +15,11 @@ void ClearSav2(void);
|
||||
void ClearSav1(void);
|
||||
void SetSaveBlocksPointers(u16 offset);
|
||||
void MoveSaveBlocks_ResetHeap(void);
|
||||
u32 GetSecretBase2Field_9(void);
|
||||
void ClearSecretBase2Field_9(void);
|
||||
void SetSecretBase2Field_9(void);
|
||||
void sub_8076D5C(void);
|
||||
void sav2_gender2_inplace_and_xFE(void);
|
||||
u32 UseContinueGameWarp(void);
|
||||
void ClearContinueGameWarpStatus(void);
|
||||
void SetContinueGameWarpStatus(void);
|
||||
void SetContinueGameWarpStatusToDynamicWarp(void);
|
||||
void ClearContinueGameWarpStatus2(void);
|
||||
void SavePlayerParty(void);
|
||||
void LoadPlayerParty(void);
|
||||
void SaveEventObjects(void);
|
||||
|
||||
@@ -20,7 +20,8 @@ struct MenuAction
|
||||
|
||||
extern const u16 gUnknown_0860F074[];
|
||||
|
||||
void sub_81971D0(void);
|
||||
void FreeAllOverworldWindowBuffers(void);
|
||||
void InitStandardTextBoxWindows(void);
|
||||
void sub_8197200(void);
|
||||
u16 RunTextPrintersAndIsPrinter0Active(void);
|
||||
void sub_81973A4(void);
|
||||
|
||||
8
include/mirage_tower.h
Normal file
8
include/mirage_tower.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef GUARD_MIRAGE_TOWER_H
|
||||
#define GUARD_MIRAGE_TOWER_H
|
||||
|
||||
void ClearMirageTowerPulseBlendEffect(void);
|
||||
void ClearMirageTowerPulseBlend(void);
|
||||
void TryStartMirageTowerPulseBlendEffect(void);
|
||||
|
||||
#endif // GUARD_MIRAGE_TOWER_H
|
||||
@@ -46,28 +46,25 @@ void Overworld_SetEventObjTemplateCoords(u8 localId, s16 x, s16 y);
|
||||
void Overworld_SetEventObjTemplateMovementType(u8 localId, u8 movementType);
|
||||
const struct MapLayout *GetMapLayout(void);
|
||||
void ApplyCurrentWarp(void);
|
||||
void set_warp2_warp3_to_neg_1(void);
|
||||
struct MapHeader const *const Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum);
|
||||
struct MapHeader const *const GetDestinationWarpMapHeader(void);
|
||||
void WarpIntoMap(void);
|
||||
void Overworld_SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void warp1_set_2(s8 mapGroup, s8 mapNum, s8 warpId);
|
||||
void saved_warp2_set(s32 unused, s8 mapGroup, s8 mapNum, s8 warpId);
|
||||
void saved_warp2_set_2(s32 unused, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void copy_saved_warp2_bank_and_enter_x_to_warp1(u8 unused);
|
||||
void sub_8084CCC(u8 a1);
|
||||
void Overworld_SetWarpDestToLastHealLoc(void);
|
||||
void Overworld_SetHealLocationWarp(u8 healLocationId);
|
||||
void sub_8084D5C(s16 a1, s16 a2);
|
||||
void sub_8084DD4(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void sub_8084E14(void);
|
||||
void SetWarpDestination(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void SetWarpDestinationToMapWarp(s8 mapGroup, s8 mapNum, s8 warpId);
|
||||
void SetDynamicWarp(s32 unused, s8 mapGroup, s8 mapNum, s8 warpId);
|
||||
void SetDynamicWarpWithCoords(s32 unused, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void SetWarpDestinationToDynamicWarp(u8 unused);
|
||||
void SetWarpDestinationToHealLocation(u8 a1);
|
||||
void SetWarpDestinationToLastHealLocation(void);
|
||||
void SetLastHealLocationWarp(u8 healLocationId);
|
||||
void UpdateEscapeWarp(s16 x, s16 y);
|
||||
void SetEscapeWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void SetWarpDestinationToEscapeWarp(void);
|
||||
void SetFixedDiveWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void SetFixedHoleWarp(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void SetFixedHoleWarpAsDestination(s16 x, s16 y);
|
||||
void warp1_set_to_sav1w(void);
|
||||
void sub_8084F2C(s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
|
||||
void sub_8084F6C(u8 a1);
|
||||
void sub_8084FAC(int unused);
|
||||
void SetWarpDestinationToFixedHoleWarp(s16 x, s16 y);
|
||||
void SetContinueGameWarpToHealLocation(u8 a1);
|
||||
void SetContinueGameWarpToDynamicWarp(int unused);
|
||||
const struct MapConnection *GetMapConnection(u8 dir);
|
||||
bool8 SetDiveWarpEmerge(u16 x, u16 y);
|
||||
bool8 SetDiveWarpDive(u16 x, u16 y);
|
||||
@@ -78,7 +75,7 @@ bool32 Overworld_IsBikingAllowed(void);
|
||||
void SetDefaultFlashLevel(void);
|
||||
void Overworld_SetFlashLevel(s32 flashLevel);
|
||||
u8 Overworld_GetFlashLevel(void);
|
||||
void sub_8085524(u16 mapLayoutId);
|
||||
void SetCurrentMapLayout(u16 mapLayoutId);
|
||||
void sub_8085540(u8 var);
|
||||
u8 sub_808554C(void);
|
||||
u16 GetLocationMusic(struct WarpData *warp);
|
||||
@@ -97,15 +94,15 @@ void Overworld_FadeOutMapMusic(void);
|
||||
void UpdateAmbientCry(s16 *state, u16 *delayCounter);
|
||||
u8 GetMapTypeByGroupAndId(s8 mapGroup, s8 mapNum);
|
||||
u8 GetMapTypeByWarpData(struct WarpData *warp);
|
||||
u8 Overworld_GetMapTypeOfSaveblockLocation(void);
|
||||
u8 GetCurrentMapType(void);
|
||||
u8 GetLastUsedWarpMapType(void);
|
||||
bool8 is_map_type_1_2_3_5_or_6(u8 mapType);
|
||||
bool8 Overworld_MapTypeAllowsTeleportAndFly(u8 mapType);
|
||||
bool8 Overworld_MapTypeIsIndoors(u8 mapType);
|
||||
u8 sav1_saved_warp2_map_get_name(void);
|
||||
u8 sav1_map_get_name(void);
|
||||
u8 GetSavedWarpRegionMapSectionId(void);
|
||||
u8 GetCurrentRegionMapSectionId(void);
|
||||
u8 GetCurrentMapBattleScene(void);
|
||||
void overworld_free_bg_tilemaps(void);
|
||||
void CleanupOverworldWindowsAndTilemaps(void);
|
||||
bool32 is_c1_link_related_active(void);
|
||||
void CB1_Overworld(void);
|
||||
void CB2_OverworldBasic(void);
|
||||
|
||||
@@ -1,45 +1,44 @@
|
||||
#ifndef GUARD_ROULETTE_UTIL_H
|
||||
#define GUARD_ROULETTE_UTIL_H
|
||||
|
||||
struct InnerStruct203CF18_3
|
||||
struct PulseBlendSettings
|
||||
{
|
||||
u16 unk0;
|
||||
u16 unk2;
|
||||
u8 unk4;
|
||||
u8 unk5;
|
||||
u8 unk6;
|
||||
s8 unk7_0:4;
|
||||
s8 unk7_4:2;
|
||||
s8 unk7_6:1;
|
||||
u16 blendColor;
|
||||
u16 paletteOffset;
|
||||
u8 numColors;
|
||||
u8 delay;
|
||||
u8 numFadeCycles;
|
||||
s8 maxBlendCoeff:4;
|
||||
s8 fadeType:2;
|
||||
s8 restorePaletteOnUnload:1;
|
||||
s8 unk7_7:1;
|
||||
};
|
||||
|
||||
struct InnerStruct203CF18_2
|
||||
struct PulseBlendPalette
|
||||
{
|
||||
u8 unk0;
|
||||
u8 unk1_0:4;
|
||||
u8 unk1_4:1;
|
||||
u8 paletteSelector;
|
||||
u8 blendCoeff:4;
|
||||
u8 fadeDirection:1;
|
||||
s8 unk1_5:1;
|
||||
s8 unk1_6:1;
|
||||
u32 unk1_7:1;
|
||||
u8 unk2;
|
||||
u8 unk3;
|
||||
struct InnerStruct203CF18_3 unk4;
|
||||
s8 available:1;
|
||||
u32 inUse:1;
|
||||
u8 delayCounter;
|
||||
u8 fadeCycleCounter;
|
||||
struct PulseBlendSettings pulseBlendSettings;
|
||||
};
|
||||
|
||||
// structures
|
||||
struct InnerStruct203CF18
|
||||
struct PulseBlend
|
||||
{
|
||||
u16 unk0;
|
||||
struct InnerStruct203CF18_2 unk4[16];
|
||||
u16 usedPulseBlendPalettes;
|
||||
struct PulseBlendPalette pulseBlendPalettes[16];
|
||||
};
|
||||
|
||||
int sub_8151B68(struct InnerStruct203CF18 *, const struct InnerStruct203CF18_3 *);
|
||||
void sub_8151B3C(struct InnerStruct203CF18 *);
|
||||
void sub_8151CA8(struct InnerStruct203CF18 *, u16, u8);
|
||||
void sub_8151C50(struct InnerStruct203CF18 *, u16, u8);
|
||||
void sub_8151D28(struct InnerStruct203CF18 *, u16, u8);
|
||||
void sub_8151E50(struct InnerStruct203CF18 *);
|
||||
int InitPulseBlendPaletteSettings(struct PulseBlend *, const struct PulseBlendSettings *);
|
||||
void InitPulseBlend(struct PulseBlend *);
|
||||
void MarkUsedPulseBlendPalettes(struct PulseBlend *, u16, u8);
|
||||
void UnloadUsedPulseBlendPalettes(struct PulseBlend *, u16, u8);
|
||||
void UnmarkUsedPulseBlendPalettes(struct PulseBlend *, u16, u8);
|
||||
void UpdatePulseBlend(struct PulseBlend *);
|
||||
void sub_8152008(u16 *dest, u16 src, u8 left, u8 top, u8 width, u8 height);
|
||||
void sub_8152058(u16 *dest, u16 *src, u8 left, u8 top, u8 width, u8 height);
|
||||
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
#ifndef GUARD_SAVE_LOCATION_H
|
||||
#define GUARD_SAVE_LOCATION_H
|
||||
|
||||
// specialSaveWarp flags
|
||||
#define CONTINUE_GAME_WARP (1 << 0)
|
||||
#define POKECENTER_SAVEWARP (1 << 1)
|
||||
#define LOBBY_SAVEWARP (1 << 2)
|
||||
#define UNK_SPECIAL_SAVE_WARP_FLAG_3 (1 << 3)
|
||||
|
||||
void TrySetMapSaveWarpStatus(void);
|
||||
void sub_81AFDA0(void);
|
||||
void sub_81AFDD0(void);
|
||||
|
||||
@@ -21,7 +21,7 @@ void sub_80EB498(void);
|
||||
void sub_80EB56C(void);
|
||||
void sub_80EB9E0(void);
|
||||
void sub_80EBB28(void);
|
||||
void sub_80E9668(const struct MapPosition *position, const struct MapEvents *events);
|
||||
void WarpIntoSecretBase(const struct MapPosition *position, const struct MapEvents *events);
|
||||
|
||||
// SetCurrentSecretBaseFromPosition
|
||||
void sub_80E9608(const struct MapPosition *position, const struct MapEvents *events);
|
||||
|
||||
Reference in New Issue
Block a user