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 |
*/
|
|
1
by Gustav Hartvigsson
Initial code. |
5 |
|
6 |
#ifndef __H_GAME_UTILS__
|
|
7 |
#define __H_GAME_UTILS__
|
|
8 |
||
17
by Gustav Hartvigsson
* fixed a few Doxygen problems. |
9 |
/*
|
7
by Gustav Hartvigsson
* Added licensing information to the files. |
10 |
* This file, as the rest of the project is under MIT license.
|
11 |
* see http://opensource.org/licenses/MIT
|
|
12 |
*
|
|
8
by Gustav Hartvigsson
* added and changed little in the files Lincening information. |
13 |
* Author Gustav Hartvigsson <gustav.hartvigsson _at_ gmail.com> 2014
|
7
by Gustav Hartvigsson
* Added licensing information to the files. |
14 |
*/
|
15 |
||
1
by Gustav Hartvigsson
Initial code. |
16 |
#include <SDL2/SDL.h> |
17 |
||
17
by Gustav Hartvigsson
* fixed a few Doxygen problems. |
18 |
/** @file
|
1
by Gustav Hartvigsson
Initial code. |
19 |
* This file contains a set of utility functions.
|
20 |
*/
|
|
21 |
||
22 |
/**
|
|
23 |
* Sets the renderer draw colour to the color inputted, and returns the old
|
|
24 |
* renderer colour.
|
|
25 |
*/
|
|
26 |
SDL_Color game_color_set_draw_color (SDL_Renderer * renderer, |
|
27 |
const SDL_Color color); |
|
28 |
||
17
by Gustav Hartvigsson
* fixed a few Doxygen problems. |
29 |
/**
|
30 |
* create a colour.
|
|
31 |
*/
|
|
1
by Gustav Hartvigsson
Initial code. |
32 |
SDL_Color game_color_create_color (int r, int g, int b, int a); |
33 |
||
17
by Gustav Hartvigsson
* fixed a few Doxygen problems. |
34 |
/**
|
35 |
* Create a rectangle;
|
|
36 |
*/
|
|
1
by Gustav Hartvigsson
Initial code. |
37 |
SDL_Rect game_rect_create_rect (int x, int y, int h, int w); |
38 |
||
17
by Gustav Hartvigsson
* fixed a few Doxygen problems. |
39 |
/**
|
40 |
* allocate a new rectangle.
|
|
41 |
*
|
|
42 |
* This must be freed by the user.
|
|
43 |
*/
|
|
1
by Gustav Hartvigsson
Initial code. |
44 |
SDL_Rect * game_rect_new (int x, int y, int h, int w); |
45 |
||
17
by Gustav Hartvigsson
* fixed a few Doxygen problems. |
46 |
|
47 |
/**
|
|
48 |
* Print a good loocking warning message.
|
|
49 |
*/
|
|
10
by Gustav Hartvigsson
created a generic error print function that should print nice looking |
50 |
void print_error (const char * str, ... ); |
51 |
||
1
by Gustav Hartvigsson
Initial code. |
52 |
#endif
|