editor: #undef O after use
[0verkill.git] / sprite.h
blob3637e055de7ad9ea214a806889b3f2118a192a5a
1 #ifndef __SPRITE_H
2 #define __SPRITE_H
4 #ifndef WIN32
5 #include "config.h"
6 #endif
8 /* one scanline of bitmap */
9 struct line
11 int len;
12 unsigned char *attr;
13 unsigned char *bmp;
17 /* one sprite animation position */
18 struct pos
20 int xo,yo;
21 int n;
22 struct line *lines;
26 /* sprite structure */
27 struct sprite
29 int n_positions; /* Number of defined positions */
30 struct pos *positions;
31 int n_steps;
32 unsigned short *steps;
36 /* load sprite from a file */
37 extern void load_sprite(char *,struct sprite *);
38 /* put sprite on given position */
39 #ifdef HAVE_INLINE
40 extern inline void
41 #else
42 extern void
43 #endif
44 put_sprite(int,int,struct pos *,unsigned char);
46 /* put image into given memory */
47 #ifdef HAVE_INLINE
48 extern inline void
49 #else
50 extern void
51 #endif
52 _put_sprite(int,int,unsigned char *,unsigned char *,int,int,struct pos *,unsigned char,unsigned char);
54 /* copy window of static map visible by player into screenbuffer */
55 /* accepts x and y coordinate of upper left corner of the window */
56 extern void show_window(int x,int y);
57 /* initalize sprites */
58 extern void init_sprites(void);
59 extern void shutdown_sprites(void);
60 extern void free_sprite(struct sprite *);
62 #endif