… | |
… | |
39 | tri->set (t); |
39 | tri->set (t); |
40 | |
40 | |
41 | return tri; |
41 | return tri; |
42 | } |
42 | } |
43 | |
43 | |
44 | int myrand (float max) { |
44 | static float myrand (float max) |
|
|
45 | { |
45 | return (max * rand () / RAND_MAX); |
46 | return max * (float)rand () / (float)RAND_MAX; |
46 | } |
47 | } |
47 | |
48 | |
48 | entity *RandomBuilding::draw (int cnt, int max_room, int max_cubes) |
49 | entity *RandomBuilding::draw (int cnt, int max_room, int max_cubes) |
49 | { |
50 | { |
50 | geometry_container *objs = new geometry_container; |
51 | geometry_container *objs = new geometry_container; |