/+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 src/GameObject.h

  • Committer: Gustav Hartvigsson
  • Date: 2014-09-03 11:46:19 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20140903114619-dhevqw0pmfdbbkvn
* Removed code that is not needed
* created a way te determin if a object is visible or not
* Started to document undocumented code

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
typedef bool (* GameObjectGetIsCollideFunc)(GameObject * self,
66
66
                                            GameObject * other);
67
67
 
 
68
typedef void (* GameObjectSetVisibleFunc)(GameObject * self, bool visible);
 
69
 
 
70
typedef bool (* GameObjectGetVisibleFunc)(GameObject * self);
 
71
 
68
72
/******************************************************************************
69
73
 * Object declaration.
70
74
 *****************************************************************************/
93
97
   * game object or not.
94
98
   */
95
99
  GameObjectGetIsCollideFunc             get_is_collide_func;
 
100
  /** This method sets the visiblillity of the GameObject */
 
101
  GameObjectSetVisibleFunc               set_visible_func;
 
102
  /** This method is used to get the visiblillity of an object. */
 
103
  GameObjectGetVisibleFunc               get_visible_func;
96
104
} GameObjectClass;
97
105
 
98
106
/**
100
108
 */
101
109
typedef struct GameObject {
102
110
  Object parent;
 
111
  /** Is the object visible? */
 
112
  bool visible;
103
113
} GameObject;
104
114
 
105
115
 
141
151
                             GameObjectGetBoundingBoxFunc
142
152
                                                        get_bounding_box_func,
143
153
                             GameObjectGetIsAliveFunc   get_is_alive_func,
144
 
                             GameObjectGetIsCollideFunc get_is_collide_func
 
154
                             GameObjectGetIsCollideFunc get_is_collide_func,
 
155
                             GameObjectSetVisibleFunc   set_visible_func,
 
156
                             GameObjectGetVisibleFunc   get_visible_func
145
157
                             );
146
158
 
147
159
void game_object_draw (GameObject * self, SDL_Renderer * renderer);
159
171
 
160
172
void game_object_do_callback (GameObject * self, char * name);
161
173
 
162
 
 
 
174
void game_object_set_visible (GameObject * self, bool visible);
 
175
 
 
176
bool game_object_get_visible (GameObject * self);
 
177
 
 
178
#if 0
163
179
/******************************************************************************
164
180
 * Game Object set virtual function functions.
165
181
 *****************************************************************************/
187
203
 
188
204
void game_object_set_is_collide_func (GameObject * self,
189
205
                                   GameObjectGetIsCollideFunc is_collide_func);
 
206
#endif
190
207
 
191
208
END_DECLS
192
209