Merge pull request #1869 from GriffinRichards/const-map
Treat map data as const
This commit is contained in:
@@ -32,7 +32,7 @@ bool8 TryDoDiveWarp(struct MapPosition *position, u16 b);
|
||||
int SetCableClubWarp(void);
|
||||
u8 TrySetDiveWarp(void);
|
||||
const u8 *GetInteractedLinkPlayerScript(struct MapPosition *position, u8 metatileBehavior, u8 direction);
|
||||
u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position);
|
||||
const u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position);
|
||||
void ClearPoisonStepCounter(void);
|
||||
|
||||
#endif // GUARD_FIELDCONTROLAVATAR_H
|
||||
|
||||
@@ -48,8 +48,8 @@ void LoadSecondaryTilesetPalette(struct MapLayout const *mapLayout);
|
||||
void CopySecondaryTilesetToVramUsingHeap(struct MapLayout const *mapLayout);
|
||||
void CopyPrimaryTilesetToVram(const struct MapLayout *);
|
||||
void CopySecondaryTilesetToVram(const struct MapLayout *);
|
||||
struct MapHeader const *const GetMapHeaderFromConnection(struct MapConnection *connection);
|
||||
struct MapConnection *GetMapConnectionAtPos(s16 x, s16 y);
|
||||
const struct MapHeader *const GetMapHeaderFromConnection(const struct MapConnection *connection);
|
||||
const struct MapConnection *GetMapConnectionAtPos(s16 x, s16 y);
|
||||
void MapGridSetMetatileImpassabilityAt(int x, int y, bool32 impassable);
|
||||
|
||||
// field_region_map.c
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user