Merge branch 'master' into mauville_old_man

This commit is contained in:
PikalaxALT 2018-05-09 15:30:21 -04:00
commit 4470f77b3d
20 changed files with 1091 additions and 2334 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,3 @@
gUnknown_03005DD0
gUnknown_03005DE8
gUnknown_03005DEC

1
common_syms/fieldmap.txt Normal file
View File

@ -0,0 +1 @@
gUnknown_03005DC0

View File

@ -1,8 +0,0 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2, 0
gUnknown_08486EF8:: @ 8486EF8
.4byte 0x00000000

View File

@ -7,5 +7,6 @@ u16 sub_81A89A0(u8);
void sub_81A8AF8(void); void sub_81A8AF8(void);
bool8 InBattlePike(void); bool8 InBattlePike(void);
void sub_819FA50(void); void sub_819FA50(void);
void sub_81AA078(u16*, u8);
#endif // GUARD_BATTLE_FRONTIER_2_H #endif // GUARD_BATTLE_FRONTIER_2_H

View File

@ -1,22 +1,31 @@
#ifndef GUARD_FIELDMAP_H #ifndef GUARD_FIELDMAP_H
#define GUARD_FIELDMAP_H #define GUARD_FIELDMAP_H
extern struct MapCoords { extern struct BackupMapData gUnknown_03005DC0;
int width;
int height;
} gUnknown_03005DC0;
u32 MapGridGetMetatileIdAt(int, int); u32 MapGridGetMetatileIdAt(int, int);
u32 MapGridGetMetatileBehaviorAt(int, int); u32 MapGridGetMetatileBehaviorAt(int, int);
void MapGridSetMetatileIdAt(int, int, u16); void MapGridSetMetatileIdAt(int, int, u16);
void MapGridSetMetatileEntryAt(int, int, u16); void MapGridSetMetatileEntryAt(int, int, u16);
void GetCameraCoords(u16*, u16*); void GetCameraCoords(u16*, u16*);
bool8 MapGridIsImpassableAt(s16, s16); bool8 MapGridIsImpassableAt(int, int);
s32 GetMapBorderIdAt(s16, s16); int GetMapBorderIdAt(int x, int y);
bool32 CanCameraMoveInDirection(u8); int CanCameraMoveInDirection(int direction);
u16 GetBehaviorByMetatileId(u16 metatileId); u16 GetBehaviorByMetatileId(u16 metatileId);
void sav1_camera_get_focus_coords(u16 *x, u16 *y); void sav1_camera_get_focus_coords(u16 *x, u16 *y);
u8 MapGridGetMetatileLayerTypeAt(s32 x, s32 y); u8 MapGridGetMetatileLayerTypeAt(s32 x, s32 y);
u8 CameraMove(s32 deltaX, s32 deltaY); 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);
#endif //GUARD_FIELDMAP_H #endif //GUARD_FIELDMAP_H

View File

@ -10,5 +10,6 @@
void sub_80FA5E4(s16 id, s16 x, s16 y); void sub_80FA5E4(s16 id, s16 x, s16 y);
void sub_80FA794(s16 x, s16 y); void sub_80FA794(s16 x, s16 y);
void overworld_poison_effect(void); void overworld_poison_effect(void);
bool8 sub_80FADE4(u16, u8);
#endif //GUARD_FLDEFF_80F9BCC_H #endif //GUARD_FLDEFF_80F9BCC_H

7
include/fldeff_cut.h Normal file
View File

@ -0,0 +1,7 @@
#ifndef GUARD_FLDEFF_CUT_H
#define GUARD_FLDEFF_CUT_H
void sub_80D423C(s16, s16);
void sub_80D42B8(s16, s16);
#endif // GUARD_FLDEFF_CUT_H

View File

@ -0,0 +1,6 @@
#ifndef GUARD_FLDEFF_GROUNDSHAKE_H
#define GUARD_FLDEFF_GROUNDSHAKE_H
void sub_81BE72C(void);
#endif // GUARD_FLDEFF_GROUNDSHAKE_H

View File

@ -44,8 +44,8 @@ void ApplyCurrentWarp(void);
void set_warp2_warp3_to_neg_1(void); void set_warp2_warp3_to_neg_1(void);
void SetWarpData(struct WarpData *warp, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y); void SetWarpData(struct WarpData *warp, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
bool32 warp_data_is_not_neg_1(struct WarpData *warp); bool32 warp_data_is_not_neg_1(struct WarpData *warp);
const struct MapHeader *Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum); struct MapHeader const *const Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum);
const struct MapHeader *warp1_get_mapheader(void); struct MapHeader const *const warp1_get_mapheader(void);
void set_current_map_header_from_sav1_save_old_name(void); void set_current_map_header_from_sav1_save_old_name(void);
void LoadSaveblockMapHeader(void); void LoadSaveblockMapHeader(void);
void update_camera_pos_from_warpid(void); void update_camera_pos_from_warpid(void);

View File

@ -20,6 +20,7 @@ void sub_81D1E90(struct PlayerPCItemPageStruct *);
void sub_81D1EC0(void); void sub_81D1EC0(void);
void sub_81D1D04(u8); void sub_81D1D04(u8);
bool8 sub_81D1C44(u8); bool8 sub_81D1C44(u8);
void sub_81D5FB4(u16*);
#endif //GUARD_POKENAV_H #endif //GUARD_POKENAV_H

View File

@ -10,6 +10,8 @@ void sub_80E9578(void);
void sub_80E980C(void); void sub_80E980C(void);
u8 *GetSecretBaseMapName(u8 *dest); u8 *GetSecretBaseMapName(u8 *dest);
const u8 *GetSecretBaseTrainerLoseText(void); const u8 *GetSecretBaseTrainerLoseText(void);
void sub_80E8EE0(struct MapEvents const *events);
void sub_80E9238(u8 flagIn);
bool8 CurrentMapIsSecretBase(void); bool8 CurrentMapIsSecretBase(void);
#endif //GUARD_SECRET_BASE_H #endif //GUARD_SECRET_BASE_H

View File

@ -45,5 +45,6 @@ void PutPokemonTodayCaughtOnAir(void);
void TV_PutSecretBaseVisitOnTheAir(void); void TV_PutSecretBaseVisitOnTheAir(void);
bool8 Put3CheersForPokeblocksOnTheAir(const u8 *partnersName, u8 flavor, u8 unused, u8 sheen, u8 language); bool8 Put3CheersForPokeblocksOnTheAir(const u8 *partnersName, u8 flavor, u8 unused, u8 sheen, u8 language);
void PutBattleUpdateOnTheAir(u8 opponentLinkPlayerId, u16 move, u16 speciesPlayer, u16 speciesOpponent); void PutBattleUpdateOnTheAir(u8 opponentLinkPlayerId, u16 move, u16 speciesPlayer, u16 speciesOpponent);
void UpdateTVScreensOnMap(int, int);
#endif //GUARD_TV_H #endif //GUARD_TV_H

View File

@ -87,7 +87,7 @@ SECTIONS {
src/play_time.o(.text); src/play_time.o(.text);
src/new_game.o(.text); src/new_game.o(.text);
src/overworld.o(.text); src/overworld.o(.text);
asm/fieldmap.o(.text); src/fieldmap.o(.text);
src/metatile_behavior.o(.text); src/metatile_behavior.o(.text);
src/field_camera.o(.text); src/field_camera.o(.text);
src/field_door.o(.text); src/field_door.o(.text);
@ -395,7 +395,7 @@ SECTIONS {
src/overworld.o(.rodata); src/overworld.o(.rodata);
data/tilesets.o(.rodata); data/tilesets.o(.rodata);
data/maps.o(.rodata); data/maps.o(.rodata);
data/fieldmap.o(.rodata); src/fieldmap.o(.rodata);
src/metatile_behavior.o(.rodata); src/metatile_behavior.o(.rodata);
src/field_door.o(.rodata); src/field_door.o(.rodata);
data/field_player_avatar.o(.rodata); data/field_player_avatar.o(.rodata);

View File

@ -12,6 +12,8 @@
#include "sprite.h" #include "sprite.h"
#include "text.h" #include "text.h"
EWRAM_DATA bool8 gUnusedBikeCameraAheadPanback = FALSE;
// Static type declarations // Static type declarations
struct FieldCameraUnknownStruct struct FieldCameraUnknownStruct
{ {
@ -40,6 +42,10 @@ static IWRAM_DATA s16 gUnknown_03000E2A;
static IWRAM_DATA u8 gUnknown_03000E2C; static IWRAM_DATA u8 gUnknown_03000E2C;
static IWRAM_DATA void (*gUnknown_03000E30)(void); static IWRAM_DATA void (*gUnknown_03000E30)(void);
struct CameraObject gUnknown_03005DD0;
u16 gUnknown_03005DE8;
u16 gUnknown_03005DEC;
// text // text
static void move_tilemap_camera_to_upper_left_corner_(struct FieldCameraUnknownStruct *a) static void move_tilemap_camera_to_upper_left_corner_(struct FieldCameraUnknownStruct *a)
{ {

1034
src/fieldmap.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -137,7 +137,6 @@ extern void trainer_hill_map_load_related(void);
extern void sub_8087D74(void); extern void sub_8087D74(void);
extern void battle_pyramid_map_load_related(u8); extern void battle_pyramid_map_load_related(u8);
extern void sub_80B00E8(u8); extern void sub_80B00E8(u8);
extern void UpdateTVScreensOnMap(u32, u32);
extern void sub_80E9238(u8); extern void sub_80E9238(u8);
extern void sub_81A3908(void); extern void sub_81A3908(void);
extern void sub_81AA2F8(void); extern void sub_81AA2F8(void);
@ -614,12 +613,12 @@ bool32 warp_data_is_not_neg_1(struct WarpData *warp)
return TRUE; return TRUE;
} }
const struct MapHeader *Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum) struct MapHeader const *const Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum)
{ {
return gMapGroups[mapGroup][mapNum]; return gMapGroups[mapGroup][mapNum];
} }
const struct MapHeader *warp1_get_mapheader(void) struct MapHeader const *const warp1_get_mapheader(void)
{ {
return Overworld_GetMapHeaderByGroupAndId(sWarpDestination.mapGroup, sWarpDestination.mapNum); return Overworld_GetMapHeaderByGroupAndId(sWarpDestination.mapGroup, sWarpDestination.mapNum);
} }

View File

@ -327,7 +327,7 @@ void sub_80E8E18(void)
VarSet(VAR_SECRET_BASE_MAP, gMapHeader.regionMapSectionId); VarSet(VAR_SECRET_BASE_MAP, gMapHeader.regionMapSectionId);
} }
void sub_80E8EE0(struct MapEvents *events) void sub_80E8EE0(struct MapEvents const *events)
{ {
u16 bgEventIndex; u16 bgEventIndex;
u16 i; u16 i;

View File

@ -39,17 +39,8 @@ gUnknown_03005DB4: @ 3005DB4
gFieldLinkPlayerCount: @ 3005DB8 gFieldLinkPlayerCount: @ 3005DB8
.space 0x8 .space 0x8
gUnknown_03005DC0: @ 3005DC0 .include "fieldmap.o"
.space 0x10 .include "field_camera.o"
gUnknown_03005DD0: @ 3005DD0
.space 0x18
gUnknown_03005DE8: @ 3005DE8
.space 0x4
gUnknown_03005DEC: @ 3005DEC
.space 0x4
gSelectedMapObject: @ 3005DF0 gSelectedMapObject: @ 3005DF0
.space 0x4 .space 0x4

View File

@ -209,22 +209,10 @@ gUnknown_020322D5: @ 20322D5
.space 0x3 .space 0x3
.include "src/overworld.o" .include "src/overworld.o"
.include "src/fieldmap.o"
.include "src/field_camera.o"
gUnknown_02032318: @ 2032318 .align 2
.space 0x5000
gMapHeader: @ 2037318
.space 0x1C
gCamera: @ 2037334
.space 0xC
gUnknown_02037340: @ 2037340
.space 0x8
gUnusedBikeCameraAheadPanback: @ 2037348
.space 0x4
gUnknown_0203734C: @ 203734C gUnknown_0203734C: @ 203734C
.space 0x4 .space 0x4