11#include " gx.hpp"
22#include " __gx.h"
3- #include " ../../gfx /fifo.hpp"
3+ #include " ../../gx /fifo.hpp"
44
55// Track vertex count between GXBegin/GXEnd for mismatch detection
66static u16 sBeginNVerts = 0 ;
@@ -27,13 +27,13 @@ void GXBegin(GXPrimitive primitive, GXVtxFmt vtxFmt, u16 nVerts) {
2727
2828 // Record state for vertex count validation in GXEnd
2929 sBeginNVerts = nVerts;
30- sBeginFifoSize = aurora::gfx ::fifo::get_buffer_size ();
30+ sBeginFifoSize = aurora::gx ::fifo::get_buffer_size ();
3131 sInBegin = true ;
3232}
3333
3434void GXEnd () {
3535 if (sInBegin ) {
36- u32 bytesWritten = aurora::gfx ::fifo::get_buffer_size () - sBeginFifoSize ;
36+ u32 bytesWritten = aurora::gx ::fifo::get_buffer_size () - sBeginFifoSize ;
3737 if (sBeginNVerts > 0 && bytesWritten > 0 ) {
3838 u32 vtxSize = bytesWritten / sBeginNVerts ;
3939 u32 remainder = bytesWritten % sBeginNVerts ;
@@ -48,8 +48,8 @@ void GXEnd() {
4848 }
4949 sInBegin = false ;
5050 }
51- if (!aurora::gfx ::fifo::in_display_list ()) {
52- aurora::gfx ::fifo::drain ();
51+ if (!aurora::gx ::fifo::in_display_list ()) {
52+ aurora::gx ::fifo::drain ();
5353 }
5454}
5555
@@ -201,28 +201,27 @@ void GXTexCoord1x16(u16 index) { GX_WRITE_U16(index); }
201201
202202void GXTexCoord1x8 (u8 index) { GX_WRITE_U8 (index); }
203203
204- void GXCmd1u8 (const u8 x) { aurora::gfx ::fifo::write_u8 (static_cast < uint8_t >(x) ); }
205- void GXCmd1u16 (const u16 x) { aurora::gfx ::fifo::write_u16 (static_cast < uint16_t >(x) ); }
206- void GXCmd1u32 (const u32 x) { aurora::gfx ::fifo::write_u32 (static_cast < uint32_t >(x) ); }
207-
208- void GXParam1u8 (const u8 x) { aurora::gfx ::fifo::write_u8 (static_cast < uint8_t >(x) ); }
209- void GXParam1u16 (const u16 x) { aurora::gfx ::fifo::write_u16 (static_cast < uint16_t >(x) ); }
210- void GXParam1u32 (const u32 x) { aurora::gfx ::fifo::write_u32 (static_cast < uint32_t >(x) ); }
211- void GXParam1s8 (const s8 x) { aurora::gfx ::fifo::write_u8 (static_cast <uint8_t >(x)); }
212- void GXParam1s16 (const s16 x) { aurora::gfx ::fifo::write_u16 (static_cast <uint16_t >(x)); }
213- void GXParam1s32 (const s32 x) { aurora::gfx ::fifo::write_u32 (static_cast <uint32_t >(x)); }
214- void GXParam1f32 (const f32 x) { aurora::gfx ::fifo::write_f32 (x); }
204+ void GXCmd1u8 (const u8 x) { aurora::gx ::fifo::write_u8 (x ); }
205+ void GXCmd1u16 (const u16 x) { aurora::gx ::fifo::write_u16 (x ); }
206+ void GXCmd1u32 (const u32 x) { aurora::gx ::fifo::write_u32 (x ); }
207+
208+ void GXParam1u8 (const u8 x) { aurora::gx ::fifo::write_u8 (x ); }
209+ void GXParam1u16 (const u16 x) { aurora::gx ::fifo::write_u16 (x ); }
210+ void GXParam1u32 (const u32 x) { aurora::gx ::fifo::write_u32 (x ); }
211+ void GXParam1s8 (const s8 x) { aurora::gx ::fifo::write_u8 (static_cast <uint8_t >(x)); }
212+ void GXParam1s16 (const s16 x) { aurora::gx ::fifo::write_u16 (static_cast <uint16_t >(x)); }
213+ void GXParam1s32 (const s32 x) { aurora::gx ::fifo::write_u32 (static_cast <uint32_t >(x)); }
214+ void GXParam1f32 (const f32 x) { aurora::gx ::fifo::write_f32 (x); }
215215void GXParam3f32 (const f32 x, const f32 y, const f32 z) {
216- aurora::gfx ::fifo::write_f32 (x);
217- aurora::gfx ::fifo::write_f32 (y);
218- aurora::gfx ::fifo::write_f32 (z);
216+ aurora::gx ::fifo::write_f32 (x);
217+ aurora::gx ::fifo::write_f32 (y);
218+ aurora::gx ::fifo::write_f32 (z);
219219}
220220void GXParam4f32 (const f32 x, const f32 y, const f32 z, const f32 w) {
221- aurora::gfx ::fifo::write_f32 (x);
222- aurora::gfx ::fifo::write_f32 (y);
223- aurora::gfx ::fifo::write_f32 (z);
224- aurora::gfx ::fifo::write_f32 (w);
221+ aurora::gx ::fifo::write_f32 (x);
222+ aurora::gx ::fifo::write_f32 (y);
223+ aurora::gx ::fifo::write_f32 (z);
224+ aurora::gx ::fifo::write_f32 (w);
225225}
226226
227-
228227} // extern "C"
0 commit comments