-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsdlutils.h
48 lines (41 loc) · 1.07 KB
/
sdlutils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* File: sdlutils.h
* Author: sergey
*/
#ifndef SDLUTILS_H
#define SDLUTILS_H
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <SDL/SDL_rotozoom.h>
SDL_Surface *screen;
SDL_Surface *spritesheet;
/**
* Initializes SDL
*/
int sdlInit ();
/**
* Terminates SQL
*/
void sdlClose ();
/**
* Loads optimized image
* @param filename path to file to load
* @param alpha 0 if image doesn't use transparency 1 otherwise
* @return SDL_Surface loaded image
*/
SDL_Surface *loadImage (char *filename, int alpha);
/**
* Writes numbers with medium fonts from right to left
* @param num number to write
* @param SDL_Rect lower right point to draw from
* @param SDL_Surface* surface to draw into
*/
void writeMediumNumRightAligned (int num, SDL_Rect rightPos, SDL_Surface *destination);
/**
* Writes numbers with large fonts centered to point
* @param num number to write
* @param SDL_Rect lower center point to draw from
* @param SDL_Surface* surface to draw into
*/
void writeLargeNumCentered (int num, SDL_Rect pos, SDL_Surface *destination);
#endif /* SDLUTILS_H */