1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-10-01 09:57:47 +00:00
erc-c/include/vm_screen.h

28 lines
783 B
C
Raw Normal View History

2017-11-22 05:24:51 +00:00
#ifndef _VM_SCREEN_H_
#define _VM_SCREEN_H_
2017-12-07 03:37:14 +00:00
/*
* If you just want to plot a single pixel, you can use this macro to
* abstract away the need to indicate the x/y dimensions (as those must
* necessarily be 1x1).
*/
#define vm_screen_draw_pixel(context, xpos, ypos) \
vm_screen_draw_rect(context, xpos, ypos, 1, 1)
2017-11-22 05:24:51 +00:00
typedef struct {
2017-12-07 03:37:14 +00:00
/*
* These form the components of an RGBA composite color.
*/
2017-11-22 05:24:51 +00:00
int color_red;
int color_green;
int color_blue;
int color_alpha;
} vm_screen_context;
extern void vm_screen_draw_rect(vm_screen_context *, int, int, int, int);
2017-12-02 19:05:53 +00:00
extern void vm_screen_free_context(vm_screen_context *);
2017-11-22 05:24:51 +00:00
extern vm_screen_context *vm_screen_new_context();
extern void vm_screen_set_color(vm_screen_context *, int, int, int, int);
#endif