blob: 09f1da87a76797d00174aa0adee198673b17f6b3 (
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 <wriggle/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);
}
|