summaryrefslogtreecommitdiff
path: root/engine/enemy.cpp
blob: bf4d5ee6f9d1204155192b0d9356a3d7a1b87072 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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);
}