X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fgpu_unai%2Fgpu_unai.h;h=3306202288966df04966ec9a10457c2dff51ccdd;hb=b3bce60ef65914650716c6caea21480071e3405c;hp=4ab5a52f1a6bb43ecd0afeec37cbfc9bc3f8f031;hpb=846344d40d18b731488e874ea67ef5d66173f62b;p=pcsx_rearmed.git diff --git a/plugins/gpu_unai/gpu_unai.h b/plugins/gpu_unai/gpu_unai.h index 4ab5a52f..33062022 100644 --- a/plugins/gpu_unai/gpu_unai.h +++ b/plugins/gpu_unai/gpu_unai.h @@ -53,6 +53,14 @@ #define u32 uint32_t #define s32 int32_t #define s64 int64_t +#define u64 uint64_t + +typedef union { + struct { + u16 r, g, b; + } c; + u64 raw; +} gcol_t; typedef struct { u32 v; @@ -253,11 +261,12 @@ struct gpu_unai_t { s32 u_inc, v_inc; // Color for Gouraud-shaded prims + // Fixed-pt 8.8 rgb triplet // Packed fixed-pt 8.3:8.3:8.2 rgb triplet - // layout: rrrrrrrrXXXggggggggXXXbbbbbbbbXX - // ^ bit 31 ^ bit 0 - u32 gCol; - u32 gInc; // Increment along scanline for gCol + // layout: ccccccccXXXXXXXX for c in [r, g, b] + // ^ bit 16 + gcol_t gCol; + gcol_t gInc; // Increment along scanline for gCol // Color for flat-shaded, texture-blended prims u8 r5, g5, b5; // 5-bit light for undithered prims