/+junk/c_sdl_joypad

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/c_sdl_joypad

« back to all changes in this revision

Viewing changes to game_utils.h

  • Committer: Gustav Hartvigsson
  • Date: 2013-09-27 18:52:09 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20130927185209-x6tnykj2lfj0qxwt
Initial code.
This is just an experiment on different techniques that can be used.
It is pseudo object orientated. And has a few util functions to make life
easier.

All code is provided as is. Copy, Learn, Refactor, Have Fun!

TODO: make the MousePointer use an image and add an object drawing lists.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#ifndef __H_GAME_UTILS__
 
3
#define __H_GAME_UTILS__
 
4
 
 
5
#include <SDL2/SDL.h>
 
6
 
 
7
/**
 
8
 * This file contains a set of utility functions.
 
9
 */
 
10
 
 
11
/**
 
12
 * Sets the renderer draw colour to the color inputted, and returns the old
 
13
 * renderer colour.
 
14
 */
 
15
SDL_Color game_color_set_draw_color (SDL_Renderer * renderer,
 
16
                                                   const SDL_Color color);
 
17
 
 
18
SDL_Color game_color_create_color (int r, int g, int b, int a);
 
19
 
 
20
SDL_Rect game_rect_create_rect (int x, int y, int h, int w);
 
21
 
 
22
SDL_Rect * game_rect_new (int x, int y, int h, int w);
 
23
 
 
24
#endif