polyadvent

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

commit 6606ae2389598374120f2198bbd14fd61a1b1414
parent c26e98344514ae4c9aa1c29c3fcb5d2633adff9e
Author: William Casarin <jb55@jb55.com>
Date:   Sat,  6 Jul 2019 17:49:52 -0700

anim cleanups

Diffstat:
Mdata/samples-200x200.bin | 0
Msrc/animation.c | 12+-----------
Msrc/scene.c | 6------
3 files changed, 1 insertion(+), 17 deletions(-)

diff --git a/data/samples-200x200.bin b/data/samples-200x200.bin Binary files differ. diff --git a/src/animation.c b/src/animation.c @@ -73,26 +73,17 @@ static void dae_tag_start(struct xmlparser *x, const char *t, size_t tl) { struct dae_data *data = (struct dae_data*)x->user_data; - debug("state %d tag_start %.*s\n", data->state, (int)tl, t); - if (streq(t, "node")) { data->state = PARSING_NODE; data->node_level++; } else if (streq(t, "float_array")) { - debug("-> PARSING_FLOAT_ARRAY\n"); data->state = PARSING_FLOAT_ARRAY; } else if (data->state == PARSING_JOINT && streq(t, "matrix")) data->state = PARSING_JOINT_MATRIX; else return; - - /* printf("\n"); */ - /* for (int i = 0; i < data->opened; i++) { */ - /* putchar(' '); */ - /* } */ - /* printf("%s", t); */ } static void dae_tag_end(struct xmlparser *x, const char *t, size_t tl, int what) @@ -184,7 +175,6 @@ void dae_attr(struct xmlparser *x, const char *t, size_t tl, else if (data->state == PARSING_FLOAT_ARRAY && streq(a, "id") && contains(v, "skin-weights-array")) { - debug("PARSING_SOURCE -> PARSING_WEIGHTS_START\n"); data->state = PARSING_WEIGHTS; } else if (data->state == PARSING_WEIGHTS @@ -241,7 +231,7 @@ void load_poses(const char *filename, struct pose *poses, int *nposes) .weights = NULL }; - data.dae_file = fopen("data/models/pirate-officer.dae", "rb"); + data.dae_file = fopen(filename, "rb"); if (data.dae_file == NULL) exit(1); diff --git a/src/scene.c b/src/scene.c @@ -50,7 +50,6 @@ void default_scene(struct game *game) { void entity_test_scene(struct game *game) { - struct entity *player = get_player(&game->test_resources); struct terrain *terrain = &game->terrain; model_id rock_model; @@ -59,13 +58,8 @@ void entity_test_scene(struct game *game) /* model_id rock_model = get_static_model(model_tower, NULL); */ struct model *pmodel = new_model(&rock_model); assert(pmodel); struct geometry *geom = get_geometry(&pmodel->geom_id); assert(geom); - printf("rock geom "); - print_id(&pmodel->geom_id, 1); - printf("rock model "); - print_id(&rock_model, 1); proc_sphere(geom); - for (int i = 0; i < terrain->size*0.2; i++) { struct entity *ent = new_entity(NULL); struct node *node = get_node(&ent->node_id);