diff options
Diffstat (limited to 'engine/enemy.cpp')
-rw-r--r-- | engine/enemy.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/engine/enemy.cpp b/engine/enemy.cpp new file mode 100644 index 0000000..bf4d5ee --- /dev/null +++ b/engine/enemy.cpp @@ -0,0 +1,29 @@ +#include "enemy.h" + +#include "texturesdl.h" + +#include <SDL/SDL_opengl.h> + +Enemy::Enemy(const Vector2& initpos) { + pos = initpos; + + texture = new TextureSDL("textures/enemy.png"); +} + +void Enemy::update() { + +} + +void Enemy::draw() { + glPointSize(32.0); + + glColor4f(1, 1, 1, 1); + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, texture->tex()); + + glBegin(GL_POINTS); + glVertex2f(pos.x, pos.y); + glEnd(); + + glDisable(GL_TEXTURE_2D); +}
\ No newline at end of file |