1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-25 09:44:02 +00:00

remove old world map reveal method

Note that this makes the world map highly inefficient for now because
the number of draw calls goes up crazy high. Will investigate.
This commit is contained in:
fgenesis 2024-11-09 03:43:56 +01:00
parent dff6fbfafb
commit 97cea29235
8 changed files with 4 additions and 66 deletions

View file

@ -2796,11 +2796,6 @@ void Game::applyState()
worldMapRender = 0;
if(dsq->mod.isActive() && dsq->mod.mapRevealMethod != REVEAL_UNSPECIFIED)
WorldMapRender::setRevealMethod(dsq->mod.mapRevealMethod);
else
WorldMapRender::setRevealMethod((WorldMapRevealMethod)dsq->user.video.worldMapRevealMethod);
worldMapRender = new WorldMapRender;
addRenderObject(worldMapRender, LR_WORLDMAP);

View file

@ -36,14 +36,6 @@ enum ObsType
OT_MASK_ALL = 0xff
};
enum WorldMapRevealMethod
{
REVEAL_UNSPECIFIED = -1,
REVEAL_DEFAULT = 0,
REVEAL_PARTIAL = 1 // Not visited areas have zero alpha (invisible)
};
enum CursorType
{
CURSOR_NONE = -1,

View file

@ -113,8 +113,6 @@ public:
void onToggleHelpScreen();
bool isCursorOffHud();
static void setRevealMethod(WorldMapRevealMethod m);
protected:
Quad *addHintQuad1, *addHintQuad2;
AquariaMenuItem *helpButton;

View file

@ -66,7 +66,6 @@ void Mod::clear()
debugMenu = false;
hasMap = false;
blockEditor = false;
mapRevealMethod = REVEAL_UNSPECIFIED;
compatScript = "";
}
@ -141,9 +140,6 @@ void Mod::load(const std::string &p)
if (props->BoolAttribute("runBG"))
core->settings.runInBackground = true;
if (props->Attribute("worldMapRevealMethod"))
mapRevealMethod = (WorldMapRevealMethod) props->IntAttribute("worldMapRevealMethod");
}
XMLElement *compat = mod->FirstChildElement("Compatibility");
if(compat)
@ -284,7 +280,6 @@ void Mod::setActive(bool a)
dsq->unloadMods();
compatScript = "";
mapRevealMethod = REVEAL_UNSPECIFIED;
setLocalisationModPath("");
name = path = "";
dsq->setExtraTexturePath(NULL, false);

View file

@ -59,8 +59,6 @@ public:
static bool loadModXML(tinyxml2::XMLDocument *d, std::string modName);
static ModType getTypeFromXML(tinyxml2::XMLElement *xml);
WorldMapRevealMethod mapRevealMethod;
protected:
bool loadCompatScript();
bool shuttingDown;

View file

@ -147,12 +147,6 @@ void UserSettings::save()
xml_saveSlotScreens->SetAttribute("on", video.saveSlotScreens);
}
xml_video->InsertEndChild(xml_saveSlotScreens);
XMLElement *xml_worldMap = doc.NewElement("WorldMap");
{
xml_worldMap->SetAttribute("revealMethod", video.worldMapRevealMethod);
}
xml_video->InsertEndChild(xml_worldMap);
}
doc.InsertEndChild(xml_video);
@ -450,8 +444,6 @@ bool UserSettings::load(bool doApply, const std::string &overrideFile)
}
readInt(xml_video, "SaveSlotScreens", "on", &video.saveSlotScreens);
readInt(xml_video, "WorldMap", "revealMethod", &video.worldMapRevealMethod);
}
XMLElement *xml_control = doc.FirstChildElement("Control");

View file

@ -73,7 +73,6 @@ public:
bits = 32;
vsync = 1;
darkbuffersize = 256;
worldMapRevealMethod = 0;
}
int blur;
int noteEffects;
@ -81,7 +80,6 @@ public:
int resx, resy, full, fbuffer, bits, vsync, darkfbuffer, darkbuffersize, hz, displayindex;
int saveSlotScreens;
int numParticles;
int worldMapRevealMethod;
} video;
struct Control

View file

@ -33,8 +33,8 @@ namespace WorldMapRenderNamespace
{
const float WORLDMAP_UNDERLAY_ALPHA = 0.8f;
float baseMapSegAlpha = 0.4f;
float visibleMapSegAlpha = 0.8f;
const float baseMapSegAlpha = 0.0f;
const float visibleMapSegAlpha = 0.8f;
const float blinkPeriod = 0.2f;
@ -50,8 +50,6 @@ namespace WorldMapRenderNamespace
};
const VisMethod visMethod = VIS_VERTEX;
WorldMapRevealMethod revMethod = REVEAL_DEFAULT;
Quad *activeQuad=0;
@ -71,7 +69,6 @@ namespace WorldMapRenderNamespace
using namespace WorldMapRenderNamespace;
class GemMover;
GemMover *mover=0;
@ -81,22 +78,6 @@ WorldMapTile *activeTile=0;
const float beaconSpawnBitTime = 0.05f;
void WorldMapRender::setRevealMethod(WorldMapRevealMethod m)
{
switch(m)
{
case REVEAL_PARTIAL:
revMethod = REVEAL_PARTIAL;
baseMapSegAlpha = 0;
break;
default:
revMethod = REVEAL_DEFAULT;
baseMapSegAlpha = 0.4f;
}
}
class WorldMapBoundQuad : public Quad
{
public:
@ -903,9 +884,6 @@ void WorldMapRender::onUpdate(float dt)
{
debugLog("selectedTile: " + selectedTile->name);
if(revMethod == REVEAL_DEFAULT)
clearVis(activeTile);
activeTile = selectedTile;
activeQuad = activeTile->q;
@ -1370,17 +1348,9 @@ void WorldMapRender::toggle(bool turnON)
if (originalActiveTile && activeTile)
{
if (activeTile != originalActiveTile)
{
if(revMethod == REVEAL_DEFAULT)
{
clearVis(activeTile);
setVis(originalActiveTile);
}
activeTile = originalActiveTile;
activeQuad = activeTile->q;
}
}
int num = dsq->continuity.worldMap.getNumWorldMapTiles();
for (int i = 0; i < num; i++)