mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 06:32:48 +00:00
Changed how bit values are calculated; seems to fix achievement 24594, Hungriest Runner (Win all three races in the Gourmet Race Grand Prix.), for Kirby Super Star.
This commit is contained in:
parent
2b345b8d48
commit
170c98b593
31
cheevos.c
31
cheevos.c
@ -1477,14 +1477,32 @@ static unsigned cheevos_get_var_value(cheevos_var_t *var)
|
||||
{
|
||||
live_val = memory[0];
|
||||
|
||||
if (var->size > CHEEVOS_VAR_SIZE_BIT_0
|
||||
&& var->size <= CHEEVOS_VAR_SIZE_BIT_7)
|
||||
live_val = (live_val &
|
||||
(1 << (var->size - CHEEVOS_VAR_SIZE_BIT_0))) != 0;
|
||||
else
|
||||
{
|
||||
switch (var->size)
|
||||
{
|
||||
case CHEEVOS_VAR_SIZE_BIT_0:
|
||||
live_val &= 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_1:
|
||||
live_val = (live_val >> 1) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_2:
|
||||
live_val = (live_val >> 2) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_3:
|
||||
live_val = (live_val >> 3) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_4:
|
||||
live_val = (live_val >> 4) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_5:
|
||||
live_val = (live_val >> 5) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_6:
|
||||
live_val = (live_val >> 6) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_BIT_7:
|
||||
live_val = (live_val >> 7) & 1;
|
||||
break;
|
||||
case CHEEVOS_VAR_SIZE_NIBBLE_LOWER:
|
||||
live_val &= 0x0f;
|
||||
break;
|
||||
@ -1503,7 +1521,6 @@ static unsigned cheevos_get_var_value(cheevos_var_t *var)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (var->type == CHEEVOS_VAR_TYPE_DELTA_MEM)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user