2 vec2i map_offset
= {72,72/4};
5 SDL_Surface
* sel
; // selection
6 SDL_Surface
* hl1
; // draw possible tiles
7 SDL_Surface
* hl3
; // fog
8 SDL_Surface
* hl5
; // player 1 selection (red) ?
9 SDL_Surface
* hl6
; // player 2 selection (blue)?
13 SDL_Surface
* tree
; // rename: forest
14 SDL_Surface
* hill
; // hills
15 SDL_Surface
* mount
; // mounteens
17 SDL_Surface
* terrsrf
[5]={NULL
};
21 SDL_Surface
* sldr_wa
; // atack unit
22 SDL_Surface
* sldr_wd
; // defence unit
23 SDL_Surface
* sldr_wb
; // bow unit
24 SDL_Surface
* sldr_wh
; // hunter unit
27 SDL_Surface
* screen
= NULL
;
30 TTF_Font
* font
= NULL
;
32 #define WHITE SDL_MapRGBA(screen->format, 255,255,255, 255)
33 #define GREY SDL_MapRGBA(screen->format, 235,235,235, 255)
34 #define BLACK SDL_MapRGBA(screen->format, 0, 0, 0, 255)
35 #define RED SDL_MapRGBA(screen->format, 255, 0, 0, 255)
36 #define GREEN SDL_MapRGBA(screen->format, 0,255, 0, 255)
37 #define BLUE SDL_MapRGBA(screen->format, 0, 0,255, 255)
39 vec2i tile_center
= {72*0.5, 72*0.75}; // 36 54
43 mcrd zmcrd
= {0,0}; // zero
44 mcrd nmcrd
= {-1,-1}; // null
47 //grass forest water hills mount
50 int tmvp1
[] = { 1, 4, 8, 4, 9 };
51 int tmvp2
[] = { 1, 2, 4, 3, 6 };
52 int tmvp3
[] = { 1, 3, 8, 4, 9 };
54 //terrain defence bonus
55 int tdef1
[] = { 0, 3,-4, 4, 3 };
56 int tdef2
[] = { 0, 5, 0, 4, 4 };
57 int tdef3
[] = { 0, 5, 0, 4, 4 };
59 //terrain attack bonus
60 int tatk1
[] = { 0, 0,-4, 0, 0 };
61 int tatk2
[] = { 0, 3,-4, 0, 0 };
62 int tatk3
[] = { 0, 1,-4, 0, 0 };
65 unit_type utypes
[] = {
66 {1,5,10,4,6,4,"defc", tmvp1
, tdef1
, tatk1
},
67 {4,5, 4,4,4,6,"hunt", tmvp2
, tdef2
, tatk1
},
68 {3,5, 8,4,2,4,"arch", tmvp3
, tdef3
, tatk1
},
71 //количество промежуточных положений между клетками
81 int player
; // current player's index
82 int players_count
= 3;
84 world
* cw
= NULL
; // current world