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

  • Committer: Gustav Hartvigsson
  • Date: 2013-09-29 21:11:58 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20130929211158-9z71h0uymetjelsz
fixed the callback stuff..

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include "GameObject.h"
2
2
 
3
 
/**
4
 
 * This file, as the rest of the project is under MIT license.
5
 
 * see http://opensource.org/licenses/MIT
6
 
 *
7
 
 * Author Gustav Hartvigsson <gustav.hartvigsson _at_ gmail.com> 2014
8
 
 */
9
 
 
10
3
void game_object_free (GameObject * self) {
11
4
  GameObjectFreeFunc free_func = self->klass->free_func;
12
5
  free_func (self);
46
39
}
47
40
 
48
41
void game_object_do_callback (GameObject * self, char * name) {
49
 
  GameObjectCallbackHandlerFunc do_callback_func
50
 
                                           = self->klass->callback_handler_func;
 
42
  GameObjectDoCallbackFunc do_callback_func = self->klass->callback_handler_func;
51
43
  do_callback_func (self, name);
52
44
}
53
45
 
72
64
}
73
65
 
74
66
void game_object_set_callback_handler_func (GameObject * self,
75
 
                          GameObjectCallbackHandlerFunc callback_handler_func) {
76
 
  self->klass->callback_handler_func = callback_handler_func;
77
 
}
 
67
                           GameObjectCallbackHandlerFunc callback_handler_func);
78
68
 
79
69
void game_object_set_set_callback_func (GameObject * self,
80
70
                                  GameObjectSetCallbackFunc set_callback_func) {
87
77
}
88
78
 
89
79
void game_object_set_set_move_delta_func (GameObject * self,
90
 
                       GameObjectSetMovementDeltaFunc set_movement_delta_func) {
 
80
                         GameObjectSetMovementDeltaFunc set_movement_delta_func) {
91
81
  self->klass->set_movement_delta_func = set_movement_delta_func;
92
82
}
93
83