Upstream sync, fix std::string conversions for graphics calls on SetBossNameDisplay and DrawPieArc
All checks were successful
Emscripten Build / Build_and_Deploy_Web_Build (push) Successful in 6m11s
All checks were successful
Emscripten Build / Build_and_Deploy_Web_Build (push) Successful in 6m11s
This commit is contained in:
parent
a4c44e6e6d
commit
a53aec786f
@ -3408,7 +3408,7 @@ void AiL::DrawPie(vf2d center,float radius,float degreesCut,Pixel col){
|
|||||||
DrawPolygonDecal(nullptr,circleCooldownPoints,circleCooldownPoints,std::max(1,int(degreesCut/4)),center,radius,col);
|
DrawPolygonDecal(nullptr,circleCooldownPoints,circleCooldownPoints,std::max(1,int(degreesCut/4)),center,radius,col);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AiL::DrawPieArc(const std::string_view texture,vf2d center,float radius,float degreesCut,Pixel col){
|
void AiL::DrawPieArc(const std::string&texture,vf2d center,float radius,float degreesCut,Pixel col){
|
||||||
std::vector<vf2d>donutUVs{};
|
std::vector<vf2d>donutUVs{};
|
||||||
bool first{true};
|
bool first{true};
|
||||||
std::transform(game->circleCooldownPoints.begin(),game->circleCooldownPoints.end(),std::back_inserter(donutUVs),[&first](const vf2d&point){
|
std::transform(game->circleCooldownPoints.begin(),game->circleCooldownPoints.end(),std::back_inserter(donutUVs),[&first](const vf2d&point){
|
||||||
@ -3417,7 +3417,7 @@ void AiL::DrawPieArc(const std::string_view texture,vf2d center,float radius,flo
|
|||||||
return IsFirstPoint?vf2d{}:vf2d{1,1};
|
return IsFirstPoint?vf2d{}:vf2d{1,1};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
DrawPolygonDecal(GFX[std::string(texture)].Decal(),circleCooldownPoints,donutUVs,std::max(1,int(degreesCut/4)),center,radius,col);
|
DrawPolygonDecal(GFX[texture].Decal(),circleCooldownPoints,donutUVs,std::max(1,int(degreesCut/4)),center,radius,col);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AiL::DrawSquarePie(vf2d center,float radius,float degreesCut,Pixel col){
|
void AiL::DrawSquarePie(vf2d center,float radius,float degreesCut,Pixel col){
|
||||||
@ -3603,7 +3603,7 @@ void AiL::InitializeDefaultKeybinds(){
|
|||||||
InputGroup::menuNamesToInputGroups.SetInitialized();
|
InputGroup::menuNamesToInputGroups.SetInitialized();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AiL::SetBossNameDisplay(std::string name,float time){
|
void AiL::SetBossNameDisplay(const std::string&name,float time){
|
||||||
const bool HasNotBeenDisplayedYet=bossName=="";
|
const bool HasNotBeenDisplayedYet=bossName=="";
|
||||||
bossName=name;
|
bossName=name;
|
||||||
if(HasNotBeenDisplayedYet)bossDisplayTimer=time; //Only display once.
|
if(HasNotBeenDisplayedYet)bossDisplayTimer=time; //Only display once.
|
||||||
@ -3832,9 +3832,9 @@ void AiL::ValidateGameStatus(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto MapStoryDataExists = [&](std::string_view mapName){
|
auto MapStoryDataExists = [&](const std::string&mapName){
|
||||||
return MAP_DATA.count(MapName(mapName))>0||
|
return MAP_DATA.count(MapName(mapName))>0||
|
||||||
VisualNovel::storyLevelData.count(std::string(mapName))>0;
|
VisualNovel::storyLevelData.count(mapName)>0;
|
||||||
};
|
};
|
||||||
|
|
||||||
if(!MapStoryDataExists("NPCs.Sherman.Potion Crafting Unlock Condition"_S))ERR(std::format("WARNING! Sherman's Potion Crafting Unlock Condition: {} is not a valid map!","NPCs.Sherman.Potion Crafting Unlock Condition"_S))
|
if(!MapStoryDataExists("NPCs.Sherman.Potion Crafting Unlock Condition"_S))ERR(std::format("WARNING! Sherman's Potion Crafting Unlock Condition: {} is not a valid map!","NPCs.Sherman.Potion Crafting Unlock Condition"_S))
|
||||||
|
@ -335,11 +335,11 @@ public:
|
|||||||
bool IsReflectiveTile(TilesheetData tileSheet,int tileID);
|
bool IsReflectiveTile(TilesheetData tileSheet,int tileID);
|
||||||
Monster&SpawnMonster(vf2d pos,MonsterData&data,bool upperLevel=false,bool isBossSpawn=false); //Queues a monster for spawning on the next frame.
|
Monster&SpawnMonster(vf2d pos,MonsterData&data,bool upperLevel=false,bool isBossSpawn=false); //Queues a monster for spawning on the next frame.
|
||||||
void DrawPie(vf2d center,float radius,float degreesCut,Pixel col);
|
void DrawPie(vf2d center,float radius,float degreesCut,Pixel col);
|
||||||
void DrawPieArc(const std::string_view texture,vf2d center,float radius,float degreesCut,Pixel col); //Draws an arc that has UV coordinates going from (0,0) in the center out to (1,1)
|
void DrawPieArc(const std::string&texture,vf2d center,float radius,float degreesCut,Pixel col); //Draws an arc that has UV coordinates going from (0,0) in the center out to (1,1)
|
||||||
void DrawSquarePie(vf2d center,float radius,float degreesCut,Pixel col);
|
void DrawSquarePie(vf2d center,float radius,float degreesCut,Pixel col);
|
||||||
void RenderCooldowns();
|
void RenderCooldowns();
|
||||||
void InitializeDefaultKeybinds();
|
void InitializeDefaultKeybinds();
|
||||||
void SetBossNameDisplay(std::string name,float time=5);
|
void SetBossNameDisplay(const std::string&name,float time=5);
|
||||||
bool InBossEncounter();
|
bool InBossEncounter();
|
||||||
void StartBossEncounter();
|
void StartBossEncounter();
|
||||||
void DisplayBossEncounterInfo();
|
void DisplayBossEncounterInfo();
|
||||||
|
@ -39,7 +39,7 @@ All rights reserved.
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 3
|
#define VERSION_MINOR 3
|
||||||
#define VERSION_PATCH 0
|
#define VERSION_PATCH 0
|
||||||
#define VERSION_BUILD 12250
|
#define VERSION_BUILD 12258
|
||||||
|
|
||||||
#define stringify(a) stringify_(a)
|
#define stringify(a) stringify_(a)
|
||||||
#define stringify_(a) #a
|
#define stringify_(a) #a
|
||||||
|
@ -6914,8 +6914,8 @@ namespace olc
|
|||||||
WINDOWPLACEMENT placement;
|
WINDOWPLACEMENT placement;
|
||||||
GetWindowPlacement(olc_hWnd,&placement);
|
GetWindowPlacement(olc_hWnd,&placement);
|
||||||
AdjustWindowRectEx(&rWndRect, dwStyle, FALSE, dwExStyle);
|
AdjustWindowRectEx(&rWndRect, dwStyle, FALSE, dwExStyle);
|
||||||
int width = rWndRect.right - rWndRect.left;
|
int width = std::clamp(LONG(100),LONG(1000),rWndRect.right - rWndRect.left);
|
||||||
int height = rWndRect.bottom - rWndRect.top;
|
int height = std::clamp(LONG(100),LONG(1000),rWndRect.bottom - rWndRect.top);
|
||||||
MoveWindow(olc_hWnd,placement.rcNormalPosition.left, placement.rcNormalPosition.top, width, height,true);
|
MoveWindow(olc_hWnd,placement.rcNormalPosition.left, placement.rcNormalPosition.top, width, height,true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6973,6 +6973,15 @@ namespace olc
|
|||||||
ptrPGE->olc_UpdateActualWindowPos(placement.rcNormalPosition.left, placement.rcNormalPosition.top);
|
ptrPGE->olc_UpdateActualWindowPos(placement.rcNormalPosition.left, placement.rcNormalPosition.top);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
case WM_GETMINMAXINFO:
|
||||||
|
{
|
||||||
|
MINMAXINFO* mmi = (MINMAXINFO*)lParam;
|
||||||
|
mmi->ptMinTrackSize.x = 450;
|
||||||
|
mmi->ptMinTrackSize.y = 250;
|
||||||
|
mmi->ptMaxTrackSize.x = 640;
|
||||||
|
mmi->ptMaxTrackSize.y = 480;
|
||||||
|
return 0;
|
||||||
|
}break;
|
||||||
case WM_SIZE: ptrPGE->olc_UpdateWindowSize(lParam & 0xFFFF, (lParam >> 16) & 0xFFFF); return 0;
|
case WM_SIZE: ptrPGE->olc_UpdateWindowSize(lParam & 0xFFFF, (lParam >> 16) & 0xFFFF); return 0;
|
||||||
case WM_SIZING: sideBeingDragged = wParam; return 0;
|
case WM_SIZING: sideBeingDragged = wParam; return 0;
|
||||||
case WM_MOUSEWHEEL: ptrPGE->olc_UpdateMouseWheel(GET_WHEEL_DELTA_WPARAM(wParam)); return 0;
|
case WM_MOUSEWHEEL: ptrPGE->olc_UpdateMouseWheel(GET_WHEEL_DELTA_WPARAM(wParam)); return 0;
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user