/[cvs]/wurmi/SDLutils.h
ViewVC logotype

Contents of /wurmi/SDLutils.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations)
Thu Sep 6 11:29:58 2007 UTC (11 years, 1 month ago) by kralovic
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +3 -2 lines
File MIME type: text/plain
Dalsie zmeny

1 /*
2 * *******************************************************
3 * helper functions for accessing SDL
4 * *******************************************************
5 */
6
7 #ifndef __SDLUTILS_H__
8 #define __SDLUTILS_H__
9
10 #include <SDL.h>
11 #include <SDL_ttf.h>
12 #include <stdio.h>
13 #include <stdlib.h>
14 #include <stdarg.h>
15 #include <string.h>
16 #include <jpeglib.h>
17 #include <png.h>
18 #include <math.h>
19
20
21 /* options for SDL setup */
22 typedef struct {
23 int video_options;
24 int video_options_hw_surface;
25 int video_options_fullscreen;
26 int video_width;
27 int video_height;
28 int video_bpp;
29 } SDLOPT;
30
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36
37 extern void ERROR(const char*,...);
38
39 extern SDL_Surface * init_video(SDLOPT *);
40
41 /*
42 * Set the pixel at (x, y) to the given value
43 * NOTE: The surface must be locked before calling this!
44 *
45 * parameters:
46 * surface, x,y, pixel_value
47 *
48 */
49 extern void putpixel(SDL_Surface *, int , int , Uint32 );
50
51 /*
52 * parameters: source, clip, destination, x,y
53 * blits the source to the destination with offset x,y
54 * clipped to clip (if not NULL)
55 */
56 extern void apply_surface(SDL_Surface*, SDL_Rect *, SDL_Surface* ,int,int);
57
58
59 extern SDL_Surface *load_jpeg(char *);
60 extern SDL_Surface *load_png(char *);
61
62 #ifdef __cplusplus
63 }
64 #endif
65
66
67
68 #endif

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.26