ref: 846debd082dcb0ac7b0297c6d68a0aa382f95de5
parent: ec8d7cdf024949d73c5f887f23f060cd33c1df28
author: qwx <qwx@sciops.net>
date: Mon Aug 22 18:04:44 EDT 2022
games/doom: raise max scale factor for 4k side-bonus: fullscreen 1920x1200 working perfectly on t61p :)
--- a/sys/src/games/doom/i_video.c
+++ b/sys/src/games/doom/i_video.c
@@ -92,7 +92,7 @@
Rectangle r;
int y, scale;
uchar *s, *e, *d, *m;
- uchar buf[SCREENWIDTH*3*4];
+ uchar buf[SCREENWIDTH*3*12];
if(resized){
resized = 0;
@@ -109,8 +109,8 @@
scale = Dx(screen->r)/SCREENWIDTH;
if(scale <= 0)
scale = 1;
- else if(scale > 4)
- scale = 4;
+ else if(scale > 12)
+ scale = 12;
/* where to draw the scaled row */
r = rectsubpt(rectaddpt(Rect(0, 0, scale*SCREENWIDTH, scale), center),
@@ -128,6 +128,38 @@
for(; s < e; s++){
m = &cmap[*s * 3];
switch(scale){
+ case 12:
+ *d++ = m[2];
+ *d++ = m[1];
+ *d++ = m[0];
+ case 11:
+ *d++ = m[2];
+ *d++ = m[1];
+ *d++ = m[0];
+ case 10:
+ *d++ = m[2];
+ *d++ = m[1];
+ *d++ = m[0];
+ case 9:
+ *d++ = m[2];
+ *d++ = m[1];
+ *d++ = m[0];
+ case 8:
+ *d++ = m[2];
+ *d++ = m[1];
+ *d++ = m[0];
+ case 7:
+ *d++ = m[2];
+ *d++ = m[1];
+ *d++ = m[0];
+ case 6:
+ *d++ = m[2];
+ *d++ = m[1];
+ *d++ = m[0];
+ case 5:
+ *d++ = m[2];
+ *d++ = m[1];
+ *d++ = m[0];
case 4:
*d++ = m[2];
*d++ = m[1];