Release Build 1100. Camera now starts near the player for a smoother looking pan effect instead of somewhere far off-screen. Custom monster attribute handling now completed and compact.

pull/28/head
sigonasr2 1 year ago
parent a1a35fabd0
commit 3ee066bb88
  1. 7
      Crawler/Crawler.cpp
  2. 2
      Crawler/Crawler.vcxproj
  3. 6
      Crawler/Crawler.vcxproj.filters
  4. 5
      Crawler/MonsterAttribute.cpp
  5. 5
      Crawler/MonsterAttribute.h
  6. 2
      Crawler/SlimeKing.cpp
  7. 2
      Crawler/Version.h
  8. 4390
      Crawler/pge.data
  9. 1296
      Crawler/pge.html
  10. 2
      Crawler/pge.js
  11. BIN
      Crawler/pge.wasm
  12. BIN
      x64/Release/Crawler.exe

@ -997,6 +997,13 @@ void Crawler::LoadLevel(MapName map){
player->upperLevel=false; //Assume player starts on lower level. player->upperLevel=false; //Assume player starts on lower level.
player->SetPos(MAP_DATA[map].MapData.playerSpawnLocation); 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());
pathfinder.Initialize(); pathfinder.Initialize();
} }

@ -272,6 +272,7 @@
<ClInclude Include="Emitter.h" /> <ClInclude Include="Emitter.h" />
<ClInclude Include="Map.h" /> <ClInclude Include="Map.h" />
<ClInclude Include="Monster.h" /> <ClInclude Include="Monster.h" />
<ClInclude Include="MonsterAttribute.h" />
<ClInclude Include="MonsterStrategyHelpers.h" /> <ClInclude Include="MonsterStrategyHelpers.h" />
<ClInclude Include="olcPGEX_TransformedView.h" /> <ClInclude Include="olcPGEX_TransformedView.h" />
<ClInclude Include="olcPixelGameEngine.h" /> <ClInclude Include="olcPixelGameEngine.h" />
@ -306,6 +307,7 @@
<ClCompile Include="LightningBoltEmitter.cpp" /> <ClCompile Include="LightningBoltEmitter.cpp" />
<ClCompile Include="Map.cpp" /> <ClCompile Include="Map.cpp" />
<ClCompile Include="Meteor.cpp" /> <ClCompile Include="Meteor.cpp" />
<ClCompile Include="MonsterAttribute.cpp" />
<ClCompile Include="RunTowards.cpp" /> <ClCompile Include="RunTowards.cpp" />
<ClCompile Include="Pathfinding.cpp" /> <ClCompile Include="Pathfinding.cpp" />
<ClCompile Include="pixelGameEngine.cpp" /> <ClCompile Include="pixelGameEngine.cpp" />

@ -135,6 +135,9 @@
<ClInclude Include="MonsterStrategyHelpers.h"> <ClInclude Include="MonsterStrategyHelpers.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="MonsterAttribute.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="Player.cpp"> <ClCompile Include="Player.cpp">
@ -236,6 +239,9 @@
<ClCompile Include="SlimeKing.cpp"> <ClCompile Include="SlimeKing.cpp">
<Filter>Source Files\Monster Strategies</Filter> <Filter>Source Files\Monster Strategies</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="MonsterAttribute.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="cpp.hint" /> <None Include="cpp.hint" />

@ -1,4 +1,5 @@
#include "MonsterAttribute.h" #include "MonsterAttribute.h"
#define SETUP(attribute,type) _ATTRIBUTE attribute{ATTRIBUTE_TYPE::type};
_ATTRIBUTE Attribute::IFRAME_TIME_UPON_HIT{ATTRIBUTE_TYPE::FLOAT}; SETUP(Attribute::IFRAME_TIME_UPON_HIT,FLOAT);
_ATTRIBUTE Attribute::SHOOT_RING_TIMER{ATTRIBUTE_TYPE::FLOAT}; SETUP(Attribute::SHOOT_RING_TIMER,FLOAT);

@ -16,6 +16,7 @@ struct _ATTRIBUTE{
}; };
struct Attribute{ struct Attribute{
static _ATTRIBUTE IFRAME_TIME_UPON_HIT; #define SETUP(attribute) static _ATTRIBUTE attribute;
static _ATTRIBUTE SHOOT_RING_TIMER; SETUP(IFRAME_TIME_UPON_HIT);
SETUP(SHOOT_RING_TIMER);
}; };

@ -12,7 +12,7 @@ void Monster::STRATEGY::SLIMEKING(Monster&m,float fElapsedTime,int strategyNumbe
case 0:{ case 0:{
m.size=ConfigInt("Phase1.Size")/100; m.size=ConfigInt("Phase1.Size")/100;
m.diesNormally=false; m.diesNormally=false;
m.Set(Attribute::IFRAME_TIME_UPON_HIT,0); m.Set(Attribute::IFRAME_TIME_UPON_HIT,0.f);
m.iframe_timer=ConfigFloat("Phase5.IframeTimePerHit"); m.iframe_timer=ConfigFloat("Phase5.IframeTimePerHit");
m.phase=1; m.phase=1;
}break; }break;

@ -2,7 +2,7 @@
#define VERSION_MAJOR 0 #define VERSION_MAJOR 0
#define VERSION_MINOR 2 #define VERSION_MINOR 2
#define VERSION_PATCH 0 #define VERSION_PATCH 0
#define VERSION_BUILD 1094 #define VERSION_BUILD 1101
#define stringify(a) stringify_(a) #define stringify(a) stringify_(a)
#define stringify_(a) #a #define stringify_(a) #a

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.
Loading…
Cancel
Save