Treat map data as const

This commit is contained in:
GriffinR
2023-03-08 11:07:44 -05:00
parent bb078e0618
commit dbf757be88
9 changed files with 62 additions and 61 deletions
+11 -11
View File
@@ -50,10 +50,10 @@ struct MapLayout
{
/*0x00*/ s32 width;
/*0x04*/ s32 height;
/*0x08*/ u16 *border;
/*0x0C*/ u16 *map;
/*0x10*/ struct Tileset *primaryTileset;
/*0x14*/ struct Tileset *secondaryTileset;
/*0x08*/ const u16 *border;
/*0x0C*/ const u16 *map;
/*0x10*/ const struct Tileset *primaryTileset;
/*0x14*/ const struct Tileset *secondaryTileset;
};
struct BackupMapLayout
@@ -98,7 +98,7 @@ struct CoordEvent
u8 elevation;
u16 trigger;
u16 index;
u8 *script;
const u8 *script;
};
struct BgEvent
@@ -107,7 +107,7 @@ struct BgEvent
u8 elevation;
u8 kind; // The "kind" field determines how to access bgUnion union below.
union {
u8 *script;
const u8 *script;
struct {
u16 item;
u16 hiddenItemId;
@@ -122,10 +122,10 @@ struct MapEvents
u8 warpCount;
u8 coordEventCount;
u8 bgEventCount;
struct ObjectEventTemplate *objectEvents;
struct WarpEvent *warps;
struct CoordEvent *coordEvents;
struct BgEvent *bgEvents;
const struct ObjectEventTemplate *objectEvents;
const struct WarpEvent *warps;
const struct CoordEvent *coordEvents;
const struct BgEvent *bgEvents;
};
struct MapConnection
@@ -139,7 +139,7 @@ struct MapConnection
struct MapConnections
{
s32 count;
struct MapConnection *connections;
const struct MapConnection *connections;
};
struct MapHeader