mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Move alpha pretest to BPMemory.h and rename a bunch of alpha testing related stuff
This commit is contained in:
@ -151,3 +151,38 @@ void GetBPRegInfo(const u8* data, char* name, size_t name_size, char* desc, size
|
||||
#undef SET_REG_NAME
|
||||
}
|
||||
}
|
||||
|
||||
AlphaTest::TEST_RESULT AlphaTest::TestResult()
|
||||
{
|
||||
switch(logic)
|
||||
{
|
||||
case 0: // AND
|
||||
if (comp0 == ALPHACMP_ALWAYS && comp1 == ALPHACMP_ALWAYS)
|
||||
return PASS;
|
||||
if (comp0 == ALPHACMP_NEVER || comp1 == ALPHACMP_NEVER)
|
||||
return FAIL;
|
||||
break;
|
||||
|
||||
case 1: // OR
|
||||
if (comp0 == ALPHACMP_ALWAYS || comp1 == ALPHACMP_ALWAYS)
|
||||
return PASS;
|
||||
if (comp0 == ALPHACMP_NEVER && comp1 == ALPHACMP_NEVER)
|
||||
return FAIL;
|
||||
break;
|
||||
|
||||
case 2: // XOR
|
||||
if ((comp0 == ALPHACMP_ALWAYS && comp1 == ALPHACMP_NEVER) || (comp0 == ALPHACMP_NEVER && comp1 == ALPHACMP_ALWAYS))
|
||||
return PASS;
|
||||
if ((comp0 == ALPHACMP_ALWAYS && comp1 == ALPHACMP_ALWAYS) || (comp0 == ALPHACMP_NEVER && comp1 == ALPHACMP_NEVER))
|
||||
return FAIL;
|
||||
break;
|
||||
|
||||
case 3: // XNOR
|
||||
if ((comp0 == ALPHACMP_ALWAYS && comp1 == ALPHACMP_NEVER) || (comp0 == ALPHACMP_NEVER && comp1 == ALPHACMP_ALWAYS))
|
||||
return FAIL;
|
||||
if ((comp0 == ALPHACMP_ALWAYS && comp1 == ALPHACMP_ALWAYS) || (comp0 == ALPHACMP_NEVER && comp1 == ALPHACMP_NEVER))
|
||||
return PASS;
|
||||
break;
|
||||
}
|
||||
return UNDETERMINED;
|
||||
}
|
||||
|
Reference in New Issue
Block a user