[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!

![image](https://user-images.githubusercontent.com/48171810/189505469-941b4a3e-23c7-4740-aa1b-2e461ed19fa9.png)

fixes https://github.com/open-goal/jak-project/issues/1850
This commit is contained in:
water111
2022-09-11 14:17:55 -04:00
committed by GitHub
parent 017070525a
commit 4eea31c3e9
111 changed files with 9110 additions and 3789 deletions
+6 -2
View File
@@ -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);
}