X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=libpcsxcore%2Fgte.c;h=31213ef5be7ddfc086d126a39a3cf02cc403e1b0;hb=90f000f6c23cf8a17c14c0149de4916ea63f373e;hp=dc56b7f2e7bba88a5744eb1047962fd969696e50;hpb=6c0eefafd3a531d6bc6d26736926a1514c0c9e6f;p=pcsx_rearmed.git diff --git a/libpcsxcore/gte.c b/libpcsxcore/gte.c index dc56b7f2..31213ef5 100644 --- a/libpcsxcore/gte.c +++ b/libpcsxcore/gte.c @@ -26,11 +26,6 @@ #include "gte.h" #include "psxmem.h" -typedef struct psxCP2Regs { - psxCP2Data CP2D; /* Cop2 data registers */ - psxCP2Ctrl CP2C; /* Cop2 control registers */ -} psxCP2Regs; - #define VX(n) (n < 3 ? regs->CP2D.p[n << 1].sw.l : regs->CP2D.p[9].sw.l) #define VY(n) (n < 3 ? regs->CP2D.p[n << 1].sw.h : regs->CP2D.p[10].sw.l) #define VZ(n) (n < 3 ? regs->CP2D.p[(n << 1) + 1].sw.l : regs->CP2D.p[11].sw.l) @@ -175,7 +170,7 @@ typedef struct psxCP2Regs { #ifndef FLAGLESS -static inline s32 BOUNDS_(psxCP2Regs *regs, s64 n_value, s64 n_max, int n_maxflag, s64 n_min, int n_minflag) { +static inline s64 BOUNDS_(psxCP2Regs *regs, s64 n_value, s64 n_max, int n_maxflag, s64 n_min, int n_minflag) { if (n_value > n_max) { gteFLAG |= n_maxflag; } else if (n_value < n_min) { @@ -264,7 +259,7 @@ static inline u32 limE_(psxCP2Regs *regs, u32 result) { #ifndef FLAGLESS static inline u32 MFC2(int reg) { - psxCP2Regs *regs = (psxCP2Regs *)&psxRegs.CP2D; + psxCP2Regs *regs = &psxRegs.CP2; switch (reg) { case 1: case 3: @@ -299,7 +294,7 @@ static inline u32 MFC2(int reg) { } static inline void MTC2(u32 value, int reg) { - psxCP2Regs *regs = (psxCP2Regs *)&psxRegs.CP2D; + psxCP2Regs *regs = &psxRegs.CP2; switch (reg) { case 15: gteSXY0 = gteSXY1;