Add placeholder item graphics for chapter 4 items. Setup map classes for chapter 4 maps. Add in force set position function for monsters. Release Build 12001.

master
sigonasr2 17 hours ago
parent a7308f4ac5
commit 4e099b71f9
  1. 3
      Adventures in Lestoria/AdventuresInLestoria.cpp
  2. 7
      Adventures in Lestoria/GhostOfPirateCaptain.cpp
  3. 3
      Adventures in Lestoria/ItemDrop.cpp
  4. 8
      Adventures in Lestoria/Monster.cpp
  5. 6
      Adventures in Lestoria/Monster.h
  6. 1
      Adventures in Lestoria/MonsterAttribute.h
  7. 2
      Adventures in Lestoria/Version.h
  8. 5
      Adventures in Lestoria/assets/Campaigns/4_1.tmx
  9. 5
      Adventures in Lestoria/assets/Campaigns/4_2.tmx
  10. 5
      Adventures in Lestoria/assets/Campaigns/4_3.tmx
  11. 5
      Adventures in Lestoria/assets/Campaigns/4_4.tmx
  12. 5
      Adventures in Lestoria/assets/Campaigns/4_5.tmx
  13. 5
      Adventures in Lestoria/assets/Campaigns/4_6.tmx
  14. 5
      Adventures in Lestoria/assets/Campaigns/4_7.tmx
  15. 5
      Adventures in Lestoria/assets/Campaigns/4_8.tmx
  16. 5
      Adventures in Lestoria/assets/Campaigns/4_B1.tmx
  17. BIN
      Adventures in Lestoria/assets/gamepack.pak
  18. BIN
      Adventures in Lestoria/assets/items/Broken Bone Axe.png
  19. BIN
      Adventures in Lestoria/assets/items/Broken Bone Bow.png
  20. BIN
      Adventures in Lestoria/assets/items/Damaged Animal Bones.png
  21. BIN
      Adventures in Lestoria/assets/items/Giant Purple Slime Remains.png
  22. BIN
      Adventures in Lestoria/assets/items/Glowing Bones.png
  23. BIN
      Adventures in Lestoria/assets/items/Pieces of Horse Armor.png
  24. BIN
      Adventures in Lestoria/assets/items/Preserved Animal Bones.png
  25. BIN
      Adventures in Lestoria/assets/items/Purple Gemstone.png
  26. BIN
      Adventures in Lestoria/assets/items/Purple Slime Remains.png
  27. BIN
      Adventures in Lestoria/assets/items/Skeleton Bone.png
  28. BIN
      Adventures in Lestoria/assets/items/Snake Skin.png
  29. BIN
      Adventures in Lestoria/assets/items/Spider Legs.png
  30. BIN
      Adventures in Lestoria/assets/items/Swamp Frog Skin.png
  31. 2
      Adventures in Lestoria/assets/maps/Chapter_4_Details.tsx
  32. 2
      Adventures in Lestoria/assets/maps/Chapter_4_Ground.tsx
  33. 2
      Adventures in Lestoria/assets/maps/Chapter_4_Objects_24x24.tsx
  34. 2
      Adventures in Lestoria/assets/maps/Chapter_4_water_detilazation_24x24.tsx
  35. 49
      Adventures in Lestoria/olcPixelGameEngine.h
  36. BIN
      x64/Release/Adventures in Lestoria.exe

@ -83,6 +83,7 @@ All rights reserved.
#include "SteamStatsReceivedHandler.h"
#include "StageMaskPolygon.h"
#include <stacktrace>
#include <ranges>
INCLUDE_EMITTER_LIST
INCLUDE_ITEM_CATEGORIES
@ -3086,7 +3087,7 @@ int main(const int argn,char**args)
size_t requiredSize=0;
#ifdef WIN32
getenv_s( &requiredSize, NULL, 0, "SteamTenfoot");
getenv_s(&requiredSize,NULL,0,"SteamTenfoot");
#else
const char*bigPicture=getenv("SteamTenfoot");
if(bigPicture){

@ -41,6 +41,7 @@ All rights reserved.
#include "AdventuresInLestoria.h"
#include "SoundEffect.h"
#include "BulletTypes.h"
#include <ranges>
using A=Attribute;
@ -71,6 +72,10 @@ void Monster::STRATEGY::GHOST_OF_PIRATE_CAPTAIN(Monster&m,float fElapsedTime,std
m.I(A::CANNON_PHASE)=(m.I(A::CANNON_PHASE)+1)%PHASE_COUNT;
if(prevCannonPhase>m.I(A::CANNON_PHASE)){//Phase has wrapped around, reset cannon shot count.
m.I(A::CANNON_SHOT_COUNT)=0;
if(!m.B(A::FIRST_WAVE_COMPLETE)){
m.B(A::FIRST_WAVE_COMPLETE)=true;
m.ForceSetPos(m.spawnPos);
}
}
}};
@ -98,7 +103,9 @@ void Monster::STRATEGY::GHOST_OF_PIRATE_CAPTAIN(Monster&m,float fElapsedTime,std
m.VEC(A::CANNON_PHASES).emplace_back(cannonCycle);
if(cannonCycle==CANNON_SHOT)TOTAL_CANNON_SHOTS++;
}
m.B(A::FIRST_WAVE_COMPLETE)=false;
m.I(A::CANNON_SHOT_TYPE)=PREDICTION;
m.ForceSetPos({-400.f,-400.f});
SETPHASE(NORMAL);
}break;
case NORMAL:{

@ -99,8 +99,7 @@ void ItemDrop::UpdateDrops(float fElapsedTime){
if(drop.z<=0){
drop.zSpeed=0;
drop.z=0;
}
else{
}else{
drop.zSpeed+=gravity*fElapsedTime;
drop.pos+=drop.speed*fElapsedTime;
}

@ -692,11 +692,11 @@ void Monster::Moved(){
}
if(!std::isfinite(pos.x)){
ERR(std::format("WARNING! Player X position is {}...Trying to recover. THIS SHOULD NOT BE HAPPENING!",pos.x));
ERR(std::format("WARNING! Monster X position is {}...Trying to recover. THIS SHOULD NOT BE HAPPENING!",pos.x));
pos.x=spawnPos.x;
}
if(!std::isfinite(pos.y)){
ERR(std::format("WARNING! Player Y position is {}...Trying to recover. THIS SHOULD NOT BE HAPPENING!",pos.y));
ERR(std::format("WARNING! Monster Y position is {}...Trying to recover. THIS SHOULD NOT BE HAPPENING!",pos.y));
pos.y=spawnPos.y;
}
}
@ -1672,4 +1672,8 @@ void Monster::SetCollisionRadius(const float collisionRadius){
}
void Monster::SetLifetime(const float lifetime){
this->lifetime=lifetime;
}
void Monster::ForceSetPos(vf2d pos){
this->pos=pos;
Moved();
}

@ -290,8 +290,8 @@ private:
NPCData npcData;
float lastPathfindingCooldown=0.f;
std::function<bool(GameEvent&,Monster&,const std::string&)>strategyDeathFunc{};
//Sets the strategy death function that runs when a monster dies.
// The function should return false to indicate the event is over. If the event should keep running, return true.
//Sets the strategy death function that runs when a monster dies.
// The function should return false to indicate the event is over. If the event should keep running, return true.
void SetStrategyDeathFunction(std::function<bool(GameEvent&event,Monster&monster,const StrategyName&strategyName)>func);
//If you are trying to change a Get() stat, use the STAT_UP buff (and the optional argument) to supply an attribute you want to apply.
const ItemAttribute&GetBonusStat(std::string_view attr)const;
@ -336,6 +336,8 @@ private:
const float UnconsciousTime()const;
bool manualIgnoreTerrain{false}; //A manual flag that can be toggled on to dynamically make this monster ignore terrain collision.
float collisionRadius{}; //The collision radius can be modified, it's just set initially to the monster database entry.
//Ignores collision checking and sets the monster at the given position.
void ForceSetPos(vf2d pos);
struct STRATEGY{
static std::string ERR;

@ -172,4 +172,5 @@ enum class Attribute{
CANNON_SHOT_COUNT,
LINE_SHOT_ANG,
LAST_PLAYER_POS,
FIRST_WAVE_COMPLETE,
};

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_PATCH 0
#define VERSION_BUILD 11997
#define VERSION_BUILD 12001
#define stringify(a) stringify_(a)
#define stringify_(a) #a

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="315" height="238" tilewidth="24" tileheight="24" infinite="0" nextlayerid="6" nextobjectid="1">
<map version="1.10" tiledversion="1.10.2" class="Map" orientation="orthogonal" renderorder="right-down" width="315" height="238" tilewidth="24" tileheight="24" infinite="0" nextlayerid="6" nextobjectid="1">
<properties>
<property name="Level Type" type="int" propertytype="LevelType" value="0"/>
</properties>
<tileset firstgid="1" source="../maps/Decorations_c1_No_Shadow24x24.tsx"/>
<tileset firstgid="1621" source="../maps/Chapter_4_Details.tsx"/>
<tileset firstgid="2181" source="../maps/Tilesheet_No_Shadow24x24.tsx"/>

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="206" height="288" tilewidth="24" tileheight="24" infinite="0" nextlayerid="5" nextobjectid="1">
<map version="1.10" tiledversion="1.10.2" class="Map" orientation="orthogonal" renderorder="right-down" width="206" height="288" tilewidth="24" tileheight="24" infinite="0" nextlayerid="5" nextobjectid="1">
<properties>
<property name="Level Type" type="int" propertytype="LevelType" value="0"/>
</properties>
<tileset firstgid="1" source="../maps/Tilesheet_No_Shadow24x24.tsx"/>
<tileset firstgid="2913" source="../maps/Decorations_c1_No_Shadow24x24.tsx"/>
<tileset firstgid="4533" source="../maps/Chapter_4_Details.tsx"/>

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="206" height="338" tilewidth="24" tileheight="24" infinite="0" nextlayerid="5" nextobjectid="1">
<map version="1.10" tiledversion="1.10.2" class="Map" orientation="orthogonal" renderorder="right-down" width="206" height="338" tilewidth="24" tileheight="24" infinite="0" nextlayerid="5" nextobjectid="1">
<properties>
<property name="Level Type" type="int" propertytype="LevelType" value="0"/>
</properties>
<tileset firstgid="1" source="../maps/Tilesheet_No_Shadow24x24.tsx"/>
<tileset firstgid="2913" source="../maps/Chapter_4_Details.tsx"/>
<tileset firstgid="3473" source="../maps/Decorations_c1_No_Shadow24x24.tsx"/>

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="315" height="338" tilewidth="24" tileheight="24" infinite="0" nextlayerid="5" nextobjectid="1">
<map version="1.10" tiledversion="1.10.2" class="Map" orientation="orthogonal" renderorder="right-down" width="315" height="338" tilewidth="24" tileheight="24" infinite="0" nextlayerid="5" nextobjectid="1">
<properties>
<property name="Level Type" type="int" propertytype="LevelType" value="0"/>
</properties>
<tileset firstgid="1" source="../maps/Decorations_c1_No_Shadow24x24.tsx"/>
<tileset firstgid="1621" source="../maps/Tilesheet_No_Shadow24x24.tsx"/>
<tileset firstgid="4533" source="../maps/Chapter_4_Details.tsx"/>

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="314" height="438" tilewidth="24" tileheight="24" infinite="0" nextlayerid="5" nextobjectid="1">
<map version="1.10" tiledversion="1.10.2" class="Map" orientation="orthogonal" renderorder="right-down" width="314" height="438" tilewidth="24" tileheight="24" infinite="0" nextlayerid="5" nextobjectid="1">
<properties>
<property name="Level Type" type="int" propertytype="LevelType" value="0"/>
</properties>
<tileset firstgid="1" source="../maps/Chapter_4_Ground.tsx"/>
<tileset firstgid="2263" source="../maps/Tilesheet_No_Shadow24x24.tsx"/>
<tileset firstgid="5175" source="../maps/Chapter_4_Objects_24x24.tsx"/>

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="260" height="288" tilewidth="24" tileheight="24" infinite="0" nextlayerid="5" nextobjectid="1">
<map version="1.10" tiledversion="1.10.2" class="Map" orientation="orthogonal" renderorder="right-down" width="260" height="288" tilewidth="24" tileheight="24" infinite="0" nextlayerid="5" nextobjectid="1">
<properties>
<property name="Level Type" type="int" propertytype="LevelType" value="0"/>
</properties>
<tileset firstgid="1" source="../maps/Chapter_4_Details.tsx"/>
<tileset firstgid="561" source="../maps/Chapter_4_Ground.tsx"/>
<tileset firstgid="2823" source="../maps/Tilesheet_No_Shadow24x24.tsx"/>

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="368" height="288" tilewidth="24" tileheight="24" infinite="0" nextlayerid="5" nextobjectid="1">
<map version="1.10" tiledversion="1.10.2" class="Map" orientation="orthogonal" renderorder="right-down" width="368" height="288" tilewidth="24" tileheight="24" infinite="0" nextlayerid="5" nextobjectid="1">
<properties>
<property name="Level Type" type="int" propertytype="LevelType" value="0"/>
</properties>
<tileset firstgid="1" source="../maps/Chapter_4_Ground.tsx"/>
<tileset firstgid="2263" source="../maps/Chapter_4_Objects_24x24.tsx"/>
<tileset firstgid="5863" source="../maps/Tilesheet_No_Shadow24x24.tsx"/>

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="314" height="238" tilewidth="24" tileheight="24" infinite="0" nextlayerid="5" nextobjectid="1">
<map version="1.10" tiledversion="1.10.2" class="Map" orientation="orthogonal" renderorder="right-down" width="314" height="238" tilewidth="24" tileheight="24" infinite="0" nextlayerid="5" nextobjectid="1">
<properties>
<property name="Level Type" type="int" propertytype="LevelType" value="0"/>
</properties>
<tileset firstgid="1" source="../maps/Chapter_4_Objects_24x24.tsx"/>
<tileset firstgid="3601" source="../maps/Tilesheet_No_Shadow24x24.tsx"/>
<tileset firstgid="6513" source="../maps/Chapter_4_Ground.tsx"/>

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="260" height="288" tilewidth="24" tileheight="24" infinite="0" nextlayerid="5" nextobjectid="1">
<map version="1.10" tiledversion="1.10.2" class="Map" orientation="orthogonal" renderorder="right-down" width="260" height="288" tilewidth="24" tileheight="24" infinite="0" nextlayerid="5" nextobjectid="1">
<properties>
<property name="Level Type" type="int" propertytype="LevelType" value="0"/>
</properties>
<tileset firstgid="1" source="../maps/Decorations_c1_No_Shadow24x24.tsx"/>
<tileset firstgid="1621" source="../maps/Tilesheet_No_Shadow24x24.tsx"/>
<tileset firstgid="4533" source="../maps/Chapter_4_Details.tsx"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 681 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 668 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.10.1" name="Chapter_4_Details" tilewidth="24" tileheight="24" tilecount="560" columns="40">
<tileset version="1.10" tiledversion="1.10.2" name="Chapter_4_Details" tilewidth="24" tileheight="24" tilecount="560" columns="40">
<image source="commercial_assets/details_24x24.png" width="960" height="336"/>
<tile id="81">
<objectgroup draworder="index" id="2">

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.10.1" name="Chapter_4_Ground" tilewidth="24" tileheight="24" tilecount="2262" columns="26">
<tileset version="1.10" tiledversion="1.10.2" name="Chapter_4_Ground" tilewidth="24" tileheight="24" tilecount="2262" columns="26">
<image source="commercial_assets/Ground_rocks_24x24.png" width="624" height="2088"/>
<tile id="2">
<objectgroup draworder="index" id="2">

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.10.1" name="Chapter_4_Objects_24x24" tilewidth="24" tileheight="24" tilecount="3600" columns="75">
<tileset version="1.10" tiledversion="1.10.2" name="Chapter_4_Objects_24x24" tilewidth="24" tileheight="24" tilecount="3600" columns="75">
<image source="commercial_assets/Objects_24x24.png" width="1800" height="1152"/>
</tileset>

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.10.1" name="Chapter_4_water_detilazation_24x24" tilewidth="24" tileheight="24" tilecount="2886" columns="37">
<tileset version="1.10" tiledversion="1.10.2" name="Chapter_4_water_detilazation_24x24" tilewidth="24" tileheight="24" tilecount="2886" columns="37">
<image source="commercial_assets/water_detilazation_24x24.png" width="888" height="1872"/>
</tileset>

@ -6948,6 +6948,8 @@ namespace olc
// Windows Event Handler - this is statically connected to the windows event system
static LRESULT CALLBACK olc_WindowEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
double aspectRatio = (24*15.) / (24*10.);
WPARAM sideBeingDragged = 0;
switch (uMsg)
{
case WM_MOUSEMOVE:
@ -6972,6 +6974,7 @@ namespace olc
return 0;
}
case WM_SIZE: ptrPGE->olc_UpdateWindowSize(lParam & 0xFFFF, (lParam >> 16) & 0xFFFF); return 0;
case WM_SIZING: sideBeingDragged = wParam; return 0;
case WM_MOUSEWHEEL: ptrPGE->olc_UpdateMouseWheel(GET_WHEEL_DELTA_WPARAM(wParam)); return 0;
case WM_MOUSELEAVE: ptrPGE->olc_UpdateMouseFocus(false); return 0;
case WM_SETFOCUS: ptrPGE->olc_UpdateKeyFocus(true); return 0;
@ -7023,6 +7026,52 @@ namespace olc
}
break;
case WM_WINDOWPOSCHANGING:
{
WINDOWPOS * winPos = (WINDOWPOS*)lParam;
// Adjust window dimensions to maintain aspect ratio
switch( sideBeingDragged )
{
case WMSZ_BOTTOM:
case WMSZ_TOPRIGHT:
winPos->cx = (int)( (double)winPos->cy * aspectRatio );
break;
case WMSZ_RIGHT:
case WMSZ_BOTTOMLEFT:
case WMSZ_BOTTOMRIGHT:
winPos->cy = (int)( (double)winPos->cx / aspectRatio );
break;
case WMSZ_TOP:
{
// Adjust the x position of the window to make it appear
// that the bottom right side is anchored
WINDOWPOS old = *winPos;
winPos->cx = (int)( (double)winPos->cy * aspectRatio );
winPos->x += old.cx - winPos->cx;;
}
break;
case WMSZ_LEFT:
case WMSZ_TOPLEFT:
{
// Adjust the y position of the window to make it appear
// the bottom right side is anchored. TOPLEFT resizing
// will move the window around if you don't do this
WINDOWPOS old = *winPos;
winPos->cy = (int)( (double)winPos->cx / aspectRatio );
winPos->y += old.cy - winPos->cy;
}
break;
}
}
break;
case WM_CLOSE: ptrPGE->olc_Terminate(); return 0;
case WM_DESTROY: PostQuitMessage(0); DestroyWindow(hWnd); return 0;

Loading…
Cancel
Save