ld33_umonster

view src/room.cc @ 3:93ff21458a16

fixed stuff
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 23 Aug 2015 02:51:39 +0300
parents 35349df5392d
children 3b4460b34d43
line source
1 #include <stdio.h>
2 #include "opengl.h"
3 #include "room.h"
4 #include "game.h"
5 #include "object.h"
6 #include "scene.h"
7 #include "meshgen.h"
9 static Scene scn;
11 bool init_room()
12 {
13 Matrix4x4 xform;
15 // generate room
16 Mesh *mroom = new Mesh;
17 gen_box(mroom, 50, 25, 50);
18 xform.set_translation(Vector3(0, 12.5, 0));
19 mroom->apply_xform(xform);
20 mroom->flip();
22 Object *oroom = new Object;
23 oroom->set_mesh(mroom);
24 oroom->rop.cast_shadows = false;
26 scn.add_object(oroom);
27 return true;
28 }
30 void cleanup_room()
31 {
32 scn.clear();
33 }
35 void draw_room()
36 {
37 scn.draw();
38 }