2021-12-28 16:37:26 -05:00
|
|
|
/*
|
|
|
|
Copyright (c) 2021 Devine Lu Linvega
|
|
|
|
Copyright (c) 2021 Andrew Alderwick
|
|
|
|
|
|
|
|
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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct Layer {
|
2023-05-04 14:15:16 -04:00
|
|
|
Uint8 *pixels;
|
2021-12-28 16:37:26 -05:00
|
|
|
} Layer;
|
|
|
|
|
2021-12-29 12:11:03 -05:00
|
|
|
typedef struct UxnScreen {
|
2021-12-28 16:37:26 -05:00
|
|
|
Uint32 palette[4], *pixels;
|
2023-05-04 14:15:16 -04:00
|
|
|
Uint16 width, height, x1, y1, x2, y2;
|
2021-12-28 16:37:26 -05:00
|
|
|
Layer 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;
|
2021-12-28 16:37:26 -05:00
|
|
|
|
2021-12-29 12:11:03 -05:00
|
|
|
void screen_palette(UxnScreen *p, Uint8 *addr);
|
|
|
|
void screen_resize(UxnScreen *p, Uint16 width, Uint16 height);
|
2023-03-27 11:38:54 -04:00
|
|
|
void screen_redraw(UxnScreen *p);
|
2021-12-28 16:37:26 -05: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);
|