/+junk/c_sdl_joypad_ducktape

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/c_sdl_joypad_ducktape

« back to all changes in this revision

Viewing changes to GameObject.h

  • Committer: Gustav Hartvigsson
  • Date: 2014-01-09 20:07:52 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20140109200752-owx481zfl2n4tjsc
* added and changed little in the files Lincening information.
* Started to implement the JS parser's C file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#include <SDL2/SDL.h>
13
13
#include <stdbool.h>
14
14
 
15
 
/******************************************************************************
16
 
 * Object declaration.
17
 
 *****************************************************************************/
18
 
 
19
 
typedef struct GameObjectClass {
20
 
  GameObjectFreeFunc                     free_func;
21
 
  GameObjectDrawFunc                     draw_func;
22
 
  GameObjectCallbackHandlerFunc          callback_handler_func;
23
 
  GameObjectSetCallbackFunc              set_callback_func;
24
 
  GameObjectMoveFunc                     move_func;
25
 
  GameObjectSetMovementDeltaFunc         set_movement_delta_func;
26
 
  GameObjectGetBoundingBoxFunc           get_bounding_box_func;
27
 
  GameObjectGetIsAliveFunc               get_is_alive_func;
28
 
  GameObjectGetIsCollideFunc             get_is_collide_func;
29
 
} GameObjectClass;
30
 
 
31
 
 
32
 
typedef struct GameObject {
33
 
  GameObjectClass *      klass; /**< the class that holds all the virtual
34
 
                                  * functions. */
35
 
  void *       priv; /**< The private data. */
36
 
} GameObject;
 
15
typedef struct _GameObject GameObject;
 
16
 
 
17
typedef struct _GameObjectClass GameObjectClass;
 
18
 
 
19
typedef struct _GameObjectPriv GameObjectPriv;
 
20
 
37
21
 
38
22
/******************************************************************************
39
23
 * Function pointer declarations.
63
47
typedef bool (* GameObjectGetIsCollideFunc)(GameObject * self,
64
48
                                            GameObject * other);
65
49
 
 
50
/******************************************************************************
 
51
 * Object declaration.
 
52
 *****************************************************************************/
 
53
 
 
54
struct _GameObjectClass {
 
55
  GameObjectFreeFunc                     free_func;
 
56
  GameObjectDrawFunc                     draw_func;
 
57
  GameObjectCallbackHandlerFunc          callback_handler_func;
 
58
  GameObjectSetCallbackFunc              set_callback_func;
 
59
  GameObjectMoveFunc                     move_func;
 
60
  GameObjectSetMovementDeltaFunc         set_movement_delta_func;
 
61
  GameObjectGetBoundingBoxFunc           get_bounding_box_func;
 
62
  GameObjectGetIsAliveFunc               get_is_alive_func;
 
63
  GameObjectGetIsCollideFunc             get_is_collide_func;
 
64
};
 
65
 
 
66
struct _GameObjectPriv {}; /**< prototype for the private data */
 
67
 
 
68
struct _GameObject {
 
69
  GameObjectClass *      klass; /**< the class that holds all the virtual
 
70
                                  * functions. */
 
71
  GameObjectPriv *       priv; /**< The private data. */
 
72
};
66
73
 
67
74
/******************************************************************************
68
75
 * Game Object base functions.