summaryrefslogtreecommitdiff
path: root/apps/plugins/xworld/intern.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/xworld/intern.h')
-rw-r--r--apps/plugins/xworld/intern.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/plugins/xworld/intern.h b/apps/plugins/xworld/intern.h
index 3355f28eb1..90b640858d 100644
--- a/apps/plugins/xworld/intern.h
+++ b/apps/plugins/xworld/intern.h
@@ -34,11 +34,18 @@ struct Ptr {
34 uint8_t* pc; 34 uint8_t* pc;
35}; 35};
36 36
37uint8_t scriptPtr_fetchByte(struct Ptr* p) ICODE_ATTR;
38uint16_t scriptPtr_fetchWord(struct Ptr* p) ICODE_ATTR;
39
40struct Point { 37struct Point {
41 int16_t x, y; 38 int16_t x, y;
42}; 39};
43 40
41static inline uint8_t scriptPtr_fetchByte(struct Ptr* p) {
42 return *p->pc++;
43}
44
45static inline uint16_t scriptPtr_fetchWord(struct Ptr* p) {
46 uint16_t i = READ_BE_UINT16(p->pc);
47 p->pc += 2;
48 return i;
49}
50
44#endif 51#endif