From: John Tsiombikas Date: Sun, 2 Jul 2023 19:40:49 +0000 (+0300) Subject: foo X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=dd1b78089a43fdbbdf88d10d3d8a4d8f02662491;p=retroray foo --- diff --git a/src/app.h b/src/app.h index 0e5ce05..b2a3b82 100644 --- a/src/app.h +++ b/src/app.h @@ -112,6 +112,7 @@ void app_quit(void); void app_resize(int x, int y); void app_fullscreen(int fs); void app_vsync(int vsync); +void app_rband(int x, int y, int w, int h); /* defined in scr_mod.c for convenience */ void primray(cgm_ray *ray, int x, int y); diff --git a/src/dos/main.c b/src/dos/main.c index 16f53ba..50c876f 100644 --- a/src/dos/main.c +++ b/src/dos/main.c @@ -44,6 +44,8 @@ static uint32_t *vmem; static int quit, disp_pending, dirty_valid; static rtk_rect dirty; static int mx, my; +static rtk_rect rband; + int main(int argc, char **argv) { @@ -231,6 +233,18 @@ void app_vsync(int vsync) { } +void app_rband(int x, int y, int w, int h) +{ + if(!(w | h)) { + w = h = 0; + } + + rband.x = x; + rband.y = y; + rband.width = w; + rband.height = h; +} + static void draw_cursor(int x, int y) { int i; @@ -244,3 +258,28 @@ static void draw_cursor(int x, int y) if(x < win_width - offs - 1) fbptr[offs] ^= 0xffffff; } } + +static void draw_rband(void) +{ + int i; + rtk_rect rect; + uint32_t *fbptr, *bptr; + + rect = rband; + fix_rect(&rect); + + fbptr = framebuf + rect.y * win_width + rect.x; + bptr = fbptr + win_width * (rect.height - 1); + + for(i=0; iheight = h; } -static void draw_rband(void) -{ - int i; - rtk_rect rect; - uint32_t *fbptr, *bptr; - - rect = rband; - fix_rect(&rect); - - fbptr = framebuf + rect.y * win_width + rect.x; - bptr = fbptr + win_width * (rect.height - 1); - - for(i=0; i