Skip to content
Snippets Groups Projects
Commit dc246f49 authored by Claudio Hoffmann's avatar Claudio Hoffmann
Browse files

Remove any dead code

parent f7c1509d
No related branches found
No related tags found
No related merge requests found
......@@ -3,10 +3,6 @@ Bomber::Bomber(float x, float y, int direction, int animationstep)
: Enemy(5,x,y,direction,animationstep)
{
}
/*Bomber::~Bomber()
{
//delete front[0]
}*/
int Bomber::getScore()
{
return 0;
......@@ -139,11 +135,6 @@ const PixelBuffer& Bomber::getCurrentSprite()
}
};
/*void Bomber::shoot()
{
//TODO how do Projectile?
};*/
void Bomber::move(FloatSeconds const & Frametime, Level &level)
{
if(animationtimer>10*Frametime.count())
......
......@@ -8,13 +8,11 @@ class Bomber: public Enemy
{
public:
Bomber(float x, float y, int direction, int animationstep);
//~Bomber() override;
void doStep(float PlayerX, float PlayerY, FloatSeconds const & Frametime, Level &level) override;
int getScore() override;
protected:
const PixelBuffer& getCurrentSprite() override; //Enemy braucht nur einer Darstellung
//void shoot() override;
void move(FloatSeconds const & Frametime, Level &level) override;
};
......
......@@ -11,7 +11,6 @@ Enemy::Enemy(int health,float x, float y, int direction, int animationstep)
}
Enemy::~Enemy()
{
//die anderen muss man nicht löschen? oder?
};
void Enemy::doStep(float PlayerX, float PlayerY, FloatSeconds const & Frametime, Level &level)
{
......@@ -68,10 +67,6 @@ float Enemy::getY()
{
return this->y;
};
//PixelBuffer& Enemy::getCurrentSprite()
//{
//};
bool Enemy::lookup(float PlayerY, Level &level)
{
......
......@@ -55,7 +55,7 @@ private:
int height;
public:
int const w() const { return width; };
int const w() const { return width; }
int const h() const { return height; }
constexpr PixelBuffer(int w, int h)
......
......@@ -3,10 +3,7 @@ Tank::Tank(float x, float y, int direction, int animationstep)
: Enemy(3,x,y,direction,animationstep)
{
}
/*Tank::~Tank()
{
//delete front[0]
}*/
int Tank::getScore()
{
return 500;
......
......@@ -6,10 +6,7 @@ Trooper::Trooper(float x, float y, int direction, int animationstep)
{
animationtimer = 0;
}
/*Trooper::~Trooper()
{
//delete front[0]
}*/
int Trooper::getScore()
{
return 100;
......
......@@ -13,19 +13,12 @@ class Trooper: public Enemy
{
public:
Trooper(float x, float y, int direction, int animationstep);
//~Trooper() override;
void doStep(float PlayerX, float PlayerY, FloatSeconds const & Frametime, Level &level) override;
int getScore() override;
//
//static StaticPixelBuffer<3,3> sprites[2][4]; //Geht nicht, hab verschiedene größen nicht immer 3x3...
protected:
const PixelBuffer& getCurrentSprite() override; //Enemy braucht nur einer Darstellung
//void shoot() override;
void move(FloatSeconds const & Frametime, Level &level) override;
void turnToPlayer(float PlayerX, float PlayerY);
//Temporarly
......
......@@ -46,7 +46,7 @@ public:
if(frame_time.count() != 0.0f) {
platform.set_title(
"Bestestes ASCII Shooter Ever - " +
std::to_string(/*level->getEnemySpawnCount()*/std::lround(1.0f / frame_time.count())) +
std::to_string(std::lround(1.0f / frame_time.count())) +
" FPS"
);
}
......@@ -83,9 +83,6 @@ public:
int run(Platform &platform)
{
DynamicPixelBuffer testbuffer{10, 10};
testbuffer.clear(_F);
Player player(15, 15);
Trooper trooper(50, 0, 0, 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment