summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/main.c b/main.c
index 606f575..636c812 100644
--- a/main.c
+++ b/main.c
@@ -49,8 +49,6 @@ int main(void) {
enum Asset tree = tree_oak;
enum Asset house = tent_detailedOpen;
- Vector3 position = {0};
-
LoadModels();
struct World world_terrain = {
@@ -59,7 +57,14 @@ int main(void) {
.size = 32
};
+ struct World world_room = {
+ .floor = assets[floorFull],
+ .wall = assets[wall],
+ .size = 8
+ };
+
gen_terrain(&world_terrain);
+ gen_room(&world_room);
// #define NUM_TREES MAP_SIZE * MAP_SIZE / 100
// int *trees_x = LoadRandomSequence(NUM_TREES, -MAP_SIZE / 2, MAP_SIZE / 2);
@@ -88,12 +93,12 @@ int main(void) {
BeginDrawing();
ClearBackground(RAYWHITE);
BeginMode3D(camera);
- draw_world(&world_terrain);
+ draw_world(IsKeyDown(KEY_SPACE) ? &world_room : &world_terrain);
// for (int tree_i = 0; tree_i < NUM_TREES; tree_i++) {
// DrawModel(assets[tree], (Vector3) {trees_x[tree_i], 0, trees_y[tree_i]}, 1.f, WHITE);
// }
DrawModel(assets[house], (Vector3) {-1, 0, 0}, 1.f, WHITE);
- DrawGrid(20, 10.0f);
+ DrawGrid(20, 1.f);
Vector3 capsule_top = player_pos;
capsule_top.y += 0.2f;
DrawCapsule(Vector3Add(player_pos, (Vector3){0,.1f,0}), capsule_top, .1f, 8, 8, BLUE);