diff --git a/Adventures in Lestoria/Adventures in Lestoria.tiled-project b/Adventures in Lestoria/Adventures in Lestoria.tiled-project
index dfc6b606..73400338 100644
--- a/Adventures in Lestoria/Adventures in Lestoria.tiled-project
+++ b/Adventures in Lestoria/Adventures in Lestoria.tiled-project
@@ -330,6 +330,11 @@
"type": "string",
"value": "None"
},
+ {
+ "name": "Create Optimization Map (Override)",
+ "type": "bool",
+ "value": false
+ },
{
"name": "Dev Completion Time - Ranger (s)",
"type": "float",
diff --git a/Adventures in Lestoria/Adventures in Lestoria.vcxproj b/Adventures in Lestoria/Adventures in Lestoria.vcxproj
index eb2edbdf..8175345b 100644
--- a/Adventures in Lestoria/Adventures in Lestoria.vcxproj
+++ b/Adventures in Lestoria/Adventures in Lestoria.vcxproj
@@ -429,6 +429,10 @@
+
+
+
+
@@ -511,6 +515,10 @@
+
+
+
+
@@ -849,6 +857,7 @@
+
@@ -886,6 +895,10 @@
+
+
+
+
diff --git a/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters b/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters
index 33c5ce18..6970af1d 100644
--- a/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters
+++ b/Adventures in Lestoria/Adventures in Lestoria.vcxproj.filters
@@ -91,6 +91,12 @@
{ac44510a-638e-4ae5-8529-2c68dddad459}
+
+ {1b310925-7ec7-4584-8c9c-2154a6e0df80}
+
+
+ {aaa148fb-5e34-4c35-a5bf-65ee8f2c0fb1}
+
@@ -645,6 +651,12 @@
Header Files
+
+ Header Files
+
+
+ Header Files\Engine
+
@@ -1085,6 +1097,12 @@
Source Files\Monster Strategies
+
+ Source Files
+
+
+ Source Files\Engine
+
diff --git a/Adventures in Lestoria/AdventuresInLestoria.cpp b/Adventures in Lestoria/AdventuresInLestoria.cpp
index 96ebe053..a7cf7a92 100644
--- a/Adventures in Lestoria/AdventuresInLestoria.cpp
+++ b/Adventures in Lestoria/AdventuresInLestoria.cpp
@@ -81,6 +81,7 @@ All rights reserved.
#include "Tutorial.h"
#include "SteamKeyboardCallbackHandler.h"
#include "SteamStatsReceivedHandler.h"
+#include "StageMaskPolygon.h"
INCLUDE_EMITTER_LIST
INCLUDE_ITEM_CATEGORIES
@@ -970,6 +971,19 @@ void AiL::RenderWorld(float fElapsedTime){
PopulateRenderLists();
auto RenderPlayer=[&](vf2d pos,vf2d scale){
+ SetWorldColor(PixelLerp(DARK_BLUE,BLACK,sin(geom2d::pi*GetRunTime()*2)));
+ if(GetCurrentMapData().provideOptimization&&!LoadingScreen::loading){
+ StageMaskPolygon poly{
+ {
+ view.ScreenToWorld(GetMousePos()-vf2d{50,50}),
+ view.ScreenToWorld(GetMousePos()+vf2d{100,-20}),
+ view.ScreenToWorld(GetMousePos()+vf2d{200,200}),
+ view.ScreenToWorld(GetMousePos()+vf2d{-50,150}),
+ view.ScreenToWorld(GetMousePos()+vf2d{-120,90}),
+ },"safeIndicatorGradient.png",PixelLerp(VERY_DARK_BLUE,BLACK,sin(geom2d::pi*GetRunTime()*2))
+ };
+ poly.Draw();
+ }
if(player->IsInvisible())return;
vf2d playerScale=vf2d(player->GetSizeMult(),player->GetSizeMult());
int count=0;
@@ -2217,7 +2231,7 @@ void AiL::InitializeLevel(std::string mapFile,MapName map){
}
}
- if(MAP_DATA[map].MapData.optimized){
+ if(MAP_DATA[map].MapData.optimized||MAP_DATA[map].MapData.provideOptimization){
LOG("Generating optimized map for Map "<