Skip to content

Commit

Permalink
Decompile font, decomp, background, shrubbery (#3428)
Browse files Browse the repository at this point in the history
  • Loading branch information
water111 authored Mar 17, 2024
1 parent 13def9a commit f7bfc8c
Show file tree
Hide file tree
Showing 51 changed files with 13,075 additions and 399 deletions.
334 changes: 173 additions & 161 deletions decompiler/config/jak3/all-types.gc

Large diffs are not rendered by default.

45 changes: 42 additions & 3 deletions decompiler/config/jak3/ntsc_v1/hacks.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,45 @@
"add-debug-box-with-transform": [0, 3],
"add-debug-line-sphere": [0],
"bones-mtx-calc-execute": [19, 7],
"foreground-draw": [0, 1, 126]
"foreground-draw": [0, 1, 126],
"unpack-comp-rle": [1, 3, 5, 6],
"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 16 level)": [0, 1, 5, 13, 14, 15],
"upload-vis-bits": [2, 6, 3, 0],
"set-background-regs!": [4, 3],
"draw-drawable-tree-instance-shrub": [5, 7, 9, 11]
},

// Sometimes the game might use format strings that are fetched dynamically,
Expand All @@ -294,7 +332,7 @@
"moving-sphere-triangle-intersect",
"calc-animation-from-spr",
"draw-string-asm",
"draw-string",
// "draw-string",
"get-string-length",
"adgif-shader<-texture-with-update!",
"init-boundary-regs",
Expand Down Expand Up @@ -414,7 +452,8 @@
"generic-warp-envmap-dest",
"generic-no-light-proc",
"(method 21 cloth-system)",
"debug-line-clip?"
"debug-line-clip?",
"(method 9 font-work)"
],

"mips2c_jump_table_functions": {},
Expand Down
12 changes: 12 additions & 0 deletions decompiler/config/jak3/ntsc_v1/label_types.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -318,5 +318,17 @@
"foreground": [
["L215", "(pointer bucket-id-16)", 462],
["L214", "vector"]
],
"font-data": [
["L1", "(inline-array vector)", 250],
["L2", "(inline-array vector)", 250]
],
"shrubbery": [
["L155", "(pointer bucket-id)", 12],
["L152", "(pointer bucket-id)", 12],
["L151", "(pointer bucket-id)", 12],
["L150", "(pointer bucket-id)", 12],
["L153", "(pointer bucket-id)", 12]

]
}
112 changes: 111 additions & 1 deletion decompiler/config/jak3/ntsc_v1/type_casts.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -2495,5 +2495,115 @@
[[340, 364], "v1", "(pointer uint8)"],
[364, "v1", "(pointer uint8)"],
[[365, 372], "v1", "(pointer uint8)"]
]
],
"generic-work-init": [
[4, "a0", "generic-work"],
[[9, 19], "a0", "generic-work"],
[23, "a1", "generic-work"]
],
"generic-initialize-without-sync": [
[8, "a0", "generic-work"],
[21, "a0", "generic-work"]
],
"generic-initialize": [
[8, "a0", "generic-work"],
[21, "a0", "generic-work"]
],
"generic-wrapup": [
[1, "v1", "generic-work"],
[4, "v1", "generic-work"]
],
"generic-warp-source": [[2, "at", "generic-work"]],
"(method 9 font-work)": [
[16, "t0", "(pointer uint32)"],
[47, "a2", "(pointer uint32)"],
[49, "a2", "(pointer uint32)"],
[51, "a2", "(pointer uint32)"],
[53, "a2", "(pointer uint32)"]
],
"unpack-comp-rle": [[[10, 26], "a0", "(pointer int8)"]],
"unpack-comp-huf": [[[21, 23], "t3", "(pointer uint16)"]],
"(method 16 level)": [
[222, "v1", "(pointer uint128)"],
[223, "a1", "(pointer uint128)"],
[225, "a0", "(pointer uint128)"],
[[71, 168], "s1", "(pointer int8)"],
[72, "v1", "(pointer int8)"],
[[74, 169], "s0", "(pointer int8)"],
[[170, 193], "s1", "(pointer uint8)"],
[[171, 193], "s2", "(pointer uint8)"],
[227, "v1", "(pointer uint8)"]
],
"upload-vis-bits": [
[14, "a1", "(pointer uint128)"],
[[8, 35], "a2", "(pointer uint128)"]
],
"finish-background": [
[900, "t4", "(pointer int32)"],
[963, "t4", "(pointer int32)"],
[1026, "t4", "(pointer int32)"],
[1089, "t3", "(pointer int32)"]
],
"(method 16 drawable-inline-array-node)": [[[1, 7], "v1", "draw-node"]],
"(method 9 shrubbery)": [
[23, "a2", "(pointer int32)"],
[28, "a3", "(pointer int32)"]
],
"shrub-upload-view-data": [[[3, 17], "a0", "dma-packet"]],
"shrub-do-init-frame": [
[[12, 21], "a0", "dma-packet"],
[[26, 29], "a0", "dma-packet"],
[33, "v1", "(pointer vif-tag)"],
[[35, 41], "v1", "(pointer uint32)"],
[42, "v1", "(pointer vif-tag)"],
[[44, 51], "v1", "(pointer uint32)"],
[52, "v1", "(pointer vif-tag)"],
[54, "v1", "(pointer uint32)"]
],
"shrub-init-frame": [
[[8, 12], "a0", "dma-packet"],
[[18, 21], "a0", "gs-gif-tag"],
[24, "v1", "(pointer gs-test)"],
[26, "v1", "(pointer gs-reg64)"]
],
"shrub-upload-model": [
[[17, 26], "a3", "dma-packet"],
[[33, 41], "a0", "dma-packet"],
[[47, 55], "a0", "dma-packet"]
],
"draw-prototype-inline-array-shrub": [
[387, "a0", "prototype-shrubbery"],
[481, "v1", "prototype-shrubbery"],
[[637, 646], "a1", "prototype-bucket-shrub"],
[[301, 392], "s1", "prototype-bucket-shrub"],
[[470, 515], "s1", "prototype-bucket-shrub"],
[[470, 658], "gp", "prototype-bucket-shrub"],
[[13, 56], "v1", "prototype-bucket-shrub"]
// [[102, 114], "a0", "shrub-near-packet"],
// [[114, 117], "v1", "vector4w-3"],
// [118, "a1", "vector4w"],
// [123, "v1", "dma-packet"],
// [[124, 126], "v1", "vector4w"],
// [[334, 364], "s1", "prototype-bucket-shrub"],
// [416, "a0", "drawable-group"],
// [420, "s1", "prototype-bucket-shrub"],
// [525, "v1", "drawable-group"],
// [[518, 535], "s1", "prototype-bucket-shrub"],
// [558, "s1", "prototype-bucket-shrub"],
// [[677, 718], "gp", "prototype-bucket-shrub"],
// [[696, 706], "a1", "prototype-bucket-shrub"]
],
"(method 8 drawable-tree-instance-shrub)": [[51, "v1", "drawable-group"]],
"(method 13 drawable-tree-instance-shrub)": [
[[12, 151], "gp", "prototype-bucket-shrub"],
[19, "a1", "drawable-group"],
[45, "v1", "drawable-group"],
[67, "s3", "shrubbery"],
[93, "v1", "drawable-group"],
[115, "s3", "shrubbery"],
[161, "gp", "(inline-array prototype-bucket-shrub)"]
],
"draw-drawable-tree-instance-shrub": [[86, "a0", "drawable-group"]]


}
2 changes: 2 additions & 0 deletions game/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ set(RUNTIME_SOURCE
mips2c/jak2_functions/vortex.cpp
mips2c/jak3_functions/collide_func.cpp
mips2c/jak3_functions/debug.cpp
mips2c/jak3_functions/font.cpp
mips2c/jak3_functions/generic_effect.cpp
mips2c/jak3_functions/lights.cpp
mips2c/jak3_functions/sky.cpp
mips2c/mips2c_table.cpp
Expand Down
Loading

0 comments on commit f7bfc8c

Please sign in to comment.