/+junk/c_sdl_joypad

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/c_sdl_joypad
21 by Gustav Hatvigsson
* added Modeline to (almost) all files.
1
/* c-basic-offset: 2; tab-width: 2; indent-tabs-mode: nil
2
 * vi: set shiftwidth=2 tabstop=2 expandtab:
3
 * :indentSize=2:tabSize=2:noTabs=true:
4
 */
5
1 by Gustav Hartvigsson
Initial code.
6
#ifndef __H_GAME__
7
#define __H_GAME__
8
9
#include <SDL2/SDL.h>
10
#include <stdbool.h>
11
12
#include "MousePointer.h"
13
#include "GameButton.h"
7 by Gustav Hartvigsson
* Added licensing information to the files.
14
//#include "JSParser.h"
15
#include "game_utils.h"
16
17 by Gustav Hartvigsson
* fixed a few Doxygen problems.
17
/*
7 by Gustav Hartvigsson
* Added licensing information to the files.
18
 * This file, as the rest of the project is under MIT license.
19
 * see http://opensource.org/licenses/MIT
20
 *
8 by Gustav Hartvigsson
* added and changed little in the files Lincening information.
21
 * Author Gustav Hartvigsson <gustav.hartvigsson _at_ gmail.com> 2014
7 by Gustav Hartvigsson
* Added licensing information to the files.
22
 */
23
24
#define J_SCALE_FACTOR 5000 //TODO: change tho momement to time-based
1 by Gustav Hartvigsson
Initial code.
25
26
27
28
void quit (int rc);
29
12 by Gustav Hartvigsson
* reorganising code to be remove extra typedefs.
30
typedef struct Game {
1 by Gustav Hartvigsson
Initial code.
31
  SDL_Event event;
32
  SDL_Point mouse_delta;
33
  bool mouse_pressed;
34
  bool bg_colour_toggle;
35
  int done;
36
  SDL_Color background_colour;
37
  SDL_Window * window;
38
  SDL_Renderer * renderer;
39
  SDL_GameController * game_controller;
40
  MousePointer * mouse;
41
  GameButton * button;
12 by Gustav Hartvigsson
* reorganising code to be remove extra typedefs.
42
} Game;
1 by Gustav Hartvigsson
Initial code.
43
44
Game * game_new ();
45
void game_process_events (Game * self);
46
void game_main_loop (Game * self);
47
void game_free (Game * self);
48
void game_draw (Game * self);
49
50
#endif