summaryrefslogtreecommitdiff
path: root/engine/stage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engine/stage.cpp')
-rw-r--r--engine/stage.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/engine/stage.cpp b/engine/stage.cpp
index 39cf52a..6bcd622 100644
--- a/engine/stage.cpp
+++ b/engine/stage.cpp
@@ -1,11 +1,15 @@
#include "stage.h"
+#include "config.h"
+
#include <wriggle/texturesdl.h>
#include <SDL/SDL_opengl.h>
#include <cmath>
Stage::Stage() {
+ background = new Background();
+
player = new Player();
texture = new TextureSDL("textures/shot1.png");
@@ -37,6 +41,15 @@ void Stage::update() {
}
void Stage::draw() {
+ background->draw();
+
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glOrtho(-0.5, 1.5, -Config::viewport_aspect * 0.5, Config::viewport_aspect * 1.5, 0, 10);
+
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+
player->draw();
for(std::vector<Enemy*>::iterator it = enemy_list.begin(); it < enemy_list.end(); it++) {