aboutsummaryrefslogtreecommitdiff
path: root/src/gfx/ps1/inc
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-02-24 21:12:18 +0100
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2022-03-30 08:20:21 +0200
commitb925e5e156db07494b338e7c130b72f8e3a7725e (patch)
tree771e581beaadb5e1ece158ee40e4251a61b7873b /src/gfx/ps1/inc
parent669045df00302d7c4df861c4c21cac1efdb54048 (diff)
downloadjancity-b925e5e156db07494b338e7c130b72f8e3a7725e.tar.gz
gfx: separate port-specific interfaces
Diffstat (limited to 'src/gfx/ps1/inc')
-rw-r--r--src/gfx/ps1/inc/gfx/port.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gfx/ps1/inc/gfx/port.h b/src/gfx/ps1/inc/gfx/port.h
index dec00c3..9aed9fd 100644
--- a/src/gfx/ps1/inc/gfx/port.h
+++ b/src/gfx/ps1/inc/gfx/port.h
@@ -129,7 +129,14 @@ struct stp_4line
uint32_t end;
};
-enum {DRAW_MODE = 0xE1};
+#define common_get_or_ret(t, x, ret) \
+ struct t *x = t##_get(); \
+ if (!x) return ret
+
+struct sprite *sprite_get(void);
+struct quad *quad_get(void);
+struct rect *rect_get(void);
+struct stp_4line *stp_4line_get(void);
int sprite_from_file_ex(const char *path, struct sprite *s);