aboutsummaryrefslogtreecommitdiff
path: root/gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'gui.c')
-rw-r--r--gui.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gui.c b/gui.c
index 4879581..8e6be46 100644
--- a/gui.c
+++ b/gui.c
@@ -172,9 +172,9 @@ loadfont(unsigned short *m, char *font)
}
void
-guiemu(unsigned short *m, unsigned short *r)
+guiemu(struct context *c)
{
- int x, y, c, n = 0;
+ int x, y, cnt, n = 0;
screen = SDL_SetVideoMode(real.w, real.h, 8, SDL_HWSURFACE|SDL_HWPALETTE);
SDL_SetColors(screen, color, 0, 16);
@@ -184,10 +184,10 @@ guiemu(unsigned short *m, unsigned short *r)
atexit(SDL_Quit);
- loadfont(m, "font.xpm");
+ loadfont(c->mem, "font.xpm");
- while ((c = step(m, r)) != -1) {
- if ((n += c) < 100)
+ while ((cnt = step(c)) != -1) {
+ if ((n += cnt) < 100)
continue;
n = 0;
@@ -195,11 +195,11 @@ guiemu(unsigned short *m, unsigned short *r)
if (SDL_MUSTLOCK(screen) && SDL_LockSurface(screen))
continue;
- SDL_FillRect(scratch, &scr, m[BORDER] & 0x0f);
+ SDL_FillRect(scratch, &scr, c->mem[BORDER] & 0x0f);
for (x = 0; x < 32; x++)
for (y = 0; y < 12; y++)
- drawglyph(scratch, x, y, m);
+ drawglyph(scratch, x, y, c->mem);
SDL_SoftStretch(scratch, &scr, screen, &real);
@@ -208,7 +208,7 @@ guiemu(unsigned short *m, unsigned short *r)
if (SDL_MUSTLOCK(screen))
SDL_UnlockSurface(screen);
- if (keyboard(m) == -1)
+ if (keyboard(c->mem) == -1)
break;
}