/+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.c

  • Committer: Gustav Hartvigsson
  • Date: 2014-08-31 20:00:04 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20140831200004-yxmcbn8ilq7tl34m
* Starded working on making GameObject compile with the new "base class".

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 * Author Gustav Hartvigsson <gustav.hartvigsson _at_ gmail.com> 2014
13
13
 */
14
14
 
15
 
void game_object_free (GameObject * self) {
16
 
  GameObjectFreeFunc free_func = self->klass->free_func;
17
 
  free_func (self);
18
 
}
19
 
 
20
 
GameObjectClass * game_object_get_class (GameObject * self) {
21
 
  return self->klass;
22
 
}
23
 
 
24
 
void game_object_set_class (GameObject * self, GameObjectClass * klass) {
25
 
  self->klass = klass;
26
 
}
27
 
 
28
15
void game_object_draw (GameObject * self, SDL_Renderer * renderer) {
29
16
  GameObjectDrawFunc draw_func = self->klass->draw_func;
30
17
  draw_func (self, renderer);