aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/psxgpu/setdefdrawenv.c
diff options
context:
space:
mode:
authorJohn Wilbert M. Villamor <lameguy64@gmail.com>2019-04-06 10:11:07 +0800
committerJohn Wilbert M. Villamor <lameguy64@gmail.com>2019-04-06 10:11:07 +0800
commitf3e040230772f978540a71aea43dfde200992922 (patch)
treebd8ca31b72dd01e24980b073854e263589530f56 /libpsn00b/psxgpu/setdefdrawenv.c
downloadpsn00bsdk-f3e040230772f978540a71aea43dfde200992922.tar.gz
First commit
Diffstat (limited to 'libpsn00b/psxgpu/setdefdrawenv.c')
-rw-r--r--libpsn00b/psxgpu/setdefdrawenv.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/libpsn00b/psxgpu/setdefdrawenv.c b/libpsn00b/psxgpu/setdefdrawenv.c
new file mode 100644
index 0000000..bcd93ca
--- /dev/null
+++ b/libpsn00b/psxgpu/setdefdrawenv.c
@@ -0,0 +1,26 @@
+#include <psxgpu.h>
+
+DRAWENV *SetDefDrawEnv(DRAWENV *draw, int x, int y, int w, int h) {
+
+ draw->clip.x = x;
+ draw->clip.y = y;
+ draw->clip.w = w;
+ draw->clip.h = h;
+
+ draw->ofs[0] = 0;
+ draw->ofs[1] = 0;
+
+ draw->tw.x = 0;
+ draw->tw.y = 0;
+ draw->tw.w = 0;
+ draw->tw.h = 0;
+
+ draw->tpage = 0x0a;
+ draw->dtd = 1;
+ draw->dfe = 0;
+ draw->isbg = 0;
+ setRGB0( draw, 0, 0, 0 );
+
+ return draw;
+
+}