summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2019-01-07 16:53:40 -0500
committerGitHub <noreply@github.com>2019-01-07 16:53:40 -0500
commit8f7400809626c0f72dfe751665126f94181fd7c1 (patch)
tree17f9256f07ff23163cf13af85fdc36847549cbbe /include
parent08ffdce1b642dfc00080f99578049b8c3ddfd7e9 (diff)
parent6da60e9b36303ac9d67a59db9092adb1dae6b43f (diff)
Merge pull request #39 from PikalaxALT/fieldmap
fieldmap
Diffstat (limited to 'include')
-rw-r--r--include/fieldmap.h21
-rw-r--r--include/global.fieldmap.h14
-rw-r--r--include/global.h3
-rw-r--r--include/menu.h1
-rw-r--r--include/new_menu_helpers.h1
-rw-r--r--include/overworld.h3
-rw-r--r--include/palette.h2
-rw-r--r--include/quest_log.h1
8 files changed, 31 insertions, 15 deletions
diff --git a/include/fieldmap.h b/include/fieldmap.h
index c5abdb2e1..537626edc 100644
--- a/include/fieldmap.h
+++ b/include/fieldmap.h
@@ -3,19 +3,24 @@
#include "global.h"
-extern struct MapCoords {
- int width;
- int height;
-} gUnknown_03005DC0;
+#define NUM_TILES_IN_PRIMARY 640
+#define NUM_TILES_TOTAL 1024
+#define NUM_METATILES_IN_PRIMARY 640
+#define NUM_METATILES_TOTAL 1024
+#define NUM_PALS_IN_PRIMARY 7
+#define NUM_PALS_TOTAL 13
+#define VIRTUAL_MAP_SIZE 0x2800
+
+extern struct BackupMapData VMap;
u32 MapGridGetMetatileIdAt(int, int);
u32 MapGridGetMetatileBehaviorAt(int, int);
void MapGridSetMetatileIdAt(int, int, u16);
void MapGridSetMetatileEntryAt(int, int, u16);
void GetCameraCoords(u16*, u16*);
-bool8 MapGridIsImpassableAt(s16, s16);
-s32 GetMapBorderIdAt(s16, s16);
-bool32 CanCameraMoveInDirection(u8);
-u16 GetBehaviorByMetatileId(u16 metatileId);
+bool8 MapGridIsImpassableAt(s32, s32);
+s32 GetMapBorderIdAt(s32, s32);
+bool32 CanCameraMoveInDirection(s32);
+u32 GetBehaviorByMetatileIdAndMapData(struct MapData *mapData, u16 metatile, u8 attr);
#endif //GUARD_FIELDMAP_H
diff --git a/include/global.fieldmap.h b/include/global.fieldmap.h
index ed5054b7d..b602741a6 100644
--- a/include/global.fieldmap.h
+++ b/include/global.fieldmap.h
@@ -51,8 +51,8 @@ struct Tileset
/*0x04*/ void *tiles;
/*0x08*/ void *palettes;
/*0x0c*/ void *metatiles;
- /*0x10*/ void *metatileAttributes;
/*0x14*/ TilesetCB callback;
+ /*0x10*/ void *metatileAttributes;
};
struct MapData
@@ -63,12 +63,14 @@ struct MapData
/*0x0c*/ u16 *map;
/*0x10*/ struct Tileset *primaryTileset;
/*0x14*/ struct Tileset *secondaryTileset;
+ /*0x18*/ u8 unk18;
+ /*0x19*/ u8 unk19;
};
struct BackupMapData
{
- s32 width;
- s32 height;
+ s32 Xsize;
+ s32 Ysize;
u16 *map;
};
@@ -149,9 +151,9 @@ struct MapEvents
struct MapConnection
{
/*0x00*/ u8 direction;
- /*0x01*/ u32 offset;
- /*0x05*/ u8 mapGroup;
- /*0x06*/ u8 mapNum;
+ /*0x04*/ u32 offset;
+ /*0x08*/ u8 mapGroup;
+ /*0x09*/ u8 mapNum;
};
struct MapConnections
diff --git a/include/global.h b/include/global.h
index f418ff757..26ce4a8cc 100644
--- a/include/global.h
+++ b/include/global.h
@@ -328,7 +328,8 @@ struct SaveBlock2
/*0x0AC*/ u8 filler_AC[0x3F4];
/*0x4A0*/ u32 unk_4A0[0x2F];
/*0x55c*/ struct UnkSaveBlock2Substruct_55C unk_55C;
- /*0x574*/ u8 filler_574[0x524];
+ /*0x574*/ u8 filler_574[0x324];
+ /*0x898*/ u16 mapView[0x100];
/*0xA98*/ struct LinkBattleRecords linkBattleRecords;
/*0xAF0*/ struct BerryCrush berryCrush;
/*0xB00*/ u8 filler_B00[0x420];
diff --git a/include/menu.h b/include/menu.h
index b932693f7..b5078df5e 100644
--- a/include/menu.h
+++ b/include/menu.h
@@ -37,5 +37,6 @@ void clear_scheduled_bg_copies_to_vram(void);
void AddTextPrinterParametrized2(u8 windowId, u8 fontId, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, const struct TextColor *color, s8 speed, const u8 *str);
void sub_8197B1C(u8 windowId, bool8 copyToVram, u16 a2, u16 a3);
void sub_810F4D8(u8 windowId, bool32 someBool);
+void *sub_80F68F0(u8 bgId, const void *src, u32 size, u16 offset, u8 mode);
#endif // GUARD_MENU_H
diff --git a/include/new_menu_helpers.h b/include/new_menu_helpers.h
index ce8e8d697..32b46b552 100644
--- a/include/new_menu_helpers.h
+++ b/include/new_menu_helpers.h
@@ -22,5 +22,6 @@ void sub_80F6EE4(u8 windowId, bool8 transfer);
void sub_80F7974(const u8 *);
u8 GetStartMenuWindowId(void);
void sub_80F7998(void);
+void sub_80F69E8(u8 bgId, const void *src, u32 size, u16 offset, u8 mode);
#endif // GUARD_NEW_MENU_HELPERS_H
diff --git a/include/overworld.h b/include/overworld.h
index fbea3a4d9..b32d9cf48 100644
--- a/include/overworld.h
+++ b/include/overworld.h
@@ -24,6 +24,8 @@ struct UCoords32
u32 x, y;
};
+extern struct UCoords32 gDirectionToVectors[];
+
extern struct LinkPlayerMapObject gLinkPlayerMapObjects[4];
extern MainCallback gFieldCallback;
@@ -96,5 +98,6 @@ extern u8 gUnknown_2036E28;
extern bool8 (* gUnknown_3005024)(void);
void SetLastHealLocationWarp(u8 healLocaionId);
+void sub_8055864(u8 mapGroup, u8 mapNum);
#endif //GUARD_ROM4_H
diff --git a/include/palette.h b/include/palette.h
index 3af0d5d7b..31c8ffefe 100644
--- a/include/palette.h
+++ b/include/palette.h
@@ -70,6 +70,8 @@ void BeginHardwarePaletteFade(u8, u8, u8, u8, u8);
void BlendPalettes(u32, u8, u16);
void BlendPalettesUnfaded(u32, u8, u16);
void sub_80716F8(const u16 *, u16 *, u16, u8);
+void TintPalette_GrayScale(u16 *, u16);
+void TintPalette_SepiaTone(u16 *, u16);
extern struct PaletteFadeControl gPaletteFade;
diff --git a/include/quest_log.h b/include/quest_log.h
index 31220b86c..7f4bafada 100644
--- a/include/quest_log.h
+++ b/include/quest_log.h
@@ -24,6 +24,7 @@ void sub_8113550(u16, const u16 *);
void sub_8115748(u16);
u8 sub_8112CAC(void);
bool8 sub_81119D4(void (*func)(void));
+void sub_8111F38(u16, u16);
extern u8 gUnknown_203ADFA;