mirror of
https://github.com/open-goal/jak-project
synced 2026-09-02 18:12:50 -04:00
decomp: resolve first batch of trivial files (#4266)
This commit is contained in:
@@ -87,3 +87,4 @@ __pycache__/
|
||||
unifont-15.0.03.ttf
|
||||
*.diff
|
||||
goalc-report.html
|
||||
_new-all-types.gc
|
||||
@@ -96,6 +96,18 @@
|
||||
"jak3"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "default",
|
||||
"project": "CMakeLists.txt",
|
||||
"projectTarget": "offline-test.exe (bin\\offline-test.exe)",
|
||||
"name": "Tests - Offline Tests - Jak X",
|
||||
"args": [
|
||||
"--iso_data_path",
|
||||
"${workspaceRoot}/iso_data/jakx",
|
||||
"--game",
|
||||
"jakx"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "default",
|
||||
"project": "CMakeLists.txt",
|
||||
|
||||
@@ -135,6 +135,9 @@ tasks:
|
||||
decomp:
|
||||
cmds:
|
||||
- '{{.DECOMP_BIN_RELEASE_DIR}}/decompiler "./decompiler/config/{{.DECOMP_CONFIG}}" "./iso_data" "./decompiler_out" --version "{{.DECOMP_CONFIG_VERSION}}" --config-override ''{"decompile_code": true, "levels_extract": false}'''
|
||||
disasm-file:
|
||||
cmds:
|
||||
- '{{.DECOMP_BIN_RELEASE_DIR}}/decompiler "./decompiler/config/{{.DECOMP_CONFIG}}" "./iso_data" "./decompiler_out" --version "{{.DECOMP_CONFIG_VERSION}}" --config-override ''{"disassemble_code": true, "decompile_code": false, "levels_extract": false, "allowed_objects": ["{{.FILE}}"]}'''
|
||||
decomp-file:
|
||||
cmds:
|
||||
- '{{.DECOMP_BIN_RELEASE_DIR}}/decompiler "./decompiler/config/{{.DECOMP_CONFIG}}" "./iso_data" "./decompiler_out" --version "{{.DECOMP_CONFIG_VERSION}}" --config-override ''{"decompile_code": true, "levels_extract": false, "allowed_objects": ["{{.FILE}}"]}'''
|
||||
|
||||
@@ -669,7 +669,7 @@ void ObjectFileDB::write_disassembly(const fs::path& output_dir,
|
||||
|
||||
if (dump_function_metadata) {
|
||||
json data = file_func_metadata_map;
|
||||
file_util::write_text_file(output_dir / "func_metadata.json", data.dump(2));
|
||||
file_util::write_text_file(output_dir / "_func_metadata.json", data.dump(2));
|
||||
}
|
||||
|
||||
lg::info("Wrote functions dumps:");
|
||||
|
||||
@@ -110,13 +110,14 @@ void clean_up_cond_with_else(FormPool& pool, FormElement* ir, const Env& env) {
|
||||
*/
|
||||
void clean_up_until_loop(FormPool& pool, UntilElement* ir, const Env& env) {
|
||||
auto condition_branch = get_condition_branch(ir->condition);
|
||||
ASSERT(condition_branch.first);
|
||||
ASSERT_MSG(condition_branch.first, fmt::format("bad condition branch in {}\n", env.func->name()));
|
||||
if (condition_branch.first->op()->branch_delay().kind() != IR2_BranchDelay::Kind::NOP) {
|
||||
ASSERT_MSG(
|
||||
condition_branch.first->op()->branch_delay().kind() == IR2_BranchDelay::Kind::SET_REG_FALSE,
|
||||
fmt::format(
|
||||
"bad delay slot in until loop: {} in {}\n", env.func->name(),
|
||||
condition_branch.first->op()->branch_delay().to_form(env.file->labels, env).print()));
|
||||
"bad delay slot in until loop: {} in {}\n",
|
||||
condition_branch.first->op()->branch_delay().to_form(env.file->labels, env).print(),
|
||||
env.func->name()));
|
||||
ir->false_destination = condition_branch.first->op()->branch_delay().var(0);
|
||||
}
|
||||
auto replacement = condition_branch.first->op()->get_condition_as_form(pool, env);
|
||||
@@ -1974,7 +1975,8 @@ void clean_up_while_loops(FormPool& pool, Form* sequence, const Env& env) {
|
||||
|
||||
auto condition_branch = get_condition_branch(form_as_while->condition);
|
||||
|
||||
ASSERT(condition_branch.first);
|
||||
ASSERT_MSG(condition_branch.first,
|
||||
fmt::format("bad conditional branch in {}\n", env.func->name()));
|
||||
ASSERT(condition_branch.first->op()->branch_delay().kind() == IR2_BranchDelay::Kind::NOP);
|
||||
// printf("got while condition branch %s\n", condition_branch.first->print(file).c_str());
|
||||
auto replacement = condition_branch.first->op()->get_condition_as_form(pool, env);
|
||||
|
||||
@@ -7782,7 +7782,6 @@
|
||||
(load-buffer-mode level-memory-mode :offset-assert 4624) ;; guessed by decompiler
|
||||
(display-start-time uint64 :offset-assert 4632) ;; time-frame
|
||||
(memory-mask uint32 :offset-assert 4640)
|
||||
; (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read.
|
||||
(task-mask task-mask :offset-assert 4644)
|
||||
(tfrag-gs-test gs-test :offset-assert 4648)
|
||||
(texture-dirty-masks texture-mask 11 :inline :offset-assert 4656) ;; guessed by decompiler
|
||||
@@ -7808,9 +7807,7 @@
|
||||
(level-type type :offset-assert 5368) ;; guessed by decompiler
|
||||
(load-order uint64 :offset-assert 5376) ;; int64
|
||||
(eye-slot-lowres uint8 11 :offset-assert 5384)
|
||||
; (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read.
|
||||
(eye-slot-highres uint8 11 :offset-assert 5395)
|
||||
; (UNKNOWN UNKNOWN :offset-assert -1) ;; field could not be read.
|
||||
(unknown-pad uint8 14)
|
||||
)
|
||||
:method-count-assert 30
|
||||
@@ -15264,26 +15261,6 @@
|
||||
:flag-assert #x900000100
|
||||
)
|
||||
|
||||
#|
|
||||
(deftype gsf-vertex-array (UNKNOWN)
|
||||
((vtx gsf-vertex :dynamic :offset-assert 0) ;; guessed by decompiler
|
||||
)
|
||||
:method-count-assert 0
|
||||
:size-assert #x0
|
||||
:flag-assert #x0
|
||||
)
|
||||
|#
|
||||
|
||||
#|
|
||||
(deftype gsf-fx-vertex-array (UNKNOWN)
|
||||
((data gsf-fx-vertex :dynamic :offset-assert 0) ;; guessed by decompiler
|
||||
)
|
||||
:method-count-assert 0
|
||||
:size-assert #x0
|
||||
:flag-assert #x0
|
||||
)
|
||||
|#
|
||||
|
||||
(deftype gsf-vertex-array (structure)
|
||||
((vtx gsf-vertex :dynamic :offset-assert 0)
|
||||
)
|
||||
@@ -20818,6 +20795,7 @@
|
||||
;; joint-mod-h ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; +++joint-mod-h:joint-mod-mode
|
||||
(defenum joint-mod-mode
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
@@ -20835,6 +20813,7 @@
|
||||
(foot-rot)
|
||||
(joint-set-world)
|
||||
)
|
||||
;; ---joint-mod-h:joint-mod-mode
|
||||
|
||||
;; +++joint-mod-h:track-mode
|
||||
(defenum track-mode
|
||||
@@ -20850,6 +20829,7 @@
|
||||
)
|
||||
;; ---joint-mod-h:track-mode
|
||||
|
||||
;; +++joint-mod-h:joint-mod-ik-flags
|
||||
(defenum joint-mod-ik-flags
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
@@ -20857,6 +20837,7 @@
|
||||
(elbow-trans-neg)
|
||||
(elbow-rot-neg)
|
||||
)
|
||||
;; ---joint-mod-h:joint-mod-ik-flags
|
||||
|
||||
(deftype joint-mod (basic)
|
||||
"Utility to modify a joint transform from code, rather than just getting it from animation.
|
||||
@@ -21045,7 +21026,6 @@
|
||||
)
|
||||
|
||||
;; added - I really have no idea what is going on here
|
||||
|
||||
(deftype joint-mod-blend-world-work (structure)
|
||||
((mat1 matrix :inline)
|
||||
(mat2 matrix :inline)
|
||||
|
||||
@@ -1943,7 +1943,7 @@
|
||||
"(code wait title-control)": [[16, "event-message-block"]],
|
||||
"(code startup title-control)": [
|
||||
[16, ["array", "symbol", 10]],
|
||||
[64, "event-message-block"], // this memory is reused as both mc-slot-info and event-message-block
|
||||
[64, "event-message-block"],
|
||||
[368, ["array", "symbol", 10]]
|
||||
],
|
||||
"(method 9 nav-node)": [[48, ["inline-array", "vector", 2]]],
|
||||
|
||||
@@ -211,7 +211,6 @@
|
||||
"dma-buffer-patch-buckets": [
|
||||
[[3, 34], "a0", "dma-bucket"],
|
||||
[[34, 38], "a0", "dma-packet"]
|
||||
// [34, "a0", "(inline-array dma-bucket)"]
|
||||
],
|
||||
"disasm-dma-list": [
|
||||
[43, "v1", "dma-packet"],
|
||||
@@ -255,11 +254,7 @@
|
||||
[37, "t0", "(pointer int32)"]
|
||||
],
|
||||
"texture-page-dir-inspect": [[[137, 138], "v1", "adgif-shader"]],
|
||||
"(method 24 texture-pool)": [
|
||||
[[77, 100], "a1", "adgif-shader"]
|
||||
// [[70, 93], "a1", "adgif-shader"],
|
||||
// [92, "a1", "adgif-shader"]
|
||||
],
|
||||
"(method 24 texture-pool)": [[[77, 100], "a1", "adgif-shader"]],
|
||||
"(method 8 res-lump)": [
|
||||
[258, "s0", "array"],
|
||||
[[157, 239], "s0", "(array object)"]
|
||||
@@ -509,7 +504,7 @@
|
||||
],
|
||||
"merc-edge-stats": [[31, "v1", "merc-ctrl"]],
|
||||
"(method 8 merc-ctrl)": [
|
||||
[46, "s2", "pointer"], // was merc-fragment-control
|
||||
[46, "s2", "pointer"],
|
||||
[[22, 45], "s2", "merc-fragment-control"],
|
||||
[[89, 93], "a1", "merc-blend-ctrl"],
|
||||
[103, "a1", "pointer"]
|
||||
@@ -2119,8 +2114,6 @@
|
||||
[[14, 31], "s5", "adgif-shader"]
|
||||
],
|
||||
"add-debug-bound": [
|
||||
//[105, "v1", "dma-packet"],
|
||||
//[85, "a0", "dma-packet"],
|
||||
["_stack_", 16, "dma-packet"],
|
||||
[91, "v1", "dma-packet"]
|
||||
],
|
||||
@@ -2238,12 +2231,10 @@
|
||||
[789, "v1", "float"],
|
||||
[792, "v1", "float"],
|
||||
[794, "v0", "float"],
|
||||
// [784, "v1", "vector"],
|
||||
[589, "v1", "float"],
|
||||
[593, "v1", "float"],
|
||||
[602, "v1", "float"],
|
||||
[606, "v1", "float"]
|
||||
// [796, "v1", "float"]
|
||||
],
|
||||
"master-track-target": [
|
||||
[53, "gp", "process-focusable"],
|
||||
@@ -2552,19 +2543,6 @@
|
||||
[[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)": [
|
||||
@@ -4135,7 +4113,6 @@
|
||||
[191, "a3", "int"]
|
||||
],
|
||||
"(method 9 collide-cache)": [
|
||||
//[[28, 56], "gp", "collide-shape-prim"],
|
||||
[33, "gp", "collide-cache-prim"],
|
||||
[35, "gp", "collide-shape-prim"],
|
||||
[[50, 56], "gp", "collide-cache-prim"],
|
||||
@@ -4149,10 +4126,7 @@
|
||||
"command-get-float": [[20, "gp", "bfloat"]],
|
||||
"command-get-int": [[17, "gp", "bfloat"]],
|
||||
"(anon-function 2 memory-usage)": [[211, "v1", "collide-shape-moving"]],
|
||||
"(method 8 process-tree)": [
|
||||
[33, "v1", "symbol"]
|
||||
// [6, "a3", "symbol"]
|
||||
],
|
||||
"(method 8 process-tree)": [[33, "v1", "symbol"]],
|
||||
"(method 11 memory-usage-block)": [[112, "v1", "int"]],
|
||||
"(method 14 draw-control)": [
|
||||
[38, "t9", "(function object object object none)"]
|
||||
@@ -4328,7 +4302,6 @@
|
||||
[26, "a1", "(array int32)"],
|
||||
[28, "v1", "(array int32)"],
|
||||
[32, "a0", "(pointer int64)"],
|
||||
// [33, "a0", "(pointer int64)"],
|
||||
[44, "v1", "(pointer int32)"],
|
||||
[46, "v1", "(pointer int32)"]
|
||||
],
|
||||
@@ -9421,7 +9394,7 @@
|
||||
[226, "gp", "external-art-buffer"]
|
||||
],
|
||||
"(code startup title-control)": [
|
||||
[[59, 149], "gp", "mc-slot-info"], // (+ sp-0 64) is reused as both mc-slot-info and event-message-block
|
||||
[[59, 149], "gp", "mc-slot-info"],
|
||||
[354, "v1", "process-drawable"],
|
||||
[356, "s4", "quaternion"]
|
||||
],
|
||||
|
||||
+10907
-6302
File diff suppressed because it is too large
Load Diff
@@ -9,25 +9,7 @@
|
||||
// it will make the decompiler much faster.
|
||||
"allowed_objects": [],
|
||||
|
||||
// TODO - these objects currently cause various errors in the decompiler that need to be fixed
|
||||
// thankfully no header files so hopefully the impact on all-types is minimal
|
||||
"banned_objects": [
|
||||
"dma",
|
||||
"race-line",
|
||||
"merc-blend-shape",
|
||||
"foreground",
|
||||
"generic-effect",
|
||||
"shadow-cpu",
|
||||
"collide-mesh",
|
||||
"collide-shape",
|
||||
"collide-cache",
|
||||
"entity",
|
||||
"task-control",
|
||||
"net-mgr-medius-cache",
|
||||
"water-anim",
|
||||
"editable",
|
||||
"gstring"
|
||||
],
|
||||
"banned_objects": [],
|
||||
|
||||
////////////////////////////
|
||||
// CODE ANALYSIS OPTIONS
|
||||
@@ -64,17 +46,15 @@
|
||||
// write goal imports for the part group table
|
||||
"process_part_group_table": false,
|
||||
// write out a json file containing the art info mapping, run this with all objects allowed
|
||||
// TODO - rerun this once all objects can be allowed
|
||||
"dump_art_group_info": false,
|
||||
// write out a json file containing the joint node mapping, run this with all objects allowed
|
||||
// TODO - rerun this once all objects can be allowed
|
||||
"dump_joint_geo_info": false,
|
||||
// TODO - not done yet
|
||||
"dump_joint_geo_info": true,
|
||||
// write out a json file containing tpage and texture mappings, run with all objects allowed
|
||||
// TODO - rerun this once all objects can be allowed
|
||||
"dump_tex_info": false,
|
||||
// write out a json file containing the part group table, run with all objects allowed
|
||||
// TODO - re-run this once particle code has been decomped and once all objects can be allowed
|
||||
"dump_part_group_table": false,
|
||||
// TODO - not done yet
|
||||
"dump_part_group_table": true,
|
||||
|
||||
// set to false to skip adding .STR files to the decompiler database
|
||||
"read_spools": false,
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
{
|
||||
"profile": [[3, "(function profile-segment-array profile-collapse none)"]]
|
||||
}
|
||||
|
||||
@@ -8,15 +8,12 @@
|
||||
// so you only need to specify it when that's not the case.
|
||||
|
||||
// remap names for states and behaviors of these types
|
||||
"type_remap": {
|
||||
},
|
||||
"type_remap": {},
|
||||
|
||||
// remap names for types in an entire file (higher priority)
|
||||
"file_override": {
|
||||
},
|
||||
"file_override": {},
|
||||
|
||||
// some art groups (like robotboss-ag) have a name for their model that differs
|
||||
// from the usual ag-name + "-lod0". you can add those exceptions here.
|
||||
"joint_node_hacks": {
|
||||
}
|
||||
"joint_node_hacks": {}
|
||||
}
|
||||
|
||||
@@ -2,63 +2,131 @@
|
||||
////////////////////////////
|
||||
// HACKS and ASM FUNCTIONS
|
||||
////////////////////////////
|
||||
|
||||
"types_with_bad_inspect_methods": [
|
||||
],
|
||||
|
||||
"types_with_bad_inspect_methods": ["game-task-event", "game-task-control"],
|
||||
"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": [
|
||||
],
|
||||
|
||||
"cond_with_else_max_lengths": [],
|
||||
// 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": [
|
||||
],
|
||||
|
||||
"aggressively_reject_cond_to_value_rewrite": [],
|
||||
// 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=",
|
||||
// disabled to get decomp to work
|
||||
"water-anim-event-handler",
|
||||
"(anon-function 55 task-control)",
|
||||
"(method 22 level)",
|
||||
"(method 11 medius-cache)",
|
||||
"(method 13 race-line)",
|
||||
"(method 11 collide-mesh)",
|
||||
// dma
|
||||
"symlink2",
|
||||
// actual asm
|
||||
"quad-copy!",
|
||||
"sin-rad",
|
||||
"cos-rad",
|
||||
"atan-series-rad",
|
||||
"sign-float",
|
||||
"(method 9 matrix)",
|
||||
"quaternion->matrix-2",
|
||||
"vector-rotate-y-fast!",
|
||||
"(method 11 collide-mesh-cache)",
|
||||
"generic-light-proc",
|
||||
"dma-count-until-done"
|
||||
],
|
||||
|
||||
// these functions use pairs and the decompiler
|
||||
// will be less picky about types related to pairs.
|
||||
"pair_functions_by_name": [
|
||||
"ref",
|
||||
"ref&",
|
||||
"(method 4 pair)",
|
||||
"last",
|
||||
"member",
|
||||
"nmember",
|
||||
"assoc",
|
||||
"assoce",
|
||||
"nassoc",
|
||||
"nassoce",
|
||||
"append!",
|
||||
"delete!",
|
||||
"delete-car!",
|
||||
"insert-cons!",
|
||||
"sort"
|
||||
],
|
||||
|
||||
// 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
|
||||
},
|
||||
|
||||
"blocks_ending_in_asm_branch": {
|
||||
"sqlpipe-query": [21],
|
||||
"(method 9 editable-region)": [63],
|
||||
"find-nearest-entity": [7, 9],
|
||||
// collide-shape
|
||||
"(method 42 collide-shape)": [0, 1, 2, 3, 4, 7],
|
||||
"(method 18 collide-shape-prim-mesh)": [2, 3, 4, 5, 6, 7],
|
||||
"(method 12 collide-shape-prim-sphere)": [
|
||||
1, 2, 3, 4, 5, 8, 10, 11, 13, 14, 15
|
||||
],
|
||||
"(method 12 collide-shape-prim-mesh)": [
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16
|
||||
],
|
||||
// collide-mesh
|
||||
"(method 11 collide-mesh)": [2, 4],
|
||||
"(method 12 collide-mesh-cache)": [0, 1, 2, 3, 4, 5],
|
||||
"(method 10 collide-mesh)": [2]
|
||||
},
|
||||
|
||||
// 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": {
|
||||
},
|
||||
|
||||
"dynamic_format_arg_counts": {},
|
||||
"mips2c_functions_by_name": [
|
||||
// collide-cache
|
||||
"(method 9 collide-cache-prim)",
|
||||
"(method 10 collide-cache-prim)",
|
||||
"(method 17 collide-cache)",
|
||||
// collide-mesh
|
||||
"(method 12 collide-mesh)",
|
||||
"(method 14 collide-mesh)",
|
||||
"(method 15 collide-mesh)",
|
||||
// shadow
|
||||
"shadow-execute",
|
||||
"shadow-add-double-edges",
|
||||
"shadow-add-single-edges",
|
||||
"shadow-add-facing-single-tris",
|
||||
"shadow-add-double-tris",
|
||||
"shadow-xform-verts",
|
||||
"shadow-calc-dual-verts",
|
||||
"shadow-scissor-edges",
|
||||
"shadow-scissor-top",
|
||||
"shadow-init-vars",
|
||||
"shadow-find-facing-single-tris",
|
||||
"shadow-find-single-edges",
|
||||
"shadow-find-facing-double-tris",
|
||||
"shadow-find-double-edges",
|
||||
"shadow-add-verts",
|
||||
"shadow-add-single-tris",
|
||||
// foreground
|
||||
"foreground-check-longest-edge-asm",
|
||||
"foreground-merc",
|
||||
// merc-blend-shape
|
||||
"blerc-a-fragment",
|
||||
"blerc-execute"
|
||||
],
|
||||
|
||||
"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": [
|
||||
],
|
||||
|
||||
"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.
|
||||
|
||||
@@ -13,373 +13,373 @@
|
||||
// "CGO/COMMON.CGO",
|
||||
// "CGO/ENGINE.CGO",
|
||||
"CGO/KERNEL.CGO",
|
||||
"CGO/GAME.CGO"
|
||||
// "DGO/ASHCRED.DGO",
|
||||
// "DGO/ASHLEV.DGO",
|
||||
// "DGO/ASHVL.DGO",
|
||||
// "DGO/ASHVL2.DGO",
|
||||
// "DGO/ASHVL3.DGO",
|
||||
// "DGO/ATL.DGO",
|
||||
// "DGO/ATOLLART.DGO",
|
||||
// "DGO/ATOLLCTF.DGO",
|
||||
// "DGO/ATOLLS.DGO",
|
||||
// "DGO/ATOPLOW.DGO",
|
||||
// "DGO/ATX.DGO",
|
||||
// "DGO/BEARL.DGO",
|
||||
// "DGO/BOBCL.DGO",
|
||||
// "DGO/BRDROOM.DGO",
|
||||
// "DGO/BRDROOMF.DGO",
|
||||
// "DGO/CANFOOT.DGO",
|
||||
// "DGO/CANSPARS.DGO",
|
||||
// "DGO/CANSPARW.DGO",
|
||||
// "DGO/CANTBOX.DGO",
|
||||
// "DGO/CANYONS.DGO",
|
||||
// "DGO/CANYONTT.DGO",
|
||||
// "DGO/CANYONW.DGO",
|
||||
// "DGO/CARS.DGO",
|
||||
// "DGO/CHEEL.DGO",
|
||||
// "DGO/CLF.DGO",
|
||||
// "DGO/CLFX.DGO",
|
||||
// "DGO/CLIFCTF.DGO",
|
||||
// "DGO/CLIFFART.DGO",
|
||||
// "DGO/CLIFFSS.DGO",
|
||||
// "DGO/CLIFHUNT.DGO",
|
||||
// "DGO/CLIFTRN.DGO",
|
||||
// "DGO/CNSPFOOT.DGO",
|
||||
// "DGO/CNSPTBOX.DGO",
|
||||
// "DGO/CNSPTT.DGO",
|
||||
// "DGO/COL.DGO",
|
||||
// "DGO/COLART.DGO",
|
||||
// "DGO/COLICLCT.DGO",
|
||||
// "DGO/COLICTF.DGO",
|
||||
// "DGO/COLIREV.DGO",
|
||||
// "DGO/COLISEUS.DGO",
|
||||
// "DGO/COLX.DGO",
|
||||
// "DGO/COUGL.DGO",
|
||||
// "DGO/CREDITS.DGO",
|
||||
// "DGO/CSX.DGO",
|
||||
// "DGO/CSY.DGO",
|
||||
// "DGO/CYA.DGO",
|
||||
// "DGO/CYB.DGO",
|
||||
// "DGO/CYC.DGO",
|
||||
// "DGO/CYD.DGO",
|
||||
// "DGO/CYE.DGO",
|
||||
// "DGO/CYX.DGO",
|
||||
// "DGO/CYY.DGO",
|
||||
// "DGO/DAXCRED.DGO",
|
||||
// "DGO/DAXLEV.DGO",
|
||||
// "DGO/DAXTL.DGO",
|
||||
// "DGO/DESACTF.DGO",
|
||||
// "DGO/DESARENS.DGO",
|
||||
// "DGO/DESART.DGO",
|
||||
// "DGO/DESCLCT.DGO",
|
||||
// "DGO/DESHUNT.DGO",
|
||||
// "DGO/DESHUNT2.DGO",
|
||||
// "DGO/DESISLES.DGO",
|
||||
// "DGO/DESRAPT.DGO",
|
||||
// "DGO/DESREV.DGO",
|
||||
// "DGO/DETHRACE.DGO",
|
||||
// "DGO/DISLEART.DGO",
|
||||
// "DGO/DISLECTF.DGO",
|
||||
// "DGO/DKA.DGO",
|
||||
// "DGO/DKB.DGO",
|
||||
// "DGO/DKC.DGO",
|
||||
// "DGO/DKD.DGO",
|
||||
// "DGO/DKE.DGO",
|
||||
// "DGO/DKKRFOOT.DGO",
|
||||
// "DGO/DKKRTBOX.DGO",
|
||||
// "DGO/DKKRTT.DGO",
|
||||
// "DGO/DKKX.DGO",
|
||||
// "DGO/DKKY.DGO",
|
||||
// "DGO/DKX.DGO",
|
||||
// "DGO/DOCKFOOT.DGO",
|
||||
// "DGO/DOCKKRAS.DGO",
|
||||
// "DGO/DOCKKRAW.DGO",
|
||||
// "DGO/DOCKSS.DGO",
|
||||
// "DGO/DOCKSTT.DGO",
|
||||
// "DGO/DOCKSW.DGO",
|
||||
// "DGO/DOCKTBOX.DGO",
|
||||
// "DGO/DRA.DGO",
|
||||
// "DGO/DRB.DGO",
|
||||
// "DGO/DRC.DGO",
|
||||
// "DGO/DRD.DGO",
|
||||
// "DGO/DRDKFOOT.DGO",
|
||||
// "DGO/DRDKTBOX.DGO",
|
||||
// "DGO/DRDKTT.DGO",
|
||||
// "DGO/DRDX.DGO",
|
||||
// "DGO/DRDY.DGO",
|
||||
// "DGO/DROMDOCS.DGO",
|
||||
// "DGO/DROMDOCW.DGO",
|
||||
// "DGO/DROMES.DGO",
|
||||
// "DGO/DROMETT.DGO",
|
||||
// "DGO/DROMEW.DGO",
|
||||
// "DGO/DROMEX.DGO",
|
||||
// "DGO/DROMFOOT.DGO",
|
||||
// "DGO/DROMTBOX.DGO",
|
||||
// "DGO/DRONE.DGO",
|
||||
// "DGO/DRX.DGO",
|
||||
// "DGO/DRY.DGO",
|
||||
// "DGO/DSI.DGO",
|
||||
// "DGO/DSR.DGO",
|
||||
// "DGO/DSRX.DGO",
|
||||
// "DGO/DSX.DGO",
|
||||
// "DGO/EIGHT.DGO",
|
||||
// "DGO/EIGHTB.DGO",
|
||||
// "DGO/FALCL.DGO",
|
||||
// "DGO/FMVLEV.DGO",
|
||||
// "DGO/FOXL.DGO",
|
||||
// "DGO/GARAGE.DGO",
|
||||
// "DGO/GARAGEB.DGO",
|
||||
// "DGO/GILAL.DGO",
|
||||
// "DGO/GTBCRED.DGO",
|
||||
// "DGO/GTBLEV.DGO",
|
||||
// "DGO/GTBVL.DGO",
|
||||
// "DGO/HAVENS.DGO",
|
||||
// "DGO/HAVENW.DGO",
|
||||
// "DGO/HAVJUNGS.DGO",
|
||||
// "DGO/HAVJUNGW.DGO",
|
||||
// "DGO/HAVNFOOT.DGO",
|
||||
// "DGO/HAVNTBOX.DGO",
|
||||
// "DGO/HAVSEWS.DGO",
|
||||
// "DGO/HAVSEWW.DGO",
|
||||
// "DGO/HAVTFOOT.DGO",
|
||||
// "DGO/HAVTOURS.DGO",
|
||||
// "DGO/HAVTOURW.DGO",
|
||||
// "DGO/HAVTT.DGO",
|
||||
// "DGO/HAVTTBOX.DGO",
|
||||
// "DGO/HJNGFOOT.DGO",
|
||||
// "DGO/HJX.DGO",
|
||||
// "DGO/HJY.DGO",
|
||||
// "DGO/HSX.DGO",
|
||||
// "DGO/HSY.DGO",
|
||||
// "DGO/HVA.DGO",
|
||||
// "DGO/HVB.DGO",
|
||||
// "DGO/HVC.DGO",
|
||||
// "DGO/HVD.DGO",
|
||||
// "DGO/HVE.DGO",
|
||||
// "DGO/HVJGTBOX.DGO",
|
||||
// "DGO/HVJGTT.DGO",
|
||||
// "DGO/HVSWFOOT.DGO",
|
||||
// "DGO/HVSWTBOX.DGO",
|
||||
// "DGO/HVSWTT.DGO",
|
||||
// "DGO/HVTRTT.DGO",
|
||||
// "DGO/HVX.DGO",
|
||||
// "DGO/HVY.DGO",
|
||||
// "DGO/IBX.DGO",
|
||||
// "DGO/IBY.DGO",
|
||||
// "DGO/ICA.DGO",
|
||||
// "DGO/ICB.DGO",
|
||||
// "DGO/ICBGTT.DGO",
|
||||
// "DGO/ICC.DGO",
|
||||
// "DGO/ICD.DGO",
|
||||
// "DGO/ICEBERGS.DGO",
|
||||
// "DGO/ICEBERGW.DGO",
|
||||
// "DGO/ICEBFOOT.DGO",
|
||||
// "DGO/ICEBTBOX.DGO",
|
||||
// "DGO/ICEFOOT.DGO",
|
||||
// "DGO/ICEPASSS.DGO",
|
||||
// "DGO/ICEPASSW.DGO",
|
||||
// "DGO/ICEPFOOT.DGO",
|
||||
// "DGO/ICEPTBOX.DGO",
|
||||
// "DGO/ICES.DGO",
|
||||
// "DGO/ICETBOX.DGO",
|
||||
// "DGO/ICETFOOT.DGO",
|
||||
// "DGO/ICETOURS.DGO",
|
||||
// "DGO/ICETOURW.DGO",
|
||||
// "DGO/ICETRN.DGO",
|
||||
// "DGO/ICETT.DGO",
|
||||
// "DGO/ICETTBOX.DGO",
|
||||
// "DGO/ICEW.DGO",
|
||||
// "DGO/ICPSTT.DGO",
|
||||
// "DGO/ICTRTT.DGO",
|
||||
// "DGO/ICX.DGO",
|
||||
// "DGO/ICY.DGO",
|
||||
// "DGO/IPX.DGO",
|
||||
// "DGO/IPY.DGO",
|
||||
// "DGO/JAKCRED.DGO",
|
||||
// "DGO/JAKLEV.DGO",
|
||||
// "DGO/JAKVL.DGO",
|
||||
// "DGO/JGA.DGO",
|
||||
// "DGO/JGB.DGO",
|
||||
// "DGO/JGC.DGO",
|
||||
// "DGO/JGD.DGO",
|
||||
// "DGO/JGE.DGO",
|
||||
// "DGO/JGF.DGO",
|
||||
// "DGO/JGG.DGO",
|
||||
// "DGO/JGX.DGO",
|
||||
// "DGO/JGY.DGO",
|
||||
// "DGO/JKALEV.DGO",
|
||||
// "DGO/JKBLEV.DGO",
|
||||
// "DGO/JKCLEV.DGO",
|
||||
// "DGO/JUNGFOOT.DGO",
|
||||
// "DGO/JUNGLES.DGO",
|
||||
// "DGO/JUNGLETT.DGO",
|
||||
// "DGO/JUNGLEW.DGO",
|
||||
// "DGO/JUNGTBOX.DGO",
|
||||
// "DGO/JUNGTRN.DGO",
|
||||
// "DGO/KAELEV.DGO",
|
||||
// "DGO/KCR.DGO",
|
||||
// "DGO/KCROSART.DGO",
|
||||
// "DGO/KCROSCTF.DGO",
|
||||
// "DGO/KCROSSS.DGO",
|
||||
// "DGO/KCRSCLCT.DGO",
|
||||
// "DGO/KCRSPLOW.DGO",
|
||||
// "DGO/KCRX.DGO",
|
||||
// "DGO/KEICRED.DGO",
|
||||
// "DGO/KIELEV.DGO",
|
||||
// "DGO/KIEVL.DGO",
|
||||
// "DGO/KLECRED.DGO",
|
||||
// "DGO/KLELEV.DGO",
|
||||
// "DGO/KLEVL.DGO",
|
||||
// "DGO/KLEVL2.DGO",
|
||||
// "DGO/KRA.DGO",
|
||||
// "DGO/KRASFOOT.DGO",
|
||||
// "DGO/KRASS.DGO",
|
||||
// "DGO/KRASTBOX.DGO",
|
||||
// "DGO/KRASTRN.DGO",
|
||||
// "DGO/KRASTT.DGO",
|
||||
// "DGO/KRASW.DGO",
|
||||
// "DGO/KRATFOOT.DGO",
|
||||
// "DGO/KRATOURS.DGO",
|
||||
// "DGO/KRATOURW.DGO",
|
||||
// "DGO/KRATTBOX.DGO",
|
||||
// "DGO/KRB.DGO",
|
||||
// "DGO/KRC.DGO",
|
||||
// "DGO/KRTRTT.DGO",
|
||||
// "DGO/KRX.DGO",
|
||||
// "DGO/KRY.DGO",
|
||||
// "DGO/LEOPL.DGO",
|
||||
// "DGO/MENU2.DGO",
|
||||
// "DGO/MENUMAP.DGO",
|
||||
// "DGO/MONGL.DGO",
|
||||
// "DGO/OSMLEV.DGO",
|
||||
// "DGO/PANTL.DGO",
|
||||
// "DGO/PEAKFOOT.DGO",
|
||||
// "DGO/PEAKS.DGO",
|
||||
// "DGO/PEAKTBOX.DGO",
|
||||
// "DGO/PEAKTT.DGO",
|
||||
// "DGO/PEAKW.DGO",
|
||||
// "DGO/PECCRED.DGO",
|
||||
// "DGO/PECLEV.DGO",
|
||||
// "DGO/PECVL.DGO",
|
||||
// "DGO/PKA.DGO",
|
||||
// "DGO/PKB.DGO",
|
||||
// "DGO/PKC.DGO",
|
||||
// "DGO/PKD.DGO",
|
||||
// "DGO/PKE.DGO",
|
||||
// "DGO/PKX.DGO",
|
||||
// "DGO/POSSL.DGO",
|
||||
// "DGO/RACEWEAP.DGO",
|
||||
// "DGO/RATLEV.DGO",
|
||||
// "DGO/RAYCRED.DGO",
|
||||
// "DGO/RAYLEV.DGO",
|
||||
// "DGO/RAYVL.DGO",
|
||||
// "DGO/RAYVL2.DGO",
|
||||
// "DGO/RAZCRED.DGO",
|
||||
// "DGO/RAZLEV.DGO",
|
||||
// "DGO/RAZVL.DGO",
|
||||
// "DGO/RTH.DGO",
|
||||
// "DGO/RUSTYH.DGO",
|
||||
// "DGO/S2A.DGO",
|
||||
// "DGO/S3A.DGO",
|
||||
// "DGO/SBWLCTF.DGO",
|
||||
// "DGO/SEWERS.DGO",
|
||||
// "DGO/SEWERTT.DGO",
|
||||
// "DGO/SEWERW.DGO",
|
||||
// "DGO/SEWFOOT.DGO",
|
||||
// "DGO/SEWTBOX.DGO",
|
||||
// "DGO/SIGCRED.DGO",
|
||||
// "DGO/SIGLEV.DGO",
|
||||
// "DGO/SIGVL.DGO",
|
||||
// "DGO/SIGVL2.DGO",
|
||||
// "DGO/SIGVL3.DGO",
|
||||
// "DGO/SNAKL.DGO",
|
||||
// "DGO/SNO.DGO",
|
||||
// "DGO/SNOBART.DGO",
|
||||
// "DGO/SNOBOWLS.DGO",
|
||||
// "DGO/SNOWFOOT.DGO",
|
||||
// "DGO/SNOWS.DGO",
|
||||
// "DGO/SNOWTBOX.DGO",
|
||||
// "DGO/SNOWTRN2.DGO",
|
||||
// "DGO/SNOWTT.DGO",
|
||||
// "DGO/SNOX.DGO",
|
||||
// "DGO/SNW.DGO",
|
||||
// "DGO/SNWX.DGO",
|
||||
// "DGO/SPA.DGO",
|
||||
// "DGO/SPARFOOT.DGO",
|
||||
// "DGO/SPARGUSS.DGO",
|
||||
// "DGO/SPARGUSW.DGO",
|
||||
// "DGO/SPARTEMS.DGO",
|
||||
// "DGO/SPARTEMW.DGO",
|
||||
// "DGO/SPARTT.DGO",
|
||||
// "DGO/SPATFOOT.DGO",
|
||||
// "DGO/SPATOURS.DGO",
|
||||
// "DGO/SPATOURW.DGO",
|
||||
// "DGO/SPATTBOX.DGO",
|
||||
// "DGO/SPB.DGO",
|
||||
// "DGO/SPC.DGO",
|
||||
// "DGO/SPD.DGO",
|
||||
// "DGO/SPE.DGO",
|
||||
// "DGO/SPRGSTBX.DGO",
|
||||
// "DGO/SPTMFOOT.DGO",
|
||||
// "DGO/SPTMTBOX.DGO",
|
||||
// "DGO/SPTMTT.DGO",
|
||||
// "DGO/SPTRTT.DGO",
|
||||
// "DGO/SPX.DGO",
|
||||
// "DGO/SPY.DGO",
|
||||
// "DGO/STX.DGO",
|
||||
// "DGO/STY.DGO",
|
||||
// "DGO/SWA.DGO",
|
||||
// "DGO/SWB.DGO",
|
||||
// "DGO/SWC.DGO",
|
||||
// "DGO/SWD.DGO",
|
||||
// "DGO/SWE.DGO",
|
||||
// "DGO/SWF.DGO",
|
||||
// "DGO/SWX.DGO",
|
||||
// "DGO/TARLEV.DGO",
|
||||
// "DGO/TEMPFOOT.DGO",
|
||||
// "DGO/TEMPLES.DGO",
|
||||
// "DGO/TEMPLETT.DGO",
|
||||
// "DGO/TEMPLEW.DGO",
|
||||
// "DGO/TEMPTBOX.DGO",
|
||||
// "DGO/THACRED.DGO",
|
||||
// "DGO/THALEV.DGO",
|
||||
// "DGO/THAVL.DGO",
|
||||
// "DGO/THAVL2.DGO",
|
||||
// "DGO/THAVL3.DGO",
|
||||
// "DGO/THBCRED.DGO",
|
||||
// "DGO/THBLEV.DGO",
|
||||
// "DGO/THBVL.DGO",
|
||||
// "DGO/THBVL2.DGO",
|
||||
// "DGO/THBVL3.DGO",
|
||||
// "DGO/THCCRED.DGO",
|
||||
// "DGO/THCLEV.DGO",
|
||||
// "DGO/THCVL.DGO",
|
||||
// "DGO/THCVL2.DGO",
|
||||
// "DGO/THCVL3.DGO",
|
||||
// "DGO/TIGEL.DGO",
|
||||
// "DGO/TOADL.DGO",
|
||||
// "DGO/TORCRED.DGO",
|
||||
// "DGO/TORLEV.DGO",
|
||||
// "DGO/TORVL.DGO",
|
||||
// "DGO/TORVL2.DGO",
|
||||
// "DGO/TORVL3.DGO",
|
||||
// "DGO/TPA.DGO",
|
||||
// "DGO/TPB.DGO",
|
||||
// "DGO/TPC.DGO",
|
||||
// "DGO/TPD.DGO",
|
||||
// "DGO/TPE.DGO",
|
||||
// "DGO/TPX.DGO",
|
||||
// "DGO/TPY.DGO",
|
||||
// "DGO/TURTL.DGO",
|
||||
// "DGO/UR8CRED.DGO",
|
||||
// "DGO/UR8LEV.DGO",
|
||||
// "DGO/UR8VL.DGO",
|
||||
// "DGO/UR8VL2.DGO",
|
||||
// "DGO/UR8VL3.DGO",
|
||||
// "DGO/WOLFL.DGO",
|
||||
// "DGO/WOMBL.DGO",
|
||||
// "DGO/XIMLEV.DGO"
|
||||
"CGO/GAME.CGO",
|
||||
"DGO/ASHCRED.DGO",
|
||||
"DGO/ASHLEV.DGO",
|
||||
"DGO/ASHVL.DGO",
|
||||
"DGO/ASHVL2.DGO",
|
||||
"DGO/ASHVL3.DGO",
|
||||
"DGO/ATL.DGO",
|
||||
"DGO/ATOLLART.DGO",
|
||||
"DGO/ATOLLCTF.DGO",
|
||||
"DGO/ATOLLS.DGO",
|
||||
"DGO/ATOPLOW.DGO",
|
||||
"DGO/ATX.DGO",
|
||||
"DGO/BEARL.DGO",
|
||||
"DGO/BOBCL.DGO",
|
||||
"DGO/BRDROOM.DGO",
|
||||
"DGO/BRDROOMF.DGO",
|
||||
"DGO/CANFOOT.DGO",
|
||||
"DGO/CANSPARS.DGO",
|
||||
"DGO/CANSPARW.DGO",
|
||||
"DGO/CANTBOX.DGO",
|
||||
"DGO/CANYONS.DGO",
|
||||
"DGO/CANYONTT.DGO",
|
||||
"DGO/CANYONW.DGO",
|
||||
"DGO/CARS.DGO",
|
||||
"DGO/CHEEL.DGO",
|
||||
"DGO/CLF.DGO",
|
||||
"DGO/CLFX.DGO",
|
||||
"DGO/CLIFCTF.DGO",
|
||||
"DGO/CLIFFART.DGO",
|
||||
"DGO/CLIFFSS.DGO",
|
||||
"DGO/CLIFHUNT.DGO",
|
||||
"DGO/CLIFTRN.DGO",
|
||||
"DGO/CNSPFOOT.DGO",
|
||||
"DGO/CNSPTBOX.DGO",
|
||||
"DGO/CNSPTT.DGO",
|
||||
"DGO/COL.DGO",
|
||||
"DGO/COLART.DGO",
|
||||
"DGO/COLICLCT.DGO",
|
||||
"DGO/COLICTF.DGO",
|
||||
"DGO/COLIREV.DGO",
|
||||
"DGO/COLISEUS.DGO",
|
||||
"DGO/COLX.DGO",
|
||||
"DGO/COUGL.DGO",
|
||||
"DGO/CREDITS.DGO",
|
||||
"DGO/CSX.DGO",
|
||||
"DGO/CSY.DGO",
|
||||
"DGO/CYA.DGO",
|
||||
"DGO/CYB.DGO",
|
||||
"DGO/CYC.DGO",
|
||||
"DGO/CYD.DGO",
|
||||
"DGO/CYE.DGO",
|
||||
"DGO/CYX.DGO",
|
||||
"DGO/CYY.DGO",
|
||||
"DGO/DAXCRED.DGO",
|
||||
"DGO/DAXLEV.DGO",
|
||||
"DGO/DAXTL.DGO",
|
||||
"DGO/DESACTF.DGO",
|
||||
"DGO/DESARENS.DGO",
|
||||
"DGO/DESART.DGO",
|
||||
"DGO/DESCLCT.DGO",
|
||||
"DGO/DESHUNT.DGO",
|
||||
"DGO/DESHUNT2.DGO",
|
||||
"DGO/DESISLES.DGO",
|
||||
"DGO/DESRAPT.DGO",
|
||||
"DGO/DESREV.DGO",
|
||||
"DGO/DETHRACE.DGO",
|
||||
"DGO/DISLEART.DGO",
|
||||
"DGO/DISLECTF.DGO",
|
||||
"DGO/DKA.DGO",
|
||||
"DGO/DKB.DGO",
|
||||
"DGO/DKC.DGO",
|
||||
"DGO/DKD.DGO",
|
||||
"DGO/DKE.DGO",
|
||||
"DGO/DKKRFOOT.DGO",
|
||||
"DGO/DKKRTBOX.DGO",
|
||||
"DGO/DKKRTT.DGO",
|
||||
"DGO/DKKX.DGO",
|
||||
"DGO/DKKY.DGO",
|
||||
"DGO/DKX.DGO",
|
||||
"DGO/DOCKFOOT.DGO",
|
||||
"DGO/DOCKKRAS.DGO",
|
||||
"DGO/DOCKKRAW.DGO",
|
||||
"DGO/DOCKSS.DGO",
|
||||
"DGO/DOCKSTT.DGO",
|
||||
"DGO/DOCKSW.DGO",
|
||||
"DGO/DOCKTBOX.DGO",
|
||||
"DGO/DRA.DGO",
|
||||
"DGO/DRB.DGO",
|
||||
"DGO/DRC.DGO",
|
||||
"DGO/DRD.DGO",
|
||||
"DGO/DRDKFOOT.DGO",
|
||||
"DGO/DRDKTBOX.DGO",
|
||||
"DGO/DRDKTT.DGO",
|
||||
"DGO/DRDX.DGO",
|
||||
"DGO/DRDY.DGO",
|
||||
"DGO/DROMDOCS.DGO",
|
||||
"DGO/DROMDOCW.DGO",
|
||||
"DGO/DROMES.DGO",
|
||||
"DGO/DROMETT.DGO",
|
||||
"DGO/DROMEW.DGO",
|
||||
"DGO/DROMEX.DGO",
|
||||
"DGO/DROMFOOT.DGO",
|
||||
"DGO/DROMTBOX.DGO",
|
||||
"DGO/DRONE.DGO",
|
||||
"DGO/DRX.DGO",
|
||||
"DGO/DRY.DGO",
|
||||
"DGO/DSI.DGO",
|
||||
"DGO/DSR.DGO",
|
||||
"DGO/DSRX.DGO",
|
||||
"DGO/DSX.DGO",
|
||||
"DGO/EIGHT.DGO",
|
||||
"DGO/EIGHTB.DGO",
|
||||
"DGO/FALCL.DGO",
|
||||
"DGO/FMVLEV.DGO",
|
||||
"DGO/FOXL.DGO",
|
||||
"DGO/GARAGE.DGO",
|
||||
"DGO/GARAGEB.DGO",
|
||||
"DGO/GILAL.DGO",
|
||||
"DGO/GTBCRED.DGO",
|
||||
"DGO/GTBLEV.DGO",
|
||||
"DGO/GTBVL.DGO",
|
||||
"DGO/HAVENS.DGO",
|
||||
"DGO/HAVENW.DGO",
|
||||
"DGO/HAVJUNGS.DGO",
|
||||
"DGO/HAVJUNGW.DGO",
|
||||
"DGO/HAVNFOOT.DGO",
|
||||
"DGO/HAVNTBOX.DGO",
|
||||
"DGO/HAVSEWS.DGO",
|
||||
"DGO/HAVSEWW.DGO",
|
||||
"DGO/HAVTFOOT.DGO",
|
||||
"DGO/HAVTOURS.DGO",
|
||||
"DGO/HAVTOURW.DGO",
|
||||
"DGO/HAVTT.DGO",
|
||||
"DGO/HAVTTBOX.DGO",
|
||||
"DGO/HJNGFOOT.DGO",
|
||||
"DGO/HJX.DGO",
|
||||
"DGO/HJY.DGO",
|
||||
"DGO/HSX.DGO",
|
||||
"DGO/HSY.DGO",
|
||||
"DGO/HVA.DGO",
|
||||
"DGO/HVB.DGO",
|
||||
"DGO/HVC.DGO",
|
||||
"DGO/HVD.DGO",
|
||||
"DGO/HVE.DGO",
|
||||
"DGO/HVJGTBOX.DGO",
|
||||
"DGO/HVJGTT.DGO",
|
||||
"DGO/HVSWFOOT.DGO",
|
||||
"DGO/HVSWTBOX.DGO",
|
||||
"DGO/HVSWTT.DGO",
|
||||
"DGO/HVTRTT.DGO",
|
||||
"DGO/HVX.DGO",
|
||||
"DGO/HVY.DGO",
|
||||
"DGO/IBX.DGO",
|
||||
"DGO/IBY.DGO",
|
||||
"DGO/ICA.DGO",
|
||||
"DGO/ICB.DGO",
|
||||
"DGO/ICBGTT.DGO",
|
||||
"DGO/ICC.DGO",
|
||||
"DGO/ICD.DGO",
|
||||
"DGO/ICEBERGS.DGO",
|
||||
"DGO/ICEBERGW.DGO",
|
||||
"DGO/ICEBFOOT.DGO",
|
||||
"DGO/ICEBTBOX.DGO",
|
||||
"DGO/ICEFOOT.DGO",
|
||||
"DGO/ICEPASSS.DGO",
|
||||
"DGO/ICEPASSW.DGO",
|
||||
"DGO/ICEPFOOT.DGO",
|
||||
"DGO/ICEPTBOX.DGO",
|
||||
"DGO/ICES.DGO",
|
||||
"DGO/ICETBOX.DGO",
|
||||
"DGO/ICETFOOT.DGO",
|
||||
"DGO/ICETOURS.DGO",
|
||||
"DGO/ICETOURW.DGO",
|
||||
"DGO/ICETRN.DGO",
|
||||
"DGO/ICETT.DGO",
|
||||
"DGO/ICETTBOX.DGO",
|
||||
"DGO/ICEW.DGO",
|
||||
"DGO/ICPSTT.DGO",
|
||||
"DGO/ICTRTT.DGO",
|
||||
"DGO/ICX.DGO",
|
||||
"DGO/ICY.DGO",
|
||||
"DGO/IPX.DGO",
|
||||
"DGO/IPY.DGO",
|
||||
"DGO/JAKCRED.DGO",
|
||||
"DGO/JAKLEV.DGO",
|
||||
"DGO/JAKVL.DGO",
|
||||
"DGO/JGA.DGO",
|
||||
"DGO/JGB.DGO",
|
||||
"DGO/JGC.DGO",
|
||||
"DGO/JGD.DGO",
|
||||
"DGO/JGE.DGO",
|
||||
"DGO/JGF.DGO",
|
||||
"DGO/JGG.DGO",
|
||||
"DGO/JGX.DGO",
|
||||
"DGO/JGY.DGO",
|
||||
"DGO/JKALEV.DGO",
|
||||
"DGO/JKBLEV.DGO",
|
||||
"DGO/JKCLEV.DGO",
|
||||
"DGO/JUNGFOOT.DGO",
|
||||
"DGO/JUNGLES.DGO",
|
||||
"DGO/JUNGLETT.DGO",
|
||||
"DGO/JUNGLEW.DGO",
|
||||
"DGO/JUNGTBOX.DGO",
|
||||
"DGO/JUNGTRN.DGO",
|
||||
"DGO/KAELEV.DGO",
|
||||
"DGO/KCR.DGO",
|
||||
"DGO/KCROSART.DGO",
|
||||
"DGO/KCROSCTF.DGO",
|
||||
"DGO/KCROSSS.DGO",
|
||||
"DGO/KCRSCLCT.DGO",
|
||||
"DGO/KCRSPLOW.DGO",
|
||||
"DGO/KCRX.DGO",
|
||||
"DGO/KEICRED.DGO",
|
||||
"DGO/KIELEV.DGO",
|
||||
"DGO/KIEVL.DGO",
|
||||
"DGO/KLECRED.DGO",
|
||||
"DGO/KLELEV.DGO",
|
||||
"DGO/KLEVL.DGO",
|
||||
"DGO/KLEVL2.DGO",
|
||||
"DGO/KRA.DGO",
|
||||
"DGO/KRASFOOT.DGO",
|
||||
"DGO/KRASS.DGO",
|
||||
"DGO/KRASTBOX.DGO",
|
||||
"DGO/KRASTRN.DGO",
|
||||
"DGO/KRASTT.DGO",
|
||||
"DGO/KRASW.DGO",
|
||||
"DGO/KRATFOOT.DGO",
|
||||
"DGO/KRATOURS.DGO",
|
||||
"DGO/KRATOURW.DGO",
|
||||
"DGO/KRATTBOX.DGO",
|
||||
"DGO/KRB.DGO",
|
||||
"DGO/KRC.DGO",
|
||||
"DGO/KRTRTT.DGO",
|
||||
"DGO/KRX.DGO",
|
||||
"DGO/KRY.DGO",
|
||||
"DGO/LEOPL.DGO",
|
||||
"DGO/MENU2.DGO",
|
||||
"DGO/MENUMAP.DGO",
|
||||
"DGO/MONGL.DGO",
|
||||
"DGO/OSMLEV.DGO",
|
||||
"DGO/PANTL.DGO",
|
||||
"DGO/PEAKFOOT.DGO",
|
||||
"DGO/PEAKS.DGO",
|
||||
"DGO/PEAKTBOX.DGO",
|
||||
"DGO/PEAKTT.DGO",
|
||||
"DGO/PEAKW.DGO",
|
||||
"DGO/PECCRED.DGO",
|
||||
"DGO/PECLEV.DGO",
|
||||
"DGO/PECVL.DGO",
|
||||
"DGO/PKA.DGO",
|
||||
"DGO/PKB.DGO",
|
||||
"DGO/PKC.DGO",
|
||||
"DGO/PKD.DGO",
|
||||
"DGO/PKE.DGO",
|
||||
"DGO/PKX.DGO",
|
||||
"DGO/POSSL.DGO",
|
||||
"DGO/RACEWEAP.DGO",
|
||||
"DGO/RATLEV.DGO",
|
||||
"DGO/RAYCRED.DGO",
|
||||
"DGO/RAYLEV.DGO",
|
||||
"DGO/RAYVL.DGO",
|
||||
"DGO/RAYVL2.DGO",
|
||||
"DGO/RAZCRED.DGO",
|
||||
"DGO/RAZLEV.DGO",
|
||||
"DGO/RAZVL.DGO",
|
||||
"DGO/RTH.DGO",
|
||||
"DGO/RUSTYH.DGO",
|
||||
"DGO/S2A.DGO",
|
||||
"DGO/S3A.DGO",
|
||||
"DGO/SBWLCTF.DGO",
|
||||
"DGO/SEWERS.DGO",
|
||||
"DGO/SEWERTT.DGO",
|
||||
"DGO/SEWERW.DGO",
|
||||
"DGO/SEWFOOT.DGO",
|
||||
"DGO/SEWTBOX.DGO",
|
||||
"DGO/SIGCRED.DGO",
|
||||
"DGO/SIGLEV.DGO",
|
||||
"DGO/SIGVL.DGO",
|
||||
"DGO/SIGVL2.DGO",
|
||||
"DGO/SIGVL3.DGO",
|
||||
"DGO/SNAKL.DGO",
|
||||
"DGO/SNO.DGO",
|
||||
"DGO/SNOBART.DGO",
|
||||
"DGO/SNOBOWLS.DGO",
|
||||
"DGO/SNOWFOOT.DGO",
|
||||
"DGO/SNOWS.DGO",
|
||||
"DGO/SNOWTBOX.DGO",
|
||||
"DGO/SNOWTRN2.DGO",
|
||||
"DGO/SNOWTT.DGO",
|
||||
"DGO/SNOX.DGO",
|
||||
"DGO/SNW.DGO",
|
||||
"DGO/SNWX.DGO",
|
||||
"DGO/SPA.DGO",
|
||||
"DGO/SPARFOOT.DGO",
|
||||
"DGO/SPARGUSS.DGO",
|
||||
"DGO/SPARGUSW.DGO",
|
||||
"DGO/SPARTEMS.DGO",
|
||||
"DGO/SPARTEMW.DGO",
|
||||
"DGO/SPARTT.DGO",
|
||||
"DGO/SPATFOOT.DGO",
|
||||
"DGO/SPATOURS.DGO",
|
||||
"DGO/SPATOURW.DGO",
|
||||
"DGO/SPATTBOX.DGO",
|
||||
"DGO/SPB.DGO",
|
||||
"DGO/SPC.DGO",
|
||||
"DGO/SPD.DGO",
|
||||
"DGO/SPE.DGO",
|
||||
"DGO/SPRGSTBX.DGO",
|
||||
"DGO/SPTMFOOT.DGO",
|
||||
"DGO/SPTMTBOX.DGO",
|
||||
"DGO/SPTMTT.DGO",
|
||||
"DGO/SPTRTT.DGO",
|
||||
"DGO/SPX.DGO",
|
||||
"DGO/SPY.DGO",
|
||||
"DGO/STX.DGO",
|
||||
"DGO/STY.DGO",
|
||||
"DGO/SWA.DGO",
|
||||
"DGO/SWB.DGO",
|
||||
"DGO/SWC.DGO",
|
||||
"DGO/SWD.DGO",
|
||||
"DGO/SWE.DGO",
|
||||
"DGO/SWF.DGO",
|
||||
"DGO/SWX.DGO",
|
||||
"DGO/TARLEV.DGO",
|
||||
"DGO/TEMPFOOT.DGO",
|
||||
"DGO/TEMPLES.DGO",
|
||||
"DGO/TEMPLETT.DGO",
|
||||
"DGO/TEMPLEW.DGO",
|
||||
"DGO/TEMPTBOX.DGO",
|
||||
"DGO/THACRED.DGO",
|
||||
"DGO/THALEV.DGO",
|
||||
"DGO/THAVL.DGO",
|
||||
"DGO/THAVL2.DGO",
|
||||
"DGO/THAVL3.DGO",
|
||||
"DGO/THBCRED.DGO",
|
||||
"DGO/THBLEV.DGO",
|
||||
"DGO/THBVL.DGO",
|
||||
"DGO/THBVL2.DGO",
|
||||
"DGO/THBVL3.DGO",
|
||||
"DGO/THCCRED.DGO",
|
||||
"DGO/THCLEV.DGO",
|
||||
"DGO/THCVL.DGO",
|
||||
"DGO/THCVL2.DGO",
|
||||
"DGO/THCVL3.DGO",
|
||||
"DGO/TIGEL.DGO",
|
||||
"DGO/TOADL.DGO",
|
||||
"DGO/TORCRED.DGO",
|
||||
"DGO/TORLEV.DGO",
|
||||
"DGO/TORVL.DGO",
|
||||
"DGO/TORVL2.DGO",
|
||||
"DGO/TORVL3.DGO",
|
||||
"DGO/TPA.DGO",
|
||||
"DGO/TPB.DGO",
|
||||
"DGO/TPC.DGO",
|
||||
"DGO/TPD.DGO",
|
||||
"DGO/TPE.DGO",
|
||||
"DGO/TPX.DGO",
|
||||
"DGO/TPY.DGO",
|
||||
"DGO/TURTL.DGO",
|
||||
"DGO/UR8CRED.DGO",
|
||||
"DGO/UR8LEV.DGO",
|
||||
"DGO/UR8VL.DGO",
|
||||
"DGO/UR8VL2.DGO",
|
||||
"DGO/UR8VL3.DGO",
|
||||
"DGO/WOLFL.DGO",
|
||||
"DGO/WOMBL.DGO",
|
||||
"DGO/XIMLEV.DGO"
|
||||
],
|
||||
|
||||
"levels_to_extract": [],
|
||||
|
||||
@@ -1,2 +1,14 @@
|
||||
{
|
||||
"ambient-h": [["L1", "(inline-array talker-speech-class)", 233]],
|
||||
"pat-h": [["L1", "(inline-array pat-mode-info)", 4]],
|
||||
"foreground-h": [["L4", "(pointer bucket-id-16)", 462]],
|
||||
"texture-anim-h": [["L1", "(pointer uint8)", 256]],
|
||||
"process-nettable-h": [["L13", "(pointer uint32)", 95]],
|
||||
"math": [
|
||||
["L109", "(pointer float)", 32],
|
||||
["L108", "(pointer float)", 32]
|
||||
],
|
||||
"timer-h": [["L15", "(pointer uint32)", 12]],
|
||||
"game-task-h": [["L178", "(pointer text-id)", 24]],
|
||||
"profile": [["L3", "(inline-array profile-spec)", 13]]
|
||||
}
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
// This overrides the stack size for calls to stack-size-set! in given functions.
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
@@ -1,2 +1,77 @@
|
||||
{
|
||||
"quaternion-smooth-seek!": [[16, ["inline-array", "quaternion", 2]]],
|
||||
"rotate-vector-to-vector": [[16, "quaternion"]],
|
||||
"nearest-dist2-between-moving-points": [[16, ["inline-array", "vector", 2]]],
|
||||
"vector-segment-xz-distance-point!": [[16, "matrix"]],
|
||||
"vector-interp-angle!": [[16, "quaternion"]],
|
||||
"vector-cap-rotation!": [[16, "quaternion"]],
|
||||
"vector-line-xz-distance-point!": [[16, "matrix"]],
|
||||
"vector-circle-tangent-new": [
|
||||
[32, "vector"],
|
||||
[48, "vector"]
|
||||
],
|
||||
"v-slrp2!": [
|
||||
[32, "vector"],
|
||||
[64, "matrix"]
|
||||
],
|
||||
"v-slrp3!": [[32, "vector"]],
|
||||
"collide-list-fill-bg-using-box": [
|
||||
[32, "matrix"],
|
||||
[96, "collide-query"]
|
||||
],
|
||||
"collide-list-fill-bg-using-line-sphere": [
|
||||
[32, "matrix"],
|
||||
[96, "collide-query"]
|
||||
],
|
||||
"(method 9 touching-list)": [[16, "add-prims-touching-work"]],
|
||||
"(method 9 curve-color-fast)": [[16, "rgbaf"]],
|
||||
"(method 9 curve2d-fast)": [
|
||||
[16, "vector"],
|
||||
[32, "vector"]
|
||||
],
|
||||
"evaluate-color-curve-fast": [[16, "vector"]],
|
||||
"evaluate-curve-fast": [
|
||||
[16, "vector"],
|
||||
[32, "vector"]
|
||||
],
|
||||
"add-debug-box-with-transform": [
|
||||
[16, ["inline-array", "vector", 8]],
|
||||
[144, ["inline-array", "vector", 2]],
|
||||
[176, "vector"]
|
||||
],
|
||||
"add-debug-curve": [
|
||||
[16, "vector"],
|
||||
[32, "vector"]
|
||||
],
|
||||
"add-debug-sphere-from-table": [
|
||||
[16, "vector"],
|
||||
[48, "vector"],
|
||||
[64, "vector"]
|
||||
],
|
||||
"make-debug-sphere-table": [
|
||||
[16, "vector"],
|
||||
[32, "vector"],
|
||||
[48, "vector"],
|
||||
[64, "vector"],
|
||||
[80, "vector"],
|
||||
[96, "vector"],
|
||||
[112, "vector"]
|
||||
],
|
||||
"eul->matrix": [[16, "vector"]],
|
||||
"joint-mod-joint-set-world-handler": [
|
||||
[32, "vector"],
|
||||
[48, "vector"]
|
||||
],
|
||||
"joint-mod-blend-world-callback": [[16, "joint-mod-blend-world-work"]],
|
||||
"(method 20 lightning-bolt)": [[16, "vector"]],
|
||||
"update-light-hash": [
|
||||
[16, "bounding-box"],
|
||||
[48, "vector"],
|
||||
[64, "vector"]
|
||||
],
|
||||
"(method 10 simple-sprite-system)": [[16, ["array", "texture-id", 128]]],
|
||||
"(method 10 cubic-curve)": [[16, "trajectory"]],
|
||||
"(method 11 cubic-curve)": [[16, "trajectory"]],
|
||||
"(method 12 cubic-curve)": [[16, "trajectory"]],
|
||||
"matrix<-parented-transformq!": [[16, "vector"]]
|
||||
}
|
||||
|
||||
@@ -1,2 +1,467 @@
|
||||
{
|
||||
"entity-actor-count": [["_stack_", 16, "res-tag"]],
|
||||
"entity-actor-lookup": [["_stack_", 16, "res-tag"]],
|
||||
"build-masks": [
|
||||
[[18, 22], "a1", "drawable-tree-tfrag"],
|
||||
[24, "a2", "drawable-inline-array-tfrag"],
|
||||
[[27, 31], "a2", "(inline-array tfragment)"],
|
||||
[[38, 42], "a1", "drawable-tree-tfrag-trans"],
|
||||
[44, "a2", "drawable-inline-array-tfrag"],
|
||||
[[47, 51], "a2", "(inline-array tfragment)"],
|
||||
[[58, 62], "a1", "drawable-tree-tfrag-water"],
|
||||
[64, "a2", "drawable-inline-array-tfrag"],
|
||||
[[67, 71], "a2", "(inline-array tfragment)"],
|
||||
[[78, 79], "a1", "drawable-tree-instance-tie"],
|
||||
[123, "a1", "drawable-tree-instance-shrub"],
|
||||
[[129, 133], "a2", "(inline-array prototype-bucket-shrub)"]
|
||||
],
|
||||
"cam-layout-function-call": [
|
||||
[15, "gp", "(function string int basic object)"]
|
||||
],
|
||||
"cam-layout-save-cam-rot": [[13, "v0", "vector"]],
|
||||
"cam-layout-save-campointsoffset": [[12, "v0", "vector"]],
|
||||
"cam-layout-save-splineoffset": [
|
||||
[37, "v0", "vector"],
|
||||
[25, "v0", "vector"]
|
||||
],
|
||||
"clmf-save-all": [[18, "v1", "connection"]],
|
||||
"execute-cam-post-hook-engine": [
|
||||
[8, "s5", "connection"],
|
||||
[[14, 17], "s5", "connection"],
|
||||
[18, "t9", "(function object object object object object)"],
|
||||
[9, "s5", "connection"]
|
||||
],
|
||||
"collide-list-fill-bg-using-box": [
|
||||
[223, "a0", "collide-hash-scratch"],
|
||||
[255, "a0", "collide-hash-scratch"],
|
||||
[208, "v1", "collide-hash-scratch"],
|
||||
[210, "v1", "collide-hash-scratch"],
|
||||
[212, "v1", "collide-hash-scratch"],
|
||||
[241, "v1", "collide-hash-scratch"],
|
||||
[243, "v1", "collide-hash-scratch"],
|
||||
[246, "v1", "collide-hash-scratch"]
|
||||
],
|
||||
"collide-list-fill-bg-using-line-sphere": [
|
||||
[287, "a0", "collide-hash-scratch"],
|
||||
[[272, 280], "v1", "collide-hash-scratch"],
|
||||
[[239, 246], "v1", "collide-hash-scratch"],
|
||||
[255, "a0", "collide-hash-scratch"],
|
||||
[102, "v1", "float"]
|
||||
],
|
||||
"(method 0 collide-shape-prim-group)": [
|
||||
[[6, 12], "v0", "collide-shape-prim-group"]
|
||||
],
|
||||
"(method 0 collide-shape-prim-mesh)": [
|
||||
[[6, 11], "v0", "collide-shape-prim-mesh"]
|
||||
],
|
||||
"(method 0 collide-shape-prim-sphere)": [
|
||||
[[5, 8], "v0", "collide-shape-prim-sphere"]
|
||||
],
|
||||
"(method 10 touching-list)": [[[5, 11], "s5", "touching-shapes-entry"]],
|
||||
"(method 11 touching-list)": [
|
||||
[8, "s5", "touching-shapes-entry"],
|
||||
[11, "s5", "touching-shapes-entry"],
|
||||
[13, "s5", "touching-shapes-entry"],
|
||||
[48, "s5", "touching-shapes-entry"],
|
||||
[52, "s5", "touching-shapes-entry"],
|
||||
[10, "s5", "touching-shapes-entry"],
|
||||
[33, "s5", "touching-shapes-entry"],
|
||||
[50, "s5", "touching-shapes-entry"]
|
||||
],
|
||||
"(method 0 touching-list)": [[[6, 8], "v0", "touching-list"]],
|
||||
"(method 11 touching-prims-entry-pool)": [
|
||||
[[0, 8], "v1", "touching-prims-entry"],
|
||||
[8, "v1", "pointer"],
|
||||
[[9, 11], "v1", "touching-prims-entry"],
|
||||
[[1, 20], "a1", "touching-prims-entry"]
|
||||
],
|
||||
"(method 0 engine)": [
|
||||
[44, "v1", "pointer"],
|
||||
[47, "v1", "pointer"],
|
||||
[53, "v1", "connectable"],
|
||||
[65, "v1", "connectable"]
|
||||
],
|
||||
"(method 0 engine-pers)": [
|
||||
[32, "v1", "pointer"],
|
||||
[23, "v1", "pointer"],
|
||||
[26, "v1", "pointer"],
|
||||
[24, "v1", "(pointer pointer)"]
|
||||
],
|
||||
"(method 11 connection)": [[5, "a1", "pointer"]],
|
||||
"(method 12 engine)": [
|
||||
[[0, 25], "s4", "connection"],
|
||||
[13, "t9", "(function object object object object object)"]
|
||||
],
|
||||
"(method 13 engine)": [
|
||||
[[0, 25], "s4", "connection"],
|
||||
[13, "t9", "(function object object object object object)"]
|
||||
],
|
||||
"(method 19 engine)": [[8, "a0", "connection"]],
|
||||
"(method 20 engine)": [[8, "a0", "connection"]],
|
||||
"(method 21 engine)": [[8, "a0", "connection"]],
|
||||
"(method 3 connection-pers)": [[97, "f0", "float"]],
|
||||
"(method 9 connection)": [[8, "a0", "pointer"]],
|
||||
"drawable-frag-count": [[[14, 20], "s5", "drawable-group"]],
|
||||
"add-debug-sphere-from-table": [
|
||||
[[38, 41], "v1", "vector"],
|
||||
[[55, 59], "s0", "(inline-array vector)"]
|
||||
],
|
||||
"unpack-comp-huf": [[[21, 23], "t3", "(pointer uint16)"]],
|
||||
"unpack-comp-rle": [[[10, 26], "a0", "(pointer int8)"]],
|
||||
"dma-bucket-insert-tag": [
|
||||
[[2, 6], "v1", "dma-bucket"],
|
||||
[3, "a0", "dma-bucket"]
|
||||
],
|
||||
"dma-buffer-add-buckets": [
|
||||
[[1, 4], "v1", "dma-bucket"],
|
||||
[5, "v1", "pointer"],
|
||||
[[9, 11], "v1", "dma-bucket"],
|
||||
[11, "v1", "pointer"]
|
||||
],
|
||||
"dma-buffer-patch-buckets": [
|
||||
[[3, 34], "a0", "dma-bucket"],
|
||||
[[34, 38], "a0", "dma-packet"]
|
||||
],
|
||||
"disasm-dma-list": [
|
||||
[43, "v1", "dma-packet"],
|
||||
[266, "v1", "(pointer uint64)"],
|
||||
[272, "v1", "(pointer uint64)"],
|
||||
[133, "v1", "(pointer uint64)"],
|
||||
[152, "v1", "(pointer uint64)"],
|
||||
[167, "v1", "(pointer uint64)"],
|
||||
[176, "v1", "(pointer uint64)"],
|
||||
[198, "v1", "(pointer uint64)"],
|
||||
[207, "v1", "(pointer uint64)"],
|
||||
[238, "v1", "(pointer uint64)"],
|
||||
[247, "v1", "(pointer uint64)"],
|
||||
[282, "v1", "(pointer uint64)"],
|
||||
[291, "v1", "(pointer uint64)"],
|
||||
[324, "v1", "(pointer uint64)"],
|
||||
[334, "v1", "(pointer uint64)"],
|
||||
[141, "v1", "int"],
|
||||
[25, "v1", "dma-tag"],
|
||||
["_stack_", 16, "uint"],
|
||||
["_stack_", 32, "dma-packet"],
|
||||
["_stack_", 64, "dma-packet"],
|
||||
["_stack_", 80, "dma-packet"]
|
||||
],
|
||||
"(method 16 drawable-inline-array-node)": [[[1, 7], "v1", "draw-node"]],
|
||||
"(method 15 drawable-tree)": [
|
||||
[[1, 4], "v1", "drawable-inline-array-node"],
|
||||
[[29, 34], "t0", "drawable-inline-array-node"],
|
||||
[[28, 32], "t2", "drawable-inline-array-node"],
|
||||
[[42, 46], "t2", "(pointer int8)"]
|
||||
],
|
||||
"glst-find-node-by-name": [[6, "s5", "glst-named-node"]],
|
||||
"glst-length-of-longest-name": [[5, "s5", "glst-named-node"]],
|
||||
"history-print": [[20, "a1", "int"]],
|
||||
"joint-mod-foot-rot-handler": [
|
||||
[[0, 7], "s5", "joint-mod"],
|
||||
[[35, 152], "s5", "joint-mod"]
|
||||
],
|
||||
"joint-mod-joint-set-handler": [[[2, 23], "s4", "joint-mod"]],
|
||||
"joint-mod-joint-set-world-handler": [[[6, 197], "s5", "joint-mod"]],
|
||||
"joint-mod-polar-look-at-callback": [
|
||||
[[0, 363], "s5", "joint-mod-polar-look-at"]
|
||||
],
|
||||
"joint-mod-scale-handler": [[[1, 14], "s5", "joint-mod"]],
|
||||
"real-joint-mod-gun-look-at-handler": [
|
||||
[1, "v1", "joint-mod"],
|
||||
[2, "v1", "joint-mod"]
|
||||
],
|
||||
"joint-mod-blend-local-callback": [[[1, 28], "gp", "joint-mod-blend-local"]],
|
||||
"joint-mod-blend-world-callback": [[[1, 150], "gp", "joint-mod-blend-world"]],
|
||||
"joint-mod-rotate-world-callback": [
|
||||
[[0, 24], "s3", "joint-mod-rotate-world"]
|
||||
],
|
||||
"joint-mod-set-local-callback": [[[1, 24], "v1", "joint-mod-set-local"]],
|
||||
"joint-mod-set-world-callback": [[[1, 4], "v1", "joint-mod-set-local"]],
|
||||
"joint-mod-set-world-no-trans-callback": [
|
||||
[[1, 25], "s4", "joint-mod-set-world-no-trans"]
|
||||
],
|
||||
"(method 15 lightning-bolt)": [
|
||||
[47, "v1", "float"],
|
||||
[64, "v1", "float"]
|
||||
],
|
||||
"(method 17 lightning-bolt)": [[36, "v1", "float"]],
|
||||
"(method 20 lightning-bolt)": [
|
||||
[15, "v1", "float"],
|
||||
[32, "v1", "float"]
|
||||
],
|
||||
"(method 21 lightning-bolt)": [
|
||||
[49, "v1", "float"],
|
||||
[77, "v1", "float"],
|
||||
["_stack_", 32, "float"]
|
||||
],
|
||||
"update-light-hash": [
|
||||
[[234, 239], "a1", "light-hash-bucket"],
|
||||
[[207, 211], "a0", "light-hash-bucket"]
|
||||
],
|
||||
"dgo-load-begin": [[[19, 43], "s1", "load-dgo-msg"]],
|
||||
"dgo-load-continue": [[[5, 23], "gp", "load-dgo-msg"]],
|
||||
"dgo-load-get-next": [[[14, 31], "v1", "load-dgo-msg"]],
|
||||
"str-ambient-play": [[[7, 20], "s5", "play-chunk-msg"]],
|
||||
"str-ambient-stop": [[[7, 20], "s5", "play-chunk-msg"]],
|
||||
"str-load": [[[18, 44], "s2", "load-chunk-msg"]],
|
||||
"str-load-status": [
|
||||
[[18, 22], "v1", "load-chunk-msg"],
|
||||
[26, "v1", "load-chunk-msg"]
|
||||
],
|
||||
"str-play-async": [[[7, 40], "s2", "play-chunk-msg"]],
|
||||
"str-play-queue": [[[7, 98], "s4", "play-chunk-msg"]],
|
||||
"str-play-stop": [[[7, 36], "s4", "play-chunk-msg"]],
|
||||
"cube-root": [
|
||||
[17, "f0", "float"],
|
||||
[17, "f1", "float"],
|
||||
[18, "f0", "float"],
|
||||
[18, "f1", "float"],
|
||||
[[23, 32], "f0", "float"]
|
||||
],
|
||||
"log2f": [
|
||||
[12, "f0", "float"],
|
||||
[12, "f1", "float"],
|
||||
[19, "f0", "float"],
|
||||
[19, "f1", "float"]
|
||||
],
|
||||
"logf": [
|
||||
[12, "f0", "float"],
|
||||
[12, "f1", "float"],
|
||||
[19, "f0", "float"],
|
||||
[19, "f1", "float"]
|
||||
],
|
||||
"debug-menu-find-from-template": [
|
||||
[9, "s5", "string"],
|
||||
[10, "s4", "debug-menu-item"],
|
||||
[18, "s4", "debug-menu-item-submenu"],
|
||||
[3, "s5", "debug-menu"]
|
||||
],
|
||||
"debug-menu-func-decode": [[18, "a0", "symbol"]],
|
||||
"debug-menu-item-get-max-width": [
|
||||
[5, "a0", "debug-menu-item-submenu"],
|
||||
[20, "a0", "debug-menu-item-var"]
|
||||
],
|
||||
"debug-menu-item-var-joypad-handler": [
|
||||
[206, "a1", "int"],
|
||||
[207, "v1", "int"]
|
||||
],
|
||||
"debug-menu-item-var-make-float": [[32, "f0", "int"]],
|
||||
"debug-menu-item-var-update-display-str": [
|
||||
[48, "v1", "int"],
|
||||
[63, "v1", "int"],
|
||||
[68, "v1", "int"],
|
||||
[46, "v1", "int"],
|
||||
[45, "v1", "int"],
|
||||
[65, "v1", "int"],
|
||||
[66, "v1", "int"]
|
||||
],
|
||||
"debug-menu-rebuild": [[7, "a0", "debug-menu-item"]],
|
||||
"debug-menu-send-msg": [
|
||||
[17, "s2", "debug-menu-item-submenu"],
|
||||
[12, "s2", "debug-menu-item"]
|
||||
],
|
||||
"(method 10 mysql-nav-node)": [[4, "v1", "mysql-nav-edge"]],
|
||||
"(method 19 mysql-nav-graph)": [
|
||||
[42, "a0", "mysql-nav-edge"],
|
||||
[46, "a0", "mysql-nav-edge"],
|
||||
[60, "a0", "mysql-nav-edge"]
|
||||
],
|
||||
"joint-channel-float-delete!": [
|
||||
[7, "a0", "pointer"],
|
||||
[7, "a1", "pointer"]
|
||||
],
|
||||
"num-func-chan": [[7, "v1", "joint-control-channel"]],
|
||||
"ramdisk-load": [[[7, 12], "v1", "ramdisk-rpc-load"]],
|
||||
"(method 15 res-lump)": [[132, "s5", "res-tag-pair"]],
|
||||
"(method 16 res-lump)": [
|
||||
[22, "t1", "(pointer uint64)"],
|
||||
[29, "t2", "(pointer uint64)"]
|
||||
],
|
||||
"(method 17 res-lump)": [[22, "s4", "(pointer pointer)"]],
|
||||
"(method 18 res-lump)": [["_stack_", 16, "object"]],
|
||||
"(method 19 res-lump)": [
|
||||
[38, "t2", "int"],
|
||||
[38, "a2", "int"]
|
||||
],
|
||||
"(method 20 res-lump)": [[341, "t0", "(pointer uint128)"]],
|
||||
"(method 21 res-lump)": [
|
||||
["_stack_", 16, "res-tag"],
|
||||
["_stack_", 32, "res-tag"]
|
||||
],
|
||||
"(method 0 script-context)": [[[8, 17], "v0", "script-context"]],
|
||||
"shadow-vu1-add-matrix": [
|
||||
[[11, 19], "a3", "dma-packet"],
|
||||
[[26, 30], "v1", "matrix"]
|
||||
],
|
||||
"shrubbery-login-post-texture": [
|
||||
[[13, 15], "a3", "qword"],
|
||||
[16, "a3", "pointer"],
|
||||
[24, "a3", "pointer"],
|
||||
[[17, 23], "a3", "qword"],
|
||||
[[13, 23], "a1", "qword"],
|
||||
[14, "a2", "qword"],
|
||||
[[27, 29], "a3", "qword"],
|
||||
[[27, 29], "a1", "qword"],
|
||||
[[35, 37], "a3", "qword"],
|
||||
[[35, 37], "a2", "qword"]
|
||||
],
|
||||
"(method 2 sparticle-cpuinfo)": [[14, "f0", "float"]],
|
||||
"sprite-add-2d-chunk": [
|
||||
[[7, 21], "a0", "dma-packet"],
|
||||
[[33, 53], "a0", "dma-packet"],
|
||||
[[57, 77], "a0", "dma-packet"],
|
||||
[[78, 88], "v1", "dma-packet"],
|
||||
[65, "a3", "int"]
|
||||
],
|
||||
"sprite-add-3d-chunk": [
|
||||
[[7, 21], "a0", "dma-packet"],
|
||||
[[33, 53], "a0", "dma-packet"],
|
||||
[[57, 77], "a0", "dma-packet"],
|
||||
[[78, 88], "v1", "dma-packet"],
|
||||
[65, "a3", "int"]
|
||||
],
|
||||
"sprite-add-frame-data": [[[3, 17], "a0", "dma-packet"]],
|
||||
"add-shader-to-dma": [[[6, 8], "v1", "(pointer uint32)"]],
|
||||
"sprite-glow-add-simple-sprite": [
|
||||
[[0, 33], "v1", "sprite-glow-ref-template"]
|
||||
],
|
||||
"sprite-glow-add-sprite": [[[0, 33], "v1", "sprite-glow-cnt-template"]],
|
||||
"(method 9 texture-anim-layer)": [
|
||||
[5, "v1", "symbol"],
|
||||
[11, "v1", "symbol"]
|
||||
],
|
||||
"add-tfrag-data": [
|
||||
[[3, 17], "a0", "dma-packet"],
|
||||
[[24, 31], "v1", "dma-packet"]
|
||||
],
|
||||
"tfrag-end-buffer": [
|
||||
[[21, 28], "a2", "dma-packet"],
|
||||
[[31, 38], "a0", "(pointer vif-tag)"],
|
||||
[[38, 42], "a0", "(pointer int32)"],
|
||||
[[43, 49], "a0", "(pointer vif-tag)"]
|
||||
],
|
||||
"(method 9 clock)": [[47, "v1", "float"]],
|
||||
"vector4-array-add!": [
|
||||
[11, "s5", "(inline-array vector4)"],
|
||||
[12, "s4", "(inline-array vector4)"],
|
||||
[13, "gp", "(inline-array vector4)"]
|
||||
],
|
||||
"vector4-array-lerp!": [
|
||||
[13, "s5", "(inline-array vector4)"],
|
||||
[14, "s4", "(inline-array vector4)"],
|
||||
[15, "gp", "(inline-array vector4)"]
|
||||
],
|
||||
"vector4-array-madd!": [
|
||||
[13, "s5", "(inline-array vector4)"],
|
||||
[14, "s4", "(inline-array vector4)"],
|
||||
[15, "gp", "(inline-array vector4)"]
|
||||
],
|
||||
"vector4-array-msub!": [
|
||||
[13, "s5", "(inline-array vector4)"],
|
||||
[14, "s4", "(inline-array vector4)"],
|
||||
[15, "gp", "(inline-array vector4)"]
|
||||
],
|
||||
"vector4-array-mul!": [
|
||||
[11, "s5", "(inline-array vector4)"],
|
||||
[12, "s4", "(inline-array vector4)"],
|
||||
[13, "gp", "(inline-array vector4)"]
|
||||
],
|
||||
"vector4-array-scale!": [
|
||||
[11, "s5", "(inline-array vector4)"],
|
||||
[12, "gp", "(inline-array vector4)"]
|
||||
],
|
||||
"vector4-array-sub!": [
|
||||
[11, "s5", "(inline-array vector4)"],
|
||||
[12, "s4", "(inline-array vector4)"],
|
||||
[13, "gp", "(inline-array vector4)"]
|
||||
],
|
||||
"ellipsoid-random-point-on!": [
|
||||
[19, "v1", "float"],
|
||||
[44, "v1", "float"]
|
||||
],
|
||||
"(method 15 engine)": [[[0, 36], "v1", "connection"]],
|
||||
"(method 10 connection)": [[8, "a0", "pointer"]],
|
||||
"(method 3 connection-minimap)": [
|
||||
[97, "a3", "float"],
|
||||
[[97, 99], "a3", "float"],
|
||||
[97, "f0", "float"]
|
||||
],
|
||||
"(method 0 prim-strip)": [[[101, 121], "a0", "vector"]],
|
||||
"(method 0 fact-info-target)": [[3, "v0", "fact-info-target"]],
|
||||
"(method 0 fact-info-crate)": [[3, "v0", "fact-info-crate"]],
|
||||
"(method 0 fact-info-enemy)": [
|
||||
[7, "v0", "fact-info-enemy"],
|
||||
["_stack_", 16, "res-tag"],
|
||||
["_stack_", 32, "res-tag"]
|
||||
],
|
||||
"(method 0 fact-info)": [
|
||||
[87, "v1", "(pointer int32)"],
|
||||
[11, "v1", "res-lump"]
|
||||
],
|
||||
"(method 0 collide-shape-moving)": [[[5, 12], "v0", "collide-shape-moving"]],
|
||||
"joint-mod-spinner-callback": [[[2, 63], "gp", "joint-mod-spinner"]],
|
||||
"joint-mod-add-local-callback": [[[1, 37], "s4", "joint-mod-add-local"]],
|
||||
"(top-level-login eye-h)": [[76, "a3", "eye-control"]],
|
||||
"joint-mod-rotate-local-callback": [
|
||||
[[2, 16], "v1", "joint-mod-rotate-local"]
|
||||
],
|
||||
"joint-mod-trans-rot-local-callback": [
|
||||
[[2, 16], "v1", "joint-mod-trans-rot-local"]
|
||||
],
|
||||
"(method 8 res-lump)": [
|
||||
[258, "s0", "array"],
|
||||
[[157, 239], "s0", "(array object)"]
|
||||
],
|
||||
"(method 2 array)": [
|
||||
[23, "gp", "(array int32)"],
|
||||
[43, "gp", "(array uint32)"],
|
||||
[63, "gp", "(array int64)"],
|
||||
[83, "gp", "(array uint64)"],
|
||||
[102, "gp", "(array int8)"],
|
||||
[121, "gp", "(array uint8)"],
|
||||
[141, "gp", "(array int16)"],
|
||||
[161, "gp", "(array uint16)"],
|
||||
[186, "gp", "(array uint128)"],
|
||||
[204, "gp", "(array int32)"],
|
||||
[223, "gp", "(array float)"],
|
||||
[232, "gp", "(array float)"],
|
||||
[249, "gp", "(array basic)"],
|
||||
[258, "gp", "(array basic)"]
|
||||
],
|
||||
"(method 3 array)": [
|
||||
[51, "gp", "(array int32)"],
|
||||
[69, "gp", "(array uint32)"],
|
||||
[87, "gp", "(array int64)"],
|
||||
[105, "gp", "(array uint64)"],
|
||||
[122, "gp", "(array int8)"],
|
||||
[139, "gp", "(array int8)"],
|
||||
[157, "gp", "(array int16)"],
|
||||
[175, "gp", "(array uint16)"],
|
||||
[198, "gp", "(array uint128)"],
|
||||
[214, "gp", "(array int32)"],
|
||||
[233, "gp", "(array float)"],
|
||||
[250, "gp", "(array basic)"]
|
||||
],
|
||||
"(method 9 bounding-box)": [
|
||||
[13, "a1", "(inline-array sphere)"],
|
||||
[24, "a1", "(inline-array sphere)"],
|
||||
[31, "a1", "(inline-array sphere)"],
|
||||
[38, "a1", "(inline-array sphere)"]
|
||||
],
|
||||
"generate-rand-vector-on-sphere": [
|
||||
[12, "v1", "float"],
|
||||
[28, "v1", "float"]
|
||||
],
|
||||
"vector-segment-distance-point!": [[[21, 30], "f1", "float"]],
|
||||
"string-cat-to-last-char": [
|
||||
[3, "s5", "(pointer uint8)"],
|
||||
[4, "s5", "string"]
|
||||
],
|
||||
"to-upper": [
|
||||
[6, "a0", "(pointer uint8)"],
|
||||
[8, "a0", "string"]
|
||||
],
|
||||
"mem-copy!": [
|
||||
[[18, 69], "s5", "(pointer uint128)"],
|
||||
[[18, 69], "s4", "(pointer uint128)"]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,2 +1,519 @@
|
||||
{
|
||||
"(method 0 inline-array-class)": {
|
||||
"args": ["allocation", "type-to-make", "count"]
|
||||
},
|
||||
"(method 9 inline-array-class)": {
|
||||
"args": ["object-to-insert"]
|
||||
},
|
||||
"(method 3 inline-array-class)": {
|
||||
"args": ["idx-to-remove"]
|
||||
},
|
||||
"identity": {
|
||||
"args": ["obj"]
|
||||
},
|
||||
"1/": {
|
||||
"args": ["x"]
|
||||
},
|
||||
"+": {
|
||||
"args": ["a", "b"]
|
||||
},
|
||||
"-": {
|
||||
"args": ["a", "b"]
|
||||
},
|
||||
"*": {
|
||||
"args": ["a", "b"]
|
||||
},
|
||||
"/": {
|
||||
"args": ["a", "b"]
|
||||
},
|
||||
"ash": {
|
||||
"args": ["x", "shift-amount"]
|
||||
},
|
||||
"mod": {
|
||||
"args": ["a", "b"]
|
||||
},
|
||||
"rem": {
|
||||
"args": ["a", "b"]
|
||||
},
|
||||
"abs": {
|
||||
"args": ["x"]
|
||||
},
|
||||
"min": {
|
||||
"args": ["a", "b"]
|
||||
},
|
||||
"max": {
|
||||
"args": ["a", "b"]
|
||||
},
|
||||
"logior": {
|
||||
"args": ["a", "b"]
|
||||
},
|
||||
"logand": {
|
||||
"args": ["a", "b"]
|
||||
},
|
||||
"lognor": {
|
||||
"args": ["a", "b"]
|
||||
},
|
||||
"logxor": {
|
||||
"args": ["a", "b"]
|
||||
},
|
||||
"lognot": {
|
||||
"args": ["x"]
|
||||
},
|
||||
"basic-type?": {
|
||||
"args": ["obj", "typ"]
|
||||
},
|
||||
"type-type?": {
|
||||
"args": ["check-type", "parent-type"]
|
||||
},
|
||||
"type?": {
|
||||
"args": ["obj", "desired-type"]
|
||||
},
|
||||
"find-parent-method": {
|
||||
"args": ["typ", "method-id"]
|
||||
},
|
||||
"ref&": {
|
||||
"args": ["list", "idx"]
|
||||
},
|
||||
"ref": {
|
||||
"args": ["list", "idx"]
|
||||
},
|
||||
"last": {
|
||||
"args": ["list"]
|
||||
},
|
||||
"member": {
|
||||
"args": ["obj-to-find", "list"]
|
||||
},
|
||||
"nmember": {
|
||||
"args": ["obj-to-find", "list"]
|
||||
},
|
||||
"assoc": {
|
||||
"args": ["key", "assoc-list"]
|
||||
},
|
||||
"assoce": {
|
||||
"args": ["key", "assoc-list"]
|
||||
},
|
||||
"nassoc": {
|
||||
"args": ["key", "assoc-list"]
|
||||
},
|
||||
"nassoce": {
|
||||
"args": ["key", "assoc-list"]
|
||||
},
|
||||
"append!": {
|
||||
"args": ["list", "new-obj"]
|
||||
},
|
||||
"delete!": {
|
||||
"args": ["obj", "list"]
|
||||
},
|
||||
"delete-car!": {
|
||||
"args": ["car-to-match", "list"]
|
||||
},
|
||||
"insert-cons!": {
|
||||
"args": ["new-obj", "list"]
|
||||
},
|
||||
"sort": {
|
||||
"args": ["list", "compare-func"]
|
||||
},
|
||||
"string->symbol-debug": {
|
||||
"args": ["str"]
|
||||
},
|
||||
"symbol->string-debug": {
|
||||
"args": ["sym"]
|
||||
},
|
||||
"symbol->hash": {
|
||||
"args": ["sym"]
|
||||
},
|
||||
"mem-copy!": {
|
||||
"args": ["dst", "src", "bytes"]
|
||||
},
|
||||
"qmem-copy<-!": {
|
||||
"args": ["dst", "src", "qwc"]
|
||||
},
|
||||
"qmem-copy->!": {
|
||||
"args": ["dst", "src", "qwc"]
|
||||
},
|
||||
"qmem-clear!": {
|
||||
"args": ["dst", "qwc"]
|
||||
},
|
||||
"mem-set32!": {
|
||||
"args": ["dst", "word-count", "value"]
|
||||
},
|
||||
"mem-or!": {
|
||||
"args": ["dst", "src", "bytes"]
|
||||
},
|
||||
"fact": {
|
||||
"args": ["x"]
|
||||
},
|
||||
"print": {
|
||||
"args": ["obj"]
|
||||
},
|
||||
"printl": {
|
||||
"args": ["obj"]
|
||||
},
|
||||
"inspect": {
|
||||
"args": ["obj"]
|
||||
},
|
||||
"mem-print": {
|
||||
"args": ["ptr", "word-count"]
|
||||
},
|
||||
"print-tree-bitmask": {
|
||||
"args": ["mask", "count"]
|
||||
},
|
||||
"valid?": {
|
||||
"args": [
|
||||
"obj",
|
||||
"expected-type",
|
||||
"err-msg-str",
|
||||
"allow-false",
|
||||
"err-msg-dest"
|
||||
]
|
||||
},
|
||||
"(method 10 collide-mesh-cache)": {
|
||||
"args": ["this", "id"]
|
||||
},
|
||||
"(method 11 touching-prims-entry-pool)": {
|
||||
"vars": {
|
||||
"v1-0": "prev",
|
||||
"a1-0": "current",
|
||||
"a2-0": "next"
|
||||
}
|
||||
},
|
||||
"add-debug-box-with-transform": {
|
||||
"args": ["enable", "bucket", "box", "mat", "color"]
|
||||
},
|
||||
"add-debug-cspace": {
|
||||
"args": ["enable", "bucket", "cs"]
|
||||
},
|
||||
"add-debug-text-sphere": {
|
||||
"args": ["enable", "bucket", "pos", "radius", "text", "color"]
|
||||
},
|
||||
"add-debug-vector": {
|
||||
"args": ["enable", "bucket", "base", "dir", "len-scale", "color"]
|
||||
},
|
||||
"debug-reset-buffers": {
|
||||
"args": ["enable", "bucket", "p0", "p1", "color"]
|
||||
},
|
||||
"get-debug-text-3d": {
|
||||
"args": ["enable", "bucket", "p0", "p1", "color", "mode", "color2"]
|
||||
},
|
||||
"transform-float-point": {
|
||||
"args": ["src-world-pt", "dst-gs-screen-pt"]
|
||||
},
|
||||
"dma-bucket-insert-tag": {
|
||||
"args": ["buckets", "bucket", "start-tag", "end-tag-to-patch"]
|
||||
},
|
||||
"dma-buffer-add-buckets": {
|
||||
"args": ["dma-buf", "bucket-count"]
|
||||
},
|
||||
"dma-buffer-patch-buckets": {
|
||||
"args": ["base", "count"]
|
||||
},
|
||||
"(method 0 dma-buffer)": {
|
||||
"args": ["allocation", "type-to-make", "size-bytes"]
|
||||
},
|
||||
"dma-buffer-add-vu-function": {
|
||||
"args": ["dma-buf", "vu-func", "flush-path-3"]
|
||||
},
|
||||
"dma-buffer-free": {
|
||||
"args": ["dma-buf"]
|
||||
},
|
||||
"dma-buffer-inplace-new": {
|
||||
"args": ["dma-buff", "size-bytes"]
|
||||
},
|
||||
"dma-buffer-length": {
|
||||
"args": ["dma-buf"]
|
||||
},
|
||||
"dma-buffer-send": {
|
||||
"args": ["chan", "buf"]
|
||||
},
|
||||
"dma-buffer-send-chain": {
|
||||
"args": ["chan", "buf"]
|
||||
},
|
||||
"disasm-dma-list": {
|
||||
"args": ["data", "mode", "verbose", "stream", "expected-size"]
|
||||
},
|
||||
"disasm-dma-tag": {
|
||||
"args": ["tag", "format-dest"]
|
||||
},
|
||||
"disasm-vif-details": {
|
||||
"args": ["fmt-dest", "vif-data", "unpack-cmd", "unpack-count"]
|
||||
},
|
||||
"disasm-vif-tag": {
|
||||
"args": ["tag", "count", "format-dest", "details?"]
|
||||
},
|
||||
"(method 13 effect-control)": {
|
||||
"args": ["this", "offset"]
|
||||
},
|
||||
"(method 11 focus)": {
|
||||
"args": ["this", "cspec"]
|
||||
},
|
||||
"(method 0 clock)": {
|
||||
"args": ["allocation", "type-to-make", "index"]
|
||||
},
|
||||
"(method 0 sql-result)": {
|
||||
"args": ["allocation", "type-to-make", "num-elts"]
|
||||
},
|
||||
"(method 16 clock)": {
|
||||
"args": ["this", "xor-val"]
|
||||
},
|
||||
"(method 17 clock)": {
|
||||
"args": ["this", "xor-val"]
|
||||
},
|
||||
"(method 18 clock)": {
|
||||
"args": ["this", "xor-val"]
|
||||
},
|
||||
"(method 19 clock)": {
|
||||
"args": ["this", "xor-val"]
|
||||
},
|
||||
"(method 20 clock)": {
|
||||
"args": ["this", "xor-val"]
|
||||
},
|
||||
"(method 21 clock)": {
|
||||
"args": ["this", "xor-val"]
|
||||
},
|
||||
"(method 22 clock)": {
|
||||
"args": ["this", "xor-val"]
|
||||
},
|
||||
"(method 23 clock)": {
|
||||
"args": ["this", "xor-val"]
|
||||
},
|
||||
"(method 10 joint-mod-polar-look-at)": {
|
||||
"args": ["this", "pos"]
|
||||
},
|
||||
"(method 11 joint-mod-polar-look-at)": {
|
||||
"args": ["this", "other", "pos"]
|
||||
},
|
||||
"(method 12 joint-mod-polar-look-at)": {
|
||||
"args": ["this", "duration", "final-val", "restart-if-in-progress"]
|
||||
},
|
||||
"(method 13 joint-mod)": {
|
||||
"args": ["this", "x", "y", "z"]
|
||||
},
|
||||
"(method 13 joint-mod-polar-look-at)": {
|
||||
"args": ["this", "duration", "restart-if-in-progress"]
|
||||
},
|
||||
"(method 14 joint-mod)": {
|
||||
"args": ["this", "trans", "quat", "scale"]
|
||||
},
|
||||
"(method 9 joint-mod)": {
|
||||
"args": ["this", "mode"]
|
||||
},
|
||||
"(method 9 joint-mod-ik)": {
|
||||
"args": ["this", "pos"]
|
||||
},
|
||||
"joint-mod-blend-local-callback": {
|
||||
"args": ["bone-cspace", "joint-transform"]
|
||||
},
|
||||
"joint-mod-blend-world-callback": {
|
||||
"args": ["bone-cspace", "joint-transform"]
|
||||
},
|
||||
"joint-mod-rotate-world-callback": {
|
||||
"args": ["bone-cspace", "joint-transform"]
|
||||
},
|
||||
"joint-mod-set-local-callback": {
|
||||
"args": ["bone-cspace", "joint-transform"]
|
||||
},
|
||||
"joint-mod-set-world-callback": {
|
||||
"args": ["bone-cspace", "joint-trasnform"]
|
||||
},
|
||||
"joint-mod-set-world-no-trans-callback": {
|
||||
"args": ["bone-cspace", "joint-transform"]
|
||||
},
|
||||
"vector<-cspace2!": {
|
||||
"args": ["output-vec", "input-cspace"]
|
||||
},
|
||||
"light-group-lerp!": {
|
||||
"args": ["group", "backup-ptr", "other", "scalar"]
|
||||
},
|
||||
"light-group-madd!": {
|
||||
"args": ["group", "backup-ptr", "other", "scalar"],
|
||||
"vars": {
|
||||
"s4-0": "new-light",
|
||||
"f30-0": "ambi-scaled",
|
||||
"f24-0": "dir0-scaled",
|
||||
"f26-0": "dir1-scaled",
|
||||
"f28-0": "dir2-scaled"
|
||||
}
|
||||
},
|
||||
"light-group-process!": {
|
||||
"args": ["vu-lights", "light-group", "vec1", "vec2"]
|
||||
},
|
||||
"light-group-scale!": {
|
||||
"args": ["group", "backup-ptr", "scale"],
|
||||
"vars": {
|
||||
"arg1": "other",
|
||||
"v1-4": "light-idx"
|
||||
}
|
||||
},
|
||||
"light-group-slerp": {
|
||||
"args": ["light-group-out", "light-group-a", "light-group-b", "alpha"],
|
||||
"vars": {
|
||||
"s2-0": "group-idx"
|
||||
}
|
||||
},
|
||||
"light-merge!": {
|
||||
"args": ["out", "other"]
|
||||
},
|
||||
"light-slerp": {
|
||||
"args": ["light-out", "light-a", "light-b", "alpha"],
|
||||
"vars": {
|
||||
"s3-0": "clamped-alpha",
|
||||
"f0-2": "extra-x-a",
|
||||
"f1-2": "extra-x-b"
|
||||
}
|
||||
},
|
||||
"lookup-light-sphere-by-name": {
|
||||
"args": ["name", "hash"],
|
||||
"vars": {
|
||||
"s4-0": "num-lights",
|
||||
"s3-0": "light"
|
||||
}
|
||||
},
|
||||
"shadow-info-copy!": {
|
||||
"args": ["dest", "src"],
|
||||
"vars": {
|
||||
"v1-0": "light-idx"
|
||||
}
|
||||
},
|
||||
"vu-lights-default!": {
|
||||
"args": ["lights"]
|
||||
},
|
||||
"destroy-mem": {
|
||||
"args": ["start", "end"]
|
||||
},
|
||||
"dgo-load-begin": {
|
||||
"args": ["name", "buffer1", "buffer2", "buffer-top"]
|
||||
},
|
||||
"dgo-load-continue": {
|
||||
"args": ["buffer1", "buffer2", "buffer-top"]
|
||||
},
|
||||
"dgo-load-get-next": {
|
||||
"args": ["done-out"]
|
||||
},
|
||||
"find-temp-buffer": {
|
||||
"args": ["size"]
|
||||
},
|
||||
"str-ambient-play": {
|
||||
"args": ["name"]
|
||||
},
|
||||
"str-ambient-stop": {
|
||||
"args": ["name"]
|
||||
},
|
||||
"str-load": {
|
||||
"args": ["name", "chunk-idx", "dest-addr", "max-len"]
|
||||
},
|
||||
"str-load-status": {
|
||||
"args": ["maxlen-out"]
|
||||
},
|
||||
"str-play-async": {
|
||||
"args": ["name", "id", "volume", "group"]
|
||||
},
|
||||
"str-play-queue": {
|
||||
"args": ["name0", "name1", "name2", "name3", "ids", "mask"]
|
||||
},
|
||||
"str-play-stop": {
|
||||
"args": ["name", "id"]
|
||||
},
|
||||
"merc-fragment-fp-data": {
|
||||
"args": ["frag"]
|
||||
},
|
||||
"(method 13 mood-control)": {
|
||||
"args": ["this", "target-interp", "rate-interp", "set-current-interp?"],
|
||||
"vars": {
|
||||
"f0-1": "clamped-interp"
|
||||
}
|
||||
},
|
||||
"init-mood-control": {
|
||||
"args": ["ctrl"]
|
||||
},
|
||||
"cspace-index-by-name-no-fail": {
|
||||
"args": ["proc", "name"],
|
||||
"vars": {
|
||||
"v0-0": "idx"
|
||||
}
|
||||
},
|
||||
"joint-channel-float-delete!": {
|
||||
"args": ["chan"]
|
||||
},
|
||||
"num-func-+!": {
|
||||
"args": ["chan", "arg1", "arg2", "arg3"]
|
||||
},
|
||||
"num-func--!": {
|
||||
"args": ["chan", "arg1", "arg2", "arg3"]
|
||||
},
|
||||
"num-func-identity": {
|
||||
"args": ["chan", "arg1", "arg2", "arg3"]
|
||||
},
|
||||
"num-func-loop!": {
|
||||
"args": ["chan", "arg1", "arg2", "arg3"]
|
||||
},
|
||||
"num-func-loop-set!": {
|
||||
"args": ["chan", "frame"]
|
||||
},
|
||||
"num-func-none": {
|
||||
"args": ["chan", "arg1", "arg2", "arg3"]
|
||||
},
|
||||
"num-func-seek!": {
|
||||
"args": ["chan", "arg1", "arg2", "arg3"]
|
||||
},
|
||||
"(method 15 res-lump)": {
|
||||
"vars": {
|
||||
"s5-0": ["tag-pair", "res-tag-pair"],
|
||||
"s2-0": "existing-tag",
|
||||
"s3-0": "data-size",
|
||||
"v1-25": "resource-mem"
|
||||
}
|
||||
},
|
||||
"(method 17 res-lump)": {
|
||||
"args": ["this", "tag", "arg2"]
|
||||
},
|
||||
"(method 20 res-lump)": {
|
||||
"args": ["this", "arg1", "tag-pair", "arg3"]
|
||||
},
|
||||
"(method 9 res-lump)": {
|
||||
"args": ["this", "name", "mode", "time"]
|
||||
},
|
||||
"(method 0 rpc-buffer)": {
|
||||
"args": ["allocation", "type-to-make", "elt-size", "elt-count"]
|
||||
},
|
||||
"(method 0 rpc-buffer-pair)": {
|
||||
"args": ["allocation", "type-to-make", "elt-size", "elt-count", "rpc-port"]
|
||||
},
|
||||
"(method 12 rpc-buffer-pair)": {
|
||||
"args": ["this", "print-stall-warning"]
|
||||
},
|
||||
"(method 9 rpc-buffer-pair)": {
|
||||
"args": ["this", "fno", "recv-buffer", "recv-buffer-size"]
|
||||
},
|
||||
"(method 10 smush-control)": {
|
||||
"vars": {
|
||||
"f30-0": "elapsed-time",
|
||||
"f0-2": "period"
|
||||
}
|
||||
},
|
||||
"(method 11 smush-control)": {
|
||||
"vars": {
|
||||
"f30-0": "elapsed-time",
|
||||
"f0-2": "period"
|
||||
}
|
||||
},
|
||||
"(method 12 smush-control)": {
|
||||
"args": [
|
||||
"this",
|
||||
"amplitude",
|
||||
"period",
|
||||
"duration",
|
||||
"damp-amplitude",
|
||||
"damp-period",
|
||||
"clock"
|
||||
]
|
||||
},
|
||||
"(method 9 clock)": {
|
||||
"args": ["this", "rate"]
|
||||
},
|
||||
"vector-rad<-vector-deg!": {
|
||||
"args": ["out", "in"]
|
||||
},
|
||||
"vector-rad<-vector-deg/2!": {
|
||||
"args": ["out", "in"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1070,7 +1070,8 @@ const std::unordered_map<
|
||||
}},
|
||||
{GameVersion::JakX,
|
||||
{
|
||||
// TODO
|
||||
{"lightning-probe-vars",
|
||||
{{"probe-dirs", ArrayFieldDecompMeta(TypeSpec("vector"), 16)}}},
|
||||
}}};
|
||||
|
||||
goos::Object decompile_structure(const TypeSpec& type,
|
||||
|
||||
@@ -16,5 +16,5 @@ constexpr PerGameVersion<int> SYMBOL_TO_STRING_MEM_OFFSET_DECOMP = {
|
||||
8167 * 8, jak2::SYM_TO_STRING_OFFSET, -99999, -99999, // not supported this way!
|
||||
};
|
||||
|
||||
constexpr PerGameVersion<int> OFFSET_OF_NEXT_STATE_STORE = {72, 64, 68, 68};
|
||||
constexpr PerGameVersion<int> OFFSET_OF_NEXT_STATE_STORE = {72, 64, 68, 76};
|
||||
} // namespace decompiler
|
||||
|
||||
@@ -1283,4 +1283,7 @@
|
||||
((eq? GAME_VERSION 'jak3)
|
||||
(asm-file "goal_src/jak3/compiler-setup.gc")
|
||||
)
|
||||
((eq? GAME_VERSION 'jakx)
|
||||
(asm-file "goal_src/jakx/compiler-setup.gc")
|
||||
)
|
||||
)
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
;;
|
||||
;; Compiler Setup for Jak X
|
||||
;;
|
||||
|
||||
;; load kernel type definitions.
|
||||
;; these types/functions are provided by Jak X's runtime.
|
||||
(asm-file "goal_src/jakx/kernel-defs.gc")
|
||||
|
||||
;; load jak x project
|
||||
(load-project "goal_src/jakx/game.gp")
|
||||
|
||||
(defmacro basic? (obj)
|
||||
;; todo, make this more efficient
|
||||
`(= 4 (logand (the integer ,obj) #b111))
|
||||
)
|
||||
|
||||
(defmacro pair? (obj)
|
||||
;; todo, make this more efficient
|
||||
;`(= 2 (logand (the integer ,obj) #b111))
|
||||
`(< (shl (the-as int ,obj) 62) 0)
|
||||
)
|
||||
|
||||
(defmacro not-pair? (obj)
|
||||
`(>= (shl (the-as int ,obj) 62) 0)
|
||||
)
|
||||
|
||||
(defmacro binteger? (obj)
|
||||
`(zero? (logand (the integer ,obj) #b111))
|
||||
)
|
||||
|
||||
(defmacro rtype-of (obj)
|
||||
`(cond ((binteger? ,obj) binteger)
|
||||
((pair? ,obj) pair)
|
||||
((basic? ,obj) (-> (the basic ,obj) type))
|
||||
(else symbol)
|
||||
)
|
||||
)
|
||||
@@ -29,6 +29,7 @@
|
||||
"video-h.o"
|
||||
"vu1-user-h.o"
|
||||
"profile-h.o"
|
||||
"dma.o"
|
||||
"dma-buffer.o"
|
||||
"dma-bucket.o"
|
||||
"dma-disasm.o"
|
||||
@@ -203,15 +204,19 @@
|
||||
"history.o"
|
||||
"merc-vu1.o"
|
||||
"emerc-vu1.o"
|
||||
"merc-blend-shape.o"
|
||||
"merc.o"
|
||||
"emerc.o"
|
||||
"ripple.o"
|
||||
"bones.o"
|
||||
"debug-foreground.o"
|
||||
"foreground.o"
|
||||
"generic-vu0.o"
|
||||
"generic-vu1.o"
|
||||
"generic-effect.o"
|
||||
"generic-merc.o"
|
||||
"generic-tie.o"
|
||||
"shadow-cpu.o"
|
||||
"shadow-vu1.o"
|
||||
"warp.o"
|
||||
"hflip.o"
|
||||
@@ -264,7 +269,9 @@
|
||||
"collide-hash.o"
|
||||
"collide-probe.o"
|
||||
"collide-frag.o"
|
||||
"collide-mesh.o"
|
||||
"collide-touch.o"
|
||||
"collide-shape.o"
|
||||
"collide-shape-rider.o"
|
||||
"collide.o"
|
||||
"collide-planes.o"
|
||||
@@ -315,9 +322,11 @@
|
||||
"main-collide.o"
|
||||
"video.o"
|
||||
"main.o"
|
||||
"collide-cache.o"
|
||||
"collide-debug.o"
|
||||
"relocate.o"
|
||||
"memory-usage.o"
|
||||
"entity.o"
|
||||
"path.o"
|
||||
"vol.o"
|
||||
"nav-engine.o"
|
||||
@@ -327,6 +336,7 @@
|
||||
"water-part.o"
|
||||
"water.o"
|
||||
"water-flow.o"
|
||||
"task-control.o"
|
||||
"scene.o"
|
||||
"movie-path.o"
|
||||
"pov-camera.o"
|
||||
@@ -391,6 +401,7 @@
|
||||
"net-aux-voice.o"
|
||||
"net-mgr-medius.o"
|
||||
"net-mgr-muis.o"
|
||||
"net-mgr-medius-cache.o"
|
||||
"net-mgr-medius-players.o"
|
||||
"net-mgr-medius-buddies.o"
|
||||
"net-mgr-medius-clans.o"
|
||||
@@ -421,6 +432,7 @@
|
||||
"udp-layer.o"
|
||||
"headset.o"
|
||||
"idle-control.o"
|
||||
"water-anim.o"
|
||||
"rigid-body-debug.o"
|
||||
"rigid-body-surface.o"
|
||||
"rigid-body.o"
|
||||
@@ -482,6 +494,7 @@
|
||||
"part-tester.o"
|
||||
"manipulator.o"
|
||||
"editable-h.o"
|
||||
"editable.o"
|
||||
"editable-player.o"
|
||||
"mysql-nav-graph.o"
|
||||
"nav-graph-editor.o"
|
||||
@@ -547,7 +560,6 @@
|
||||
"helmet-e-ag.go"
|
||||
"helmet-f-ag.go"
|
||||
"menu2-part.o"
|
||||
"menu2-COMMON-GAME.o"
|
||||
"intro-part.o"
|
||||
"intro-scenes2.o"
|
||||
"intro-scenes.o"
|
||||
@@ -638,6 +650,7 @@
|
||||
"wcar-daxtermobile.o"
|
||||
"drift.o"
|
||||
"race-mesh.o"
|
||||
"race-line.o"
|
||||
"race-ai-tuning.o"
|
||||
"minimap.o"
|
||||
"jakx-init.o"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"gkernel-h.o"
|
||||
"gkernel.o"
|
||||
"pskernel.o"
|
||||
"gstring.o"
|
||||
"dgo-h.o"
|
||||
"gstate.o"
|
||||
))
|
||||
|
||||
@@ -80,5 +80,5 @@
|
||||
"garage-turntable-ag.go"
|
||||
"garage-door-ag.go"
|
||||
"interface-cam-ag.go"
|
||||
"menu2-MENU2.o"
|
||||
"menu2.go"
|
||||
))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,5 +5,162 @@
|
||||
;; name in dgo: joint-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++joint-control-command
|
||||
(defenum joint-control-command
|
||||
:type uint64
|
||||
(push 1)
|
||||
(blend 2)
|
||||
(four 4)
|
||||
(eight 8)
|
||||
(push1 19)
|
||||
(jcc32 32)
|
||||
(stack 36)
|
||||
(float 42)
|
||||
(stack1 52)
|
||||
)
|
||||
;; ---joint-control-command
|
||||
|
||||
|
||||
;; +++joint-control-status
|
||||
(defenum joint-control-status
|
||||
:type uint16
|
||||
:bitfield #t
|
||||
|
||||
(sync-math 0) ;; 1
|
||||
(spooling 1) ;; 2
|
||||
(spooling-not-last-block 2) ;; 4
|
||||
(blend-shape 3) ;; 8
|
||||
(math-when-off-screen 4) ;; 16
|
||||
(valid-spooled-frame 5) ;; 32
|
||||
(blend-shape-valid 6) ;; 64
|
||||
(eye-anim-valid 7) ;; 128
|
||||
(eye-anim 8) ;; 256
|
||||
(force-math 9)
|
||||
(no-joint-callbacks 10)
|
||||
)
|
||||
;; ---joint-control-status
|
||||
|
||||
(declare-type joint-control basic)
|
||||
|
||||
(define-extern cspace<-transformq! (function cspace transformq matrix))
|
||||
(define-extern cspace<-parented-transformq-joint! (function cspace transformq none))
|
||||
|
||||
(declare-type effect-control basic)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype joint-control-channel (structure)
|
||||
"A single animation channel that controls a number of joints.
|
||||
Multiple channels are used to blend animations together."
|
||||
((parent joint-control)
|
||||
(frame-group art-joint-anim)
|
||||
(frame-num float)
|
||||
(dist meters)
|
||||
(num-func (function joint-control-channel float float float float))
|
||||
(param float 3)
|
||||
(frame-interp float 2)
|
||||
(inspector-amount uint8)
|
||||
(command joint-control-command)
|
||||
(group-sub-index int8)
|
||||
(group-size int8)
|
||||
(eval-time uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype top-anim-joint-control (basic)
|
||||
((process (pointer process-drawable))
|
||||
(interp-select uint64 2)
|
||||
(base-anim basic)
|
||||
(base-anim-speed float)
|
||||
(base-anim-blend float)
|
||||
(interp float)
|
||||
(frame-group art-joint-anim)
|
||||
(frame-group-push art-joint-anim)
|
||||
(frame-num float)
|
||||
(frame-targ art-joint-anim)
|
||||
(frame-speed float)
|
||||
(frame-blend float)
|
||||
(frame-cur-blend float)
|
||||
(frame-start float)
|
||||
(frame-post-blend float)
|
||||
(frame-post-end float)
|
||||
(frame-push-time time-frame)
|
||||
(frame-post-put-away basic)
|
||||
(update-time time-frame)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type process-drawable) _type_)
|
||||
(reset (_type_) none)
|
||||
(update (_type_) none)
|
||||
(get-channel (_type_ int) joint-control-channel)
|
||||
(push-anim-to-targ (_type_ art-joint-anim float int int float float symbol) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype joint-control (basic)
|
||||
"Every [[process-drawable]] has a [[joint-control]] that handles all the animation channels."
|
||||
((status joint-control-status)
|
||||
(allocated-length uint8)
|
||||
(active-channels uint8)
|
||||
(root-channel (inline-array joint-control-channel) :offset 16)
|
||||
(blend-index uint8)
|
||||
(active-frame-interp uint8)
|
||||
(float-channels uint8)
|
||||
(generate-frame-function (function joint-anim-frame int joint-control int))
|
||||
(prebind-function (function joint-anim-frame int joint-control int))
|
||||
(postbind-function (function draw-control cspace-array joint-control none))
|
||||
(effect effect-control)
|
||||
(interp-select int64 2)
|
||||
(top-anim top-anim-joint-control)
|
||||
(override (array float))
|
||||
(channel joint-control-channel :inline :dynamic)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type int) _type_)
|
||||
(current-cycle-distance (_type_) float)
|
||||
(update-anim-data (_type_) none)
|
||||
(debug-print-channels (_type_ symbol) int)
|
||||
(joint-control-method-12 (_type_ int) joint-control-channel)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype matrix-stack (structure)
|
||||
((top matrix)
|
||||
(data matrix 24 :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype channel-upload-info (structure)
|
||||
"Information about an upload of animation data to a single joint channel."
|
||||
((fixed joint-anim-compressed-fixed)
|
||||
(fixed-qwc int32)
|
||||
(frame joint-anim-compressed-frame)
|
||||
(frame-qwc int32)
|
||||
(amount float)
|
||||
(interp float)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype joint-work (structure)
|
||||
((temp-mtx matrix :inline)
|
||||
(joint-stack matrix-stack :inline)
|
||||
(fix-jmp-table (function none) 16)
|
||||
(frm-jmp-table (function none) 16)
|
||||
(pair-jmp-table (function none) 16)
|
||||
(uploads channel-upload-info 24 :inline)
|
||||
(num-uploads int32)
|
||||
(mtx-acc matrix 2 :inline)
|
||||
(tq-acc transformq 100 :inline)
|
||||
(jacp-hdr joint-anim-compressed-hdr :inline)
|
||||
(fixed-data joint-anim-compressed-fixed :inline)
|
||||
(frame-data joint-anim-compressed-frame 2 :inline)
|
||||
(flatten-array float 576 :overlay-at mtx-acc)
|
||||
(flattened vector 24 :inline :overlay-at mtx-acc)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -5,5 +5,74 @@
|
||||
;; name in dgo: joint-mod-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++joint-mod-base-flags
|
||||
(defenum joint-mod-base-flags
|
||||
:bitfield #t
|
||||
:type uint16
|
||||
(attached 0)
|
||||
(trans 1)
|
||||
(quat 2)
|
||||
(scale 3)
|
||||
)
|
||||
;; ---joint-mod-base-flags
|
||||
|
||||
|
||||
;; +++joint-mod-polar-flags
|
||||
(defenum joint-mod-polar-flags
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
(no-z-rot 0)
|
||||
(blending-to-zero 1)
|
||||
(negate-nose 2)
|
||||
(negate-ear 3)
|
||||
(negate-up 4)
|
||||
)
|
||||
;; ---joint-mod-polar-flags
|
||||
|
||||
;; +++joint-mod-mode
|
||||
(defenum joint-mod-mode
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(flex-blend)
|
||||
(look-at)
|
||||
(world-look-at)
|
||||
(rotate)
|
||||
(joint-set)
|
||||
(joint-set*)
|
||||
(rotate2) ;; ??
|
||||
(reset)
|
||||
(polar-look-at)
|
||||
(joint-set*-world)
|
||||
(gun-look-at)
|
||||
(foot-rot)
|
||||
(joint-set-world)
|
||||
)
|
||||
;; ---joint-mod-mode
|
||||
|
||||
;; +++track-mode
|
||||
(defenum track-mode
|
||||
:bitfield #t
|
||||
:type uint16
|
||||
(track-on 0) ;; 1
|
||||
(track-x 1) ;; 2
|
||||
(track-y 2) ;; 4
|
||||
(lock-on 3) ;; 8
|
||||
(no-trans 4) ;; 16
|
||||
(no-rotate 5) ;; 32
|
||||
(no-scale 6) ;; 64
|
||||
)
|
||||
;; ---track-mode
|
||||
|
||||
;; +++joint-mod-ik-flags
|
||||
(defenum joint-mod-ik-flags
|
||||
:bitfield #t
|
||||
:type uint8
|
||||
(enable)
|
||||
(elbow-trans-neg)
|
||||
(elbow-rot-neg)
|
||||
)
|
||||
;; ---joint-mod-ik-flags
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -7,3 +7,84 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype joint (basic)
|
||||
"A joint from an animated skeleton. This defines the graph of the skeleton, and also the bind pose
|
||||
used for the mesh data. The joints are shared between all instances of the same model."
|
||||
((name basic)
|
||||
(number int32)
|
||||
(parent joint)
|
||||
(bind-pose matrix :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bone-cache (structure)
|
||||
"Unused type. Existed in Jak 1, but wasn't used there."
|
||||
((bone-matrix uint32)
|
||||
(parent-matrix uint32)
|
||||
(dummy uint32)
|
||||
(frame uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bone (structure)
|
||||
"The location and scale of a bone in an animated skeleton. Each instance of a skeleton
|
||||
has its own copy of the bones. This data is used for collision checking or other gameplay math,
|
||||
but, despite the name, isn't directly used in rendering."
|
||||
((transform matrix :inline)
|
||||
(position vector :inline :overlay-at (-> transform data 12))
|
||||
(scale vector :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype skeleton (inline-array-class)
|
||||
"Skeleton is an array of bones for the entire character. The bones are stored in an inline array so they can be
|
||||
easily dma'd to the scratchpad later."
|
||||
((bones bone :inline :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(set! (-> skeleton heap-base) (the-as uint 80))
|
||||
|
||||
(deftype cspace (structure)
|
||||
"A cspace describes how to control a bone. It contains a reference to the joint, bone, and a callback function.
|
||||
The callback function is used to take the joint transforms out of the joint animation, then update the bone."
|
||||
((parent cspace)
|
||||
(joint joint)
|
||||
(joint-num int16)
|
||||
(geo drawable)
|
||||
(bone bone)
|
||||
(param0 (function cspace transformq none))
|
||||
(param1 basic)
|
||||
(param2 basic)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type drawable) _type_)
|
||||
(reset-and-assign-geo! (_type_ drawable) _type_)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype cspace-array (inline-array-class)
|
||||
((data cspace :inline :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(set! (-> cspace-array heap-base) (the-as uint 32))
|
||||
|
||||
(defmethod print ((this cspace))
|
||||
(format
|
||||
#t
|
||||
"#<cspace ~S @ #x~X>"
|
||||
(if (-> this joint)
|
||||
(-> this joint name)
|
||||
"nojoint"
|
||||
)
|
||||
this
|
||||
)
|
||||
this
|
||||
)
|
||||
|
||||
@@ -7,3 +7,107 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; this file is debug only
|
||||
(declare-file (debug))
|
||||
|
||||
(define *redline-table* (the-as (pointer float) (malloc 'debug 1600)))
|
||||
|
||||
(define *redline-index* 0)
|
||||
|
||||
(defun float-save-redline ((arg0 float))
|
||||
(set! (-> *redline-table* *redline-index*) arg0)
|
||||
(set! *redline-index* (+ *redline-index* 1))
|
||||
(when (>= *redline-index* 400)
|
||||
(set! *redline-index* 0)
|
||||
0
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun float-lookup-redline ((arg0 float))
|
||||
(let ((a0-3 (mod (+ (the int arg0) -1 *redline-index*) 400)))
|
||||
(-> *redline-table* a0-3)
|
||||
)
|
||||
)
|
||||
|
||||
(define *blueline-table* (the-as (pointer float) (malloc 'debug 1600)))
|
||||
|
||||
(define *blueline-index* 0)
|
||||
|
||||
(defun float-save-blueline ((arg0 float))
|
||||
(set! (-> *blueline-table* *blueline-index*) arg0)
|
||||
(set! *blueline-index* (+ *blueline-index* 1))
|
||||
(when (>= *blueline-index* 400)
|
||||
(set! *blueline-index* 0)
|
||||
0
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun float-lookup-blueline ((arg0 float))
|
||||
(let ((a0-3 (mod (+ (the int arg0) -1 *blueline-index*) 400)))
|
||||
(-> *blueline-table* a0-3)
|
||||
)
|
||||
)
|
||||
|
||||
(define *greenline-table* (the-as (pointer float) (malloc 'debug 1600)))
|
||||
|
||||
(define *greenline-index* 0)
|
||||
|
||||
(defun float-save-greenline ((arg0 float))
|
||||
(set! (-> *greenline-table* *greenline-index*) arg0)
|
||||
(set! *greenline-index* (+ *greenline-index* 1))
|
||||
(when (>= *greenline-index* 400)
|
||||
(set! *greenline-index* 0)
|
||||
0
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun float-lookup-greenline ((arg0 float))
|
||||
(let ((a0-3 (mod (+ (the int arg0) -1 *greenline-index*) 400)))
|
||||
(-> *greenline-table* a0-3)
|
||||
)
|
||||
)
|
||||
|
||||
(define *yellowline-table* (the-as (pointer float) (malloc 'debug 1600)))
|
||||
|
||||
(define *yellowline-index* 0)
|
||||
|
||||
(defun float-save-yellowline ((arg0 float))
|
||||
(set! (-> *yellowline-table* *yellowline-index*) arg0)
|
||||
(set! *yellowline-index* (+ *yellowline-index* 1))
|
||||
(when (>= *yellowline-index* 400)
|
||||
(set! *yellowline-index* 0)
|
||||
0
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun float-lookup-yellowline ((arg0 float))
|
||||
(let ((a0-3 (mod (+ (the int arg0) -1 *yellowline-index*) 400)))
|
||||
(-> *yellowline-table* a0-3)
|
||||
)
|
||||
)
|
||||
|
||||
(define *timeplot-table* (the-as (pointer float) (malloc 'debug 1600)))
|
||||
|
||||
(define *timeplot-index* 0)
|
||||
|
||||
(defun float-save-timeplot ((arg0 float))
|
||||
(set! (-> *timeplot-table* *timeplot-index*) arg0)
|
||||
(set! *timeplot-index* (+ *timeplot-index* 1))
|
||||
(when (>= *timeplot-index* 400)
|
||||
(set! *timeplot-index* 0)
|
||||
0
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun float-lookup-timeplot ((arg0 float))
|
||||
(let ((a0-3 (mod (+ (the int arg0) -1 *timeplot-index*) 400)))
|
||||
(-> *timeplot-table* a0-3)
|
||||
)
|
||||
)
|
||||
|
||||
(define-perm *cam-layout* symbol #f)
|
||||
|
||||
@@ -5,5 +5,13 @@
|
||||
;; name in dgo: cam-interface-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
(define-extern math-camera-matrix (function matrix))
|
||||
(define-extern camera-pos (function vector))
|
||||
(define-extern math-camera-pos (function vector))
|
||||
(define-extern matrix-local->world (function symbol symbol matrix))
|
||||
(define-extern matrix-world->local (function symbol object matrix))
|
||||
(define-extern camera-matrix (function matrix))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define-perm *camera-init-mat* matrix #f)
|
||||
|
||||
@@ -5,5 +5,46 @@
|
||||
;; name in dgo: cam-update-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++external-cam-option
|
||||
(defenum external-cam-option
|
||||
:bitfield #t
|
||||
(allow-z 0)
|
||||
)
|
||||
;; ---external-cam-option
|
||||
|
||||
(define-extern *camera-look-through-other* int)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *external-cam-options* (the-as external-cam-option 0))
|
||||
|
||||
(define *external-cam-mode* #f)
|
||||
|
||||
(when (or (not *camera-look-through-other*) (zero? *camera-look-through-other*))
|
||||
(set! *camera-look-through-other* 0)
|
||||
0
|
||||
)
|
||||
|
||||
(define-perm *camera-other-fov* bfloat (new 'static 'bfloat :data 11650.845))
|
||||
|
||||
(define-perm *camera-other-trans* vector (vector-reset! (new 'global 'vector)))
|
||||
|
||||
(define-perm *camera-other-matrix* matrix (matrix-identity! (new 'global 'matrix)))
|
||||
|
||||
(define-perm *camera-smush-control* smush-control (set-zero! (new 'global 'smush-control)))
|
||||
|
||||
(define-perm *camera-smush-control-horizontal* smush-control (set-zero! (new 'global 'smush-control)))
|
||||
|
||||
(define-perm *camera-smush-control-into* smush-control (set-zero! (new 'global 'smush-control)))
|
||||
|
||||
(define-perm *camera-smush-control-2* smush-control (set-zero! (new 'global 'smush-control)))
|
||||
|
||||
(define-perm *camera-smush-control-horizontal-2* smush-control (set-zero! (new 'global 'smush-control)))
|
||||
|
||||
(define-perm *camera-smush-control-into-2* smush-control (set-zero! (new 'global 'smush-control)))
|
||||
|
||||
(define-perm *camera-other-root* vector (vector-reset! (new 'global 'vector)))
|
||||
|
||||
(define *fix-visible-level-mask* 6)
|
||||
|
||||
(define *manual-sample-point* #f)
|
||||
|
||||
@@ -7,3 +7,55 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype camera-bank (basic)
|
||||
((collide-move-rad float)
|
||||
(joypad uint32)
|
||||
(min-detectable-velocity float)
|
||||
(attack-timeout time-frame)
|
||||
(default-string-max-y meters)
|
||||
(default-string-min-y meters)
|
||||
(default-string-max-z meters)
|
||||
(default-string-min-z meters)
|
||||
(default-string-push-z meters)
|
||||
(default-tilt-adjust degrees)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *CAMERA-bank* (new 'static 'camera-bank
|
||||
:collide-move-rad 1638.4
|
||||
:min-detectable-velocity 40.96
|
||||
:attack-timeout (seconds 0.25)
|
||||
:default-string-max-y (meters 3)
|
||||
:default-string-min-y (meters 1)
|
||||
:default-string-max-z (meters 12.5)
|
||||
:default-string-min-z (meters 5)
|
||||
:default-string-push-z (meters 10)
|
||||
:default-tilt-adjust (degrees -6.5000005)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype camera-master-bank (basic)
|
||||
((onscreen-head-height meters)
|
||||
(onscreen-foot-height meters)
|
||||
(target-height meters)
|
||||
(up-move-to-pitch-ratio-in-air float)
|
||||
(down-move-to-pitch-ratio-in-air float)
|
||||
(up-move-to-pitch-on-ground float)
|
||||
(down-move-to-pitch-on-ground float)
|
||||
(pitch-off-blend float)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *CAMERA_MASTER-bank* (new 'static 'camera-master-bank
|
||||
:onscreen-head-height (meters 2.65)
|
||||
:onscreen-foot-height (meters -0.5)
|
||||
:target-height (meters 2.15)
|
||||
:up-move-to-pitch-ratio-in-air 1.0
|
||||
:down-move-to-pitch-ratio-in-air 0.5
|
||||
:up-move-to-pitch-on-ground 0.9
|
||||
:down-move-to-pitch-on-ground 0.9
|
||||
:pitch-off-blend 0.5
|
||||
)
|
||||
)
|
||||
|
||||
@@ -5,5 +5,57 @@
|
||||
;; name in dgo: camera-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; DECOMP BEGINS
|
||||
;; +++cam-index-options
|
||||
(defenum cam-index-options
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
(SPHERICAL)
|
||||
(RADIAL)
|
||||
)
|
||||
;; ---cam-index-options
|
||||
|
||||
;; +++slave-los-state
|
||||
(defenum slave-los-state
|
||||
:type uint32
|
||||
(none 0)
|
||||
(cw 1)
|
||||
(ccw 2)
|
||||
(between 3)
|
||||
)
|
||||
;; ---slave-los-state
|
||||
|
||||
;; +++camera-blend-to-type
|
||||
(defenum camera-blend-to-type
|
||||
:type uint64
|
||||
(unknown-0 0)
|
||||
(unknown-1 1)
|
||||
(unknown-2 2)
|
||||
)
|
||||
;; ---camera-blend-to-type
|
||||
|
||||
;; +++camera-blend-from-type
|
||||
(defenum camera-blend-from-type
|
||||
:type uint64
|
||||
(unknown-0 0)
|
||||
(unknown-1 1)
|
||||
(unknown-2 2)
|
||||
)
|
||||
;; ---camera-blend-from-type
|
||||
|
||||
;; +++cam-slave-options-u32
|
||||
(defenum cam-slave-options-u32
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
:copy-entries cam-slave-options
|
||||
)
|
||||
;; ---cam-slave-options-u32
|
||||
|
||||
;; +++cam-master-options-u32
|
||||
(defenum cam-master-options-u32
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
:copy-entries cam-master-options
|
||||
)
|
||||
;; ---cam-master-options-u32
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
@@ -6,4 +6,3 @@
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -5,5 +5,166 @@
|
||||
;; name in dgo: collide-cache-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++prim-type
|
||||
(defenum prim-type
|
||||
:type int8
|
||||
(prim -2)
|
||||
(sphere -1)
|
||||
(group 0)
|
||||
(mesh 1)
|
||||
(fake-prim 2)
|
||||
)
|
||||
;; ---prim-type
|
||||
|
||||
(declare-type collide-cache-prim structure)
|
||||
(declare-type collide-using-spheres-params structure)
|
||||
(declare-type instance-tie structure)
|
||||
(declare-type collide-list structure)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype collide-puss-sphere (structure)
|
||||
"A query sphere from the user for the porbe-using-spheres query.
|
||||
This is used internally by the collide-cache implementation."
|
||||
((bsphere sphere :inline)
|
||||
(bbox4w bounding-box4w :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-puss-work (structure)
|
||||
"Scratchpad memory map for probe-using-spheres query."
|
||||
((closest-pt vector :inline)
|
||||
(tri-normal vector :inline)
|
||||
(tri-bbox4w bounding-box4w :inline)
|
||||
(spheres-bbox4w bounding-box4w :inline)
|
||||
(spheres collide-puss-sphere 64 :inline)
|
||||
)
|
||||
(:methods
|
||||
(check-mesh-prim-against-spheres (_type_ collide-cache-prim collide-using-spheres-params) symbol)
|
||||
(check-sphere-prim-against-spheres (_type_ collide-cache-prim collide-using-spheres-params) symbol)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-cache-tri (structure)
|
||||
"A single triangle inside the collision cache.
|
||||
Contains a reference back to the source object (like a collide-shape or water-control), and the prim itself."
|
||||
((vertex vector 3 :inline)
|
||||
(extra-quad uint8 16)
|
||||
(pat pat-surface :overlay-at (-> extra-quad 0))
|
||||
(collide-ptr basic :overlay-at (-> extra-quad 4))
|
||||
(prim-index uint16 :overlay-at (-> extra-quad 8))
|
||||
(user16 uint16 :overlay-at (-> extra-quad 10))
|
||||
(user32 uint32 :overlay-at (-> extra-quad 12))
|
||||
(clear-flags uint128 :overlay-at (-> extra-quad 0))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-cache-prim (structure)
|
||||
"A primitive inside the collide-cache.
|
||||
This can represent a sphere, a triangle mesh, or a group of other primitives within a bounding sphere."
|
||||
((prim-core collide-prim-core :inline)
|
||||
(extra-quad uint8 16)
|
||||
(ccache collide-cache :overlay-at (-> extra-quad 0))
|
||||
(prim collide-shape-prim :overlay-at (-> extra-quad 4))
|
||||
(first-tri uint16 :overlay-at (-> extra-quad 8))
|
||||
(num-tris uint16 :overlay-at (-> extra-quad 10))
|
||||
(extra basic :overlay-at (-> extra-quad 12))
|
||||
(world-sphere vector :inline :overlay-at (-> prim-core world-sphere))
|
||||
(collide-as collide-spec :overlay-at (-> prim-core collide-as))
|
||||
(action collide-action :overlay-at (-> prim-core action))
|
||||
(prim-type prim-type :overlay-at (-> prim-core prim-type))
|
||||
)
|
||||
(:methods
|
||||
(resolve-moving-sphere-tri (_type_ collide-query sphere vector float collide-action) float)
|
||||
(resolve-moving-sphere-sphere (_type_ collide-query sphere vector float collide-action) float)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-cache (basic)
|
||||
"The collide-cache is a structure to accelerate collision queries.
|
||||
In particular, it helps with queries where you don't know what you might hit.
|
||||
It can detect collision with the background geometry, foreground dynamic collision shapes (spheres and meshes), and water.
|
||||
To use it, it must first be 'filled' with geometry. Then you can manually inspect the geometry, or use one of the queries.
|
||||
The supported queries are 'line-sphere' (raycast) and 'spheres' (check if intersecting anything).
|
||||
It is not useful for ollision queries against a specific foreground object, like 'am I on top of platform X right now?'."
|
||||
((num-tris int32)
|
||||
(max-tris int32)
|
||||
(num-prims int32)
|
||||
(max-prims int32)
|
||||
(ignore-mask pat-surface)
|
||||
(ignore-processes process 2)
|
||||
(collide-box bounding-box :inline)
|
||||
(collide-box4w bounding-box4w :inline)
|
||||
(collide-with collide-spec)
|
||||
(unused uint32 3)
|
||||
(prims collide-cache-prim 4)
|
||||
(tris collide-cache-tri)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type int int) _type_)
|
||||
(collide-cache-method-9 () none)
|
||||
(collide-cache-method-10 () none)
|
||||
(collide-cache-method-11 () none)
|
||||
(collide-cache-method-12 () none)
|
||||
(collide-cache-method-13 () none)
|
||||
(collide-cache-method-14 () none)
|
||||
(collide-cache-method-15 () none)
|
||||
(collide-cache-method-16 () none)
|
||||
(collide-cache-method-17 () none)
|
||||
(collide-cache-method-18 () none)
|
||||
(collide-cache-method-19 () none)
|
||||
(collide-cache-method-20 () none)
|
||||
(collide-cache-method-21 () none)
|
||||
(collide-cache-method-22 () none)
|
||||
(collide-cache-method-23 () none)
|
||||
(collide-cache-method-24 () none)
|
||||
(collide-cache-method-25 () none)
|
||||
(collide-cache-method-26 () none)
|
||||
(collide-cache-method-27 () none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-list-item (structure)
|
||||
"Entry on the broad-phase collision list.
|
||||
Can represent instanced collision, as a TIE instance, or a single non-instanced mesh fragment."
|
||||
((mesh instance-tie)
|
||||
(inst basic)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-list (structure)
|
||||
"List of items returned by the broad-phase collision query."
|
||||
((num-items int32)
|
||||
(items collide-list-item 256 :inline :offset 16)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod new collide-cache ((allocation symbol) (type-to-make type) (arg0 int) (arg1 int))
|
||||
(let* ((s3-0 (logand -16 (+ (-> type-to-make size) 19)))
|
||||
(gp-0 (* 48 arg0))
|
||||
(v1-3 (* (+ arg1 1) 64))
|
||||
(v0-0 (object-new allocation type-to-make (the-as int (+ s3-0 gp-0 v1-3))))
|
||||
)
|
||||
(set! (-> v0-0 max-tris) arg1)
|
||||
(set! (-> v0-0 max-prims) arg0)
|
||||
(set! (-> v0-0 prims 0) (the-as collide-cache-prim (logand -16 (+ (+ s3-0 15) (the-as uint v0-0)))))
|
||||
(set! (-> v0-0 tris) (the-as collide-cache-tri (+ (the-as uint (-> v0-0 prims 0)) gp-0)))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
(kmemopen global "collide-cache-buffers")
|
||||
|
||||
(define-perm *collide-cache* collide-cache (new 'global 'collide-cache 100 460))
|
||||
|
||||
(define-perm *collide-list* collide-list (new 'global 'collide-list))
|
||||
|
||||
(kmemclose)
|
||||
|
||||
@@ -7,3 +7,43 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype collide-frag-vertex (vector)
|
||||
()
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-frag-mesh (basic)
|
||||
"Unused Jak 1 background collision mesh fragment."
|
||||
((packed-data uint32)
|
||||
(pat-array uint32)
|
||||
(strip-data-len uint16)
|
||||
(poly-count uint16)
|
||||
(base-trans vector4w :inline)
|
||||
(vertex-count uint8 :overlay-at (-> base-trans data 3))
|
||||
(vertex-data-qwc uint8 :offset 29)
|
||||
(total-qwc uint8 :offset 30)
|
||||
(unused uint8 :offset 31)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-fragment (drawable)
|
||||
"Unused Jak 1 background collision drawable tree node."
|
||||
((mesh collide-frag-mesh :offset 8)
|
||||
(collide-new basic :offset 12)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype drawable-inline-array-collide-fragment (drawable-inline-array)
|
||||
"Unused Jak 1 background collision drawable tree inline-array class."
|
||||
((data collide-fragment 1 :inline)
|
||||
(pad uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype drawable-tree-collide-fragment (drawable-tree)
|
||||
"Unused jak 1 background collision data."
|
||||
()
|
||||
)
|
||||
|
||||
@@ -6,4 +6,3 @@
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -7,3 +7,50 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype collide-query (structure)
|
||||
"Very general collision-query structure. The meaning is different depending on where it used.
|
||||
This has both inputs from the user, and collision results."
|
||||
((best-other-tri collide-tri-result :inline)
|
||||
(best-my-tri collide-tri-result :inline :overlay-at best-other-tri)
|
||||
(ignore-processes process-tree 2)
|
||||
(ignore-process0 process-tree :overlay-at (-> ignore-processes 0))
|
||||
(ignore-process1 process-tree :overlay-at (-> ignore-processes 1))
|
||||
(ignore-pat pat-surface)
|
||||
(ignore-pat-s32 int32 :overlay-at ignore-pat)
|
||||
(collide-with collide-spec)
|
||||
(collide-with-s32 int32 :overlay-at collide-with)
|
||||
(overlay-params uint32 3 :offset 112)
|
||||
(bbox bounding-box :inline)
|
||||
(bbox4w bounding-box4w :inline)
|
||||
(bsphere sphere :inline)
|
||||
(start-pos vector :inline)
|
||||
(move-dist vector :inline)
|
||||
(rlength vector :inline)
|
||||
(exit-planes plane 2 :inline)
|
||||
(radius float :overlay-at (-> exit-planes 0 data 3))
|
||||
(inv-mat matrix :inline :offset 288)
|
||||
(spheres (inline-array sphere) :overlay-at (-> overlay-params 0))
|
||||
(num-spheres uint32 :overlay-at (-> overlay-params 1))
|
||||
(solid-only symbol :overlay-at (-> overlay-params 2))
|
||||
(best-dist float :overlay-at spheres)
|
||||
(best-other-prim collide-shape-prim :overlay-at num-spheres)
|
||||
(best-my-prim collide-shape-prim :overlay-at solid-only)
|
||||
(move-vec vector :inline :overlay-at move-dist)
|
||||
(best-u float :overlay-at best-dist)
|
||||
(action-mask collide-action :offset 352)
|
||||
(local-box4w bounding-box4w :inline)
|
||||
(search-box bounding-box4w :inline)
|
||||
(search-vector vector4w :inline)
|
||||
(instance-mat matrix :inline)
|
||||
(instance-ptr basic)
|
||||
(x-addr uint32)
|
||||
(x-step uint32)
|
||||
(y-addr uint32)
|
||||
(y-step uint32)
|
||||
(z-addr uint32)
|
||||
(z-step uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *collide-test-flag* #f)
|
||||
|
||||
@@ -5,5 +5,102 @@
|
||||
;; name in dgo: collide-mesh-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
(declare-type collide-mesh-cache-tri structure)
|
||||
(declare-type collide-shape-prim-mesh basic)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype collide-tri-result (structure)
|
||||
"A triangle result of a collision."
|
||||
((vertex vector 3 :inline)
|
||||
(intersect vector :inline)
|
||||
(normal vector :inline)
|
||||
(pat pat-surface)
|
||||
(collide-ptr basic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-mesh-tri (structure)
|
||||
"A triangle for foreground collision meshes."
|
||||
((vertex-index uint8 3)
|
||||
(unused uint8)
|
||||
(pat pat-surface)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-mesh (basic)
|
||||
"A collision mesh for foreground objects,
|
||||
bound to the joint specified by `joint-id`."
|
||||
((joint-id int32)
|
||||
(num-tris uint32)
|
||||
(num-verts uint32)
|
||||
(vertex-data (inline-array vector))
|
||||
(tris collide-mesh-tri 1 :inline :offset 32)
|
||||
)
|
||||
(:methods
|
||||
(debug-draw-tris (_type_ process-drawable int) none)
|
||||
(overlap-test (_type_ collide-mesh-cache-tri vector) symbol)
|
||||
(should-push-away-test (_type_ collide-mesh-cache-tri collide-tri-result vector float) float)
|
||||
(sphere-on-platform-test (_type_ collide-mesh-cache-tri collide-tri-result vector float) float)
|
||||
(unpack-mesh-to-cache! (_type_ (inline-array collide-mesh-cache-tri) matrix) none)
|
||||
(collide-mesh-math-1 (_type_ object object) none)
|
||||
(collide-mesh-math-2 (_type_ object object object) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-mesh-cache-tri (structure)
|
||||
"A triangle stored in the foreground mesh collide cache."
|
||||
((vertex vector 3 :inline)
|
||||
(normal vector :inline)
|
||||
(bbox4w bounding-box4w :inline)
|
||||
(pat pat-surface :overlay-at (-> normal data 3))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-mesh-cache-entry (structure)
|
||||
"A foreground mesh collide cache entry."
|
||||
((mat matrix :inline)
|
||||
(tris collide-mesh-cache-tri :inline :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-mesh-cache (basic)
|
||||
"A collide cache for foreground meshes."
|
||||
((used-size uint32)
|
||||
(max-size uint32)
|
||||
(id uint32)
|
||||
(data uint8 48000)
|
||||
)
|
||||
(:methods
|
||||
(populate-for-prim-mesh (_type_ collide-shape-prim-mesh) collide-mesh-cache-entry)
|
||||
(is-id? (_type_ int) symbol)
|
||||
(next-id! (_type_) uint)
|
||||
(allocate! (_type_ int) collide-mesh-cache-entry)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
(defmethod is-id? ((this collide-mesh-cache) (id int))
|
||||
"Does this cache have the given ID?"
|
||||
(= (-> this id) id)
|
||||
)
|
||||
|
||||
(kmemopen global "collide-mesh-cache")
|
||||
|
||||
(define-perm *collide-mesh-cache* collide-mesh-cache (new 'global 'collide-mesh-cache))
|
||||
|
||||
(set! (-> *collide-mesh-cache* id) (the-as uint 1))
|
||||
|
||||
(set! (-> *collide-mesh-cache* used-size) (the-as uint 0))
|
||||
|
||||
(set! (-> *collide-mesh-cache* max-size) (the-as uint #xbb80))
|
||||
|
||||
(kmemclose)
|
||||
|
||||
@@ -5,5 +5,510 @@
|
||||
;; name in dgo: collide-shape-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++overlaps-others-options
|
||||
(defenum overlaps-others-options
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
(oo0)
|
||||
(oo1)
|
||||
(oo2)
|
||||
(oo3)
|
||||
(oo4)
|
||||
)
|
||||
;; ---overlaps-others-options
|
||||
|
||||
;; +++collide-action
|
||||
(defenum collide-action
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(solid 0) ;; 1
|
||||
(semi-solid 1) ;; 2
|
||||
(rideable 2) ;; 4
|
||||
(can-ride 3) ;; 8
|
||||
(dont-push-away 4) ;; 16
|
||||
(pull-rider-can-collide 5) ;; 32
|
||||
(deadly 6) ;; 64
|
||||
(persistent-attack 7) ;; 128
|
||||
(no-smack 8) ;; 256
|
||||
(no-standon 9) ;; 512
|
||||
(block-turn-around 10) ;; 1024
|
||||
(check-edge 11) ;; 2048
|
||||
(check-stuck 12) ;; 4096
|
||||
(stuck-wall-escape 13) ;; 8192
|
||||
(no-normal-reset 14) ;; 163884
|
||||
(edge-grabbed 15) ;; 32768
|
||||
(nav-sphere 16) ;; hi 1
|
||||
)
|
||||
;; ---collide-action
|
||||
|
||||
;; +++collide-list-enum
|
||||
(defenum collide-list-enum
|
||||
(hit-by-player)
|
||||
(usually-hit-by-player)
|
||||
(hit-by-others)
|
||||
(player)
|
||||
)
|
||||
;; ---collide-list-enum
|
||||
|
||||
;; +++nav-flags
|
||||
(defenum nav-flags
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(has-root-sphere 0)
|
||||
(has-extra-sphere 1)
|
||||
(has-child-spheres 2)
|
||||
)
|
||||
;; ---nav-flags
|
||||
|
||||
;; +++collide-status
|
||||
(defenum collide-status
|
||||
:bitfield #t
|
||||
:type uint64
|
||||
(on-surface 0)
|
||||
(on-ground 1)
|
||||
(touch-surface 2)
|
||||
(touch-wall 3)
|
||||
(touch-ceiling 4)
|
||||
(touch-actor 5)
|
||||
(on-special-surface 6)
|
||||
(touch-edge 7)
|
||||
(no-touch 8)
|
||||
(blocked 9)
|
||||
(on-water 10)
|
||||
(impact-surface 11)
|
||||
(touch-background 12)
|
||||
(stuck 13)
|
||||
(touch-ceiling-sticky 14)
|
||||
(glance 15)
|
||||
(probe-hit 16)
|
||||
)
|
||||
;; ---collide-status
|
||||
|
||||
(declare-type collide-shape trsqv)
|
||||
(declare-type collide-shape-moving collide-shape)
|
||||
(declare-type control-info collide-shape-moving)
|
||||
(declare-type touching-list structure)
|
||||
(declare-type collide-query structure)
|
||||
(declare-type water-info structure)
|
||||
(declare-type collide-shape-prim-group basic)
|
||||
(declare-type collide-cache-prim structure)
|
||||
(declare-type collide-shape-prim basic)
|
||||
(declare-type collide-cache basic)
|
||||
(declare-type rigid-body structure)
|
||||
|
||||
(define-extern cshape-reaction-update-state (function control-info collide-query vector none))
|
||||
(define-extern cshape-reaction-just-move (function control-info collide-query vector collide-status))
|
||||
(define-extern collide-shape-draw-debug-marks (function none))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype collide-rider (structure)
|
||||
"Something that rides a moving object."
|
||||
((rider-handle handle)
|
||||
(sticky-prim collide-shape-prim)
|
||||
(prim-ry float)
|
||||
(rider-local-pos vector :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-rider-pool (basic)
|
||||
"A pool containing all the riders of an object."
|
||||
((alloc-count int32)
|
||||
(riders collide-rider 20 :inline)
|
||||
)
|
||||
(:methods
|
||||
(add-rider (_type_ handle) collide-rider)
|
||||
(prepare (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod prepare ((this collide-rider-pool))
|
||||
"Gets this pool ready to be used to allow allocations. This should be called once at the start of every frame."
|
||||
(set! (-> this alloc-count) 0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype pull-rider-info (structure)
|
||||
((rider collide-rider)
|
||||
(rider-cshape collide-shape-moving)
|
||||
(rider-delta-ry float)
|
||||
(rider-dest vector :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(kmemopen global "collide-lists")
|
||||
|
||||
(define *collide-hit-by-player-list* (new 'global 'engine 'collide-hit-by-player-list 640 connection))
|
||||
|
||||
(define *collide-hit-by-others-list* (new 'global 'engine 'collide-hit-by-others-list 768 connection))
|
||||
|
||||
(define *collide-player-list* (new 'global 'engine 'collide-player-list 32 connection))
|
||||
|
||||
(kmemclose)
|
||||
|
||||
(deftype overlaps-others-params (structure)
|
||||
((options overlaps-others-options)
|
||||
(collide-with-filter collide-spec)
|
||||
(tlist touching-list)
|
||||
(filtered-root-collide-with collide-spec)
|
||||
(filtered-child-collide-with collide-spec)
|
||||
(filtered-other-collide-as collide-spec)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype move-above-ground-params (structure)
|
||||
((gnd-collide-with collide-spec)
|
||||
(popup float)
|
||||
(dont-move-if-overlaps? symbol)
|
||||
(hover-if-no-ground? symbol)
|
||||
(overlaps-params overlaps-others-params :inline)
|
||||
(new-pos vector :inline)
|
||||
(old-gspot-pos vector :inline)
|
||||
(old-gspot-normal vector :inline)
|
||||
(pat pat-surface)
|
||||
(on-ground? symbol)
|
||||
(do-move? symbol)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-prim-core (structure)
|
||||
"Collide primitives use this to store their world sphere and their collision flags."
|
||||
((world-sphere vector :inline)
|
||||
(collide-as collide-spec)
|
||||
(collide-with collide-spec)
|
||||
(action collide-action)
|
||||
(prim-type int8)
|
||||
(unused1 uint8 3)
|
||||
(quad uint128 2 :overlay-at (-> world-sphere data 0))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-shape-prim (basic)
|
||||
"Base class for collide primitives."
|
||||
((cshape collide-shape)
|
||||
(prim-id uint32)
|
||||
(transform-index int8)
|
||||
(unused2 int8 3)
|
||||
(prim-core collide-prim-core :inline :offset 16)
|
||||
(local-sphere vector :inline :offset 48)
|
||||
(specific uint8 16 :offset 64)
|
||||
(world-sphere vector :inline :overlay-at (-> prim-core quad 0))
|
||||
(collide-as collide-spec :overlay-at (-> prim-core quad 1))
|
||||
(collide-with collide-spec :offset 36)
|
||||
(action collide-action :offset 40)
|
||||
(prim-type int8 :offset 44)
|
||||
(radius meters :overlay-at (-> local-sphere w))
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type collide-shape uint int) _type_)
|
||||
(debug-draw (_type_) none)
|
||||
(add-fg-prim-using-box (_type_ collide-cache) none)
|
||||
(add-fg-prim-using-line-sphere (_type_ collide-cache object) none)
|
||||
(overlaps-others-test (_type_ overlaps-others-params collide-shape-prim) symbol)
|
||||
(overlaps-others-group (_type_ overlaps-others-params collide-shape-prim-group) symbol)
|
||||
(collide-shape-prim-method-14 () none)
|
||||
(collide-with-collide-cache-prim-mesh (_type_ collide-query collide-cache-prim) none)
|
||||
(collide-with-collide-cache-prim-sphere (_type_ collide-query collide-cache-prim) none)
|
||||
(on-platform-test (_type_ collide-shape-prim collide-query float) none)
|
||||
(should-push-away-test (_type_ collide-shape-prim collide-query) none)
|
||||
(should-push-away-a-group-test (_type_ collide-shape-prim-group collide-query) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-shape-prim-sphere (collide-shape-prim)
|
||||
"A sphere primitive for collide shapes."
|
||||
((pat pat-surface :overlay-at (-> specific 0))
|
||||
(nav-radius float :overlay-at (-> specific 4))
|
||||
(line-sphere-count int8 :overlay-at (-> specific 8))
|
||||
(line-sphere-prim-id int8 :overlay-at (-> specific 9))
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type collide-shape uint) _type_)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-shape-prim-mesh (collide-shape-prim)
|
||||
"A mesh primitive for collide shapes."
|
||||
((mesh collide-mesh :overlay-at (-> specific 0))
|
||||
(mesh-id int32 :overlay-at (-> specific 4))
|
||||
(mesh-cache-id uint32 :overlay-at (-> specific 8))
|
||||
(mesh-cache-entry collide-mesh-cache-entry :overlay-at (-> specific 12))
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type collide-shape uint uint) _type_)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-shape-prim-group (collide-shape-prim)
|
||||
"A group of collide primitives."
|
||||
((num-children uint8 :overlay-at (-> specific 0))
|
||||
(num-alloc-children uint8 :overlay-at (-> specific 1))
|
||||
(child (inline-array collide-shape-prim) :overlay-at (-> specific 4))
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type collide-shape uint int) _type_)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-shape (trsqv)
|
||||
"The parent of all of an object's collide primitives.
|
||||
Most [[process-drawable]]s have a [[collide-shape]] that represents their root transform."
|
||||
((actor-hash-index int16 :offset 12)
|
||||
(process process-drawable)
|
||||
(max-iteration-count uint8)
|
||||
(nav-flags nav-flags)
|
||||
(total-prims uint8)
|
||||
(num-riders uint8)
|
||||
(pat-ignore-mask pat-surface)
|
||||
(event-self symbol :offset 152)
|
||||
(event-other symbol)
|
||||
(root-prim collide-shape-prim)
|
||||
(riders (inline-array collide-rider))
|
||||
(penetrate-using penetrate)
|
||||
(penetrated-by penetrate)
|
||||
(backup-collide-as collide-spec)
|
||||
(backup-collide-with collide-spec)
|
||||
(event-priority uint8 :offset 192)
|
||||
(rider-max-momentum float)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type process-drawable collide-list-enum) _type_)
|
||||
(move-by-vector! (_type_ vector) none)
|
||||
(move-to-point! (_type_ vector) none)
|
||||
(debug-draw (_type_) none)
|
||||
(fill-cache-for-shape (_type_ float collide-query) none)
|
||||
(fill-cache-integrate-and-collide (_type_ vector collide-query meters) none)
|
||||
(find-prim-by-id (_type_ uint) collide-shape-prim)
|
||||
(find-prim-by-id-logtest (_type_ uint) collide-shape-prim)
|
||||
(detect-riders! (_type_) symbol)
|
||||
(build-bounding-box-for-shape (_type_ bounding-box float collide-spec) symbol)
|
||||
(integrate-and-collide! (_type_ vector) none)
|
||||
(find-collision-meshes (_type_) none)
|
||||
(on-platform (_type_ collide-shape collide-query) symbol)
|
||||
(find-overlapping-shapes (_type_ overlaps-others-params) symbol)
|
||||
(shove-to-closest-point-on-path (_type_ attack-info float) vector)
|
||||
(should-push-away (_type_ collide-shape collide-query) symbol)
|
||||
(pull-rider! (_type_ pull-rider-info) none)
|
||||
(pull-riders! (_type_) symbol)
|
||||
(do-push-aways (_type_) collide-spec)
|
||||
(update-transforms (_type_) none)
|
||||
(set-collide-with! (_type_ collide-spec) none)
|
||||
(set-collide-as! (_type_ collide-spec) none)
|
||||
(modify-collide-as! (_type_ int collide-spec collide-spec) none)
|
||||
(send-shoves (_type_ process touching-shapes-entry float float float) symbol)
|
||||
(above-ground? (_type_ collide-query vector collide-spec float float float) symbol)
|
||||
(water-info-init! (_type_ water-info collide-action) water-info)
|
||||
(iterate-prims (_type_ (function collide-shape-prim none)) none)
|
||||
(pusher-init (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-shape-moving (collide-shape)
|
||||
"A [[collide-shape]] for moving objects."
|
||||
((rider-time uint64)
|
||||
(rider-last-move vector :inline)
|
||||
(trans-old vector :inline)
|
||||
(poly-pat pat-surface :offset 272)
|
||||
(cur-pat pat-surface)
|
||||
(ground-pat pat-surface)
|
||||
(status uint64)
|
||||
(reaction (function control-info collide-query vector vector collide-status) :offset 316)
|
||||
(no-reaction (function collide-shape-moving collide-query vector vector object))
|
||||
(local-normal vector :inline)
|
||||
(surface-normal vector :inline)
|
||||
(poly-normal vector :inline)
|
||||
(ground-poly-normal vector :inline)
|
||||
(gspot-pos vector :inline)
|
||||
(gspot-normal vector :inline)
|
||||
(ground-touch-point vector :inline)
|
||||
(ground-impact-vel meters)
|
||||
(surface-angle float)
|
||||
(poly-angle float)
|
||||
(touch-angle float)
|
||||
(coverage float)
|
||||
(dynam dynamics)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type process-drawable collide-list-enum) _type_)
|
||||
(collide-shape-moving-method-55 () none)
|
||||
(collide-shape-moving-method-56 () none)
|
||||
(collide-shape-moving-method-57 () none)
|
||||
(collide-shape-moving-method-58 () none)
|
||||
(collide-shape-moving-method-59 () none)
|
||||
(collide-shape-moving-method-60 () none)
|
||||
(collide-shape-moving-method-61 () none)
|
||||
(collide-shape-moving-method-62 () none)
|
||||
(collide-shape-moving-method-63 () none)
|
||||
(collide-shape-moving-method-64 () none)
|
||||
(collide-shape-moving-method-65 () none)
|
||||
(collide-shape-moving-method-66 () none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod new collide-shape-prim ((allocation symbol) (type-to-make type) (arg0 collide-shape) (arg1 uint) (arg2 int))
|
||||
(let ((v0-0 (object-new allocation type-to-make arg2)))
|
||||
(set! (-> v0-0 cshape) arg0)
|
||||
(set! (-> v0-0 prim-id) arg1)
|
||||
(set! (-> v0-0 prim-core action) (collide-action))
|
||||
(set! (-> v0-0 prim-core collide-as) (collide-spec))
|
||||
(set! (-> v0-0 prim-core collide-with) (collide-spec))
|
||||
(set! (-> v0-0 transform-index) -2)
|
||||
(set! (-> v0-0 prim-core prim-type) -2)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch collide-shape-prim vs collide-shape-prim-sphere.
|
||||
(defmethod new collide-shape-prim-sphere ((allocation symbol) (type-to-make type) (arg0 collide-shape) (arg1 uint))
|
||||
(let ((v0-0 ((method-of-type collide-shape-prim new) allocation type-to-make arg0 arg1 80)))
|
||||
(set! (-> (the-as collide-shape-prim-sphere v0-0) pat)
|
||||
(new 'static 'pat-surface :mode (pat-mode obstacle) :material (pat-material stone))
|
||||
)
|
||||
(set! (-> (the-as collide-shape-prim-sphere v0-0) prim-core prim-type) -1)
|
||||
(the-as collide-shape-prim-sphere v0-0)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch collide-shape-prim vs collide-shape-prim-mesh.
|
||||
(defmethod new collide-shape-prim-mesh ((allocation symbol) (type-to-make type) (arg0 collide-shape) (arg1 uint) (arg2 uint))
|
||||
(let ((v0-0 ((method-of-type collide-shape-prim new) allocation type-to-make arg0 arg2 80)))
|
||||
(set! (-> (the-as collide-shape-prim-mesh v0-0) mesh) #f)
|
||||
(set! (-> (the-as collide-shape-prim-mesh v0-0) mesh-id) (the-as int arg1))
|
||||
(set! (-> (the-as collide-shape-prim-mesh v0-0) mesh-cache-id) (the-as uint 0))
|
||||
(set! (-> (the-as collide-shape-prim-mesh v0-0) prim-core prim-type) 1)
|
||||
(the-as collide-shape-prim-mesh v0-0)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch collide-shape-prim vs collide-shape-prim-group.
|
||||
(defmethod new collide-shape-prim-group ((allocation symbol) (type-to-make type) (arg0 collide-shape) (arg1 uint) (arg2 int))
|
||||
(let ((v0-0 ((method-of-type collide-shape-prim new) allocation type-to-make arg0 (the-as uint arg2) 80)))
|
||||
(set! (-> (the-as collide-shape-prim-group v0-0) num-children) arg1)
|
||||
(set! (-> (the-as collide-shape-prim-group v0-0) num-alloc-children) arg1)
|
||||
(set! (-> (the-as collide-shape-prim-group v0-0) prim-core prim-type) 0)
|
||||
(set! (-> (the-as collide-shape-prim-group v0-0) child)
|
||||
(the-as (inline-array collide-shape-prim) (&+ (the-as collide-shape-prim-group v0-0) 80))
|
||||
)
|
||||
(the-as collide-shape-prim-group v0-0)
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch uint vs int.
|
||||
(defmethod length ((this collide-shape-prim-group))
|
||||
(the-as int (-> this num-children))
|
||||
)
|
||||
|
||||
(defmethod new collide-shape ((allocation symbol) (type-to-make type) (arg0 process-drawable) (arg1 collide-list-enum))
|
||||
(let ((s5-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(set! (-> s5-0 actor-hash-index) -1)
|
||||
(set! (-> s5-0 process) arg0)
|
||||
(set! (-> s5-0 max-iteration-count) (the-as uint 1))
|
||||
(set! (-> s5-0 nav-flags) (nav-flags has-root-sphere))
|
||||
(set! (-> s5-0 event-self) #f)
|
||||
(set! (-> s5-0 event-other) #f)
|
||||
(set! (-> s5-0 riders) (the-as (inline-array collide-rider) #f))
|
||||
(set! (-> s5-0 root-prim) #f)
|
||||
(set! (-> s5-0 penetrate-using) (penetrate))
|
||||
(set! (-> s5-0 penetrated-by) (penetrate))
|
||||
(set! (-> s5-0 event-priority) (the-as uint 0))
|
||||
(set! (-> s5-0 rider-max-momentum) 409600.0)
|
||||
(case (-> arg0 type symbol)
|
||||
(('camera)
|
||||
(set! (-> s5-0 pat-ignore-mask)
|
||||
(new 'static 'pat-surface :nocamera #x1 :nogrind #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
|
||||
)
|
||||
)
|
||||
(('target)
|
||||
(set! (-> s5-0 pat-ignore-mask) (new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :board #x1))
|
||||
)
|
||||
(else
|
||||
(set! (-> s5-0 pat-ignore-mask)
|
||||
(new 'static 'pat-surface :noentity #x1 :nojak #x1 :probe #x1 :noendlessfall #x1 :board #x1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> s5-0 trans w) 1.0)
|
||||
(quaternion-identity! (the-as quaternion (-> s5-0 rot)))
|
||||
(vector-identity! (-> s5-0 scale))
|
||||
(cond
|
||||
((= arg1 (collide-list-enum hit-by-player))
|
||||
(add-connection *collide-hit-by-player-list* arg0 #f s5-0 #f #f)
|
||||
)
|
||||
((= arg1 (collide-list-enum usually-hit-by-player))
|
||||
(add-connection *collide-hit-by-others-list* arg0 #f s5-0 #f #f)
|
||||
)
|
||||
((= arg1 (collide-list-enum hit-by-others))
|
||||
(add-connection *collide-player-list* arg0 #f s5-0 #f #f)
|
||||
)
|
||||
(else
|
||||
(format 0 "Unsupported collide-list-enum in collide-shape constructor!~%")
|
||||
)
|
||||
)
|
||||
s5-0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod new collide-shape-moving ((allocation symbol) (type-to-make type) (arg0 process-drawable) (arg1 collide-list-enum))
|
||||
(let ((v0-0 ((method-of-type collide-shape new) allocation type-to-make arg0 arg1)))
|
||||
(set! (-> (the-as collide-shape-moving v0-0) gspot-pos y) -40959590.0)
|
||||
(set! (-> (the-as collide-shape-moving v0-0) gspot-normal quad) (-> *y-vector* quad))
|
||||
(the-as collide-shape-moving v0-0)
|
||||
)
|
||||
)
|
||||
|
||||
(define *collide-shape-prim-backgnd*
|
||||
(new 'static 'collide-shape-prim-mesh
|
||||
:cshape #f
|
||||
:prim-core (new 'static 'collide-prim-core
|
||||
:world-sphere (new 'static 'vector :data (new 'static 'array float 4 0.0 0.0 0.0 204800000.0))
|
||||
:collide-as (collide-spec backgnd)
|
||||
:action (collide-action solid)
|
||||
:prim-type 2
|
||||
)
|
||||
:local-sphere (new 'static 'vector :data (new 'static 'array float 4 0.0 0.0 0.0 204800000.0))
|
||||
:mesh #f
|
||||
)
|
||||
)
|
||||
|
||||
(define *collide-shape-prim-water*
|
||||
(new 'static 'collide-shape-prim-mesh
|
||||
:cshape #f
|
||||
:prim-core (new 'static 'collide-prim-core
|
||||
:world-sphere (new 'static 'vector :data (new 'static 'array float 4 0.0 0.0 0.0 204800000.0))
|
||||
:collide-as (collide-spec water)
|
||||
:action (collide-action solid)
|
||||
:prim-type 2
|
||||
)
|
||||
:local-sphere (new 'static 'vector :data (new 'static 'array float 4 0.0 0.0 0.0 204800000.0))
|
||||
:mesh #f
|
||||
)
|
||||
)
|
||||
|
||||
(define *collide-shape-prim-nav-mesh*
|
||||
(new 'static 'collide-shape-prim-mesh
|
||||
:cshape #f
|
||||
:prim-core (new 'static 'collide-prim-core
|
||||
:world-sphere (new 'static 'vector :data (new 'static 'array float 4 0.0 0.0 0.0 204800000.0))
|
||||
:collide-as (collide-spec nav-mesh)
|
||||
:action (collide-action solid)
|
||||
:prim-type 2
|
||||
)
|
||||
:local-sphere (new 'static 'vector :data (new 'static 'array float 4 0.0 0.0 0.0 204800000.0))
|
||||
:mesh #f
|
||||
)
|
||||
)
|
||||
|
||||
(define-perm *collide-rider-pool* collide-rider-pool (new 'global 'collide-rider-pool))
|
||||
|
||||
@@ -7,3 +7,148 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype touching-prim (structure)
|
||||
"A collide primitive that's touching another.
|
||||
Potentially also stores the triangle that is involved."
|
||||
((cprim collide-shape-prim)
|
||||
(has-tri? symbol)
|
||||
(tri collide-tri-result :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype touching-prims-entry (structure)
|
||||
"A record of two primitives touching."
|
||||
((next touching-prims-entry)
|
||||
(prev touching-prims-entry)
|
||||
(allocated? symbol)
|
||||
(u float)
|
||||
(prim1 touching-prim :inline)
|
||||
(prim2 touching-prim :inline)
|
||||
)
|
||||
(:methods
|
||||
(touching-prims-entry-method-9 (_type_ vector) vector)
|
||||
(get-middle-of-bsphere-overlap (_type_ vector) vector)
|
||||
(get-touched-prim (_type_ collide-shape touching-shapes-entry) collide-shape-prim)
|
||||
(get-touched-tri (_type_ collide-shape touching-shapes-entry) collide-tri-result)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype touching-prims-entry-pool (structure)
|
||||
"A pool of up to 64 touching prim records."
|
||||
((head touching-prims-entry)
|
||||
(nodes touching-prims-entry 64 :inline)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type) _type_)
|
||||
(alloc-node (_type_) touching-prims-entry)
|
||||
(get-free-node-count (_type_) int)
|
||||
(init-list! (_type_) none)
|
||||
(free-node (_type_ touching-prims-entry) touching-prims-entry)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod init-list! ((this touching-prims-entry-pool))
|
||||
(let ((prev (the-as touching-prims-entry #f)))
|
||||
(let ((current (the-as touching-prims-entry (-> this nodes))))
|
||||
(set! (-> this head) current)
|
||||
(countdown (a0-1 64)
|
||||
(set! (-> current prev) prev)
|
||||
(let ((next (&+ current 240)))
|
||||
(set! (-> current next) (the-as touching-prims-entry next))
|
||||
(set! (-> current allocated?) #f)
|
||||
(set! prev current)
|
||||
(set! current (the-as touching-prims-entry next))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> prev next) #f)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch structure vs touching-prims-entry-pool.
|
||||
(defmethod new touching-prims-entry-pool ((allocation symbol) (type-to-make type))
|
||||
(let ((t9-0 (method-of-type structure new))
|
||||
(v1-1 type-to-make)
|
||||
)
|
||||
(-> type-to-make size)
|
||||
(let ((gp-0 (t9-0 allocation v1-1)))
|
||||
((method-of-type touching-prims-entry-pool init-list!) (the-as touching-prims-entry-pool gp-0))
|
||||
(the-as touching-prims-entry-pool gp-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype touching-shapes-entry (structure)
|
||||
"A record of two collide shapes touching,
|
||||
storing a record of the primitives involved."
|
||||
((cshape1 collide-shape)
|
||||
(cshape2 collide-shape)
|
||||
(resolve-u int8)
|
||||
(head touching-prims-entry)
|
||||
(handle1 handle)
|
||||
(handle2 handle)
|
||||
)
|
||||
:pack-me
|
||||
(:methods
|
||||
(get-head (_type_) touching-prims-entry)
|
||||
(get-next (_type_ touching-shapes-entry) touching-prims-entry)
|
||||
(get-touched-shape (_type_ collide-shape) collide-shape)
|
||||
(prims-touching? (_type_ collide-shape uint) touching-prims-entry)
|
||||
(prims-touching-action? (_type_ collide-shape collide-action collide-action) basic)
|
||||
(free-touching-prims-list (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype touching-list (structure)
|
||||
"Contains a record of touching collide shape pairs."
|
||||
((num-touching-shapes int32)
|
||||
(resolve-u int8)
|
||||
(touching-shapes touching-shapes-entry 32 :inline)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type) _type_)
|
||||
(add-touching-prims (_type_ collide-shape-prim collide-shape-prim float collide-tri-result collide-tri-result) none)
|
||||
(free-nodes (_type_) none)
|
||||
(update-from-step-size (_type_ float) none)
|
||||
(send-events-for-touching-shapes (_type_) none)
|
||||
(get-shapes-entry (_type_ collide-shape collide-shape) touching-shapes-entry)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch structure vs touching-list.
|
||||
(defmethod new touching-list ((allocation symbol) (type-to-make type))
|
||||
(let ((t9-0 (method-of-type structure new))
|
||||
(v1-1 type-to-make)
|
||||
)
|
||||
(-> type-to-make size)
|
||||
(let ((v0-0 (t9-0 allocation v1-1)))
|
||||
(set! (-> (the-as touching-list v0-0) num-touching-shapes) 0)
|
||||
(set! (-> (the-as touching-list v0-0) resolve-u) 0)
|
||||
(the-as touching-list v0-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod get-head ((this touching-shapes-entry))
|
||||
(-> this head)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch collide-shape vs touching-prims-entry.
|
||||
(defmethod get-next ((this touching-shapes-entry) (arg0 touching-shapes-entry))
|
||||
(the-as touching-prims-entry (-> arg0 cshape1))
|
||||
)
|
||||
|
||||
(kmemopen global "collide-touching-lists")
|
||||
|
||||
(define-perm *touching-prims-entry-pool* touching-prims-entry-pool (new 'global 'touching-prims-entry-pool))
|
||||
|
||||
(define-perm *touching-list* touching-list (new 'global 'touching-list))
|
||||
|
||||
(kmemclose)
|
||||
|
||||
@@ -7,3 +7,23 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *HACK-find-nearest-focusable-ignore* #f)
|
||||
|
||||
(deftype find-sorted-targets-params (structure)
|
||||
((near-point vector :inline)
|
||||
(in-dir vector :inline)
|
||||
(reject-team int8)
|
||||
(min-dist float)
|
||||
(max-dist float)
|
||||
(inv-slope-dist float)
|
||||
(reject-inside-dist float)
|
||||
(min-angle-cos float)
|
||||
(max-angle-cos float)
|
||||
(inv-slope-ang float)
|
||||
(required-flags uint32)
|
||||
(priority-flags uint32)
|
||||
(weights vector :inline)
|
||||
(validate basic)
|
||||
(validator-params basic)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -5,5 +5,340 @@
|
||||
;; name in dgo: pat-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++pat-mode
|
||||
(defenum pat-mode
|
||||
:type uint8
|
||||
(ground 0)
|
||||
(wall 1)
|
||||
(obstacle 2)
|
||||
(halfpipe 3)
|
||||
)
|
||||
;; ---pat-mode
|
||||
|
||||
;; +++pat-material
|
||||
(defenum pat-material
|
||||
:type uint8
|
||||
(unknown 0)
|
||||
(ice 1)
|
||||
(quicksand 2)
|
||||
(waterbottom 3)
|
||||
(tar 4)
|
||||
(sand 5)
|
||||
(wood 6)
|
||||
(grass 7)
|
||||
(pcmetal 8)
|
||||
(snow 9)
|
||||
(deepsnow 10)
|
||||
(hotcoals 11)
|
||||
(lava 12)
|
||||
(crwood 13)
|
||||
(gravel 14)
|
||||
(dirt 15)
|
||||
(metal 16)
|
||||
(straw 17)
|
||||
(tube 18)
|
||||
(swamp 19)
|
||||
(stopproj 20)
|
||||
(rotate 21)
|
||||
(neutral 22)
|
||||
(stone 23)
|
||||
(crmetal 24)
|
||||
(carpet 25)
|
||||
(grmetal 26)
|
||||
(shmetal 27)
|
||||
(hdwood 28)
|
||||
(squish 29)
|
||||
(invisible 30) ;; mhshroom
|
||||
(forest 31)
|
||||
(forcefield 32) ;; mhswamp
|
||||
(dmaker 33)
|
||||
)
|
||||
;; ---pat-material
|
||||
|
||||
;; +++pat-event
|
||||
(defenum pat-event
|
||||
:type uint8
|
||||
(none 0)
|
||||
(deadly 1)
|
||||
(nodamage 2) ;; endlessfall
|
||||
(e01 3) ;; burn
|
||||
(e02 4) ;; deadlyup
|
||||
(e03 5) ;; burnup
|
||||
(e04 6) ;; melt
|
||||
(e05 7) ;; slide
|
||||
(e06 8) ;; lip
|
||||
(e07 9) ;; lipramp
|
||||
(e08 10) ;; shock
|
||||
(e09 11) ;; shockup
|
||||
(e10 12) ;; hide
|
||||
(e11 13) ;; rail
|
||||
(slippery 14)
|
||||
(e13 15) ;; drag
|
||||
(e14 16) ;; waterfloor
|
||||
(e15 17) ;; hang
|
||||
(e16 18) ;; fry
|
||||
(e17 19) ;; slime
|
||||
)
|
||||
;; ---pat-event
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype pat-surface (uint32)
|
||||
((skip uint8 :offset 0 :size 7)
|
||||
(mode pat-mode :offset 7 :size 3)
|
||||
(material pat-material :offset 10 :size 6)
|
||||
(camera uint8 :offset 16 :size 1)
|
||||
(event pat-event :offset 18 :size 6)
|
||||
(skip2 uint8 :offset 24 :size 5)
|
||||
(noentity uint8 :offset 0 :size 1)
|
||||
(nocamera uint8 :offset 1 :size 1)
|
||||
(noedge uint8 :offset 2 :size 1)
|
||||
(nogrind uint8 :offset 3 :size 1)
|
||||
(nojak uint8 :offset 4 :size 1)
|
||||
(noboard uint8 :offset 5 :size 1)
|
||||
(nopilot uint8 :offset 6 :size 1)
|
||||
(probe uint8 :offset 24 :size 1)
|
||||
(nomech uint8 :offset 25 :size 1)
|
||||
(noproj uint8 :offset 26 :size 1)
|
||||
(noendlessfall uint8 :offset 27 :size 1)
|
||||
(noprobe uint8 :offset 28 :size 1)
|
||||
(nolineofsight uint8 :offset 16 :size 1)
|
||||
(board uint8 :offset 4 :size 1)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defun-debug pat-material->string ((arg0 pat-surface))
|
||||
(case (-> arg0 material)
|
||||
(((pat-material deepsnow))
|
||||
"deepsnow"
|
||||
)
|
||||
(((pat-material neutral))
|
||||
"neutral"
|
||||
)
|
||||
(((pat-material carpet))
|
||||
"carpet"
|
||||
)
|
||||
(((pat-material shmetal))
|
||||
"shmetal"
|
||||
)
|
||||
(((pat-material grmetal))
|
||||
"grmetal"
|
||||
)
|
||||
(((pat-material lava))
|
||||
"lava"
|
||||
)
|
||||
(((pat-material crmetal))
|
||||
"crmetal"
|
||||
)
|
||||
(((pat-material pcmetal))
|
||||
"pcmetal"
|
||||
)
|
||||
(((pat-material grass))
|
||||
"grass"
|
||||
)
|
||||
(((pat-material snow))
|
||||
"snow"
|
||||
)
|
||||
(((pat-material swamp))
|
||||
"swamp"
|
||||
)
|
||||
(((pat-material stone))
|
||||
"stone"
|
||||
)
|
||||
(((pat-material hotcoals))
|
||||
"hotcoals"
|
||||
)
|
||||
(((pat-material unknown))
|
||||
"unknown"
|
||||
)
|
||||
(((pat-material dirt))
|
||||
"dirt"
|
||||
)
|
||||
(((pat-material dmaker))
|
||||
"dmaker"
|
||||
)
|
||||
(((pat-material tube))
|
||||
"tube"
|
||||
)
|
||||
(((pat-material forest))
|
||||
"forest"
|
||||
)
|
||||
(((pat-material stopproj))
|
||||
"stopproj"
|
||||
)
|
||||
(((pat-material invisible))
|
||||
"invisible"
|
||||
)
|
||||
(((pat-material forcefield))
|
||||
"forcefield"
|
||||
)
|
||||
(((pat-material tar))
|
||||
"tar"
|
||||
)
|
||||
(((pat-material straw))
|
||||
"straw"
|
||||
)
|
||||
(((pat-material wood))
|
||||
"wood"
|
||||
)
|
||||
(((pat-material quicksand))
|
||||
"quicksand"
|
||||
)
|
||||
(((pat-material squish))
|
||||
"squish"
|
||||
)
|
||||
(((pat-material ice))
|
||||
"ice"
|
||||
)
|
||||
(((pat-material rotate))
|
||||
"rotate"
|
||||
)
|
||||
(((pat-material crwood))
|
||||
"crwood"
|
||||
)
|
||||
(((pat-material waterbottom))
|
||||
"waterbottom"
|
||||
)
|
||||
(((pat-material hdwood))
|
||||
"hdwood"
|
||||
)
|
||||
(((pat-material sand))
|
||||
"sand"
|
||||
)
|
||||
(((pat-material gravel))
|
||||
"gravel"
|
||||
)
|
||||
(((pat-material metal))
|
||||
"metal"
|
||||
)
|
||||
(else
|
||||
"*unknown*"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defun-debug pat-mode->string ((arg0 pat-surface))
|
||||
(case (-> arg0 mode)
|
||||
(((pat-mode wall))
|
||||
"wall"
|
||||
)
|
||||
(((pat-mode halfpipe))
|
||||
"halfpipe"
|
||||
)
|
||||
(((pat-mode obstacle))
|
||||
"obstacle"
|
||||
)
|
||||
(((pat-mode ground))
|
||||
"ground"
|
||||
)
|
||||
(else
|
||||
"*unknown*"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defun-debug pat-event->string ((arg0 pat-surface))
|
||||
(case (-> arg0 event)
|
||||
(((pat-event nodamage))
|
||||
"nodamage"
|
||||
)
|
||||
(((pat-event e09))
|
||||
"e09"
|
||||
)
|
||||
(((pat-event deadly))
|
||||
"deadly"
|
||||
)
|
||||
(((pat-event e02))
|
||||
"e02"
|
||||
)
|
||||
(((pat-event e08))
|
||||
"e08"
|
||||
)
|
||||
(((pat-event slippery))
|
||||
"slippery"
|
||||
)
|
||||
(((pat-event e11))
|
||||
"e11"
|
||||
)
|
||||
(((pat-event e01))
|
||||
"e01"
|
||||
)
|
||||
(((pat-event e17))
|
||||
"e17"
|
||||
)
|
||||
(((pat-event e07))
|
||||
"e07"
|
||||
)
|
||||
(((pat-event e10))
|
||||
"e10"
|
||||
)
|
||||
(((pat-event e16))
|
||||
"e16"
|
||||
)
|
||||
(((pat-event e06))
|
||||
"e06"
|
||||
)
|
||||
(((pat-event e15))
|
||||
"e15"
|
||||
)
|
||||
(((pat-event e05))
|
||||
"e05"
|
||||
)
|
||||
(((pat-event none))
|
||||
"none"
|
||||
)
|
||||
(((pat-event e14))
|
||||
"e14"
|
||||
)
|
||||
(((pat-event e04))
|
||||
"e04"
|
||||
)
|
||||
(((pat-event e13))
|
||||
"e13"
|
||||
)
|
||||
(((pat-event e03))
|
||||
"e03"
|
||||
)
|
||||
(else
|
||||
"*unknown*"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype pat-mode-info (structure)
|
||||
((name string)
|
||||
(wall-angle float)
|
||||
(color rgba)
|
||||
(hilite-color rgba)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *pat-mode-info* (new 'static 'inline-array pat-mode-info 4
|
||||
(new 'static 'pat-mode-info
|
||||
:name "ground"
|
||||
:wall-angle 0.2
|
||||
:color (new 'static 'rgba :r #x7f :a #x40)
|
||||
:hilite-color (new 'static 'rgba :r #xff :a #x80)
|
||||
)
|
||||
(new 'static 'pat-mode-info
|
||||
:name "wall"
|
||||
:wall-angle 2.0
|
||||
:color (new 'static 'rgba :b #x7f :a #x40)
|
||||
:hilite-color (new 'static 'rgba :b #xff :a #x80)
|
||||
)
|
||||
(new 'static 'pat-mode-info
|
||||
:name "obstacle"
|
||||
:wall-angle 0.82
|
||||
:color (new 'static 'rgba :r #x7f :b #x7f :a #x40)
|
||||
:hilite-color (new 'static 'rgba :r #xff :b #xff :a #x80)
|
||||
)
|
||||
(new 'static 'pat-mode-info
|
||||
:name "halfpipe"
|
||||
:wall-angle -2.0
|
||||
:color (new 'static 'rgba :r #x7f :g #x7f :a #x40)
|
||||
:hilite-color (new 'static 'rgba :r #xff :g #xff :a #x80)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -5,5 +5,138 @@
|
||||
;; name in dgo: cloth-art-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++cloth-flag
|
||||
(defenum cloth-flag
|
||||
:type uint64
|
||||
:bitfield #t
|
||||
(no-gravity 0)
|
||||
(use-wind 1)
|
||||
(need-reset 2)
|
||||
(double-sided 3)
|
||||
(suppress-mesh-failure 4)
|
||||
(active 5)
|
||||
(check-ground 6)
|
||||
(flip-normals 7)
|
||||
(wraps 8)
|
||||
(inited 9)
|
||||
(no-draw 10)
|
||||
(need-setup 11)
|
||||
(use-global-wind 12)
|
||||
(autogen-uvs 13)
|
||||
(use-momentum 14)
|
||||
(use-parent-momentum 15)
|
||||
(riding 16)
|
||||
(hidden 17)
|
||||
(local-space 18)
|
||||
(local-space-xyz 19)
|
||||
(local-space-y 20)
|
||||
(use-old-resets 21)
|
||||
(using-alt-tex 22)
|
||||
)
|
||||
;; ---cloth-flag
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype cloth-pt (structure)
|
||||
((pt vector :inline)
|
||||
(u float)
|
||||
(v float)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype anchor-transform (structure)
|
||||
((offset vector :inline)
|
||||
(joint-name string)
|
||||
(joint int16)
|
||||
(constraint-index int16)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sphere-transform (structure)
|
||||
((offset vector :inline)
|
||||
(joint-name string)
|
||||
(radius float)
|
||||
(joint int16)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype disc-transform (structure)
|
||||
((offset vector :inline)
|
||||
(normal vector :inline)
|
||||
(joint-name basic)
|
||||
(radius float)
|
||||
(joint int16)
|
||||
(start-particle-index int16)
|
||||
(end-particle-index int16)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype anchor-transform-array (inline-array-class)
|
||||
((data anchor-transform :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(set! (-> anchor-transform-array heap-base) (the-as uint 32))
|
||||
|
||||
(deftype sphere-transform-array (inline-array-class)
|
||||
((data sphere-transform :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(set! (-> sphere-transform-array heap-base) (the-as uint 32))
|
||||
|
||||
(deftype disc-transform-array (inline-array-class)
|
||||
((data disc-transform :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(set! (-> disc-transform-array heap-base) (the-as uint 48))
|
||||
|
||||
(deftype cloth-thickness-array (inline-array-class)
|
||||
((data uint8 :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(set! (-> cloth-thickness-array heap-base) (the-as uint 1))
|
||||
|
||||
(deftype cloth-params (structure)
|
||||
((mesh int16)
|
||||
(gravity-constant meters)
|
||||
(wind-constant float)
|
||||
(cloth-width uint16)
|
||||
(num-sphere-constraints uint16)
|
||||
(num-disc-constraints uint16)
|
||||
(num-anchor-points uint16)
|
||||
(flags cloth-flag)
|
||||
(tex-name string)
|
||||
(tex-name2 string)
|
||||
(tex-name3 string)
|
||||
(alt-tex-name string)
|
||||
(alt-tex-name2 string)
|
||||
(alt-tex-name3 string)
|
||||
(cloth-thickness float)
|
||||
(initial-xform int16)
|
||||
(drag float)
|
||||
(ball-collision-radius meters)
|
||||
(num-iterations int8)
|
||||
(timestep-frequency int8)
|
||||
(secret-disable game-secrets)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype cloth-base (basic)
|
||||
()
|
||||
(:methods
|
||||
(update! (_type_) int)
|
||||
(setup-from-params! (_type_ cloth-params handle) int)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,102 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defun matrix-fur-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector))
|
||||
(set! (-> arg0 rvec quad) (-> arg3 quad))
|
||||
(set! (-> arg0 uvec quad) (-> arg2 quad))
|
||||
(set! (-> arg0 fvec quad) (-> arg1 quad))
|
||||
arg0
|
||||
)
|
||||
|
||||
(defun matrix-fu-compose ((arg0 matrix) (arg1 vector) (arg2 vector))
|
||||
(set! (-> arg0 fvec quad) (-> arg1 quad))
|
||||
(set! (-> arg0 uvec quad) (-> arg2 quad))
|
||||
(vector-cross! (-> arg0 rvec) arg2 arg1)
|
||||
arg0
|
||||
)
|
||||
|
||||
(defun matrix-fr-compose ((arg0 matrix) (arg1 vector) (arg2 vector))
|
||||
(set! (-> arg0 fvec quad) (-> arg1 quad))
|
||||
(set! (-> arg0 rvec quad) (-> arg2 quad))
|
||||
(vector-cross! (-> arg0 uvec) arg1 arg2)
|
||||
arg0
|
||||
)
|
||||
|
||||
(defun matrix-ur-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector))
|
||||
(set! (-> arg0 rvec quad) (-> arg2 quad))
|
||||
(set! (-> arg0 uvec quad) (-> arg1 quad))
|
||||
(vector-cross! (-> arg0 fvec) arg1 arg2)
|
||||
arg0
|
||||
)
|
||||
|
||||
(defun matrix-f-u-compose ((arg0 matrix) (arg1 vector) (arg2 vector))
|
||||
(set! (-> arg0 fvec quad) (-> arg1 quad))
|
||||
(vector-cross! (-> arg0 rvec) arg2 arg1)
|
||||
(vector-normalize! (-> arg0 rvec) 1.0)
|
||||
(vector-cross! (-> arg0 uvec) arg1 (-> arg0 rvec))
|
||||
arg0
|
||||
)
|
||||
|
||||
(defun matrix-f-r-compose ((arg0 matrix) (arg1 vector) (arg2 vector))
|
||||
(set! (-> arg0 fvec quad) (-> arg1 quad))
|
||||
(vector-cross! (-> arg0 uvec) arg1 arg2)
|
||||
(vector-normalize! (-> arg0 uvec) 1.0)
|
||||
(vector-cross! (-> arg0 rvec) (-> arg0 uvec) arg1)
|
||||
arg0
|
||||
)
|
||||
|
||||
(defun matrix-u-f-compose ((arg0 matrix) (arg1 vector) (arg2 vector))
|
||||
(set! (-> arg0 uvec quad) (-> arg1 quad))
|
||||
(vector-cross! (-> arg0 rvec) arg1 arg2)
|
||||
(vector-normalize! (-> arg0 rvec) 1.0)
|
||||
(vector-cross! (-> arg0 fvec) (-> arg0 rvec) arg1)
|
||||
arg0
|
||||
)
|
||||
|
||||
(defun matrix-u-r-compose ((arg0 matrix) (arg1 vector) (arg2 vector))
|
||||
(set! (-> arg0 uvec quad) (-> arg1 quad))
|
||||
(vector-cross! (-> arg0 fvec) arg2 arg1)
|
||||
(vector-normalize! (-> arg0 fvec) 1.0)
|
||||
(vector-cross! (-> arg0 rvec) arg1 (-> arg0 fvec))
|
||||
arg0
|
||||
)
|
||||
|
||||
(defun matrix-r-f-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector))
|
||||
(set! (-> arg0 rvec quad) (-> arg1 quad))
|
||||
(vector-cross! (-> arg0 uvec) arg2 arg1)
|
||||
(vector-normalize! (-> arg0 uvec) 1.0)
|
||||
(vector-cross! (-> arg0 fvec) arg1 (-> arg0 uvec))
|
||||
arg0
|
||||
)
|
||||
|
||||
(defun matrix-r-u-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector))
|
||||
(set! (-> arg0 rvec quad) (-> arg1 quad))
|
||||
(vector-cross! (-> arg0 fvec) arg1 arg2)
|
||||
(vector-normalize! (-> arg0 fvec) 1.0)
|
||||
(vector-cross! (-> arg0 uvec) (-> arg0 fvec) arg1)
|
||||
arg0
|
||||
)
|
||||
|
||||
(defun matrix-f-compose ((arg0 matrix) (arg1 vector))
|
||||
(set! (-> arg0 fvec quad) (-> arg1 quad))
|
||||
(let ((a2-0 (vector-get-unique! (new 'stack-no-clear 'vector) arg1)))
|
||||
(matrix-f-u-compose arg0 arg1 a2-0)
|
||||
)
|
||||
arg0
|
||||
)
|
||||
|
||||
(defun matrix-u-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector))
|
||||
(set! (-> arg0 uvec quad) (-> arg1 quad))
|
||||
(let ((a2-1 (vector-get-unique! (new 'stack-no-clear 'vector) arg1)))
|
||||
(matrix-u-f-compose arg0 arg1 a2-1)
|
||||
)
|
||||
arg0
|
||||
)
|
||||
|
||||
(defun matrix-r-compose ((arg0 matrix) (arg1 vector) (arg2 vector) (arg3 vector))
|
||||
(set! (-> arg0 rvec quad) (-> arg1 quad))
|
||||
(let ((a2-1 (vector-get-unique! (new 'stack-no-clear 'vector) arg1)))
|
||||
(matrix-r-f-compose arg0 arg1 a2-1 arg3)
|
||||
)
|
||||
arg0
|
||||
)
|
||||
|
||||
@@ -5,5 +5,22 @@
|
||||
;; name in dgo: prim-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++prim-flags
|
||||
(defenum prim-flags
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
(alpha-blend-enable 0) ;; set by default
|
||||
(texture-enable 1) ;; set by default
|
||||
(fog-enable 2)
|
||||
(pf3 3) ;; auto-clear vertices?
|
||||
(pf4 4) ;; has new verts to draw?
|
||||
(no-texture-name 5) ;; only has the ID.
|
||||
)
|
||||
;; ---prim-flags
|
||||
|
||||
(define-extern process-drawable-art-error (state string process-drawable))
|
||||
(define-extern *prim-engine* engine)
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -5,5 +5,63 @@
|
||||
;; name in dgo: water-info-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++water-flag
|
||||
(defenum water-flag
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
(active 0)
|
||||
(can-wade 1)
|
||||
(can-swim 2)
|
||||
(swim-ground 3)
|
||||
(can-ground 4)
|
||||
(use-ocean 5)
|
||||
(tar 6)
|
||||
(mud 7)
|
||||
(deadly 8)
|
||||
(use-water-anim 9)
|
||||
(no-grab-sound 10)
|
||||
(dark-eco 11)
|
||||
(lava 12)
|
||||
(swamp 13)
|
||||
(flow 14)
|
||||
(under-water 15)
|
||||
(head-under-water 16)
|
||||
(bouncing 17)
|
||||
(wading 18)
|
||||
(swimming 19)
|
||||
(touch-water 20)
|
||||
(jump-out 21)
|
||||
(break-surface 22)
|
||||
(spawn-drip 23)
|
||||
(part-splash 24)
|
||||
(part-drip 25)
|
||||
(part-rings 26)
|
||||
(part-water 27)
|
||||
(event 28)
|
||||
(over-water 29)
|
||||
(find-water 30)
|
||||
(touch-water-good 31)
|
||||
)
|
||||
;; ---water-flag
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype water-info (structure)
|
||||
((trans vector :inline)
|
||||
(normal vector :inline)
|
||||
(base-height meters)
|
||||
(depth meters)
|
||||
(handle handle)
|
||||
(flags water-flag)
|
||||
(prim drawable-region-prim)
|
||||
(extra-flags uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype water-sphere (structure)
|
||||
((sphere sphere :inline)
|
||||
(flags water-flag)
|
||||
(user0 int32)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -5,5 +5,185 @@
|
||||
;; name in dgo: art-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++draw-control-status
|
||||
(defenum draw-control-status
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
(close-to-screen 0)
|
||||
(no-draw 1)
|
||||
(no-draw-temp)
|
||||
(on-screen)
|
||||
(uninited)
|
||||
(no-draw-bounds)
|
||||
(no-closest-distance)
|
||||
(math-skel)
|
||||
(force-vu1)
|
||||
(no-draw-bounds2)
|
||||
(force-fade)
|
||||
(warp-cross-fade)
|
||||
(lod-set)
|
||||
(disable-fog)
|
||||
(hud)
|
||||
(no-bounds-check)
|
||||
)
|
||||
;; ---draw-control-status
|
||||
|
||||
|
||||
;; +++draw-control-data-format
|
||||
(defenum draw-control-data-format
|
||||
:type uint8
|
||||
:bitfield #f
|
||||
(pris 0)
|
||||
(merc 1)
|
||||
)
|
||||
;; ---draw-control-data-format
|
||||
|
||||
|
||||
;; +++draw-control-global-effect
|
||||
(defenum draw-control-global-effect
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(bit-0)
|
||||
(bit-1)
|
||||
(title-light)
|
||||
(disable-envmap)
|
||||
(rim-lights)
|
||||
(rim-lights2)
|
||||
(rim-lights3)
|
||||
(no-textures)
|
||||
)
|
||||
;; ---draw-control-global-effect
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype joint-anim (basic)
|
||||
"Base class for all joint animations. These are animations that store joint transforms."
|
||||
((name string :offset-assert 4) ;; guessed by decompiler
|
||||
(number int16 :offset-assert 8)
|
||||
(length int16 :offset-assert 10)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #xc
|
||||
:flag-assert #x90000000c
|
||||
)
|
||||
|
||||
(deftype joint-anim-matrix (joint-anim)
|
||||
"Joint animation which stores matrices directly. Not used."
|
||||
((data matrix :inline :dynamic :offset 16))
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
(deftype joint-anim-transformq (joint-anim)
|
||||
"Joint animation which stores transformq's directly. Not used."
|
||||
((data transformq :dynamic :inline :offset-assert 16) ;; guessed by decompiler
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
(deftype joint-anim-drawable (joint-anim)
|
||||
"Mysterious unused joint animation type."
|
||||
((data drawable :dynamic :offset-assert 12) ;; guessed by decompiler
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #xc
|
||||
:flag-assert #x90000000c
|
||||
)
|
||||
|
||||
(deftype joint-anim-frame (structure)
|
||||
"Frame containing all joint transforms. Note that there are two special frames: align and prejoint.
|
||||
The 'align' frame is used for the complicated animation alignment system, which allows the animation to move
|
||||
a character, among other things. The prejoint is just the root of the skeleton.
|
||||
The remaining transformq's are the joint transforms you'd expect."
|
||||
((matrices matrix 2 :inline :offset-assert 0) ;; guessed by decompiler
|
||||
(data transformq :dynamic :inline :offset-assert 128) ;; guessed by decompiler
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type int) _type_)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x80
|
||||
:flag-assert #x900000080
|
||||
)
|
||||
|
||||
(deftype joint-anim-compressed-hdr (structure)
|
||||
"Header for the compressed joint animation format."
|
||||
((control-bits uint32 14 :offset-assert 0) ;; guessed by decompiler
|
||||
(num-joints uint32 :offset-assert 56)
|
||||
(matrix-bits uint32 :offset-assert 60)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x40
|
||||
:flag-assert #x900000040
|
||||
)
|
||||
|
||||
(deftype joint-anim-compressed-fixed (structure)
|
||||
((hdr joint-anim-compressed-hdr :inline :offset-assert 0)
|
||||
(offset-64 uint32 :offset-assert 64)
|
||||
(offset-32 uint32 :offset-assert 68)
|
||||
(offset-16 uint32 :offset-assert 72)
|
||||
(reserved uint32 :offset-assert 76)
|
||||
(data vector 133 :inline :offset-assert 80) ;; guessed by decompiler
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x8a0
|
||||
:flag-assert #x9000008a0
|
||||
)
|
||||
|
||||
(deftype joint-anim-compressed-frame (structure)
|
||||
((offset-64 uint32 :offset-assert 0)
|
||||
(offset-32 uint32 :offset-assert 4)
|
||||
(offset-16 uint32 :offset-assert 8)
|
||||
(reserved uint32 :offset-assert 12)
|
||||
(data vector 133 :inline :offset-assert 16) ;; guessed by decompiler
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x860
|
||||
:flag-assert #x900000860
|
||||
)
|
||||
|
||||
(deftype joint-anim-compressed-control (structure)
|
||||
((num-frames uint16 :offset-assert 0)
|
||||
(flags uint16 :offset-assert 2)
|
||||
(fixed-qwc uint32 :offset-assert 4)
|
||||
(frame-qwc uint32 :offset-assert 8)
|
||||
(fixed joint-anim-compressed-fixed :offset-assert 12)
|
||||
(data joint-anim-compressed-frame :dynamic :offset-assert 16) ;; guessed by decompiler
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
(deftype art (basic)
|
||||
"Base class for anything considered `art`. This is typically foreground model data.
|
||||
This can be either an art container containing more arts, or an actual art thing (art-element)."
|
||||
((name string :offset 8) ;; guessed by decompiler
|
||||
(length int32 :offset-assert 12)
|
||||
(extra res-lump :offset-assert 16) ;; guessed by decompiler
|
||||
)
|
||||
:method-count-assert 14
|
||||
:size-assert #x14
|
||||
:flag-assert #xe00000014
|
||||
(:methods
|
||||
(login (_type_) _type_) ;; 9
|
||||
(art-method-10 (_type_) _type_) ;; 10
|
||||
(get-art-by-name-method "Look inside this art for an art with the given name and type. Return #f if not found" (_type_ string type) basic) ;; 11
|
||||
(get-art-idx-by-name-method "Look inside this art for an art with the given name and type and return the index of the art. Return #f if not found." (_type_ string type) int) ;; 12
|
||||
(contains-art-for-other-group? "Some art groups have placeholder #f's for some art that will be loaded separately as needed.
|
||||
Does this art group contain art that needs to be added to another group?" (_type_) symbol) ;; 13
|
||||
)
|
||||
)
|
||||
|
||||
(deftype art-element (art)
|
||||
"Base class Art which is not a container of more art."
|
||||
((master-art-group-name string :offset-assert 20)
|
||||
(master-art-group-index int32 :offset-assert 24)
|
||||
(pad uint8 20)
|
||||
)
|
||||
:method-count-assert 14
|
||||
:size-assert #x30
|
||||
:flag-assert #xe00000030
|
||||
)
|
||||
@@ -5,5 +5,174 @@
|
||||
;; name in dgo: debug-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
(define-extern add-debug-line (function symbol bucket-id vector vector rgba symbol rgba symbol))
|
||||
(define-extern add-debug-matrix (function symbol bucket-id matrix meters matrix))
|
||||
(define-extern add-debug-sphere (function symbol bucket-id vector meters rgba symbol))
|
||||
(define-extern add-debug-text-sphere (function symbol bucket-id vector meters string rgba symbol))
|
||||
(define-extern add-debug-vector (function symbol bucket-id vector vector meters rgba symbol))
|
||||
(define-extern add-debug-quaternion (function symbol bucket-id vector quaternion none))
|
||||
(define-extern drawable-frag-count (function drawable int))
|
||||
(define-extern drawable-tri-count (function drawable int))
|
||||
(define-extern add-debug-x (function symbol bucket-id vector rgba symbol))
|
||||
(define-extern add-debug-text-3d (function symbol bucket-id string vector font-color vector2h symbol))
|
||||
(define-extern add-debug-flat-triangle (function symbol bucket-id vector vector vector rgba symbol))
|
||||
(define-extern add-debug-box-with-transform (function symbol bucket-id bounding-box matrix rgba symbol))
|
||||
(define-extern add-debug-line-sphere (function symbol bucket-id vector vector float rgba none))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype pos-history (structure)
|
||||
((points (inline-array vector))
|
||||
(num-points int32)
|
||||
(h-first int32)
|
||||
(h-last int32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype debug-vertex (structure)
|
||||
((trans vector4w :inline)
|
||||
(normal vector3h :inline)
|
||||
(st vector2h :inline)
|
||||
(color uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype debug-vertex-stats (basic)
|
||||
((length int32)
|
||||
(pos-count int32)
|
||||
(vertex debug-vertex 600 :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *color-black* (new 'static 'rgba :a #x80))
|
||||
|
||||
(define *color-white* (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80))
|
||||
|
||||
(define *color-gray* (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80))
|
||||
|
||||
(define *color-red* (new 'static 'rgba :r #xff :a #x80))
|
||||
|
||||
(define *color-green* (new 'static 'rgba :g #xff :a #x80))
|
||||
|
||||
(define *color-blue* (new 'static 'rgba :b #xff :a #x80))
|
||||
|
||||
(define *color-cyan* (new 'static 'rgba :g #xff :b #xff :a #x80))
|
||||
|
||||
(define *color-magenta* (new 'static 'rgba :r #xff :b #xff :a #x80))
|
||||
|
||||
(define *color-yellow* (new 'static 'rgba :r #xff :g #xff :a #x80))
|
||||
|
||||
(define *color-purple* (new 'static 'rgba :r #x40 :b #x80 :a #x80))
|
||||
|
||||
(define *color-light-gray* (new 'static 'rgba :r #xb0 :g #xb0 :b #xb0 :a #xb0))
|
||||
|
||||
(define *color-light-red* (new 'static 'rgba :r #xff :g #x80 :b #x80 :a #x80))
|
||||
|
||||
(define *color-light-green* (new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80))
|
||||
|
||||
(define *color-light-blue* (new 'static 'rgba :r #x80 :g #x80 :b #xff :a #x80))
|
||||
|
||||
(define *color-light-cyan* (new 'static 'rgba :r #x80 :g #xff :b #xff :a #x80))
|
||||
|
||||
(define *color-light-magenta* (new 'static 'rgba :r #xff :g #x80 :b #xff :a #x80))
|
||||
|
||||
(define *color-light-yellow* (new 'static 'rgba :r #xff :g #xff :b #x80 :a #x80))
|
||||
|
||||
(define *color-dark-red* (new 'static 'rgba :r #x80 :a #x80))
|
||||
|
||||
(define *color-dark-green* (new 'static 'rgba :g #x80 :a #x80))
|
||||
|
||||
(define *color-dark-blue* (new 'static 'rgba :b #x80 :a #x80))
|
||||
|
||||
(define *color-dark-cyan* (new 'static 'rgba :g #x80 :b #x80 :a #x80))
|
||||
|
||||
(define *color-dark-magenta* (new 'static 'rgba :r #x80 :b #x80 :a #x80))
|
||||
|
||||
(define *color-dark-yellow* (new 'static 'rgba :r #x80 :g #x80 :a #x80))
|
||||
|
||||
(define *color-orange* (new 'static 'rgba :r #xff :g #x80 :a #x80))
|
||||
|
||||
(defun-debug draw-debug-text-3d ((arg0 string) (arg1 vector) (arg2 bucket-id) (arg3 font-color) (arg4 vector2h) (arg5 rgba))
|
||||
(add-debug-text-3d #t arg2 arg0 arg1 arg3 arg4)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun-debug draw-debug-x ((arg0 vector) (arg1 bucket-id) (arg2 rgba))
|
||||
(add-debug-x #t arg1 arg0 arg2)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun-debug draw-debug-line ((arg0 vector) (arg1 vector) (arg2 bucket-id) (arg3 rgba) (arg4 symbol) (arg5 rgba))
|
||||
(add-debug-line #t arg2 arg0 arg1 arg3 arg4 arg5)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun-debug draw-debug-vector ((arg0 vector) (arg1 vector) (arg2 bucket-id) (arg3 rgba) (arg4 meters))
|
||||
(add-debug-vector #t arg2 arg0 arg1 arg4 arg3)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun-debug draw-debug-flat-triangle ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 bucket-id) (arg4 rgba))
|
||||
(add-debug-flat-triangle #t arg3 arg0 arg1 arg2 arg4)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun-debug draw-debug-sphere ((arg0 vector) (arg1 bucket-id) (arg2 float) (arg3 rgba))
|
||||
(add-debug-sphere
|
||||
#t
|
||||
arg1
|
||||
arg0
|
||||
(if (< 0.0 arg2)
|
||||
arg2
|
||||
(-> arg0 w)
|
||||
)
|
||||
arg3
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun-debug draw-debug-matrix ((arg0 matrix) (arg1 bucket-id) (arg2 float))
|
||||
(add-debug-matrix #t arg1 arg0 arg2)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun-debug draw-debug-box-with-transform ((arg0 bounding-box) (arg1 matrix) (arg2 bucket-id) (arg3 rgba))
|
||||
(add-debug-box-with-transform #t arg2 arg0 arg1 arg3)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun-debug draw-debug-line-sphere ((arg0 vector) (arg1 vector) (arg2 bucket-id) (arg3 float) (arg4 rgba))
|
||||
(add-debug-line-sphere
|
||||
#t
|
||||
arg2
|
||||
arg0
|
||||
arg1
|
||||
(if (< 0.0 arg3)
|
||||
arg3
|
||||
(-> arg0 w)
|
||||
)
|
||||
arg4
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype stack-debug (structure)
|
||||
((r29 uint128)
|
||||
(r31 uint128)
|
||||
(test-count int32)
|
||||
(visit int32)
|
||||
(obj basic)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,33 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; this file is debug only
|
||||
(declare-file (debug))
|
||||
|
||||
(deftype memory-usage-info (structure)
|
||||
((name string)
|
||||
(count int32)
|
||||
(used int32)
|
||||
(total int32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype memory-usage-block (basic)
|
||||
((work-bsp basic)
|
||||
(length int32)
|
||||
(data memory-usage-info 112 :inline)
|
||||
)
|
||||
(:methods
|
||||
(reset! (_type_) _type_)
|
||||
(calculate-total (_type_) int)
|
||||
(print-mem-usage (_type_ level object) _type_)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *mem-usage* (new 'debug 'memory-usage-block))
|
||||
|
||||
(define *dma-mem-usage* (new 'debug 'memory-usage-block))
|
||||
|
||||
(define *temp-mem-usage* (the-as memory-usage-block #f))
|
||||
|
||||
@@ -5,5 +5,339 @@
|
||||
;; name in dgo: stats-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++perf-stat-bucket
|
||||
(defenum perf-stat-bucket
|
||||
:type uint32
|
||||
(all-code)
|
||||
(spatial-hash-build)
|
||||
(spatial-hash-search)
|
||||
(collide)
|
||||
(collide-list)
|
||||
(collide-fill)
|
||||
(actor-hash)
|
||||
(nav)
|
||||
(nav-dma-all)
|
||||
(nav-dma-read)
|
||||
(nav-dma-write) ;; 10
|
||||
(nav-dma-work)
|
||||
(nav-part1)
|
||||
(nav-part2)
|
||||
(nav-part3)
|
||||
(nav-part4)
|
||||
(nav-part5)
|
||||
(nav-part6)
|
||||
(nav-part7)
|
||||
(nav-part8)
|
||||
(nav-part9) ;; 20
|
||||
(nav-part10)
|
||||
|
||||
;; renamed
|
||||
(rb-all) ;; add-to-translation
|
||||
(rb-fc) ;; update-current-poly
|
||||
(rb-physics) ;; clamp-vector-to-mesh
|
||||
(rb-callback) ;; ray-step
|
||||
(rb-move) ;; update-spheres
|
||||
(rb-probe) ;; travel-around-spheres
|
||||
(vqp-all) ;; avoid-spheres
|
||||
(vqp-sound) ;; check-vector-collision-with-nav-spheres
|
||||
(vqp-parts) ;; find-nearest-poly
|
||||
(vqp-ja-post) ;; find-containing-poly ;; 30
|
||||
|
||||
(vqp-sections) ;; generate-velocity
|
||||
(vqp-post) ;; apply-rotation
|
||||
(vqp-common) ;; apply-velocity
|
||||
(find-nearest-poly) ;; travel-post
|
||||
(find-containing-poly) ;; common-post
|
||||
(misc)
|
||||
(mercneric)
|
||||
(tie-generic)
|
||||
(background) ;; 40
|
||||
(drawable)
|
||||
(tfrag)
|
||||
(tfrag-scissor)
|
||||
(inst-shrub)
|
||||
(proto-shrub)
|
||||
(inst-tie)
|
||||
(proto-tie)
|
||||
(bones)
|
||||
(camera)
|
||||
(foreground) ;; 50
|
||||
;; hover / vehicle / hud renames
|
||||
(vehicle-ai) ;; hover-path
|
||||
(vehicle-ai-calculate-vector) ;; hover-spheres
|
||||
(update-los) ;; hover-update
|
||||
(race-line) ;; hover-move
|
||||
(hud) ;; hover-find-closest
|
||||
(hud-format) ;; update-los
|
||||
;; explicit HUD buckets
|
||||
(hud-draw-string) ;; perf-stat-bucket-57
|
||||
(hud-draw-sprite) ;; perf-stat-bucket-58
|
||||
)
|
||||
;; ---perf-stat-bucket
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype tr-stat (structure)
|
||||
"triangle stats for a renderer. This can apply to a lot of different renderer types."
|
||||
((groups uint16)
|
||||
(fragments uint16)
|
||||
(tris uint32)
|
||||
(dverts uint32)
|
||||
(instances uint16)
|
||||
(pad uint16)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype merc-global-stats (structure)
|
||||
"Triangle stats for all merc renderers."
|
||||
((merc tr-stat :inline)
|
||||
(emerc tr-stat :inline)
|
||||
(mercneric tr-stat :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype perf-stat (structure)
|
||||
"Performance statistics for a single 'bucket' or category. Unlike the more general profile-bars,
|
||||
this records statistics like cache hits/instruction counts."
|
||||
((frame-number uint32)
|
||||
(count uint32)
|
||||
(cycles uint32)
|
||||
(instructions uint32)
|
||||
(icache uint32)
|
||||
(dcache uint32)
|
||||
(select uint32)
|
||||
(ctrl uint32)
|
||||
(accum0 uint32)
|
||||
(accum1 uint32)
|
||||
(to-vu0-waits uint32)
|
||||
(to-spr-waits uint32)
|
||||
(from-spr-waits uint32)
|
||||
)
|
||||
:pack-me
|
||||
(:methods
|
||||
(perf-stat-method-9 () none)
|
||||
(print-to-stream (_type_ string basic) none)
|
||||
(start-profiling! (_type_) none)
|
||||
(stop-profiling! (_type_) none)
|
||||
(update-wait-stats (_type_ uint uint uint) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defun-debug perf-stat-bucket->string ((arg0 perf-stat-bucket))
|
||||
(case arg0
|
||||
(((perf-stat-bucket collide-fill))
|
||||
"collide-fill"
|
||||
)
|
||||
(((perf-stat-bucket nav))
|
||||
"nav"
|
||||
)
|
||||
(((perf-stat-bucket bones))
|
||||
"bones"
|
||||
)
|
||||
(((perf-stat-bucket hud-draw-string))
|
||||
"hud-draw-string"
|
||||
)
|
||||
(((perf-stat-bucket rb-move))
|
||||
"rb-move"
|
||||
)
|
||||
(((perf-stat-bucket vehicle-ai))
|
||||
"vehicle-ai"
|
||||
)
|
||||
(((perf-stat-bucket foreground))
|
||||
"foreground"
|
||||
)
|
||||
(((perf-stat-bucket inst-tie))
|
||||
"inst-tie"
|
||||
)
|
||||
(((perf-stat-bucket vqp-common))
|
||||
"vqp-common"
|
||||
)
|
||||
(((perf-stat-bucket nav-dma-write))
|
||||
"nav-dma-write"
|
||||
)
|
||||
(((perf-stat-bucket collide-list))
|
||||
"collide-list"
|
||||
)
|
||||
(((perf-stat-bucket rb-physics))
|
||||
"rb-physics"
|
||||
)
|
||||
(((perf-stat-bucket nav-part3))
|
||||
"nav-part3"
|
||||
)
|
||||
(((perf-stat-bucket mercneric))
|
||||
"mercneric"
|
||||
)
|
||||
(((perf-stat-bucket rb-probe))
|
||||
"rb-probe"
|
||||
)
|
||||
(((perf-stat-bucket vehicle-ai-calculate-vector))
|
||||
"vehicle-ai-calculate-vector"
|
||||
)
|
||||
(((perf-stat-bucket tfrag-scissor))
|
||||
"tfrag-scissor"
|
||||
)
|
||||
(((perf-stat-bucket vqp-sections))
|
||||
"vqp-sections"
|
||||
)
|
||||
(((perf-stat-bucket misc))
|
||||
"misc"
|
||||
)
|
||||
(((perf-stat-bucket find-nearest-poly))
|
||||
"find-nearest-poly"
|
||||
)
|
||||
(((perf-stat-bucket nav-part6))
|
||||
"nav-part6"
|
||||
)
|
||||
(((perf-stat-bucket nav-part2))
|
||||
"nav-part2"
|
||||
)
|
||||
(((perf-stat-bucket inst-shrub))
|
||||
"inst-shrub"
|
||||
)
|
||||
(((perf-stat-bucket proto-shrub))
|
||||
"proto-shrub"
|
||||
)
|
||||
(((perf-stat-bucket rb-all))
|
||||
"rb-all"
|
||||
)
|
||||
(((perf-stat-bucket drawable))
|
||||
"drawable"
|
||||
)
|
||||
(((perf-stat-bucket nav-part9))
|
||||
"nav-part9"
|
||||
)
|
||||
(((perf-stat-bucket all-code))
|
||||
"all-code"
|
||||
)
|
||||
(((perf-stat-bucket actor-hash))
|
||||
"actor-hash"
|
||||
)
|
||||
(((perf-stat-bucket nav-dma-all))
|
||||
"nav-dma-all"
|
||||
)
|
||||
(((perf-stat-bucket hud-draw-sprite))
|
||||
"hud-draw-sprite"
|
||||
)
|
||||
(((perf-stat-bucket nav-part10))
|
||||
"nav-part10"
|
||||
)
|
||||
(((perf-stat-bucket hud-format))
|
||||
"hud-format"
|
||||
)
|
||||
(((perf-stat-bucket race-line))
|
||||
"race-line"
|
||||
)
|
||||
(((perf-stat-bucket nav-dma-work))
|
||||
"nav-dma-work"
|
||||
)
|
||||
(((perf-stat-bucket update-los))
|
||||
"update-los"
|
||||
)
|
||||
(((perf-stat-bucket proto-tie))
|
||||
"proto-tie"
|
||||
)
|
||||
(((perf-stat-bucket nav-part4))
|
||||
"nav-part4"
|
||||
)
|
||||
(((perf-stat-bucket spatial-hash-search))
|
||||
"spatial-hash-search"
|
||||
)
|
||||
(((perf-stat-bucket find-containing-poly))
|
||||
"find-containing-poly"
|
||||
)
|
||||
(((perf-stat-bucket vqp-ja-post))
|
||||
"vqp-ja-post"
|
||||
)
|
||||
(((perf-stat-bucket rb-callback))
|
||||
"rb-callback"
|
||||
)
|
||||
(((perf-stat-bucket nav-part7))
|
||||
"nav-part7"
|
||||
)
|
||||
(((perf-stat-bucket tfrag))
|
||||
"tfrag"
|
||||
)
|
||||
(((perf-stat-bucket vqp-sound))
|
||||
"vqp-sound"
|
||||
)
|
||||
(((perf-stat-bucket hud))
|
||||
"hud"
|
||||
)
|
||||
(((perf-stat-bucket collide))
|
||||
"collide"
|
||||
)
|
||||
(((perf-stat-bucket nav-dma-read))
|
||||
"nav-dma-read"
|
||||
)
|
||||
(((perf-stat-bucket rb-fc))
|
||||
"rb-fc"
|
||||
)
|
||||
(((perf-stat-bucket vqp-post))
|
||||
"vqp-post"
|
||||
)
|
||||
(((perf-stat-bucket vqp-parts))
|
||||
"vqp-parts"
|
||||
)
|
||||
(((perf-stat-bucket spatial-hash-build))
|
||||
"spatial-hash-build"
|
||||
)
|
||||
(((perf-stat-bucket camera))
|
||||
"camera"
|
||||
)
|
||||
(((perf-stat-bucket tie-generic))
|
||||
"tie-generic"
|
||||
)
|
||||
(((perf-stat-bucket vqp-all))
|
||||
"vqp-all"
|
||||
)
|
||||
(((perf-stat-bucket background))
|
||||
"background"
|
||||
)
|
||||
(((perf-stat-bucket nav-part5))
|
||||
"nav-part5"
|
||||
)
|
||||
(((perf-stat-bucket nav-part1))
|
||||
"nav-part1"
|
||||
)
|
||||
(((perf-stat-bucket nav-part8))
|
||||
"nav-part8"
|
||||
)
|
||||
(else
|
||||
"*unknown*"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype perf-stat-array (inline-array-class)
|
||||
"Array of all stats for all buckets."
|
||||
((data perf-stat :inline :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(set! (-> perf-stat-array heap-base) (the-as uint 52))
|
||||
|
||||
(defmethod start-profiling! ((this perf-stat))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod stop-profiling! ((this perf-stat))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod update-wait-stats ((this perf-stat) (arg0 uint) (arg1 uint) (arg2 uint))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(when (not *debug-segment*)
|
||||
(set! (-> perf-stat method-table 11) nothing)
|
||||
(set! (-> perf-stat method-table 12) nothing)
|
||||
(set! (-> perf-stat method-table 13) nothing)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,60 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; WARN: Return type mismatch pointer vs (inline-array dma-bucket).
|
||||
(defun dma-buffer-add-buckets ((dma-buf dma-buffer) (bucket-count int))
|
||||
(let ((v0-0 (-> dma-buf base)))
|
||||
(let ((v1-0 (the-as object v0-0)))
|
||||
(dotimes (a2-0 bucket-count)
|
||||
(set! (-> (the-as dma-bucket v1-0) tag)
|
||||
(new 'static 'dma-tag :id (dma-tag-id next) :addr (the-as int (&+ (the-as pointer v1-0) 16)))
|
||||
)
|
||||
(set! (-> (the-as dma-bucket v1-0) last) (the-as (pointer dma-tag) v1-0))
|
||||
(set! v1-0 (&+ (the-as pointer v1-0) 16))
|
||||
)
|
||||
(set! (-> dma-buf base) (the-as pointer v1-0))
|
||||
)
|
||||
(the-as (inline-array dma-bucket) v0-0)
|
||||
)
|
||||
)
|
||||
|
||||
(defun dma-buffer-patch-buckets ((base dma-bucket) (count int))
|
||||
(when (nonzero? base)
|
||||
(dotimes (v1-1 count)
|
||||
(cond
|
||||
((= base (-> base last))
|
||||
(set! (-> base tag) (new 'static 'dma-tag :id (dma-tag-id cnt)))
|
||||
(set! (-> base clear) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
(else
|
||||
(set! (-> base last 0 addr) (the-as int (&+ base 16)))
|
||||
(cond
|
||||
((and (or *display-profile* *stats-profile-bars*) (not *display-capture-mode*))
|
||||
(set! (-> (the-as dma-packet base) vif0) (new 'static 'vif-tag :cmd (vif-cmd mark) :imm v1-1))
|
||||
(set! (-> (the-as dma-packet base) vif1) (new 'static 'vif-tag :irq #x1))
|
||||
)
|
||||
(else
|
||||
(set! (-> base clear) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(&+! base 16)
|
||||
)
|
||||
)
|
||||
base
|
||||
)
|
||||
|
||||
(defun dma-bucket-insert-tag ((buckets (inline-array dma-bucket))
|
||||
(bucket bucket-id)
|
||||
(start-tag pointer)
|
||||
(end-tag-to-patch (pointer dma-tag))
|
||||
)
|
||||
(let ((v1-1 (-> buckets bucket)))
|
||||
(set! (-> (the-as dma-bucket (-> v1-1 last)) next) (the-as uint start-tag))
|
||||
(set! (-> v1-1 last) end-tag-to-patch)
|
||||
)
|
||||
start-tag
|
||||
)
|
||||
|
||||
@@ -5,5 +5,470 @@
|
||||
;; name in dgo: dma-buffer
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
(defmacro gs-reg-list (&rest reg-ids)
|
||||
"Generate a giftag register descriptor list from reg-ids."
|
||||
|
||||
(let ((reg-count (length reg-ids)))
|
||||
(when (> (length reg-ids) 16)
|
||||
(ferror "too many regs passed to gs-reg-list")
|
||||
)
|
||||
(let ((list-to-splice '())
|
||||
(cur-lst reg-ids)
|
||||
(i -1))
|
||||
|
||||
;; this is questionable.
|
||||
(while (and (not (null? cur-lst)) (< i 15))
|
||||
(push! list-to-splice (cons 'gif-reg-id (cons (car cur-lst) '())))
|
||||
(push! list-to-splice (string->symbol-format ":regs{}" (inc! i)))
|
||||
(pop! cur-lst)
|
||||
)
|
||||
|
||||
`(new 'static 'gif-tag-regs
|
||||
,@list-to-splice
|
||||
)
|
||||
)
|
||||
#| ;; the opengoal compiler does not have enough constant propagation for this for now
|
||||
(let ((i -1))
|
||||
|
||||
`(the-as gif-tag-regs (logior ,@(apply (lambda (x)
|
||||
`(shl (the-as uint (gif-reg-id ,x)) ,(* 4 (inc! i)))
|
||||
) reg-ids)
|
||||
))
|
||||
|
||||
)|#
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro dma-buffer-add-base-type (buf pkt dma-type &rest body)
|
||||
"Base macro for adding stuff to a dma-buffer. Don't use this directly!"
|
||||
|
||||
(with-gensyms (dma-buf)
|
||||
`(let* ((,dma-buf ,buf)
|
||||
(,pkt (the-as ,dma-type (-> ,dma-buf base))))
|
||||
|
||||
,@body
|
||||
|
||||
(set! (-> ,dma-buf base) (&+ (the-as pointer ,pkt) (size-of ,dma-type)))
|
||||
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro dma-buffer-add-base-data (buf data-type forms)
|
||||
"Base macro for adding data words to a dma-buffer.
|
||||
Each form in forms is converted into data-type and added to the buffer. NO TYPE CHECKING is performed, so be careful!"
|
||||
|
||||
(with-gensyms (dma-buf ptr)
|
||||
`(let* ((,dma-buf ,buf)
|
||||
(,ptr (the-as (pointer ,data-type) (-> ,dma-buf base))))
|
||||
|
||||
,@(apply-i (lambda (x i) `(set! (-> ,ptr ,i) (the-as ,data-type ,x))) forms)
|
||||
|
||||
(set! (-> ,dma-buf base) (&+ (the-as pointer ,ptr) (* ,(length forms) (size-of ,data-type))))
|
||||
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmacro dma-buffer-add-cnt-vif2 (buf qwc vif0 vif1)
|
||||
"Add a dma-packet to a dma-buffer.
|
||||
The packet is made up of a 'cnt' DMAtag (transfer qwc qwords of data after the tag and continue from after that point)
|
||||
and includes two vif-tags for vifcode, or something else if needed."
|
||||
|
||||
(with-gensyms (pkt)
|
||||
`(dma-buffer-add-base-type ,buf ,pkt dma-packet
|
||||
|
||||
(set! (-> ,pkt dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc ,qwc))
|
||||
|
||||
(set! (-> ,pkt vif0) ,vif0)
|
||||
(set! (-> ,pkt vif1) ,vif1)
|
||||
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro dma-buffer-add-ref-vif2 (buf qwc addr vif0 vif1)
|
||||
"Add a dma-packet to a dma-buffer.
|
||||
The packet is made up of a 'cnt' DMAtag (transfer qwc qwords of data at addr and continue from after the tag)
|
||||
and includes two vif-tags for vifcode, or something else if needed."
|
||||
|
||||
(with-gensyms (pkt)
|
||||
`(dma-buffer-add-base-type ,buf ,pkt dma-packet
|
||||
|
||||
(set! (-> ,pkt dma) (new 'static 'dma-tag :id (dma-tag-id ref) :qwc ,qwc :addr (the-as int ,addr)))
|
||||
|
||||
(set! (-> ,pkt vif0) ,vif0)
|
||||
(set! (-> ,pkt vif1) ,vif1)
|
||||
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro dma-buffer-add-ret (buf)
|
||||
"Add a dma-packet to a dma-buffer. This packet simply does a DMA 'return' "
|
||||
|
||||
(with-gensyms (pkt)
|
||||
`(dma-buffer-add-base-type ,buf ,pkt dma-packet
|
||||
|
||||
(set! (-> ,pkt dma) (new 'static 'dma-tag :id (dma-tag-id ret) :qwc 0))
|
||||
|
||||
(set! (-> ,pkt vif0) (new 'static 'vif-tag :cmd (vif-cmd nop)))
|
||||
(set! (-> ,pkt vif1) (new 'static 'vif-tag :cmd (vif-cmd nop)))
|
||||
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro dma-buffer-add-gif-tag (buf giftag gifregs)
|
||||
"Add a giftag to a dma-buffer."
|
||||
|
||||
(with-gensyms (pkt)
|
||||
`(dma-buffer-add-base-type ,buf ,pkt gs-gif-tag
|
||||
|
||||
(set! (-> ,pkt tag) ,giftag)
|
||||
|
||||
(set! (-> ,pkt regs) ,gifregs)
|
||||
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro dma-buffer-add-uint64 (buf &rest body)
|
||||
"Add 64-bit words to a dma-buffer. See dma-buffer-add-base-data"
|
||||
|
||||
`(dma-buffer-add-base-data ,buf uint64 ,body)
|
||||
)
|
||||
|
||||
(defmacro dma-buffer-add-uint128 (buf &rest body)
|
||||
"Add 128-bit words to a dma-buffer. See dma-buffer-add-base-data"
|
||||
|
||||
`(dma-buffer-add-base-data ,buf uint128 ,body)
|
||||
)
|
||||
|
||||
(defmacro dma-buffer-add-gs-set-flusha (buf &rest reg-list)
|
||||
"Add a gif cnt dma packet to a dma-buffer for setting GS registers. Up to 16 can be set at once.
|
||||
The packet runs the flusha command which waits for GIF transfer to end and VU1 microprogram to stop.
|
||||
reg-list is a list of pairs where the car is the register name and the cadr is the value to be set for that register."
|
||||
|
||||
(let ((reg-count (length reg-list))
|
||||
(qwc (+ (length reg-list) 1))
|
||||
(reg-names (apply first reg-list))
|
||||
(reg-datas (apply second reg-list))
|
||||
)
|
||||
`(begin
|
||||
;; dma tag
|
||||
(dma-buffer-add-cnt-vif2 ,buf ,qwc
|
||||
(new 'static 'vif-tag :cmd (vif-cmd flusha))
|
||||
(new 'static 'vif-tag :cmd (vif-cmd direct) :imm ,qwc)
|
||||
)
|
||||
|
||||
;; gif tag for editing gs regs
|
||||
(dma-buffer-add-gif-tag ,buf (new 'static 'gif-tag64 :nloop 1 :eop 1 :nreg ,reg-count)
|
||||
(gs-reg-list a+d a+d a+d a+d a+d a+d a+d a+d a+d a+d a+d a+d a+d a+d a+d a+d)
|
||||
)
|
||||
|
||||
;; gs regs
|
||||
(dma-buffer-add-uint64 ,buf
|
||||
,@(apply2 (lambda (x) x) (lambda (x) `(gs-reg64 ,x)) reg-datas reg-names)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro dma-buffer-add-gs-set (buf &rest reg-list)
|
||||
"Add a gif cnt dma packet to a dma-buffer for setting GS registers. Up to 16 can be set at once.
|
||||
reg-list is a list of pairs where the car is the register name and the cadr is the value to be set for that register."
|
||||
|
||||
(let ((reg-count (length reg-list))
|
||||
(qwc (+ (length reg-list) 1))
|
||||
(reg-names (apply first reg-list))
|
||||
(reg-datas (apply second reg-list))
|
||||
)
|
||||
`(begin
|
||||
;; dma tag
|
||||
(dma-buffer-add-cnt-vif2 ,buf ,qwc
|
||||
(new 'static 'vif-tag :cmd (vif-cmd nop))
|
||||
(new 'static 'vif-tag :cmd (vif-cmd direct) :imm ,qwc)
|
||||
)
|
||||
|
||||
;; gif tag for editing gs regs
|
||||
(dma-buffer-add-gif-tag ,buf (new 'static 'gif-tag64 :nloop 1 :eop 1 :nreg ,reg-count)
|
||||
(gs-reg-list a+d a+d a+d a+d a+d a+d a+d a+d a+d a+d a+d a+d a+d a+d a+d a+d)
|
||||
)
|
||||
|
||||
;; gs regs
|
||||
(dma-buffer-add-uint64 ,buf
|
||||
,@(apply2 (lambda (x) x) (lambda (x) `(gs-reg64 ,x)) reg-datas reg-names)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro with-cnt-vif-block (bindings &rest body)
|
||||
"Start a cnt w/ vif direct to gif dma packet setup for the dma-buffer in bindings.
|
||||
With this, you can transfer data through PATH2 without having to setup the tag yourself.
|
||||
The qwc of the transfer is determined at runtime at the end of this block."
|
||||
|
||||
(let ((buf (first bindings)))
|
||||
|
||||
(with-gensyms (buf-start buf-qwc)
|
||||
`(let ((,buf-start (-> ,buf base)))
|
||||
|
||||
;; setup the dmatag for PATH2 transfer, qwc is 0 (patched later)
|
||||
(dma-buffer-add-cnt-vif2 ,buf 0
|
||||
(new 'static 'vif-tag :cmd (vif-cmd nop))
|
||||
(new 'static 'vif-tag :cmd (vif-cmd direct))
|
||||
)
|
||||
|
||||
;; things with this buffer!
|
||||
,@body
|
||||
|
||||
;; patch qwc! just do the difference between the current ptr and the old one and turn it into qwords.
|
||||
;; we take one qword out because it's the initial dmatag which isnt part of the count.
|
||||
;; this rounds *down*, so make sure to fill the buffer in 128-bit boundaries.
|
||||
(let ((,buf-qwc (/ (+ (&- -16 ,buf-start) (the int (-> ,buf base))) 16)))
|
||||
(cond
|
||||
((nonzero? ,buf-qwc) ;; stuff was added to the buffer
|
||||
;; patch the DMA tag
|
||||
(logior! (-> (the-as (pointer dma-tag) ,buf-start) 0) (the-as uint (new 'static 'dma-tag :qwc ,buf-qwc)))
|
||||
;; patch the 2nd vifcode's imm field (qwc)
|
||||
(logior! (-> (the-as (pointer dma-tag) ,buf-start) 1) (the-as uint (shl (shr (shl ,buf-qwc 48) 48) 32)))
|
||||
)
|
||||
(else ;; nothing was added to the buffer. delete the dmatag, you cannot transfer 0 qwords.
|
||||
(set! (-> ,buf base) ,buf-start)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
))
|
||||
)
|
||||
|
||||
(defmacro with-cnt-vif-block-qwc (bindings &rest body)
|
||||
"Start a cnt w/ vif direct to gif dma packet setup for the dma-buffer in bindings.
|
||||
With this, you can transfer data through PATH2 without having to setup the tag yourself.
|
||||
The qwc of the transfer is determined at runtime at the end of this block.
|
||||
WARNING: You MUST guarantee that the resulting qwc is NOT zero!"
|
||||
|
||||
(let ((buf (first bindings)))
|
||||
|
||||
(with-gensyms (buf-start buf-qwc)
|
||||
`(let ((,buf-start (the-as dma-packet (-> ,buf base))))
|
||||
;; dmatag will be added at the end so we reserve
|
||||
(&+! (-> ,buf base) 16)
|
||||
|
||||
;; setup the dmatag for PATH2 transfer, qwc is 0 (patched later)
|
||||
(dma-buffer-add-cnt-vif2 ,buf 0
|
||||
(new 'static 'vif-tag :cmd (vif-cmd nop))
|
||||
(new 'static 'vif-tag :cmd (vif-cmd direct))
|
||||
)
|
||||
|
||||
;; things with this buffer!
|
||||
,@body
|
||||
|
||||
;; we make the dmatag now! its at the start.
|
||||
(let ((,buf-qwc (/ (+ (- -16 (the-as int ,buf-start)) (the-as int (-> ,buf base))) 16)))
|
||||
(set! (-> ,buf-start dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc ,buf-qwc))
|
||||
(set! (-> ,buf-start vif0) (new 'static 'vif-tag))
|
||||
(set! (-> ,buf-start vif1) (new 'static 'vif-tag :cmd (vif-cmd direct) :msk #x1 :imm ,buf-qwc))
|
||||
)
|
||||
)
|
||||
|
||||
))
|
||||
)
|
||||
|
||||
(defmacro with-dma-bucket (bindings &rest body)
|
||||
"Start a new dma-bucket in body that will be finished at the end.
|
||||
The bindings are the dma-buffer, dma-bucket and bucket-id respectively."
|
||||
|
||||
(let ((buf (first bindings))
|
||||
(bucket (second bindings))
|
||||
(bucket-id (third bindings))
|
||||
)
|
||||
|
||||
(with-gensyms (buf-start bucket-edge pkt)
|
||||
`(let ((,buf-start (-> ,buf base)))
|
||||
|
||||
,@body
|
||||
|
||||
;; we end the chain with a next. The bucket system will patch the next chain to this,
|
||||
;; and then patch all the buckets togehter before sending the DMA.
|
||||
(let ((,bucket-edge (the (pointer dma-tag) (-> ,buf base))))
|
||||
|
||||
;; if nothing was added, skip the tag entirely.
|
||||
;;(when (!= ,bucket-edge ,buf-start)
|
||||
(let ((,pkt (the-as dma-packet (-> ,buf base))))
|
||||
|
||||
(set! (-> ,pkt dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
||||
(set! (-> ,pkt vif0) (new 'static 'vif-tag :cmd (vif-cmd nop)))
|
||||
(set! (-> ,pkt vif1) (new 'static 'vif-tag :cmd (vif-cmd nop)))
|
||||
|
||||
(set! (-> ,buf base) (&+ (the-as pointer ,pkt) (size-of dma-packet)))
|
||||
|
||||
)
|
||||
(dma-bucket-insert-tag ,bucket ,bucket-id
|
||||
,buf-start ;; the first thing in this chain, bucket will patch previous to this
|
||||
,bucket-edge ;; end of this chain (ptr to next tag)
|
||||
)
|
||||
;; )
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro with-dma-buffer-add-bucket (bindings &key (bucket-group (-> (current-frame) bucket-group)) &rest body)
|
||||
"Bind a dma-buffer to a variable and use it on a block to allow adding things to a new bucket.
|
||||
usage: (with-dma-buffer-add-bucket ((buffer-name buffer) bucket-id) &rest body)
|
||||
example: (with-dma-buffer-add-bucket ((buf (-> (current-frame) debug-buf)) (bucket-id debug-no-zbuf)) ...)"
|
||||
|
||||
`(let ((,(caar bindings) ,(cadar bindings)))
|
||||
(with-dma-bucket (,(caar bindings) ,bucket-group ,(cadr bindings))
|
||||
,@body
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype dma-packet (structure)
|
||||
"The header for a DMA transfer, containing an DMA tag, and VIF tags."
|
||||
((dma dma-tag)
|
||||
(vif0 vif-tag)
|
||||
(vif1 vif-tag)
|
||||
(quad uint128 :overlay-at dma)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype dma-packet-array (inline-array-class)
|
||||
"Unused dma array. Unclear how it should be used."
|
||||
((data dma-packet :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(set! (-> dma-packet-array heap-base) (the-as uint 16))
|
||||
|
||||
(deftype dma-gif (structure)
|
||||
"Believed unused GIF header type."
|
||||
((gif uint64 2)
|
||||
(gif0 uint64 :overlay-at (-> gif 0))
|
||||
(gif1 uint64 :overlay-at (-> gif 1))
|
||||
(quad uint128 :overlay-at (-> gif 0))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype dma-gif-packet (structure)
|
||||
"The header for a DMA transfer that goes directly to GIF, containing DMA, VIF, GIF tags."
|
||||
((dma-vif dma-packet :inline)
|
||||
(gif uint64 2)
|
||||
(gif0 uint64 :overlay-at (-> gif 0))
|
||||
(gif1 uint64 :overlay-at (-> gif 1))
|
||||
(quad uint128 2 :overlay-at (-> dma-vif dma))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype dma-buffer (basic)
|
||||
"A buffer for DMA data."
|
||||
((allocated-length int32)
|
||||
(base pointer)
|
||||
(end pointer)
|
||||
(real-buffer-end int32)
|
||||
(data-buffer uint8 :dynamic :overlay-at real-buffer-end)
|
||||
(data uint64 1 :offset 32)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type int) _type_)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod new dma-buffer ((allocation symbol) (type-to-make type) (size-bytes int))
|
||||
"Allocate a DMA buffer to hold the given size"
|
||||
(let ((v0-0 (object-new allocation type-to-make (+ size-bytes -4 (-> type-to-make size)))))
|
||||
(set! (-> v0-0 base) (-> v0-0 data))
|
||||
(set! (-> v0-0 allocated-length) size-bytes)
|
||||
(set! (-> v0-0 real-buffer-end) (the-as int (&+ (-> v0-0 data) size-bytes)))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
(defun dma-buffer-inplace-new ((dma-buff dma-buffer) (size-bytes int))
|
||||
(set! (-> dma-buff base) (-> dma-buff data))
|
||||
(set! (-> dma-buff allocated-length) size-bytes)
|
||||
dma-buff
|
||||
)
|
||||
|
||||
(defmethod length ((this dma-buffer))
|
||||
(-> this allocated-length)
|
||||
)
|
||||
|
||||
(defmethod asize-of ((this dma-buffer))
|
||||
(+ (-> this allocated-length) -4 (-> dma-buffer size))
|
||||
)
|
||||
|
||||
(defun dma-buffer-length ((dma-buf dma-buffer))
|
||||
(shr (+ (&- (-> dma-buf base) (the-as uint (-> dma-buf data))) 15) 4)
|
||||
)
|
||||
|
||||
(defun dma-buffer-free ((dma-buf dma-buffer))
|
||||
(shr (+ (&- (-> dma-buf end) (the-as uint (-> dma-buf base))) 15) 4)
|
||||
)
|
||||
|
||||
;; ERROR: Failed store: (s.w! (+ t2-0 8) t3-5) at op 23
|
||||
;; ERROR: Failed store: (s.w! (+ t2-0 12) t3-8) at op 32
|
||||
(defun dma-buffer-add-vu-function ((dma-buf dma-buffer) (vu-func vu-function) (flush-path-3 int))
|
||||
"Add DMA tags to load the given VU function. The destination in vu instruction memory
|
||||
is specific inside the vu-function. This does NOT copy the vu-function into the buffer,
|
||||
but creates a reference to the existing VU function."
|
||||
;; The first 4 bytes of a vu-function object's data are discarded because they aren't aligned.
|
||||
(let ((func-ptr (the-as pointer (&-> vu-func data 4)))
|
||||
;; og:preserve-this we rely on the vu functions being empty on pc
|
||||
(qlen (#if PC_PORT 0 (-> vu-func qlength))) ;; number of quadwords
|
||||
(origin (-> vu-func origin)) ;; destination address in VU instruction memory.
|
||||
)
|
||||
;; loop until whole program is transferred.
|
||||
(while (> qlen 0)
|
||||
;; transfer up to 127 quadwords at a single time.
|
||||
(let ((qwc-now (min 127 qlen)))
|
||||
;; Set up DMA to transfer the data from the vu-function
|
||||
;; ref id = reference to data outside of the buffer.
|
||||
(dma-buffer-add-ref-vif2 dma-buf qwc-now func-ptr
|
||||
;; Set up first vifcode as a flush.
|
||||
(new 'static 'vif-tag :cmd (if (zero? flush-path-3) (vif-cmd flushe) (vif-cmd flusha)))
|
||||
;; next vifcode, transfer microprogram. This is in 64-bit units (VU instructions)
|
||||
(new 'static 'vif-tag :cmd (vif-cmd mpg) :num (shl qwc-now 1) :imm origin)
|
||||
)
|
||||
;; increment by qwc-now quadwords.
|
||||
(&+! func-ptr (shl qwc-now 4))
|
||||
(set! qlen (- qlen qwc-now))
|
||||
(+! origin (shl qwc-now 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
(defun dma-buffer-send ((chan dma-bank) (buf dma-buffer))
|
||||
"Send the DMA buffer! DOES NOT TRANSFER TAG, you probably want dma-buffer-send-chain instead."
|
||||
(when (< (-> buf allocated-length) (&- (-> buf base) (the-as uint (-> buf data))))
|
||||
(crash!)
|
||||
0
|
||||
)
|
||||
(dma-send chan (the-as uint (-> buf data)) (the-as uint (dma-buffer-length buf)))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun dma-buffer-send-chain ((chan dma-bank-source) (buf dma-buffer))
|
||||
"Send the DMA buffer! Sends the tags, so this is suitable for the main graphics chain."
|
||||
(when (< (-> buf allocated-length) (&- (-> buf base) (the-as uint (-> buf data))))
|
||||
(crash!)
|
||||
0
|
||||
)
|
||||
(dma-send-chain chan (the-as uint (-> buf data)))
|
||||
(none)
|
||||
)
|
||||
@@ -7,3 +7,715 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; this file is debug only
|
||||
(declare-file (debug))
|
||||
|
||||
(deftype vif-disasm-element (structure)
|
||||
((mask uint32)
|
||||
(tag vif-cmd-32)
|
||||
(val uint32)
|
||||
(print uint32)
|
||||
(string1 string)
|
||||
(string2 string)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *vif-disasm-table*
|
||||
(new 'static 'boxed-array :type vif-disasm-element
|
||||
(new 'static 'vif-disasm-element :mask #x7f :string1 "nop")
|
||||
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 stcycl) :print #x2 :string1 "stcycl")
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x7f
|
||||
:tag (vif-cmd-32 offset)
|
||||
:print #x1
|
||||
:string1 "offset"
|
||||
:string2 "offset"
|
||||
)
|
||||
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 base) :print #x1 :string1 "base" :string2 "base")
|
||||
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 itop) :print #x1 :string1 "itop" :string2 "addr")
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x7f
|
||||
:tag (vif-cmd-32 stmod)
|
||||
:print #x1
|
||||
:string1 "stmod"
|
||||
:string2 "mode"
|
||||
)
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x7f
|
||||
:tag (vif-cmd-32 mskpath3)
|
||||
:print #x1
|
||||
:string1 "mskpath3"
|
||||
:string2 "mask"
|
||||
)
|
||||
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mark) :print #x1 :string1 "mark" :string2 "mark")
|
||||
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 flushe) :string1 "flushe")
|
||||
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 flush) :string1 "flush")
|
||||
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 flusha) :string1 "flusha")
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x7f
|
||||
:tag (vif-cmd-32 mscal)
|
||||
:print #x1
|
||||
:string1 "mscal"
|
||||
:string2 "addr"
|
||||
)
|
||||
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mscnt) :string1 "mscnt")
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x7f
|
||||
:tag (vif-cmd-32 mscalf)
|
||||
:print #x1
|
||||
:string1 "mscalf"
|
||||
:string2 "addr"
|
||||
)
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x7f
|
||||
:tag (vif-cmd-32 stmask)
|
||||
:print #x3
|
||||
:string1 "stmask"
|
||||
:string2 "mask"
|
||||
)
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x7f
|
||||
:tag (vif-cmd-32 strow)
|
||||
:print #x4
|
||||
:string1 "strow"
|
||||
:string2 "row"
|
||||
)
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x7f
|
||||
:tag (vif-cmd-32 stcol)
|
||||
:print #x4
|
||||
:string1 "stcol"
|
||||
:string2 "col"
|
||||
)
|
||||
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 mpg) :print #x5 :string1 "mpg")
|
||||
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 direct) :print #x6 :string1 "direct")
|
||||
(new 'static 'vif-disasm-element :mask #x7f :tag (vif-cmd-32 directhl) :print #x6 :string1 "directhl")
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x6f
|
||||
:tag (vif-cmd-32 unpack-s-32)
|
||||
:val #x10
|
||||
:print #x7
|
||||
:string1 "unpack-s-32"
|
||||
)
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x6f
|
||||
:tag (vif-cmd-32 unpack-s-16)
|
||||
:val #x8
|
||||
:print #x7
|
||||
:string1 "unpack-s-16"
|
||||
)
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x6f
|
||||
:tag (vif-cmd-32 unpack-s-8)
|
||||
:val #x4
|
||||
:print #x7
|
||||
:string1 "unpack-s-8"
|
||||
)
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x6f
|
||||
:tag (vif-cmd-32 unpack-v2-32)
|
||||
:val #x8
|
||||
:print #x7
|
||||
:string1 "unpack-v2-32"
|
||||
)
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x6f
|
||||
:tag (vif-cmd-32 unpack-v2-16)
|
||||
:val #x4
|
||||
:print #x7
|
||||
:string1 "unpack-v2-16"
|
||||
)
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x6f
|
||||
:tag (vif-cmd-32 unpack-v2-8)
|
||||
:val #x2
|
||||
:print #x7
|
||||
:string1 "unpack-v2-8"
|
||||
)
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x6f
|
||||
:tag (vif-cmd-32 unpack-v3-32)
|
||||
:val #xc
|
||||
:print #x7
|
||||
:string1 "unpack-v3-32"
|
||||
)
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x6f
|
||||
:tag (vif-cmd-32 unpack-v3-16)
|
||||
:val #x6
|
||||
:print #x7
|
||||
:string1 "unpack-v3-16"
|
||||
)
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x6f
|
||||
:tag (vif-cmd-32 unpack-v3-8)
|
||||
:val #x3
|
||||
:print #x7
|
||||
:string1 "unpack-v3-8"
|
||||
)
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x6f
|
||||
:tag (vif-cmd-32 unpack-v4-32)
|
||||
:val #x10
|
||||
:print #x7
|
||||
:string1 "unpack-v4-32"
|
||||
)
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x6f
|
||||
:tag (vif-cmd-32 unpack-v4-16)
|
||||
:val #x8
|
||||
:print #x7
|
||||
:string1 "unpack-v4-16"
|
||||
)
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x6f
|
||||
:tag (vif-cmd-32 unpack-v4-8)
|
||||
:val #x4
|
||||
:print #x7
|
||||
:string1 "unpack-v4-8"
|
||||
)
|
||||
(new 'static 'vif-disasm-element
|
||||
:mask #x6f
|
||||
:tag (vif-cmd-32 unpack-v4-5)
|
||||
:val #x2
|
||||
:print #x7
|
||||
:string1 "unpack-v4-5"
|
||||
)
|
||||
(new 'static 'vif-disasm-element :print #x8)
|
||||
)
|
||||
)
|
||||
|
||||
(defun disasm-vif-details ((fmt-dest symbol) (vif-data (pointer uint8)) (unpack-cmd vif-cmd) (unpack-count int))
|
||||
"Disassemble the data stored in a vif unpack."
|
||||
(let ((s4-0 unpack-count))
|
||||
(cond
|
||||
((= unpack-cmd (vif-cmd unpack-v4-8))
|
||||
(let ((s3-0 (&-> vif-data 4)))
|
||||
(dotimes (s2-0 s4-0)
|
||||
(format
|
||||
fmt-dest
|
||||
" #x~X: #x~2X #x~2X #x~2X #x~2X~%"
|
||||
(+ (+ (* s2-0 4) 4) (the-as int vif-data))
|
||||
(-> s3-0 (* s2-0 4))
|
||||
(-> s3-0 (+ (* s2-0 4) 1))
|
||||
(-> s3-0 (+ (* s2-0 4) 2))
|
||||
(-> s3-0 (+ (* s2-0 4) 3))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= unpack-cmd (vif-cmd unpack-s-8))
|
||||
(let ((s3-1 (&-> vif-data 4)))
|
||||
(dotimes (s2-1 s4-0)
|
||||
(format fmt-dest " #x~X: #x~2x~%" (+ (+ s2-1 4) (the-as int vif-data)) unpack-count)
|
||||
(-> s3-1 (* 3 s2-1))
|
||||
(-> s3-1 (+ (* 3 s2-1) 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
((= unpack-cmd (vif-cmd unpack-v4-32))
|
||||
(let ((s3-2 (&-> vif-data 4)))
|
||||
(dotimes (s2-2 s4-0)
|
||||
(format
|
||||
fmt-dest
|
||||
" #x~X: #x~8x #x~8x #x~8x #x~8x~%"
|
||||
(+ (+ (* s2-2 16) 4) (the-as int vif-data))
|
||||
(-> (the-as (pointer uint32) (&+ s3-2 (* (* s2-2 4) 4))))
|
||||
(-> (the-as (pointer uint32) (&+ s3-2 (* (+ (* s2-2 4) 1) 4))))
|
||||
(-> (the-as (pointer uint32) (&+ s3-2 (* (+ (* s2-2 4) 2) 4))))
|
||||
(-> (the-as (pointer uint32) (&+ s3-2 (* (+ (* s2-2 4) 3) 4))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= unpack-cmd (vif-cmd unpack-v4-16))
|
||||
(let ((s3-3 (&-> vif-data 4)))
|
||||
(dotimes (s2-3 s4-0)
|
||||
(format
|
||||
fmt-dest
|
||||
" #x~X: #x~4x #x~4x #x~4x #x~4x~%"
|
||||
(+ (+ (* s2-3 8) 4) (the-as int vif-data))
|
||||
(-> (the-as (pointer uint16) (&+ s3-3 (* (* s2-3 4) 2))))
|
||||
(-> (the-as (pointer uint16) (&+ s3-3 (* (+ (* s2-3 4) 1) 2))))
|
||||
(-> (the-as (pointer uint16) (&+ s3-3 (* (+ (* s2-3 4) 2) 2))))
|
||||
(-> (the-as (pointer uint16) (&+ s3-3 (* (+ (* s2-3 4) 3) 2))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= unpack-cmd (vif-cmd unpack-v3-32))
|
||||
(let ((s3-4 (&-> vif-data 4)))
|
||||
(dotimes (s2-4 s4-0)
|
||||
(format
|
||||
fmt-dest
|
||||
" #x~X: #x~8x #x~8x #x~8x~%"
|
||||
(+ (+ (* 12 s2-4) 4) (the-as int vif-data))
|
||||
(-> (the-as (pointer uint32) (&+ s3-4 (* 12 s2-4))))
|
||||
(-> (the-as (pointer uint32) (&+ s3-4 (* (+ (* 3 s2-4) 1) 4))))
|
||||
(-> (the-as (pointer uint32) (&+ s3-4 (* (+ (* 3 s2-4) 2) 4))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= unpack-cmd (vif-cmd unpack-v3-16))
|
||||
(let ((s3-5 (&-> vif-data 4)))
|
||||
(dotimes (s2-5 s4-0)
|
||||
(format
|
||||
fmt-dest
|
||||
" #x~X: #x~4x #x~4x #x~4x~%"
|
||||
(+ (+ (* 6 s2-5) 4) (the-as int vif-data))
|
||||
(-> (the-as (pointer uint16) (&+ s3-5 (* 6 s2-5))))
|
||||
(-> (the-as (pointer uint16) (&+ s3-5 (* (+ (* 3 s2-5) 1) 2))))
|
||||
(-> (the-as (pointer uint16) (&+ s3-5 (* (+ (* 3 s2-5) 2) 2))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= unpack-cmd (vif-cmd unpack-v2-16))
|
||||
(let ((s3-6 (&-> vif-data 4)))
|
||||
(dotimes (s2-6 s4-0)
|
||||
(format
|
||||
fmt-dest
|
||||
" #x~X: #x~4x #x~4x~%"
|
||||
(+ (+ (* s2-6 4) 4) (the-as int vif-data))
|
||||
(-> (the-as (pointer uint16) (&+ s3-6 (* 6 s2-6))))
|
||||
(-> (the-as (pointer uint16) (&+ s3-6 (* (+ (* 3 s2-6) 1) 2))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(format
|
||||
fmt-dest
|
||||
" #x~X: Data format #b~b not yet supported, add it for yourself!~%"
|
||||
(&-> vif-data 4)
|
||||
unpack-cmd
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
(defun disasm-vif-tag ((tag (pointer vif-tag)) (count int) (format-dest symbol) (details? symbol))
|
||||
"Disassemble vif tag, and possibly the associated data."
|
||||
(let ((gp-0 0))
|
||||
(while (< gp-0 (* count 4))
|
||||
(let ((s0-0 4))
|
||||
(let ((s1-0 (-> tag 0)))
|
||||
(format format-dest " #x~X:" tag)
|
||||
(dotimes (v1-0 (-> *vif-disasm-table* length))
|
||||
(let ((sv-16 (-> s1-0 cmd)))
|
||||
(when (= (logand sv-16 (-> *vif-disasm-table* v1-0 mask)) (-> *vif-disasm-table* v1-0 tag))
|
||||
(let ((a0-12 (-> *vif-disasm-table* v1-0 print)))
|
||||
(cond
|
||||
((zero? a0-12)
|
||||
(format format-dest " (~s :irq ~D)~%" (-> *vif-disasm-table* v1-0 string1) (-> s1-0 irq))
|
||||
)
|
||||
((= a0-12 1)
|
||||
(format
|
||||
format-dest
|
||||
" (~s :irq ~D :~s #x~X)~%"
|
||||
(-> *vif-disasm-table* v1-0 string1)
|
||||
(-> s1-0 irq)
|
||||
(-> *vif-disasm-table* v1-0 string2)
|
||||
(-> s1-0 imm)
|
||||
)
|
||||
)
|
||||
((= a0-12 2)
|
||||
(let ((t1-1 (-> s1-0 imm)))
|
||||
(format
|
||||
format-dest
|
||||
" (~s :irq ~D :wl ~D :cl ~D)~%"
|
||||
(-> *vif-disasm-table* v1-0 string1)
|
||||
(-> s1-0 irq)
|
||||
(shr (shl t1-1 48) 56)
|
||||
(shr (shl t1-1 56) 56)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= a0-12 3)
|
||||
(set! s0-0 8)
|
||||
(format
|
||||
format-dest
|
||||
" (~s :irq ~D :~s #x~X)~%"
|
||||
(-> *vif-disasm-table* v1-0 string1)
|
||||
(-> s1-0 irq)
|
||||
(-> *vif-disasm-table* v1-0 string2)
|
||||
(-> tag 1)
|
||||
)
|
||||
)
|
||||
((= a0-12 4)
|
||||
(set! s0-0 20)
|
||||
(format
|
||||
format-dest
|
||||
" (~s :irq ~D :~s "
|
||||
(-> *vif-disasm-table* v1-0 string1)
|
||||
(-> s1-0 irq)
|
||||
(-> *vif-disasm-table* v1-0 string2)
|
||||
)
|
||||
(format format-dest "#x~X #x~X #x~X #x~X)~%" (-> tag 1) (-> tag 2) (-> tag 3) (-> tag 4))
|
||||
)
|
||||
((= a0-12 5)
|
||||
(format
|
||||
format-dest
|
||||
" (~s :irq ~D :instructions #x~D :addr #x~X)~%"
|
||||
(-> *vif-disasm-table* v1-0 string1)
|
||||
(-> s1-0 irq)
|
||||
(-> s1-0 num)
|
||||
(-> s1-0 imm)
|
||||
)
|
||||
)
|
||||
((= a0-12 6)
|
||||
(if (-> s1-0 imm)
|
||||
(set! s0-0 #x100000)
|
||||
(set! s0-0 (the-as int (* (-> s1-0 imm) 16)))
|
||||
)
|
||||
(format
|
||||
format-dest
|
||||
" (~s :irq ~D :qwc #x~D)~%"
|
||||
(-> *vif-disasm-table* v1-0 string1)
|
||||
(-> s1-0 irq)
|
||||
(-> s1-0 imm)
|
||||
)
|
||||
(let ((sv-32 (&-> tag 1))
|
||||
(sv-48 0)
|
||||
)
|
||||
(while (< sv-48 (the-as int (-> s1-0 imm)))
|
||||
(format
|
||||
format-dest
|
||||
" #x~X: #x~8x #x~8x #x~8x #x~8x~%"
|
||||
(+ (+ (* sv-48 16) 4) (the-as int tag))
|
||||
(-> sv-32 (* sv-48 4))
|
||||
(-> sv-32 (+ (* sv-48 4) 1))
|
||||
(-> sv-32 (+ (* sv-48 4) 2))
|
||||
(-> sv-32 (+ (* sv-48 4) 3))
|
||||
)
|
||||
(+! sv-48 1)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
((= a0-12 7)
|
||||
(set! s0-0 (the-as int (+ (logand -4 (+ (* (-> *vif-disasm-table* v1-0 val) (-> s1-0 num)) 3)) 4)))
|
||||
(let ((sv-64 (-> s1-0 imm)))
|
||||
(format
|
||||
format-dest
|
||||
" (~s :irq ~D :num ~D :addr #x~X "
|
||||
(-> *vif-disasm-table* v1-0 string1)
|
||||
(-> s1-0 irq)
|
||||
(-> s1-0 num)
|
||||
(shr (shl sv-64 54) 54)
|
||||
)
|
||||
(format
|
||||
format-dest
|
||||
":msk ~D :flg ~D :usn ~D [skip ~d])~%"
|
||||
(-> s1-0 msk)
|
||||
(shr (shl sv-64 48) 63)
|
||||
(shr (shl sv-64 49) 63)
|
||||
(the-as uint s0-0)
|
||||
)
|
||||
)
|
||||
(if details?
|
||||
(disasm-vif-details
|
||||
format-dest
|
||||
(the-as (pointer uint8) tag)
|
||||
(logand sv-16 (vif-cmd cmd-mask))
|
||||
(the-as int (-> s1-0 num))
|
||||
)
|
||||
)
|
||||
)
|
||||
((= a0-12 8)
|
||||
(format format-dest " (*unknown* vif-tag #x~X)~%" (-> s1-0 cmd))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! v1-0 (-> *vif-disasm-table* length))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! gp-0 s0-0)
|
||||
(&+! tag s0-0)
|
||||
)
|
||||
)
|
||||
(- gp-0 (* count 4))
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defun disasm-dma-tag ((tag dma-tag) (format-dest symbol))
|
||||
"Disassemble just the 64-byte dma tag"
|
||||
(format format-dest "(dma-tag ")
|
||||
(let ((t9-1 format)
|
||||
(a0-2 format-dest)
|
||||
(a1-2 "~s")
|
||||
(v1-1 (-> tag id))
|
||||
)
|
||||
(t9-1 a0-2 a1-2 (cond
|
||||
((= v1-1 (dma-tag-id refe))
|
||||
"refe"
|
||||
)
|
||||
((= v1-1 (dma-tag-id refs))
|
||||
"refs"
|
||||
)
|
||||
((= v1-1 (dma-tag-id ret))
|
||||
"ret"
|
||||
)
|
||||
((= v1-1 (dma-tag-id cnt))
|
||||
"cnt"
|
||||
)
|
||||
((= v1-1 (dma-tag-id next))
|
||||
"next"
|
||||
)
|
||||
((= v1-1 (dma-tag-id call))
|
||||
"call"
|
||||
)
|
||||
((= v1-1 (dma-tag-id ref))
|
||||
"ref"
|
||||
)
|
||||
((= v1-1 (dma-tag-id end))
|
||||
"end"
|
||||
)
|
||||
(else
|
||||
"*unknown*"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (> (-> tag addr) 0)
|
||||
(format format-dest " :addr #x~8x" (-> tag addr))
|
||||
)
|
||||
(if (> (-> tag qwc) 0)
|
||||
(format format-dest " :qwc ~d" (-> tag qwc))
|
||||
)
|
||||
(if (> (-> tag spr) 0)
|
||||
(format format-dest " :spr ~d" (-> tag spr))
|
||||
)
|
||||
(if (> (-> tag irq) 0)
|
||||
(format format-dest " :irq ~d" (-> tag irq))
|
||||
)
|
||||
(if (> (-> tag pce) 0)
|
||||
(format format-dest " :pce ~d" (-> tag pce))
|
||||
)
|
||||
(format format-dest ")~%")
|
||||
(none)
|
||||
)
|
||||
|
||||
(define *dma-disasm* #t)
|
||||
|
||||
;; WARN: Check prologue - tricky store of a0
|
||||
(defun disasm-dma-list ((data dma-packet) (mode symbol) (verbose symbol) (stream symbol) (expected-size int))
|
||||
"Print out an entire DMA list.
|
||||
If mode is #t, print vif tags too. If mode is 'details, also print data unpacked by vif-tags.
|
||||
If verbose is #t, print out the addresses of each tag, and total size statistics.
|
||||
If expected size is negative, it is ignored. Otherwise, only disassemble this much dma data."
|
||||
(let ((sv-32 data)
|
||||
(s2-0 mode)
|
||||
(s3-0 verbose)
|
||||
(gp-0 stream)
|
||||
(s1-0 expected-size)
|
||||
)
|
||||
(if s3-0
|
||||
(format gp-0 "~%--- ~X -----------------------------~%" sv-32)
|
||||
)
|
||||
(let ((s0-0 #f))
|
||||
(let ((s4-0 0)
|
||||
(s5-0 0)
|
||||
)
|
||||
(let ((sv-16 (the-as uint 0))
|
||||
(sv-48 0)
|
||||
(sv-64 (the-as dma-packet 0))
|
||||
(sv-80 (the-as dma-packet 1))
|
||||
(sv-96 -1)
|
||||
(sv-112 (new 'static 'dma-tag))
|
||||
)
|
||||
(while (not s0-0)
|
||||
(let ((t9-1 valid?)
|
||||
(a0-2 sv-32)
|
||||
(a1-2 #f)
|
||||
(a2-2 "dma-list tag pointer")
|
||||
)
|
||||
(cond
|
||||
((not (t9-1 a0-2 (the-as type a1-2) a2-2 #t gp-0))
|
||||
(format gp-0 "ERROR: dma-list tag pointer invalid~%")
|
||||
(set! s0-0 'error)
|
||||
)
|
||||
(else
|
||||
(set! sv-112 (-> (the-as dma-packet sv-32) dma))
|
||||
(when (not (or (zero? s5-0) (let ((t9-3 valid?)
|
||||
(a0-4 sv-16)
|
||||
(a1-4 #f)
|
||||
)
|
||||
(set! a2-2 "dma-list data pointer")
|
||||
(t9-3 a0-4 (the-as type a1-4) a2-2 #t gp-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(format gp-0 "ERROR: dma-list data pointer invalid~%")
|
||||
(set! s0-0 'error)
|
||||
)
|
||||
(when (logtest? (the-as dma-tag #x3ff0000) sv-112)
|
||||
(format gp-0 "ERROR: dma tag has data in reserved bits ~X~%" (the-as none a2-2))
|
||||
(set! s0-0 'error)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (or s3-0 (= s0-0 'error))
|
||||
(format gp-0 "#x~8x: " sv-32)
|
||||
(cond
|
||||
((zero? sv-96)
|
||||
(format gp-0 " ")
|
||||
)
|
||||
((= sv-96 1)
|
||||
(format gp-0 " ")
|
||||
)
|
||||
)
|
||||
(disasm-dma-tag sv-112 gp-0)
|
||||
)
|
||||
(cond
|
||||
(s0-0
|
||||
)
|
||||
((or (= (-> sv-112 id) (dma-tag-id ref)) (= (-> sv-112 id) (dma-tag-id refs)) (zero? (-> sv-112 id)))
|
||||
(set! sv-16 (-> sv-112 addr))
|
||||
(set! sv-48 (the-as int (-> sv-112 qwc)))
|
||||
(when s2-0
|
||||
(let ((v0-10
|
||||
(disasm-vif-tag (the-as (pointer vif-tag) (&-> (the-as (pointer uint64) sv-32) 1)) 2 gp-0 (= s2-0 'details))
|
||||
)
|
||||
)
|
||||
(disasm-vif-tag
|
||||
(the-as (pointer vif-tag) (+ (the-as int sv-16) v0-10))
|
||||
(the-as int (- (* (the-as uint sv-48) 4) (the-as uint (/ v0-10 4))))
|
||||
gp-0
|
||||
(= s2-0 'details)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! sv-32 (the-as dma-packet (&-> (the-as (pointer uint64) sv-32) 2)))
|
||||
(if (= (-> sv-112 id) (dma-tag-id refe))
|
||||
(set! s0-0 #t)
|
||||
)
|
||||
)
|
||||
((= (-> sv-112 id) (dma-tag-id cnt))
|
||||
(set! sv-16 (the-as uint (&-> (the-as (pointer uint64) sv-32) 2)))
|
||||
(set! sv-48 (the-as int (-> sv-112 qwc)))
|
||||
(if s2-0
|
||||
(disasm-vif-tag
|
||||
(the-as (pointer vif-tag) (&-> (the-as (pointer uint64) sv-32) 1))
|
||||
(the-as int (+ (* (the-as uint sv-48) 4) 2))
|
||||
gp-0
|
||||
(= s2-0 'details)
|
||||
)
|
||||
)
|
||||
(set! sv-32 (the-as dma-packet (+ (the-as uint sv-32) (* (+ (the-as uint sv-48) 1) 16))))
|
||||
sv-32
|
||||
)
|
||||
((= (-> sv-112 id) (dma-tag-id next))
|
||||
(set! sv-16 (the-as uint (&-> (the-as (pointer uint64) sv-32) 2)))
|
||||
(set! sv-48 (the-as int (-> sv-112 qwc)))
|
||||
(if s2-0
|
||||
(disasm-vif-tag
|
||||
(the-as (pointer vif-tag) (&-> (the-as (pointer uint64) sv-32) 1))
|
||||
(the-as int (+ (* (the-as uint sv-48) 4) 2))
|
||||
gp-0
|
||||
(= s2-0 'details)
|
||||
)
|
||||
)
|
||||
(when (= sv-32 (-> sv-112 addr))
|
||||
(format gp-0 "ERROR: next tag creates infinite loop.~%")
|
||||
(set! s0-0 'error)
|
||||
)
|
||||
(set! sv-32 (the-as dma-packet (-> sv-112 addr)))
|
||||
sv-32
|
||||
)
|
||||
((= (-> sv-112 id) (dma-tag-id call))
|
||||
(set! sv-16 (the-as uint (&-> (the-as (pointer uint64) sv-32) 2)))
|
||||
(set! sv-48 (the-as int (-> sv-112 qwc)))
|
||||
(if s2-0
|
||||
(disasm-vif-tag
|
||||
(the-as (pointer vif-tag) (&-> (the-as (pointer uint64) sv-32) 1))
|
||||
(the-as int (+ (* (the-as uint sv-48) 4) 2))
|
||||
gp-0
|
||||
(= s2-0 'details)
|
||||
)
|
||||
)
|
||||
(set! sv-32 (the-as dma-packet (-> sv-112 addr)))
|
||||
(+! sv-96 1)
|
||||
(cond
|
||||
((zero? sv-96)
|
||||
(set! sv-64 (the-as dma-packet (&+ (the-as (pointer uint64) sv-16) (the-as uint sv-48))))
|
||||
sv-64
|
||||
)
|
||||
(else
|
||||
(set! sv-80 (the-as dma-packet (&+ (the-as (pointer uint64) sv-16) (the-as uint sv-48))))
|
||||
sv-80
|
||||
)
|
||||
)
|
||||
)
|
||||
((= (-> sv-112 id) (dma-tag-id ret))
|
||||
(set! sv-16 (the-as uint (&-> (the-as (pointer uint64) sv-32) 2)))
|
||||
(set! sv-48 (the-as int (-> sv-112 qwc)))
|
||||
(if s2-0
|
||||
(disasm-vif-tag
|
||||
(the-as (pointer vif-tag) (&-> (the-as (pointer uint64) sv-32) 1))
|
||||
(the-as int (+ (* (the-as uint sv-48) 4) 2))
|
||||
gp-0
|
||||
(= s2-0 'details)
|
||||
)
|
||||
)
|
||||
(let ((v1-123 sv-96))
|
||||
(cond
|
||||
((zero? v1-123)
|
||||
(set! sv-32 sv-64)
|
||||
sv-32
|
||||
)
|
||||
((= v1-123 1)
|
||||
(set! sv-32 sv-80)
|
||||
sv-32
|
||||
)
|
||||
(else
|
||||
(set! s0-0 #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! sv-96 -1)
|
||||
sv-96
|
||||
)
|
||||
((= (-> sv-112 id) (dma-tag-id end))
|
||||
(set! sv-16 (the-as uint (&-> (the-as (pointer uint64) sv-32) 2)))
|
||||
(set! sv-48 (the-as int (-> sv-112 qwc)))
|
||||
(set! s0-0 #t)
|
||||
(if s2-0
|
||||
(disasm-vif-tag
|
||||
(the-as (pointer vif-tag) (&-> (the-as (pointer uint64) sv-32) 1))
|
||||
(the-as int (+ (* (the-as uint sv-48) 4) 2))
|
||||
gp-0
|
||||
(= s2-0 'details)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(format gp-0 "ERROR: Unknown DMA TAG command.~%")
|
||||
(set! s0-0 'error)
|
||||
)
|
||||
)
|
||||
(+! s4-0 sv-48)
|
||||
(+! s5-0 1)
|
||||
(if (and (>= s1-0 0) (>= s5-0 s1-0))
|
||||
(set! s0-0 #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (or s3-0 (= s0-0 'error))
|
||||
(format gp-0 "NOTICE: Total tags: ~d~%" s5-0)
|
||||
(format gp-0 "NOTICE: Total QWC: ~d~%" s4-0)
|
||||
(format gp-0 "--------------------------------~%~%")
|
||||
)
|
||||
)
|
||||
(!= s0-0 'error)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -5,5 +5,251 @@
|
||||
;; name in dgo: dma-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++vif-cmd
|
||||
;; all these have mask (only applies to unpacks) and interrupt not set.
|
||||
(defenum vif-cmd
|
||||
:bitfield #f
|
||||
:type uint8
|
||||
(nop 0) ;; no-op, can still have irq set.
|
||||
(stcycl 1) ;; set write recycle register
|
||||
(offset 2) ;; set offset register
|
||||
(base 3) ;; set base register
|
||||
(itop 4) ;; set data pointer register (itops)
|
||||
(stmod 5) ;; set mode register
|
||||
(mskpath3 6) ;; set path 3 mask
|
||||
(mark 7) ;; set mark register
|
||||
(pc-port 8) ;; special tag for PC Port data.
|
||||
(flushe 16) ;; wait for end of microprogram
|
||||
(flush 17) ;; wait for end of microprogram and transfer (path1/path2)
|
||||
(flusha 19) ;; wait for end of microprogram and transfer (path1/path2/path3)
|
||||
(mscal 20) ;; activate microprogram (call)
|
||||
(mscalf 21) ;; flushe and activate (call)
|
||||
(mscnt 23) ;; activate microprogram (continue)
|
||||
(stmask 32) ;; set MASK register.
|
||||
(strow 48) ;; set filling data
|
||||
(stcol 49) ;; set filling data
|
||||
(mpg 74) ;; transfer microprogram
|
||||
(direct 80) ;; straight to GIF.
|
||||
(directhl 81)
|
||||
(unpack-s-32 96)
|
||||
(unpack-s-16 97)
|
||||
(unpack-s-8 98)
|
||||
;; 99 is invllid
|
||||
(unpack-v2-32 100)
|
||||
(unpack-v2-16 101)
|
||||
(unpack-v2-8 102)
|
||||
;; 103 is invalid
|
||||
(unpack-v3-32 104)
|
||||
(unpack-v3-16 105)
|
||||
(unpack-v3-8 106)
|
||||
;; 107 is invalid
|
||||
(unpack-v4-32 108)
|
||||
(unpack-v4-16 109)
|
||||
(unpack-v4-8 110)
|
||||
(unpack-v4-5 111)
|
||||
(cmd-mask 239) ;; not sure what this is.
|
||||
)
|
||||
;; ---vif-cmd
|
||||
|
||||
|
||||
;; +++vif-cmd-32
|
||||
;; this makes a copy of the above type, but uses a uint32.
|
||||
(defenum vif-cmd-32
|
||||
:bitfield #f
|
||||
:type uint32
|
||||
:copy-entries vif-cmd
|
||||
)
|
||||
;; ---vif-cmd-32
|
||||
|
||||
|
||||
;; +++dma-tag-id
|
||||
(defenum dma-tag-id
|
||||
:bitfield #f
|
||||
:type uint8
|
||||
(refe 0) ;; addr=ADDR, ends after this transfer
|
||||
(cnt 1) ;; addr=after tag, next-tag=after data
|
||||
(next 2) ;; addr=after tag, next-tag=ADDR
|
||||
(ref 3) ;; addr=ADDR, next-tag=after tag
|
||||
(refs 4) ;; ref, but stall controled
|
||||
(call 5) ;;
|
||||
(ret 6) ;;
|
||||
(end 7) ;; next, but ends.
|
||||
)
|
||||
;; ---dma-tag-id
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype dma-chcr (uint32)
|
||||
"Memory mapped DMA channel control register. Typically used to start and check on DMA transfer."
|
||||
((dir uint8 :offset 0 :size 1)
|
||||
(mod uint8 :offset 2 :size 2)
|
||||
(asp uint8 :offset 4 :size 2)
|
||||
(tte uint8 :offset 6 :size 1)
|
||||
(tie uint8 :offset 7 :size 1)
|
||||
(str uint8 :offset 8 :size 1)
|
||||
(tag uint16 :offset 16 :size 16)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype dma-bank (structure)
|
||||
"Bank of memory mapped DMA registers for a single channel. Used to control DMA."
|
||||
((chcr dma-chcr :offset 0)
|
||||
(madr uint32 :offset 16)
|
||||
(qwc uint32 :offset 32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype dma-bank-source (dma-bank)
|
||||
"DMA channel registers for a DMA channel supporting source-chain."
|
||||
((tadr uint32 :offset 48)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype dma-bank-vif (dma-bank-source)
|
||||
"DMA channel registers for a DMA channel with call/ret stack."
|
||||
((as0 uint32 :offset 64)
|
||||
(as1 uint32 :offset 80)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype dma-bank-spr (dma-bank-source)
|
||||
"DMA channel registers for a DMA channel supporting scratchpad transfer."
|
||||
((sadr uint32 :offset 128)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype dma-ctrl (uint32)
|
||||
"Main DMA control register, shared for all channels."
|
||||
((dmae uint8 :offset 0 :size 1)
|
||||
(rele uint8 :offset 1 :size 1)
|
||||
(mfd uint8 :offset 2 :size 2)
|
||||
(sts uint8 :offset 4 :size 2)
|
||||
(std uint8 :offset 6 :size 2)
|
||||
(rcyc uint8 :offset 8 :size 3)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype dma-enable (uint32)
|
||||
((cpnd uint8 :offset 16 :size 1)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype dma-sqwc (uint32)
|
||||
((sqwc uint8 :offset 0 :size 8)
|
||||
(tqwc uint8 :offset 16 :size 8)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype dma-bank-control (structure)
|
||||
"Memory mapping for shared DMA registers."
|
||||
((ctrl dma-ctrl :offset 0)
|
||||
(stat uint32 :offset 16)
|
||||
(pcr uint32 :offset 32)
|
||||
(sqwc dma-sqwc :offset 48)
|
||||
(rbsr uint32 :offset 64)
|
||||
(rbor uint32 :offset 80)
|
||||
(stadr uint32 :offset 96)
|
||||
(enabler uint32 :offset 5408)
|
||||
(enablew uint32 :offset 5520)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype vu-code-block (basic)
|
||||
"Unused type for some VU code. vu-function is used instead."
|
||||
((name basic)
|
||||
(code uint32)
|
||||
(size int32)
|
||||
(dest-address uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype vu-stat (uint64)
|
||||
()
|
||||
)
|
||||
|
||||
(deftype dma-tag (uint64)
|
||||
"The 64-bit tag used by the DMA system."
|
||||
((qwc uint16 :offset 0 :size 16)
|
||||
(pce uint8 :offset 26 :size 2)
|
||||
(id dma-tag-id :offset 28 :size 3)
|
||||
(irq uint8 :offset 31 :size 1)
|
||||
(addr uint32 :offset 32 :size 31)
|
||||
(spr uint8 :offset 63 :size 1)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype dma-bucket (structure)
|
||||
"A linked list of DMA data, typically all in the same category. Used to organize the full DMA chain."
|
||||
((tag dma-tag)
|
||||
(last (pointer dma-tag))
|
||||
(dummy uint32)
|
||||
(next uint32 :offset 4)
|
||||
(clear uint64 :overlay-at last)
|
||||
(vif0 uint32 :overlay-at last)
|
||||
(vif1 uint32 :overlay-at dummy)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype vif-mask (uint32)
|
||||
((m0 uint8 :offset 0 :size 2)
|
||||
(m1 uint8 :offset 2 :size 2)
|
||||
(m2 uint8 :offset 4 :size 2)
|
||||
(m3 uint8 :offset 6 :size 2)
|
||||
(m4 uint8 :offset 8 :size 2)
|
||||
(m5 uint8 :offset 10 :size 2)
|
||||
(m6 uint8 :offset 12 :size 2)
|
||||
(m7 uint8 :offset 14 :size 2)
|
||||
(m8 uint8 :offset 16 :size 2)
|
||||
(m9 uint8 :offset 18 :size 2)
|
||||
(m10 uint8 :offset 20 :size 2)
|
||||
(m11 uint8 :offset 22 :size 2)
|
||||
(m12 uint8 :offset 24 :size 2)
|
||||
(m13 uint8 :offset 26 :size 2)
|
||||
(m14 uint8 :offset 28 :size 2)
|
||||
(m15 uint8 :offset 30 :size 2)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype vif-stcycl-imm (uint16)
|
||||
"The imm field of a VIF code using STCYCL, which adjusts the pattern for storing data."
|
||||
((cl uint8 :offset 0 :size 8)
|
||||
(wl uint8 :offset 8 :size 8)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype vif-unpack-imm (uint16)
|
||||
"The imm field of a VIF code using UNPACK, which transfers data to VU memory."
|
||||
((addr uint16 :offset 0 :size 10)
|
||||
(usn uint8 :offset 14 :size 1)
|
||||
(flg uint8 :offset 15 :size 1)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype vif-tag (uint32)
|
||||
"A tag consumed by the VIF, which accepts DMA data."
|
||||
((imm uint16 :offset 0 :size 16)
|
||||
(num uint8 :offset 16 :size 8)
|
||||
(cmd vif-cmd :offset 24 :size 7)
|
||||
(irq uint8 :offset 31 :size 1)
|
||||
(msk uint8 :offset 28 :size 1)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
;; ERROR: function was not converted to expressions. Cannot decompile.
|
||||
|
||||
@@ -7,3 +7,156 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defun dma-sync-hang ((bank dma-bank))
|
||||
"Hang here until the dma transfer is completed.
|
||||
This is worse than the dma-sync-fast because it ends
|
||||
up spamming the DMA bank register more often, and reduces
|
||||
the speed of the DMA transfer.
|
||||
This function is unused."
|
||||
(crash!)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun dma-sync-crash ((arg0 dma-bank))
|
||||
"Wait for DMA to finish for a while, then crash if we can't.
|
||||
This function is unused."
|
||||
(crash!)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun dma-send ((arg0 dma-bank) (madr uint) (qwc uint))
|
||||
"Send DMA given an address and a quadword count.
|
||||
The madr can be in main memory or scratchpad.
|
||||
This is appropriate for VIF0/GIF transfers.
|
||||
It can be used for VIF1, but will do VIF -> madr, which is probably
|
||||
not what you want."
|
||||
(crash!)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun dma-send-chain ((arg0 dma-bank-source) (tadr uint))
|
||||
"Send DMA! tadr should be a tag address, possibly in spad ram.
|
||||
This is useful for sending to VIF.
|
||||
Tag transfer is enabled, and DIR is set so a VIF1 transfer
|
||||
goes from tadr -> VIF."
|
||||
(crash!)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun dma-send-chain-no-tte ((arg0 dma-bank-source) (arg1 uint))
|
||||
"Send DMA chain! TTE bit is not set, don't transfer tags.
|
||||
This is never used."
|
||||
(crash!)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun dma-send-chain-no-flush ((arg0 dma-bank-source) (arg1 uint))
|
||||
"Send DMA chain! But don't flush the cache, so be careful here. TTE enable."
|
||||
(crash!)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun dma-send-to-spr ((sadr uint) (madr uint) (qwc uint) (sync symbol))
|
||||
"Transfer data to spr"
|
||||
(crash!)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun dma-send-to-spr-no-flush ((sadr uint) (madr uint) (qwc uint) (sync symbol))
|
||||
"Transfer to spr. Doesn't flush the cache first, so be careful."
|
||||
(crash!)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun dma-send-from-spr ((madr uint) (sadr uint) (qwc uint) (sync symbol))
|
||||
"Transfer from spr."
|
||||
(crash!)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun dma-send-from-spr-no-flush ((madr uint) (sadr uint) (qwc uint) (sync symbol))
|
||||
"Transfer from spr, don't flush the cache."
|
||||
(crash!)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun dma-initialize ()
|
||||
"Due to a bug in the PS2 hardware, you must always disable the DMAtag mismatch
|
||||
error. This is done here."
|
||||
|
||||
(#when PC_PORT
|
||||
(return 0)
|
||||
)
|
||||
|
||||
(set! (-> (the-as vif-bank #x10003800) err me0) 1)
|
||||
(set! (-> (the-as vif-bank #x10003c00) err me0) 1)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun clear-vu0-mem ()
|
||||
"Set the vu0 data memory to 0xabadbeef. This uses the slow EE mapping of VU memory.
|
||||
Will crash on PC Port."
|
||||
(crash!)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun clear-vu1-mem ()
|
||||
"Set the vu1 data memory to 0xabadbeef. This uses the slow EE mapping of VU memory.
|
||||
Will crash on PC Port."
|
||||
(crash!)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun dump-vu1-mem ()
|
||||
"Print VU1 memory to runtime stdout.
|
||||
Will crash on PC Port."
|
||||
(crash!)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun dump-vu1-range ((start uint) (total-count uint))
|
||||
"Print part of VU1 memory to runtime stdout.
|
||||
Will crash on PC Port."
|
||||
(crash!)
|
||||
#f
|
||||
)
|
||||
|
||||
(defun reset-vif1-path ()
|
||||
"When things go wrong, totally reset vif1."
|
||||
(#unless PC_PORT
|
||||
;; changed for jak 3! now prints to 0.
|
||||
(format 0 "~`dma-bank-vif`I~`vif-bank`I" #x10009000 #x10003c00)
|
||||
)
|
||||
(reset-path)
|
||||
(set-graphics-mode)
|
||||
(format 0 "gkernel: vif1 path reset!~%")
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun ultimate-memcpy ((dst pointer) (src pointer) (size-bytes uint))
|
||||
"The Fastest Memory Copy, for larger transfers.
|
||||
Memory is copied in ascending order, in 4 kB blocks.
|
||||
The size should be a multiple of 16 bytes."
|
||||
;; on PC Port, just call C mem-move, it's the fastest.
|
||||
(__mem-move dst src size-bytes)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun symlink2 ()
|
||||
"symlink2 is a handwritten assembly version of the v2 linking routine.
|
||||
it is not ported because the OpenGOAL linker has its own implementation already."
|
||||
(crash!)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun symlink3 ()
|
||||
"symlink3 is a handwritten assembly version of the v3 linking routine.
|
||||
OpenGOAL uses a different format for v3, customized for x86-64, so this is not
|
||||
needed. The C++ implementation is plenty fast enough"
|
||||
(crash!)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; configuration required to work around hardware bug on the PS2.
|
||||
;; doesn't do anything important
|
||||
(dma-initialize)
|
||||
@@ -7,3 +7,35 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype draw-node (drawable)
|
||||
"Node in a bounding volume heirarchy. This is a base class, and there are no children.
|
||||
The child is a pointer to the start of inline array of drawables (note: not a drawable-inline-array, literally a bunch of plain drawables)
|
||||
The size of this array is child-count. The type is either more draw-nodes, or, some other drawable like tfragment, depending on the flags.
|
||||
Different renderers have different restrictions on the tree structure, like max child count, or if all children have the same depth.
|
||||
Generally, tfrag/collide use a very rigid equal depth, max 8 children rule, but with shrub, anything goes.
|
||||
This is a very awkward data structure to traverse, but it is designed for fast view frustum culling.
|
||||
Note that there can be multiple ways to reach drawables in here in some cases - for example you can follow
|
||||
this tree, or check one of the depth arrays found in tfrag.
|
||||
"
|
||||
((child-count uint8 :offset 6)
|
||||
(flags uint8 :offset 7)
|
||||
(child drawable :offset 8)
|
||||
(distance float :offset 12)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype drawable-inline-array-node (drawable-inline-array)
|
||||
"Top level container for a BVH made of draw-nodes."
|
||||
((data draw-node 1 :inline)
|
||||
(pad uint32)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype draw-node-dma (structure)
|
||||
"DMA buffer layout for draw node culling routine, which copies draw-nodes directly to scratchpad in bulk.
|
||||
This would not work with the memory layout of shrub."
|
||||
((banka draw-node 32 :inline)
|
||||
(bankb draw-node 32 :inline)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,30 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype drawable-actor (drawable)
|
||||
"Wrapper around an entity-actor to put it in the drawable system.
|
||||
Note that this is never used to actually draw actors - it is just used as a list of all entity-actors
|
||||
for the entity/birth system."
|
||||
((actor entity-actor :offset 8)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype drawable-tree-actor (drawable-tree)
|
||||
"Adapater for putting the actors in the tree-array."
|
||||
()
|
||||
)
|
||||
|
||||
(deftype drawable-inline-array-actor (drawable-inline-array)
|
||||
"Array of drawable-actors."
|
||||
((data drawable-actor 1 :inline)
|
||||
(pad uint8 4)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod draw ((this drawable-tree-actor))
|
||||
"Draw the drawable, and typically its children.
|
||||
This usually means adding stuff to a list to be drawn later, rather than expensive drawing here."
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,13 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype drawable-group (drawable)
|
||||
"Base class for an array of references to other drawables.
|
||||
These are typically used for very high-level organization of drawable."
|
||||
((length int16 :offset 6)
|
||||
(data drawable :dynamic)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type int) _type_)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -5,5 +5,43 @@
|
||||
;; name in dgo: drawable-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
(declare-type region-prim-list structure)
|
||||
(declare-type region-prim-area structure)
|
||||
(declare-type draw-control structure)
|
||||
|
||||
(define-extern sphere-cull "Is this sphere visible? Uses cached camera matrix registers, so use with care." (function vector symbol))
|
||||
(define-extern sphere-in-view-frustum? (function sphere symbol))
|
||||
(define-extern line-in-view-frustum? (function vector vector symbol))
|
||||
(define-extern vis-cull (function int symbol))
|
||||
(define-extern calc-vu1-lights (function vu-lights draw-control symbol none))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype drawable (basic)
|
||||
"Base class for `drawable` scene graph system.
|
||||
This base class is really abused in many ways, and the meaning of the various methods differ depending
|
||||
on the exact type. Not even the ID and bsphere here are always populated.
|
||||
This is used for very high level organization of different rendering data types, and also very low-level
|
||||
culling/rendering optimizations. It supports both array-of-references and inline-array containers with precise
|
||||
control over memory layout for use with DMA."
|
||||
((id int16)
|
||||
(bsphere vector :inline)
|
||||
)
|
||||
(:methods
|
||||
(login (_type_) _type_)
|
||||
(draw (_type_) none)
|
||||
(drawable-method-11 (_type_) none)
|
||||
(drawable-method-12 (_type_) none)
|
||||
(collect-stats (_type_) none)
|
||||
(debug-draw (_type_) none)
|
||||
(unpack-vis (_type_ (pointer int8) (pointer int8)) (pointer int8))
|
||||
(collect-regions (_type_ sphere int region-prim-list) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype drawable-error (drawable)
|
||||
"A drawable which just represents an error. When drawn, it simply displays a sphere with an error message."
|
||||
((name string)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,7 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype drawable-inline-array (drawable)
|
||||
((length int16 :offset 6)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,16 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype drawable-tree (drawable-group)
|
||||
"A drawable tree is a container of drawables of a specific rendering type.
|
||||
Instead of having a single large tree of mixed types, there will be a tree of tfrags, a tree of ties, etc.
|
||||
The top-level tfrag tree will have a type that's a child of drawable-tree.
|
||||
Generally, the object passed to a large renderer is a drawable-tree."
|
||||
()
|
||||
)
|
||||
|
||||
(deftype drawable-tree-array (drawable-group)
|
||||
"Collection of drawable trees. This might have a tfrag tree, tie tree, etc."
|
||||
((trees drawable-tree :dynamic :offset 32)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -5,5 +5,683 @@
|
||||
;; name in dgo: connect
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
#|@file
|
||||
This extremely confusing "connection system" allows the connection between
|
||||
"engines" and "processes". Basically, a process can "register" itself with any number of "engines".
|
||||
The "engines" can then iterate through all the connected processes. If a process is destroyed, it will
|
||||
be removed from all engines. It is okay to connect a process to multiple engines, or even to the same engine
|
||||
multiple times.
|
||||
|
||||
Some example uses:
|
||||
- a "foreground-engine" has connections to all foreground objects that need to be drawn on each frame.
|
||||
- when a process wants to change a game setting, it opens a connection to the settings engine to request a change.
|
||||
when the process is killed (or it stops requesting the change), the setting change is reverted.
|
||||
|
||||
A "connection" is really just a function that gets called when the engine runs, or a set of parameters that the engine can iterate through.
|
||||
|#
|
||||
|
||||
(declare-type engine basic)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype connectable (structure)
|
||||
((next0 connectable)
|
||||
(prev0 connectable)
|
||||
(next1 connectable)
|
||||
(prev1 connectable)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype connection (connectable)
|
||||
"This is the actual data for the connection.
|
||||
It may be used in multiple ways, but the most common is to use `param0` as a function.
|
||||
It receives `param1`, `param2`, `param3`, and the engine as the arguments.
|
||||
In some cases, the return value is checked for `'dead`."
|
||||
((param0 basic)
|
||||
(param1 basic)
|
||||
(param2 int32)
|
||||
(param3 int32)
|
||||
(quad uint128 2 :overlay-at next0)
|
||||
)
|
||||
(:methods
|
||||
(get-engine (connection) engine)
|
||||
(get-process (connection) process)
|
||||
(belongs-to-engine? (connection engine) symbol)
|
||||
(belongs-to-process? (connection process) symbol)
|
||||
(move-to-dead (connection) connection)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype engine (basic)
|
||||
"An engine is a collection of connections.
|
||||
You can iterate over the connections, or run them.
|
||||
The engine is dynamically sized based on how many connections it can store.
|
||||
|
||||
New for Jak 2: You can use a child class of [[connection]]."
|
||||
((name symbol)
|
||||
(engine-time time-frame :offset 16)
|
||||
(allocated-length int16 :offset 10)
|
||||
(length int16 :offset 8)
|
||||
(element-type type :offset 12)
|
||||
(alive-list connectable :inline)
|
||||
(alive-list-end connectable :inline)
|
||||
(dead-list connectable :inline)
|
||||
(dead-list-end connectable :inline)
|
||||
(data connection :inline :dynamic)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type symbol int type) _type_)
|
||||
(inspect-all-connections (engine) engine)
|
||||
(apply-to-connections (engine (function connectable none)) int)
|
||||
(apply-to-connections-reverse (engine (function connectable none)) int)
|
||||
(execute-connections (engine object) int)
|
||||
(execute-connections-and-move-to-dead (engine object) int)
|
||||
(execute-connections-if-needed (engine object) int)
|
||||
(add-connection (engine process object object object object) connection)
|
||||
(remove-from-process (engine process) int)
|
||||
(remove-matching (engine (function connection engine symbol)) int)
|
||||
(remove-all (engine) int)
|
||||
(remove-by-param0 (engine object) int)
|
||||
(remove-by-param1 (engine int) int)
|
||||
(remove-by-param2 (engine int) int)
|
||||
(get-first-connectable (engine) connectable)
|
||||
(get-last-connectable (engine) connectable)
|
||||
(get-next-connectable (_type_ connectable) connectable)
|
||||
(get-prev-connectable (_type_ connectable) connectable)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod belongs-to-process? ((this connection) (arg0 process))
|
||||
"Does this connection belong to the given process?"
|
||||
(= arg0 (get-process this))
|
||||
)
|
||||
|
||||
(defmethod print ((this connection))
|
||||
(format
|
||||
#t
|
||||
"#<connection (~A ~A ~A ~A) @ #x~X>"
|
||||
(-> this param0)
|
||||
(-> this param1)
|
||||
(-> this param2)
|
||||
(-> this param3)
|
||||
this
|
||||
)
|
||||
this
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch pointer vs engine.
|
||||
(defmethod get-engine ((this connection))
|
||||
"Get the engine for this connection. This must be used on a live connection."
|
||||
(while (-> (the-as connectable this) prev0)
|
||||
(nop!)
|
||||
(nop!)
|
||||
(set! this (the-as connection (-> (the-as connectable this) prev0)))
|
||||
)
|
||||
(the-as engine (&+ (the-as pointer this) -28))
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch pointer vs process.
|
||||
(defmethod get-process ((this connection))
|
||||
"Get the process for this connection."
|
||||
(while (-> (the-as connectable this) prev1)
|
||||
(nop!)
|
||||
(nop!)
|
||||
(set! this (the-as connection (-> (the-as connectable this) prev1)))
|
||||
)
|
||||
(the-as process (&+ (the-as pointer this) -124))
|
||||
)
|
||||
|
||||
(defmethod belongs-to-engine? ((this connection) (arg0 engine))
|
||||
"Check to see if this connection is located in the data section of the engine.
|
||||
This works on dead or alive connections."
|
||||
(and (< (the-as int arg0) (the-as int this))
|
||||
(< (the-as int this) (the-as int (&+
|
||||
(&+ (the-as pointer arg0) (-> arg0 type size))
|
||||
(* (-> arg0 allocated-length) (the-as int (-> arg0 element-type size)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod get-first-connectable ((this engine))
|
||||
(-> this alive-list next0)
|
||||
)
|
||||
|
||||
(defmethod get-last-connectable ((this engine))
|
||||
(-> this alive-list-end)
|
||||
)
|
||||
|
||||
(defmethod get-next-connectable ((this engine) (arg0 connectable))
|
||||
(-> arg0 next0)
|
||||
)
|
||||
|
||||
(defmethod get-prev-connectable ((this engine) (arg0 connectable))
|
||||
(-> arg0 prev0)
|
||||
)
|
||||
|
||||
(defmethod new engine ((allocation symbol) (type-to-make type) (arg0 symbol) (arg1 int) (arg2 type))
|
||||
(let ((v0-0
|
||||
(object-new
|
||||
allocation
|
||||
type-to-make
|
||||
(the-as int (+ (-> type-to-make size) (* (the-as uint arg1) (-> arg2 size))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> v0-0 allocated-length) arg1)
|
||||
(set! (-> v0-0 length) 0)
|
||||
(set! (-> v0-0 name) arg0)
|
||||
(set! (-> v0-0 element-type) arg2)
|
||||
(set! (-> v0-0 alive-list next0) (-> v0-0 alive-list-end))
|
||||
(set! (-> v0-0 alive-list prev0) #f)
|
||||
(set! (-> v0-0 alive-list next1) #f)
|
||||
(set! (-> v0-0 alive-list prev1) #f)
|
||||
(set! (-> v0-0 alive-list-end next0) #f)
|
||||
(set! (-> v0-0 alive-list-end prev0) (-> v0-0 alive-list))
|
||||
(set! (-> v0-0 alive-list-end next1) #f)
|
||||
(set! (-> v0-0 alive-list-end prev1) #f)
|
||||
(set! (-> v0-0 dead-list next0) (the-as connectable (-> v0-0 data)))
|
||||
(set! (-> v0-0 dead-list prev0) #f)
|
||||
(set! (-> v0-0 dead-list next1) #f)
|
||||
(set! (-> v0-0 dead-list prev1) #f)
|
||||
(set! (-> v0-0 dead-list-end next0) #f)
|
||||
(set! (-> v0-0 dead-list-end prev0)
|
||||
(the-as connectable (+ (+ (* (the-as uint (+ arg1 -1)) (-> arg2 size)) 92) (the-as uint v0-0)))
|
||||
)
|
||||
(set! (-> v0-0 dead-list-end next1) #f)
|
||||
(set! (-> v0-0 dead-list-end prev1) #f)
|
||||
(let ((v1-9 (the-as object (-> v0-0 data))))
|
||||
(set! (-> v0-0 data 0 prev0) (-> v0-0 dead-list))
|
||||
(set! (-> v0-0 data 0 next0) (the-as connectable (&+ (the-as pointer v1-9) (-> arg2 size))))
|
||||
(let ((v1-10 (the-as object (&+ (the-as pointer v1-9) (-> arg2 size)))))
|
||||
(let ((a0-6 1)
|
||||
(a1-3 (+ arg1 -2))
|
||||
)
|
||||
(while (>= a1-3 a0-6)
|
||||
(set! (-> (the-as connectable v1-10) prev0)
|
||||
(the-as connectable (&- (the-as pointer v1-10) (the-as uint (-> arg2 size))))
|
||||
)
|
||||
;; og:preserve-this cast changed to (pointer pointer)
|
||||
(set! (-> (the-as (pointer pointer) v1-10)) (&+ (the-as pointer v1-10) (-> arg2 size)))
|
||||
(set! v1-10 (&+ (the-as pointer v1-10) (-> arg2 size)))
|
||||
(+! a0-6 1)
|
||||
)
|
||||
)
|
||||
(set! (-> (the-as connectable v1-10) prev0)
|
||||
(the-as connectable (&- (the-as pointer v1-10) (the-as uint (-> arg2 size))))
|
||||
)
|
||||
;; og:preserve-this cast changed to (pointer collectable)
|
||||
(set! (-> (the-as (pointer connectable) v1-10)) (-> v0-0 dead-list-end))
|
||||
)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod print ((this engine))
|
||||
(format #t "#<~A ~A @ #x~X>" (-> this type) (-> this name) this)
|
||||
this
|
||||
)
|
||||
|
||||
|
||||
(defmethod length ((this engine))
|
||||
(-> this length)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch uint vs int.
|
||||
(defmethod asize-of ((this engine))
|
||||
(the-as int (+ (-> this type size) (* (-> this allocated-length) (the-as int (-> this element-type size)))))
|
||||
)
|
||||
|
||||
(defmethod apply-to-connections ((this engine) (arg0 (function connectable none)))
|
||||
"Apply arg0 to all connections for the engine.
|
||||
It's okay to have arg0 remove the connection."
|
||||
(let* ((a0-1 (-> this alive-list next0))
|
||||
(s4-0 (-> a0-1 next0))
|
||||
)
|
||||
(while (!= a0-1 (-> this alive-list-end))
|
||||
(arg0 a0-1)
|
||||
(set! a0-1 s4-0)
|
||||
(set! s4-0 (-> s4-0 next0))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod apply-to-connections-reverse ((this engine) (arg0 (function connectable none)))
|
||||
"Apply arg0 to all connections, reverse order.
|
||||
Do not use arg0 to remove yourself from the list."
|
||||
(let ((s4-0 (-> this alive-list-end prev0)))
|
||||
(while (!= s4-0 (-> this alive-list))
|
||||
(arg0 s4-0)
|
||||
(set! s4-0 (-> s4-0 prev0))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod execute-connections ((this engine) (arg0 object))
|
||||
"Run the engine!"
|
||||
(set! (-> this engine-time) (-> *display* real-clock frame-counter))
|
||||
(let ((s4-0 (the-as connection (-> this alive-list-end prev0))))
|
||||
(while (!= s4-0 (-> this alive-list))
|
||||
((the-as (function object object object object object) (-> s4-0 param0))
|
||||
(-> s4-0 param1)
|
||||
(-> s4-0 param2)
|
||||
(-> s4-0 param3)
|
||||
arg0
|
||||
)
|
||||
(set! s4-0 (the-as connection (-> s4-0 prev0)))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod execute-connections-and-move-to-dead ((this engine) (arg0 object))
|
||||
"Run the engine! If any objects return `'dead`, remove them."
|
||||
(set! (-> this engine-time) (-> *display* real-clock frame-counter))
|
||||
(let ((s4-0 (the-as connection (-> this alive-list-end prev0))))
|
||||
(while (!= s4-0 (-> this alive-list))
|
||||
(let ((v1-3 ((the-as (function object object object object object) (-> s4-0 param0))
|
||||
(-> s4-0 param1)
|
||||
(-> s4-0 param2)
|
||||
(-> s4-0 param3)
|
||||
arg0
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! s4-0 (the-as connection (-> s4-0 prev0)))
|
||||
(if (= v1-3 'dead)
|
||||
((method-of-type connection move-to-dead) (the-as connection (-> s4-0 next0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod execute-connections-if-needed ((this engine) (arg0 object))
|
||||
"Execute connections, but only if it hasn't been done on this frame."
|
||||
(if (!= (-> *display* real-clock frame-counter) (-> this engine-time))
|
||||
(execute-connections this arg0)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
(defun connection-process-apply ((arg0 process) (arg1 (function object none)))
|
||||
"Apply a function to all connectables of a process."
|
||||
(when arg0
|
||||
(let ((s5-0 (-> arg0 connection-list next1)))
|
||||
(while s5-0
|
||||
(arg1 s5-0)
|
||||
(set! s5-0 (-> s5-0 next1))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod add-connection ((this engine) (arg0 process) (arg1 object) (arg2 object) (arg3 object) (arg4 object))
|
||||
"Add a connection between this engine and a given process."
|
||||
(let ((v1-0 (the-as connection (-> this dead-list next0))))
|
||||
(when (not (or (not arg0) (= v1-0 (-> this dead-list-end))))
|
||||
(set! (-> v1-0 param0) (the-as basic arg1))
|
||||
(set! (-> v1-0 param1) (the-as basic arg2))
|
||||
(set! (-> v1-0 param2) (the-as int arg3))
|
||||
(set! (-> v1-0 param3) (the-as int arg4))
|
||||
(set! (-> this dead-list next0) (-> v1-0 next0))
|
||||
(set! (-> v1-0 next0 prev0) (-> this dead-list))
|
||||
(set! (-> v1-0 next0) (-> this alive-list next0))
|
||||
(set! (-> v1-0 next0 prev0) v1-0)
|
||||
(set! (-> v1-0 prev0) (-> this alive-list))
|
||||
(set! (-> this alive-list next0) v1-0)
|
||||
(set! (-> v1-0 next1) (-> arg0 connection-list next1))
|
||||
(if (-> v1-0 next1)
|
||||
(set! (-> v1-0 next1 prev1) v1-0)
|
||||
)
|
||||
(set! (-> v1-0 prev1) (-> arg0 connection-list))
|
||||
(set! (-> arg0 connection-list next1) v1-0)
|
||||
(+! (-> this length) 1)
|
||||
v1-0
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod move-to-dead ((this connection))
|
||||
"Move this connection from the alive list to the dead list."
|
||||
(let ((v1-1 (get-engine this)))
|
||||
(set! (-> this prev0 next0) (-> this next0))
|
||||
(set! (-> this next0 prev0) (-> this prev0))
|
||||
(set! (-> this prev1 next1) (-> this next1))
|
||||
(if (-> this next1)
|
||||
(set! (-> this next1 prev1) (-> this prev1))
|
||||
)
|
||||
(set! (-> this next0) (-> v1-1 dead-list next0))
|
||||
(set! (-> this next0 prev0) this)
|
||||
(set! (-> this prev0) (-> v1-1 dead-list))
|
||||
(set! (-> v1-1 dead-list next0) this)
|
||||
(+! (-> v1-1 length) -1)
|
||||
)
|
||||
this
|
||||
)
|
||||
|
||||
(defun process-disconnect ((arg0 process))
|
||||
"Disconnect all connections for the given process."
|
||||
(when arg0
|
||||
(let ((gp-0 (-> arg0 connection-list next1)))
|
||||
(while gp-0
|
||||
((method-of-type connection move-to-dead) (the-as connection gp-0))
|
||||
(set! gp-0 (-> gp-0 next1))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod remove-from-process ((this engine) (arg0 process))
|
||||
"Remove all connections from process for this engine."
|
||||
(when arg0
|
||||
(let ((s5-0 (-> arg0 connection-list next1)))
|
||||
(while s5-0
|
||||
(if ((method-of-type connection belongs-to-engine?) (the-as connection s5-0) this)
|
||||
((method-of-type connection move-to-dead) (the-as connection s5-0))
|
||||
)
|
||||
(set! s5-0 (-> s5-0 next1))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod remove-matching ((this engine) (arg0 (function connection engine symbol)))
|
||||
"Call the given function on each connection and the engine.
|
||||
If it returns truthy, `move-to-dead` that connection."
|
||||
(let* ((s4-0 (-> this alive-list next0))
|
||||
(s3-0 (-> s4-0 next0))
|
||||
)
|
||||
(while (!= s4-0 (-> this alive-list-end))
|
||||
(if (arg0 (the-as connection s4-0) this)
|
||||
((method-of-type connection move-to-dead) (the-as connection s4-0))
|
||||
)
|
||||
(set! s4-0 s3-0)
|
||||
(set! s3-0 (-> s3-0 next0))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod remove-all ((this engine))
|
||||
"Remove all connections from an engine."
|
||||
(let* ((a0-1 (-> this alive-list next0))
|
||||
(s5-0 (-> a0-1 next0))
|
||||
)
|
||||
(while (!= a0-1 (-> this alive-list-end))
|
||||
((method-of-type connection move-to-dead) (the-as connection a0-1))
|
||||
(set! a0-1 s5-0)
|
||||
(set! s5-0 (-> s5-0 next0))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod remove-by-param0 ((this engine) (arg0 object))
|
||||
"Remove all connections with param0 matching arg0."
|
||||
(let* ((a0-1 (-> this alive-list next0))
|
||||
(s4-0 (-> a0-1 next0))
|
||||
)
|
||||
(while (!= a0-1 (-> this alive-list-end))
|
||||
(if (= (-> (the-as connection a0-1) param0) arg0)
|
||||
((method-of-type connection move-to-dead) (the-as connection a0-1))
|
||||
)
|
||||
(set! a0-1 s4-0)
|
||||
(set! s4-0 (-> s4-0 next0))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod remove-by-param1 ((this engine) (arg0 int))
|
||||
"Remove all connections with param1 matching arg0."
|
||||
(let* ((a0-1 (-> this alive-list next0))
|
||||
(s4-0 (-> a0-1 next0))
|
||||
)
|
||||
(while (!= a0-1 (-> this alive-list-end))
|
||||
(if (= (-> (the-as connection a0-1) param1) arg0)
|
||||
((method-of-type connection move-to-dead) (the-as connection a0-1))
|
||||
)
|
||||
(set! a0-1 s4-0)
|
||||
(set! s4-0 (-> s4-0 next0))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod remove-by-param2 ((this engine) (arg0 int))
|
||||
"Remove all connections with param2 matching arg0."
|
||||
(let* ((a0-1 (-> this alive-list next0))
|
||||
(s4-0 (-> a0-1 next0))
|
||||
)
|
||||
(while (!= a0-1 (-> this alive-list-end))
|
||||
(if (= (-> (the-as connection a0-1) param2) arg0)
|
||||
((method-of-type connection move-to-dead) (the-as connection a0-1))
|
||||
)
|
||||
(set! a0-1 s4-0)
|
||||
(set! s4-0 (-> s4-0 next0))
|
||||
)
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
(deftype connection-pers (structure)
|
||||
"This is another engine system, very similar to the first, but not specific to a process.
|
||||
Each connection has a `key`, which is like the process, but unlike normal engine,
|
||||
the key's don't track which engine-pers they belong to.
|
||||
|
||||
Unlike [[engine]], users can use [[engine-pers]] as a parent class."
|
||||
((next connection-pers)
|
||||
(key object)
|
||||
(update-time time-frame)
|
||||
(param object 4)
|
||||
(param-int32 int32 4 :overlay-at (-> param 0))
|
||||
(param-int64 int64 2 :overlay-at (-> param 0))
|
||||
(param-float float 4 :overlay-at (-> param 0))
|
||||
(param-quat uint128 :overlay-at (-> param 0))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype engine-pers (basic)
|
||||
((name symbol)
|
||||
(length int16)
|
||||
(allocated-length int16)
|
||||
(element-type type)
|
||||
(execute-time time-frame)
|
||||
(alive-list connection-pers)
|
||||
(dead-list connection-pers)
|
||||
(data connection-pers :inline :dynamic)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type symbol int type) _type_)
|
||||
(schedule-callback (_type_ object time-frame) connection-pers)
|
||||
(kill-callback (_type_ connection-pers) none)
|
||||
(kill-by-key (_type_ object) none)
|
||||
(kill-matching (_type_ (function engine-pers connection-pers object object symbol) object object) none)
|
||||
(update-callback (_type_) none)
|
||||
(run-pending-updates! (_type_ time-frame) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod new engine-pers ((allocation symbol) (type-to-make type) (arg0 symbol) (arg1 int) (arg2 type))
|
||||
(let ((v0-0 (object-new
|
||||
allocation
|
||||
type-to-make
|
||||
(the-as int (+ (-> type-to-make size) (* (the-as uint arg1) (-> arg2 size))))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> v0-0 allocated-length) arg1)
|
||||
(set! (-> v0-0 length) 0)
|
||||
(set! (-> v0-0 name) arg0)
|
||||
(set! (-> v0-0 element-type) arg2)
|
||||
(set! (-> v0-0 alive-list) #f)
|
||||
(set! (-> v0-0 dead-list) (the-as connection-pers (-> v0-0 data)))
|
||||
(let ((v1-3 (the-as object (-> v0-0 data))))
|
||||
;; og:preserve-this
|
||||
(dotimes (a0-1 arg1)
|
||||
(set! (-> (the-as (pointer uint32) v1-3) 0) (the-as uint (&+ (the-as pointer v1-3) (-> arg2 size))))
|
||||
(set! v1-3 (&+ (the-as pointer v1-3) (-> arg2 size)))
|
||||
)
|
||||
(set! (-> (the-as (pointer symbol) (&- (the-as pointer v1-3) (the-as uint (-> arg2 size))))) #f)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod length ((this engine-pers))
|
||||
(-> this length)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch uint vs int.
|
||||
(defmethod asize-of ((this engine-pers))
|
||||
(the-as int (+ (-> this type size) (* (-> this allocated-length) (the-as int (-> this element-type size)))))
|
||||
)
|
||||
|
||||
(defmethod schedule-callback ((this engine-pers) (arg0 object) (arg1 time-frame))
|
||||
"Get a connection for this key.
|
||||
If no connection exists, add it.
|
||||
Schedule an update to happen in arg1 seconds."
|
||||
(local-vars (v0-0 connection-pers))
|
||||
(let ((v1-0 (-> this alive-list)))
|
||||
(while v1-0
|
||||
(when (= arg0 (-> v1-0 key))
|
||||
(set! v0-0 v1-0)
|
||||
(goto cfg-8)
|
||||
)
|
||||
(set! v1-0 (-> v1-0 next))
|
||||
)
|
||||
)
|
||||
(set! v0-0 (-> this dead-list))
|
||||
(when v0-0
|
||||
(set! (-> this dead-list) (-> v0-0 next))
|
||||
(set! (-> v0-0 next) (-> this alive-list))
|
||||
(set! (-> this alive-list) v0-0)
|
||||
(+! (-> this length) 1)
|
||||
(set! (-> v0-0 key) arg0)
|
||||
(set! (-> v0-0 param-quat) (the-as uint128 0))
|
||||
0
|
||||
)
|
||||
(label cfg-8)
|
||||
(if v0-0
|
||||
(set! (-> v0-0 update-time) (+ (-> this execute-time) arg1))
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
|
||||
(defmethod kill-callback ((this engine-pers) (arg0 connection-pers))
|
||||
"Called when a connection is removed."
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod update-callback ((this engine-pers))
|
||||
"Called when a connection is run.
|
||||
Users can override this as needed."
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod kill-by-key ((this engine-pers) (arg0 object))
|
||||
"Remove connections with this key, calling `kill-callback`."
|
||||
(let ((s4-0 (&-> this alive-list))
|
||||
(s2-0 (-> this alive-list))
|
||||
)
|
||||
(while s2-0
|
||||
(let ((s3-0 (-> s2-0 next)))
|
||||
(cond
|
||||
((!= arg0 (-> s2-0 key))
|
||||
(set! s4-0 (&-> s2-0 next))
|
||||
)
|
||||
(else
|
||||
(kill-callback this s2-0)
|
||||
(set! (-> s4-0 0) (-> s2-0 next))
|
||||
(set! (-> s2-0 next) (-> this dead-list))
|
||||
(set! (-> this dead-list) s2-0)
|
||||
(+! (-> this length) -1)
|
||||
)
|
||||
)
|
||||
(set! s2-0 s3-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod kill-matching ((this engine-pers)
|
||||
(arg0 (function engine-pers connection-pers object object symbol))
|
||||
(arg1 object)
|
||||
(arg2 object)
|
||||
)
|
||||
"Call the given function on each connection. If it returns truthy, kill that connection."
|
||||
(let ((s2-0 (&-> this alive-list))
|
||||
(s0-0 (-> this alive-list))
|
||||
)
|
||||
(while s0-0
|
||||
(let ((s1-0 (-> s0-0 next)))
|
||||
(cond
|
||||
((not (arg0 this s0-0 arg1 arg2))
|
||||
(set! s2-0 (&-> s0-0 next))
|
||||
)
|
||||
(else
|
||||
(kill-callback this s0-0)
|
||||
(set! (-> s2-0 0) (-> s0-0 next))
|
||||
(set! (-> s0-0 next) (-> this dead-list))
|
||||
(set! (-> this dead-list) s0-0)
|
||||
(+! (-> this length) -1)
|
||||
)
|
||||
)
|
||||
(set! s0-0 s1-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod run-pending-updates! ((this engine-pers) (arg0 time-frame))
|
||||
"Run updates if they scheduled. If something is found that has no pending update, kill it.
|
||||
Note that we won't kill things on this call if they fail to update their `update-time`.
|
||||
They will survive until the next call to `run-pending-updates`!
|
||||
(or you can modify their `update-time` before that to prevent them from being killed.)"
|
||||
(let ((s4-0 (-> this execute-time))
|
||||
(s2-0 (&-> this alive-list))
|
||||
(s1-0 (-> this alive-list))
|
||||
)
|
||||
(while s1-0
|
||||
(let ((s3-0 (-> s1-0 next)))
|
||||
(cond
|
||||
((>= (-> s1-0 update-time) s4-0)
|
||||
(update-callback this)
|
||||
(set! s2-0 (&-> s1-0 next))
|
||||
)
|
||||
(else
|
||||
(kill-callback this s1-0)
|
||||
(set! (-> s2-0 0) (-> s1-0 next))
|
||||
(set! (-> s1-0 next) (-> this dead-list))
|
||||
(set! (-> this dead-list) s1-0)
|
||||
(+! (-> this length) -1)
|
||||
)
|
||||
)
|
||||
(set! s1-0 s3-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> this execute-time) arg0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -5,5 +5,65 @@
|
||||
;; name in dgo: engines
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++part-local-space-flags
|
||||
(defenum part-local-space-flags
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
(pls0 0)
|
||||
(pls1 1)
|
||||
(pls2 2)
|
||||
)
|
||||
;; ---part-local-space-flags
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(kmemopen global "engines")
|
||||
|
||||
(define *background-draw-engine* (new 'global 'engine 'draw 6 connection))
|
||||
|
||||
(define *matrix-engine* (new 'global 'boxed-array handle 384))
|
||||
|
||||
(set! (-> *matrix-engine* length) 0)
|
||||
|
||||
(define *cloth-engine* (new 'global 'boxed-array handle 32))
|
||||
|
||||
(set! (-> *cloth-engine* length) 0)
|
||||
|
||||
(define *part-engine* (new 'global 'engine 'sparticle-launcher 256 connection))
|
||||
|
||||
(deftype particle-local-space-info (connection)
|
||||
((params basic 3 :overlay-at param1)
|
||||
(mat-prev matrix :inline)
|
||||
(mat-new matrix :inline)
|
||||
(hand handle)
|
||||
(flags part-local-space-flags)
|
||||
(pad uint32 1)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *cam-post-hook-engine* (new 'global 'engine 'cam-post-hook-engine 4 connection))
|
||||
|
||||
(define *part-local-space-engine*
|
||||
(new 'global 'engine 'particle-local-space-info 112 particle-local-space-info)
|
||||
)
|
||||
|
||||
(define *camera-engine* (new 'global 'engine 'camera-eng 128 connection))
|
||||
|
||||
(when *debug-segment*
|
||||
(define *debug-engine* (new 'debug 'engine 'debug 64 connection))
|
||||
|
||||
)
|
||||
(define *pad-engine* (new 'global 'engine 'pad 4 connection))
|
||||
|
||||
(define *lightning-engine* (new 'global 'engine 'lightning-control 64 connection))
|
||||
|
||||
(define *hud-engine* (new 'global 'engine 'hud 16 connection))
|
||||
|
||||
(define *prim-client-engine* (new 'global 'engine 'prim-client 32 connection))
|
||||
|
||||
(define *prim-engine* (new 'global 'engine 'prim-strip 128 connection))
|
||||
|
||||
(define *task-manager-engine* (new 'global 'engine 'task-manager 16 connection))
|
||||
|
||||
(kmemclose)
|
||||
|
||||
@@ -5,5 +5,157 @@
|
||||
;; name in dgo: entity-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++entity-perm-status
|
||||
(defenum entity-perm-status
|
||||
:bitfield #t
|
||||
:type uint16
|
||||
(bit-0 0) ;; blocks birth
|
||||
(error 1)
|
||||
(dead 2)
|
||||
(no-kill 3)
|
||||
(bit-4 4)
|
||||
(bit-5 5)
|
||||
(subtask-complete 6)
|
||||
(special 7)
|
||||
(complete 8)
|
||||
(bit-9 9)
|
||||
(bit-10 10)
|
||||
(save 11)
|
||||
(bit-12 12)
|
||||
(bit-13 13)
|
||||
(bit-14 14)
|
||||
(bit-15 15)
|
||||
)
|
||||
;; ---entity-perm-status
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *generate-actor-vis* #f)
|
||||
|
||||
(define *generate-actor-vis-start* #f)
|
||||
|
||||
(define *generate-actor-vis-output* #f)
|
||||
|
||||
(deftype entity-perm (structure)
|
||||
"Entity information that gets persisted in the save file."
|
||||
((user-object object 2)
|
||||
(user-uint64 uint64 :overlay-at (-> user-object 0))
|
||||
(user-float float 2 :overlay-at (-> user-object 0))
|
||||
(user-int32 int32 2 :overlay-at (-> user-object 0))
|
||||
(user-uint32 uint32 2 :overlay-at (-> user-object 0))
|
||||
(user-int16 int16 4 :overlay-at (-> user-object 0))
|
||||
(user-uint16 uint16 4 :overlay-at (-> user-object 0))
|
||||
(user-int8 int8 8 :overlay-at (-> user-object 0))
|
||||
(user-uint8 uint8 8 :overlay-at (-> user-object 0))
|
||||
(status entity-perm-status)
|
||||
(dummy uint8 1)
|
||||
(task game-task)
|
||||
(aid actor-id)
|
||||
(quad uint128 :overlay-at (-> user-object 0))
|
||||
)
|
||||
(:methods
|
||||
(update (_type_ symbol entity-perm-status) _type_)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype entity-links (structure)
|
||||
"A linked list of entities with some extra data about their current status."
|
||||
((prev-link entity-links)
|
||||
(next-link entity-links)
|
||||
(entity entity)
|
||||
(process process)
|
||||
(level level)
|
||||
(vis-id int32)
|
||||
(kill-mask task-mask)
|
||||
(vis-dist meters)
|
||||
(trans vector :inline)
|
||||
(perm entity-perm :inline)
|
||||
(status entity-perm-status :overlay-at (-> perm status))
|
||||
(aid uint32 :overlay-at (-> perm aid))
|
||||
(task game-task :overlay-at (-> perm task))
|
||||
)
|
||||
(:methods
|
||||
(birth? (_type_ vector) symbol)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype entity-perm-array (inline-array-class)
|
||||
((data entity-perm :inline :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(set! (-> entity-perm-array heap-base) (the-as uint 16))
|
||||
|
||||
(deftype entity-links-array (inline-array-class)
|
||||
"An array of [[entity-links]].
|
||||
Levels store a reference to this which holds all the entities in the level."
|
||||
((data entity-links :inline :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(set! (-> entity-links-array heap-base) (the-as uint 64))
|
||||
|
||||
(deftype entity (res-lump)
|
||||
"Entities are mainly used to place objects in a level.
|
||||
|
||||
As a child of [[res-lump]], they store various types of metadata
|
||||
in [[res-tag]]s (such as name, curve data, volume data, etc.)
|
||||
that gets accessed by the accompanying process."
|
||||
((trans vector :inline)
|
||||
(aid uint32)
|
||||
(unknown uint32)
|
||||
)
|
||||
(:methods
|
||||
(birth! (_type_) _type_)
|
||||
(kill! (_type_) _type_)
|
||||
(entity-method-24 (_type_) _type_)
|
||||
(entity-method-25 (_type_) _type_)
|
||||
(get-level (_type_) level)
|
||||
)
|
||||
)
|
||||
|
||||
;; type entity-camera is defined here, but it is unknown to the decompiler
|
||||
|
||||
;; type entity-nav-mesh is defined here, but it is unknown to the decompiler
|
||||
|
||||
;; type entity-race-mesh is defined here, but it is unknown to the decompiler
|
||||
|
||||
;; type entity-actor is defined here, but it is unknown to the decompiler
|
||||
|
||||
(deftype actor-reference (structure)
|
||||
((actor entity-actor)
|
||||
(id uint32)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype actor-group (inline-array-class)
|
||||
((data actor-reference :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(set! (-> actor-group heap-base) (the-as uint 8))
|
||||
|
||||
(deftype entity-info (basic)
|
||||
((ptype object)
|
||||
(pool symbol)
|
||||
(heap-size int32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype actor-bank (basic)
|
||||
((pause-dist float)
|
||||
(birth-dist float)
|
||||
(birth-max int32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *ACTOR-bank* (new 'static 'actor-bank :pause-dist 204800.0 :birth-dist 901120.0 :birth-max 10))
|
||||
|
||||
@@ -5,5 +5,70 @@
|
||||
;; name in dgo: res-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++res-lump-flags
|
||||
(defenum res-lump-flags
|
||||
:type uint16
|
||||
:bitfield #t
|
||||
(sorted 0)
|
||||
(rlf1 1)
|
||||
)
|
||||
;; ---res-lump-flags
|
||||
|
||||
;; +++res-tag-pair
|
||||
;; made-up type
|
||||
(deftype res-tag-pair (uint64)
|
||||
"The indices of two [[res-tag]]s. If the specific key-frame time is in between two
|
||||
res-tags, this type is used to return the indices of the first res-tag before and after
|
||||
the specified time."
|
||||
((lo int32 :offset 0)
|
||||
(hi int32 :offset 32)
|
||||
)
|
||||
)
|
||||
;; ---res-tag-pair
|
||||
|
||||
(declare-type entity-links structure)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype res-tag (uint128)
|
||||
"Metadata about a property in a [[res-lump]], such as name, element type and element count."
|
||||
((name symbol :offset 0 :size 32)
|
||||
(key-frame float :offset 32 :size 32)
|
||||
(elt-type type :offset 64 :size 32)
|
||||
(data-offset uint16 :offset 96 :size 16)
|
||||
(elt-count uint32 :offset 112 :size 15)
|
||||
(inlined? uint8 :offset 127 :size 1)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype res-lump (basic)
|
||||
"A collection of [[res-tag]]s and their data."
|
||||
((length int32)
|
||||
(allocated-length int16)
|
||||
(flags res-lump-flags)
|
||||
(data-base pointer)
|
||||
(data-top pointer)
|
||||
(data-size int32)
|
||||
(extra entity-links)
|
||||
(tag (pointer res-tag))
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type int int) _type_)
|
||||
(get-property-data (_type_ symbol symbol float pointer (pointer res-tag) pointer) pointer :no-virtual)
|
||||
(get-property-struct (_type_ symbol symbol float structure (pointer res-tag) pointer) structure :no-virtual)
|
||||
(get-property-value (_type_ symbol symbol float uint128 (pointer res-tag) pointer) uint128 :no-virtual)
|
||||
(get-property-value-float (_type_ symbol symbol float float (pointer res-tag) pointer) float)
|
||||
(get-tag-index-data (_type_ int) pointer)
|
||||
(get-tag-data (_type_ res-tag) pointer)
|
||||
(allocate-data-memory-for-tag! (_type_ res-tag) res-tag)
|
||||
(sort! (_type_) _type_)
|
||||
(add-data! (_type_ res-tag pointer) res-lump)
|
||||
(add-32bit-data! (_type_ res-tag object) res-lump)
|
||||
(lookup-tag-idx (_type_ symbol symbol float) res-tag-pair :no-virtual)
|
||||
(make-property-data (_type_ float res-tag-pair pointer) pointer)
|
||||
(get-curve-data! (_type_ curve symbol symbol float) symbol)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *res-key-string* (new 'global 'string 64 (the-as string #f)))
|
||||
|
||||
@@ -5,5 +5,27 @@
|
||||
;; name in dgo: effect-control-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; DECOMP BEGINS
|
||||
;; +++effect-control-flag
|
||||
(defenum effect-control-flag
|
||||
:type uint32
|
||||
:bitfield #t
|
||||
(ecf0 0)
|
||||
(ecf1 1)
|
||||
(ecf2 2)
|
||||
(ecf3 3)
|
||||
(ecf4 4)
|
||||
(ecf5 5)
|
||||
(ecf6 6)
|
||||
(ecf7 7)
|
||||
(ecf8 8)
|
||||
(ecf9 9)
|
||||
(ecf10 10)
|
||||
(ecf11 11)
|
||||
(ecf12 12)
|
||||
(ecf13 13)
|
||||
(ecf14 14)
|
||||
(ecf15 15)
|
||||
)
|
||||
;; ---effect-control-flag
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
@@ -5,5 +5,127 @@
|
||||
;; name in dgo: game-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++state-flags
|
||||
(defenum state-flags
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(sf0 0)
|
||||
(sf1 1)
|
||||
(sf2 2)
|
||||
(sf3 3)
|
||||
(sf4 4)
|
||||
(sf5 5)
|
||||
(sf6 6)
|
||||
(sf7 7)
|
||||
(sf8 8)
|
||||
(sf9 9)
|
||||
(sf10 10)
|
||||
(sf11 11)
|
||||
(sf12 12)
|
||||
(sf13 13)
|
||||
(sf14 14)
|
||||
(sf15 15)
|
||||
(sf16 16)
|
||||
(sf17 17)
|
||||
(sf18 18)
|
||||
(sf19 19)
|
||||
(sf20 20)
|
||||
(sf21 21)
|
||||
(sf22 22)
|
||||
(sf23 23)
|
||||
(sf24 24)
|
||||
(sf25 25)
|
||||
(hang 26)
|
||||
(sf27 27)
|
||||
(invisible 28)
|
||||
(sf29 29)
|
||||
(sf30 30)
|
||||
(sf31 31)
|
||||
)
|
||||
;; ---state-flags
|
||||
|
||||
;; +++attack-mask
|
||||
(defenum attack-mask
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(trans 0) ;; 1
|
||||
(vector 1) ;; 2
|
||||
(intersection 2) ;; 4
|
||||
(attacker 3) ;; 8
|
||||
(attack-time 4) ;; 16
|
||||
(invinc-time 5) ;; 32
|
||||
(mode 6) ;; 64
|
||||
(shove-back 7) ;; 128
|
||||
(shove-up 8) ;; 256
|
||||
(speed 9) ;; 512
|
||||
(dist 10) ;; 1024
|
||||
(control 11) ;; 2048
|
||||
(angle 12) ;; 4096
|
||||
(rotate-to 13) ;; 8192
|
||||
(prev-state 14) ;; 16384
|
||||
(id 15) ;; 32768
|
||||
(count 16) ;; hi 1
|
||||
(penetrate-using 17) ;; hi 2
|
||||
(attacker-velocity 18);; hi 4
|
||||
(damage 19) ;; hi 8
|
||||
(shield-damage 20) ;; hi16
|
||||
(vehicle-damage-factor 21) ;; hi 32
|
||||
(vehicle-impulse-factor 22) ;; hi 64
|
||||
(knock 23)
|
||||
(test 24)
|
||||
(wpn-type 25)
|
||||
)
|
||||
;; ---attack-mask
|
||||
|
||||
(declare-type process-nettable process)
|
||||
(declare-type process-drawable process-nettable)
|
||||
|
||||
(declare-type nav-control structure)
|
||||
(declare-type path-control basic)
|
||||
(declare-type vol-control basic)
|
||||
(declare-type fact-info basic)
|
||||
(declare-type actor-link-info basic)
|
||||
(declare-type water-control basic)
|
||||
(declare-type carry-info basic)
|
||||
(declare-type rigid-body-control basic)
|
||||
(declare-type touching-shapes-entry structure)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype attack-info (structure)
|
||||
"Information about an incoming attack."
|
||||
((trans vector :inline :offset-assert 0)
|
||||
(vector vector :inline :offset-assert 16)
|
||||
(attacker-velocity vector :inline :offset-assert 32)
|
||||
(intersection vector :inline :offset-assert 48)
|
||||
(attacker handle :offset-assert 64)
|
||||
(attack-time time-frame :offset-assert 72) ;; time-frame
|
||||
(invinc-time time-frame :offset-assert 80) ;; time-frame
|
||||
(mask attack-mask :offset-assert 88) ;; attack-mask
|
||||
(mode symbol :offset-assert 92) ;; guessed by decompiler
|
||||
(shove-back meters :offset-assert 96)
|
||||
(shove-up meters :offset-assert 100)
|
||||
(speed meters :offset-assert 104)
|
||||
(dist meters :offset-assert 108)
|
||||
(control float :offset-assert 112)
|
||||
(angle symbol :offset-assert 116) ;; guessed by decompiler
|
||||
(rotate-to degrees :offset-assert 120) ;; degrees
|
||||
(prev-state state :offset-assert 124) ;; guessed by decompiler
|
||||
(id uint32 :offset-assert 128)
|
||||
(count uint8 :offset-assert 132)
|
||||
(penetrate-using penetrate :offset-assert 136) ;; penetrate
|
||||
(damage float :offset-assert 144)
|
||||
(shield-damage float :offset-assert 148)
|
||||
(vehicle-damage-factor float :offset-assert 152)
|
||||
(vehicle-impulse-factor float :offset-assert 156)
|
||||
(knock knocked-type :offset-assert 160) ;; knocked-type
|
||||
(test symbol :offset-assert 164) ;; guessed by decompiler
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #xa8
|
||||
:flag-assert #xa000000a8
|
||||
;; field handle is likely a value type.
|
||||
(:methods
|
||||
(attack-info-method-9 () none) ;; 9 ;; (attack-info-method-9 (_type_ attack-info process-drawable process-drawable) none)
|
||||
)
|
||||
)
|
||||
@@ -7,3 +7,7 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype actor-id (uint32)
|
||||
()
|
||||
:flag-assert #x900000004
|
||||
)
|
||||
@@ -5,5 +5,913 @@
|
||||
;; name in dgo: main-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
(declare-type debug-menu-context basic)
|
||||
|
||||
;; +++collide-spec
|
||||
(defenum collide-spec
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(backgnd 0)
|
||||
(jak 1)
|
||||
(bot 2)
|
||||
(crate 3)
|
||||
(civilian 4)
|
||||
(enemy 5)
|
||||
(obstacle 6)
|
||||
(vehicle-sphere 7)
|
||||
(vehicle-debris 8) ; was hit-by-player-list
|
||||
(hit-by-player-list 9) ; was hit-by-others-list
|
||||
(hit-by-others-list 10) ; was player-list
|
||||
(player-list 11) ; was water
|
||||
(water 12) ; was collectable
|
||||
(collectable 13) ; was blocking-plane
|
||||
(blocking-plane 14) ; was projectile
|
||||
(projectile 15) ; was jak-vulnerable
|
||||
(jak-vulnerable 16) ; was camera-blocker
|
||||
(camera-blocker 17) ; was los-blocker
|
||||
(los-blocker 18) ; was notice-blue-eco-powerup
|
||||
(nav-mesh 19) ; was tobot
|
||||
(pusher 20)
|
||||
(bot-targetable 21) ; was vehicle-mesh
|
||||
(coliseum-ball 23) ; was jak-vehicle
|
||||
(special-obstacle 22) ; unchanged semantically
|
||||
(impenetrable-obj 25) ; was mech-punch
|
||||
(obstacle-for-jak 24) ; was special-obstacle
|
||||
(vehicle-sphere-no-probe 27) ; was vehicle-mesh-probeable
|
||||
(shield 26) ; was obstacle-for-jak
|
||||
(impenetrable-obj-alt 28) ; original impenetrable-obj (no mapping shown)
|
||||
(shield-alt 29) ; original shield (no mapping shown)
|
||||
(vehicle-mesh-no-block-use 30)
|
||||
(vehicle-sphere-no-probe-alt 31)
|
||||
)
|
||||
;; ---collide-spec
|
||||
|
||||
;; +++strip-lines-controls
|
||||
(defenum strip-lines-controls
|
||||
:type int64
|
||||
(none 0)
|
||||
; (strippable 1)
|
||||
; (convertible 2)
|
||||
; (good 3)
|
||||
; (edgeable 4)
|
||||
; (ordinary 8)
|
||||
; (color-mismatch 16)
|
||||
; (shader-mismatch 32)
|
||||
; (uv-mismatch 64)
|
||||
; (too-big 128)
|
||||
; (bad 240)
|
||||
; (all-edges 255)
|
||||
; (strips 256)
|
||||
; (frags 512)
|
||||
)
|
||||
;; ---strip-lines-controls
|
||||
|
||||
;; +++scene-controls
|
||||
(defenum scene-controls
|
||||
:type int64
|
||||
:bitfield #t
|
||||
(channel)
|
||||
(anim-name)
|
||||
(dma-size)
|
||||
(bounds-spheres)
|
||||
(actors)
|
||||
(actor-marks)
|
||||
(special-fma-spheres)
|
||||
(scene-controls-7)
|
||||
(scene-controls-8)
|
||||
(display-controls)
|
||||
)
|
||||
;; ---scene-controls
|
||||
|
||||
;; +++bot-marks-controls
|
||||
(defenum bot-marks-controls
|
||||
:type int64
|
||||
(all-off 0)
|
||||
(course-spots 1)
|
||||
(task-spots 2)
|
||||
(all-on 3)
|
||||
(bmc04 4)
|
||||
(bmc05 5)
|
||||
(bmc06 6)
|
||||
(bmc07 7)
|
||||
(bmc08 8)
|
||||
(bmc09 9)
|
||||
(bmc10 10)
|
||||
(bmc11 11)
|
||||
(bmc12 12)
|
||||
(bmc13 13)
|
||||
(bmc14 14)
|
||||
(bmc15 15)
|
||||
(bmc16 16)
|
||||
)
|
||||
;; ---bot-marks-controls
|
||||
|
||||
;; +++race-marks-controls
|
||||
(defenum race-marks-controls
|
||||
:type int64
|
||||
(all-off 0)
|
||||
(path0-red 1)
|
||||
(path1-green 2)
|
||||
(path2-blue 4)
|
||||
(path3-yellow 8)
|
||||
(path4-cyan 16)
|
||||
(path5-violet 32)
|
||||
(path6-orange 64)
|
||||
(path7-black 128)
|
||||
(all-paths-on 255)
|
||||
(rmc2040 2040)
|
||||
)
|
||||
;; ---race-marks-controls
|
||||
|
||||
;; +++race-selection
|
||||
(defenum race-selection
|
||||
:type int64
|
||||
(desertb-race-record 0)
|
||||
(rs1 1)
|
||||
(desrally-record 2)
|
||||
)
|
||||
;; ---race-selection
|
||||
|
||||
;; +++subdivide-setting
|
||||
(defenum subdivide-setting
|
||||
:type int64
|
||||
(textured 0)
|
||||
(outline 1)
|
||||
(gouraud 2)
|
||||
(hack 3))
|
||||
;; ---subdivide-setting
|
||||
|
||||
;; +++ocean-height-hack
|
||||
(defenum ocean-height-hack
|
||||
:type int64
|
||||
; (zero 1)
|
||||
; (far-below 2)
|
||||
; (sewer-start 3)
|
||||
; (sewer-hi 4)
|
||||
; (sewer-med 5)
|
||||
; (sewer-lo 6)
|
||||
)
|
||||
;; ---ocean-height-hack
|
||||
|
||||
|
||||
;; +++text-id
|
||||
(defenum text-id
|
||||
:type uint32
|
||||
(null #x0)
|
||||
|
||||
(text-id-341 341)
|
||||
(text-id-342 342)
|
||||
(text-id-343 343)
|
||||
(text-id-344 344)
|
||||
|
||||
(text-id-522 522)
|
||||
|
||||
(text-id-1579 1579)
|
||||
(text-id-1580 1580)
|
||||
(text-id-1581 1581)
|
||||
(text-id-1588 1588)
|
||||
(text-id-1624 1624)
|
||||
(text-id-1625 1625)
|
||||
(text-id-1633 1633)
|
||||
(text-id-1655 1655)
|
||||
(text-id-1656 1656)
|
||||
(text-id-1659 1659)
|
||||
(text-id-1694 1694)
|
||||
(text-id-1695 1695)
|
||||
(text-id-1838 1838)
|
||||
(text-id-1839 1839)
|
||||
|
||||
(text-id-1940 1940)
|
||||
|
||||
(text-id-2135 2135)
|
||||
(text-id-2136 2136)
|
||||
(text-id-2137 2137)
|
||||
(text-id-2138 2138)
|
||||
(text-id-2139 2139)
|
||||
(text-id-2140 2140)
|
||||
(text-id-2141 2141)
|
||||
(text-id-2142 2142)
|
||||
(text-id-2143 2143)
|
||||
(text-id-2144 2144)
|
||||
(text-id-2145 2145)
|
||||
(text-id-2146 2146)
|
||||
(text-id-2147 2147)
|
||||
|
||||
(text-id-2149 2149)
|
||||
|
||||
(text-id-2163 2163)
|
||||
(text-id-2164 2164)
|
||||
(text-id-2165 2165)
|
||||
(text-id-2166 2166)
|
||||
(text-id-2167 2167)
|
||||
(text-id-2168 2168)
|
||||
(text-id-2169 2169)
|
||||
(text-id-2170 2170)
|
||||
(text-id-2171 2171)
|
||||
(text-id-2172 2172)
|
||||
(text-id-2173 2173)
|
||||
(text-id-2174 2174)
|
||||
(text-id-2175 2175)
|
||||
(text-id-2176 2176)
|
||||
(text-id-2177 2177)
|
||||
(text-id-2178 2178)
|
||||
(text-id-2179 2179)
|
||||
(text-id-2183 2183)
|
||||
(text-id-2184 2184)
|
||||
(text-id-2185 2185)
|
||||
(text-id-2186 2186)
|
||||
(text-id-2187 2187)
|
||||
(text-id-2188 2188)
|
||||
(text-id-2189 2189)
|
||||
(text-id-2190 2190)
|
||||
|
||||
(text-id-2208 2208)
|
||||
(text-id-2209 2209)
|
||||
(text-id-2210 2210)
|
||||
(text-id-2211 2211)
|
||||
(text-id-2212 2212)
|
||||
(text-id-2213 2213)
|
||||
(text-id-2214 2214)
|
||||
(text-id-2215 2215)
|
||||
(text-id-2216 2216)
|
||||
(text-id-2217 2217)
|
||||
(text-id-2218 2218)
|
||||
(text-id-2219 2219)
|
||||
(text-id-2220 2220)
|
||||
(text-id-2221 2221)
|
||||
|
||||
(text-id-2278 2278)
|
||||
(text-id-2279 2279)
|
||||
(text-id-2280 2280)
|
||||
(text-id-2281 2281)
|
||||
(text-id-2282 2282)
|
||||
(text-id-2283 2283)
|
||||
(text-id-2284 2284)
|
||||
(text-id-2285 2285)
|
||||
(text-id-2286 2286)
|
||||
(text-id-2287 2287)
|
||||
(text-id-2288 2288)
|
||||
(text-id-2289 2289)
|
||||
(text-id-2290 2290)
|
||||
(text-id-2291 2291)
|
||||
(text-id-2292 2292)
|
||||
(text-id-2293 2293)
|
||||
(text-id-2294 2294)
|
||||
(text-id-2295 2295)
|
||||
(text-id-2296 2296)
|
||||
(text-id-2297 2297)
|
||||
(text-id-2298 2298)
|
||||
(text-id-2299 2299)
|
||||
(text-id-2300 2300)
|
||||
(text-id-2301 2301)
|
||||
(text-id-2302 2302)
|
||||
(text-id-2303 2303)
|
||||
(text-id-2304 2304)
|
||||
(text-id-2305 2305)
|
||||
(text-id-2306 2306)
|
||||
(text-id-2307 2307)
|
||||
(text-id-2308 2308)
|
||||
(text-id-2309 2309)
|
||||
(text-id-2310 2310)
|
||||
(text-id-2311 2311)
|
||||
(text-id-2312 2312)
|
||||
|
||||
(text-id-2513 2513)
|
||||
|
||||
(text-id-2833 2833)
|
||||
(text-id-2834 2834)
|
||||
(text-id-2835 2835)
|
||||
(text-id-2836 2836)
|
||||
(text-id-2837 2837)
|
||||
(text-id-2838 2838)
|
||||
(text-id-2839 2839)
|
||||
(text-id-2840 2840)
|
||||
|
||||
(text-id-2842 2842)
|
||||
(text-id-2843 2843)
|
||||
(text-id-2844 2844)
|
||||
(text-id-2845 2845)
|
||||
(text-id-2846 2846)
|
||||
(text-id-2847 2847)
|
||||
(text-id-2848 2848)
|
||||
(text-id-2849 2849)
|
||||
(text-id-2850 2850)
|
||||
(text-id-2851 2851)
|
||||
(text-id-2852 2852)
|
||||
(text-id-2853 2853)
|
||||
(text-id-2854 2854)
|
||||
(text-id-2855 2855)
|
||||
(text-id-2856 2856)
|
||||
(text-id-2857 2857)
|
||||
(text-id-2858 2858)
|
||||
(text-id-2859 2859)
|
||||
(text-id-2860 2860)
|
||||
(text-id-2861 2861)
|
||||
(text-id-2862 2862)
|
||||
(text-id-2863 2863)
|
||||
(text-id-2864 2864)
|
||||
(text-id-2865 2865)
|
||||
(text-id-2866 2866)
|
||||
(text-id-2867 2867)
|
||||
(text-id-2868 2868)
|
||||
(text-id-2869 2869)
|
||||
(text-id-2870 2870)
|
||||
(text-id-2871 2871)
|
||||
(text-id-2872 2872)
|
||||
(text-id-2873 2873)
|
||||
(text-id-2874 2874)
|
||||
(text-id-2875 2875)
|
||||
(text-id-2876 2876)
|
||||
(text-id-2877 2877)
|
||||
(text-id-2878 2878)
|
||||
(text-id-2879 2879)
|
||||
(text-id-2880 2880)
|
||||
(text-id-2881 2881)
|
||||
(text-id-2882 2882)
|
||||
(text-id-2883 2883)
|
||||
(text-id-2884 2884)
|
||||
(text-id-2885 2885)
|
||||
|
||||
(text-id-2886 2886)
|
||||
|
||||
(text-id-2961 2961)
|
||||
(text-id-2962 2962)
|
||||
(text-id-2963 2963)
|
||||
(text-id-2964 2964)
|
||||
(text-id-2965 2965)
|
||||
(text-id-2966 2966)
|
||||
(text-id-2967 2967)
|
||||
(text-id-2968 2968)
|
||||
(text-id-2969 2969)
|
||||
(text-id-2970 2970)
|
||||
(text-id-2971 2971)
|
||||
(text-id-2972 2972)
|
||||
(text-id-2973 2973)
|
||||
(text-id-2974 2974)
|
||||
(text-id-2975 2975)
|
||||
(text-id-2976 2976)
|
||||
(text-id-2977 2977)
|
||||
(text-id-2978 2978)
|
||||
(text-id-2979 2979)
|
||||
(text-id-2980 2980)
|
||||
(text-id-2981 2981)
|
||||
(text-id-2982 2982)
|
||||
(text-id-2983 2983)
|
||||
(text-id-2984 2984)
|
||||
(text-id-2985 2985)
|
||||
(text-id-2986 2986)
|
||||
(text-id-2987 2987)
|
||||
(text-id-2988 2988)
|
||||
(text-id-2989 2989)
|
||||
(text-id-2990 2990)
|
||||
(text-id-2991 2991)
|
||||
(text-id-2992 2992)
|
||||
(text-id-2993 2993)
|
||||
(text-id-2994 2994)
|
||||
(text-id-2995 2995)
|
||||
(text-id-2996 2996)
|
||||
(text-id-2997 2997)
|
||||
(text-id-2998 2998)
|
||||
(text-id-2999 2999)
|
||||
(text-id-3000 3000)
|
||||
(text-id-3001 3001)
|
||||
(text-id-3002 3002)
|
||||
(text-id-3003 3003)
|
||||
(text-id-3004 3004)
|
||||
(text-id-3005 3005)
|
||||
(text-id-3006 3006)
|
||||
(text-id-3007 3007)
|
||||
(text-id-3008 3008)
|
||||
(text-id-3009 3009)
|
||||
|
||||
(text-id-4370 4370)
|
||||
(text-id-4371 4371)
|
||||
(text-id-4372 4372)
|
||||
(text-id-4373 4373)
|
||||
(text-id-4374 4374)
|
||||
(text-id-4375 4375)
|
||||
(text-id-4376 4376)
|
||||
(text-id-4377 4377)
|
||||
(text-id-4378 4378)
|
||||
(text-id-4379 4379)
|
||||
(text-id-4380 4380)
|
||||
(text-id-4381 4381)
|
||||
(text-id-4382 4382)
|
||||
|
||||
(text-id-4660 4660)
|
||||
(text-id-4661 4661)
|
||||
(text-id-4662 4662)
|
||||
(text-id-4663 4663)
|
||||
(text-id-4664 4664)
|
||||
(text-id-4665 4665)
|
||||
(text-id-4666 4666)
|
||||
(text-id-4667 4667)
|
||||
(text-id-4668 4668)
|
||||
(text-id-4669 4669)
|
||||
(text-id-4670 4670)
|
||||
(text-id-4671 4671)
|
||||
(text-id-4672 4672)
|
||||
(text-id-4673 4673)
|
||||
(text-id-4674 4674)
|
||||
(text-id-4675 4675)
|
||||
(text-id-4676 4676)
|
||||
(text-id-4677 4677)
|
||||
(text-id-4678 4678)
|
||||
(text-id-4679 4679)
|
||||
(text-id-4680 4680)
|
||||
(text-id-4681 4681)
|
||||
(text-id-4682 4682)
|
||||
(text-id-4683 4683)
|
||||
(text-id-4684 4684)
|
||||
(text-id-4685 4685)
|
||||
(text-id-4686 4686)
|
||||
(text-id-4687 4687)
|
||||
(text-id-4688 4688)
|
||||
(text-id-4689 4689)
|
||||
(text-id-4690 4690)
|
||||
(text-id-4691 4691)
|
||||
|
||||
(text-id-4692 4692)
|
||||
(text-id-4693 4693)
|
||||
(text-id-4694 4694)
|
||||
(text-id-4695 4695)
|
||||
(text-id-4696 4696)
|
||||
(text-id-4697 4697)
|
||||
(text-id-4698 4698)
|
||||
(text-id-4699 4699)
|
||||
(text-id-4700 4700)
|
||||
(text-id-4701 4701)
|
||||
(text-id-4702 4702)
|
||||
(text-id-4703 4703)
|
||||
(text-id-4704 4704)
|
||||
(text-id-4705 4705)
|
||||
(text-id-4706 4706)
|
||||
(text-id-4707 4707)
|
||||
(text-id-4708 4708)
|
||||
(text-id-4709 4709)
|
||||
(text-id-4710 4710)
|
||||
(text-id-4711 4711)
|
||||
(text-id-4712 4712)
|
||||
(text-id-4713 4713)
|
||||
(text-id-4714 4714)
|
||||
(text-id-4715 4715)
|
||||
(text-id-4716 4716)
|
||||
(text-id-4717 4717)
|
||||
(text-id-4718 4718)
|
||||
(text-id-4719 4719)
|
||||
(text-id-4720 4720)
|
||||
(text-id-4721 4721)
|
||||
(text-id-4722 4722)
|
||||
(text-id-4723 4723)
|
||||
(text-id-4724 4724)
|
||||
(text-id-4725 4725)
|
||||
(text-id-4726 4726)
|
||||
(text-id-4727 4727)
|
||||
(text-id-4728 4728)
|
||||
(text-id-4729 4729)
|
||||
(text-id-4730 4730)
|
||||
(text-id-4731 4731)
|
||||
(text-id-4732 4732)
|
||||
(text-id-4733 4733)
|
||||
(text-id-4734 4734)
|
||||
(text-id-4735 4735)
|
||||
(text-id-4736 4736)
|
||||
(text-id-4737 4737)
|
||||
(text-id-4738 4738)
|
||||
(text-id-4739 4739)
|
||||
(text-id-4740 4740)
|
||||
(text-id-4741 4741)
|
||||
(text-id-4742 4742)
|
||||
(text-id-4743 4743)
|
||||
(text-id-4744 4744)
|
||||
(text-id-4745 4745)
|
||||
(text-id-4746 4746)
|
||||
(text-id-4747 4747)
|
||||
(text-id-4748 4748)
|
||||
(text-id-4749 4749)
|
||||
(text-id-4750 4750)
|
||||
(text-id-4751 4751)
|
||||
(text-id-4752 4752)
|
||||
(text-id-4753 4753)
|
||||
(text-id-4754 4754)
|
||||
(text-id-4755 4755)
|
||||
(text-id-4756 4756)
|
||||
(text-id-4757 4757)
|
||||
(text-id-4758 4758)
|
||||
(text-id-4759 4759)
|
||||
(text-id-4760 4760)
|
||||
(text-id-4761 4761)
|
||||
(text-id-4762 4762)
|
||||
(text-id-4763 4763)
|
||||
(text-id-4764 4764)
|
||||
(text-id-4765 4765)
|
||||
(text-id-4766 4766)
|
||||
(text-id-4767 4767)
|
||||
(text-id-4768 4768)
|
||||
(text-id-4769 4769)
|
||||
(text-id-4770 4770)
|
||||
(text-id-4771 4771)
|
||||
(text-id-4772 4772)
|
||||
(text-id-4773 4773)
|
||||
(text-id-4774 4774)
|
||||
(text-id-4775 4775)
|
||||
(text-id-4776 4776)
|
||||
(text-id-4777 4777)
|
||||
(text-id-4778 4778)
|
||||
(text-id-4779 4779)
|
||||
(text-id-4780 4780)
|
||||
(text-id-4781 4781)
|
||||
(text-id-4782 4782)
|
||||
(text-id-4783 4783)
|
||||
(text-id-4784 4784)
|
||||
(text-id-4785 4785)
|
||||
(text-id-4786 4786)
|
||||
(text-id-4787 4787)
|
||||
(text-id-4788 4788)
|
||||
(text-id-4789 4789)
|
||||
(text-id-4790 4790)
|
||||
(text-id-4791 4791)
|
||||
(text-id-4792 4792)
|
||||
(text-id-4793 4793)
|
||||
(text-id-4794 4794)
|
||||
(text-id-4795 4795)
|
||||
(text-id-4796 4796)
|
||||
(text-id-4797 4797)
|
||||
(text-id-4798 4798)
|
||||
(text-id-4799 4799)
|
||||
(text-id-4800 4800)
|
||||
(text-id-4801 4801)
|
||||
(text-id-4802 4802)
|
||||
(text-id-4803 4803)
|
||||
(text-id-4804 4804)
|
||||
(text-id-4805 4805)
|
||||
(text-id-4806 4806)
|
||||
(text-id-4807 4807)
|
||||
(text-id-4808 4808)
|
||||
(text-id-4809 4809)
|
||||
(text-id-4810 4810)
|
||||
(text-id-4811 4811)
|
||||
)
|
||||
|
||||
;; ---text-id
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *stats-poly* #f)
|
||||
|
||||
(define *stats-memory* #f)
|
||||
|
||||
(define *stats-memory-short* #f)
|
||||
|
||||
(define *stats-memory-level-index* 0)
|
||||
|
||||
(define *stats-collide* #f)
|
||||
|
||||
(define *stats-bsp* #f)
|
||||
|
||||
(define *stats-buffer* #f)
|
||||
|
||||
(define *stats-target* #f)
|
||||
|
||||
(define *stats-profile-bars* #f)
|
||||
|
||||
(define *stats-perf* #f)
|
||||
|
||||
(define *stats-sound* #f)
|
||||
|
||||
(define *artist-all-visible* #f)
|
||||
|
||||
(define *artist-flip-visible* #f)
|
||||
|
||||
(define *artist-fix-visible* #f)
|
||||
|
||||
(define *artist-fix-frustum* #f)
|
||||
|
||||
(define *artist-error-spheres* #f)
|
||||
|
||||
(define *artist-use-menu-subdiv* #f)
|
||||
|
||||
(define *display-profile* #t)
|
||||
|
||||
(define *display-sidekick-stats* #f)
|
||||
|
||||
(define *display-quad-stats* #f)
|
||||
|
||||
(define *display-tri-stats* #f)
|
||||
|
||||
(define *display-ground-stats* #f)
|
||||
|
||||
(define *display-collision-marks* #f)
|
||||
|
||||
(define *display-collide-cache* #f)
|
||||
|
||||
(define *display-render-collision* #f)
|
||||
|
||||
(define *display-hipri-collision-marks* #f)
|
||||
|
||||
(define *display-edge-collision-marks* #f)
|
||||
|
||||
(define *display-geo-marks* #f)
|
||||
|
||||
(define *display-target-marks* #f)
|
||||
|
||||
(define *target-rc-board-controls* #f)
|
||||
|
||||
(define *display-collide-history* 0)
|
||||
|
||||
(define *amy-cam* #f)
|
||||
|
||||
(define *display-xyz-axes* #f)
|
||||
|
||||
(define *display-cam-collide-history* #f)
|
||||
|
||||
(define *record-cam-collide-history* #f)
|
||||
|
||||
(define *display-cam-master-marks* #f)
|
||||
|
||||
(define *display-cam-other* #f)
|
||||
|
||||
(define *display-camera-marks* #f)
|
||||
|
||||
(define *camera-no-mip-correction* #f)
|
||||
|
||||
(define *camera-turbo-free* #f)
|
||||
|
||||
(define *suppress-vehicle-respawn* (the-as object #f))
|
||||
|
||||
(define *display-cam-los-info* #f)
|
||||
|
||||
(define *display-cam-los-debug* #f)
|
||||
|
||||
(define *display-cam-los-marks* #f)
|
||||
|
||||
(define *display-cam-coll-marks* #f)
|
||||
|
||||
(define *display-camera-info* #f)
|
||||
|
||||
(define *display-camera-old-stats* #f)
|
||||
|
||||
(define *display-camera-last-attacker* #f)
|
||||
|
||||
(define *display-file-info* #f)
|
||||
|
||||
(define *display-actor-marks* #f)
|
||||
|
||||
(define *display-sprite-info* #f)
|
||||
|
||||
(define *display-sprite-marks* #f)
|
||||
|
||||
(define *display-sprite-spheres* #f)
|
||||
|
||||
(define *display-bsp-errors* #t)
|
||||
|
||||
(define *display-entity-errors* #t)
|
||||
|
||||
(define *display-capture-mode* #f)
|
||||
|
||||
(define *display-instance-info* #f)
|
||||
|
||||
(define *display-deci-count* #f)
|
||||
|
||||
(define *sync-dma* #f)
|
||||
|
||||
(define *display-strip-lines* (the-as strip-lines-controls 0))
|
||||
|
||||
(define *display-battle-marks* #f)
|
||||
|
||||
(define *display-joint-axes* #f)
|
||||
|
||||
(define *display-nav-marks* #f)
|
||||
|
||||
(define *display-nav-network* #f)
|
||||
|
||||
(define *display-path-marks* #f)
|
||||
|
||||
(define *display-vol-marks* #f)
|
||||
|
||||
(define *display-water-marks* #f)
|
||||
|
||||
(define *display-nav-mesh* #f)
|
||||
|
||||
(define *display-race-mesh* #f)
|
||||
|
||||
(define *display-ai-tuning* #f)
|
||||
|
||||
(define *display-actor-pointer* #f)
|
||||
|
||||
(define *display-actor-vis* #f)
|
||||
|
||||
(define *display-actor-graph* #f)
|
||||
|
||||
(define *display-traffic-height-map* #f)
|
||||
|
||||
(define *display-trail-graph* #f)
|
||||
|
||||
(define *display-color-bars* #f)
|
||||
|
||||
(define *display-bug-report* #f)
|
||||
|
||||
(define *display-level-border* #f)
|
||||
|
||||
(define *display-memcard-info* #f)
|
||||
|
||||
(define *display-split-boxes* #f)
|
||||
|
||||
(define *display-split-box-info* #f)
|
||||
|
||||
(define *display-texture-distances* #f)
|
||||
|
||||
(define *display-texture-download* #f)
|
||||
|
||||
(define *display-art-control* #f)
|
||||
|
||||
(define *display-gui-control* #f)
|
||||
|
||||
(define *display-level-spheres* #f)
|
||||
|
||||
(define *time-of-day-fast* #f)
|
||||
|
||||
(define *display-iop-info* #f)
|
||||
|
||||
(define *slow-frame-rate* #f)
|
||||
|
||||
(define *display-region-marks* #f)
|
||||
|
||||
(define *execute-regions* #t)
|
||||
|
||||
(define *disable-bot* #f)
|
||||
|
||||
(define *debug-reverb* #f)
|
||||
|
||||
(define *debug-whoosh* #f)
|
||||
|
||||
(define *debug-engine-sounds* #f)
|
||||
|
||||
(define *debug-pause* #f)
|
||||
|
||||
(define *debug-view-anims* #f)
|
||||
|
||||
(define *debug-unkillable* #f)
|
||||
|
||||
(define *debug-player-vehicle-unkillable* #f)
|
||||
|
||||
(define *debug-actor* (the-as process #f))
|
||||
|
||||
(define *debug-force-highspeed* #f)
|
||||
|
||||
(define *gun-marks* #f)
|
||||
|
||||
(define *debug-split-screen* #f)
|
||||
|
||||
(define *ignore-want-load-display* #f)
|
||||
|
||||
(define *bug-report-output-mode* (if *debug-segment*
|
||||
'file-stream
|
||||
'*stdcon*
|
||||
)
|
||||
)
|
||||
|
||||
(define *draw-debug-boxes* #f)
|
||||
|
||||
(define *hide-menus* #f)
|
||||
|
||||
(define *list-all-scenes* #f)
|
||||
|
||||
(define *display-scene-control* (the-as scene-controls 0))
|
||||
|
||||
(define *display-bot-marks* (the-as bot-marks-controls 0))
|
||||
|
||||
(define *display-race-marks* (the-as race-marks-controls 0))
|
||||
|
||||
(define *race-record-path* #f)
|
||||
|
||||
(define *select-race* (race-selection desrally-record))
|
||||
|
||||
(define *select-race-path* 0)
|
||||
|
||||
(define *bot-record-path* -1)
|
||||
|
||||
(define *subdivide-draw-mode* (the-as subdivide-setting 0))
|
||||
|
||||
(define *subdivide-scissor-draw-mode* (the-as subdivide-setting 0))
|
||||
|
||||
(define *subdivide-foreground-draw-mode* (the-as subdivide-setting 0))
|
||||
|
||||
(define *subdivide-ocean-draw-mode* (the-as subdivide-setting 0))
|
||||
|
||||
(define-perm *dproc* process #f)
|
||||
|
||||
(define *run* #f)
|
||||
|
||||
(define *teleport* #f)
|
||||
|
||||
(define *teleport-count* 0)
|
||||
|
||||
(define *draw-hook* nothing)
|
||||
|
||||
(define *debug-hook* '())
|
||||
|
||||
(define *menu-hook* (the-as (function debug-menu-context) nothing))
|
||||
|
||||
(define *progress-hook* nothing)
|
||||
|
||||
(define *dma-timeout-hook* nothing)
|
||||
|
||||
(deftype frame-stats (structure)
|
||||
((field-time time-frame 2)
|
||||
(field int32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *frame-stats* (new 'static 'frame-stats))
|
||||
|
||||
(deftype screen-filter (basic)
|
||||
((draw? symbol)
|
||||
(bucket bucket-id)
|
||||
(depth int32)
|
||||
(ztest uint64)
|
||||
(color vector :inline)
|
||||
(color-src vector :inline)
|
||||
(color-dest vector :inline)
|
||||
(extra vector :inline)
|
||||
(speed float :overlay-at (-> extra data 0))
|
||||
(current-interp float :overlay-at (-> extra data 1))
|
||||
(lock-vsync? symbol)
|
||||
(idx int32)
|
||||
(frames int32)
|
||||
)
|
||||
(:methods
|
||||
(screen-filter-method-9 () none)
|
||||
(screen-filter-method-10 () none)
|
||||
(screen-filter-method-11 () none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype col-rend (basic)
|
||||
((draw? symbol)
|
||||
(outline? symbol)
|
||||
(show-back-faces? symbol)
|
||||
(show-normals? symbol)
|
||||
(ghost-hidden? symbol)
|
||||
(show-only uint32)
|
||||
(show-only-mask uint32)
|
||||
(cspec collide-spec)
|
||||
(track uint8)
|
||||
(bbox-radius float)
|
||||
(bbox-center vector :inline)
|
||||
(camera-to-bbox-dist float)
|
||||
)
|
||||
(:methods
|
||||
(draw (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *col-rend* (new 'static 'col-rend
|
||||
:draw? #f
|
||||
:outline? #t
|
||||
:show-back-faces? #t
|
||||
:show-normals? #f
|
||||
:ghost-hidden? #t
|
||||
:cspec (collide-spec crate civilian enemy)
|
||||
:track #x1
|
||||
:bbox-radius 24576.0
|
||||
:camera-to-bbox-dist 65536.0
|
||||
)
|
||||
)
|
||||
|
||||
(defun-debug debug-actor? ((arg0 object))
|
||||
(= arg0 *debug-actor*)
|
||||
)
|
||||
|
||||
(define *record-fma* #f)
|
||||
|
||||
(define *record-fma-use-path* #f)
|
||||
|
||||
(define *record-fma-path-mode* #f)
|
||||
|
||||
(define *record-fma-path-high-res* #f)
|
||||
|
||||
(define *record-fma-path-dry-run* #f)
|
||||
|
||||
(define *record-fma-real* #f)
|
||||
|
||||
(define *record-fma-low-res* #f)
|
||||
|
||||
(define *record-fma-start* 0)
|
||||
|
||||
(define *record-fma-end* 0)
|
||||
|
||||
(define *record-fma-pal* #f)
|
||||
|
||||
(define *profile-slot* 0)
|
||||
|
||||
(define *game-mode* #f)
|
||||
|
||||
(define *lobby-local-players* 1)
|
||||
|
||||
(define *first-boot* #t)
|
||||
|
||||
(define *cheat-temp* (the-as (pointer int32) (malloc 'global 32)))
|
||||
|
||||
@@ -5,5 +5,91 @@
|
||||
;; name in dgo: penetrate-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++knocked-type
|
||||
(defenum knocked-type
|
||||
:type uint8
|
||||
(none 0)
|
||||
(mech-punch 1)
|
||||
(explode-or-darkjak 2)
|
||||
(dark-shot 3)
|
||||
(yellow-shot 4)
|
||||
(red-shot 5)
|
||||
(blue-shot 6)
|
||||
(vehicle 7)
|
||||
(knocked-off 8)
|
||||
)
|
||||
;; ---knocked-type
|
||||
|
||||
;; +++penetrate
|
||||
(defenum penetrate
|
||||
:type uint64
|
||||
:bitfield #t
|
||||
(touch 0)
|
||||
(generic-attack 1)
|
||||
(lunge 2)
|
||||
(flop 3)
|
||||
(punch 4)
|
||||
(spin 5)
|
||||
(roll 6)
|
||||
(uppercut 7)
|
||||
(bonk 8)
|
||||
(tube 9)
|
||||
(vehicle 10)
|
||||
(flut-attack 11)
|
||||
(board 12)
|
||||
(mech 13)
|
||||
(mech-punch 14)
|
||||
(mech-bonk 15)
|
||||
(dark-skin 16)
|
||||
(dark-punch 17)
|
||||
(dark-bomb 18)
|
||||
(dark-smack 19)
|
||||
(flut 20)
|
||||
(shield 21)
|
||||
(explode 22)
|
||||
(jak-yellow-shot 23)
|
||||
(jak-red-shot 24)
|
||||
(jak-blue-shot 25)
|
||||
(jak-dark-shot 26)
|
||||
(enemy-yellow-shot 27)
|
||||
(enemy-dark-shot 28)
|
||||
(eco-yellow 29)
|
||||
(eco-red 30)
|
||||
(eco-blue 31)
|
||||
(eco-green 32)
|
||||
(knocked 33)
|
||||
(jak-red-shockwave 34)
|
||||
(jak-dark-nuke 35)
|
||||
(jak-dark-blackhole 36)
|
||||
(emp-blast 37)
|
||||
(penetrate38 38)
|
||||
(penetrate39 39)
|
||||
(penetrate40 40)
|
||||
(penetrate41 41)
|
||||
(penetrate42 42)
|
||||
(penetrate43 43)
|
||||
(penetrate44 44)
|
||||
(penetrate45 45)
|
||||
(penetrate46 46)
|
||||
(penetrate47 47)
|
||||
(penetrate48 48)
|
||||
(penetrate49 49)
|
||||
(penetrate50 50)
|
||||
(penetrate51 51)
|
||||
(penetrate52 52)
|
||||
(penetrate53 53)
|
||||
(penetrate54 54)
|
||||
(penetrate55 55)
|
||||
(penetrate56 56)
|
||||
(penetrate57 57)
|
||||
(penetrate58 58)
|
||||
(penetrate59 59)
|
||||
(penetrate60 60)
|
||||
(penetrate61 61)
|
||||
(penetrate64 62)
|
||||
(penetrate63 63)
|
||||
)
|
||||
;; ---penetrate
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -5,5 +5,517 @@
|
||||
;; name in dgo: settings-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
(declare-type setting-control structure)
|
||||
(define-extern *setting-control* setting-control)
|
||||
|
||||
;; +++cam-master-options
|
||||
(defenum cam-master-options
|
||||
:type uint64
|
||||
:bitfield #t
|
||||
(HAVE_TARGET) ;; 1
|
||||
(SET_COMBINER_AXIS) ;; 2
|
||||
(FLIP_COMBINER) ;; 4
|
||||
(HAVE_EASE_TO_POS) ;; 8
|
||||
(IN_BASE_REGION) ;; 10
|
||||
(IGNORE_ANALOG) ;; 20
|
||||
(BLOCK_RIGHT_STICK) ;; 40
|
||||
(USE_L1_R1) ;; 80
|
||||
(READ_BUTTONS)
|
||||
(IMMEDIATE_STRING_MIN_MAX)
|
||||
)
|
||||
;; ---cam-master-options
|
||||
|
||||
|
||||
;; +++cam-slave-options
|
||||
(defenum cam-slave-options
|
||||
:type uint64
|
||||
:bitfield #t
|
||||
(BUTT_CAM)
|
||||
(SAME_SIDE)
|
||||
(MOVE_SPHERICAL)
|
||||
(ALLOW_Z_ROT)
|
||||
(JUMP_PITCHES)
|
||||
(COLLIDE)
|
||||
(FIND_HIDDEN_TARGET)
|
||||
(DRAG)
|
||||
(PLAYER_MOVING_CAMERA)
|
||||
(LINE_OF_SIGHT)
|
||||
(MOVEMENT_BLOCKED)
|
||||
(SHRINK_MAX_ANGLE)
|
||||
(GOTO_GOOD_POINT)
|
||||
(BIKE_MODE)
|
||||
(NO_ROTATE)
|
||||
(STICKY_ANGLE)
|
||||
(BLOCK_RIGHT_STICK)
|
||||
(ALLOW_SHIFT_BUTTONS)
|
||||
(GUN_CAM)
|
||||
(WIDE_FOV)
|
||||
(RAPID_TRACKING)
|
||||
(EASE_SPLINE_IDX)
|
||||
(VERTICAL_FOLLOW_MATCHES_CAMERA)
|
||||
(HAVE_BUTT_HANDLE)
|
||||
(BOMBBOT)
|
||||
(JUMP_LAG)
|
||||
)
|
||||
;; ---cam-slave-options
|
||||
|
||||
|
||||
;; +++game-feature
|
||||
(defenum game-feature
|
||||
:type uint64
|
||||
:bitfield #t
|
||||
(feature0 0)
|
||||
(feature1 1)
|
||||
(feature2 2)
|
||||
(feature3 3)
|
||||
(feature4 4)
|
||||
(gun 5)
|
||||
(gun-red-1 6)
|
||||
(gun-red-2 7)
|
||||
(gun-red-3 8)
|
||||
(gun-yellow-1 9)
|
||||
(gun-yellow-2 10)
|
||||
(gun-yellow-3 11)
|
||||
(gun-blue-1 12)
|
||||
(gun-blue-2 13)
|
||||
(gun-blue-3 14)
|
||||
(gun-dark-1 15)
|
||||
(gun-dark-2 16)
|
||||
(gun-dark-3 17)
|
||||
(board 18)
|
||||
(feature19 19)
|
||||
(sidekick 20)
|
||||
(feature21 21)
|
||||
(feature22 22)
|
||||
(gun-upgrade-yellow-ammo-1 23)
|
||||
(gun-upgrade-yellow-ammo-2 24)
|
||||
(gun-upgrade-red-ammo-1 25)
|
||||
(gun-upgrade-red-ammo-2 26)
|
||||
(gun-upgrade-blue-ammo-1 27)
|
||||
(gun-upgrade-blue-ammo-2 28)
|
||||
(gun-upgrade-dark-ammo-1 29)
|
||||
(gun-upgrade-dark-ammo-2 30)
|
||||
(feature31 31)
|
||||
(feature32 32)
|
||||
(feature33 33)
|
||||
(feature34 34)
|
||||
(feature35 35)
|
||||
(feature36 36)
|
||||
(board-launch 37)
|
||||
(board-trail 38)
|
||||
(board-zap 39)
|
||||
(darkjak 40)
|
||||
(darkjak-smack 41)
|
||||
(darkjak-bomb0 42)
|
||||
(darkjak-bomb1 43)
|
||||
(darkjak-tracking 44)
|
||||
(darkjak-invinc 45)
|
||||
(lightjak 46)
|
||||
(lightjak-regen 47)
|
||||
(lightjak-swoop 48)
|
||||
(lightjak-freeze 49)
|
||||
(lightjak-shield 50)
|
||||
(artifact-invis 51)
|
||||
(armor0 52)
|
||||
(armor1 53)
|
||||
(armor2 54)
|
||||
(armor3 55)
|
||||
(jakc 56)
|
||||
(lighteco 57)
|
||||
(darkeco 58)
|
||||
(feature59 59)
|
||||
(feature60 60)
|
||||
(feature61 61)
|
||||
(feature62 62)
|
||||
(feature63 63)
|
||||
)
|
||||
;; ---game-feature
|
||||
|
||||
|
||||
;; +++game-secrets
|
||||
(defenum game-secrets
|
||||
:type uint64
|
||||
:bitfield #t
|
||||
(hero-mode 0)
|
||||
)
|
||||
;; ---game-secrets
|
||||
|
||||
(defmacro setting-control-func! (func s &rest args)
|
||||
(let ((argb #f)
|
||||
(argi 0)
|
||||
(argf 0.0)
|
||||
(setting (car s)))
|
||||
(cond
|
||||
(#t
|
||||
(set! argb (car args))
|
||||
(set! argf (cadr args))
|
||||
(set! argi (caddr args))
|
||||
)
|
||||
)
|
||||
`(,func *setting-control* (with-pp pp) ,s ,argb ,argf ,argi)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro add-setting! (s &rest args)
|
||||
`(setting-control-func! add-setting ,s ,@args)
|
||||
)
|
||||
(defmacro set-setting! (s &rest args)
|
||||
`(setting-control-func! set-setting ,s ,@args)
|
||||
)
|
||||
(defmacro remove-setting! (s)
|
||||
`(remove-setting *setting-control* (with-pp pp) ,s)
|
||||
)
|
||||
|
||||
;; +++game-score
|
||||
(defenum game-score
|
||||
:type uint64
|
||||
(none)
|
||||
(gs0)
|
||||
(gs1)
|
||||
(gs2)
|
||||
(gs3)
|
||||
(gs4)
|
||||
(gs5)
|
||||
(gs6)
|
||||
(gs7)
|
||||
(gs8)
|
||||
(gs9)
|
||||
(gs10)
|
||||
(gs11)
|
||||
(gs12)
|
||||
(gs13)
|
||||
(gs14)
|
||||
(gs15)
|
||||
(gs16)
|
||||
(gs17)
|
||||
(gs18)
|
||||
(gs19)
|
||||
(gs20)
|
||||
)
|
||||
;; ---game-score
|
||||
|
||||
|
||||
;; +++game-vehicles
|
||||
(defenum game-vehicles
|
||||
:type uint64
|
||||
:bitfield #t
|
||||
(v-turtle 0)
|
||||
(v-snake 1)
|
||||
(v-scorpion 2)
|
||||
(v-toad 3)
|
||||
(v-fox 4)
|
||||
(v-rhino 5)
|
||||
(v-mirage 6)
|
||||
(v-x-ride 7)
|
||||
)
|
||||
;; ---game-vehicles
|
||||
|
||||
|
||||
(declare-type resetter-spec structure)
|
||||
|
||||
;; +++game-vehicle-u8
|
||||
(defenum game-vehicle-u8
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
:copy-entries game-vehicles
|
||||
)
|
||||
;; ---game-vehicle-u8
|
||||
|
||||
(defmacro language? (&rest langs)
|
||||
"is the current language any of the ones specified?"
|
||||
`(or ,@(apply (lambda (x) `(= (-> *setting-control* user-default language) (language-enum ,x))) langs)))
|
||||
|
||||
(defmacro text-language? (&rest langs)
|
||||
"is the current language any of the ones specified?"
|
||||
`(or ,@(apply (lambda (x) `(= (-> *pc-settings* text-language) (pc-language ,x))) langs)))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *settings-dialog-volume* 0.95)
|
||||
|
||||
(define *settings-music-volume* 0.7)
|
||||
|
||||
(define *settings-sfx-volume* 0.75)
|
||||
|
||||
(define *settings-music-seek-speed* 2.0)
|
||||
|
||||
(deftype user-setting-data (structure)
|
||||
((border-mode symbol)
|
||||
(process-mask process-mask)
|
||||
(common-page int32)
|
||||
(language language-enum)
|
||||
(unknown-usd-1 int32)
|
||||
(unknown-usd-2 int32)
|
||||
(unknown-usd-3 int32)
|
||||
(unknown-usd-4 int32)
|
||||
(movie (pointer process))
|
||||
(talking (pointer process))
|
||||
(spooling (pointer process))
|
||||
(hint (pointer process))
|
||||
(ambient (pointer process))
|
||||
(video-mode symbol)
|
||||
(aspect-ratio symbol)
|
||||
(unknown-usd-5 int32)
|
||||
(unknown-usd-6 int32)
|
||||
(unknown-usd-7 int32)
|
||||
(auto-save symbol)
|
||||
(unknown-usd-8 int32)
|
||||
(bg-r float)
|
||||
(bg-g float)
|
||||
(bg-b float)
|
||||
(bg-a float)
|
||||
(bg-a-speed float)
|
||||
(bg-a-force float)
|
||||
(blur-a float)
|
||||
(blur-a-speed float)
|
||||
(allow-progress symbol)
|
||||
(allow-in-game-menu basic)
|
||||
(allow-pause symbol)
|
||||
(unknown-usd-9 int32)
|
||||
(unknown-usd-10 int32)
|
||||
(unknown-usd-11 int32)
|
||||
(movie-name symbol)
|
||||
(weather symbol)
|
||||
(unknown-usd-12 int32)
|
||||
(unknown-usd-13 int32)
|
||||
(unknown-usd-14 int32)
|
||||
(task-mask task-mask)
|
||||
(unknown-usd-15 int32)
|
||||
(speed-mult float)
|
||||
(features uint64)
|
||||
(vehicles uint64)
|
||||
(sfx-volume float)
|
||||
(sfx-volume-movie float)
|
||||
(music-volume float)
|
||||
(music-volume-movie float)
|
||||
(dialog-volume float)
|
||||
(dialog-volume-talker float)
|
||||
(ambient-volume float)
|
||||
(ambient-volume-movie float)
|
||||
(dynamic-ambient-volume float)
|
||||
(talker-volume float)
|
||||
(mode-sound-bank uint32)
|
||||
(sound-reverb float)
|
||||
(sound-reverb-mode int32)
|
||||
(sound-reverb-seek-speed float)
|
||||
(stereo-mode int32)
|
||||
(music symbol)
|
||||
(spool-anim spool-anim)
|
||||
(task-manager (pointer process))
|
||||
(task symbol)
|
||||
(airlock symbol)
|
||||
(minimap uint32)
|
||||
(allow-continue symbol)
|
||||
(unknown-usd-16 int32)
|
||||
(unknown-usd-17 int32)
|
||||
(subtitle symbol)
|
||||
(doorway symbol)
|
||||
(gem symbol)
|
||||
(half-speed symbol)
|
||||
(gun-buoy symbol)
|
||||
(double-jump symbol)
|
||||
(pilot symbol)
|
||||
(pilot-exit symbol)
|
||||
(pilot-death symbol)
|
||||
(speech-control symbol)
|
||||
(vehicle-hijacking symbol)
|
||||
(endlessfall symbol)
|
||||
(rain float)
|
||||
(snow float)
|
||||
(exclusive-load symbol)
|
||||
(render symbol)
|
||||
(allow-timeout symbol)
|
||||
(mirror symbol)
|
||||
(movie-skip-frame float)
|
||||
(allow-blackout symbol)
|
||||
(race-minimap int32)
|
||||
(beard symbol)
|
||||
(ignore-target symbol)
|
||||
(subtitle-language uint8)
|
||||
(sound-bank-load symbol)
|
||||
(allow-error symbol)
|
||||
(under-water-pitch-mod float)
|
||||
(unknown-usd-18 int32)
|
||||
(restart-info resetter-spec)
|
||||
(fail-info resetter-spec)
|
||||
(death-info resetter-spec)
|
||||
(quit-info resetter-spec)
|
||||
(extra-bank-count uint32)
|
||||
(extra-bank pair 3)
|
||||
(borrow-count uint32)
|
||||
(borrow pair 3)
|
||||
(exclusive-task-count uint32)
|
||||
(exclusive-task int32 3)
|
||||
(level-trans-time int32)
|
||||
(unknown-usd-19 int32)
|
||||
(unknown-usd-20 int32)
|
||||
(unknown-usd-21 int32)
|
||||
(unknown-usd-22 int32)
|
||||
(unknown-usd-23 int32)
|
||||
(letterbox float)
|
||||
(letterbox-speed float)
|
||||
(unknown-usd-24 int32)
|
||||
(unknown-usd-25 int32)
|
||||
(unknown-usd-26 int32)
|
||||
(unknown-usd-27 int32)
|
||||
(unknown-usd-28 int32)
|
||||
(unknown-usd-29 int32)
|
||||
(unknown-usd-30 int32)
|
||||
(unknown-usd-31 int32)
|
||||
(unknown-usd-32 int32)
|
||||
(borrow-city-count uint32)
|
||||
(borrow-city pair 3)
|
||||
(unknown-usd-33 int32 28)
|
||||
(audio-language uint8)
|
||||
(unknown-usd-34 int32 11)
|
||||
(special-volume float)
|
||||
(unknown-usd-35 int32 17)
|
||||
)
|
||||
(:methods
|
||||
(user-setting-data-method-9 () none)
|
||||
(user-setting-data-method-10 () none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype cam-setting-data (structure)
|
||||
((fov degrees)
|
||||
(pov-handle uint64 :offset 16)
|
||||
(pov-bone int32)
|
||||
(pov-offset vector :inline)
|
||||
(string-default symbol)
|
||||
(string-max-length meters)
|
||||
(string-min-length meters)
|
||||
(string-max-height meters)
|
||||
(string-min-height meters)
|
||||
(string-cliff-height meters)
|
||||
(string-camera-floor meters)
|
||||
(string-camera-ceiling meters)
|
||||
(gun-max-height meters)
|
||||
(gun-min-height meters)
|
||||
(string-local-down vector :inline)
|
||||
(slave-options cam-slave-options)
|
||||
(matrix-blend-max-angle degrees)
|
||||
(matrix-blend-max-partial float)
|
||||
(string-spline-max-move meters)
|
||||
(string-spline-accel meters)
|
||||
(string-spline-max-move-player meters)
|
||||
(string-spline-accel-player meters)
|
||||
(string-startup-vector vector :inline)
|
||||
(use-string-startup-vector symbol)
|
||||
(look-at-point vector :inline)
|
||||
(use-look-at-point symbol)
|
||||
(target-height meters)
|
||||
(foot-offset meters)
|
||||
(head-offset meters)
|
||||
(teleport-on-entity-change symbol)
|
||||
(entity-name string)
|
||||
(cam-slope string)
|
||||
(entity-or-mode-changed symbol)
|
||||
(master-options cam-master-options)
|
||||
(entity-mask uint32)
|
||||
(mode-name symbol)
|
||||
(real-entity-name string)
|
||||
(cam-mode symbol)
|
||||
(interp-time uint32)
|
||||
(no-intro symbol)
|
||||
(use-point-of-interest symbol)
|
||||
(point-of-interest vector :inline)
|
||||
(handle-of-interest uint64)
|
||||
(mouse-tumble-point vector :inline)
|
||||
(use-mouse-tumble-point symbol)
|
||||
(mouse-input symbol)
|
||||
(cpad1-skip-buttons symbol)
|
||||
(butt-handle uint64)
|
||||
(butt-angle float)
|
||||
(extra-follow-height float)
|
||||
(interp-time-priority uint32)
|
||||
(string-max-length-default symbol)
|
||||
(string-min-length-default symbol)
|
||||
(string-max-height-default symbol)
|
||||
(string-min-height-default symbol)
|
||||
(flip-vertical symbol)
|
||||
(flip-horizontal symbol)
|
||||
(dummy object 1)
|
||||
(fov-priority float)
|
||||
(ocean-off basic)
|
||||
(ocean-override basic)
|
||||
(crash-cam-force-freeze basic)
|
||||
)
|
||||
(:methods
|
||||
(cam-setting-data-method-9 () none)
|
||||
(cam-setting-data-method-10 () none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype cam-setting-state (structure)
|
||||
((current cam-setting-data :inline)
|
||||
(target cam-setting-data :inline)
|
||||
(default cam-setting-data :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype engine-group (structure)
|
||||
((engine basic)
|
||||
(engine-pers basic)
|
||||
(engine-hi basic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype setting-control (basic)
|
||||
((user-current user-setting-data :inline)
|
||||
(user-target user-setting-data :inline)
|
||||
(user-default user-setting-data :inline)
|
||||
(cam-settings cam-setting-state 4 :inline)
|
||||
(engine engine)
|
||||
(engine-pers engine-pers)
|
||||
(engine-hi engine)
|
||||
(cam-engines engine-group 4)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type int) _type_)
|
||||
(setting-control-method-9 () none)
|
||||
(setting-control-method-10 () none)
|
||||
(setting-control-method-11 () none)
|
||||
(setting-control-method-12 () none)
|
||||
(setting-control-method-13 () none)
|
||||
(setting-control-method-14 () none)
|
||||
(setting-control-method-15 () none)
|
||||
(setting-control-method-16 () none)
|
||||
(setting-control-method-17 () none)
|
||||
(setting-control-method-18 () none)
|
||||
(setting-control-method-19 () none)
|
||||
(setting-control-method-20 () none)
|
||||
(setting-control-method-21 () none)
|
||||
(setting-control-method-22 () none)
|
||||
(setting-control-method-23 () none)
|
||||
(setting-control-method-24 () none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod new setting-control ((allocation symbol) (type-to-make type) (arg0 int))
|
||||
(let ((s4-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(set! (-> s4-0 engine) ((method-of-type engine new) allocation engine 'setting-control arg0 connection))
|
||||
(set! (-> s4-0 engine-hi) ((method-of-type engine new) allocation engine 'setting-control arg0 connection))
|
||||
(set! (-> s4-0 engine-pers)
|
||||
((method-of-type engine-pers new) allocation engine-pers 'setting-control arg0 connection-pers)
|
||||
)
|
||||
(dotimes (s3-0 4)
|
||||
(set! (-> s4-0 cam-engines s3-0) (new 'global 'engine-group))
|
||||
(set! (-> s4-0 cam-engines s3-0 engine)
|
||||
((method-of-type engine new) allocation engine 'setting-control arg0 connection)
|
||||
)
|
||||
(set! (-> s4-0 cam-engines s3-0 engine-hi)
|
||||
((method-of-type engine new) allocation engine 'setting-control arg0 connection)
|
||||
)
|
||||
(set! (-> s4-0 cam-engines s3-0 engine-pers)
|
||||
((method-of-type engine-pers new) allocation engine-pers 'setting-control arg0 connection-pers)
|
||||
)
|
||||
)
|
||||
s4-0
|
||||
)
|
||||
)
|
||||
|
||||
@@ -5,5 +5,552 @@
|
||||
;; name in dgo: game-task-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
|
||||
;; +++game-task
|
||||
(defenum game-task
|
||||
:type uint8
|
||||
:bitfield #f
|
||||
(unknown -1)
|
||||
)
|
||||
;; ---game-task
|
||||
|
||||
;; +++game-task-node
|
||||
(defenum game-task-node
|
||||
:type uint16
|
||||
(none)
|
||||
)
|
||||
;; ---game-task-node
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(define *net-play-mode-names* (new 'static 'boxed-array :type symbol
|
||||
'race
|
||||
'deathrace
|
||||
'timebox
|
||||
'timetrial
|
||||
'deathmatch
|
||||
'hunt
|
||||
'collect
|
||||
'ctf
|
||||
'reversi
|
||||
'team-deathmatch
|
||||
'football
|
||||
'artifact
|
||||
'king-of-hill
|
||||
'rushhour
|
||||
'assassin
|
||||
'training
|
||||
'training2
|
||||
'boss-battle
|
||||
'artist
|
||||
'invalid
|
||||
'intro-b
|
||||
)
|
||||
)
|
||||
|
||||
(define *net-play-mode-text-ids* (new 'static 'array text-id 24
|
||||
(text-id text-id-1581)
|
||||
(text-id text-id-1588)
|
||||
(text-id text-id-1655)
|
||||
(text-id text-id-2183)
|
||||
(text-id text-id-1580)
|
||||
(text-id text-id-1579)
|
||||
(text-id text-id-1838)
|
||||
(text-id text-id-1694)
|
||||
(text-id text-id-1839)
|
||||
(text-id text-id-1695)
|
||||
(text-id text-id-1624)
|
||||
(text-id text-id-1625)
|
||||
(text-id text-id-1633)
|
||||
(text-id text-id-1656)
|
||||
(text-id text-id-2513)
|
||||
(text-id text-id-1659)
|
||||
(text-id text-id-1659)
|
||||
(text-id text-id-1940)
|
||||
(text-id null)
|
||||
(text-id null)
|
||||
(text-id null)
|
||||
(text-id null)
|
||||
(text-id null)
|
||||
(text-id null)
|
||||
)
|
||||
)
|
||||
|
||||
(define *net-play-mode-icon-string* (new 'static 'boxed-array :type string
|
||||
"amode-icon-crace-01"
|
||||
"amode-icon-drace-01"
|
||||
"amode-icon-ttrial-01"
|
||||
"amode-icon-ttrial-01"
|
||||
"amode-icon-dmatch-01"
|
||||
"amode-icon-shunt-01"
|
||||
"common-white"
|
||||
"amode-icon-cflag-01"
|
||||
"common-white"
|
||||
"common-white"
|
||||
"amode-icon-derby-01"
|
||||
"amode-icon-arace-01"
|
||||
"common-white"
|
||||
"amode-icon-rhour-01"
|
||||
"common-white"
|
||||
"common-white"
|
||||
"common-white"
|
||||
"common-white"
|
||||
"common-white"
|
||||
"common-white"
|
||||
)
|
||||
)
|
||||
|
||||
(deftype task-level-info (structure)
|
||||
((flags uint32)
|
||||
(text-id uint32)
|
||||
(venue-text-id uint32)
|
||||
(caps-text-id uint32)
|
||||
(tex-name basic)
|
||||
(race-mesh-name basic)
|
||||
(race-banner-name basic)
|
||||
(race-ai-tuning-name basic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *task-level* (new 'static 'boxed-array :type symbol
|
||||
'default
|
||||
'brdroom
|
||||
'jungle
|
||||
'snow
|
||||
'kras
|
||||
'canyon
|
||||
'canspar
|
||||
'temple
|
||||
'spartem
|
||||
'haven
|
||||
'havjung
|
||||
'havsew
|
||||
'havtour
|
||||
'ice
|
||||
'sewer
|
||||
'coliseum
|
||||
'desarena
|
||||
'snobowl
|
||||
'cliffs
|
||||
'spargus
|
||||
'spatour
|
||||
'docks
|
||||
'dockkra
|
||||
'dromdoc
|
||||
'kcross
|
||||
'peak
|
||||
'iceberg
|
||||
'icepass
|
||||
'drome
|
||||
'kratour
|
||||
'icetour
|
||||
'desisle
|
||||
'atoll
|
||||
'fort
|
||||
'garage
|
||||
'hiphog
|
||||
'eight
|
||||
'eightb
|
||||
'rustyh
|
||||
'curve
|
||||
'andrew
|
||||
'ben
|
||||
'test
|
||||
'city
|
||||
'artist
|
||||
)
|
||||
)
|
||||
|
||||
(define *task-level-info* (new 'static 'boxed-array :type task-level-info
|
||||
(new 'static 'task-level-info
|
||||
:tex-name "common-white"
|
||||
:race-mesh-name ""
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name ""
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:tex-name "common-white"
|
||||
:race-mesh-name ""
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name ""
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x55f
|
||||
:venue-text-id #xf10
|
||||
:caps-text-id #x631
|
||||
:tex-name "icon-jungle"
|
||||
:race-mesh-name "race-mesh-25"
|
||||
:race-banner-name "race-banner-4"
|
||||
:race-ai-tuning-name "*jungle-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x54f
|
||||
:venue-text-id #xf20
|
||||
:caps-text-id #x633
|
||||
:tex-name "icon-snow"
|
||||
:race-mesh-name "race-mesh-26"
|
||||
:race-banner-name "race-banner-2"
|
||||
:race-ai-tuning-name "*snow-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x550
|
||||
:venue-text-id #xf08
|
||||
:caps-text-id #x632
|
||||
:tex-name "icon-kras"
|
||||
:race-mesh-name "race-mesh-22"
|
||||
:race-banner-name "race-banner-3"
|
||||
:race-ai-tuning-name "*kras-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x5e9
|
||||
:venue-text-id #xf19
|
||||
:caps-text-id #x70e
|
||||
:tex-name "icon-canyon"
|
||||
:race-mesh-name "race-mesh-41"
|
||||
:race-banner-name "race-banner-12"
|
||||
:race-ai-tuning-name "*canyon-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x76b
|
||||
:venue-text-id #xf1b
|
||||
:caps-text-id #x730
|
||||
:tex-name "icon-canspar"
|
||||
:race-mesh-name "race-mesh-42"
|
||||
:race-banner-name "race-banner-9"
|
||||
:race-ai-tuning-name "*canspar-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x7a1
|
||||
:venue-text-id #xf1a
|
||||
:caps-text-id #x7a5
|
||||
:tex-name "icon-temple"
|
||||
:race-mesh-name "race-mesh-55"
|
||||
:race-banner-name "race-banner-20"
|
||||
:race-ai-tuning-name "*temple-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x92e
|
||||
:venue-text-id #xf1d
|
||||
:caps-text-id #x793
|
||||
:tex-name "icon-spartem"
|
||||
:race-mesh-name "race-mesh-56"
|
||||
:race-banner-name "race-banner-21"
|
||||
:race-ai-tuning-name "*spartem-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x5ae
|
||||
:venue-text-id #xf11
|
||||
:caps-text-id #x674
|
||||
:tex-name "icon-haven"
|
||||
:race-mesh-name "race-mesh-27"
|
||||
:race-banner-name "race-banner-5"
|
||||
:race-ai-tuning-name "*haven-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x673
|
||||
:venue-text-id #xf13
|
||||
:caps-text-id #x676
|
||||
:tex-name "icon-havjung"
|
||||
:race-mesh-name "race-mesh-31"
|
||||
:race-banner-name "race-banner-6"
|
||||
:race-ai-tuning-name "*havjung-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x74b
|
||||
:venue-text-id #xf14
|
||||
:caps-text-id #x731
|
||||
:tex-name "icon-havsew"
|
||||
:race-mesh-name "race-mesh-40"
|
||||
:race-banner-name "race-banner-8"
|
||||
:race-ai-tuning-name "*havsew-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x7ea
|
||||
:venue-text-id #xf15
|
||||
:caps-text-id #x732
|
||||
:tex-name "icon-havtour"
|
||||
:race-mesh-name "race-mesh-50"
|
||||
:race-banner-name "race-banner-10"
|
||||
:race-ai-tuning-name "*havtour-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x9e8
|
||||
:venue-text-id #xf22
|
||||
:caps-text-id #x733
|
||||
:tex-name "icon-ice"
|
||||
:race-mesh-name "race-mesh-66"
|
||||
:race-banner-name "race-banner-18"
|
||||
:race-ai-tuning-name "*ice-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x11c
|
||||
:venue-text-id #xf12
|
||||
:caps-text-id #x734
|
||||
:tex-name "icon-sewer"
|
||||
:race-mesh-name "race-mesh-37"
|
||||
:race-banner-name "race-banner-11"
|
||||
:race-ai-tuning-name "*sewer-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x561
|
||||
:venue-text-id #xf0e
|
||||
:caps-text-id #x630
|
||||
:tex-name "icon-coliseum"
|
||||
:race-mesh-name ""
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name ""
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x562
|
||||
:venue-text-id #xf1e
|
||||
:caps-text-id #x62f
|
||||
:tex-name "icon-desert"
|
||||
:race-mesh-name ""
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name ""
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x5af
|
||||
:venue-text-id #xf26
|
||||
:caps-text-id #x675
|
||||
:tex-name "icon-snobowl"
|
||||
:race-mesh-name ""
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name ""
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x560
|
||||
:venue-text-id #xf17
|
||||
:caps-text-id #x62e
|
||||
:tex-name "icon-cliffs"
|
||||
:race-mesh-name ""
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name ""
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x74c
|
||||
:venue-text-id #xf18
|
||||
:caps-text-id #x735
|
||||
:tex-name "icon-spargus"
|
||||
:race-mesh-name "race-mesh-38"
|
||||
:race-banner-name "race-banner-7"
|
||||
:race-ai-tuning-name "*spargus-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x79f
|
||||
:venue-text-id #xf1c
|
||||
:caps-text-id #x7a6
|
||||
:tex-name "icon-spatour"
|
||||
:race-mesh-name "race-mesh-79"
|
||||
:race-banner-name "race-banner-15"
|
||||
:race-ai-tuning-name "*spatour-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x5e8
|
||||
:venue-text-id #xf09
|
||||
:caps-text-id #x736
|
||||
:tex-name "icon-docks"
|
||||
:race-mesh-name "race-mesh-44"
|
||||
:race-banner-name "race-banner-13"
|
||||
:race-ai-tuning-name "*docks-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x8d0
|
||||
:venue-text-id #xf0b
|
||||
:caps-text-id #x737
|
||||
:tex-name "icon-dockkra"
|
||||
:race-mesh-name "race-mesh-45"
|
||||
:race-banner-name "race-banner-14"
|
||||
:race-ai-tuning-name "*dockkra-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x7a2
|
||||
:venue-text-id #xf0c
|
||||
:caps-text-id #x7a9
|
||||
:tex-name "icon-dromdoc"
|
||||
:race-mesh-name "race-mesh-73"
|
||||
:race-banner-name "race-banner-19"
|
||||
:race-ai-tuning-name "*dromdoc-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x6fe
|
||||
:venue-text-id #xf0f
|
||||
:caps-text-id #x6ff
|
||||
:tex-name "icon-kcross"
|
||||
:race-mesh-name ""
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name ""
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x977
|
||||
:venue-text-id #xf21
|
||||
:caps-text-id #x738
|
||||
:tex-name "icon-peak"
|
||||
:race-mesh-name "race-mesh-69"
|
||||
:race-banner-name "race-banner-23"
|
||||
:race-ai-tuning-name "*peak-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x9e9
|
||||
:venue-text-id #xf23
|
||||
:caps-text-id #x792
|
||||
:tex-name "icon-iceberg"
|
||||
:race-mesh-name "race-mesh-64"
|
||||
:race-banner-name "race-banner-22"
|
||||
:race-ai-tuning-name "*iceberg-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x9ea
|
||||
:venue-text-id #xf24
|
||||
:caps-text-id #x791
|
||||
:tex-name "icon-icepass"
|
||||
:race-mesh-name "race-mesh-63"
|
||||
:race-banner-name "race-banner-25"
|
||||
:race-ai-tuning-name "*icepass-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x9ed
|
||||
:venue-text-id #xf0a
|
||||
:caps-text-id #x75b
|
||||
:tex-name "icon-drome"
|
||||
:race-mesh-name "race-mesh-72"
|
||||
:race-banner-name "race-banner-16"
|
||||
:race-ai-tuning-name "*drome-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x7a3
|
||||
:venue-text-id #xf0d
|
||||
:caps-text-id #x7a7
|
||||
:tex-name "icon-kratour"
|
||||
:race-mesh-name "race-mesh-76"
|
||||
:race-banner-name "race-banner-24"
|
||||
:race-ai-tuning-name "*kratour-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x7a0
|
||||
:venue-text-id #xf25
|
||||
:caps-text-id #x7a4
|
||||
:tex-name "icon-icetour"
|
||||
:race-mesh-name "race-mesh-84"
|
||||
:race-banner-name "race-banner-26"
|
||||
:race-ai-tuning-name "*icetour-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x9e7
|
||||
:venue-text-id #xf1f
|
||||
:caps-text-id #x739
|
||||
:tex-name "icon-desisle"
|
||||
:race-mesh-name ""
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name ""
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x11b
|
||||
:venue-text-id #xf16
|
||||
:caps-text-id #x7a8
|
||||
:tex-name "icon-atoll"
|
||||
:race-mesh-name ""
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name ""
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:text-id #x9eb
|
||||
:caps-text-id #x9ec
|
||||
:tex-name "common-white"
|
||||
:race-mesh-name ""
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name ""
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:tex-name "common-white"
|
||||
:race-mesh-name ""
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name ""
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:tex-name "common-white"
|
||||
:race-mesh-name ""
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name ""
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:tex-name "common-white"
|
||||
:race-mesh-name ""
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name ""
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:tex-name "common-white"
|
||||
:race-mesh-name "race-mesh-1"
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name "*generic-ai-tuning*"
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:tex-name "common-white"
|
||||
:race-mesh-name ""
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name ""
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:tex-name "common-white"
|
||||
:race-mesh-name ""
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name ""
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:tex-name "common-white"
|
||||
:race-mesh-name ""
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name ""
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:tex-name "common-white"
|
||||
:race-mesh-name ""
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name ""
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:tex-name "common-white"
|
||||
:race-mesh-name ""
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name ""
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:tex-name "common-white"
|
||||
:race-mesh-name ""
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name ""
|
||||
)
|
||||
(new 'static 'task-level-info
|
||||
:tex-name "common-white"
|
||||
:race-mesh-name ""
|
||||
:race-banner-name ""
|
||||
:race-ai-tuning-name ""
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define *driver-list-cup1* (new 'static 'boxed-array :type uint8 #xb #xa #x1 #x5 #x7 #x9 #x6))
|
||||
|
||||
(define *driver-list-cup1-gp* (new 'static 'boxed-array :type uint8 #xb #xa #x1 #x5 #x7))
|
||||
|
||||
(define *driver-list-cup1-temp* (new 'static 'boxed-array :type uint8 #x1 #x5 #xa #x9 #x6))
|
||||
|
||||
(define *driver-list-cup2* (new 'static 'boxed-array :type uint8 #x3))
|
||||
|
||||
(define *driver-list-cup2-gp* (new 'static 'boxed-array :type uint8 #x3 #x1 #xb #xa #x7))
|
||||
|
||||
(define *driver-list-cup3* (new 'static 'boxed-array :type uint8 #x2 #xd))
|
||||
|
||||
(define *driver-list-cup3-capture* (new 'static 'boxed-array :type uint8 #xb #x1 #x3 #xa #x7))
|
||||
|
||||
(define *driver-list-cup3-gp* (new 'static 'boxed-array :type uint8 #x2 #xb #xd #x3 #xa))
|
||||
|
||||
(define *driver-list-cup4-capture* (new 'static 'boxed-array :type uint8 #xb #x1 #x2 #xa #x7))
|
||||
|
||||
(define *driver-list-cup4-gp* (new 'static 'boxed-array :type uint8 #x13 #x2 #xb #x3 #x4))
|
||||
|
||||
(define *driver-list-boss* (new 'static 'boxed-array :type uint8 #x13))
|
||||
|
||||
(define *driver-list-training* (new 'static 'boxed-array :type uint8 #x5 #x6 #x7 #xb))
|
||||
|
||||
@@ -7,3 +7,53 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype bounding-box (structure)
|
||||
((min vector :inline)
|
||||
(max vector :inline)
|
||||
)
|
||||
(:methods
|
||||
(add-spheres! (_type_ (inline-array sphere) int) int)
|
||||
(add-box! (_type_ bounding-box) int)
|
||||
(add-point! (_type_ vector) none)
|
||||
(intersects-line-segment? (_type_ vector vector) symbol)
|
||||
(set-from-point-offset! (_type_ vector vector) none)
|
||||
(set-from-point-offset-pad! (_type_ vector vector float) int)
|
||||
(set-to-point! (_type_ vector) none)
|
||||
(set-from-sphere! (_type_ sphere) none)
|
||||
(set-from-spheres! (_type_ (inline-array sphere) int) int)
|
||||
(get-bounding-sphere (_type_ vector) vector)
|
||||
(inside-xyz? (_type_ vector) symbol)
|
||||
(inside-xz? (_type_ vector) symbol)
|
||||
(bounding-box-method-21 (_type_ (inline-array vector)) symbol)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bounding-box2 (structure)
|
||||
((min vector2 :inline)
|
||||
(max vector2 :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bounding-box4w (structure)
|
||||
((min vector4w :inline)
|
||||
(max vector4w :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bounding-box-both (structure)
|
||||
((box bounding-box :inline)
|
||||
(box4w bounding-box4w :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bounding-box-array (inline-array-class)
|
||||
((data bounding-box :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(set! (-> bounding-box-array heap-base) (the-as uint 32))
|
||||
|
||||
@@ -5,5 +5,133 @@
|
||||
;; name in dgo: geometry-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
(define-extern quaternion-from-two-vectors-max-angle! (function quaternion vector vector float quaternion))
|
||||
(define-extern vector-orient-by-quat! (function vector vector quaternion vector))
|
||||
(define-extern quaternion-from-two-vectors-partial!
|
||||
"Create a quaternion representing the rotation between two vectors,
|
||||
doing arg3 fraction of the total rotation."
|
||||
(function quaternion vector vector float quaternion))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype curve (structure)
|
||||
((cverts (inline-array vector))
|
||||
(num-cverts int32)
|
||||
(knots (pointer float))
|
||||
(num-knots int32)
|
||||
(length float)
|
||||
)
|
||||
:allow-misaligned
|
||||
)
|
||||
|
||||
|
||||
(deftype line-intersection-val (structure)
|
||||
((tt0 float)
|
||||
(tt1 float)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype border-plane (basic)
|
||||
((name symbol)
|
||||
(action basic)
|
||||
(slot int8)
|
||||
(trans vector :inline)
|
||||
(normal vector :inline)
|
||||
)
|
||||
(:methods
|
||||
(debug-draw (_type_) int)
|
||||
(point-past-plane? (_type_ vector) symbol)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype lissajous (structure)
|
||||
"A curve where the x and y position are set by two different sinusoids.
|
||||
This stores the parameters and state for evaluating this curve."
|
||||
((x-mag float)
|
||||
(y-mag float)
|
||||
(theta float)
|
||||
(wx float)
|
||||
(wy float)
|
||||
(period-shift float)
|
||||
(theta-rate float)
|
||||
)
|
||||
:pack-me
|
||||
(:methods
|
||||
(evaluate! (_type_ vector) vector)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype lissajous-interp (structure)
|
||||
"Handles interpolating between two different lissajous parameters, and also
|
||||
stepping forward the dynamics."
|
||||
((current lissajous :inline)
|
||||
(dest lissajous :inline)
|
||||
(rate lissajous :inline)
|
||||
)
|
||||
(:methods
|
||||
(evaluate! (_type_ vector) vector)
|
||||
(update! (_type_) float)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype ellipsoid (vector)
|
||||
((width float :overlay-at (-> data 0))
|
||||
(height float :overlay-at (-> data 1))
|
||||
(length float :overlay-at (-> data 2))
|
||||
(h float :overlay-at (-> data 1))
|
||||
(l float :overlay-at (-> data 2))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defun point-in-ellipsoid? ((arg0 ellipsoid) (arg1 vector))
|
||||
(let ((v1-1 (vector*! (new 'stack-no-clear 'vector) arg1 arg1)))
|
||||
(+ (/ (-> v1-1 x) (square (-> arg0 w)))
|
||||
(/ (-> v1-1 y) (square (-> arg0 y)))
|
||||
(/ (-> v1-1 z) (square (-> arg0 z)))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defun ellipsoid-random-point-on! ((arg0 ellipsoid) (arg1 vector))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector))
|
||||
(s4-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(let* ((s2-0 sincos-rad!)
|
||||
(s1-0 s5-0)
|
||||
(f30-0 -3.1415925)
|
||||
(f28-0 6.283185)
|
||||
(v1-3 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-4 (the-as number (logior #x3f800000 v1-3)))
|
||||
)
|
||||
(s2-0 s1-0 (+ f30-0 (* f28-0 (+ -1.0 (the-as float v1-4)))))
|
||||
)
|
||||
(let* ((s2-1 sincos-rad!)
|
||||
(s1-1 s4-0)
|
||||
(f30-1 -1.5707963)
|
||||
(f28-1 3.1415925)
|
||||
(v1-9 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
|
||||
(v1-10 (the-as number (logior #x3f800000 v1-9)))
|
||||
)
|
||||
(s2-1 s1-1 (+ f30-1 (* f28-1 (+ -1.0 (the-as float v1-10)))))
|
||||
)
|
||||
(set! (-> arg1 x) (* (-> arg0 w) (-> s4-0 y) (-> s5-0 x)))
|
||||
(set! (-> arg1 y) (* (-> arg0 y) (-> s4-0 x)))
|
||||
(set! (-> arg1 z) (* (-> arg0 z) (-> s4-0 y) (-> s5-0 y)))
|
||||
)
|
||||
arg1
|
||||
)
|
||||
|
||||
(defun ellipsoid-normal-at! ((arg0 ellipsoid) (arg1 vector) (arg2 vector))
|
||||
(let ((v0-0 arg1))
|
||||
(set! (-> v0-0 x) (/ (-> arg2 x) (square (-> arg0 w))))
|
||||
(set! (-> v0-0 y) (/ (-> arg2 y) (square (-> arg0 y))))
|
||||
(set! (-> v0-0 z) (/ (-> arg2 z) (square (-> arg0 z))))
|
||||
(set! (-> v0-0 w) 1.0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,5 +5,18 @@
|
||||
;; name in dgo: path-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++path-control-flag
|
||||
(defenum path-control-flag
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(display 0)
|
||||
(draw-line 1) ;; TODO - only seen it used to control debug drawing so far
|
||||
(draw-point 2) ;; TODO - only seen it used to control debug drawing so far
|
||||
(draw-text 3) ;; TODO - only seen it used to control debug drawing so far
|
||||
(not-found 4)
|
||||
)
|
||||
;; ---path-control-flag
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -7,3 +7,32 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype background-work (basic)
|
||||
"List of all things for the background renderer to draw."
|
||||
((tfrag-tree-count int32)
|
||||
(tfrag-trees drawable-tree-tfrag 19)
|
||||
(tfrag-levels level 19)
|
||||
(tfrag-trans-tree-count int32)
|
||||
(tfrag-trans-trees drawable-tree-tfrag-trans 19)
|
||||
(tfrag-trans-levels level 19)
|
||||
(tfrag-water-tree-count int32)
|
||||
(tfrag-water-trees drawable-tree-tfrag-water 19)
|
||||
(tfrag-water-levels level 19)
|
||||
(tfrag-shared-tree-count int32)
|
||||
(tfrag-shared-trees drawable-tree-tfrag-shared 19)
|
||||
(tfrag-shared-levels level 19)
|
||||
(tfrag-trans-shared-tree-count int32)
|
||||
(tfrag-trans-shared-trees drawable-tree-tfrag-trans-shared 19)
|
||||
(tfrag-trans-shared-levels level 19)
|
||||
(tfrag-water-shared-tree-count int32)
|
||||
(tfrag-water-shared-trees drawable-tree-tfrag-water-shared 19)
|
||||
(tfrag-water-shared-levels level 19)
|
||||
(shrub-tree-count int32)
|
||||
(shrub-trees drawable-tree-instance-shrub 19)
|
||||
(shrub-levels level 19)
|
||||
(tie-tree-count int32)
|
||||
(tie-trees drawable-tree-instance-tie 19)
|
||||
(tie-levels level 19)
|
||||
(wait-to-vu0 uint32)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -5,5 +5,218 @@
|
||||
;; name in dgo: prototype-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++prototype-flags
|
||||
(defenum prototype-flags
|
||||
:bitfield #t
|
||||
:type uint16
|
||||
(disable 0) ;; set from debug menu, for debugging
|
||||
(tpage-alpha 2)
|
||||
(vanish 3)
|
||||
(visible 5) ;; set by prototypes-game-visible-set! to hide things on purpose
|
||||
(no-collide 6)
|
||||
(tpage-water 7)
|
||||
)
|
||||
;; ---prototype-flags
|
||||
|
||||
;; +++instance-flags
|
||||
(defenum instance-flags
|
||||
:type uint16
|
||||
:bitfield #t
|
||||
(no-collide 0)
|
||||
)
|
||||
;; ---instance-flags
|
||||
|
||||
|
||||
(declare-type prototype-tie drawable)
|
||||
(declare-type collide-hash-fragment-array basic)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype prototype-bucket (basic)
|
||||
((name string)
|
||||
(flags prototype-flags)
|
||||
(texture-masks-index uint16)
|
||||
(in-level uint16)
|
||||
(utextures uint16)
|
||||
(geometry drawable 4)
|
||||
(dists vector :inline)
|
||||
(rdists vector :inline)
|
||||
(near-plane meters :overlay-at (-> dists data 0))
|
||||
(near-stiff meters :overlay-at (-> dists data 1))
|
||||
(mid-plane meters :overlay-at (-> dists data 2))
|
||||
(far-plane meters :overlay-at (-> dists data 3))
|
||||
(rlength-near float :overlay-at (-> rdists data 0))
|
||||
(rlength-stiff float :overlay-at (-> rdists data 1))
|
||||
(rlength-mid float :overlay-at (-> rdists data 2))
|
||||
(stiffness float :overlay-at (-> rdists data 3))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype prototype-bucket-shrub (prototype-bucket)
|
||||
((next uint32 4)
|
||||
(count uint16 4)
|
||||
(count-quad uint128 :overlay-at (-> count 0))
|
||||
(mod-count uint16 4 :offset 88)
|
||||
(last dma-packet 4)
|
||||
(next-clear uint128 :overlay-at (-> next 0))
|
||||
(count-clear uint64 :overlay-at (-> count 0))
|
||||
(last-clear uint128 :overlay-at (-> last 0))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype prototype-inline-array-shrub (drawable)
|
||||
((length int16 :offset 6)
|
||||
(data prototype-bucket-shrub 1 :inline :offset 32)
|
||||
(pad uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype prototype-array-shrub-info (basic)
|
||||
((prototype-inline-array-shrub prototype-inline-array-shrub)
|
||||
(wind-vectors uint32)
|
||||
(wind-count int32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype prototype-bucket-tie (prototype-bucket)
|
||||
((next uint32 12)
|
||||
(count uint16 12)
|
||||
(frag-count uint8 4)
|
||||
(index-start uint8 4)
|
||||
(base-qw uint16 4)
|
||||
(tie-rvanish float)
|
||||
(tie-vanish-far float)
|
||||
(envmap-rfade float)
|
||||
(envmap-fade-far float)
|
||||
(envmap-shader adgif-shader)
|
||||
(tint-color uint32)
|
||||
(collide-hash-fragment-array collide-hash-fragment-array)
|
||||
(tie-colors time-of-day-palette)
|
||||
(data uint32 :dynamic)
|
||||
(color-index-qwc uint32 :dynamic)
|
||||
(scissor-frag-count uint8 :overlay-at (-> frag-count 0))
|
||||
(near-frag-count uint8 :overlay-at (-> frag-count 1))
|
||||
(mid-frag-count uint8 :overlay-at (-> frag-count 2))
|
||||
(far-frag-count uint8 :overlay-at (-> frag-count 3))
|
||||
(scissor-index-start uint8 :overlay-at (-> index-start 0))
|
||||
(near-index-start uint8 :overlay-at (-> index-start 1))
|
||||
(mid-index-start uint8 :overlay-at (-> index-start 2))
|
||||
(far-index-start uint8 :overlay-at (-> index-start 3))
|
||||
(scissor-base-qw uint16 :overlay-at (-> base-qw 0))
|
||||
(near-base-qw uint16 :overlay-at (-> base-qw 1))
|
||||
(mid-base-qw uint16 :overlay-at (-> base-qw 2))
|
||||
(far-base-qw uint16 :overlay-at (-> base-qw 3))
|
||||
(tie-next uint32 4 :overlay-at (-> next 0))
|
||||
(tie-scissor-next uint32 :overlay-at (-> next 0))
|
||||
(tie-near-next uint32 :overlay-at (-> next 1))
|
||||
(tie-mid-next uint32 :overlay-at (-> next 2))
|
||||
(tie-far-next uint32 :overlay-at (-> next 3))
|
||||
(trans-next uint32 4 :overlay-at (-> next 0))
|
||||
(trans-scissor-next uint32 4 :overlay-at (-> next 0))
|
||||
(trans-near-next uint32 :overlay-at (-> next 1))
|
||||
(trans-mid-next uint32 :overlay-at (-> next 2))
|
||||
(trans-far-next uint32 :overlay-at (-> next 3))
|
||||
(water-next uint32 4 :overlay-at (-> next 0))
|
||||
(water-scissor-next uint32 4 :overlay-at (-> next 0))
|
||||
(water-near-next uint32 :overlay-at (-> next 1))
|
||||
(water-mid-next uint32 :overlay-at (-> next 2))
|
||||
(water-far-next uint32 :overlay-at (-> next 3))
|
||||
(envmap-next uint32 4 :overlay-at (-> next 4))
|
||||
(envmap-scissor-next uint32 4 :overlay-at (-> next 4))
|
||||
(envmap-near-next uint32 :overlay-at (-> next 5))
|
||||
(envmap-mid-next uint32 :overlay-at (-> next 6))
|
||||
(envmap-far-next uint32 :overlay-at (-> next 7))
|
||||
(generic-next uint32 3 :overlay-at (-> next 8))
|
||||
(generic-near-next uint32 :overlay-at (-> next 8))
|
||||
(generic-mid-next uint32 :overlay-at (-> next 9))
|
||||
(generic-far-next uint32 :overlay-at (-> next 10))
|
||||
(vanish-next uint32 :overlay-at (-> next 11))
|
||||
(tie-count uint16 4 :overlay-at (-> count 0))
|
||||
(tie-scissor-count uint16 :overlay-at (-> count 0))
|
||||
(tie-near-count uint16 :overlay-at (-> count 1))
|
||||
(tie-mid-count uint16 :overlay-at (-> count 2))
|
||||
(tie-far-count uint16 :overlay-at (-> count 3))
|
||||
(trans-count uint16 4 :overlay-at (-> count 0))
|
||||
(trans-scissor-count uint16 :overlay-at (-> count 0))
|
||||
(trans-near-count uint16 :overlay-at (-> count 1))
|
||||
(trans-mid-count uint16 :overlay-at (-> count 2))
|
||||
(trans-far-count uint16 :overlay-at (-> count 3))
|
||||
(water-count uint16 4 :overlay-at (-> count 0))
|
||||
(water-scissor-count uint16 :overlay-at (-> count 0))
|
||||
(water-near-count uint16 :overlay-at (-> count 1))
|
||||
(water-mid-count uint16 :overlay-at (-> count 2))
|
||||
(water-far-count uint16 :overlay-at (-> count 3))
|
||||
(envmap-count uint16 4 :overlay-at (-> count 4))
|
||||
(envmap-scissor-count uint16 :overlay-at (-> count 4))
|
||||
(envmap-near-count uint16 :overlay-at (-> count 5))
|
||||
(envmap-mid-count uint16 :overlay-at (-> count 6))
|
||||
(envmap-far-count uint16 :overlay-at (-> count 7))
|
||||
(generic-count uint16 3 :overlay-at (-> count 8))
|
||||
(generic-near-count uint16 :overlay-at (-> count 8))
|
||||
(generic-mid-count uint16 :overlay-at (-> count 9))
|
||||
(generic-far-count uint16 :overlay-at (-> count 10))
|
||||
(vanish-count uint16 :overlay-at (-> count 11))
|
||||
(next-clear uint128 3 :overlay-at (-> next 0))
|
||||
(count-clear uint64 3 :overlay-at (-> count 0))
|
||||
(tie-geom prototype-tie 4 :overlay-at (-> geometry 0))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype prototype-array-tie (array)
|
||||
((array-data prototype-bucket-tie :dynamic :offset 16)
|
||||
)
|
||||
(:methods
|
||||
(prototype-array-tie-method-9 () none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype proxy-prototype-array-tie (basic)
|
||||
((prototype-array-tie prototype-array-tie)
|
||||
(wind-vectors uint32)
|
||||
(wind-count uint16)
|
||||
(prototype-max-qwc uint16)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype prototype-node (structure)
|
||||
((prototype basic)
|
||||
(level basic)
|
||||
(id int16)
|
||||
(next-prototype int16)
|
||||
(next-child int16)
|
||||
(prev-child int16)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype prototype-node-group (basic)
|
||||
((next-prototype int16)
|
||||
(next-free int16)
|
||||
(next-child-prototype int16 19)
|
||||
(data prototype-node 512 :inline)
|
||||
)
|
||||
(:methods
|
||||
(prototype-node-group-method-9 () none)
|
||||
(prototype-node-group-method-10 () none)
|
||||
(prototype-node-group-method-11 () none)
|
||||
(prototype-node-group-method-12 () none)
|
||||
(prototype-node-group-method-13 () none)
|
||||
(prototype-node-group-method-14 () none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype instance (drawable)
|
||||
((bucket-index uint16 :offset 6)
|
||||
(origin matrix4h :inline)
|
||||
(flags instance-flags :overlay-at (-> origin data 7))
|
||||
(wind-index uint16 :overlay-at (-> origin data 15))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,151 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype subdivide-settings (basic)
|
||||
"Input settings for distances for switching mesh level of details.
|
||||
These are set by the level code and read by rendering code."
|
||||
((dist float 5)
|
||||
(meters float 5)
|
||||
(close float 20)
|
||||
(far float 20)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type float float) _type_)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod new subdivide-settings ((allocation symbol) (type-to-make type) (arg0 float) (arg1 float))
|
||||
(let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(dotimes (v1-2 18)
|
||||
(set! (-> v0-0 close v1-2) arg0)
|
||||
(set! (-> v0-0 far v1-2) arg1)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
(deftype subdivide-dists (structure)
|
||||
"Unused subdivide distances. Internally, tfrag/tie figure these out instead."
|
||||
((data uint32 32 :offset 0)
|
||||
(vector vector 8 :overlay-at (-> data 0))
|
||||
(k0s uint128 4 :overlay-at (-> data 0))
|
||||
(k1s uint128 4 :overlay-at (-> data 16))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype terrain-stats (structure)
|
||||
"Desptie the name `terrain-stats`, these are more general triangle stats for all renderers."
|
||||
((pris tr-stat :inline)
|
||||
(tie-generic tr-stat :inline)
|
||||
(tie-vanish tr-stat :inline)
|
||||
(tie tr-stat :inline)
|
||||
(tie-scissor tr-stat :inline)
|
||||
(tie-envmap tr-stat :inline)
|
||||
(tie-envmap-scissor tr-stat :inline)
|
||||
(tie-trans tr-stat :inline)
|
||||
(tie-scissor-trans tr-stat :inline)
|
||||
(tie-envmap-trans tr-stat :inline)
|
||||
(tie-envmap-scissor-trans tr-stat :inline)
|
||||
(tie-water tr-stat :inline)
|
||||
(tie-scissor-water tr-stat :inline)
|
||||
(tie-envmap-water tr-stat :inline)
|
||||
(tie-envmap-scissor-water tr-stat :inline)
|
||||
(shrub-near tr-stat :inline)
|
||||
(shrub tr-stat :inline)
|
||||
(tfrag-scissor tr-stat :inline)
|
||||
(tfrag tr-stat :inline)
|
||||
(billboard tr-stat :inline)
|
||||
(tfrag-trans tr-stat :inline)
|
||||
(tfrag-scissor-trans tr-stat :inline)
|
||||
(tfrag-water tr-stat :inline)
|
||||
(tfrag-scissor-water tr-stat :inline)
|
||||
(trans-pris tr-stat :inline)
|
||||
(trans-shrub tr-stat :inline)
|
||||
(ocean-mid tr-stat :inline)
|
||||
(ocean-near tr-stat :inline)
|
||||
(shadow tr-stat :inline)
|
||||
(total tr-stat :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype background-area (structure)
|
||||
"Scratchpad memory layout for most background rendering
|
||||
This uses the full scratchpad so it should only be used when the stack isn't on the scratchpad (rendering code).
|
||||
Interestingly, dma-area went from a union of all the -dma types to a plain array of bytes in jak 3."
|
||||
((dma-area uint8 14336)
|
||||
(vis-list uint8 2048)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype foreground-area (structure)
|
||||
"Scratchpad memory layout for most foreground rendering."
|
||||
((generic-work generic-work :inline :offset 0)
|
||||
(foreground-work foreground-work :inline :offset 0)
|
||||
(joint-work joint-work :inline :offset 0)
|
||||
(bone-mem bone-memory :inline :offset 0)
|
||||
(shadow-work shadow-work :inline :offset 0)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype region-prim-area (structure)
|
||||
"Scratchpad memory layout for regions."
|
||||
((region-prim-list region-prim-list :inline)
|
||||
(pos vector :inline)
|
||||
(exit-pos vector :inline)
|
||||
(ray vector :inline)
|
||||
(exit-ray vector :inline)
|
||||
(region-enter-count int32)
|
||||
(region-enter-list region 320)
|
||||
(region-enter-prim-list drawable-region-sphere 320)
|
||||
(region-exit-count int32)
|
||||
(region-exit-list region 320)
|
||||
(region-exit-prim-list drawable-region-sphere 320)
|
||||
(region-inside-count int32)
|
||||
(region-inside-list region 320)
|
||||
(region-inside-prim-list drawable-region-sphere 320)
|
||||
(region-start-count int32)
|
||||
(region-start-list region 320)
|
||||
(region-start-prim-list drawable-region-sphere 320)
|
||||
)
|
||||
(:methods
|
||||
(track-entered-region! (_type_ drawable-region-sphere) int)
|
||||
(track-exited-region! (_type_ drawable-region-sphere) int)
|
||||
(track-inside-region! (_type_ drawable-region-sphere) int)
|
||||
(track-start-region! (_type_ drawable-region-sphere) int)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype sprite-area (structure)
|
||||
"Scratchpad memory layout for sprites."
|
||||
((clock-data vector 22 :inline)
|
||||
(buffer uint8 :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype work-area (structure)
|
||||
"All scratchpad memory layouts."
|
||||
((background background-area :inline :offset 0)
|
||||
(foreground foreground-area :inline :offset 0)
|
||||
(region-prim region-prim-area :inline :offset 0)
|
||||
(sprite sprite-area :inline :offset 0)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype terrain-context (structure)
|
||||
"Useless wrapper around work-area. (this added some stuff in jak 1)"
|
||||
((work work-area :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *terrain-stats* (new 'global 'terrain-stats))
|
||||
|
||||
(define *collide-stats* (new 'global 'collide-stats))
|
||||
|
||||
@@ -7,3 +7,224 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype tfragment-stats (structure)
|
||||
"Triangle and vertex stats for a single tfragment."
|
||||
((num-tris uint16 4)
|
||||
(num-dverts uint16 4)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype tfragment-debug-data (structure)
|
||||
"Optional debug information (stats, lines) for a tfragment."
|
||||
((stats tfragment-stats :inline)
|
||||
(debug-lines (array vector-array))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-tfragment (structure)
|
||||
"Unused. Could have been a way to render tfrag's through generic."
|
||||
((dummy int32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype tfragment (drawable)
|
||||
"A tfrag mesh fragment. This is just references to DMA data, plus some metadata."
|
||||
((color-index uint16 :offset 6)
|
||||
(debug-data tfragment-debug-data :offset 8)
|
||||
(color-indices uint32 :offset 12)
|
||||
(colors uint32 :overlay-at color-indices)
|
||||
(dma-chain uint32 3 :offset 32)
|
||||
(dma-common uint32 :overlay-at (-> dma-chain 0))
|
||||
(dma-level-0 uint32 :overlay-at dma-common)
|
||||
(dma-base uint32 :overlay-at (-> dma-chain 1))
|
||||
(dma-level-1 uint32 :overlay-at (-> dma-chain 2))
|
||||
(dma-qwc uint8 4 :offset 44)
|
||||
(dma-qwc-word uint32 :overlay-at (-> dma-qwc 0))
|
||||
(shader (inline-array adgif-shader) :offset 48)
|
||||
(num-shaders uint8 :offset 52)
|
||||
(num-base-colors uint8 :offset 53)
|
||||
(num-level0-colors uint8 :offset 54)
|
||||
(num-level1-colors uint8 :offset 55)
|
||||
(color-offset uint8 :offset 56)
|
||||
(color-count uint8 :offset 57)
|
||||
(texture-masks-index uint16 :offset 58)
|
||||
(generic generic-tfragment :offset 60)
|
||||
(generic-u32 uint32 :overlay-at generic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype drawable-inline-array-tfrag (drawable-inline-array)
|
||||
"Array of tfragments"
|
||||
((data tfragment 1 :inline)
|
||||
(pad uint32)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype drawable-inline-array-tfrag-trans (drawable-inline-array-tfrag)
|
||||
((data2 tfragment 1 :inline)
|
||||
(pad2 uint32)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype drawable-inline-array-tfrag-water (drawable-inline-array-tfrag)
|
||||
((data2 tfragment 1 :inline)
|
||||
(pad2 uint32)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype drawable-tree-tfrag (drawable-tree)
|
||||
"top level tfrag tree."
|
||||
((time-of-day-pal time-of-day-palette :offset 12)
|
||||
(arrays drawable-inline-array :dynamic :offset 32)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype drawable-tree-tfrag-trans (drawable-tree-tfrag)
|
||||
()
|
||||
)
|
||||
|
||||
(deftype drawable-tree-tfrag-water (drawable-tree-tfrag-trans)
|
||||
()
|
||||
)
|
||||
|
||||
(deftype drawable-tree-tfrag-shared (drawable-tree-tfrag)
|
||||
()
|
||||
)
|
||||
|
||||
(deftype drawable-tree-tfrag-trans-shared (drawable-tree-tfrag-shared)
|
||||
()
|
||||
)
|
||||
|
||||
(deftype drawable-tree-tfrag-water-shared (drawable-tree-tfrag-shared)
|
||||
()
|
||||
)
|
||||
|
||||
(deftype tfrag-dists (structure)
|
||||
"Distances for mesh level-of-detail blending for use on VU1."
|
||||
((data uint32 16)
|
||||
(vector vector 4 :overlay-at (-> data 0))
|
||||
(k0s vector 2 :overlay-at (-> data 0))
|
||||
(k1s vector 2 :overlay-at (-> data 8))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype tfrag-data (structure)
|
||||
"Constants for VU1 data memory for tfrag rendering."
|
||||
((data uint32 56)
|
||||
(vector vector 14 :overlay-at (-> data 0))
|
||||
(fog vector :inline :overlay-at (-> data 0))
|
||||
(val vector :inline :overlay-at (-> data 4))
|
||||
(strgif gs-gif-tag :inline :overlay-at (-> data 8))
|
||||
(fangif gs-gif-tag :inline :overlay-at (-> data 12))
|
||||
(adgif gs-gif-tag :inline :overlay-at (-> data 16))
|
||||
(hvdf-offset vector :inline :overlay-at (-> data 20))
|
||||
(hmge-scale vector :inline :overlay-at (-> data 24))
|
||||
(invh-scale vector :inline :overlay-at (-> data 28))
|
||||
(ambient vector :inline :overlay-at (-> data 32))
|
||||
(guard vector :inline :overlay-at (-> data 36))
|
||||
(dists tfrag-dists :inline :overlay-at (-> data 40))
|
||||
(k0s uint128 2 :overlay-at (-> data 40))
|
||||
(k1s uint128 2 :overlay-at (-> data 48))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype tfrag-control (structure)
|
||||
"VU1 'control' data containing address and counters."
|
||||
((num-base-points uint32)
|
||||
(num-shared-base-points uint32)
|
||||
(num-level0-points uint32)
|
||||
(num-shared-level0-points uint32)
|
||||
(num-level1-points uint32)
|
||||
(num-shared-level1-points uint32)
|
||||
(ptr-vtxdata uint32)
|
||||
(ptr-base-points uint32)
|
||||
(ptr-shared-base-points uint32)
|
||||
(ptr-level0-points uint32)
|
||||
(ptr-shared-level0-points uint32)
|
||||
(ptr-level1-points uint32)
|
||||
(ptr-shared-level1-points uint32)
|
||||
(ptr-draw-points uint32)
|
||||
(ptr-interpolated-0 uint32)
|
||||
(ptr-shared-interpolated-0 uint32)
|
||||
(ptr-interpolated1 uint32)
|
||||
(ptr-shared-interpolated1 uint32)
|
||||
(ptr-strip-data uint32)
|
||||
(ptr-texture-data uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype tfrag-stats (structure)
|
||||
"TFRAG statistics computed on EE."
|
||||
((from int32)
|
||||
(to int32)
|
||||
(cnt int32)
|
||||
(tris int32)
|
||||
(tfaces int32)
|
||||
(tfrags int32)
|
||||
(dtris int32)
|
||||
(base-verts int32)
|
||||
(level0-verts int32)
|
||||
(level1-verts int32)
|
||||
(dma-cnt int32)
|
||||
(dma-dta int32)
|
||||
(dma-tex int32)
|
||||
(strips int32)
|
||||
(drawpoints int32)
|
||||
(vif int32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype tfrag-packet (structure)
|
||||
((tag uint128 2)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype tfrag-work (structure)
|
||||
"Scratch space for generating TFRAG DMA."
|
||||
((base-tmpl dma-packet :inline)
|
||||
(level-0-tmpl dma-packet :inline)
|
||||
(common-tmpl dma-packet :inline)
|
||||
(level-1-tmpl dma-packet :inline)
|
||||
(color-tmpl dma-packet :inline)
|
||||
(frag-dists vector :inline)
|
||||
(min-dist vector :inline)
|
||||
(color-ptr vector4w :inline)
|
||||
(tr-stat-tfrag tr-stat)
|
||||
(tr-stat-tfrag-scissor tr-stat)
|
||||
(vu1-enable-tfrag int32)
|
||||
(vu1-enable-tfrag-scissor int32)
|
||||
(cur-vis-bits uint32)
|
||||
(end-vis-bits uint32)
|
||||
(src-ptr uint32)
|
||||
(last-call uint32)
|
||||
(dma-buffer basic)
|
||||
(test-id uint32)
|
||||
(wait-from-spr uint32)
|
||||
(wait-to-spr uint32)
|
||||
(near-wait-from-spr uint32)
|
||||
(near-wait-to-spr uint32)
|
||||
(max-fragment uint16)
|
||||
(min-fragment uint16)
|
||||
(texture-dists uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype tfrag-dma (structure)
|
||||
"Memory layout for to/from scratchpad for tfrag."
|
||||
((banka tfragment 16 :inline)
|
||||
(bankb tfragment 16 :inline)
|
||||
(outa uint128 128)
|
||||
(outb uint128 128)
|
||||
(colors rgba 2047)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,197 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype generic-tie-instance (structure)
|
||||
((matrix-tag dma-packet :inline)
|
||||
(matrix-data vector 6 :inline)
|
||||
(index-tag dma-packet :inline)
|
||||
(indices uint8 224)
|
||||
(end-tag dma-packet :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-tie-input (structure)
|
||||
((palette-tag dma-packet :inline)
|
||||
(palette rgba 128)
|
||||
(model-tag dma-packet :inline)
|
||||
(model vector 146 :inline)
|
||||
(matrix-tag dma-packet :inline)
|
||||
(matrix-data vector 6 :inline)
|
||||
(index-tag dma-packet :inline)
|
||||
(indices uint8 224)
|
||||
(end-tag dma-packet :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-tie-run-control (structure)
|
||||
((skip-bp2 uint8)
|
||||
(skip-ips uint8)
|
||||
(gifbuf-skip uint8)
|
||||
(strips uint8)
|
||||
(target-bp1 uint8)
|
||||
(target-bp2 uint8)
|
||||
(target-ip1 uint8)
|
||||
(target-ip2 uint8)
|
||||
(target-bps uint8)
|
||||
(target-ips uint8)
|
||||
(is-generic uint8)
|
||||
(reserved uint8)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-tie-base-point (structure)
|
||||
((data uint16 8)
|
||||
(quad uint128 :overlay-at (-> data 0))
|
||||
(x int16 :overlay-at (-> data 0))
|
||||
(y int16 :overlay-at (-> data 1))
|
||||
(z int16 :overlay-at (-> data 2))
|
||||
(d0 int16 :overlay-at (-> data 3))
|
||||
(vtx uint64 :overlay-at (-> data 0))
|
||||
(u int16 :overlay-at (-> data 4))
|
||||
(v int16 :overlay-at (-> data 5))
|
||||
(tex uint32 :overlay-at (-> data 4))
|
||||
(w int16 :overlay-at (-> data 6))
|
||||
(d1 int16 :overlay-at (-> data 7))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-tie-bps (structure)
|
||||
((bp generic-tie-base-point 4 :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-tie-interp-point (structure)
|
||||
((data uint16 12)
|
||||
(x int16 :overlay-at (-> data 0))
|
||||
(y int16 :overlay-at (-> data 1))
|
||||
(z int16 :overlay-at (-> data 2))
|
||||
(d0 int16 :overlay-at (-> data 3))
|
||||
(vtx0 uint64 :overlay-at (-> data 0))
|
||||
(dx int16 :overlay-at (-> data 4))
|
||||
(dy int16 :overlay-at (-> data 5))
|
||||
(dz int16 :overlay-at (-> data 6))
|
||||
(unused int16 :overlay-at (-> data 7))
|
||||
(vtx1 uint64 :overlay-at (-> data 4))
|
||||
(u int16 :overlay-at (-> data 8))
|
||||
(v int16 :overlay-at (-> data 9))
|
||||
(tex uint32 :overlay-at (-> data 8))
|
||||
(w int16 :overlay-at (-> data 10))
|
||||
(d1 int16 :overlay-at (-> data 11))
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
;; ERROR: failed type prop at 19: Could not figure out load: (set! a2 (l.q gp))
|
||||
|
||||
(deftype generic-tie-ips (structure)
|
||||
((ip generic-tie-interp-point 2 :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-tie-header (structure)
|
||||
((effect uint8)
|
||||
(interp-table-size uint8)
|
||||
(num-bps uint8)
|
||||
(num-ips uint8)
|
||||
(tint-color uint32)
|
||||
(index-table-offset uint16)
|
||||
(kick-table-offset uint16)
|
||||
(normal-table-offset uint16)
|
||||
(interp-table-offset uint16)
|
||||
(gsf-header gsf-header :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-tie-matrix (structure)
|
||||
((matrix matrix :inline)
|
||||
(morph vector :inline)
|
||||
(fog qword :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-tie-normal (structure)
|
||||
((x int8)
|
||||
(y int8)
|
||||
(z int8)
|
||||
(dummy int8)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-tie-control (structure)
|
||||
((ptr-palette uint32)
|
||||
(ptr-shaders uint32)
|
||||
(ptr-runctrl generic-tie-run-control)
|
||||
(ptr-verts uint32)
|
||||
(ptr-generic generic-tie-header)
|
||||
(ptr-dps uint32)
|
||||
(ptr-kicks uint32)
|
||||
(ptr-normals uint32)
|
||||
(ptr-interp uint32)
|
||||
(ptr-mtxs generic-tie-matrix)
|
||||
(ptr-cinds uint32)
|
||||
(next-instance uint32)
|
||||
(next-model uint32)
|
||||
(next-is-model uint32)
|
||||
(tie-type uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-tie-stats (structure)
|
||||
((num-bps uint32)
|
||||
(num-ips uint32)
|
||||
(num-dps uint32)
|
||||
(num-shaders uint32)
|
||||
(num-models uint32)
|
||||
(num-instances uint32)
|
||||
(num-waits uint32)
|
||||
(num-qwc uint32)
|
||||
(max-qwc uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-tie-calls (structure)
|
||||
((generic-prepare-dma-double basic)
|
||||
(generic-envmap-dproc basic)
|
||||
(generic-interp-dproc basic)
|
||||
(generic-no-light-dproc basic)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-tie-shadow (structure)
|
||||
((out-buf gsf-buffer)
|
||||
(cur-buf uint32)
|
||||
(tie-type int32)
|
||||
(ptr-inst uint32)
|
||||
(ptr-buf uint32)
|
||||
(inst-xor int32)
|
||||
(end-of-chain uint32)
|
||||
(write-limit uint32)
|
||||
(calls generic-tie-calls :inline)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-tie-work (structure)
|
||||
((control generic-tie-control :inline)
|
||||
(interp-job generic-interp-job :inline)
|
||||
(shadow generic-tie-shadow :inline)
|
||||
(input-a generic-tie-input :inline)
|
||||
(input-b generic-tie-input :inline)
|
||||
(inst-buf generic-tie-instance :inline)
|
||||
(palette-buf rgba 128)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,310 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype tie-fragment-debug (structure)
|
||||
"Optional debug information about a tie-fragment."
|
||||
((num-tris uint16)
|
||||
(num-dverts uint16)
|
||||
(debug-lines (array vector-array))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype tie-fragment (drawable)
|
||||
"A mesh fragment of a TIE. This is a chunk of mesh that is rendered by VU1, stored as DMA chains."
|
||||
((gif-ref (inline-array adgif-shader) :overlay-at id)
|
||||
(point-ref uint32 :offset 8)
|
||||
(color-index uint16 :offset 12)
|
||||
(base-colors uint8 :offset 14)
|
||||
(tex-count uint16 :offset 32)
|
||||
(gif-count uint16 :offset 34)
|
||||
(vertex-count uint16 :offset 36)
|
||||
(color-count uint16)
|
||||
(dp-ref uint32)
|
||||
(dp-qwc uint32)
|
||||
(generic-ref uint32)
|
||||
(generic-count uint16)
|
||||
(normal-count uint16)
|
||||
(normal-ref uint32)
|
||||
(debug tie-fragment-debug)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype instance-tie (instance)
|
||||
"A TIE model instance."
|
||||
((color-indices uint32 :offset 8)
|
||||
(bucket-ptr prototype-bucket-tie :offset 12)
|
||||
(max-scale uint16 :overlay-at (-> origin data 3))
|
||||
(rmin-scale uint16 :overlay-at (-> origin data 11))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype drawable-inline-array-instance-tie (drawable-inline-array)
|
||||
"Array of tie instances stored in the level."
|
||||
((data instance-tie 1 :inline)
|
||||
(pad uint32)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype drawable-tree-instance-tie (drawable-tree)
|
||||
"Top-level drawable-tree for TIEs"
|
||||
((prototypes proxy-prototype-array-tie :offset 8)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype prototype-tie (drawable-inline-array)
|
||||
"Prototype for a TIE: just an array of fragments."
|
||||
((data tie-fragment 1 :inline)
|
||||
(pad uint32)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype tie-matrix (structure)
|
||||
"Per-instance matrix for TIE VU1 rendering."
|
||||
((mat matrix :inline)
|
||||
(morph qword :inline)
|
||||
(fog qword :inline)
|
||||
(envmap-flag uint32 :overlay-at (-> fog data 0))
|
||||
(guard-flag uint32 :overlay-at (-> fog data 1))
|
||||
(vertex-alpha float :overlay-at (-> fog data 2))
|
||||
(fog-value float :overlay-at (-> fog data 3))
|
||||
(fixed-alpha float :overlay-at (-> morph data 1))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype instance-tie-work (structure)
|
||||
"workspace for TIE instance DMA generation"
|
||||
((wind-const vector :inline)
|
||||
(hmge-d vector :inline)
|
||||
(hvdf-offset vector :inline)
|
||||
(wind-force vector :inline)
|
||||
(constant vector :inline)
|
||||
(far-morph vector :inline)
|
||||
(dist-test vector :inline)
|
||||
(min-dist vector :inline)
|
||||
(guard-plane plane 4 :inline)
|
||||
(upload-color-0 dma-packet :inline)
|
||||
(upload-color-1 dma-packet :inline)
|
||||
(upload-color-2 dma-packet :inline)
|
||||
(upload-color-ret dma-packet :inline)
|
||||
(upload-color-temp dma-packet :inline)
|
||||
(generic-color-0 dma-packet :inline)
|
||||
(generic-color-1 dma-packet :inline)
|
||||
(generic-color-end dma-packet :inline)
|
||||
(envmap-color-0 dma-packet :inline)
|
||||
(envmap-color-1 dma-packet :inline)
|
||||
(tie-scissor-perspective-matrix matrix :inline)
|
||||
(tod-env-color vector :inline)
|
||||
(morph-temp vector :inline)
|
||||
(fog-temp vector :inline)
|
||||
(fade-temp float)
|
||||
(wind-vectors uint32)
|
||||
(test-id uint32)
|
||||
(test-id2 uint32)
|
||||
(dma-buffer basic)
|
||||
(to-spr uint32)
|
||||
(from-spr uint32)
|
||||
(wind-work uint32)
|
||||
(cur-vis-bits uint32)
|
||||
(end-vis-bits uint32)
|
||||
(refl-fade-fac float)
|
||||
(refl-fade-end float)
|
||||
(flags uint32)
|
||||
(vanish-flag uint32)
|
||||
(translucent-flag uint32)
|
||||
(wait-from-spr uint32)
|
||||
(wait-to-spr uint32)
|
||||
(use-etie symbol)
|
||||
(buffer-start uint32)
|
||||
(buffer-end uint32)
|
||||
(tfrag-dists uint32)
|
||||
(alpha-dists uint32)
|
||||
(water-dists uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype instance-tie-dma (structure)
|
||||
"Scratchpad memory layout for TIE instance DMA generation."
|
||||
((banka instance-tie 32 :inline)
|
||||
(bankb instance-tie 32 :inline)
|
||||
(outa uint128 256)
|
||||
(outb uint128 256)
|
||||
(work instance-tie-work :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype prototype-tie-work (structure)
|
||||
"workspace for TIE protype DMA generation."
|
||||
((upload-flushe dma-packet :inline)
|
||||
(upload-palette dma-packet :inline)
|
||||
(upload-model-0 dma-packet :inline)
|
||||
(upload-model-1 dma-packet :inline)
|
||||
(upload-model-2 dma-packet :inline)
|
||||
(upload-model-3 dma-packet :inline)
|
||||
(upload-model-near-0 dma-packet :inline)
|
||||
(upload-model-near-1 dma-packet :inline)
|
||||
(upload-model-near-2 dma-packet :inline)
|
||||
(upload-model-near-3 dma-packet :inline)
|
||||
(upload-model-near-4 dma-packet :inline)
|
||||
(envmap-palette dma-packet :inline)
|
||||
(envmap-shader dma-packet :inline)
|
||||
(upload-envmap-0 dma-packet :inline)
|
||||
(upload-envmap-1 dma-packet :inline)
|
||||
(upload-envmap-2 dma-packet :inline)
|
||||
(upload-envmap-3 dma-packet :inline)
|
||||
(upload-envmap-4 dma-packet :inline)
|
||||
(upload-envmap-scissor-4 dma-packet :inline)
|
||||
(generic-palette dma-packet :inline)
|
||||
(generic-model-0 dma-packet :inline)
|
||||
(generic-model-1 dma-packet :inline)
|
||||
(generic-model-2 dma-packet :inline)
|
||||
(model-next dma-packet :inline)
|
||||
(clamp uint64)
|
||||
(prototype-array basic)
|
||||
(wait-from-spr uint32)
|
||||
(wait-to-spr uint32)
|
||||
(mood mood-context)
|
||||
(wide-level-index uint32)
|
||||
(prototype-tie-work-todo-01 uint32)
|
||||
(last uint32 16)
|
||||
(next uint32 16)
|
||||
(count uint16 16)
|
||||
(tie-last uint32 :overlay-at (-> last 0))
|
||||
(tie-next uint32 :overlay-at (-> next 0))
|
||||
(tie-count uint16 :overlay-at (-> count 0))
|
||||
(trans-last uint32 :overlay-at (-> last 1))
|
||||
(trans-next uint32 :overlay-at (-> next 1))
|
||||
(trans-count uint16 :overlay-at (-> count 1))
|
||||
(water-last uint32 :overlay-at (-> last 2))
|
||||
(water-next uint32 :overlay-at (-> next 2))
|
||||
(water-count uint16 :overlay-at (-> count 2))
|
||||
(scissor-last uint32 :overlay-at (-> last 3))
|
||||
(scissor-next uint32 :overlay-at (-> next 3))
|
||||
(scissor-count uint16 :overlay-at (-> count 3))
|
||||
(scissor-trans-last uint32 :overlay-at (-> last 4))
|
||||
(scissor-trans-next uint32 :overlay-at (-> next 4))
|
||||
(scissor-trans-count uint16 :overlay-at (-> count 4))
|
||||
(scissor-water-last uint32 :overlay-at (-> last 5))
|
||||
(scissor-water-next uint32 :overlay-at (-> next 5))
|
||||
(scissor-water-count uint16 :overlay-at (-> count 5))
|
||||
(envmap-last uint32 :overlay-at (-> last 6))
|
||||
(envmap-next uint32 :overlay-at (-> next 6))
|
||||
(envmap-count uint16 :overlay-at (-> count 6))
|
||||
(envmap-trans-last uint32 :overlay-at (-> last 7))
|
||||
(envmap-trans-next uint32 :overlay-at (-> next 7))
|
||||
(envmap-trans-count uint16 :overlay-at (-> count 7))
|
||||
(envmap-water-last uint32 :overlay-at (-> last 8))
|
||||
(envmap-water-next uint32 :overlay-at (-> next 8))
|
||||
(envmap-water-count uint16 :overlay-at (-> count 8))
|
||||
(envmap-scissor-last uint32 :overlay-at (-> last 9))
|
||||
(envmap-scissor-next uint32 :overlay-at (-> next 9))
|
||||
(envmap-scissor-count uint16 :overlay-at (-> count 9))
|
||||
(envmap-scissor-trans-last uint32 :overlay-at (-> last 10))
|
||||
(envmap-scissor-trans-next uint32 :overlay-at (-> next 10))
|
||||
(envmap-scissor-trans-count uint16 :overlay-at (-> count 10))
|
||||
(envmap-scissor-water-last uint32 :overlay-at (-> last 11))
|
||||
(envmap-scissor-water-next uint32 :overlay-at (-> next 11))
|
||||
(envmap-scissor-water-count uint16 :overlay-at (-> count 11))
|
||||
(generic-last uint32 :overlay-at (-> last 12))
|
||||
(generic-next uint32 :overlay-at (-> next 12))
|
||||
(generic-count uint16 :overlay-at (-> count 12))
|
||||
(generic-trans-last uint32 :overlay-at (-> last 13))
|
||||
(generic-trans-next uint32 :overlay-at (-> next 13))
|
||||
(generic-trans-count uint16 :overlay-at (-> count 13))
|
||||
(generic-water-last uint32 :overlay-at (-> last 14))
|
||||
(generic-water-next uint32 :overlay-at (-> next 14))
|
||||
(generic-water-count uint16 :overlay-at (-> count 14))
|
||||
(vanish-last uint32 :overlay-at (-> last 15))
|
||||
(vanish-next uint32 :overlay-at (-> next 15))
|
||||
(vanish-count uint16 :overlay-at (-> count 15))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype prototype-tie-dma (structure)
|
||||
((colora rgba 256)
|
||||
(colorb rgba 256)
|
||||
(outa uint128 256)
|
||||
(outb uint128 256)
|
||||
(geometry uint32 4)
|
||||
(next uint32 12)
|
||||
(count uint16 12)
|
||||
(counts uint32 4)
|
||||
(palette-ptr uint32 :overlay-at (-> counts 2))
|
||||
(model-ptr uint32 :overlay-at (-> counts 3))
|
||||
(ret-ptr uint32)
|
||||
(length uint32)
|
||||
(flags uint32)
|
||||
(dma-buffer basic)
|
||||
(this-frag-count uint32)
|
||||
(frag-count uint8 4)
|
||||
(from-spr uint32)
|
||||
(to-spr uint32)
|
||||
(spr-out uint32)
|
||||
(this-count uint32)
|
||||
(scissor-geometry uint32 :overlay-at (-> geometry 0))
|
||||
(near-geometry uint32 :overlay-at (-> geometry 1))
|
||||
(mid-geometry uint32 :overlay-at (-> geometry 2))
|
||||
(far-geometry uint32 :overlay-at (-> geometry 3))
|
||||
(scissor-frag-count uint8 :overlay-at (-> frag-count 0))
|
||||
(near-frag-count uint8 :overlay-at (-> frag-count 1))
|
||||
(mid-frag-count uint8 :overlay-at (-> frag-count 2))
|
||||
(far-frag-count uint8 :overlay-at (-> frag-count 3))
|
||||
(tie-scissor-next uint32 :overlay-at (-> next 0))
|
||||
(tie-near-next uint32 :overlay-at (-> next 1))
|
||||
(tie-mid-next uint32 :overlay-at (-> next 2))
|
||||
(tie-far-next uint32 :overlay-at (-> next 3))
|
||||
(trans-scissor-next uint32 4 :overlay-at (-> next 0))
|
||||
(trans-near-next uint32 :overlay-at (-> next 1))
|
||||
(trans-mid-next uint32 :overlay-at (-> next 2))
|
||||
(trans-far-next uint32 :overlay-at (-> next 3))
|
||||
(water-scissor-next uint32 4 :overlay-at (-> next 0))
|
||||
(water-near-next uint32 :overlay-at (-> next 1))
|
||||
(water-mid-next uint32 :overlay-at (-> next 2))
|
||||
(water-far-next uint32 :overlay-at (-> next 3))
|
||||
(envmap-scissor-next uint32 4 :overlay-at (-> next 4))
|
||||
(envmap-near-next uint32 :overlay-at (-> next 5))
|
||||
(envmap-mid-next uint32 :overlay-at (-> next 6))
|
||||
(envmap-far-next uint32 :overlay-at (-> next 7))
|
||||
(generic-near-next uint32 :overlay-at (-> next 8))
|
||||
(generic-mid-next uint32 :overlay-at (-> next 9))
|
||||
(generic-far-next uint32 :overlay-at (-> next 10))
|
||||
(vanish-next uint32 :overlay-at (-> next 11))
|
||||
(tie-count uint16 :overlay-at (-> count 0))
|
||||
(tie-scissor-count uint16 :overlay-at (-> count 0))
|
||||
(tie-near-count uint16 :overlay-at (-> count 1))
|
||||
(tie-mid-count uint16 :overlay-at (-> count 2))
|
||||
(tie-far-count uint16 :overlay-at (-> count 3))
|
||||
(trans-count uint16 :overlay-at (-> count 0))
|
||||
(trans-scissor-count uint16 :overlay-at (-> count 0))
|
||||
(trans-near-count uint16 :overlay-at (-> count 1))
|
||||
(trans-mid-count uint16 :overlay-at (-> count 2))
|
||||
(trans-far-count uint16 :overlay-at (-> count 3))
|
||||
(water-count uint16 :overlay-at (-> count 0))
|
||||
(water-scissor-count uint16 :overlay-at (-> count 0))
|
||||
(water-near-count uint16 :overlay-at (-> count 1))
|
||||
(water-mid-count uint16 :overlay-at (-> count 2))
|
||||
(water-far-count uint16 :overlay-at (-> count 3))
|
||||
(envmap-count uint16 :overlay-at (-> count 4))
|
||||
(envmap-scissor-count uint16 :overlay-at (-> count 4))
|
||||
(envmap-near-count uint16 :overlay-at (-> count 5))
|
||||
(envmap-mid-count uint16 :overlay-at (-> count 6))
|
||||
(envmap-far-count uint16 :overlay-at (-> count 7))
|
||||
(generic-count uint16 :overlay-at (-> count 8))
|
||||
(generic-near-count uint16 :overlay-at (-> count 8))
|
||||
(generic-mid-count uint16 :overlay-at (-> count 9))
|
||||
(generic-far-count uint16 :overlay-at (-> count 10))
|
||||
(vanish-count uint16 :overlay-at (-> count 11))
|
||||
(next-clear uint32 3 :overlay-at (-> next 0))
|
||||
(count-clear uint16 3 :overlay-at (-> count 0))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *instance-tie-work-copy* (the-as instance-tie-work #f))
|
||||
|
||||
@@ -7,3 +7,78 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype wind-vector (structure)
|
||||
((wind-pos vector4w :inline)
|
||||
(wind-vel vector4w :inline)
|
||||
(stiffness float :overlay-at (-> wind-vel data 3))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *wind-scales* (new 'static 'boxed-array :type uint8
|
||||
#x2
|
||||
#x5
|
||||
#x2
|
||||
#x3
|
||||
#x2
|
||||
#x2
|
||||
#x3
|
||||
#x10
|
||||
#xa
|
||||
#x2
|
||||
#x4
|
||||
#x2
|
||||
#x8
|
||||
#x2
|
||||
#x2
|
||||
#x10
|
||||
#x2
|
||||
#x2
|
||||
#x8
|
||||
#x2
|
||||
#x10
|
||||
#x2
|
||||
#x4
|
||||
#x10
|
||||
#xa
|
||||
#x2
|
||||
#x4
|
||||
#x2
|
||||
#x8
|
||||
#x2
|
||||
#x2
|
||||
#x10
|
||||
)
|
||||
)
|
||||
|
||||
(deftype wind-work (basic)
|
||||
((wind-array vector 64 :inline)
|
||||
(wind-normal vector :inline)
|
||||
(wind-temp vector :inline)
|
||||
(wind-force float 64)
|
||||
(wind-const vector :inline)
|
||||
(wind-time uint32)
|
||||
(wait-to-vu0 uint32)
|
||||
(wait-to-spr uint32)
|
||||
(wait-from-spr uint32)
|
||||
(spr-index uint32)
|
||||
(count uint32)
|
||||
(next-count uint32)
|
||||
(last-count uint32)
|
||||
(to-spr uint32)
|
||||
(from-spr uint32)
|
||||
(next-mem uint32)
|
||||
(last-mem uint32)
|
||||
(next-spr uint32)
|
||||
(last-spr uint32)
|
||||
(to-ptrs uint32 3)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype wind-dma (structure)
|
||||
((buffer0 wind-vector 128 :inline)
|
||||
(buffer1 wind-vector 128 :inline)
|
||||
(buffer2 wind-vector 128 :inline)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,56 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype blit-displays-work (structure)
|
||||
((adgif-tmpl dma-gif-packet :inline)
|
||||
(sprite-tmpl dma-gif-packet :inline)
|
||||
(contrast-tmpl dma-gif-packet :inline)
|
||||
(sprite-slow-tmpl dma-gif-packet :inline)
|
||||
(screen-tmpl dma-gif-packet :inline)
|
||||
(blur-tmpl dma-gif-packet :inline)
|
||||
(blur-tmpl2 dma-gif-packet :inline)
|
||||
(line-tmpl dma-gif-packet :inline)
|
||||
(scan-tmpl dma-gif-packet :inline)
|
||||
(color vector4w :inline)
|
||||
(line-color uint64)
|
||||
(scan-colors vector4w 15 :inline)
|
||||
(vu1-enable-user-menu uint64)
|
||||
(texture-enable-user-menu uint32)
|
||||
(horizontal-flip-flag symbol)
|
||||
(scan-alpha float)
|
||||
(scanline uint32)
|
||||
(progress-interp float)
|
||||
(progress-interp-dest float)
|
||||
(progress-interp-speed float)
|
||||
)
|
||||
(:methods
|
||||
(blit-displays-work-method-9 () none)
|
||||
(blit-displays-work-method-10 () none)
|
||||
(blit-displays-work-method-11 () none)
|
||||
(blit-displays-work-method-12 () none)
|
||||
(blit-displays-work-method-13 () none)
|
||||
(blit-displays-work-method-14 () none)
|
||||
(blit-displays-work-method-15 () none)
|
||||
(blit-displays-work-method-16 () none)
|
||||
(blit-displays-work-method-17 () none)
|
||||
(blit-displays-work-method-18 () none)
|
||||
(get-horizontal-flip-flag (_type_) symbol)
|
||||
(set-horizontal-flip-flag (_type_ symbol) symbol)
|
||||
(blit-displays-work-method-21 () none)
|
||||
(blit-displays-work-method-22 () none)
|
||||
(blit-displays-work-method-23 () none)
|
||||
(blit-displays-work-method-24 () none)
|
||||
(blit-displays-work-method-25 () none)
|
||||
(blit-displays-work-method-26 () none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod get-horizontal-flip-flag ((this blit-displays-work))
|
||||
(-> this horizontal-flip-flag)
|
||||
)
|
||||
|
||||
(defmethod set-horizontal-flip-flag ((this blit-displays-work) (arg0 symbol))
|
||||
(set! (-> this horizontal-flip-flag) arg0)
|
||||
arg0
|
||||
)
|
||||
|
||||
@@ -5,5 +5,75 @@
|
||||
;; name in dgo: font-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++font-flags
|
||||
(defenum font-flags
|
||||
:type uint16
|
||||
:bitfield #t
|
||||
(shadow 0)
|
||||
(kerning 1)
|
||||
(middle 2)
|
||||
(middle-vert 3)
|
||||
(right 4)
|
||||
(large 5)
|
||||
(pc-hack 6)
|
||||
(ff7 7)
|
||||
(ff8 8)
|
||||
(ff9 9)
|
||||
)
|
||||
;; ---font-flags
|
||||
|
||||
|
||||
;; +++font-color
|
||||
(defenum font-color
|
||||
:type uint8
|
||||
(default 0)
|
||||
(white 1)
|
||||
(transparent 2)
|
||||
(red 3)
|
||||
(orange 4)
|
||||
(yellow 5)
|
||||
(green 6)
|
||||
(blue 7)
|
||||
(cyan 8)
|
||||
(pink 9)
|
||||
(menu-selected 10)
|
||||
(menu-selected-parent 11)
|
||||
(menu 12)
|
||||
(menu-parent 13)
|
||||
(menu-func-bad 14)
|
||||
(menu-flag-on 15)
|
||||
(menu-flag-on-parent 16)
|
||||
(menu-flag-off 17)
|
||||
(menu-flag-off-parent 18)
|
||||
(menu-invalid 19)
|
||||
(flat-yellow 20)
|
||||
(font-color-21 21)
|
||||
(pad-back 22)
|
||||
(pad-shine 23)
|
||||
(pad-square 24)
|
||||
(pad-circle 25)
|
||||
(pad-triangle 26)
|
||||
(pad-x 27)
|
||||
(progress-old-blue 28)
|
||||
(progress-old-yellow 29)
|
||||
(progress-old-selected 30)
|
||||
(progress-old-percent 31)
|
||||
(font-color-32 32)
|
||||
(font-color-33 33)
|
||||
(font-color-34 34)
|
||||
(font-color-35 35)
|
||||
(font-color-36 36)
|
||||
(font-color-37 37)
|
||||
(font-color-38 38)
|
||||
(font-color-39 39)
|
||||
(font-color-40 40)
|
||||
(font-color-41 41)
|
||||
(font-color-42 42)
|
||||
(font-color-43 43)
|
||||
(font-color-44 44)
|
||||
)
|
||||
;; ---font-color
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -5,5 +5,92 @@
|
||||
;; name in dgo: bones-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++bone-calc-flags
|
||||
(defenum bone-calc-flags
|
||||
:type uint16
|
||||
:bitfield #t
|
||||
(write-ripple-data 0)
|
||||
(no-cam-rot 1)
|
||||
)
|
||||
;; ---bone-calc-flags
|
||||
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype bone-buffer (structure)
|
||||
((joint matrix 16 :inline)
|
||||
(bone bone 16 :inline)
|
||||
(output pris-mtx 16 :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bone-layout (structure)
|
||||
((data uint16 8)
|
||||
(joint (inline-array matrix) 2 :overlay-at (-> data 0))
|
||||
(bone (inline-array bone) 2 :overlay-at (-> data 4))
|
||||
(output (inline-array pris-mtx) 2 :offset 16)
|
||||
(unused uint32 2 :offset 24)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bone-regs (structure)
|
||||
((dma-buf dma-buffer)
|
||||
(wait-count uint32)
|
||||
(in-count uint32)
|
||||
(sp-size uint32)
|
||||
(sp-bufnum uint32)
|
||||
(joint-ptr (inline-array joint))
|
||||
(bone-ptr (inline-array bone))
|
||||
(num-bones uint32)
|
||||
(mtxs (inline-array pris-mtx))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bone-work (structure)
|
||||
((layout bone-layout :inline)
|
||||
(regs bone-regs :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bone-debug (structure)
|
||||
((time-ctr uint32)
|
||||
(timing uint32 360)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bone-memory (structure)
|
||||
((work bone-work :inline)
|
||||
(buffer bone-buffer 2 :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bone-calculation (structure)
|
||||
((flags bone-calc-flags)
|
||||
(num-bones uint16)
|
||||
(matrix-area (inline-array pris-mtx))
|
||||
(joints (inline-array joint))
|
||||
(bones (inline-array bone))
|
||||
(ripple-scale float)
|
||||
(ripple-y-scale float)
|
||||
(ripple-normal-scale float)
|
||||
(ripple-area (inline-array vector))
|
||||
(ripple-vec vector :inline :overlay-at ripple-scale)
|
||||
(next bone-calculation)
|
||||
(dummy-1 uint32)
|
||||
(dummy-2 uint32)
|
||||
(dummy-3 uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype bone-calculation-list (structure)
|
||||
((first bone-calculation)
|
||||
(next bone-calculation)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,72 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype eye (structure)
|
||||
"Data for a single eye."
|
||||
((data vector 2 :inline)
|
||||
(x float :overlay-at (-> data 0 data 0))
|
||||
(y float :overlay-at (-> data 0 data 1))
|
||||
(lid float :overlay-at (-> data 0 data 2))
|
||||
(iris-scale float :offset 16)
|
||||
(pupil-scale float :offset 20)
|
||||
(lid-scale float :offset 24)
|
||||
(tbp int32)
|
||||
(shader-count uint32)
|
||||
(shader adgif-shader 8)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype eye-control (structure)
|
||||
((process uint64)
|
||||
(random-time uint16)
|
||||
(bucket uint16)
|
||||
(blink float)
|
||||
(shaders (inline-array adgif-shader))
|
||||
(eyes eye 2 :inline)
|
||||
(left eye :inline :overlay-at (-> eyes 0))
|
||||
(right eye :inline :offset 112)
|
||||
(level-index int16)
|
||||
(high-res? symbol)
|
||||
(level-texture-page uint32)
|
||||
(art-group-name uint8 67 :offset 201)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype eye-control-array (basic)
|
||||
"An array of [[eye-control]]s."
|
||||
((data eye-control 32 :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype eye-work (structure)
|
||||
"Eye renderer DMA data."
|
||||
((sprite-tmpl dma-gif-packet :inline)
|
||||
(sprite-tmpl2 dma-gif-packet :inline)
|
||||
(adgif-tmpl dma-gif-packet :inline)
|
||||
(blink-table float 10)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *eye-control-array* (new 'static 'eye-control-array))
|
||||
|
||||
(dotimes (v1-5 32)
|
||||
(let ((a0-11 (-> *eye-control-array* data v1-5)))
|
||||
(set! (-> a0-11 process) (the-as uint #f))
|
||||
(set! (-> a0-11 random-time) (the-as uint 60))
|
||||
(set! (-> a0-11 blink) 0.0)
|
||||
(set! (-> a0-11 shaders) (the-as (inline-array adgif-shader) #f))
|
||||
(set! (-> a0-11 level-index) -1)
|
||||
(set! (-> a0-11 high-res?) #f)
|
||||
(set! (-> a0-11 art-group-name 3) (the-as uint 0))
|
||||
(dotimes (a1-11 2)
|
||||
(set! (-> a0-11 eyes a1-11 shader-count) (the-as uint 0))
|
||||
(dotimes (a2-11 8)
|
||||
(set! (-> (the-as eye-control (+ (+ (* a2-11 4) (* 80 a1-11)) (the-as int a0-11))) left shader 0) #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -5,5 +5,636 @@
|
||||
;; name in dgo: foreground-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++merc-mode
|
||||
(defenum merc-mode
|
||||
:type int32
|
||||
(merc 0)
|
||||
(emerc 1)
|
||||
(mercneric 2)
|
||||
(texture 3)
|
||||
(mercneric2 4)
|
||||
(mm5 5)
|
||||
)
|
||||
;; ---merc-mode
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype mercneric-chain (structure)
|
||||
"A DMA chain for drawing with mercneric, and metadata needed to append.
|
||||
This chain is assumed to run with a specific tpage from a specific level available."
|
||||
((first uint32)
|
||||
(next uint32)
|
||||
(state generic-bucket-state :inline)
|
||||
(vu1-bucket bucket-id)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype merc-chain (structure)
|
||||
"A DMA chain for drawing with merc.
|
||||
This chain is assumed to run with a specific tpage from a specific level available."
|
||||
((first dma-packet)
|
||||
(patch dma-packet)
|
||||
(vu1-bucket bucket-id)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype foreground-bucket (structure)
|
||||
"A foreground bucket is merc, emerc, and mercneric chain for a given texture mode."
|
||||
((merc merc-chain :inline)
|
||||
(emerc merc-chain :inline)
|
||||
(mercneric mercneric-chain :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype foreground-level-buckets (structure)
|
||||
"Collection of buckets for a single level.
|
||||
Each bucket has a different texture. The order is:
|
||||
tfrag, pris, shrub, alpha, water, pris, pris2"
|
||||
((data foreground-bucket 10 :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype foreground-bucket-grid (structure)
|
||||
"Array of buckets for each level, plus the single warp chain shared between everybody."
|
||||
((level-buckets foreground-level-buckets 19 :inline)
|
||||
(warp-chain mercneric-chain :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype foreground-regs (structure)
|
||||
"Frequently accessed foreground values. These are in scratchpad for fast access
|
||||
during foreground processing."
|
||||
((dist float)
|
||||
(merc-used uint32)
|
||||
(emerc-used uint32)
|
||||
(mercneric-used uint32)
|
||||
(use-isometric uint32)
|
||||
(base-start dma-packet)
|
||||
(joint-ptr (inline-array joint))
|
||||
(bone-ptr (inline-array bone))
|
||||
(num-bones uint32)
|
||||
(mtxs (inline-array pris-mtx))
|
||||
(dma-buf dma-buffer)
|
||||
(default-texture-index uint32)
|
||||
(mercneric-chain mercneric-chain)
|
||||
(level-buckets foreground-level-buckets)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype foreground-work (structure)
|
||||
"Memory map for scratchpad during foreground processing.
|
||||
This is not used by the renderers, bone matrix, or joint code - just the code
|
||||
that assigns stuff to buckets and prepares DMA for merc (or requests for generic merc)."
|
||||
((regs foreground-regs :inline)
|
||||
(draw-index-map uint8 19 :offset 64)
|
||||
(grid foreground-bucket-grid :inline)
|
||||
(bounds sphere :inline)
|
||||
(lights vu-lights :inline)
|
||||
(distance vector :inline)
|
||||
(next-tmpl dma-packet :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [cache dxwbin a0, 0]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [cache dxwbin a0, 1]
|
||||
(defun invalidate-cache-line ((arg0 pointer))
|
||||
;; og:preserve-this
|
||||
; (.sync.l)
|
||||
; (.cache dxwbin arg0 0)
|
||||
; (.sync.l)
|
||||
; (.cache dxwbin arg0 1)
|
||||
; (.sync.l)
|
||||
0
|
||||
)
|
||||
|
||||
(deftype texscroll-globals (structure)
|
||||
"List of all merc-effects that need texscroll applied."
|
||||
((requests int32)
|
||||
(effects merc-effect 32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype merc-effect-bucket-info (structure)
|
||||
"Scratch info computed per-merc-effect by the foreground code, then later read by merc
|
||||
DMA generation. This is only for the currently-processing merc model's effects."
|
||||
((color-fade rgba)
|
||||
(alpha uint8 :offset 3)
|
||||
(merc-path uint8)
|
||||
(ignore-alpha uint8)
|
||||
(disable-draw uint8)
|
||||
(disable-envmap uint8)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype merc-bucket-info (structure)
|
||||
"Scratch info for the current merc-ctrl. Written by the foreground code, read by merc DMA generation."
|
||||
((light vu-lights :inline)
|
||||
(needs-clip int32)
|
||||
(need-mercprime-if-merc int32)
|
||||
(must-use-mercneric-for-clip int32)
|
||||
(effect merc-effect-bucket-info 64 :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype foreground-globals (structure)
|
||||
"The foreground renderer state: all DMA chains, settings for the current merc-ctrl, texscroll list."
|
||||
((foreground-grid foreground-bucket-grid :inline)
|
||||
(merc-bucket-info merc-bucket-info :inline)
|
||||
(texscroll texscroll-globals :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype shadow-dma-packet (structure)
|
||||
"DMA tag for submitting shadow data."
|
||||
((tag generic-merc-tag :inline)
|
||||
(settings shadow-settings :inline)
|
||||
(geo-ref dma-packet :inline)
|
||||
(mtx-ref dma-packet :inline)
|
||||
(end-tag dma-packet :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *bucket-map* (new 'static 'array bucket-id-16 462
|
||||
(bucket-id-16 tfrag-scissor-l0-tfrag)
|
||||
(bucket-id-16 tie-scissor-l0-tfrag)
|
||||
(bucket-id-16 etie-scissor-l0-tfrag)
|
||||
(bucket-id-16 bucket7)
|
||||
(bucket-id-16 emerc-l0-tfrag)
|
||||
(bucket-id-16 bucket0)
|
||||
(bucket-id-16 etie-l1-tfrag)
|
||||
(bucket-id-16 tfrag-scissor-l1-tfrag)
|
||||
(bucket-id-16 tie-scissor-l1-tfrag)
|
||||
(bucket-id-16 bucket7)
|
||||
(bucket-id-16 merc-l1-tfrag)
|
||||
(bucket-id-16 bucket6)
|
||||
(bucket-id-16 merc-l5-water)
|
||||
(bucket-id-16 gmerc-l5-water)
|
||||
(bucket-id-16 tfrag-l5-water)
|
||||
(bucket-id-16 tex-l5-water)
|
||||
(bucket-id-16 tie-l5-water)
|
||||
(bucket-id-16 emerc-l4-tfrag)
|
||||
(bucket-id-16 etie-l5-water)
|
||||
(bucket-id-16 tie-scissor-l5-water)
|
||||
(bucket-id-16 tfrag-scissor-l5-water)
|
||||
(bucket-id-16 tex-l5-water)
|
||||
(bucket-id-16 etie-scissor-l5-water)
|
||||
(bucket-id-16 etie-l5-tfrag)
|
||||
(bucket-id-16 shrub-l2-shrub)
|
||||
(bucket-id-16 shrub-near-l2-shrub)
|
||||
(bucket-id-16 billboard-l2-shrub)
|
||||
(bucket-id-16 shrub-near-trans-l1-shrub)
|
||||
(bucket-id-16 shrub-vanish-l2-shrub)
|
||||
(bucket-id-16 tie-l0-tfrag)
|
||||
(bucket-id-16 tex-l3-shrub)
|
||||
(bucket-id-16 shrub-l3-shrub)
|
||||
(bucket-id-16 shrub-near-l3-shrub)
|
||||
(bucket-id-16 shrub-near-trans-l1-shrub)
|
||||
(bucket-id-16 billboard-l3-shrub)
|
||||
(bucket-id-16 emerc-l0-tfrag)
|
||||
(bucket-id-16 tex-l3-alpha)
|
||||
(bucket-id-16 tfrag-l3-alpha)
|
||||
(bucket-id-16 tie-l3-alpha)
|
||||
(bucket-id-16 tfrag-scissor-l2-alpha)
|
||||
(bucket-id-16 gmerc-l3-alpha)
|
||||
(bucket-id-16 tie-l1-tfrag)
|
||||
(bucket-id-16 gmerc2-l3-alpha)
|
||||
(bucket-id-16 tex-l4-alpha)
|
||||
(bucket-id-16 tfrag-l4-alpha)
|
||||
(bucket-id-16 tfrag-scissor-l2-alpha)
|
||||
(bucket-id-16 emerc-l4-alpha)
|
||||
(bucket-id-16 emerc-l1-tfrag)
|
||||
(bucket-id-16 bucket634)
|
||||
(bucket-id-16 bucket634)
|
||||
(bucket-id-16 bucket635)
|
||||
(bucket-id-16 bucket633)
|
||||
(bucket-id-16 bucket642)
|
||||
(bucket-id-16 tex-l7-tfrag)
|
||||
(bucket-id-16 bucket643)
|
||||
(bucket-id-16 bucket643)
|
||||
(bucket-id-16 bucket644)
|
||||
(bucket-id-16 bucket633)
|
||||
(bucket-id-16 bucket651)
|
||||
(bucket-id-16 merc-l7-tfrag)
|
||||
(bucket-id-16 merc-l5-water)
|
||||
(bucket-id-16 gmerc-l5-water)
|
||||
(bucket-id-16 tfrag-l5-water)
|
||||
(bucket-id-16 tex-l5-water)
|
||||
(bucket-id-16 tie-l5-water)
|
||||
(bucket-id-16 emerc-l4-tfrag)
|
||||
(bucket-id-16 etie-l5-water)
|
||||
(bucket-id-16 tie-scissor-l5-water)
|
||||
(bucket-id-16 tfrag-scissor-l5-water)
|
||||
(bucket-id-16 tex-l5-water)
|
||||
(bucket-id-16 etie-scissor-l5-water)
|
||||
(bucket-id-16 etie-l5-tfrag)
|
||||
(bucket-id-16 debug-no-zbuf1)
|
||||
(bucket-id-16 tex-hud-hud-alpha)
|
||||
(bucket-id-16 hud-draw-hud-alpha)
|
||||
(bucket-id-16 generic-warp)
|
||||
(bucket-id-16 tex-hud-pris2)
|
||||
(bucket-id-16 tie-vanish-l5-tfrag)
|
||||
(bucket-id-16 hud-draw-pris2)
|
||||
(bucket-id-16 bucket582)
|
||||
(bucket-id-16 debug)
|
||||
(bucket-id-16 generic-warp)
|
||||
(bucket-id-16 debug-no-zbuf2)
|
||||
(bucket-id-16 tie-scissor-l6-tfrag)
|
||||
(bucket-id-16 debug-no-zbuf1)
|
||||
(bucket-id-16 tex-hud-hud-alpha)
|
||||
(bucket-id-16 hud-draw-hud-alpha)
|
||||
(bucket-id-16 generic-warp)
|
||||
(bucket-id-16 bucket768)
|
||||
(bucket-id-16 tie-l8-tfrag)
|
||||
(bucket-id-16 hud-draw-pris2)
|
||||
(bucket-id-16 bucket582)
|
||||
(bucket-id-16 debug)
|
||||
(bucket-id-16 generic-warp)
|
||||
(bucket-id-16 bucket771)
|
||||
(bucket-id-16 etie-l8-tfrag)
|
||||
(bucket-id-16 debug-no-zbuf1)
|
||||
(bucket-id-16 tex-hud-hud-alpha)
|
||||
(bucket-id-16 hud-draw-hud-alpha)
|
||||
(bucket-id-16 generic-warp)
|
||||
(bucket-id-16 bucket770)
|
||||
(bucket-id-16 tfrag-scissor-l8-tfrag)
|
||||
(bucket-id-16 hud-draw-pris2)
|
||||
(bucket-id-16 bucket582)
|
||||
(bucket-id-16 debug)
|
||||
(bucket-id-16 generic-warp)
|
||||
(bucket-id-16 bucket773)
|
||||
(bucket-id-16 tie-scissor-l8-tfrag)
|
||||
(bucket-id-16 debug-no-zbuf1)
|
||||
(bucket-id-16 tex-hud-hud-alpha)
|
||||
(bucket-id-16 hud-draw-hud-alpha)
|
||||
(bucket-id-16 generic-warp)
|
||||
(bucket-id-16 bucket788)
|
||||
(bucket-id-16 merc-l8-tfrag)
|
||||
(bucket-id-16 hud-draw-pris2)
|
||||
(bucket-id-16 bucket582)
|
||||
(bucket-id-16 debug)
|
||||
(bucket-id-16 generic-warp)
|
||||
(bucket-id-16 bucket788)
|
||||
(bucket-id-16 merc-l8-tfrag)
|
||||
(bucket-id-16 etie-l2-tfrag)
|
||||
(bucket-id-16 tfrag-scissor-l2-tfrag)
|
||||
(bucket-id-16 tie-scissor-l2-tfrag)
|
||||
(bucket-id-16 emerc-l1-tfrag)
|
||||
(bucket-id-16 merc-l2-tfrag)
|
||||
(bucket-id-16 bucket1)
|
||||
(bucket-id-16 tie-l3-tfrag)
|
||||
(bucket-id-16 etie-l3-tfrag)
|
||||
(bucket-id-16 tfrag-scissor-l3-tfrag)
|
||||
(bucket-id-16 emerc-l1-tfrag)
|
||||
(bucket-id-16 etie-scissor-l3-tfrag)
|
||||
(bucket-id-16 bucket7)
|
||||
(bucket-id-16 tex-l6-water)
|
||||
(bucket-id-16 merc-l6-water)
|
||||
(bucket-id-16 gmerc-l6-water)
|
||||
(bucket-id-16 gmerc2-l5-water)
|
||||
(bucket-id-16 tfrag-l6-water)
|
||||
(bucket-id-16 gmerc-l4-tfrag)
|
||||
(bucket-id-16 tie-l6-water)
|
||||
(bucket-id-16 etie-l6-water)
|
||||
(bucket-id-16 tie-scissor-l6-water)
|
||||
(bucket-id-16 gmerc2-l5-water)
|
||||
(bucket-id-16 tfrag-scissor-l6-water)
|
||||
(bucket-id-16 tfrag-scissor-l5-tfrag)
|
||||
(bucket-id-16 tex-l4-shrub)
|
||||
(bucket-id-16 shrub-l4-shrub)
|
||||
(bucket-id-16 shrub-near-l4-shrub)
|
||||
(bucket-id-16 shrub-vanish-l3-shrub)
|
||||
(bucket-id-16 billboard-l4-shrub)
|
||||
(bucket-id-16 etie-l0-tfrag)
|
||||
(bucket-id-16 gmerc2-l4-shrub)
|
||||
(bucket-id-16 tex-l5-shrub)
|
||||
(bucket-id-16 shrub-l5-shrub)
|
||||
(bucket-id-16 shrub-vanish-l3-shrub)
|
||||
(bucket-id-16 shrub-near-l5-shrub)
|
||||
(bucket-id-16 gmerc-l0-tfrag)
|
||||
(bucket-id-16 gmerc2-l4-alpha)
|
||||
(bucket-id-16 tex-l5-alpha)
|
||||
(bucket-id-16 tfrag-l5-alpha)
|
||||
(bucket-id-16 gmerc-l4-alpha)
|
||||
(bucket-id-16 emerc-l5-alpha)
|
||||
(bucket-id-16 etie-l1-tfrag)
|
||||
(bucket-id-16 etie-scissor-l5-alpha)
|
||||
(bucket-id-16 gmerc2-l5-alpha)
|
||||
(bucket-id-16 tex-l6-alpha)
|
||||
(bucket-id-16 gmerc-l4-alpha)
|
||||
(bucket-id-16 merc-l6-alpha)
|
||||
(bucket-id-16 gmerc-l1-tfrag)
|
||||
(bucket-id-16 bucket653)
|
||||
(bucket-id-16 bucket653)
|
||||
(bucket-id-16 bucket654)
|
||||
(bucket-id-16 bucket652)
|
||||
(bucket-id-16 bucket661)
|
||||
(bucket-id-16 tfrag-l7-tfrag)
|
||||
(bucket-id-16 bucket662)
|
||||
(bucket-id-16 bucket662)
|
||||
(bucket-id-16 bucket663)
|
||||
(bucket-id-16 bucket652)
|
||||
(bucket-id-16 bucket670)
|
||||
(bucket-id-16 emerc-l7-tfrag)
|
||||
(bucket-id-16 tex-l6-water)
|
||||
(bucket-id-16 merc-l6-water)
|
||||
(bucket-id-16 gmerc-l6-water)
|
||||
(bucket-id-16 gmerc2-l5-water)
|
||||
(bucket-id-16 tfrag-l6-water)
|
||||
(bucket-id-16 gmerc-l4-tfrag)
|
||||
(bucket-id-16 tie-l6-water)
|
||||
(bucket-id-16 etie-l6-water)
|
||||
(bucket-id-16 tie-scissor-l6-water)
|
||||
(bucket-id-16 gmerc2-l5-water)
|
||||
(bucket-id-16 tfrag-scissor-l6-water)
|
||||
(bucket-id-16 tfrag-scissor-l5-tfrag)
|
||||
(bucket-id-16 bucket586)
|
||||
(bucket-id-16 bucket587)
|
||||
(bucket-id-16 bucket588)
|
||||
(bucket-id-16 debug-menu)
|
||||
(bucket-id-16 bucket589)
|
||||
(bucket-id-16 gmerc2-l5-tfrag)
|
||||
(bucket-id-16 bucket590)
|
||||
(bucket-id-16 bucket591)
|
||||
(bucket-id-16 bucket592)
|
||||
(bucket-id-16 debug-menu)
|
||||
(bucket-id-16 bucket593)
|
||||
(bucket-id-16 etie-scissor-l6-tfrag)
|
||||
(bucket-id-16 bucket586)
|
||||
(bucket-id-16 bucket587)
|
||||
(bucket-id-16 bucket588)
|
||||
(bucket-id-16 debug-menu)
|
||||
(bucket-id-16 bucket768)
|
||||
(bucket-id-16 tie-l8-tfrag)
|
||||
(bucket-id-16 bucket590)
|
||||
(bucket-id-16 bucket591)
|
||||
(bucket-id-16 bucket592)
|
||||
(bucket-id-16 debug-menu)
|
||||
(bucket-id-16 bucket771)
|
||||
(bucket-id-16 etie-l8-tfrag)
|
||||
(bucket-id-16 bucket586)
|
||||
(bucket-id-16 bucket587)
|
||||
(bucket-id-16 bucket588)
|
||||
(bucket-id-16 debug-menu)
|
||||
(bucket-id-16 bucket770)
|
||||
(bucket-id-16 tfrag-scissor-l8-tfrag)
|
||||
(bucket-id-16 bucket590)
|
||||
(bucket-id-16 bucket591)
|
||||
(bucket-id-16 bucket592)
|
||||
(bucket-id-16 debug-menu)
|
||||
(bucket-id-16 bucket773)
|
||||
(bucket-id-16 tie-scissor-l8-tfrag)
|
||||
(bucket-id-16 bucket586)
|
||||
(bucket-id-16 bucket587)
|
||||
(bucket-id-16 bucket588)
|
||||
(bucket-id-16 debug-menu)
|
||||
(bucket-id-16 bucket788)
|
||||
(bucket-id-16 merc-l8-tfrag)
|
||||
(bucket-id-16 bucket590)
|
||||
(bucket-id-16 bucket591)
|
||||
(bucket-id-16 bucket592)
|
||||
(bucket-id-16 debug-menu)
|
||||
(bucket-id-16 bucket788)
|
||||
(bucket-id-16 merc-l8-tfrag)
|
||||
(bucket-id-16 tie-l4-tfrag)
|
||||
(bucket-id-16 etie-l4-tfrag)
|
||||
(bucket-id-16 tfrag-scissor-l4-tfrag)
|
||||
(bucket-id-16 merc-l3-tfrag)
|
||||
(bucket-id-16 etie-scissor-l4-tfrag)
|
||||
(bucket-id-16 bucket2)
|
||||
(bucket-id-16 tfrag-l5-tfrag)
|
||||
(bucket-id-16 tie-l5-tfrag)
|
||||
(bucket-id-16 etie-l5-tfrag)
|
||||
(bucket-id-16 merc-l3-tfrag)
|
||||
(bucket-id-16 tie-scissor-l5-tfrag)
|
||||
(bucket-id-16 hfrag)
|
||||
(bucket-id-16 gmerc2-l6-water)
|
||||
(bucket-id-16 tex-l7-water)
|
||||
(bucket-id-16 merc-l7-water)
|
||||
(bucket-id-16 etie-scissor-l6-water)
|
||||
(bucket-id-16 gmerc-l7-water)
|
||||
(bucket-id-16 tie-vanish-l4-tfrag)
|
||||
(bucket-id-16 tfrag-l7-water)
|
||||
(bucket-id-16 tie-l7-water)
|
||||
(bucket-id-16 etie-l7-water)
|
||||
(bucket-id-16 etie-scissor-l6-water)
|
||||
(bucket-id-16 tie-scissor-l7-water)
|
||||
(bucket-id-16 tie-scissor-l5-tfrag)
|
||||
(bucket-id-16 gmerc2-l5-shrub)
|
||||
(bucket-id-16 tex-l6-shrub)
|
||||
(bucket-id-16 shrub-l6-shrub)
|
||||
(bucket-id-16 billboard-l5-shrub)
|
||||
(bucket-id-16 shrub-near-l6-shrub)
|
||||
(bucket-id-16 tfrag-scissor-l0-tfrag)
|
||||
(bucket-id-16 gmerc-l6-shrub)
|
||||
(bucket-id-16 gmerc2-l6-shrub)
|
||||
(bucket-id-16 tex-l7-shrub)
|
||||
(bucket-id-16 billboard-l5-shrub)
|
||||
(bucket-id-16 shrub-l7-shrub)
|
||||
(bucket-id-16 tie-vanish-l0-tfrag)
|
||||
(bucket-id-16 etie-scissor-l6-alpha)
|
||||
(bucket-id-16 gmerc2-l6-alpha)
|
||||
(bucket-id-16 tex-l7-alpha)
|
||||
(bucket-id-16 emerc-l6-alpha)
|
||||
(bucket-id-16 merc-l7-alpha)
|
||||
(bucket-id-16 tfrag-scissor-l1-tfrag)
|
||||
(bucket-id-16 tie-scissor-l7-alpha)
|
||||
(bucket-id-16 etie-scissor-l7-alpha)
|
||||
(bucket-id-16 gmerc2-l7-alpha)
|
||||
(bucket-id-16 emerc-l6-alpha)
|
||||
(bucket-id-16 etie-l8-alpha)
|
||||
(bucket-id-16 tie-vanish-l1-tfrag)
|
||||
(bucket-id-16 bucket672)
|
||||
(bucket-id-16 bucket672)
|
||||
(bucket-id-16 bucket673)
|
||||
(bucket-id-16 bucket671)
|
||||
(bucket-id-16 bucket680)
|
||||
(bucket-id-16 tie-l7-tfrag)
|
||||
(bucket-id-16 bucket681)
|
||||
(bucket-id-16 bucket681)
|
||||
(bucket-id-16 bucket682)
|
||||
(bucket-id-16 bucket671)
|
||||
(bucket-id-16 bucket689)
|
||||
(bucket-id-16 gmerc-l7-tfrag)
|
||||
(bucket-id-16 gmerc2-l6-water)
|
||||
(bucket-id-16 tex-l7-water)
|
||||
(bucket-id-16 merc-l7-water)
|
||||
(bucket-id-16 etie-scissor-l6-water)
|
||||
(bucket-id-16 gmerc-l7-water)
|
||||
(bucket-id-16 tie-vanish-l4-tfrag)
|
||||
(bucket-id-16 tfrag-l7-water)
|
||||
(bucket-id-16 tie-l7-water)
|
||||
(bucket-id-16 etie-l7-water)
|
||||
(bucket-id-16 etie-scissor-l6-water)
|
||||
(bucket-id-16 tie-scissor-l7-water)
|
||||
(bucket-id-16 tie-scissor-l5-tfrag)
|
||||
(bucket-id-16 bucket595)
|
||||
(bucket-id-16 bucket596)
|
||||
(bucket-id-16 bucket597)
|
||||
(bucket-id-16 bucket594)
|
||||
(bucket-id-16 bucket598)
|
||||
(bucket-id-16 tex-l6-tfrag)
|
||||
(bucket-id-16 bucket599)
|
||||
(bucket-id-16 bucket600)
|
||||
(bucket-id-16 bucket601)
|
||||
(bucket-id-16 bucket594)
|
||||
(bucket-id-16 bucket602)
|
||||
(bucket-id-16 merc-l6-tfrag)
|
||||
(bucket-id-16 bucket595)
|
||||
(bucket-id-16 bucket596)
|
||||
(bucket-id-16 bucket597)
|
||||
(bucket-id-16 bucket594)
|
||||
(bucket-id-16 bucket768)
|
||||
(bucket-id-16 tie-l8-tfrag)
|
||||
(bucket-id-16 bucket599)
|
||||
(bucket-id-16 bucket600)
|
||||
(bucket-id-16 bucket601)
|
||||
(bucket-id-16 bucket594)
|
||||
(bucket-id-16 bucket771)
|
||||
(bucket-id-16 etie-l8-tfrag)
|
||||
(bucket-id-16 bucket595)
|
||||
(bucket-id-16 bucket596)
|
||||
(bucket-id-16 bucket597)
|
||||
(bucket-id-16 bucket594)
|
||||
(bucket-id-16 bucket770)
|
||||
(bucket-id-16 tfrag-scissor-l8-tfrag)
|
||||
(bucket-id-16 bucket599)
|
||||
(bucket-id-16 bucket600)
|
||||
(bucket-id-16 bucket601)
|
||||
(bucket-id-16 bucket594)
|
||||
(bucket-id-16 bucket773)
|
||||
(bucket-id-16 tie-scissor-l8-tfrag)
|
||||
(bucket-id-16 bucket595)
|
||||
(bucket-id-16 bucket596)
|
||||
(bucket-id-16 bucket597)
|
||||
(bucket-id-16 bucket594)
|
||||
(bucket-id-16 bucket788)
|
||||
(bucket-id-16 merc-l8-tfrag)
|
||||
(bucket-id-16 bucket599)
|
||||
(bucket-id-16 bucket600)
|
||||
(bucket-id-16 bucket601)
|
||||
(bucket-id-16 bucket594)
|
||||
(bucket-id-16 bucket788)
|
||||
(bucket-id-16 merc-l8-tfrag)
|
||||
(bucket-id-16 tfrag-l6-tfrag)
|
||||
(bucket-id-16 tie-l6-tfrag)
|
||||
(bucket-id-16 etie-l6-tfrag)
|
||||
(bucket-id-16 etie-scissor-l5-tfrag)
|
||||
(bucket-id-16 tie-scissor-l6-tfrag)
|
||||
(bucket-id-16 blit)
|
||||
(bucket-id-16 tex-l7-tfrag)
|
||||
(bucket-id-16 tfrag-l7-tfrag)
|
||||
(bucket-id-16 tie-l7-tfrag)
|
||||
(bucket-id-16 etie-scissor-l5-tfrag)
|
||||
(bucket-id-16 tfrag-scissor-l7-tfrag)
|
||||
(bucket-id-16 hfrag-scissor)
|
||||
(bucket-id-16 etie-scissor-l7-water)
|
||||
(bucket-id-16 gmerc2-l7-water)
|
||||
(bucket-id-16 tex-l8-water)
|
||||
(bucket-id-16 tfrag-scissor-l7-water)
|
||||
(bucket-id-16 merc-l8-water)
|
||||
(bucket-id-16 gmerc2-l4-tfrag)
|
||||
(bucket-id-16 gmerc-l8-water)
|
||||
(bucket-id-16 tfrag-l8-water)
|
||||
(bucket-id-16 tie-l8-water)
|
||||
(bucket-id-16 tfrag-scissor-l7-water)
|
||||
(bucket-id-16 etie-l8-water)
|
||||
(bucket-id-16 etie-scissor-l5-tfrag)
|
||||
(bucket-id-16 gmerc-l7-shrub)
|
||||
(bucket-id-16 gmerc2-l7-shrub)
|
||||
(bucket-id-16 tex-l8-shrub)
|
||||
(bucket-id-16 shrub-near-l7-shrub)
|
||||
(bucket-id-16 shrub-l8-shrub)
|
||||
(bucket-id-16 tie-scissor-l0-tfrag)
|
||||
(bucket-id-16 emerc-l8-shrub)
|
||||
(bucket-id-16 gmerc-l8-shrub)
|
||||
(bucket-id-16 gmerc2-l8-shrub)
|
||||
(bucket-id-16 shrub-near-l7-shrub)
|
||||
(bucket-id-16 tex-l9-shrub)
|
||||
(bucket-id-16 gmerc2-l0-tfrag)
|
||||
(bucket-id-16 tie-scissor-l8-alpha)
|
||||
(bucket-id-16 etie-scissor-l8-alpha)
|
||||
(bucket-id-16 gmerc2-l8-alpha)
|
||||
(bucket-id-16 merc-l8-alpha)
|
||||
(bucket-id-16 etie-l9-alpha)
|
||||
(bucket-id-16 tie-scissor-l1-tfrag)
|
||||
(bucket-id-16 tfrag-scissor-l9-alpha)
|
||||
(bucket-id-16 tie-scissor-l9-alpha)
|
||||
(bucket-id-16 etie-scissor-l9-alpha)
|
||||
(bucket-id-16 merc-l8-alpha)
|
||||
(bucket-id-16 emerc-lcom-tfrag)
|
||||
(bucket-id-16 gmerc2-l1-tfrag)
|
||||
(bucket-id-16 bucket691)
|
||||
(bucket-id-16 bucket691)
|
||||
(bucket-id-16 bucket692)
|
||||
(bucket-id-16 bucket690)
|
||||
(bucket-id-16 bucket699)
|
||||
(bucket-id-16 etie-l7-tfrag)
|
||||
(bucket-id-16 bucket700)
|
||||
(bucket-id-16 bucket700)
|
||||
(bucket-id-16 bucket701)
|
||||
(bucket-id-16 bucket690)
|
||||
(bucket-id-16 bucket708)
|
||||
(bucket-id-16 tie-vanish-l7-tfrag)
|
||||
(bucket-id-16 etie-scissor-l7-water)
|
||||
(bucket-id-16 gmerc2-l7-water)
|
||||
(bucket-id-16 tex-l8-water)
|
||||
(bucket-id-16 tfrag-scissor-l7-water)
|
||||
(bucket-id-16 merc-l8-water)
|
||||
(bucket-id-16 gmerc2-l4-tfrag)
|
||||
(bucket-id-16 gmerc-l8-water)
|
||||
(bucket-id-16 tfrag-l8-water)
|
||||
(bucket-id-16 tie-l8-water)
|
||||
(bucket-id-16 tfrag-scissor-l7-water)
|
||||
(bucket-id-16 etie-l8-water)
|
||||
(bucket-id-16 etie-scissor-l5-tfrag)
|
||||
(bucket-id-16 bucket604)
|
||||
(bucket-id-16 bucket605)
|
||||
(bucket-id-16 bucket606)
|
||||
(bucket-id-16 bucket603)
|
||||
(bucket-id-16 bucket607)
|
||||
(bucket-id-16 tfrag-l6-tfrag)
|
||||
(bucket-id-16 bucket608)
|
||||
(bucket-id-16 bucket609)
|
||||
(bucket-id-16 bucket610)
|
||||
(bucket-id-16 bucket603)
|
||||
(bucket-id-16 bucket611)
|
||||
(bucket-id-16 emerc-l6-tfrag)
|
||||
(bucket-id-16 bucket604)
|
||||
(bucket-id-16 bucket605)
|
||||
(bucket-id-16 bucket606)
|
||||
(bucket-id-16 bucket603)
|
||||
(bucket-id-16 bucket768)
|
||||
(bucket-id-16 tie-l8-tfrag)
|
||||
(bucket-id-16 bucket608)
|
||||
(bucket-id-16 bucket609)
|
||||
(bucket-id-16 bucket610)
|
||||
(bucket-id-16 bucket603)
|
||||
(bucket-id-16 bucket771)
|
||||
(bucket-id-16 etie-l8-tfrag)
|
||||
(bucket-id-16 bucket604)
|
||||
(bucket-id-16 bucket605)
|
||||
(bucket-id-16 bucket606)
|
||||
(bucket-id-16 bucket603)
|
||||
(bucket-id-16 bucket770)
|
||||
(bucket-id-16 tfrag-scissor-l8-tfrag)
|
||||
)
|
||||
)
|
||||
|
||||
(defun vu1-bucket-map ((arg0 int) (arg1 int) (arg2 int) (arg3 merc-mode))
|
||||
(-> *bucket-map* (+ (+ (* 120 arg0) (* 12 arg1) (* 6 arg2)) (the-as int arg3)))
|
||||
)
|
||||
|
||||
@@ -7,3 +7,100 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype vu-lights (structure)
|
||||
((direction vector 3 :inline)
|
||||
(color vector 3 :inline)
|
||||
(ambient vector :inline)
|
||||
(fade-int uint32 :offset 44)
|
||||
(fade-flags uint32 :offset 28)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype light (structure)
|
||||
"extra: {?, shadow, ?, ?}"
|
||||
((direction vector :inline)
|
||||
(color rgbaf :inline)
|
||||
(extra vector :inline)
|
||||
(level float :overlay-at (-> extra data 0))
|
||||
(luminance float :overlay-at (-> extra data 2))
|
||||
(priority float :overlay-at (-> extra data 3))
|
||||
(bytes uint8 4 :overlay-at (-> extra data 1))
|
||||
(mask uint16 :overlay-at (-> extra data 1))
|
||||
(palette-index int8 :overlay-at (-> bytes 3))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype light-shadow-mask (uint32)
|
||||
()
|
||||
)
|
||||
|
||||
(deftype light-sphere (structure)
|
||||
((name string)
|
||||
(bsphere vector :inline)
|
||||
(direction vector :inline)
|
||||
(color vector :inline)
|
||||
(decay-start float :offset 4)
|
||||
(ambient-point-ratio float :offset 8)
|
||||
(brightness float :offset 12)
|
||||
(bytes uint8 4 :overlay-at (-> color data 3))
|
||||
(mask uint16 :overlay-at (-> color data 3))
|
||||
(palette-index int8 :overlay-at (-> bytes 3))
|
||||
(shadow uint32 :overlay-at (-> direction data 0))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype light-hash-bucket (structure)
|
||||
((index uint16)
|
||||
(count uint16)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype light-hash (basic)
|
||||
((num-lights uint16)
|
||||
(num-indices uint16)
|
||||
(num-buckets uint16)
|
||||
(bucket-step uint8 2)
|
||||
(base-trans vector :inline)
|
||||
(axis-scale vector :inline)
|
||||
(dimension-array vector4w :inline)
|
||||
(bucket-array (inline-array light-hash-bucket))
|
||||
(index-array pointer)
|
||||
(light-sphere-array (inline-array light-sphere))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype light-hash-work (structure)
|
||||
((ones vector4w :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *light-hash* (the-as light-hash #f))
|
||||
|
||||
(defmethod print ((this light))
|
||||
(format
|
||||
#t
|
||||
"#<light [~F] ~F ~F ~F "
|
||||
(-> this extra x)
|
||||
(-> this direction x)
|
||||
(-> this direction y)
|
||||
(-> this direction z)
|
||||
)
|
||||
(format #t "~F ~F ~F @ #x~X>" (-> this color x) (-> this color y) (-> this color z) this)
|
||||
this
|
||||
)
|
||||
|
||||
(deftype light-group (structure)
|
||||
((dir0 light :inline)
|
||||
(dir1 light :inline)
|
||||
(dir2 light :inline)
|
||||
(ambi light :inline)
|
||||
(lights light 4 :inline :overlay-at dir0)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,108 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype merc-matrix (structure)
|
||||
((quad uint128 8)
|
||||
(vector vector 8 :inline :overlay-at (-> quad 0))
|
||||
(tag uint64 :overlay-at (-> quad 0))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-merc-tag (dma-packet)
|
||||
((next-ptr uint32 :overlay-at vif1)
|
||||
(size uint32 :overlay-at vif0)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-merc-ctrl (structure)
|
||||
((tag generic-merc-tag :inline)
|
||||
(lights vu-lights :inline)
|
||||
(header merc-ctrl-header :inline)
|
||||
(effect merc-effect :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-merc-ctrl-with-sfx (generic-merc-ctrl)
|
||||
((sfx-data uint128 11)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-merc-input (structure)
|
||||
((geo-tag generic-merc-tag :inline)
|
||||
(geo-block uint8 1296)
|
||||
(byte-header merc-byte-header :inline :overlay-at (-> geo-block 0))
|
||||
(matrix merc-matrix 9 :inline)
|
||||
(control generic-merc-ctrl-with-sfx :inline)
|
||||
(end-tag generic-merc-tag :inline)
|
||||
(shader adgif-shader :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-merc-output (structure)
|
||||
((info gsf-info :inline)
|
||||
(header gsf-header :inline)
|
||||
(index-kick-table uint16 80)
|
||||
(index-table uint8 160 :overlay-at (-> index-kick-table 0))
|
||||
(inverse-table uint8 256)
|
||||
(vertex-table gsf-vertex 72 :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-merc-dcache (structure)
|
||||
((output-a generic-merc-output :inline)
|
||||
(output-b generic-merc-output :inline)
|
||||
(inv-table-1 uint8 544)
|
||||
(inv-table-7 uint8 544)
|
||||
(inv-safety uint8 16)
|
||||
(effect-data uint8 1584)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype gm-shadow (structure)
|
||||
((perspective matrix :inline)
|
||||
(isometric matrix :inline)
|
||||
(inv-camera-rot matrix :inline)
|
||||
(envmap-shader adgif-shader :inline)
|
||||
(current-chain uint32)
|
||||
(next-chain uint32)
|
||||
(buf-index uint32)
|
||||
(fragment-count uint32)
|
||||
(write-limit int32)
|
||||
(indexed-input-base generic-merc-input)
|
||||
(other-input-base generic-merc-input)
|
||||
(indexed-output-base generic-merc-output)
|
||||
(other-output-base generic-merc-output)
|
||||
(p-input uint32)
|
||||
(gsf-buf generic-merc-dcache)
|
||||
(p-fheader merc-fp-header)
|
||||
(curr-chain basic)
|
||||
(mercneric-convert basic)
|
||||
(generic-prepare-dma-single basic)
|
||||
(generic-prepare-dma-double basic)
|
||||
(generic-light-proc basic)
|
||||
(generic-envmap-proc basic)
|
||||
(high-speed-reject basic)
|
||||
(dummy-0 uint32)
|
||||
(hsr-xmult vector :inline)
|
||||
(hsr-ymult vector :inline)
|
||||
(warp-consts vector :inline)
|
||||
(warp-nums vector :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-merc-work (structure)
|
||||
((input-a generic-merc-input :inline)
|
||||
(input-b generic-merc-input :inline)
|
||||
(ctrl generic-merc-ctrl-with-sfx :inline)
|
||||
(shadow gm-shadow :inline)
|
||||
(stack uint128 16)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -5,5 +5,408 @@
|
||||
;; name in dgo: merc-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++effect-bits
|
||||
(defenum effect-bits
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(texscroll 0)
|
||||
(no-fade-out 1) ;; translucent.
|
||||
(ripple 2)
|
||||
(emerc 3) ;; envmap??
|
||||
(ignore-tod-for-envmap-tint 4) ;; color thing
|
||||
(force-mercneric 5) ;; some mercneric-only effect
|
||||
(cross-fade 6) ;; WARP?
|
||||
(ignore-alpha 7)
|
||||
)
|
||||
;; ---effect-bits
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype ripple-merc-query (inline-array-class)
|
||||
"Information about which merc vertices to apply the 'ripple' effect to."
|
||||
((start-vertex int32)
|
||||
(vertex-skip int32)
|
||||
(vertex-count int32)
|
||||
(current-loc int32)
|
||||
(data vector :inline :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(set! (-> ripple-merc-query heap-base) (the-as uint 16))
|
||||
|
||||
(deftype merc-byte-header (structure)
|
||||
"Header for a single [[merc-fragment]] uploaded to the VU."
|
||||
((srcdest-off uint8)
|
||||
(rgba-off uint8)
|
||||
(lump-off uint8)
|
||||
(fp-off uint8)
|
||||
(mat1-cnt uint8)
|
||||
(mat2-cnt uint8)
|
||||
(mat3-cnt uint8)
|
||||
(samecopy-cnt uint8)
|
||||
(crosscopy-cnt uint8)
|
||||
(strip-len uint8)
|
||||
(mm-quadword-fp-off uint8)
|
||||
(mm-quadword-size uint8)
|
||||
(perc-off uint8)
|
||||
(mat-slot uint8 10)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype merc-fragment (structure)
|
||||
"A single merc fragment that fits into VU memory."
|
||||
((header merc-byte-header :inline)
|
||||
(rest uint8 1)
|
||||
)
|
||||
(:methods
|
||||
(login-adgifs (_type_) merc-fragment)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype merc-vtx (structure)
|
||||
"A packed merc vertex."
|
||||
((mat-0 uint8)
|
||||
(mat-1 uint8)
|
||||
(nrm-x uint8)
|
||||
(pos-x uint8)
|
||||
(dst-0 uint8)
|
||||
(dst-1 uint8)
|
||||
(nrm-y uint8)
|
||||
(pos-y uint8)
|
||||
(tex-s uint8)
|
||||
(tex-t uint8)
|
||||
(nrm-z uint8)
|
||||
(pos-z uint8)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype merc-fp-header (structure)
|
||||
"Merc header for a [[merc-fragment]]'s floating point data."
|
||||
((x-add float)
|
||||
(y-add float)
|
||||
(z-add float)
|
||||
(shader-cnt uint8)
|
||||
(kick-info-offset uint8)
|
||||
(kick-info-step uint8)
|
||||
(hword-cnt uint8)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; WARN: Return type mismatch int vs merc-fp-header.
|
||||
(defun merc-fragment-fp-data ((frag merc-fragment))
|
||||
"Get the floating point data of a [[merc-fragment]]."
|
||||
(the-as merc-fp-header (+ (the-as uint frag) (* (-> frag header mm-quadword-fp-off) 16)))
|
||||
)
|
||||
|
||||
(deftype merc-mat-dest (structure)
|
||||
"Metadata for a merc matrix upload."
|
||||
((matrix-number uint8)
|
||||
(matrix-dest uint8)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype merc-fragment-control (structure)
|
||||
"Data about a [[merc-fragment]] needed for merc DMA generation."
|
||||
((unsigned-four-count uint8)
|
||||
(lump-four-count uint8)
|
||||
(fp-qwc uint8)
|
||||
(mat-xfer-count uint8)
|
||||
(mat-dest-data merc-mat-dest :inline :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype merc-blend-data (structure)
|
||||
"Packed BLERC data."
|
||||
((int8-data int8 :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype merc-blend-ctrl (structure)
|
||||
"Information about the vertices of a model modified by BLERC."
|
||||
((blend-vtx-count uint8)
|
||||
(nonzero-index-count uint8)
|
||||
(bt-index uint8 :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype mei-envmap-tint (structure)
|
||||
"Data for the extra 'envmap tint' effect."
|
||||
((fade0 float)
|
||||
(fade1 float)
|
||||
(tint rgba)
|
||||
(dummy int32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype mei-texture-scroll (structure)
|
||||
"Data for the extra 'texscroll' effect."
|
||||
((max-dist float)
|
||||
(st-int-scale uint8)
|
||||
(time-factor uint8)
|
||||
(scroll-dir uint8)
|
||||
(cached-time uint8)
|
||||
(time-delta uint8)
|
||||
(dummy uint8 7)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype mei-ripple (structure)
|
||||
"Data for the extra 'ripple' effect."
|
||||
((x-base float)
|
||||
(z-base float)
|
||||
(grid-size float)
|
||||
(angle float)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype merc-extra-info (structure)
|
||||
"Info for merc extra effects."
|
||||
((envmap-tint-offset uint8)
|
||||
(shader-offset uint8)
|
||||
(texture-scroll-offset uint8)
|
||||
(ripple-offset uint8)
|
||||
(dummy uint8 12)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype merc-effect (structure)
|
||||
"A collection of [[merc-fragment]]s with data for any extra effects."
|
||||
((frag-geo merc-fragment)
|
||||
(frag-ctrl merc-fragment-control)
|
||||
(blend-data merc-blend-data)
|
||||
(blend-ctrl merc-blend-ctrl)
|
||||
(merc-effect-version uint8)
|
||||
(effect-bits effect-bits)
|
||||
(frag-count uint16)
|
||||
(blend-frag-count uint16)
|
||||
(tri-count uint16)
|
||||
(dvert-count uint16)
|
||||
(texture-index uint8)
|
||||
(effect-usage uint8)
|
||||
(extra-info merc-extra-info)
|
||||
)
|
||||
(:methods
|
||||
(login-adgifs (_type_) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype merc-eye-ctrl (structure)
|
||||
"Eye info for both eyes of a merc model."
|
||||
((eye-slot int8)
|
||||
(shader-offset int8)
|
||||
(shader-count int8)
|
||||
(eye-ctrl-index int8)
|
||||
(shader adgif-shader 6 :inline)
|
||||
(left-iris-shader adgif-shader :inline :overlay-at (-> shader 0))
|
||||
(left-pupil-shader adgif-shader :inline :overlay-at (-> shader 1))
|
||||
(left-lid-shader adgif-shader :inline :overlay-at (-> shader 2))
|
||||
(right-iris-shader adgif-shader :inline :overlay-at (-> shader 3))
|
||||
(right-pupil-shader adgif-shader :inline :overlay-at (-> shader 4))
|
||||
(right-lid-shader adgif-shader :inline :overlay-at (-> shader 5))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype merc-eye-anim-frame (structure)
|
||||
"A single frame of a merc eye animation."
|
||||
((pupil-trans-x int8)
|
||||
(pupil-trans-y int8)
|
||||
(blink int8)
|
||||
(iris-scale int8 :offset 4)
|
||||
(pupil-scale int8 :offset 5)
|
||||
(lid-scale int8 :offset 6)
|
||||
(dword uint64 :overlay-at pupil-trans-x)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype merc-eye-anim-block (structure)
|
||||
"A list of eye animation frames."
|
||||
((max-frame int16)
|
||||
(data merc-eye-anim-frame :inline :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype texture-usage-group (structure)
|
||||
((data texture-masks 7 :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype merc-ctrl-header (structure)
|
||||
"The header for a [[merc-ctrl]],
|
||||
containing metadata about the model used for drawing."
|
||||
((xyz-scale float)
|
||||
(st-magic uint32)
|
||||
(st-out-a uint32)
|
||||
(st-out-b uint32)
|
||||
(st-vif-add uint32)
|
||||
(st-int-off uint16)
|
||||
(st-int-scale uint16)
|
||||
(effect-count uint32)
|
||||
(blend-target-count uint32)
|
||||
(fragment-count uint16)
|
||||
(tri-count uint16)
|
||||
(matrix-count uint8)
|
||||
(shader-count uint8)
|
||||
(transform-vertex-count uint16)
|
||||
(dvert-count uint16)
|
||||
(one-mat-count uint16)
|
||||
(two-mat-count uint16)
|
||||
(two-mat-reuse-count uint16)
|
||||
(three-mat-count uint16)
|
||||
(three-mat-reuse-count uint16)
|
||||
(shader-upload-count uint8)
|
||||
(matrix-upload-count uint8)
|
||||
(same-copy-count uint16)
|
||||
(cross-copy-count uint16)
|
||||
(num-verts uint16)
|
||||
(longest-edge float)
|
||||
(eye-ctrl merc-eye-ctrl)
|
||||
(pad uint32 3)
|
||||
(masks-padding texture-masks :inline)
|
||||
(texture-usage-group texture-usage-group :overlay-at (-> masks-padding data 0 mask data 0))
|
||||
(dummy-bytes uint8 :dynamic :overlay-at fragment-count)
|
||||
(envmap-tint uint32 :overlay-at fragment-count)
|
||||
(query basic :overlay-at matrix-count)
|
||||
(needs-clip uint8 :overlay-at dvert-count)
|
||||
(use-isometric uint8 :offset 41)
|
||||
(use-attached-shader uint8 :overlay-at one-mat-count)
|
||||
(display-triangles uint8 :offset 43)
|
||||
(death-vertex-skip uint16 :overlay-at two-mat-count)
|
||||
(death-start-vertex uint16 :overlay-at two-mat-reuse-count)
|
||||
(death-effect uint32 :overlay-at three-mat-count)
|
||||
(use-translucent uint8 :overlay-at shader-upload-count)
|
||||
(display-this-fragment uint8 :overlay-at matrix-upload-count)
|
||||
(use-warp uint8 :overlay-at same-copy-count)
|
||||
(ignore-alpha uint8 :offset 55)
|
||||
(force-fade uint8 :overlay-at cross-copy-count)
|
||||
(disable-fog uint8 :offset 57)
|
||||
(disable-envmap uint8 :overlay-at num-verts)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype merc-ctrl (art-element)
|
||||
"The merc data for a single model as it's stored in an art group.
|
||||
Consists of a header and a list of [[merc-effect]]s."
|
||||
((num-joints int32 :overlay-at length)
|
||||
(seg-table (array uint64) :overlay-at (-> pad 0))
|
||||
(header merc-ctrl-header :inline)
|
||||
(effect merc-effect :inline :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype merc-vu1-low-mem (structure)
|
||||
((tri-strip-gif gs-gif-tag :inline)
|
||||
(ad-gif gs-gif-tag :inline)
|
||||
(hvdf-offset vector :inline)
|
||||
(perspective uint128 4)
|
||||
(fog vector :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype emerc-vu1-low-mem (structure)
|
||||
((tri-strip-gif gs-gif-tag :inline)
|
||||
(ad-gif gs-gif-tag :inline)
|
||||
(hvdf-offset vector :inline)
|
||||
(perspective vector 4 :inline)
|
||||
(fog vector :inline)
|
||||
(unperspect vector :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype texture-login-data (structure)
|
||||
((default-texture-index int32)
|
||||
(current-texture-index int32)
|
||||
(texture-usage-group texture-usage-group)
|
||||
(merc-ctrl-header merc-ctrl-header)
|
||||
(name basic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype ripple-wave (structure)
|
||||
((scale float)
|
||||
(offs float)
|
||||
(xdiv int16)
|
||||
(zdiv int16)
|
||||
(speed float)
|
||||
(xmul float)
|
||||
(zmul float)
|
||||
(delta float)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype ripple-wave-set (basic)
|
||||
((count int32)
|
||||
(converted basic)
|
||||
(normal-scale float)
|
||||
(wave ripple-wave 4 :inline)
|
||||
(frame-save uint64)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype ripple-control (basic)
|
||||
((global-scale float)
|
||||
(last-frame-scale float)
|
||||
(close-fade-dist float)
|
||||
(far-fade-dist float)
|
||||
(faded-scale float)
|
||||
(individual-normal-scale float)
|
||||
(waveform ripple-wave-set)
|
||||
(send-query symbol)
|
||||
(query ripple-merc-query)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type) _type_)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod new ripple-control ((allocation symbol) (type-to-make type))
|
||||
(let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(set! (-> v0-0 global-scale) 0.0)
|
||||
(set! (-> v0-0 last-frame-scale) -0.001)
|
||||
(set! (-> v0-0 close-fade-dist) 4096000000.0)
|
||||
(set! (-> v0-0 far-fade-dist) 8192000000.0)
|
||||
(set! (-> v0-0 faded-scale) -0.001)
|
||||
(set! (-> v0-0 waveform) #f)
|
||||
(set! (-> v0-0 individual-normal-scale) 1.0)
|
||||
(set! (-> v0-0 send-query) #f)
|
||||
(set! (-> v0-0 query) #f)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
(deftype death-info (basic)
|
||||
((vertex-skip uint16)
|
||||
(timer uint8)
|
||||
(overlap uint8)
|
||||
(effect uint32)
|
||||
(sound string)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -5,5 +5,249 @@
|
||||
;; name in dgo: shadow-cpu-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++shadow-flags
|
||||
(defenum shadow-flags
|
||||
:bitfield #t
|
||||
:type int32
|
||||
(shdf00) ;; unused
|
||||
(disable-fade)
|
||||
(shdf02) ;; only set, never used.
|
||||
(shdf03)
|
||||
(shdf04) ;; unused
|
||||
(disable-draw)
|
||||
(shdf06)
|
||||
(shdf07)
|
||||
(shdf08)
|
||||
)
|
||||
;; ---shadow-flags
|
||||
|
||||
(declare-type shadow-vu1-constants structure)
|
||||
(define-extern shadow-execute-all (function dma-buffer none))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype shadow-settings (structure)
|
||||
"Settings used to draw a shadow."
|
||||
((center vector :inline)
|
||||
(flags shadow-flags :overlay-at (-> center data 3))
|
||||
(shadow-dir vector :inline)
|
||||
(dist-to-locus float :overlay-at (-> shadow-dir data 3))
|
||||
(bot-plane plane :inline)
|
||||
(top-plane plane :inline)
|
||||
(fade-vec vector :inline :offset 64)
|
||||
(fade-dist float :overlay-at (-> fade-vec x))
|
||||
(fade-start float :overlay-at (-> fade-vec y))
|
||||
(dummy-2 int32 :overlay-at (-> fade-vec z))
|
||||
(shadow-type int32 :overlay-at (-> fade-vec w))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype shadow-control (basic)
|
||||
((settings shadow-settings :inline)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type float float float vector shadow-flags float) _type_)
|
||||
(enable-draw (shadow-control) int)
|
||||
(disable-draw (shadow-control) int)
|
||||
(set-top-plane-offset (shadow-control float) int)
|
||||
(set-bottom-plane-offset (shadow-control float) int)
|
||||
(probe-line-for-shadow (_type_ vector float float float) none)
|
||||
(shadow-control-method-14 (_type_ vector vector float float float) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod enable-draw ((this shadow-control))
|
||||
(logclear! (-> this settings flags) (shadow-flags disable-draw))
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod disable-draw ((this shadow-control))
|
||||
(logior! (-> this settings flags) (shadow-flags disable-draw))
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod set-bottom-plane-offset ((this shadow-control) (arg0 float))
|
||||
(set! (-> this settings bot-plane w) (- arg0))
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod set-top-plane-offset ((this shadow-control) (arg0 float))
|
||||
(set! (-> this settings top-plane w) (- arg0))
|
||||
0
|
||||
)
|
||||
|
||||
(deftype shadow-data (structure)
|
||||
"DMA data for the shadow renderer."
|
||||
((dma-unpack-template dma-packet :inline)
|
||||
(dma-cnt dma-tag)
|
||||
(vif-nop vif-tag)
|
||||
(vif-unpack-v4-8 vif-tag)
|
||||
(pdc basic)
|
||||
(dist float)
|
||||
(waits uint32)
|
||||
(inside-volume? uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype shadow-work (structure)
|
||||
((shadow-data shadow-data :inline)
|
||||
(inbuf uint128 600)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype shadow-bucket (structure)
|
||||
((first pointer)
|
||||
(next pointer)
|
||||
(bucket-id bucket-id)
|
||||
(shadow-color rgba)
|
||||
(constants shadow-vu1-constants)
|
||||
)
|
||||
:allow-misaligned
|
||||
)
|
||||
|
||||
|
||||
(deftype shadow-bucket-views (structure)
|
||||
((data shadow-bucket 2 :inline)
|
||||
)
|
||||
:allow-misaligned
|
||||
)
|
||||
|
||||
|
||||
(deftype shadow-globals (structure)
|
||||
((num-buckets uint32)
|
||||
(cur-bucket uint32)
|
||||
(data shadow-bucket-views 3 :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *shadow-globals* (new 'global 'shadow-globals))
|
||||
|
||||
(set! (-> *shadow-globals* data 0 data 0 bucket-id) (bucket-id emerc-lcom-pris))
|
||||
|
||||
(set! (-> *shadow-globals* data 0 data 1 bucket-id) (bucket-id gmerc-lcom-pris))
|
||||
|
||||
(set! (-> *shadow-globals* data 1 data 0 bucket-id) (bucket-id bucket774))
|
||||
|
||||
(set! (-> *shadow-globals* data 1 data 1 bucket-id) (bucket-id bucket775))
|
||||
|
||||
(set! (-> *shadow-globals* data 2 data 0 bucket-id) (bucket-id bucket776))
|
||||
|
||||
(set! (-> *shadow-globals* data 2 data 1 bucket-id) (bucket-id bucket777))
|
||||
|
||||
(deftype shadow-vertex (structure)
|
||||
((x float)
|
||||
(y float)
|
||||
(z float)
|
||||
(weight float)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype shadow-matrix-ref (structure)
|
||||
((joint-0 uint8)
|
||||
(joint-1 uint8)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype shadow-edge (structure)
|
||||
((ind-0 uint8)
|
||||
(ind-1 uint8)
|
||||
(tri-0 uint8)
|
||||
(tri-1 uint8)
|
||||
)
|
||||
)
|
||||
|
||||
;; ERROR: failed type prop at 14: Could not figure out load: (set! a2 (l.hu gp))
|
||||
|
||||
(deftype shadow-tri (structure)
|
||||
((ind-0 uint8)
|
||||
(ind-1 uint8)
|
||||
(ind-2 uint8)
|
||||
(faces uint8)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
;; og:preserve-this
|
||||
;; (deftype shadow-edge (structure)
|
||||
;; ((ind-0 uint8)
|
||||
;; (ind-1 uint8)
|
||||
;; (tri-0 uint8)
|
||||
;; (tri-1 uint8)
|
||||
;; )
|
||||
;; )
|
||||
|
||||
|
||||
(deftype shadow-frag-header (structure)
|
||||
((qwc-data uint32)
|
||||
(num-joints uint32)
|
||||
(num-verts uint16)
|
||||
(num-twos uint16)
|
||||
(num-single-tris uint16)
|
||||
(num-single-edges uint16)
|
||||
(num-double-tris uint16)
|
||||
(num-double-edges uint16)
|
||||
(ofs-verts uint32)
|
||||
(ofs-refs uint32)
|
||||
(ofs-single-tris uint32)
|
||||
(ofs-single-edges uint32)
|
||||
(ofs-double-tris uint32)
|
||||
(ofs-double-edges uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype shadow-frag-ref (structure)
|
||||
((header shadow-frag-header)
|
||||
(qwc uint32)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype shadow-geo (art-element)
|
||||
"The low poly model used for drawing the shadow."
|
||||
((version uint32 :overlay-at (-> pad 0))
|
||||
(total-size uint32 :overlay-at (-> pad 4))
|
||||
(total-qwc uint32)
|
||||
(num-joints uint32)
|
||||
(num-fragments uint32)
|
||||
(frags shadow-frag-ref :inline :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod new shadow-control ((allocation symbol)
|
||||
(type-to-make type)
|
||||
(arg0 float)
|
||||
(arg1 float)
|
||||
(arg2 float)
|
||||
(arg3 vector)
|
||||
(arg4 shadow-flags)
|
||||
(arg5 float)
|
||||
)
|
||||
(let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(if arg3
|
||||
(set! (-> v0-0 settings center quad) (-> arg3 quad))
|
||||
)
|
||||
(set! (-> v0-0 settings flags) arg4)
|
||||
(set-vector! (-> v0-0 settings shadow-dir) 0.0 -1.0 0.0 arg2)
|
||||
(set-vector! (-> v0-0 settings bot-plane) 0.0 1.0 0.0 (- arg0))
|
||||
(set-vector! (-> v0-0 settings top-plane) 0.0 1.0 0.0 (- arg1))
|
||||
(set! (-> v0-0 settings fade-dist) arg5)
|
||||
(set! (-> v0-0 settings shadow-type) 0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
(define *shadow* #f)
|
||||
|
||||
(define *shadow-object* #f)
|
||||
|
||||
(define *shadow-debug* #f)
|
||||
|
||||
@@ -6,4 +6,3 @@
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -7,3 +7,202 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype gsf-vertex (structure)
|
||||
"Vertex used by generic. GSF = generic stripped fragment?"
|
||||
((data uint32 8)
|
||||
(byte uint8 32 :overlay-at (-> data 0))
|
||||
(quad uint128 2 :overlay-at (-> data 0))
|
||||
(vt qword :inline :overlay-at (-> data 0))
|
||||
(pos vector3s :inline :overlay-at (-> data 0))
|
||||
(tex vector2uh :inline :overlay-at (-> data 3))
|
||||
(nrm vector3s :inline :overlay-at (-> data 4))
|
||||
(nc qword :inline :overlay-at (-> data 4))
|
||||
(clr vector4ub :inline :overlay-at (-> data 7))
|
||||
(dtex vector2uh :inline :overlay-at (-> data 4))
|
||||
(dclr vector4ub :inline :overlay-at (-> data 5))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype gsf-vertex-array (structure)
|
||||
((vtx gsf-vertex :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype gsf-fx-vertex (structure)
|
||||
"Color/texture data only. Possibly used to share with a gsf-vertex with
|
||||
the same position/normal."
|
||||
((clr vector4ub :inline)
|
||||
(tex vector2uh :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype gsf-fx-vertex-array (structure)
|
||||
((data gsf-fx-vertex :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype gsf-header (structure)
|
||||
"Header for generic data."
|
||||
((num-strips uint8)
|
||||
(num-new-vtxs uint8)
|
||||
(num-dps uint16)
|
||||
(num-vtxs uint16)
|
||||
(strip-table uint8 10)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype gsf-ik (structure)
|
||||
((index uint8)
|
||||
(no-kick uint8)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype gsf-info (structure)
|
||||
((ptr-iks uint32)
|
||||
(ptr-verts uint32)
|
||||
(ptr-fx uint32)
|
||||
(dummy2 uint32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype gsf-buffer (structure)
|
||||
((data uint8 8192)
|
||||
(info gsf-info :inline :overlay-at (-> data 0))
|
||||
(header gsf-header :inline :overlay-at (-> data 16))
|
||||
(work-area uint8 :dynamic :overlay-at (-> data 32))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-frag (structure)
|
||||
((start-pos uint16)
|
||||
(end-pos uint16)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-strip (structure)
|
||||
((pos uint16)
|
||||
(len uint16)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-envmap-saves (structure)
|
||||
((index-mask vector4w :inline)
|
||||
(verts uint128 12)
|
||||
(kicks uint128 4)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-interp-job (structure)
|
||||
((job-type uint16)
|
||||
(num uint16)
|
||||
(first uint16)
|
||||
(pad uint16)
|
||||
(ptr-data uint32)
|
||||
(morph-z uint16)
|
||||
(morph-w uint16)
|
||||
)
|
||||
:pack-me
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-saves (structure)
|
||||
((ptr-dma uint32)
|
||||
(ptr-vtxs uint32)
|
||||
(ptr-clrs uint32)
|
||||
(ptr-texs uint32)
|
||||
(ptr-env-clrs uint32)
|
||||
(ptr-env-texs uint32)
|
||||
(cur-outbuf uint32)
|
||||
(ptr-fx-buf uint32)
|
||||
(xor-outbufs uint32)
|
||||
(num-dps uint32)
|
||||
(qwc uint32)
|
||||
(gsf-buf gsf-buffer)
|
||||
(ptr-shaders uint32)
|
||||
(ptr-env-shader uint32)
|
||||
(is-envmap uint16)
|
||||
(is-translucent uint16)
|
||||
(basep uint32)
|
||||
(ptr-interp-job generic-interp-job)
|
||||
(gifbuf-adr uint32)
|
||||
(inbuf-adr uint32)
|
||||
(fade-val uint32)
|
||||
(time-of-day-color rgba)
|
||||
(to-vu0-waits uint32)
|
||||
(to-spr-waits uint32)
|
||||
(from-spr-waits uint32)
|
||||
(envmap generic-envmap-saves :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-gif-tag (structure)
|
||||
((data uint32 4)
|
||||
(qword qword :inline :overlay-at (-> data 0))
|
||||
(fan-prim gif-tag-prim :overlay-at (-> data 0))
|
||||
(str-prim gif-tag-prim :overlay-at (-> data 1))
|
||||
(regs gif-tag-regs-32 :overlay-at (-> data 2))
|
||||
(num-strips uint32 :overlay-at (-> data 3))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-envmap-consts (structure)
|
||||
((consts vector :inline)
|
||||
(strgif generic-gif-tag :inline)
|
||||
(colors vector4w :inline)
|
||||
(shader adgif-shader :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-consts (structure)
|
||||
((dma-header dma-packet :inline)
|
||||
(vif-header uint32 4)
|
||||
(dma-ref-vtxs dma-packet :inline)
|
||||
(dma-cnt-call dma-packet :inline)
|
||||
(matrix matrix :inline)
|
||||
(base-strgif generic-gif-tag :inline)
|
||||
(alpha-opaque gs-adcmd :inline)
|
||||
(alpha-translucent gs-adcmd :inline)
|
||||
(ztest-normal gs-adcmd :inline)
|
||||
(ztest-opaque gs-adcmd :inline)
|
||||
(adcmd-offsets uint8 16)
|
||||
(stcycle-tag uint32)
|
||||
(unpack-vtx-tag uint32)
|
||||
(unpack-clr-tag uint32)
|
||||
(unpack-tex-tag uint32)
|
||||
(mscal-tag uint32)
|
||||
(flush-tag uint32)
|
||||
(reset-cycle-tag uint32)
|
||||
(dummy0 uint32)
|
||||
(dma-tag-cnt uint64)
|
||||
(envmap generic-envmap-consts :inline)
|
||||
(light-consts vector :inline)
|
||||
(texture-offset uint16 8)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-storage (structure)
|
||||
((data uint128 16)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(kmemopen global "gsf-buffer")
|
||||
|
||||
(define *gsf-buffer* (the-as object (kmalloc global 9216 (kmalloc-flags align-64) "malloc")))
|
||||
|
||||
(kmemclose)
|
||||
|
||||
@@ -7,3 +7,72 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype pris-mtx (structure)
|
||||
"Matrix for merc rendering. Named after the earlier 'pris' renderer.
|
||||
Contains a transformation matrix for vertices, one for normals, and a scale.
|
||||
This matrix is likely not used by generic VU1, but is used by the merc -> generic converter."
|
||||
((data float 32)
|
||||
(vector vector 8 :overlay-at (-> data 0))
|
||||
(t-mtx matrix :inline :overlay-at (-> data 0))
|
||||
(n-mtx matrix3 :inline :overlay-at (-> data 16))
|
||||
(scale vector :inline :overlay-at (-> data 28))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-pris-mtx-save (structure)
|
||||
((loc-mtx pris-mtx :inline)
|
||||
(par-mtx pris-mtx :inline)
|
||||
(dif-mtx pris-mtx :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-constants (structure)
|
||||
"Constant data sent to VU1 for generic rendering."
|
||||
((fog vector :inline)
|
||||
(adgif gs-gif-tag :inline)
|
||||
(hvdf-offset vector :inline)
|
||||
(hmge-scale vector :inline)
|
||||
(invh-scale vector :inline)
|
||||
(guard vector :inline)
|
||||
(flush qword :inline)
|
||||
(stores qword :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-shrub-constants (structure)
|
||||
((shrub-giftag generic-gif-tag :inline)
|
||||
(shrub-adnop qword :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype gcf-shader (structure)
|
||||
((adgif uint128 5)
|
||||
(shader adgif-shader :inline :overlay-at (-> adgif 0))
|
||||
(pos uint32 :offset 12)
|
||||
(num uint32 :offset 28)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype gcf-control (structure)
|
||||
((matrix matrix :inline)
|
||||
(giftag generic-gif-tag :inline)
|
||||
(adnops gs-adcmd 2 :inline)
|
||||
(num-strips uint32 :overlay-at (-> giftag data 3))
|
||||
(num-dps uint32 :overlay-at (-> adnops 0 word 3))
|
||||
(kick-offset uint32 :offset 108)
|
||||
(shader gcf-shader :inline :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype gcf-vertex (structure)
|
||||
((tex vector4w :inline)
|
||||
(clr gs-packed-rgba :inline)
|
||||
(pos gs-packed-xyzw :inline)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7,3 +7,78 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype generic-input-buffer (structure)
|
||||
((data uint128 473)
|
||||
(merc generic-merc-work :inline :overlay-at (-> data 0))
|
||||
(tie generic-tie-work :inline :overlay-at (-> data 0))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-debug (structure)
|
||||
((locks uint32 4)
|
||||
(timer uint32 32)
|
||||
(count uint32 32)
|
||||
(vps uint32 32)
|
||||
(buffer int32)
|
||||
(start-addr int32)
|
||||
(lock int32)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-vu1-header (structure)
|
||||
((matrix matrix :inline)
|
||||
(strgif generic-gif-tag :inline)
|
||||
(adcmds gs-adcmd 2 :inline)
|
||||
(adnop1 gs-adcmd :inline :overlay-at (-> adcmds 0))
|
||||
(adnop2 gs-adcmd :inline :overlay-at (-> adcmds 1))
|
||||
(dps uint16 :overlay-at (-> adcmds 0 word 3))
|
||||
(kickoff uint16 :overlay-at (-> adnop2 w))
|
||||
(strips uint16 :overlay-at (-> strgif data 3))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-vu1-texbuf (structure)
|
||||
((header generic-vu1-header :inline)
|
||||
(shader uint32 :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-texbuf (structure)
|
||||
((tag dma-packet :inline)
|
||||
(header generic-vu1-header :inline)
|
||||
(shader uint32 :dynamic)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-effect-work (structure)
|
||||
((consts generic-consts :inline)
|
||||
(storage generic-storage :inline)
|
||||
(storage2 generic-storage :inline)
|
||||
(lights vu-lights :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-effect-buffer (structure)
|
||||
((outbuf-0 uint8 3552)
|
||||
(work generic-effect-work :inline)
|
||||
(outbuf-1 uint8 3552)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype generic-work (structure)
|
||||
((saves generic-saves :inline)
|
||||
(storage generic-storage :inline)
|
||||
(in-buf generic-input-buffer :inline)
|
||||
(fx-buf generic-effect-buffer :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *generic-debug* (new 'global 'generic-debug))
|
||||
|
||||
@@ -5,5 +5,266 @@
|
||||
;; name in dgo: lightning-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; +++lightning-spec-flags
|
||||
(defenum lightning-spec-flags
|
||||
:type uint16
|
||||
:bitfield #t
|
||||
(lsf0 0)
|
||||
(lsf1 1)
|
||||
(lsf2 2)
|
||||
(lsf3 3)
|
||||
(lsf4 4)
|
||||
(lsf5 5)
|
||||
(lsf6 6)
|
||||
(lsf7 7)
|
||||
(lsf8 8)
|
||||
(lsf9 9)
|
||||
(lsf10 10)
|
||||
(lsf11 11)
|
||||
(lsf12 12)
|
||||
(lsf13 13)
|
||||
(lsf14 14)
|
||||
(lsf15 15)
|
||||
)
|
||||
;; ---lightning-spec-flags
|
||||
|
||||
;; +++lightning-mode
|
||||
(defenum lightning-mode
|
||||
:type uint8
|
||||
(lm-1 -1)
|
||||
(lm0 0)
|
||||
(lm1 1)
|
||||
(lm2 2)
|
||||
(lm3 3)
|
||||
)
|
||||
;; ---lightning-mode
|
||||
|
||||
(declare-type lightning-spec basic)
|
||||
(define-extern *lightning-spec-id-table* (array lightning-spec))
|
||||
|
||||
(define-extern lightning-fractal-gen (function (inline-array vector) int int float lightning-spec none))
|
||||
(define-extern lightning-uniform-gen (function (inline-array vector) int int float lightning-spec none))
|
||||
(define-extern lightning-trail-uniform-gen (function (inline-array vector) (inline-array vector) float int symbol))
|
||||
(define-extern lightning-trail-fractal-gen (function (inline-array vector) (inline-array vector) int int float lightning-spec none))
|
||||
(define-extern process-drawable-art-error (state string process-drawable))
|
||||
(define-extern unlink-lightning-spec-by-heap (function kheap none))
|
||||
(define-extern lightning-draw-all (function none))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype lightning-spec (basic)
|
||||
((name string)
|
||||
(flags lightning-spec-flags)
|
||||
(rand-func uint8)
|
||||
(adjust-distance uint8)
|
||||
(start-color rgba)
|
||||
(end-color rgba)
|
||||
(fade-to-color rgba)
|
||||
(fade-start-factor float)
|
||||
(fade-time float)
|
||||
(texture texture-id)
|
||||
(reduction float)
|
||||
(num-points int32)
|
||||
(box-size float)
|
||||
(merge-factor float)
|
||||
(merge-count int32)
|
||||
(radius float)
|
||||
(duration float)
|
||||
(duration-rand float)
|
||||
(sound sound-spec)
|
||||
(delay float)
|
||||
(delay-rand float)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defun lookup-lightning-spec-by-name ((arg0 string))
|
||||
(let* ((s5-0 *lightning-spec-id-table*)
|
||||
(s4-0 (-> s5-0 length))
|
||||
)
|
||||
(dotimes (s3-0 s4-0)
|
||||
(let ((s2-0 (-> s5-0 s3-0)))
|
||||
(if (and (nonzero? s2-0) (string= arg0 (-> s2-0 name)))
|
||||
(return s2-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(the-as lightning-spec #f)
|
||||
)
|
||||
|
||||
(deftype lightning-state (structure)
|
||||
((mode uint8)
|
||||
(counter float)
|
||||
(points-to-draw int32)
|
||||
(box-size float)
|
||||
(gcf-control gcf-control :inline)
|
||||
(line vector-array)
|
||||
(meet vector-array)
|
||||
(path vector-array)
|
||||
(start-color rgba)
|
||||
(end-color rgba)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype lightning-control (basic)
|
||||
((spec lightning-spec)
|
||||
(process (pointer process))
|
||||
(state lightning-state :inline)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type lightning-spec process float) _type_)
|
||||
(change-mode (_type_ lightning-mode) lightning-mode)
|
||||
(get-mode (_type_) lightning-mode)
|
||||
(set-point! (_type_ int vector) none)
|
||||
(set-first-meet-point (_type_ vector) none)
|
||||
(set-last-meet-point (_type_ vector) none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod change-mode ((this lightning-control) (arg0 lightning-mode))
|
||||
(let ((v1-1 (!= arg0 (-> this state mode))))
|
||||
(case arg0
|
||||
(((lightning-mode lm3))
|
||||
(if v1-1
|
||||
(set! (-> this state counter) 0.0)
|
||||
)
|
||||
)
|
||||
(((lightning-mode lm1))
|
||||
(set! (-> this state start-color) (-> this spec start-color))
|
||||
(set! (-> this state end-color) (-> this spec end-color))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> this state mode) (the-as uint arg0))
|
||||
arg0
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch uint vs lightning-mode.
|
||||
(defmethod get-mode ((this lightning-control))
|
||||
(the-as lightning-mode (-> this state mode))
|
||||
)
|
||||
|
||||
(defmethod set-point! ((this lightning-control) (arg0 int) (arg1 vector))
|
||||
(let ((v1-0 (-> this state)))
|
||||
(when (and (-> v1-0 path) (>= arg0 0) (< arg0 (-> v1-0 path length)))
|
||||
(set! (-> v1-0 path data arg0 quad) (-> arg1 quad))
|
||||
(when (and (< (+ (-> v1-0 points-to-draw) -1) arg0) (case (-> v1-0 mode)
|
||||
((2 3)
|
||||
#t
|
||||
)
|
||||
(else
|
||||
#f
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> v1-0 line data arg0 quad) (-> arg1 quad))
|
||||
(set! (-> v1-0 meet data arg0 quad) (-> arg1 quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch (inline-array vector) vs none.
|
||||
(defmethod set-first-meet-point ((this lightning-control) (arg0 vector))
|
||||
(set! (-> this state meet data 0 quad) (-> arg0 quad))
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch vector vs none.
|
||||
(defmethod set-last-meet-point ((this lightning-control) (arg0 vector))
|
||||
(set! (-> this state meet data (+ (-> this state points-to-draw) -1) quad) (-> arg0 quad))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod relocate ((this lightning-control) (offset int))
|
||||
(&+! (-> this state line) offset)
|
||||
(&+! (-> this state meet) offset)
|
||||
(if (-> this state path)
|
||||
(&+! (-> this state path) offset)
|
||||
)
|
||||
(let ((v1-8 (-> this spec)))
|
||||
(if (and (>= (the-as int v1-8) (-> *kernel-context* relocating-min))
|
||||
(< (the-as int v1-8) (-> *kernel-context* relocating-max))
|
||||
)
|
||||
(&+! (-> this spec) offset)
|
||||
)
|
||||
)
|
||||
this
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs lightning-control.
|
||||
(defmethod new lightning-control ((allocation symbol) (type-to-make type) (arg0 lightning-spec) (arg1 process) (arg2 float))
|
||||
(with-pp
|
||||
(let ((gp-0 (the-as object (object-new allocation type-to-make (the-as int (-> type-to-make size))))))
|
||||
(when (zero? (the-as lightning-control gp-0))
|
||||
(go process-drawable-art-error "memory")
|
||||
(set! gp-0 0)
|
||||
(goto cfg-14)
|
||||
)
|
||||
(let ((s3-0 (-> arg0 num-points)))
|
||||
(let ((f0-0 (-> arg0 box-size)))
|
||||
(when (logtest? (-> arg0 flags) (lightning-spec-flags lsf4))
|
||||
(let ((f1-1 (fmax 1.0 (fmin 5.0 (/ arg2 (* 4096.0 (the float (-> arg0 adjust-distance))))))))
|
||||
(set! s3-0 (* s3-0 (the int f1-1)))
|
||||
(set! f0-0 (* f0-0 f1-1))
|
||||
)
|
||||
)
|
||||
(set! (-> (the-as lightning-control gp-0) state box-size) f0-0)
|
||||
)
|
||||
(set! (-> (the-as lightning-control gp-0) process) (process->ppointer arg1))
|
||||
(set! (-> (the-as lightning-control gp-0) state mode) (the-as uint 1))
|
||||
(set! (-> (the-as lightning-control gp-0) state line)
|
||||
((method-of-type vector-array new) allocation vector-array s3-0)
|
||||
)
|
||||
(set! (-> (the-as lightning-control gp-0) state meet)
|
||||
((method-of-type vector-array new) allocation vector-array s3-0)
|
||||
)
|
||||
(let ((v1-18 (-> arg0 rand-func)))
|
||||
(set! (-> (the-as lightning-control gp-0) state path)
|
||||
(if (or (= v1-18 2) (= v1-18 3))
|
||||
((method-of-type vector-array new) allocation vector-array s3-0)
|
||||
(the-as vector-array #f)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> (the-as lightning-control gp-0) state counter) 0.0)
|
||||
(set! (-> (the-as lightning-control gp-0) state points-to-draw) s3-0)
|
||||
)
|
||||
(set! (-> (the-as lightning-control gp-0) spec) arg0)
|
||||
(set! (-> (the-as lightning-control gp-0) state start-color) (-> arg0 start-color))
|
||||
(set! (-> (the-as lightning-control gp-0) state end-color) (-> arg0 end-color))
|
||||
(add-connection *lightning-engine* pp nothing (the-as lightning-control gp-0) #f #f)
|
||||
(label cfg-14)
|
||||
(the-as lightning-control gp-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype lightning-probe-vars (basic)
|
||||
((src-joint-index uint32)
|
||||
(next-spawn-time time-frame)
|
||||
(last-valid-time time-frame)
|
||||
(point vector 2 :inline)
|
||||
(start-pos vector :inline :overlay-at (-> point 0))
|
||||
(end-pos vector :inline :overlay-at (-> point 1))
|
||||
(probe-dirs (inline-array vector))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *lightning-probe-vars* (new 'static 'lightning-probe-vars
|
||||
:probe-dirs (new 'static 'inline-array vector 6
|
||||
(new 'static 'vector :data (new 'static 'array float 4 0.0 0.0 1.0 1.0))
|
||||
(new 'static 'vector :data (new 'static 'array float 4 1.0 0.0 0.0 1.0))
|
||||
(new 'static 'vector :data (new 'static 'array float 4 0.0 0.0 -1.0 1.0))
|
||||
(new 'static 'vector :data (new 'static 'array float 4 -1.0 0.0 0.0 1.0))
|
||||
(new 'static 'vector :data (new 'static 'array float 4 0.0 1.0 0.0 1.0))
|
||||
(new 'static 'vector :data (new 'static 'array float 4 0.0 -1.0 0.0 1.0))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user