comparison src/main.c @ 24:2cee3dc5fe4d

Beefed up the cursor a bit. Cleaned up my unused build order array.
author William Morgan <bill@mrgn.org>
date Tue, 14 Jan 2014 00:01:13 -0800
parents 330e58fb01aa
children 2f56bc29a3d6
comparison
equal deleted inserted replaced
23:330e58fb01aa 24:2cee3dc5fe4d
1 #include <genesis.h> 1 #include <genesis.h>
2 #include "creep.h" 2 #include "creep.h"
3 #include "map.h" 3 #include "map.h"
4 4
5 // I now realize this should be one tile that uses the flipping flags. oops.
6 const u32 cursor_tiles[4*8] = { 5 const u32 cursor_tiles[4*8] = {
7 0x21100000, // top left 6 0x11111000, // top left
8 0x10000000, 7 0x13322100,
9 0x10000000, 8 0x13111000,
10 0x00000000, 9 0x12100000,
11 0x00000000, 10 0x12100000,
12 0x00000000, 11 0x01000000,
13 0x00000000, 12 0x00000000,
14 0x00000000, 13 0x00000000,
15 14
16 0x00000000, // bottom left 15 0x00000000, // bottom left
17 0x00000000, 16 0x00000000,
18 0x00000000, 17 0x01000000,
19 0x00000000, 18 0x12100000,
20 0x00000000, 19 0x12100000,
21 0x10000000, 20 0x13111000,
22 0x10000000, 21 0x13322100,
23 0x21100000, 22 0x11111000,
24 23
25 0x00000112, // top right 24 0x00011111, // top right
26 0x00000001, 25 0x00122331,
27 0x00000001, 26 0x00011131,
28 0x00000000, 27 0x00000121,
29 0x00000000, 28 0x00000121,
30 0x00000000, 29 0x00000010,
31 0x00000000, 30 0x00000000,
32 0x00000000, 31 0x00000000,
33 32
34 0x00000000, // bottom right 33 0x00000000, // bottom right
35 0x00000000, 34 0x00000000,
36 0x00000000, 35 0x00000010,
37 0x00000000, 36 0x00000121,
38 0x00000000, 37 0x00000121,
39 0x00000001, 38 0x00011131,
40 0x00000001, 39 0x00122331,
41 0x00000112, 40 0x00011111,
42 41
43 }; 42 };
44 43
45 u16 countdown; 44 u16 countdown;
46 45
50 #define CURSOR_BLINK_RATE 16 49 #define CURSOR_BLINK_RATE 16
51 #define CURSOR_WIDTH 2; // tiles 50 #define CURSOR_WIDTH 2; // tiles
52 51
53 #define PIXELS_PER_TILE 8 52 #define PIXELS_PER_TILE 8
54 53
55
56 u16 build_order[3] = {
57 EMPTY,
58 WALL,
59 TOWER,
60 };
61 u8 build_order_size = 3;
62 u8 running = 0; 54 u8 running = 0;
63 55
64 void clear_cursor() { 56 void clear_cursor() {
65 VDP_setTileMap(VDP_PLAN_A, 0, cursor_x, cursor_y); 57 VDP_setTileMap(VDP_PLAN_A, 0, cursor_x, cursor_y);
66 VDP_setTileMap(VDP_PLAN_A, 0, cursor_x + 1, cursor_y); 58 VDP_setTileMap(VDP_PLAN_A, 0, cursor_x + 1, cursor_y);