From 2b36a0cc9ec5b2b2cbe98df06289bb39a22658bb Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Sat, 2 Sep 2023 21:01:11 -0500 Subject: [PATCH] Minor corrections as we find them. --- olcCodeJam2023Entry/CollectionPoint.h | 2 +- olcCodeJam2023Entry/VirusAttack.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/olcCodeJam2023Entry/CollectionPoint.h b/olcCodeJam2023Entry/CollectionPoint.h index 7340236..bdb9b23 100644 --- a/olcCodeJam2023Entry/CollectionPoint.h +++ b/olcCodeJam2023Entry/CollectionPoint.h @@ -2,7 +2,7 @@ #include "olcPixelGameEngine.h" #include "MemoryType.h" -class Unit; +struct Unit; class CollectionPoint{ public: diff --git a/olcCodeJam2023Entry/VirusAttack.cpp b/olcCodeJam2023Entry/VirusAttack.cpp index 4d60ac5..ed46527 100644 --- a/olcCodeJam2023Entry/VirusAttack.cpp +++ b/olcCodeJam2023Entry/VirusAttack.cpp @@ -201,7 +201,7 @@ void VirusAttack::LoadLevel(LevelName level){ for(auto&u:selectedLevel.unitPlacement){ #define TranslateUnit(type) \ case UnitType::type:{ \ - units.push_back(std::make_unique(this,u.pos,IMAGES,u.friendly)); \ + units.push_back(std::make_shared(this,u.pos,IMAGES,u.friendly)); \ }break; switch(u.type){ @@ -223,7 +223,7 @@ void VirusAttack::LoadLevel(LevelName level){ } } for(auto&cp:selectedLevel.cpPlacement){ - collectionPoints.push_back(std::make_unique(this,cp.pos,cp.rot,*IMAGES[MEMORY_COLLECTION_POINT],cp.type)); + collectionPoints.push_back(std::make_shared(this,cp.pos,cp.rot,*IMAGES[MEMORY_COLLECTION_POINT],cp.type)); } randomBackgroundOffset={util::random(128),util::random(128)};