aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2012-04-23 21:44:33 +0000
committerDimitri Sokolyuk <demon@dim13.org>2012-04-23 21:44:33 +0000
commita11ec50c0155d4011140486ffb5af92812bf11b4 (patch)
treea5518ffbad67115a4332ee08fb3a17aabdac4937
parentf92bb441463c201e605c737fb1a6203ce7daaf57 (diff)
sync border color handling with 0x10co.de
-rw-r--r--dcpu16.h3
-rw-r--r--gui.c4
2 files changed, 3 insertions, 4 deletions
diff --git a/dcpu16.h b/dcpu16.h
index 0f11c77..20d308e 100644
--- a/dcpu16.h
+++ b/dcpu16.h
@@ -33,8 +33,7 @@ enum { Res, JSR, BRK, nExt };
#define CHARS 0x8180
#define CHAREND 0x8280
-#define MISC 0x8280 /* bg color */
-#define MISCEND 0x8281
+#define BORDER 0x8280
#define KEYB 0x9000
#define KEYP 0x9010
diff --git a/gui.c b/gui.c
index c1376ba..c1381c8 100644
--- a/gui.c
+++ b/gui.c
@@ -104,7 +104,7 @@ drawscreen(SDL_Surface *screen, unsigned short *m)
{
int x, y;
- SDL_FillRect(screen, &scr, (m[MISC] >> 8) & 0x0f);
+ SDL_FillRect(screen, &scr, m[BORDER] & 0x0f);
for (x = 0; x < 32; x++)
for (y = 0; y < 12; y++)
@@ -190,7 +190,7 @@ setfont(unsigned short *m)
m[CHARS + 2 * i + 1] = atari_small[i][1];
}
- m[MISC] = 0x8000; /* set default fg/bg */
+ m[BORDER] = 0; /* set default bg to black */
}
void