[go: up one dir, main page]

File: gfx.h

package info (click to toggle)
zatacka 1.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,924 kB
  • sloc: ansic: 3,456; sh: 1,250; makefile: 34
file content (54 lines) | stat: -rw-r--r-- 1,026 bytes parent folder | download
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
48
49
50
51
52
53
54
#ifndef GFX_H
#define GFX_H

#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <stdbool.h>

#include "common.h"
#include "data.h"
#include "error.h"

#define N_COLORS 8 /* Number of available player colors */

extern SDL_Color colors[N_COLORS];

typedef enum image {
    IMG_ARROWS = 0,
    IMG_BALL,
    IMG_LOGO,
    IMG_WIS_CHILIRUN,
    IMG_WIS_CONFUSION,
    IMG_WIS_FROST,
    IMG_WIS_GHOST,
    IMG_WIS_MOLE,
    IMG_WIS_ROCKETLAUNCHER,
    IMG_WIS_SHARPTURN,
    IMG_WIS_SPEED,
    IMG_WIS_TIMESTEP,
    IMG_WIS_TRON,
    IMG_WIS_WARP,
    IMG_WI_BG,
    IMG_WI_CHILIRUN,
    IMG_WI_CONFUSION,
    IMG_WI_FROST,
    IMG_WI_GHOST,
    IMG_WI_MOLE,
    IMG_WI_ROCKETLAUNCHER,
    IMG_WI_SHARPTURN,
    IMG_WI_SPEED,
    IMG_WI_TIMESTEP,
    IMG_WI_TRON,
    IMG_WI_WARP,
    N_IMAGES
} Image;

extern SDL_Surface *images[N_IMAGES];

int clearSurface(SDL_Surface *s);
SDL_Surface *loadIcon(const char *filename);
bool loadImage(Image i, const char *filename);
bool loadImages(void);
void initColors(void);

#endif