Update switch to just return at the end instead
This commit is contained in:
parent
f4ee044347
commit
e834d32b8e
@ -226,16 +226,17 @@ static value_t read_lvalue(GB_gameboy_t *gb, lvalue_t lvalue)
|
|||||||
return VALUE_16(GB_read_memory(gb, lvalue.memory_address.value) |
|
return VALUE_16(GB_read_memory(gb, lvalue.memory_address.value) |
|
||||||
(GB_read_memory(gb, lvalue.memory_address.value + 1) * 0x100));
|
(GB_read_memory(gb, lvalue.memory_address.value + 1) * 0x100));
|
||||||
|
|
||||||
|
case LVALUE_REG16:
|
||||||
|
return VALUE_16(*lvalue.register_address);
|
||||||
|
|
||||||
case LVALUE_REG_L:
|
case LVALUE_REG_L:
|
||||||
return VALUE_16(*lvalue.register_address & 0x00FF);
|
return VALUE_16(*lvalue.register_address & 0x00FF);
|
||||||
|
|
||||||
case LVALUE_REG_H:
|
case LVALUE_REG_H:
|
||||||
return VALUE_16(*lvalue.register_address >> 8);
|
return VALUE_16(*lvalue.register_address >> 8);
|
||||||
|
|
||||||
case LVALUE_REG16:
|
|
||||||
default:
|
|
||||||
return VALUE_16(*lvalue.register_address);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return VALUE_16(*lvalue.register_address);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void write_lvalue(GB_gameboy_t *gb, lvalue_t lvalue, uint16_t value)
|
static void write_lvalue(GB_gameboy_t *gb, lvalue_t lvalue, uint16_t value)
|
||||||
|
Loading…
Reference in New Issue
Block a user