or not fixed + border

The problem still is there I think. But look, I added the border! it will be used in stage 1.
This commit is contained in:
laochailan 2011-03-07 12:45:32 +01:00
parent 55c7866755
commit 6036e5a44e
3 changed files with 22 additions and 4 deletions

View file

@ -13,6 +13,7 @@ Global global;
void init_textures() {
load_texture(FILE_PREFIX "gfx/wasser.png", &global.textures.water);
load_texture(FILE_PREFIX "gfx/stage1/border.png", &global.textures.border);
load_texture(FILE_PREFIX "gfx/hud.png", &global.textures.hud);
load_texture(FILE_PREFIX "gfx/fairy_circle.png", &global.textures.fairy_circle);
load_texture(FILE_PREFIX "gfx/focus.png", &global.textures.focus);

View file

@ -42,6 +42,7 @@ typedef struct {
Texture projwave;
Texture water;
Texture border;
Texture fairy_circle;
Texture focus;

View file

@ -26,7 +26,7 @@ void simpleFairy(Fairy *f) {
void stage0_draw() {
glPushMatrix();
glTranslatef(VIEWPORT_X,VIEWPORT_Y,0);
glBegin(GL_QUADS);
glVertex3f(0,0,1000);
glVertex3f(0,VIEWPORT_H,1000);
@ -56,13 +56,29 @@ void stage0_draw() {
glTexCoord2i(0,1);
glVertex3f(0,1000,0);
glEnd();
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, global.textures.border.gltex);
// glColor3f(1,0.75,0.75);
glBegin(GL_QUADS);
glTexCoord2i(0,0);
glVertex3f(VIEWPORT_W,-500,0);
glTexCoord2i(1,0);
glVertex3f(VIEWPORT_W,-500,1000);
glTexCoord2i(1,1);
glVertex3f(VIEWPORT_W,1000,1000);
glTexCoord2i(0,1);
glVertex3f(VIEWPORT_W*0.75,1000,0);
glEnd();
glPopMatrix();
glPopMatrix();
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
}
void stage0_events() {