diff options
author | Marcus Huderle <huderlem@gmail.com> | 2018-06-20 17:41:51 -0500 |
---|---|---|
committer | Marcus Huderle <huderlem@gmail.com> | 2018-06-20 19:54:21 -0500 |
commit | ed8b006e67cdf5427177108b32c009a217b12b37 (patch) | |
tree | c0491ae47e16c10080c9b27d8c256964bcfe09da /src/field_camera.c | |
parent | 135a11e50eba1e12108e5c2025f534e3bd0cc722 (diff) |
Rename map-layout-related things
Diffstat (limited to 'src/field_camera.c')
-rw-r--r-- | src/field_camera.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/field_camera.c b/src/field_camera.c index d7063bd89..8629bec2b 100644 --- a/src/field_camera.c +++ b/src/field_camera.c @@ -25,13 +25,13 @@ struct FieldCameraUnknownStruct }; // static functions -static void RedrawMapSliceNorth(struct FieldCameraUnknownStruct *a, const struct MapData *mapData); -static void RedrawMapSliceSouth(struct FieldCameraUnknownStruct *a, const struct MapData *mapData); -static void RedrawMapSliceEast(struct FieldCameraUnknownStruct *a, const struct MapData *mapData); -static void RedrawMapSliceWest(struct FieldCameraUnknownStruct *a, const struct MapData *mapData); +static void RedrawMapSliceNorth(struct FieldCameraUnknownStruct *a, const struct MapLayout *mapLayout); +static void RedrawMapSliceSouth(struct FieldCameraUnknownStruct *a, const struct MapLayout *mapLayout); +static void RedrawMapSliceEast(struct FieldCameraUnknownStruct *a, const struct MapLayout *mapLayout); +static void RedrawMapSliceWest(struct FieldCameraUnknownStruct *a, const struct MapLayout *mapLayout); static s32 MapPosToBgTilemapOffset(struct FieldCameraUnknownStruct *a, s32 x, s32 y); -static void DrawWholeMapViewInternal(int x, int y, const struct MapData *mapData); -static void DrawMetatileAt(const struct MapData *mapData, u16, int, int); +static void DrawWholeMapViewInternal(int x, int y, const struct MapLayout *mapLayout); +static void DrawMetatileAt(const struct MapLayout *mapLayout, u16, int, int); static void DrawMetatile(s32 a, u16 *b, u16 c); static void CameraPanningCB_PanAhead(void); @@ -97,11 +97,11 @@ void sub_8089C08(s16 *a, s16 *b) void DrawWholeMapView(void) { - DrawWholeMapViewInternal(gSaveBlock1Ptr->pos.x, gSaveBlock1Ptr->pos.y, gMapHeader.mapData); + DrawWholeMapViewInternal(gSaveBlock1Ptr->pos.x, gSaveBlock1Ptr->pos.y, gMapHeader.mapLayout); gUnknown_03000E20.unk4 = TRUE; } -static void DrawWholeMapViewInternal(int x, int y, const struct MapData *mapData) +static void DrawWholeMapViewInternal(int x, int y, const struct MapLayout *mapLayout) { u8 i; u8 j; @@ -119,27 +119,27 @@ static void DrawWholeMapViewInternal(int x, int y, const struct MapData *mapData temp = gUnknown_03000E20.unk2 + j; if (temp >= 32) temp -= 32; - DrawMetatileAt(mapData, r6 + temp, x + j / 2, y + i / 2); + DrawMetatileAt(mapLayout, r6 + temp, x + j / 2, y + i / 2); } } } static void RedrawMapSlicesForCameraUpdate(struct FieldCameraUnknownStruct *a, int x, int y) { - const struct MapData *mapData = gMapHeader.mapData; + const struct MapLayout *mapLayout = gMapHeader.mapLayout; if (x > 0) - RedrawMapSliceWest(a, mapData); + RedrawMapSliceWest(a, mapLayout); if (x < 0) - RedrawMapSliceEast(a, mapData); + RedrawMapSliceEast(a, mapLayout); if (y > 0) - RedrawMapSliceNorth(a, mapData); + RedrawMapSliceNorth(a, mapLayout); if (y < 0) - RedrawMapSliceSouth(a, mapData); + RedrawMapSliceSouth(a, mapLayout); a->unk4 = TRUE; } -static void RedrawMapSliceNorth(struct FieldCameraUnknownStruct *a, const struct MapData *mapData) +static void RedrawMapSliceNorth(struct FieldCameraUnknownStruct *a, const struct MapLayout *mapLayout) { u8 i; u8 temp; @@ -154,11 +154,11 @@ static void RedrawMapSliceNorth(struct FieldCameraUnknownStruct *a, const struct temp = a->unk2 + i; if (temp >= 32) temp -= 32; - DrawMetatileAt(mapData, r7 + temp, gSaveBlock1Ptr->pos.x + i / 2, gSaveBlock1Ptr->pos.y + 14); + DrawMetatileAt(mapLayout, r7 + temp, gSaveBlock1Ptr->pos.x + i / 2, gSaveBlock1Ptr->pos.y + 14); } } -static void RedrawMapSliceSouth(struct FieldCameraUnknownStruct *a, const struct MapData *mapData) +static void RedrawMapSliceSouth(struct FieldCameraUnknownStruct *a, const struct MapLayout *mapLayout) { u8 i; u8 temp; @@ -169,11 +169,11 @@ static void RedrawMapSliceSouth(struct FieldCameraUnknownStruct *a, const struct temp = a->unk2 + i; if (temp >= 32) temp -= 32; - DrawMetatileAt(mapData, r7 + temp, gSaveBlock1Ptr->pos.x + i / 2, gSaveBlock1Ptr->pos.y); + DrawMetatileAt(mapLayout, r7 + temp, gSaveBlock1Ptr->pos.x + i / 2, gSaveBlock1Ptr->pos.y); } } -static void RedrawMapSliceEast(struct FieldCameraUnknownStruct *a, const struct MapData *mapData) +static void RedrawMapSliceEast(struct FieldCameraUnknownStruct *a, const struct MapLayout *mapLayout) { u8 i; u8 temp; @@ -184,11 +184,11 @@ static void RedrawMapSliceEast(struct FieldCameraUnknownStruct *a, const struct temp = a->unk3 + i; if (temp >= 32) temp -= 32; - DrawMetatileAt(mapData, temp * 32 + r6, gSaveBlock1Ptr->pos.x, gSaveBlock1Ptr->pos.y + i / 2); + DrawMetatileAt(mapLayout, temp * 32 + r6, gSaveBlock1Ptr->pos.x, gSaveBlock1Ptr->pos.y + i / 2); } } -static void RedrawMapSliceWest(struct FieldCameraUnknownStruct *a, const struct MapData *mapData) +static void RedrawMapSliceWest(struct FieldCameraUnknownStruct *a, const struct MapLayout *mapLayout) { u8 i; u8 temp; @@ -201,7 +201,7 @@ static void RedrawMapSliceWest(struct FieldCameraUnknownStruct *a, const struct temp = a->unk3 + i; if (temp >= 32) temp -= 32; - DrawMetatileAt(mapData, temp * 32 + r5, gSaveBlock1Ptr->pos.x + 14, gSaveBlock1Ptr->pos.y + i / 2); + DrawMetatileAt(mapLayout, temp * 32 + r5, gSaveBlock1Ptr->pos.x + 14, gSaveBlock1Ptr->pos.y + i / 2); } } @@ -211,7 +211,7 @@ void CurrentMapDrawMetatileAt(int a, int b) if (offset >= 0) { - DrawMetatileAt(gMapHeader.mapData, offset, a, b); + DrawMetatileAt(gMapHeader.mapLayout, offset, a, b); gUnknown_03000E20.unk4 = TRUE; } } @@ -227,7 +227,7 @@ void DrawDoorMetatileAt(int x, int y, u16 *arr) } } -static void DrawMetatileAt(const struct MapData *mapData, u16 b, int c, int d) +static void DrawMetatileAt(const struct MapLayout *mapLayout, u16 b, int c, int d) { u16 metatileId = MapGridGetMetatileIdAt(c, d); u16 *metatiles; @@ -235,10 +235,10 @@ static void DrawMetatileAt(const struct MapData *mapData, u16 b, int c, int d) if (metatileId > 1024) metatileId = 0; if (metatileId < 512) - metatiles = mapData->primaryTileset->metatiles; + metatiles = mapLayout->primaryTileset->metatiles; else { - metatiles = mapData->secondaryTileset->metatiles; + metatiles = mapLayout->secondaryTileset->metatiles; metatileId -= 512; } DrawMetatile(MapGridGetMetatileLayerTypeAt(c, d), metatiles + metatileId * 8, b); |