2021-12-28 16:37:26 -05:00
|
|
|
/*
|
2023-08-08 18:31:48 -04:00
|
|
|
Copyright (c) 2021 Devine Lu Linvega, Andrew Alderwick
|
2021-12-28 16:37:26 -05:00
|
|
|
|
|
|
|
Permission to use, copy, modify, and distribute this software for any
|
|
|
|
purpose with or without fee is hereby granted, provided that the above
|
|
|
|
copyright notice and this permission notice appear in all copies.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
WITH REGARD TO THIS SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
2023-08-08 17:13:07 -04:00
|
|
|
#define SCREEN_VERSION 1
|
2023-08-08 17:44:17 -04:00
|
|
|
#define SCREEN_DEIMASK 0x003c
|
|
|
|
#define SCREEN_DEOMASK 0xc028
|
2023-08-08 17:13:07 -04:00
|
|
|
|
2021-12-29 12:11:03 -05:00
|
|
|
typedef struct UxnScreen {
|
2023-05-04 23:45:52 -04:00
|
|
|
int width, height, x1, y1, x2, y2;
|
|
|
|
Uint32 palette[4], *pixels;
|
2023-05-04 14:33:31 -04:00
|
|
|
Uint8 *fg, *bg;
|
2021-12-29 12:11:03 -05:00
|
|
|
} UxnScreen;
|
2021-12-28 16:37:26 -05:00
|
|
|
|
2021-12-29 12:11:03 -05:00
|
|
|
extern UxnScreen uxn_screen;
|
2023-07-24 12:48:49 -04:00
|
|
|
extern int emu_resize(int width, int height);
|
2023-07-23 19:24:09 -04:00
|
|
|
|
2023-08-13 21:48:32 -04:00
|
|
|
void screen_fill(Uint8 *layer, int x1, int y1, int x2, int y2, int color);
|
2023-05-04 20:43:44 -04:00
|
|
|
void screen_palette(Uint8 *addr);
|
|
|
|
void screen_resize(Uint16 width, Uint16 height);
|
2023-08-08 13:27:41 -04:00
|
|
|
void screen_change(Uint16 x1, Uint16 y1, Uint16 x2, Uint16 y2);
|
2023-08-16 16:46:07 -04:00
|
|
|
void screen_redraw(Uxn *u);
|
2023-08-15 22:19:06 -04:00
|
|
|
|
2023-03-01 14:28:14 -05:00
|
|
|
Uint8 screen_dei(Uxn *u, Uint8 addr);
|
2023-01-01 16:34:20 -05:00
|
|
|
void screen_deo(Uint8 *ram, Uint8 *d, Uint8 port);
|