1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-10-17 11:59:28 +00:00

Added support for world maps in mods.

Mods with a <Properties hasWorldMap="1"> tag in their XML definition
can now open a native world map like the original game.
Fixed an oversight that the world map visited area was
updated while the editor was open; fixed worldmap.txt saving;
removed the limitation that world map tiles had to be 256x256 -
all tile sizes work now.
Improved the builtin worldmap editor a little.
The game does now read _mods/#/data/stringbank.txt from a mod and merges
it with the main stringbank.txt, and uses _mods/#/data/worldmap.txt
as a full replacement.
Load _mods/#/[map|premap]_mapname.lua scripts to properly
initialize the Naija map token.
This commit is contained in:
fgenesis 2011-09-18 20:53:27 +02:00
commit b0d9fdc1cc
9 changed files with 169 additions and 80 deletions

View file

@ -58,6 +58,7 @@ void Mod::clear()
active = false;
doRecache = 0;
debugMenu = false;
hasMap = false;
}
bool Mod::isDebugMenu()
@ -65,6 +66,11 @@ bool Mod::isDebugMenu()
return debugMenu;
}
bool Mod::hasWorldMap()
{
return hasMap;
}
void Mod::loadModXML(TiXmlDocument *d, std::string modName)
{
d->LoadFile(baseModPath + modName + ".xml");
@ -112,6 +118,12 @@ void Mod::load(const std::string &p)
if (props->Attribute("debugMenu")) {
props->Attribute("debugMenu", &debugMenu);
}
if (props->Attribute("hasWorldMap")) {
int t;
props->Attribute("hasWorldMap", &t);
hasMap = t;
}
}
}