uxn

Varvara Ordinator, written in ANSI C(SDL2)
git clone https://git.eamoncaddigan.net/uxn.git
Log | Files | Refs | README | LICENSE

screen.h (994B)


      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 #define SCREEN_VERSION 1
     13 
     14 typedef struct UxnScreen {
     15 	int width, height, x1, y1, x2, y2;
     16 	Uint32 palette[4], *pixels;
     17 	Uint8 *fg, *bg;
     18 } UxnScreen;
     19 
     20 extern UxnScreen uxn_screen;
     21 extern int emu_resize(int width, int height);
     22 
     23 void screen_fill(Uint8 *layer, int color);
     24 void screen_rect(Uint8 *layer, Uint16 x1, Uint16 y1, Uint16 x2, Uint16 y2, int color);
     25 void screen_palette(Uint8 *addr);
     26 void screen_resize(Uint16 width, Uint16 height);
     27 void screen_change(Uint16 x1, Uint16 y1, Uint16 x2, Uint16 y2);
     28 void screen_redraw(Uxn *u);
     29 
     30 Uint8 screen_dei(Uxn *u, Uint8 addr);
     31 void screen_deo(Uint8 *ram, Uint8 *d, Uint8 port);