mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
Formatting cleanup for VideoCommon.
Block braces on new lines. Also killed off trailing whitespace and dangling elses. Spaced some things out to make them more readable (only in places where it looked like a bit of a clusterfuck).
This commit is contained in:
@ -87,17 +87,17 @@
|
||||
#define BPMEM_FOGPARAM3 0xF1
|
||||
#define BPMEM_FOGCOLOR 0xF2
|
||||
#define BPMEM_ALPHACOMPARE 0xF3
|
||||
#define BPMEM_BIAS 0xF4
|
||||
#define BPMEM_ZTEX2 0xF5
|
||||
#define BPMEM_BIAS 0xF4
|
||||
#define BPMEM_ZTEX2 0xF5
|
||||
#define BPMEM_TEV_KSEL 0xF6 // 0xF6 + 8
|
||||
#define BPMEM_BP_MASK 0xFE
|
||||
|
||||
|
||||
// Tev/combiner things
|
||||
|
||||
#define TEVSCALE_1 0
|
||||
#define TEVSCALE_2 1
|
||||
#define TEVSCALE_4 2
|
||||
#define TEVSCALE_1 0
|
||||
#define TEVSCALE_2 1
|
||||
#define TEVSCALE_4 2
|
||||
#define TEVDIVIDE_2 3
|
||||
|
||||
#define TEVCMP_R8 0
|
||||
@ -136,22 +136,22 @@
|
||||
#define TEVCOLORARG_ZERO 15
|
||||
|
||||
#define TEVALPHAARG_APREV 0
|
||||
#define TEVALPHAARG_A0 1
|
||||
#define TEVALPHAARG_A1 2
|
||||
#define TEVALPHAARG_A2 3
|
||||
#define TEVALPHAARG_TEXA 4
|
||||
#define TEVALPHAARG_RASA 5
|
||||
#define TEVALPHAARG_A0 1
|
||||
#define TEVALPHAARG_A1 2
|
||||
#define TEVALPHAARG_A2 3
|
||||
#define TEVALPHAARG_TEXA 4
|
||||
#define TEVALPHAARG_RASA 5
|
||||
#define TEVALPHAARG_KONST 6
|
||||
#define TEVALPHAARG_ZERO 7
|
||||
#define TEVALPHAARG_ZERO 7
|
||||
|
||||
#define ALPHACMP_NEVER 0
|
||||
#define ALPHACMP_LESS 1
|
||||
#define ALPHACMP_EQUAL 2
|
||||
#define ALPHACMP_LEQUAL 3
|
||||
#define ALPHACMP_NEVER 0
|
||||
#define ALPHACMP_LESS 1
|
||||
#define ALPHACMP_EQUAL 2
|
||||
#define ALPHACMP_LEQUAL 3
|
||||
#define ALPHACMP_GREATER 4
|
||||
#define ALPHACMP_NEQUAL 5
|
||||
#define ALPHACMP_GEQUAL 6
|
||||
#define ALPHACMP_ALWAYS 7
|
||||
#define ALPHACMP_NEQUAL 5
|
||||
#define ALPHACMP_GEQUAL 6
|
||||
#define ALPHACMP_ALWAYS 7
|
||||
|
||||
enum Compare
|
||||
{
|
||||
@ -313,26 +313,26 @@ struct TevStageCombiner
|
||||
#define ITF_3 3
|
||||
|
||||
#define ITB_NONE 0
|
||||
#define ITB_S 1
|
||||
#define ITB_T 2
|
||||
#define ITB_ST 3
|
||||
#define ITB_U 4
|
||||
#define ITB_SU 5
|
||||
#define ITB_TU 6
|
||||
#define ITB_STU 7
|
||||
#define ITB_S 1
|
||||
#define ITB_T 2
|
||||
#define ITB_ST 3
|
||||
#define ITB_U 4
|
||||
#define ITB_SU 5
|
||||
#define ITB_TU 6
|
||||
#define ITB_STU 7
|
||||
|
||||
#define ITBA_OFF 0
|
||||
#define ITBA_S 1
|
||||
#define ITBA_T 2
|
||||
#define ITBA_U 3
|
||||
#define ITBA_S 1
|
||||
#define ITBA_T 2
|
||||
#define ITBA_U 3
|
||||
|
||||
#define ITW_OFF 0
|
||||
#define ITW_256 1
|
||||
#define ITW_128 2
|
||||
#define ITW_64 3
|
||||
#define ITW_32 4
|
||||
#define ITW_16 5
|
||||
#define ITW_0 6
|
||||
#define ITW_64 3
|
||||
#define ITW_32 4
|
||||
#define ITW_16 5
|
||||
#define ITW_0 6
|
||||
|
||||
// several discoveries:
|
||||
// GXSetTevIndBumpST(tevstage, indstage, matrixind)
|
||||
@ -366,7 +366,7 @@ struct TevStageCombiner
|
||||
u32 unused : 11;
|
||||
};
|
||||
|
||||
bool IsActive() { return (hex&0x17fe00)!=0; }
|
||||
bool IsActive() { return (hex & 0x17fe00) != 0; }
|
||||
};
|
||||
|
||||
union TwoTevStageOrders
|
||||
@ -464,7 +464,7 @@ union TexImage0
|
||||
{
|
||||
struct
|
||||
{
|
||||
u32 width : 10; //actually w-1
|
||||
u32 width : 10; //actually w-1
|
||||
u32 height : 10; //actually h-1
|
||||
u32 format : 4;
|
||||
};
|
||||
@ -542,14 +542,14 @@ union ZTex2
|
||||
|
||||
struct FourTexUnits
|
||||
{
|
||||
TexMode0 texMode0[4];
|
||||
TexMode1 texMode1[4];
|
||||
TexImage0 texImage0[4];
|
||||
TexImage1 texImage1[4];
|
||||
TexImage2 texImage2[4];
|
||||
TexImage3 texImage3[4];
|
||||
TexTLUT texTlut[4];
|
||||
u32 unknown[4];
|
||||
TexMode0 texMode0[4];
|
||||
TexMode1 texMode1[4];
|
||||
TexImage0 texImage0[4];
|
||||
TexImage1 texImage1[4];
|
||||
TexImage2 texImage2[4];
|
||||
TexImage3 texImage3[4];
|
||||
TexTLUT texTlut[4];
|
||||
u32 unknown[4];
|
||||
};
|
||||
|
||||
|
||||
@ -646,7 +646,8 @@ union FogParam0
|
||||
u32 sign : 1;
|
||||
};
|
||||
|
||||
float GetA() {
|
||||
float GetA()
|
||||
{
|
||||
union { u32 i; float f; } dummy;
|
||||
dummy.i = ((u32)sign << 31) | ((u32)exponent << 23) | ((u32)mantissa << 12); // scale mantissa from 11 to 23 bits
|
||||
return dummy.f;
|
||||
@ -667,7 +668,8 @@ union FogParam3
|
||||
};
|
||||
|
||||
// amount to subtract from eyespacez after range adjustment
|
||||
float GetC() {
|
||||
float GetC()
|
||||
{
|
||||
union { u32 i; float f; } dummy;
|
||||
dummy.i = ((u32)c_sign << 31) | ((u32)c_exp << 23) | ((u32)c_mant << 12); // scale mantissa from 11 to 23 bits
|
||||
return dummy.f;
|
||||
@ -906,7 +908,8 @@ union UPE_Copy
|
||||
union BPU_PreloadTileInfo
|
||||
{
|
||||
u32 hex;
|
||||
struct {
|
||||
struct
|
||||
{
|
||||
u32 count : 15;
|
||||
u32 type : 2;
|
||||
};
|
||||
|
Reference in New Issue
Block a user