You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
698 B
36 lines
698 B
#ifndef LIST_H_
|
|
#define LIST_H_
|
|
#include "../sprite.h"
|
|
#include "../IsometricMap/isometricMap.h"
|
|
#include "raylib.h"
|
|
#include "../game.h"
|
|
|
|
typedef struct Node Node;
|
|
typedef struct List List;
|
|
|
|
typedef struct List {
|
|
Node *head;
|
|
Node *tail;
|
|
} List;
|
|
|
|
typedef struct Node {
|
|
Sprite *data;
|
|
|
|
Node *next;
|
|
Node *prev;
|
|
} Node;
|
|
|
|
//Only for internal purpose
|
|
Node * ListCreateNode(Sprite *data);
|
|
|
|
//Print the list in order
|
|
void ListPrintForward(List *list);
|
|
|
|
void ListInsertFront(List *list, Sprite *data);
|
|
void ListInsertBack(List *list, Sprite *data);
|
|
List * ListInit();
|
|
void ListDrawAllSprites(List *list, IsometricMap **map, Camera2D *camera);
|
|
void ListActAllSprites(Game *game);
|
|
|
|
#endif
|