polyadvent

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

commit 639baa83a0dcb26a6c1a49ca177489cf98ca3730
parent 7ceffcce1cee3906f774dab6ba64d82a68822b55
Author: William Casarin <jb55@jb55.com>
Date:   Tue,  1 May 2018 11:59:53 -0700

tweaks

Diffstat:
Msrc/node.c | 10+++++-----
Msrc/update.c | 8++++----
2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/node.c b/src/node.c @@ -117,10 +117,10 @@ void node_forward(struct node *node, float *dir) { quat_inverse(node->orientation, q); quat_multiply_vec3(q, dir, movement); vec3_add(node->pos, movement, node->pos); - printf("dir %f %f %f\nmovement %f %f %f\nquat %f %f %f %f\n", - dir[0], dir[1], dir[2], - movement[0], movement[1], movement[2], - node->orientation[0], node->orientation[1], - node->orientation[2], node->orientation[3]); + /* printf("dir %f %f %f\nmovement %f %f %f\nquat %f %f %f %f\n", */ + /* dir[0], dir[1], dir[2], */ + /* movement[0], movement[1], movement[2], */ + /* node->orientation[0], node->orientation[1], */ + /* node->orientation[2], node->orientation[3]); */ node_mark_for_recalc(node); } diff --git a/src/update.c b/src/update.c @@ -18,10 +18,10 @@ static void movement(struct game *game, struct node *node) { if (game->input.keystates[SDL_SCANCODE_A]) node_forward(node, V3(-amt,0,0)); - if (game->input.keystates[SDL_SCANCODE_E]) + if (game->input.keystates[SDL_SCANCODE_RIGHT]) node_forward(node, V3(0,0,amt)); - if (game->input.keystates[SDL_SCANCODE_Q]) + if (game->input.keystates[SDL_SCANCODE_LEFT]) node_forward(node, V3(0,0,-amt)); if (game->input.keystates[SDL_SCANCODE_D]) @@ -37,10 +37,10 @@ static void movement(struct game *game, struct node *node) { /* if (game->input.keystates[SDL_SCANCODE_UP]) */ /* node_rotate(node, V3(amt * 0.01,0,0)); */ - if (game->input.keystates[SDL_SCANCODE_RIGHT]) + if (game->input.keystates[SDL_SCANCODE_E]) node_rotate(node, V3(0, 0, amt * 0.01)); - if (game->input.keystates[SDL_SCANCODE_LEFT]) + if (game->input.keystates[SDL_SCANCODE_Q]) node_rotate(node, V3(0, 0, -amt * 0.01)); /* if (game->input.keystates[SDL_SCANCODE_DOWN]) */