From ee192c41a63a7a116ff18897703bb96576e21274 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sun, 12 Oct 2025 11:27:39 -0400 Subject: [PATCH] minor correction to asm --- code/graphics_hello_psyq/hello_gpu.h | 12 ++++++------ code/graphics_hello_psyq/hello_gpu.s | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/graphics_hello_psyq/hello_gpu.h b/code/graphics_hello_psyq/hello_gpu.h index b3f33af..f82ec78 100644 --- a/code/graphics_hello_psyq/hello_gpu.h +++ b/code/graphics_hello_psyq/hello_gpu.h @@ -69,13 +69,13 @@ typedef def_struct(PolyTag) { * Primitive Handling Macros */ -#define set_len( p, _len) (((PolyTag*)(p))->len = (B1)(_len)) -#define set_addr(p, _addr) (((PolyTag*)(p))->addr = (U4)(_addr)) -#define set_code(p, _code) (((PolyTag*)(p))->code = (B1)(_code)) +#define set_len( p, _len) (((PolyTag*R_)(p))->len = (B1)(_len)) +#define set_addr(p, _addr) (((PolyTag*R_)(p))->addr = (U4)(_addr)) +#define set_code(p, _code) (((PolyTag*R_)(p))->code = (B1)(_code)) -#define get_len(p) (B1)(((PolyTag*)(p))->len) -#define get_code(p) (B1)(((PolyTag*)(p))->code) -#define get_addr(p) (U4)(((PolyTag*)(p))->addr) +#define get_len(p) (B1)(((PolyTag*R_)(p))->len) +#define get_code(p) (B1)(((PolyTag*R_)(p))->code) +#define get_addr(p) (U4)(((PolyTag*R_)(p))->addr) #define orderingtbl_add_primitive(ot, p) set_addr(p, get_addr(ot)), set_addr(ot, p) #define orderingtbl_add_primitives(ot, p0, p1) set_addr(p1, get_addr(ot)), set_addr(ot, p0) diff --git a/code/graphics_hello_psyq/hello_gpu.s b/code/graphics_hello_psyq/hello_gpu.s index dd9aff5..1712b3a 100644 --- a/code/graphics_hello_psyq/hello_gpu.s +++ b/code/graphics_hello_psyq/hello_gpu.s @@ -9,9 +9,9 @@ .equ DrawEnv_Packed_tag, 0 .equ DrawEnv_Packed_code, DrawEnv_Packed_tag + U4 .equ DrawEnv_Packed, 64 -# DrawEnv { Rect_S16 clip; Vec_2S16 ofs; Rect_S16 tw; U16 tpage; U8 dtd; U8 dfe; U8 tme; U8 r0,g0,b0; DR_ENV dr_env; } +# DrawEnv { Rect_S2 clip; V2_S2 ofs; Rect_S2 tw; U2 tpage; U8 dtd; U8 dfe; U8 tme; U8 r0,g0,b0; DR_ENV dr_env; } .equ DrawEnv_clip_area, /* 0 */ Rect_S2 * 0 -.equ DrawEnv_drawing_offset, /* 8 */ A2_S2 * 0 + Rect_S2 +.equ DrawEnv_drawing_offset, /* 8 */ V2_S2 * 0 + Rect_S2 .equ DrawEnv_texture_window, /* 12 */ Rect_S2 * 0 + A2_S2 + DrawEnv_drawing_offset .equ DrawEnv_texture_page, /* 20 */ S1 * 0 + Rect_S2 + DrawEnv_texture_window .equ DrawEnv_flag_dither, /* 22 */ B1 * 0 + S2 + DrawEnv_texture_page