2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 01:47:42 +00:00

AutoMapper work

This commit is contained in:
Jack Andersen
2017-03-19 19:09:53 -10:00
parent 6c9462e099
commit 8e7773aa94
63 changed files with 1181 additions and 145 deletions

View File

@@ -69,7 +69,7 @@ bool CMapWorldInfo::IsAreaVisted(TAreaId aid)
{
if (aid + 1 > x0_visitedAreasAllocated)
{
x4_visitedAreas.resize((aid + 31) / 32);
x4_visitedAreas.resize((aid + 32) / 32);
x0_visitedAreasAllocated = aid + 1;
}
return (x4_visitedAreas[aid / 32] >> (aid % 32)) & 0x1;
@@ -79,7 +79,7 @@ void CMapWorldInfo::SetAreaVisited(TAreaId aid, bool visited)
{
if (aid + 1 > x0_visitedAreasAllocated)
{
x4_visitedAreas.resize((aid + 31) / 32);
x4_visitedAreas.resize((aid + 32) / 32);
x0_visitedAreasAllocated = aid + 1;
}
if (visited)
@@ -92,7 +92,7 @@ bool CMapWorldInfo::IsMapped(TAreaId aid)
{
if (aid + 1 > x14_mappedAreasAllocated)
{
x18_mappedAreas.resize((aid + 31) / 32);
x18_mappedAreas.resize((aid + 32) / 32);
x14_mappedAreasAllocated = aid + 1;
}
return (x18_mappedAreas[aid / 32] >> (aid % 32)) & 0x1;
@@ -102,7 +102,7 @@ void CMapWorldInfo::SetIsMapped(TAreaId aid, bool mapped)
{
if (aid + 1 > x14_mappedAreasAllocated)
{
x18_mappedAreas.resize((aid + 31) / 32);
x18_mappedAreas.resize((aid + 32) / 32);
x14_mappedAreasAllocated = aid + 1;
}
if (mapped)