|
|
|
|
@ -28,6 +28,7 @@ typedef struct Brush {
|
|
|
|
|
static int SCREEN_WIDTH = 512 + PAD * 2; |
|
|
|
|
static int SCREEN_HEIGHT = 512 + PAD * 2; |
|
|
|
|
static int FPS = 30; |
|
|
|
|
unsigned char tilelt[] = {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01}; |
|
|
|
|
|
|
|
|
|
unsigned char buffer[1024 * 4]; |
|
|
|
|
int ZOOM = 4; |
|
|
|
|
@ -129,12 +130,12 @@ write(int tx, int ty, int px, int py)
|
|
|
|
|
{ |
|
|
|
|
int id = tx + ty * 16; |
|
|
|
|
int pid = px + py * 8; |
|
|
|
|
int pix = id * 16; |
|
|
|
|
pix += py; |
|
|
|
|
int row = id * 16 + py; |
|
|
|
|
|
|
|
|
|
printf("#%d [%d:%d](%d,%d)\n", id, tx, ty, px, py); |
|
|
|
|
buffer[row] |= tilelt[px]; |
|
|
|
|
|
|
|
|
|
printf("#%d [%d:%d](%d,%d) = %d\n", id, tx, ty, px, py, buffer[row]); |
|
|
|
|
|
|
|
|
|
buffer[pix] = 0xFF; |
|
|
|
|
update(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|