forked from yosh778/psp2shell
-
Notifications
You must be signed in to change notification settings - Fork 3
/
draw.h
29 lines (20 loc) · 734 Bytes
/
draw.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
* Copyright (c) 2015 Sergi Granell (xerpi)
*/
#ifndef DRAW_H
#define DRAW_H
#include <psp2/types.h>
#define RGBA8(r, g, b, a) ((((a)&0xFF)<<24) | (((b)&0xFF)<<16) | (((g)&0xFF)<<8) | (((r)&0xFF)<<0))
#define SCREEN_W 960
#define SCREEN_H 544
#define WHITE RGBA8(255, 255, 255, 255)
int init_video();
void end_video();
void swap_buffers();
void clear_screen();
void draw_pixel(uint32_t x, uint32_t y, uint32_t color);
void draw_rectangle(uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint32_t color);
void font_draw_char(int x, int y, uint32_t color, char c);
void font_draw_string(int x, int y, uint32_t color, const char *string);
void font_draw_stringf(int x, int y, uint32_t color, const char *s, ...);
#endif