This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//initializing lists and setting balls into list | |
SDL_Event event; | |
int quitting = 0; | |
int i; | |
int listsize; | |
list_iterator_t *iter; | |
list_t *list=list_create(); | |
iter = list_createiterator(list); | |
listsize=list_size(list); | |
object_t *ball; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include "list.h" | |
/* | |
* List implementation | |
*/ | |
typedef struct listnode listnode_t; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <math.h> | |
#include "SDL.h" | |
#include "drawline.h" | |
#include "triangle.h" | |
#include "list.h" | |
#include "teapot_data.h" | |
#include "sphere_data.h" | |
#include "object.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include "list.h" | |
/* | |
* List implementation | |
*/ | |
typedef struct listnode listnode_t; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
struct list; | |
/* | |
* The type of comparison functions. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "set.h" | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include "common.h" | |
typedef struct set_node set_node_t; | |
typedef struct set set_t; | |
struct set_node { | |
set_node_t *next; | |
set_node_t *prev; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set_t *sort(set_t *set){ | |
if(set->head==NULL){ | |
return set; | |
} | |
if(set->head->next==NULL){ | |
return set; | |
} | |
node_t *tmp = set->head; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include "set.h" | |
#include "common.h" | |
typedef struct node node_t; | |
typedef struct set set_t; | |
typedef struct set_iter set_iter_t; | |
struct set{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include "set.h" | |
typedef struct set set_t; | |
typedef struct node node_t; | |
struct set{ | |
node_t *root; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "set.h" | |
#include <stdio.h> | |
#include <stdlib.h> | |
int what(void* a, void *b){ | |
return 0; | |
} |
OlderNewer