screen.h (939B)
1 /* 2 Copyright (c) 2021 Devine Lu Linvega, Andrew Alderwick 3 4 Permission to use, copy, modify, and distribute this software for any 5 purpose with or without fee is hereby granted, provided that the above 6 copyright notice and this permission notice appear in all copies. 7 8 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 WITH REGARD TO THIS SOFTWARE. 10 */ 11 12 typedef struct UxnScreen { 13 int width, height, vector, x1, y1, x2, y2, scale; 14 Uint32 palette[4], *pixels; 15 Uint8 *fg, *bg; 16 } UxnScreen; 17 18 extern UxnScreen uxn_screen; 19 extern int emu_resize(int width, int height); 20 int screen_changed(void); 21 void screen_change(int x1, int y1, int x2, int y2); 22 void screen_fill(Uint8 *layer, int color); 23 void screen_palette(void); 24 void screen_resize(Uint16 width, Uint16 height, int scale); 25 void screen_redraw(void); 26 27 Uint8 screen_dei(Uint8 addr); 28 void screen_deo(Uint8 addr); 29 30 #define twos(v) (v & 0x8000 ? (int)v - 0x10000 : (int)v)