Created
July 4, 2013 08:53
-
-
Save Orpheon/5926070 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #ifndef DATA_TYPES_H_INCLUDED | |
| #define DATA_TYPES_H_INCLUDED | |
| #include <stdbool.h> | |
| typedef struct Bitmask; | |
| typedef struct Point; | |
| typedef struct Rect; | |
| typedef struct RectLinkedList; | |
| typedef struct Navmesh; | |
| typedef struct Character; | |
| struct Bitmask | |
| { | |
| int width; | |
| int height; | |
| bool **mask; | |
| }; | |
| struct Point | |
| { | |
| int x; | |
| int y; | |
| }; | |
| struct Rect | |
| { | |
| Point topleft; | |
| Point topright; | |
| Point bottomleft; | |
| Point bottomright; | |
| Rect **connections; | |
| int num_connections; | |
| }; | |
| struct RectLinkedList | |
| { | |
| RectLinkedList *next; | |
| Rect *rect; | |
| }; | |
| struct Navmesh | |
| { | |
| int num_rects; | |
| RectLinkedList *list; | |
| }; | |
| struct Character | |
| { | |
| double x; | |
| double y; | |
| double hs; | |
| double vs; | |
| double width; | |
| double height; | |
| double speed; | |
| }; | |
| #endif // DATA_TYPES_H_INCLUDED |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment