Correct memory leak in consuming items from inventory. Added overworld menu layout. Warrior Up walk animation has head bobbing like all the others now. Fixed alignment of items for ScrollableWindowComponents, fix scrollbar resizing when parent component has offsets.

This commit is contained in:
2023-11-11 17:31:53 -06:00
parent 395b2e3ab8
commit 30a5cdc488
33 changed files with 30083 additions and 30093 deletions
+12 -6
View File
@@ -1368,11 +1368,7 @@ void Crawler::LoadLevel(MapName map){
player->SetPos(MAP_DATA[map].MapData.playerSpawnLocation);
vf2d cameraStartPos=player->GetPos()+vf2d(-24*6,0);
camera.SetMode(Camera2D::Mode::Simple);
camera.SetTarget(cameraStartPos);
camera.Update(game->GetElapsedTime());
camera.SetMode(Camera2D::Mode::LazyFollow);
camera.SetTarget(player->GetPos());
camera.MoveCamera(cameraStartPos);
pathfinder.Initialize();
}
@@ -1779,7 +1775,9 @@ void Crawler::RenderMenu(){
Menu::stack.back()->Update(this);
}
if(Menu::stack.size()>0){
FillRectDecal({0,0},WINDOW_SIZE,{0,0,0,uint8_t(255*0.4)});
if(Menu::cover){
FillRectDecal({0,0},WINDOW_SIZE,{0,0,0,uint8_t(255*0.4)});
}
for(Menu*menu:Menu::stack){
menu->Draw(this);
}
@@ -1883,4 +1881,12 @@ void Crawler::ValidateGameStatus(){
void Crawler::RenderVersionInfo(){
std::string versionStr("v" + std::to_string(VERSION_MAJOR) + "." + std::to_string(VERSION_MINOR) + "." + std::to_string(VERSION_PATCH) + "." + std::to_string(VERSION_BUILD));
DrawShadowStringDecal(vf2d{ GetScreenSize() } - vf2d{ GetTextSize(versionStr) }*0.4,versionStr,WHITE,BLACK,{0.4,0.4},0.4);
}
int Crawler::GetCurrentChapter(){
return chapter;
}
void Crawler::SetChapter(int chapter){
this->chapter=chapter;
}