summaryrefslogtreecommitdiffstats
path: root/src/core/Zones.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/Zones.cpp')
-rw-r--r--src/core/Zones.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/Zones.cpp b/src/core/Zones.cpp
index 8e73a07b..84b5ca29 100644
--- a/src/core/Zones.cpp
+++ b/src/core/Zones.cpp
@@ -112,6 +112,7 @@ CTheZones::Init(void)
memset(&MapZoneArray[i], 0, sizeof(CZone));
MapZoneArray[i].type = ZONE_MAPZONE;
}
+ TotalNumberOfMapZones = 1;
strcpy(MapZoneArray[0].name, "THEMAP");
MapZoneArray[0].minx = -2400.0f;
MapZoneArray[0].miny = -2000.0f;
@@ -724,17 +725,17 @@ CTheZones::LoadAllZones(uint8 *buffer, uint32 size)
for(i = 0; i < ARRAY_SIZE(NavigationZoneArray); i++){
NavigationZoneArray[i] = ReadSaveBuf<CZone>(buffer);
- NavigationZoneArray[i].child = GetPointerForZoneIndex((int32)NavigationZoneArray[i].child);
- NavigationZoneArray[i].parent = GetPointerForZoneIndex((int32)NavigationZoneArray[i].parent);
- NavigationZoneArray[i].next = GetPointerForZoneIndex((int32)NavigationZoneArray[i].next);
+ NavigationZoneArray[i].child = GetPointerForZoneIndex((uintptr)NavigationZoneArray[i].child);
+ NavigationZoneArray[i].parent = GetPointerForZoneIndex((uintptr)NavigationZoneArray[i].parent);
+ NavigationZoneArray[i].next = GetPointerForZoneIndex((uintptr)NavigationZoneArray[i].next);
}
for(i = 0; i < ARRAY_SIZE(InfoZoneArray); i++){
InfoZoneArray[i] = ReadSaveBuf<CZone>(buffer);
- InfoZoneArray[i].child = GetPointerForZoneIndex((int32)InfoZoneArray[i].child);
- InfoZoneArray[i].parent = GetPointerForZoneIndex((int32)InfoZoneArray[i].parent);
- InfoZoneArray[i].next = GetPointerForZoneIndex((int32)InfoZoneArray[i].next);
+ InfoZoneArray[i].child = GetPointerForZoneIndex((uintptr)InfoZoneArray[i].child);
+ InfoZoneArray[i].parent = GetPointerForZoneIndex((uintptr)InfoZoneArray[i].parent);
+ InfoZoneArray[i].next = GetPointerForZoneIndex((uintptr)InfoZoneArray[i].next);
}
for(i = 0; i < ARRAY_SIZE(ZoneInfoArray); i++)