Integer LoadWorld (VLMConfig* config) { World world; Integer worldImageSize; int i; world.pathname = config->worldPath; OpenWorldFile (&world, TRUE); #ifdef GENERA MergeLoadMaps (&world, config->worldSearchPath); #else MergeLoadMaps (&world, ""); #endif worldImageSize = 0; for (i = 0; i < world.nMergedWiredMapEntries; i++) worldImageSize += LoadMapData (&world, &world.mergedWiredMapEntries[i]); for (i = 0; i < world.nMergedUnwiredMapEntries; i++) worldImageSize += LoadMapData (&world, &world.mergedUnwiredMapEntries[i]); CloseWorldFile (&world, TRUE); errno = 0; /* Flush any bogus error code set during parent search */ return (worldImageSize); }
bool M_PathFinding::StartPathFinding() { bool ret = false; pathFound = false; currentSteps = 0; if (mapChanged) { LoadMapData(); mapChanged = false; } if (IfPathPossible()) { pathStarted = false; pathFinished = false; newLowest = false; lowestF = App->map->data.height * App->map->data.width; if (openList.count() != 0) openList.clear(); if (closedList.count() != 0) closedList.clear(); if (path.Count() != 0) path.Clear(); ret = CreateFirstNode(); if (ret) { pathStarted = true; LOG("-- Pathfinding: Correct pathfinding start --"); } } else LOG("-- Pathfinding: Could not start the process, not possible path to be found"); return ret; }
bool M_PathFinding::Start() { startTile = endTile = iPoint{ -1, -1 }; LoadMapData(); return true; }
void Storage::Load() { LoadMapData(); LoadTextureData(); LoadModelData(); LoadSkyboxData(); PrepareDynamicStorages(); }
void LoadVLMDebugger (VLMConfig* config) { World world; int i; world.pathname = config->vlmDebuggerPath; OpenWorldFile (&world, TRUE); if (world.nUnwiredMapEntries > 0) PuntWorld (&world, "World file %s contains unwired pages; it can't be a VLM debugger", world.pathname); for (i = 0; i < world.nWiredMapEntries; i++) LoadMapData (&world, &world.wiredMapEntries[i]); CloseWorldFile (&world, TRUE); }