mirror of
https://github.com/open-goal/jak-project
synced 2026-08-10 03:06:18 -04:00
[jak 2] texture (#1866)
- Decompile and patch `texture.gc` for PC - Improve decompiler when offset doesn't fit in immediate (for types larger than 8k and some scratchpad accesses) - Fix symbol->string issues in both jak 1 and 2 - Fix bug with VIF interrupt used to profile VU code (hooked up to OpenGLRenderer BucketRenderers in PC port) - Support `~o` in `format`. - Uncomment stuff in `merc.gc` that now works!  fixes https://github.com/open-goal/jak-project/issues/1850
This commit is contained in:
@@ -859,9 +859,13 @@ Form* cast_to_bitfield(const BitFieldType* type_info,
|
||||
// check if it's just a constant:
|
||||
auto in_as_atom = form_as_atom(in);
|
||||
if (in_as_atom && in_as_atom->is_int()) {
|
||||
s64 val = in_as_atom->get_int();
|
||||
if (type_info->get_name() == "gif-tag-regs" && (u64)val == 0xeeeeeeeeeeeeeeee) {
|
||||
return pool.form<ConstantTokenElement>("GIF_REGS_ALL_AD");
|
||||
}
|
||||
|
||||
// will always be 64-bits
|
||||
auto fields =
|
||||
try_decompile_bitfield_from_int(typespec, env.dts->ts, in_as_atom->get_int(), false, {});
|
||||
auto fields = try_decompile_bitfield_from_int(typespec, env.dts->ts, val, false, {});
|
||||
if (!fields) {
|
||||
return pool.form<CastElement>(typespec, in);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user