initial stage 5 bg
This commit is contained in:
parent
4ab1ac1d85
commit
a0e0ba28f8
6 changed files with 1354 additions and 1 deletions
BIN
gfx/stage4/tower.png
Normal file
BIN
gfx/stage4/tower.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 47 KiB |
BIN
gfx/stage4/tower.xcf
Normal file
BIN
gfx/stage4/tower.xcf
Normal file
Binary file not shown.
BIN
models/tower.blend
Normal file
BIN
models/tower.blend
Normal file
Binary file not shown.
1316
models/tower.obj
Normal file
1316
models/tower.obj
Normal file
File diff suppressed because it is too large
Load diff
|
@ -15,12 +15,49 @@
|
|||
|
||||
static Stage3D bgcontext;
|
||||
|
||||
Vector **stage4_stairs_pos(Vector pos, float maxrange) {
|
||||
Vector p = {0, 0, 0};
|
||||
Vector r = {0, 0, 3000};
|
||||
|
||||
return linear3dpos(pos, maxrange, p, r);
|
||||
}
|
||||
|
||||
void stage4_stairs_draw(Vector pos) {
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glBindTexture(GL_TEXTURE_2D, get_tex("stage4/tower")->gltex);
|
||||
|
||||
glPushMatrix();
|
||||
glTranslatef(pos[0], pos[1], pos[2]);
|
||||
glScalef(300,300,300);
|
||||
draw_model("tower");
|
||||
|
||||
glPopMatrix();
|
||||
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
void stage4_draw() {
|
||||
set_perspective(&bgcontext, 100, 9000);
|
||||
|
||||
draw_stage3d(&bgcontext, 7000);
|
||||
float w = 0.005;
|
||||
|
||||
bgcontext.cx[0] = 2500*cos(-w*global.frames);
|
||||
bgcontext.cx[1] = 2500*sin(-w*global.frames);
|
||||
bgcontext.cx[2] = w*3000/(M_PI)*global.frames;
|
||||
|
||||
// bgcontext.cv[2] = w*3000/(2*M_PI);
|
||||
|
||||
// bgcontext.crot[0] = cimag(global.plr.pos);
|
||||
bgcontext.crot[2] = 150-180/M_PI*w*global.frames;
|
||||
}
|
||||
|
||||
void stage4_start() {
|
||||
init_stage3d(&bgcontext);
|
||||
add_model(&bgcontext, stage4_stairs_draw, stage4_stairs_pos);
|
||||
|
||||
bgcontext.crot[0] = 60;
|
||||
|
||||
}
|
||||
|
||||
void stage4_end() {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include <GL/glext.h>
|
||||
|
||||
enum {
|
||||
VBO_SIZE = 2048, // * sizeof(Vertex)
|
||||
VBO_SIZE = 8192, // * sizeof(Vertex)
|
||||
};
|
||||
|
||||
typedef struct VBO VBO;
|
||||
|
|
Loading…
Reference in a new issue