Background rendering added (again?). Was removed during reflection implementation. Fixed camera shake not reverting back to player targeting after completion. Fixed lost camera targeting upon class switching. Build 2637

This commit is contained in:
sigonasr2 2023-11-11 07:09:40 -06:00
parent 380582dfeb
commit 2fe9f17cdc
9 changed files with 30372 additions and 30265 deletions

View File

@ -5,8 +5,6 @@ VisualStudioVersion = 17.5.33516.290
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Crawler", "Crawler\Crawler.vcxproj", "{8E3067AF-CFE7-4B11-BC6B-B867C32753D7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MemoryLeakFileParser", "MemoryLeakFileParser\MemoryLeakFileParser.vcxproj", "{3054FF55-6C4E-4A38-89DA-E707AE2F3178}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
@ -29,18 +27,6 @@ Global
{8E3067AF-CFE7-4B11-BC6B-B867C32753D7}.Release|x64.Build.0 = Release|x64
{8E3067AF-CFE7-4B11-BC6B-B867C32753D7}.Release|x86.ActiveCfg = Release|Win32
{8E3067AF-CFE7-4B11-BC6B-B867C32753D7}.Release|x86.Build.0 = Release|Win32
{3054FF55-6C4E-4A38-89DA-E707AE2F3178}.Debug|x64.ActiveCfg = Debug|x64
{3054FF55-6C4E-4A38-89DA-E707AE2F3178}.Debug|x64.Build.0 = Debug|x64
{3054FF55-6C4E-4A38-89DA-E707AE2F3178}.Debug|x86.ActiveCfg = Debug|Win32
{3054FF55-6C4E-4A38-89DA-E707AE2F3178}.Debug|x86.Build.0 = Debug|Win32
{3054FF55-6C4E-4A38-89DA-E707AE2F3178}.Release Desktop|x64.ActiveCfg = Release|x64
{3054FF55-6C4E-4A38-89DA-E707AE2F3178}.Release Desktop|x64.Build.0 = Release|x64
{3054FF55-6C4E-4A38-89DA-E707AE2F3178}.Release Desktop|x86.ActiveCfg = Release|Win32
{3054FF55-6C4E-4A38-89DA-E707AE2F3178}.Release Desktop|x86.Build.0 = Release|Win32
{3054FF55-6C4E-4A38-89DA-E707AE2F3178}.Release|x64.ActiveCfg = Release|x64
{3054FF55-6C4E-4A38-89DA-E707AE2F3178}.Release|x64.Build.0 = Release|x64
{3054FF55-6C4E-4A38-89DA-E707AE2F3178}.Release|x86.ActiveCfg = Release|Win32
{3054FF55-6C4E-4A38-89DA-E707AE2F3178}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -395,6 +395,8 @@ void Crawler::UpdateCamera(float fElapsedTime){
worldShakeVel.y*=-1;
}
worldShake=player->GetPos()+worldShakeVel*fElapsedTime;
}else{
camera.SetTarget(player->GetPos());
}
worldShakeTime=std::max(0.f,worldShakeTime-fElapsedTime);
camera.Update(fElapsedTime);
@ -631,6 +633,7 @@ void Crawler::RenderWorld(float fElapsedTime){
}
#pragma region Basic Tile Layer Rendering
FillRectDecal({0,0},GetScreenSize(),{100,180,100});
for(RenderMode mode=RenderMode::REFLECTIVE_TILES;mode<=RenderMode::EMPTY_TILES;mode=RenderMode(int(mode)+1)){
if(mode==RenderMode::NORMAL_TILES){
SetDecalMode(DecalMode::ADDITIVE);
@ -1494,6 +1497,7 @@ void Crawler::ChangePlayerClass(Class cl){
player->atkGrowthRate=DATA.GetProperty(player->GetClassName()+".AtkGrowthRate").GetReal();
sig::Animation::SetupPlayerAnimations();
GetPlayer()->UpdateIdleAnimation(DOWN);
camera.SetTarget(player->GetPos());
}
void Crawler::InitializeClasses(){

View File

@ -10,7 +10,7 @@ void GameState::Initialize(){
NEW_STATE(States::OVERWORLD_MAP,State_OverworldMap);
NEW_STATE(States::MAIN_MENU,State_MainMenu);
GameState::ChangeState(States::MAIN_MENU);
GameState::ChangeState(States::GAME_RUN);
}
GameState::~GameState(){}

View File

@ -2,7 +2,7 @@
#define VERSION_MAJOR 0
#define VERSION_MINOR 2
#define VERSION_PATCH 1
#define VERSION_BUILD 2618
#define VERSION_BUILD 2638
#define stringify(a) stringify_(a)
#define stringify_(a) #a

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="205" height="205" tilewidth="24" tileheight="24" infinite="0" backgroundcolor="#475500" nextlayerid="9" nextobjectid="136">
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="205" height="205" tilewidth="24" tileheight="24" infinite="0" backgroundcolor="#475500" nextlayerid="9" nextobjectid="138">
<tileset firstgid="1" source="../maps/Tilesheet_No_Shadow24x24.tsx"/>
<tileset firstgid="2913" source="../maps/Decorations_c1_No_Shadow24x24.tsx"/>
<tileset firstgid="4533" source="../maps/24x24_Waterfall.tsx"/>
@ -1961,6 +1961,6 @@
</properties>
<point/>
</object>
<object id="129" name="Player Spawn" type="PlayerSpawnLocation" x="600" y="4248" width="24" height="24"/>
<object id="137" name="Player Spawn" type="PlayerSpawnLocation" x="624" y="4248" width="24" height="24"/>
</objectgroup>
</map>

View File

@ -16,7 +16,7 @@ Interface
map_config = levels.txt
# Starting map when loading the game.
starting_map = WORLD_MAP
starting_map = CAMPAIGN_1_1
# Player Properties Loading Config
player_config = Player.txt

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,4 @@
#define _CRTDBG_MAP_ALLOC
//#define OLC_PGE_HEADLESS
#define OLC_PGE_APPLICATION
#include "olcPixelGameEngine.h"

Binary file not shown.