Mercurial > repos > genjam1
comparison src/main.c @ 20:51a0972fcf76
Move some tilemap/distance stuff out of creep.c and main.c into a separate source file
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 12 Jan 2014 22:43:03 -0800 |
parents | 60bb690233cf |
children | bb7dfb42b320 |
comparison
equal
deleted
inserted
replaced
19:08f2bcf3447f | 20:51a0972fcf76 |
---|---|
1 #include <genesis.h> | 1 #include <genesis.h> |
2 #include "creep.h" | 2 #include "creep.h" |
3 #include "map.h" | |
3 | 4 |
4 // I now realize this should be one tile that uses the flipping flags. oops. | 5 // I now realize this should be one tile that uses the flipping flags. oops. |
5 const u32 cursor_tiles[4*8] = { | 6 const u32 cursor_tiles[4*8] = { |
6 0x21100000, // top left | 7 0x21100000, // top left |
7 0x10000000, | 8 0x10000000, |
44 #define EMPTY 0 | 45 #define EMPTY 0 |
45 #define WALL 'O'-32 + TILE_FONTINDEX | 46 #define WALL 'O'-32 + TILE_FONTINDEX |
46 #define TOWER TILE_ATTR_FULL(1, 0, 0, 0, 'T'-32 + TILE_FONTINDEX) | 47 #define TOWER TILE_ATTR_FULL(1, 0, 0, 0, 'T'-32 + TILE_FONTINDEX) |
47 #define GOAL TILE_ATTR_FULL(1, 0, 0, 0, 'G'-32 + TILE_FONTINDEX) | 48 #define GOAL TILE_ATTR_FULL(1, 0, 0, 0, 'G'-32 + TILE_FONTINDEX) |
48 | 49 |
49 u16 tilemap[40*28]; | |
50 u16 countdown; | 50 u16 countdown; |
51 | 51 |
52 int cursor_x = 0; // tiles | 52 int cursor_x = 0; // tiles |
53 int cursor_y = 0; // tiles | 53 int cursor_y = 0; // tiles |
54 int pixels_per_tile = 8; | 54 int pixels_per_tile = 8; |