Removed FIXED_SIZE flag

This commit is contained in:
Devine Lu Linvega 2023-04-12 12:22:17 -07:00
parent 11e9b635c8
commit be138f5952
2 changed files with 7 additions and 12 deletions

View File

@ -135,12 +135,10 @@ screen_deo(Uint8 *ram, Uint8 *d, Uint8 port)
{ {
switch(port) { switch(port) {
case 0x3: case 0x3:
if(!FIXED_SIZE) screen_resize(&uxn_screen, clamp(PEEK2(d + 2), 1, 1024), uxn_screen.height);
screen_resize(&uxn_screen, clamp(PEEK2(d + 2), 1, 1024), uxn_screen.height);
break; break;
case 0x5: case 0x5:
if(!FIXED_SIZE) screen_resize(&uxn_screen, uxn_screen.width, clamp(PEEK2(d + 4), 1, 1024));
screen_resize(&uxn_screen, uxn_screen.width, clamp(PEEK2(d + 4), 1, 1024));
break; break;
case 0xe: { case 0xe: {
Uint16 x = PEEK2(d + 0x8), y = PEEK2(d + 0xa); Uint16 x = PEEK2(d + 0x8), y = PEEK2(d + 0xa);
@ -149,8 +147,8 @@ screen_deo(Uint8 *ram, Uint8 *d, Uint8 port)
screen_fill(&uxn_screen, layer, (d[0xe] & 0x10) ? 0 : x, (d[0xe] & 0x20) ? 0 : y, (d[0xe] & 0x10) ? x : uxn_screen.width, (d[0xe] & 0x20) ? y : uxn_screen.height, d[0xe] & 0x3); screen_fill(&uxn_screen, layer, (d[0xe] & 0x10) ? 0 : x, (d[0xe] & 0x20) ? 0 : y, (d[0xe] & 0x10) ? x : uxn_screen.width, (d[0xe] & 0x20) ? y : uxn_screen.height, d[0xe] & 0x3);
else { else {
screen_write(&uxn_screen, layer, x, y, d[0xe] & 0x3); screen_write(&uxn_screen, layer, x, y, d[0xe] & 0x3);
if(d[0x6] & 0x01) POKE2(d + 0x8, x + 1); /* auto x+1 */ if(d[0x6] & 0x1) POKE2(d + 0x8, x + 1); /* auto x+1 */
if(d[0x6] & 0x02) POKE2(d + 0xa, y + 1); /* auto y+1 */ if(d[0x6] & 0x2) POKE2(d + 0xa, y + 1); /* auto y+1 */
} }
break; break;
} }
@ -171,9 +169,9 @@ screen_deo(Uint8 *ram, Uint8 *d, Uint8 port)
addr += (d[0x6] & 0x04) << (1 + twobpp); addr += (d[0x6] & 0x04) << (1 + twobpp);
} }
} }
POKE2(d + 0xc, addr); /* auto addr+length */ if(d[0x6] & 0x1) POKE2(d + 0x8, x + dx); /* auto x+8 */
POKE2(d + 0x8, x + dx); /* auto x+8 */ if(d[0x6] & 0x2) POKE2(d + 0xa, y + dy); /* auto y+8 */
POKE2(d + 0xa, y + dy); /* auto y+8 */ if(d[0x6] & 0x4) POKE2(d + 0xc, addr); /* auto addr+length */
break; break;
} }
} }

View File

@ -10,8 +10,6 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE. WITH REGARD TO THIS SOFTWARE.
*/ */
#define FIXED_SIZE 0
typedef struct Layer { typedef struct Layer {
Uint8 *pixels, changed; Uint8 *pixels, changed;
} Layer; } Layer;
@ -20,7 +18,6 @@ typedef struct UxnScreen {
Uint32 palette[4], *pixels; Uint32 palette[4], *pixels;
Uint16 width, height; Uint16 width, height;
Layer fg, bg; Layer fg, bg;
Uint8 mono;
} UxnScreen; } UxnScreen;
extern UxnScreen uxn_screen; extern UxnScreen uxn_screen;