diff options
author | aiju <devnull@localhost> | 2014-02-23 11:55:29 +0100 |
---|---|---|
committer | aiju <devnull@localhost> | 2014-02-23 11:55:29 +0100 |
commit | 662fff51f01f1886d52ece8ae55d6d6d422d5a52 (patch) | |
tree | 5432b31a7de9a2032e3d844733b1abef50f6a40a /sys/src/games/nes/nes.c | |
parent | 0201795805f22e3d8d0b347d06c39d934c8b6866 (diff) |
games/nes: added oflag
Diffstat (limited to 'sys/src/games/nes/nes.c')
-rw-r--r-- | sys/src/games/nes/nes.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/src/games/nes/nes.c b/sys/src/games/nes/nes.c index 6c9c8c69d..15bee498f 100644 --- a/sys/src/games/nes/nes.c +++ b/sys/src/games/nes/nes.c @@ -15,7 +15,7 @@ Rectangle picr; Image *tmp, *bg; int clock, ppuclock, syncclock, syncfreq, checkclock, msgclock, sleeps; Mousectl *mc; -int keys, paused, savereq, loadreq; +int keys, paused, savereq, loadreq, oflag; int mirr; QLock pauselock; @@ -155,11 +155,12 @@ keyproc(void *) void threadmain(int argc, char **argv) { - int t; + int t, h; Point p; uvlong old, new, diff; scale = 1; + h = 240; ARGBEGIN { case '2': scale = 2; @@ -167,6 +168,10 @@ threadmain(int argc, char **argv) case '3': scale = 3; break; + case 'o': + oflag = 1; + h -= 16; + break; } ARGEND; if(argc < 1) @@ -180,9 +185,9 @@ threadmain(int argc, char **argv) proccreate(keyproc, nil, 8192); originwindow(screen, Pt(0, 0), screen->r.min); p = divpt(addpt(screen->r.min, screen->r.max), 2); - picr = (Rectangle){subpt(p, Pt(scale * 128, scale * 120)), addpt(p, Pt(scale * 128, scale * 120))}; + picr = (Rectangle){subpt(p, Pt(scale * 128, scale * h/2)), addpt(p, Pt(scale * 128, scale * h/2))}; if(screen->chan != XRGB32) - tmp = allocimage(display, Rect(0, 0, scale * 256, scale * 240), XRGB32, 0, 0); + tmp = allocimage(display, Rect(0, 0, scale * 256, scale * h), XRGB32, 0, 0); bg = allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0xCCCCCCFF); draw(screen, screen->r, bg, nil, ZP); |