|
|
|
@ -162,7 +162,7 @@ void Minimap::Reset(){ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void Minimap::Update(){ |
|
|
|
|
if(game->KEY_TOGGLE_MAP.Pressed()){ |
|
|
|
|
if(game->KEY_TOGGLE_MAP.Pressed()&&MinimapVisible()){ |
|
|
|
|
if(displayMode==MinimapMode::SMALL)displayMode=MinimapMode::LARGE; |
|
|
|
|
else if(displayMode==MinimapMode::LARGE)displayMode=MinimapMode::OFF; |
|
|
|
|
else if(displayMode==MinimapMode::OFF)displayMode=MinimapMode::SMALL; |
|
|
|
@ -212,7 +212,7 @@ void Minimap::UpdateChunk(const MapName map,const vi2d chunkPos){ |
|
|
|
|
|
|
|
|
|
void Minimap::Draw(){ |
|
|
|
|
const vf2d minimapPos=vf2d{float("Minimap.Minimap HUD Size"_I),float("Minimap.Minimap HUD Size"_I)}/2; |
|
|
|
|
if(!game->InBossEncounter()){ |
|
|
|
|
if(MinimapVisible()){ |
|
|
|
|
switch(displayMode){ |
|
|
|
|
case MinimapMode::SMALL:{ |
|
|
|
|
mapCircleHud.DrawRotatedDecal(minimapPos,cover.Decal(),0.f,game->camera.GetPosition()/game->GetCurrentMapData().tilewidth,vf2d{0.5f,0.5f}); |
|
|
|
@ -241,4 +241,8 @@ const MinimapMode&Minimap::GetMinimapMode()const{ |
|
|
|
|
|
|
|
|
|
void Minimap::SetMinimapMode(MinimapMode newMode){ |
|
|
|
|
displayMode=newMode; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool Minimap::MinimapVisible(){ |
|
|
|
|
return !game->InBossEncounter(); |
|
|
|
|
} |