Implemented centroid and signed_area functions to the geom2d util. Just a bunch of maths, I don't know why it works. Release Build 9683.
This commit is contained in:
@@ -46,6 +46,7 @@ All rights reserved.
|
||||
#include "MenuComponent.h"
|
||||
#include "Unlock.h"
|
||||
#include "Tutorial.h"
|
||||
#include "StageMaskPolygon.h"
|
||||
|
||||
INCLUDE_MONSTER_LIST
|
||||
INCLUDE_game
|
||||
@@ -87,6 +88,21 @@ void State_GameRun::OnUserUpdate(AiL*game){
|
||||
}
|
||||
void State_GameRun::Draw(AiL*game){
|
||||
game->RenderWorld(game->GetElapsedTime());
|
||||
|
||||
if(game->GetCurrentMapData().provideOptimization&&!LoadingScreen::loading){
|
||||
StageMaskPolygon poly{
|
||||
{
|
||||
game->view.ScreenToWorld(game->GetMousePos()-vf2d{50,50}),
|
||||
game->view.ScreenToWorld(game->GetMousePos()+vf2d{100,-20}),
|
||||
game->view.ScreenToWorld(game->GetMousePos()+vf2d{200,200}),
|
||||
game->view.ScreenToWorld(game->GetMousePos()+vf2d{-50,150}),
|
||||
game->view.ScreenToWorld(game->GetMousePos()+vf2d{-120,90}),
|
||||
},"safeIndicatorGradient.png",PixelLerp(VERY_DARK_BLUE,BLACK,sin(geom2d::pi*game->GetRunTime()*2))
|
||||
};
|
||||
poly.Draw();
|
||||
}
|
||||
|
||||
|
||||
game->RenderHud();
|
||||
Tutorial::Draw();
|
||||
}
|
||||
Reference in New Issue
Block a user