summaryrefslogtreecommitdiffstats
path: root/src/area.h
blob: fae524ddeb65e19ad7fc5283a62c2ac39d5200b6 (plain)
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
#ifndef AREA_H
#define AREA_H

#include <SDL.h>
#include "viewport.h"
#include "resources/map.h"

enum area_layer {
	AREA_LAYER_BOT = 0,
	AREA_LAYER_MID,
	AREA_LAYER_TOP,
	AREA_LAYERS_MAX
};
struct area {
	struct map *map;
	SDL_Surface *map_layers[AREA_LAYERS_MAX];
};

struct area *area_new(struct map *map, SDL_Palette *pal);
void set_area_palette(struct area *area, SDL_Palette *pal);
void render_area_to_viewport(struct area *area, struct viewport *vp);
void render_area_to_surface(struct area *area, SDL_Rect *arearect,
		SDL_Surface *surface, SDL_Rect *surfacerect);

#endif