polyadvent

A game engine from scratch in C
git clone git://jb55.com/polyadvent
Log | Files | Refs | README

commit 545641114be3e55c535babd0006b3b0a3dd47500
parent 94231c98b7f3466c7ee95f8ddbf2eb749586d979
Author: William Casarin <jb55@jb55.com>
Date:   Tue,  2 Jul 2019 17:33:13 -0700

cooler rock scene

Diffstat:
Msrc/model.c | 2+-
Msrc/scene.c | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/model.c b/src/model.c @@ -19,7 +19,7 @@ static int static_models_initialized = 0; void init_model_id(model_id *id) { - assert((int)id->dyn_model_id.index != -1); + /* assert((int)id->dyn_model_id.index != -1); */ id->type = DYNAMIC_MODEL; init_id(&id->dyn_model_id); } diff --git a/src/scene.c b/src/scene.c @@ -62,7 +62,7 @@ void entity_test_scene(struct game *game) proc_sphere(geom); pmodel->shading = SHADING_VERT_COLOR; - for (int i = 0; i < 500; i++) { + for (int i = 0; i < terrain->size*0.2; i++) { struct entity *ent = new_entity(NULL); struct node *node = get_node(&ent->node_id); @@ -72,7 +72,7 @@ void entity_test_scene(struct game *game) double y = rand_0to1() * terrain->size; double z = terrain->fn(terrain, x, y); - node_scale(node, 10.0); + node_scale(node, pow(15.0, rand_0to1())); node_rotate(node, V3(rand_0to1(),rand_0to1(),rand_0to1())); node_translate(node, V3(x, y, z));