From 24ff120d154805c9c9cd275f7fca503d02bd90ef Mon Sep 17 00:00:00 2001 From: Bl0ckeduser Date: Sun, 4 Dec 2011 17:29:21 -0500 Subject: [PATCH] Fix whitespace --- main.c | 13 +------------ objlist.c | 42 +++++++++++++++++++++--------------------- 2 files changed, 22 insertions(+), 33 deletions(-) diff --git a/main.c b/main.c index 4c8a06d..7d24946 100644 --- a/main.c +++ b/main.c @@ -1,24 +1,13 @@ /* * The Clown3D game demo + * (libnds port) * * My first attempt at a 3D * platformer. Very, very * simple. */ -/* - * This is a port to libnds - * of clown3d-20111112. - * - * Note that it can also - * compile with SDL + GL - * like the usual clown3d. - * - * The ported code is a bit - * messy, but not too much. - */ - extern char door_model[]; extern char key_model[]; extern char maze_model[]; /* maze world */ diff --git a/objlist.c b/objlist.c index 4b8461b..b6eeac0 100644 --- a/objlist.c +++ b/objlist.c @@ -2,15 +2,15 @@ void freeObjs(game_obj* objs) { - /* Free game objs */ + /* Free game objs */ game_obj* node = objs; - while(node->prev != NULL) { - if(node->prev != NULL) - free(node->prev); - if(node->data != NULL) - free(node->data); - node = node -> next; - } + while(node->prev != NULL) { + if(node->prev != NULL) + free(node->prev); + if(node->data != NULL) + free(node->data); + node = node -> next; + } } @@ -35,16 +35,16 @@ void deleteNode(game_obj* node) game_obj* newListNode(game_obj* list) { - game_obj *curr = list; - game_obj* prev; - - while(curr->next) - curr = curr->next; - curr->next = (game_obj *)malloc(sizeof(game_obj)); - prev = curr; - curr = curr->next; - curr->prev = prev; - curr->next = NULL; + game_obj *curr = list; + game_obj* prev; + + while(curr->next) + curr = curr->next; + curr->next = (game_obj *)malloc(sizeof(game_obj)); + prev = curr; + curr = curr->next; + curr->prev = prev; + curr->next = NULL; return curr; } @@ -52,8 +52,8 @@ game_obj* newList(void) { game_obj* objs = (game_obj *)malloc(sizeof(game_obj)); objs->type = NONE; /* thanks valgrind */ - objs->prev = NULL; - objs->data = NULL; - objs->next = NULL; + objs->prev = NULL; + objs->data = NULL; + objs->next = NULL; return objs; }