ld33_umonster

view src/room.cc @ 2:35349df5392d

wtf?
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 22 Aug 2015 23:55:21 +0300
parents
children 93ff21458a16
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, 100, 100, 100);
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 }