mirror of
https://github.com/open-goal/jak-project
synced 2026-08-14 12:34:36 -04:00
b6f0ef52b3
Fixes for the functions that weren't decompiled. `initialize` in `game-info.gc` was fixed manually.
430 lines
13 KiB
JSON
430 lines
13 KiB
JSON
{
|
|
////////////////////////////
|
|
// HACKS and ASM FUNCTIONS
|
|
////////////////////////////
|
|
|
|
"types_with_bad_inspect_methods": [
|
|
"game-task-event",
|
|
"game-task-control",
|
|
"predator-edge",
|
|
"manipy"
|
|
],
|
|
|
|
"no_type_analysis_functions_by_name": [],
|
|
|
|
// this limits the number of cases in a cond. The first argument is the name of the function.
|
|
// the second argument is the name of the first condition in the cond. Use print_cfg to find it out.
|
|
// The third argument is the number of cases. If you set it too small it may fail to build the CFG.
|
|
"cond_with_else_max_lengths": [
|
|
["(method 20 res-lump)", "b0", 2],
|
|
["(method 11 res-lump)", "b0", 1],
|
|
["(method 12 res-lump)", "b0", 1]
|
|
],
|
|
|
|
// if a cond with an else case is being used a value in a place where it looks wrong
|
|
// you can add the function name to this list and it will more aggressively reject this rewrite.
|
|
"aggressively_reject_cond_to_value_rewrite": [
|
|
"(method 10 res-lump)",
|
|
"(method 11 res-lump)",
|
|
"(method 12 res-lump)"
|
|
],
|
|
|
|
// this provides a hint to the decompiler that these functions will have a lot of inline assembly.
|
|
// currently it just leaves pcpyld as an asm op.
|
|
"hint_inline_assembly_functions": [],
|
|
|
|
"asm_functions_by_name": [
|
|
// checking boxed type is different now - these make the cfg stuff sad
|
|
"name=",
|
|
"cspace-inspect-tree",
|
|
"(method 77 spyder)",
|
|
"(method 77 flamer)",
|
|
"(method 77 grenadier)",
|
|
"(method 224 bot)",
|
|
"(method 77 rapid-gunner)",
|
|
// until loop without nop:
|
|
"process-drawable-shock-skel-effect",
|
|
"target-history-print",
|
|
"display-list-control",
|
|
"anim-test-anim-list-handler",
|
|
"anim-test-sequence-list-handler",
|
|
"anim-tester-get-playing-item",
|
|
"(method 58 nav-graph-editor)",
|
|
"(method 120 enemy)",
|
|
"start-pilot-recorder",
|
|
"(anon-function 10 pilot-recorder)",
|
|
"(method 0 hover-nav-control)",
|
|
"(method 24 nav-network)",
|
|
"(method 11 predator-manager)",
|
|
"(method 9 bot-speech-list)",
|
|
"(method 9 bot-speech-list-shuffle)",
|
|
"(anon-function 10 sig-recorder)",
|
|
"(method 14 trail-graph)",
|
|
"(method 12 trail-graph)",
|
|
"(method 11 trail-graph)",
|
|
// actual asm
|
|
"quad-copy!",
|
|
"return-from-thread",
|
|
"return-from-thread-dead",
|
|
"reset-and-call",
|
|
"(method 10 cpu-thread)",
|
|
"(method 11 cpu-thread)",
|
|
"(method 0 catch-frame)",
|
|
"throw-dispatch",
|
|
"throw",
|
|
"run-function-in-process",
|
|
"set-to-run-bootstrap",
|
|
"return-from-exception",
|
|
"exp",
|
|
"(method 17 bounding-box)",
|
|
"(method 9 bounding-box)",
|
|
"(method 9 matrix)",
|
|
"quaternion->matrix-2",
|
|
"sin-rad",
|
|
"cos-rad",
|
|
"atan-series-rad",
|
|
"sign-float",
|
|
"dma-count-until-done",
|
|
"(method 11 collide-mesh-cache)",
|
|
"cpu-delay",
|
|
"qword-read-time",
|
|
"dma-test-func",
|
|
"move-test-func",
|
|
|
|
"symlink2",
|
|
"blerc-a-fragment",
|
|
"blerc-execute",
|
|
"foreground-check-longest-edge-asm",
|
|
"generic-light-proc",
|
|
"shadow-add-single-edges",
|
|
"shadow-add-facing-single-tris",
|
|
"shadow-add-double-tris",
|
|
"shadow-add-double-edges",
|
|
"(method 12 collide-mesh)",
|
|
"(method 17 collide-edge-work)",
|
|
"(method 42 collide-shape)",
|
|
"(method 12 collide-shape-prim-sphere)",
|
|
"(method 12 collide-shape-prim-mesh)",
|
|
"(method 18 collide-shape-prim-mesh)",
|
|
"(method 10 collide-cache-prim)",
|
|
"(method 17 collide-cache)",
|
|
"(method 16 ocean)",
|
|
|
|
// unknown instructions
|
|
"debug-line-clip?",
|
|
// logand with #f arg
|
|
"bugfix?",
|
|
// CFG failed
|
|
"draw-inline-array-instance-shrub",
|
|
|
|
"target-land-effect",
|
|
"target-standard-event-handler",
|
|
"(method 12 effect-control)",
|
|
"(method 11 effect-control)",
|
|
"(method 10 effect-control)",
|
|
"(anon-function 2 scene)",
|
|
"(method 10 bigmap)",
|
|
"(method 9 editable-region)", // condition branch assert hit
|
|
"(method 57 enemy)",
|
|
"(anon-function 10 meet-brutter)",
|
|
"(method 154 vehicle-racer)",
|
|
"(method 188 predator)",
|
|
"(anon-function 13 sig0-course)",
|
|
"(method 228 hal-sewer)",
|
|
"(method 154 vehicle-city-racer)",
|
|
"(method 53 squid)",
|
|
"(anon-function 11 fort-floor-spike)",
|
|
"(method 29 gun-dummy)",
|
|
"vehicle-explode-post",
|
|
"(method 158 vehicle-guard)",
|
|
"(method 207 metalhead-predator)",
|
|
"(anon-function 4 gun-states)",
|
|
"(anon-function 28 grenadier)",
|
|
"(anon-function 24 grenadier)",
|
|
// texture
|
|
"adgif-shader<-texture!"
|
|
],
|
|
|
|
// these functions use pairs and the decompiler
|
|
// will be less picky about types related to pairs.
|
|
"pair_functions_by_name": [
|
|
"ref",
|
|
"(method 4 pair)",
|
|
"last",
|
|
"member",
|
|
"nmember",
|
|
"assoc",
|
|
"assoce",
|
|
"nassoc",
|
|
"nassoce",
|
|
"append!",
|
|
"delete!",
|
|
"delete-car!",
|
|
"insert-cons!",
|
|
"sort",
|
|
"unload-package",
|
|
"display-loop-main",
|
|
"lookup-level-info",
|
|
"(method 24 level-group)",
|
|
"(method 19 level-group)",
|
|
// script
|
|
"command-get-time",
|
|
"command-get-param",
|
|
"command-get-quoted-param",
|
|
"command-get-entity",
|
|
"(method 9 script-context)",
|
|
"(anon-function 6 script)",
|
|
"(anon-function 49 script)",
|
|
"(anon-function 52 script)",
|
|
"(anon-function 72 script)",
|
|
"(anon-function 73 script)",
|
|
"(anon-function 74 script)",
|
|
"(anon-function 75 script)",
|
|
"(anon-function 76 script)",
|
|
"(anon-function 80 script)",
|
|
"(method 11 script-context)",
|
|
"(method 10 script-context)",
|
|
"command-get-trans",
|
|
"key-assoc",
|
|
"(anon-function 0 script)",
|
|
// default-menu
|
|
"dm-scene-load-pick-func",
|
|
"debug-menu-make-continue-sub-menu",
|
|
"debug-menu-make-from-template",
|
|
"debug-menu-context-make-default-menus",
|
|
"debug-menu-make-task-menu",
|
|
"(method 19 gui-control)",
|
|
// menu
|
|
"debug-menu-rebuild",
|
|
"debug-menu-find-from-template",
|
|
"debug-menu-render",
|
|
"debug-menu-context-select-next-or-prev-item",
|
|
"debug-menu-context-select-new-item",
|
|
"debug-menu-send-msg",
|
|
// airlock
|
|
"(method 24 com-airlock)",
|
|
"(method 19 gui-control)",
|
|
"(method 28 editable)",
|
|
"execute-select",
|
|
"(method 29 editable)",
|
|
"(method 25 editable)",
|
|
// game-info
|
|
"(method 20 game-info)",
|
|
"print-continues",
|
|
// task-control
|
|
"(anon-function 55 task-control)",
|
|
"(method 17 load-state)",
|
|
"(method 12 level)",
|
|
"bg",
|
|
"update-sound-banks",
|
|
"entity-remap-names",
|
|
"(method 8 process-tree)",
|
|
"(post play-anim scene-player)",
|
|
"(method 25 scene-player)",
|
|
"(method 25 scene-player)"
|
|
],
|
|
|
|
// If format is used with the wrong number of arguments,
|
|
// it will often mess up the decompilation, as the decompiler assumes
|
|
// that they used the correct number. This will override the decompiler's
|
|
// automatic detection.
|
|
"bad_format_strings": {
|
|
"~170h~5d~220h~5d~280h~5,,2f": 3,
|
|
"~338h~5d~388h~5d~448h~5,,2f": 3,
|
|
"~30Htf: ~8D~134Hpr: ~8D~252Hsh: ~8D~370Hhd: ~8D~%": 4,
|
|
"~30Hal: ~8D~131Hwa: ~8D~252Hsp: ~8D~370Hwp: ~8D~%": 4,
|
|
"ERROR: <asg> ~A in spool anim loop for ~A ~D, but not loaded.~": 3,
|
|
// TODO - these should be automatic
|
|
" tfrag ~192H~5DK ~280Htfragment~456H~5DK~%": 2,
|
|
" tie-proto ~192H~5DK ~280Hsky~456H~5DK~%": 2,
|
|
" tie-instance ~192H~5DK ~280Htie-fragment~456H~5DK~%": 2,
|
|
" shrub-proto ~192H~5DK ~280Htie-scissor~456H~5DK~%": 2,
|
|
" shrub-instance ~192H~5DK ~280Hshrubbery~456H~5DK~%": 2,
|
|
" collision ~192H~5DK ~280Htie-generic~456H~5DK~%": 2,
|
|
" pris-anim ~192H~5DK ~280Hpris-generic~456H~5DK~%": 2,
|
|
" textures ~192H~5DK ~280Htextures~456H~5DK~%": 2,
|
|
" misc ~192H~5DK ~280Hsprite~456H~5DK~%": 2,
|
|
" entity ~192H~5DK~%": 1,
|
|
" pris-geo ~192H~5DK ~280Hpris-fragment~456H~5DK~%": 2,
|
|
"~33L~S~32L ~S": 2,
|
|
"~32L~S ~33L~S~1L": 2,
|
|
"~35L~S~33L ~S": 2,
|
|
"~1L~S~35L ~S": 2,
|
|
"~35L~S ~1L~S~1L": 2,
|
|
"~33L~S~35L ~S": 2,
|
|
"~33L~C~34L~S~33L~C": 3,
|
|
"~35L~S ~33L~S~1L": 2,
|
|
"~33L~S ~35L~S~1L": 2,
|
|
"~33L~C": 1
|
|
},
|
|
|
|
"blocks_ending_in_asm_branch": {
|
|
"closest-pt-in-triangle": [17],
|
|
// this one is all asm branches
|
|
"circle-circle-xz-intersect": [
|
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
|
|
],
|
|
"load-game-text-info": [15, 16, 17, 19, 20, 21],
|
|
|
|
"find-knot-span": [0, 1, 2, 3, 5, 6, 7, 8, 9],
|
|
|
|
"curve-evaluate!": [0, 2, 5, 6, 7, 8, 9],
|
|
|
|
"display-loop-main": [127, 130, 133, 136],
|
|
|
|
"real-main-draw-hook": [114, 115, 116, 118],
|
|
|
|
"sprite-draw-distorters": [4, 5],
|
|
"draw-drawable-tree-instance-shrub": [5, 7, 9, 11],
|
|
|
|
"add-debug-box-with-transform": [0, 3],
|
|
"add-debug-line-sphere": [0],
|
|
|
|
"(method 12 perf-stat)": [0],
|
|
"(method 11 perf-stat)": [0],
|
|
"(method 22 gui-control)": [117, 121, 127, 128, 129, 139],
|
|
"bsp-camera-asm": [1, 2, 3, 4, 6, 7],
|
|
"(method 9 texture-page-dir)": [5, 6],
|
|
"level-remap-texture": [2, 3, 4, 5, 6],
|
|
"(method 27 nav-mesh)": [0, 1, 2, 4, 5],
|
|
"(method 31 nav-mesh)": [0, 1, 2, 7, 8, 9, 11, 12, 13, 15],
|
|
"(method 45 nav-mesh)": [1, 4, 5, 8],
|
|
"(method 46 nav-mesh)": [1, 2, 3, 5],
|
|
"(method 32 nav-mesh)": [0, 1, 2, 4],
|
|
"(method 33 nav-mesh)": [0, 1, 2, 4],
|
|
"(method 42 nav-mesh)": [1, 2, 3, 7],
|
|
"point-poly-distance-min": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
"(method 34 nav-mesh)": [1, 2, 3, 7],
|
|
"(method 35 nav-mesh)": [2, 4],
|
|
"(method 18 mysql-nav-graph)": [0, 1, 3, 4, 5, 9],
|
|
"draw-actor-marks": [8],
|
|
"find-nearest-entity": [7, 9, 10, 11, 12, 13, 14],
|
|
"start-perf-stat-collection": [26],
|
|
"end-perf-stat-collection": [0],
|
|
"upload-vis-bits": [2, 6, 3, 0],
|
|
"set-background-regs!": [4, 3],
|
|
"draw-drawable-tree-instance-tie": [21, 23, 31, 33],
|
|
"command-get-process": [43],
|
|
"unpack-comp-rle": [1, 3, 5, 6],
|
|
"(method 16 level)": [0, 1, 5, 13, 14, 15],
|
|
"unpack-comp-huf": [2, 4, 5, 6, 7, 8, 9],
|
|
"unpack-comp-lzo": [
|
|
0,
|
|
1,
|
|
4,
|
|
5,
|
|
6,
|
|
7,
|
|
15,
|
|
16,
|
|
17,
|
|
18,
|
|
19,
|
|
20,
|
|
21,
|
|
22,
|
|
23,
|
|
24,
|
|
25,
|
|
26,
|
|
27,
|
|
28,
|
|
29,
|
|
30,
|
|
31,
|
|
32,
|
|
33,
|
|
34,
|
|
35, // branch fwd 39
|
|
39, // branch fwd no delay
|
|
43, // goto 18
|
|
45 // goto 6
|
|
],
|
|
"(method 27 conveyor)": [5, 14, 22],
|
|
"(method 44 nav-graph)": [1, 3, 6, 13, 17],
|
|
"(method 11 sparticle-launch-control)": [
|
|
18, 24, 25, 28, 29, 32, 33, 34, 36, 41, 55, 58, 93, 95
|
|
],
|
|
|
|
"(method 22 gui-control)": [
|
|
10, // goto L63 (B39)
|
|
16, // goto L58 (B27)
|
|
26, // goto L62 (B)
|
|
27, // goto L62
|
|
28, // goto L61
|
|
35, // goto L62
|
|
36, // goto L62
|
|
38, // goto L99
|
|
42, // goto L89
|
|
50, // goto L84
|
|
108, // goto L86
|
|
110, // goto L86
|
|
116, // goto L99
|
|
117, // goto L91
|
|
120
|
|
]
|
|
// "(method 67 collide-shape-moving)": [1, 7, 9, 10, 11, 12] - TODO
|
|
},
|
|
|
|
// Sometimes the game might use format strings that are fetched dynamically,
|
|
// for example using the game text lookup method
|
|
// Add information about those format instructions here.
|
|
// e.g. "function-name":[[op, argc], [op, argc], ...]
|
|
// where "op" is the op number for the call to format.
|
|
"dynamic_format_arg_counts": {
|
|
"(method 10 menu-loading-option)": [[118, 1]],
|
|
"(method 10 menu-insufficient-space-option)": [
|
|
[63, 1],
|
|
[103, 1]
|
|
],
|
|
"(method 10 menu-secrets-insufficient-space-option)": [[55, 1]],
|
|
"(method 10 menu-card-removed-option)": [[48, 1]],
|
|
"(method 10 menu-format-card-option)": [[49, 1]],
|
|
"(method 10 menu-create-game-option)": [[49, 1]],
|
|
"(method 10 menu-error-auto-saving-option)": [[72, 1]],
|
|
"(method 10 menu-error-loading-option)": [
|
|
[64, 1],
|
|
[99, 1]
|
|
],
|
|
"(method 10 menu-insert-card-option)": [[48, 1]],
|
|
"(method 16 fail-mission)": [
|
|
[68, 1],
|
|
[101, 1],
|
|
[130, 1]
|
|
]
|
|
},
|
|
|
|
"mips2c_functions_by_name": [
|
|
"collide-do-primitives",
|
|
"moving-sphere-triangle-intersect",
|
|
"calc-animation-from-spr",
|
|
"draw-string-asm",
|
|
"draw-string",
|
|
"get-string-length",
|
|
"adgif-shader<-texture-with-update!",
|
|
"init-boundary-regs",
|
|
"draw-boundary-polygon",
|
|
"render-boundary-quad",
|
|
"render-boundary-tri",
|
|
"clip-polygon-against-negative-hyperplane",
|
|
"clip-polygon-against-positive-hyperplane",
|
|
"sp-init-fields!",
|
|
"particle-adgif",
|
|
"sp-launch-particles-var",
|
|
"sparticle-motion-blur",
|
|
"sp-process-block-2d",
|
|
"sp-process-block-3d"
|
|
],
|
|
|
|
"mips2c_jump_table_functions": {},
|
|
|
|
// there are some missing textures. I don't know what the game actually does here.
|
|
// the format for entries is [level, tpage, index]
|
|
"missing_textures": [],
|
|
|
|
// some object files have garbage pad data at the end which makes the decompiler
|
|
// assume they must be different files, such as the art group for orb-cache-top.
|
|
// this just suppresses a message.
|
|
"expected_merged_objs": []
|
|
}
|