/+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/Game.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:
6
6
#ifndef __H_GAME__
7
7
#define __H_GAME__
8
8
 
 
9
 
 
10
#include "defs.h"
9
11
#include <SDL2/SDL.h>
10
12
#include <stdbool.h>
11
13
 
 
14
BEGIN_DECLS
 
15
 
12
16
#include "MousePointer.h"
13
17
#include "GameButton.h"
14
18
//#include "JSParser.h"
21
25
 * Author Gustav Hartvigsson <gustav.hartvigsson _at_ gmail.com> 2014
22
26
 */
23
27
 
24
 
#define J_SCALE_FACTOR 5000 //TODO: change tho momement to time-based
25
 
 
26
 
 
27
 
 
 
28
#define J_SCALE_FACTOR 5000 //TODO: change the movement to time-based
 
29
 
 
30
/** @file
 
31
 * A Game represents the game itself. This is going to be re-implementation in
 
32
 * the future.
 
33
 */
 
34
 
 
35
/**
 
36
 * Quits the program in an unsafe way.
 
37
 */
28
38
void quit (int rc);
29
39
 
30
40
typedef struct Game {
41
51
  GameButton * button;
42
52
} Game;
43
53
 
 
54
/**
 
55
 * Creates a new Game.
 
56
 */
44
57
Game * game_new ();
 
58
 
 
59
/**
 
60
 * The function that possesses the events of the game.
 
61
 * Should generally not be called from outside the Game.
 
62
 */
45
63
void game_process_events (Game * self);
 
64
 
 
65
/**
 
66
 * The function that has to be run for the game to run. executes the main loop
 
67
 * of the game.
 
68
 */
46
69
void game_main_loop (Game * self);
 
70
/**
 
71
 * Frees the Game and the resources associated with it.
 
72
 */
47
73
void game_free (Game * self);
 
74
 
 
75
/**
 
76
 * a function that internally is called to draw all the objects on the screen.
 
77
 */
48
78
void game_draw (Game * self);
49
79
 
 
80
END_DECLS
 
81
 
50
82
#endif