mirror of
https://github.com/open-goal/jak-project
synced 2026-08-11 19:39:38 -04:00
[decomp] better handling of animation code and art files (#1352)
* update refs * [decompiler] read and process art groups * finish decompiler art group selection & detect in `ja-group?` * make art stuff work on offline tests! * [decompiler] detect `ja-group!` (primitive) * corrections. * more * use new feature on skel groups! * find `loop!` as well * fully fledged `ja` macro & decomp + `loop` detect * fancy fixed point printing! * update source * `:num! max` (i knew i should've done this) * Update jak1_ntsc_black_label.jsonc * hi imports * make compiling the game work * fix `defskelgroup` * clang * update refs * fix chan * fix seek and finalboss * fix tests * delete unused function * track let rewrite stats * reorder `rewrite_let` * Update .gitattributes * fix bug with `:num! max` * Update robotboss-part.gc * Update goal-lib.gc * document `ja` * get rid of pc fixes thing * use std::abs
This commit is contained in:
@@ -1274,16 +1274,8 @@ goos::Object decompile_value(const TypeSpec& type,
|
||||
s64 value;
|
||||
memcpy(&value, bytes.data(), 8);
|
||||
|
||||
// only rewrite if exact.
|
||||
s64 seconds_int = value / (s64)TICKS_PER_SECOND;
|
||||
if (seconds_int * (s64)TICKS_PER_SECOND == value) {
|
||||
return pretty_print::to_symbol(fmt::format("(seconds {})", seconds_int));
|
||||
}
|
||||
double seconds = (double)value / TICKS_PER_SECOND;
|
||||
if (seconds * TICKS_PER_SECOND == value) {
|
||||
return pretty_print::to_symbol(fmt::format("(seconds {})", float_to_string(seconds, false)));
|
||||
}
|
||||
return pretty_print::to_symbol(fmt::format("#x{:x}", value));
|
||||
return pretty_print::to_symbol(
|
||||
fmt::format("(seconds {})", fixed_point_to_string(value, TICKS_PER_SECOND)));
|
||||
} else if (ts.tc(TypeSpec("uint64"), type)) {
|
||||
ASSERT(bytes.size() == 8);
|
||||
u64 value;
|
||||
|
||||
Reference in New Issue
Block a user