aboutsummaryrefslogtreecommitdiff
path: root/gst/gst.h
blob: 6d9519e34942520a0edd759365137ef94d5d180c (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef GST_H
#define GST_H

#include <info.h>
#include <units.h>
#include <map.h>
#include <fxs.h>
#include <render_text.h>

#include <SDL.h>
#include <SDL_mixer.h>

#define MAXMAP 10

typedef struct {
    map map_editor;
    army army_bp[8];
    int playernum;
    map map_battle;
    army ar;
    float ar_lastpos[MAXUNITS][2];
    stats_unit ustats[MAXUNITS];
    
    int state;
    float cam[2];
    float starttime;
    float coveredtime;
    int turn;
    float turnspeed;
    int turn_until_finish;
    int over;
} gamestate;

void gst_init (gamestate *gst);
void gst_destroy (gamestate *gst);
void gst_get_maparmy(gamestate *gst, map **m, army **ar);

void gst_tobattle (gamestate *gst, infos *info);
void gst_toeditor (gamestate *gst);

void gst_process (gamestate *gst, infos *info, fxs *fx, float t);
void gst_render (SDL_Renderer *rend, SDL_Texture *txsprites, txtd *textd, 
    gamestate *gst, infos *info, float t);

#endif