Merge remote-tracking branch 'water111/master' into decomp/sunken-elevator

This commit is contained in:
Tyler Wilding
2021-08-12 19:23:19 -04:00
101 changed files with 11708 additions and 1181 deletions
+2
View File
@@ -1,4 +1,6 @@
third-party/**/* linguist-vendored
test/decompiler/reference/** linguist-vendored
*.gc linguist-language=lisp
*.gd linguist-language=lisp
*.gs linguist-language=Scheme
goal_src/engine/gfx/ocean/ocean-tables.gc linguist-vendored
+1 -3
View File
@@ -22,9 +22,7 @@ jobs:
# just do a sed for now
- name: Update Line Count
run: |
chmod +x ./.github/workflows/scripts/line-count.sh
./.github/workflows/scripts/line-count.sh
run: python ./scripts/update-file-progress.py
- name: Update Site
run: |
-5
View File
@@ -1,5 +0,0 @@
#!/bin/bash
LINE_COUNT=$(find ./goal_src -name '*.gc' | xargs wc -l | tail -1 | awk -F'[^0-9]+' '{ print $2 }')
sed -i "s/.*value.*/ \"value\": ${LINE_COUNT},/g" ./docs/gh-pages-proj/src/config/progress.json
+7
View File
@@ -49,6 +49,13 @@
"name" : "Run - Runtime (with kernel)",
"args" : [ "-fakeiso", "-debug", "-v", "-nodisplay" ]
},
{
"type" : "default",
"project" : "CMakeLists.txt",
"projectTarget" : "gk.exe (bin\\gk.exe)",
"name" : "Run - Runtime (with kernel + display)",
"args" : [ "-fakeiso", "-debug", "-v" ]
},
{
"type" : "default",
"project" : "CMakeLists.txt",
+2 -1
View File
@@ -4,6 +4,7 @@
#include "common/common_types.h"
#include "third-party/dragonbox.h"
#include "print_float.h"
#include "common/util/assert.h"
/*!
* Convert a float to a string. The string is _always_ in this format:
@@ -127,4 +128,4 @@ int float_to_cstr(float value, char* buffer) {
}
}
return i;
}
}
+3 -3
View File
@@ -654,9 +654,9 @@ void SimpleExpressionElement::update_from_stack_float_2(const Env& env,
} else {
auto type0 = env.get_types_before_op(m_my_idx).get(m_expr.get_arg(0).var().reg());
auto type1 = env.get_types_before_op(m_my_idx).get(m_expr.get_arg(1).var().reg());
throw std::runtime_error(
fmt::format("Floating point math attempted on invalid types: {} and {} in op {}.",
type0.print(), type1.print(), to_string(env)));
throw std::runtime_error(fmt::format(
"[OP: {}] - Floating point math attempted on invalid types: {} and {} in op {}.", m_my_idx,
type0.print(), type1.print(), to_string(env)));
}
}
File diff suppressed because it is too large Load Diff
@@ -584,6 +584,39 @@
[2, "(function basic int basic event-message-block object :behavior camera-combiner)"]
],
"misty-teetertotter": [
[1, "(function none :behavior teetertotter)"],
[2, "(function none :behavior teetertotter)"],
[3, "(function process int symbol event-message-block symbol :behavior teetertotter)"],
[4, "(function none :behavior teetertotter)"],
[5, "(function process int symbol event-message-block object :behavior teetertotter)"]
],
"misty-warehouse": [
[3, "(function symbol none :behavior silostep)"],
[4, "(function none :behavior silostep)"],
[6, "(function none :behavior camera-tracker)"],
[7, "(function none :behavior silostep)"],
[8, "(function process int symbol event-message-block none :behavior silostep)"]
],
"rigid-body": [
[5, "(function none :behavior rigid-body-platform)"],
[6, "(function none :behavior rigid-body-platform)"],
[7, "(function none :behavior rigid-body-platform)"],
[8, "(function none :behavior rigid-body-platform)"]
],
"water-anim": [
[4, "(function none :behavior water-anim)"],
[5, "(function none :behavior water-anim)"],
[6, "(function process int symbol event-message-block process-mask :behavior water-anim)"]
],
"plat-eco": [
[9, "(function none :behavior plat-eco)"]
],
"sunken-elevator": [
[3, "(function object :behavior sunken-elevator)"],
[4, "(function int :behavior sunken-elevator)"],
@@ -1412,6 +1412,142 @@
["L497", "float", true],
["L508", "float", true]
],
"shadow": [
["L23", "sparticle-launcher", true],
["L26", "float", true],
["L27", "float", true],
["L28", "float", true]
],
"tippy": [
["L7", "float", true]
],
"ticky": [
["L7", "float", true],
["L8", "float", true],
["L10", "uint64", true]
],
"wobbler": [
["L6", "float", true]
],
"twister": [
["L20", "float", true]
],
"misty-teetertotter": [
["L2", "_lambda_", true],
["L4", "_lambda_", true],
["L10", "_lambda_", true],
["L15", "_lambda_", true],
["L17", "_lambda_", true],
["L24", "state", true],
["L25", "state", true],
["L26", "attack-info", true],
["L27", "attack-info", true],
["L28", "state", true],
["L30", "skeleton-group", true]
],
"misty-warehouse": [
["L7", "_lambda_", true],
["L11", "_lambda_", true],
["L15", "_lambda_", true],
["L23", "_lambda_", true],
["L25", "_lambda_", true],
["L29", "skeleton-group", true],
["L34", "state", true],
["L35", "skeleton-group", true],
["L31", "state", true],
["L32", "state", true],
["L37", "float", true],
["L46", "float", true],
["L48", "uint64", true],
["L49", "uint64", true],
["L50", "uint64", true],
["L51", "uint64", true]
],
"rigid-body": [
["L8", "_lambda_", true],
["L10", "_lambda_", true],
["L13", "_lambda_", true],
["L15", "_lambda_", true],
["L89", "rigid-body-platform-constants", true],
["L90", "state", true],
["L91", "state", true],
["L106", "float", true]
],
"ocean": [
["L90", "float", true]
],
"water-anim": [
["L13", "_lambda_", true],
["L15", "_lambda_", true],
["L21", "_lambda_", true],
["L26", "state", true],
["L27", "_auto_", true],
["L99", "skeleton-group", true],
["L101", "skeleton-group", true],
["L102", "skeleton-group", true],
["L103", "skeleton-group", true],
["L104", "skeleton-group", true],
["L106", "skeleton-group", true],
["L108", "skeleton-group", true],
["L110", "skeleton-group", true],
["L111", "skeleton-group", true],
["L113", "skeleton-group", true],
["L115", "skeleton-group", true],
["L117", "skeleton-group", true],
["L119", "skeleton-group", true],
["L121", "skeleton-group", true],
["L123", "skeleton-group", true],
["L124", "skeleton-group", true],
["L125", "skeleton-group", true],
["L126", "skeleton-group", true],
["L127", "skeleton-group", true],
["L128", "skeleton-group", true],
["L129", "skeleton-group", true],
["L130", "skeleton-group", true],
["L131", "skeleton-group", true],
["L132", "skeleton-group", true],
["L133", "skeleton-group", true],
["L134", "skeleton-group", true],
["L136", "skeleton-group", true],
["L138", "skeleton-group", true],
["L140", "skeleton-group", true],
["L141", "skeleton-group", true],
["L142", "skeleton-group", true],
["L143", "skeleton-group", true],
["L144", "skeleton-group", true],
["L146", "skeleton-group", true],
["L147", "skeleton-group", true],
["L148", "skeleton-group", true],
["L149", "skeleton-group", true],
["L150", "skeleton-group", true],
["L151", "skeleton-group", true],
["L152", "skeleton-group", true],
["L153", "skeleton-group", true],
["L154", "skeleton-group", true],
["L155", "skeleton-group", true],
["L156", "skeleton-group", true],
["L157", "skeleton-group", true],
["L159", "skeleton-group", true],
["L160", "skeleton-group", true],
["L161", "skeleton-group", true],
["L163", "float", true],
["L165", "float", true]
],
"mud": [
["L8", "ripple-wave-set", true],
["L9", "ripple-wave-set", true],
["L10", "float", true]
],
"sunken-elevator": [
["L6", "_lambda_", true],
@@ -820,6 +820,102 @@
"draw-ocean-transition-seams": [
[16, "sphere"]
],
"(method 10 tippy)": [
[16, "vector"]
],
"compute-and-draw-shadow": [
[16, "vector"],
[32, "vector"],
[48, "sparticle-cpuinfo"] // kinda a guess
],
"find-ground-and-draw-shadow": [
[16, "vector"],
[32, "vector"],
[48, "bone"] // what a guess!
],
"(method 20 collide-cache)": [
[16, "vector"]
],
"(method 12 wobbler)": [
[16, "vector"]
],
"(method 12 twister)": [
[16, "matrix"]
],
"target-on-end-of-teetertotter?": [
[16, "vector"],
[32, "vector"]
],
"(anon-function 3 misty-teetertotter)": [
[16, "event-message-block"]
],
"(method 17 rigid-body)": [
[16, "vector"]
],
"matrix-3x3-triple-transpose-product": [
[16, "matrix"],
[80, "matrix"]
],
"(method 10 rigid-body)": [
[16, "quaternion"]
],
"(method 13 rigid-body)": [
[16, "vector"],
[32, "vector"]
],
"(method 16 rigid-body)": [
[16, "vector"],
[32, "vector"]
],
"(method 14 rigid-body)": [
[16, "vector"],
[32, "vector"]
],
"(method 18 rigid-body)": [
[16, "vector"]
],
"(method 24 rigid-body-platform)": [
[16, "vector"]
],
"(method 26 rigid-body-platform)": [
[16, "vector"]
],
"(method 27 rigid-body-platform)": [
[16, "vector"]
],
"(method 22 water-anim)": [
[16, "vector"]
],
"(anon-function 9 plat-eco)": [
[16, "event-message-block"]
],
"default-collision-reaction": [
[16, "vector"],
[32, "vector"],
[48, "vector"],
[96, "vector"]
],
"(anon-function 3 sunken-elevator)": [
[16, "vector"],
@@ -1787,6 +1787,109 @@
"draw-ocean-transition": [[255, "v1", "ocean-mid-mask"]],
"do-target-shadow": [
[[0, 999], "s6", "target"],
[46, "v1", "collide-shape-prim"] // `event-other` from collide-shape
],
"(anon-function 6 water-anim)": [
[6, "a0", "vector"]
],
"(anon-function 5 water-anim)": [
[2, "v1", "(state none)"]
],
"(anon-function 8 rigid-body)": [
[[16, 21], "t9", "(function object)"]
],
"(anon-function 6 rigid-body)": [
[[16, 21], "t9", "(function object)"]
],
"(method 34 rigid-body-platform)": [
[[0, 5], "t9", "(function object)"]
],
"(method 22 water-anim)": [
[[9, 14], "t9", "(function object object)"],
[25, "s3", "basic"],
[[32, 37], "t9", "(function object object)"]
],
"(method 25 water-anim)": [
[[27, 45], "v1", "transform"]
],
"(method 22 rigid-body-platform)": [
[26, "f0", "float"]
],
"rigid-body-platform-event-handler": [
[28, "v1", "process-drawable"],
[34, "v1", "float"],
[83, "v1", "process-drawable"],
[119, "v1", "process-drawable"],
[125, "v1", "process-drawable"],
[158, "v1", "vector"],
[170, "v1", "vector"],
[184, "v1", "(pointer handle)"],
[213, "v1", "process-drawable"]
],
"(anon-function 9 plat-eco)": [
[23, "v1", "(state symbol none)"],
[58, "v1", "(state symbol none)"]
],
"(method 7 rigid-body-platform)": [
[5, "v1", "int"],
[14, "t9", "(function process-drawable int process-drawable)"]
],
"(method 10 rigid-body)": [
[50, "v1", "vector"]
],
"(method 11 rigid-body-platform)": [
[5, "v1", "process-mask"]
],
"(method 22 mud)": [
[[37, 41], "v1", "ripple-control"]
],
"(method 11 twister)": [
[7, "s4", "twist-joint"],
[13, "s4", "twist-joint"],
[26, "s4", "twist-joint"],
[28, "s4", "twist-joint"],
[36, "s4", "twist-joint"],
[40, "s4", "twist-joint"],
[47, "s4", "twist-joint"],
[55, "s4", "twist-joint"],
[70, "s4", "twist-joint"],
[82, "s4", "twist-joint"]
],
"(anon-function 2 misty-teetertotter)": [
[11, "v1", "art-joint-anim"]
],
"(anon-function 1 misty-teetertotter)": [
[10, "v1", "art-joint-anim"]
],
"misty-camera-view": [
[19, "t9", "(function object object object object)"],
[25, "v1", "handle"]
],
"(method 11 silostep)": [
[100, "v1", "art-joint-anim"]
],
"(anon-function 6 sunken-elevator)": [
[2, "v1", "(state none)"],
[2, "t9", "(function object)"],
+3 -2
View File
@@ -167,9 +167,10 @@ AudioFileInfo process_audio_file(const std::vector<u8>& data,
assert(reader.read<u8>() == 0);
}
auto file_name = fmt::format("{}_{}.wav", remove_trailing_spaces(name), suffix);
file_util::create_dir_if_needed(file_util::get_file_path({"assets", "streaming_audio", suffix}));
auto file_name = fmt::format("{}.wav", remove_trailing_spaces(name));
write_wave_file_mono(decoded_samples, header.sample_rate,
file_util::get_file_path({"assets", "streaming_audio", file_name}));
file_util::get_file_path({"assets", "streaming_audio", suffix, file_name}));
std::string vag_filename;
for (int i = 0; i < 16; i++) {
+19 -1
View File
@@ -288,7 +288,7 @@ int index_of_closest_following_label_in_segment(int start_byte,
for (int i = 0; i < (int)labels.size(); i++) {
const auto& label = labels.at(i);
if (label.target_segment == seg) {
if (result_idx == -1) {
if (result_idx == -1 && label.offset > start_byte) {
result_idx = i;
closest_byte = label.offset;
} else {
@@ -419,6 +419,20 @@ goos::Object ocean_mid_masks_decompile(const std::vector<LinkedWord>& words,
data_field, all_words, file,
TypeSpec("ocean-mid-mask"), 8);
}
goos::Object sp_field_init_spec_decompile(const std::vector<LinkedWord>& words,
const std::vector<DecompilerLabel>& labels,
int my_seg,
int field_location,
const TypeSystem& ts,
const Field& data_field,
const std::vector<std::vector<LinkedWord>>& all_words,
const LinkedObjectFile* file) {
return decomp_ref_to_inline_array_guess_size(words, labels, my_seg, field_location, ts,
data_field, all_words, file,
TypeSpec("sp-field-init-spec"), 16);
}
} // namespace
goos::Object decompile_structure(const TypeSpec& type,
@@ -608,6 +622,10 @@ goos::Object decompile_structure(const TypeSpec& type,
field_defs_out.emplace_back(
field.name(), ocean_mid_masks_decompile(obj_words, labels, label.target_segment,
field_start, ts, field, words, file));
} else if (field.name() == "init-specs" && type.print() == "sparticle-launcher") {
field_defs_out.emplace_back(
field.name(), sp_field_init_spec_decompile(obj_words, labels, label.target_segment,
field_start, ts, field, words, file));
} else {
std::vector<u8> bytes_out;
for (int byte_idx = field_start; byte_idx < field_end; byte_idx++) {
File diff suppressed because one or more lines are too long
+7 -4
View File
@@ -1,8 +1,11 @@
{
"jak1": {
"locPercentage": {
"value": 117858,
"label": "Lines of Code"
"fileProgress": {
"src_files_total": 514,
"src_files_finished": 67,
"src_files_started": 174,
"data_files_total": 584,
"data_files_started": 4
}
}
}
}
+32 -6
View File
@@ -58,13 +58,33 @@
<v-col cols="10">
<v-subheader>Decompilation</v-subheader>
<v-progress-linear
color="teal"
color="green"
buffer-value="0"
:value="jak1BlackLabelStatus.decompDone"
:value="jak1BlackLabelStatus.srcFilesFinishedValue"
stream
height="25"
>
{{jak1BlackLabelStatus.decompLabel}} - {{jak1BlackLabelStatus.decompDone}}%
Source Files Finished - {{ jak1BlackLabelStatus.srcFilesFinished }} / {{ jak1BlackLabelStatus.srcFilesTotal }}
</v-progress-linear>
<br>
<v-progress-linear
color="yellow"
buffer-value="0"
:value="jak1BlackLabelStatus.srcFilesStartedValue"
stream
height="25"
>
Source Files Started - {{ jak1BlackLabelStatus.srcFilesStarted }} / {{ jak1BlackLabelStatus.srcFilesTotal }}
</v-progress-linear>
<br>
<v-progress-linear
color="teal"
buffer-value="0"
:value="jak1BlackLabelStatus.dataFilesStartedValue"
stream
height="25"
>
Data Files Started - {{ jak1BlackLabelStatus.dataFilesStarted }} / {{ jak1BlackLabelStatus.dataFilesTotal }}
</v-progress-linear>
</v-col>
</v-row>
@@ -129,8 +149,14 @@ export default {
return {
recentPRs: [],
jak1BlackLabelStatus: {
decompDone: (projectProgress.jak1.locPercentage.value / 750000.0) * 100.0,
decompLabel: projectProgress.jak1.locPercentage.label
srcFilesTotal: projectProgress.jak1.fileProgress.src_files_total,
srcFilesFinished: projectProgress.jak1.fileProgress.src_files_finished,
srcFilesFinishedValue: projectProgress.jak1.fileProgress.src_files_finished / projectProgress.jak1.fileProgress.src_files_total * 100,
srcFilesStarted: projectProgress.jak1.fileProgress.src_files_started,
srcFilesStartedValue: projectProgress.jak1.fileProgress.src_files_started / projectProgress.jak1.fileProgress.src_files_total * 100,
dataFilesTotal: projectProgress.jak1.fileProgress.data_files_total,
dataFilesStarted: projectProgress.jak1.fileProgress.data_files_started,
dataFilesStartedValue: projectProgress.jak1.fileProgress.data_files_started / projectProgress.jak1.fileProgress.data_files_total * 100,
}
};
},
@@ -152,7 +178,7 @@ export default {
const numPRs = 9;
for (var i = 0; i < numPRs; i++) {
var pr = data.items[i];
if (pr.body.length == 0) {
if (pr.body == null || pr.body.length == 0) {
pr.body = "No Description";
}
pr.body = this.truncateString(pr.body, 250);
+1 -1
View File
@@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/jak-project/favicon.png"><title>OpenGOAL Tooling</title><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css"><link href="/jak-project/css/about.8d0e9591.css" rel="prefetch"><link href="/jak-project/js/about.93743c22.js" rel="prefetch"><link href="/jak-project/css/chunk-vendors.b018c88a.css" rel="preload" as="style"><link href="/jak-project/js/app.1e67702b.js" rel="preload" as="script"><link href="/jak-project/js/chunk-vendors.f27e8f37.js" rel="preload" as="script"><link href="/jak-project/css/chunk-vendors.b018c88a.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but docs-and-tooling doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/jak-project/js/chunk-vendors.f27e8f37.js"></script><script src="/jak-project/js/app.1e67702b.js"></script></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/jak-project/favicon.png"><title>OpenGOAL Tooling</title><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css"><link href="/jak-project/css/about.c2633d65.css" rel="prefetch"><link href="/jak-project/js/about.9d55a69c.js" rel="prefetch"><link href="/jak-project/css/chunk-vendors.b018c88a.css" rel="preload" as="style"><link href="/jak-project/js/app.b551871a.js" rel="preload" as="script"><link href="/jak-project/js/chunk-vendors.b495df31.js" rel="preload" as="script"><link href="/jak-project/css/chunk-vendors.b018c88a.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but docs-and-tooling doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/jak-project/js/chunk-vendors.b495df31.js"></script><script src="/jak-project/js/app.b551871a.js"></script></body></html>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
(function(e){function t(t){for(var n,o,i=t[0],c=t[1],l=t[2],s=0,p=[];s<i.length;s++)o=i[s],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&p.push(a[o][0]),a[o]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);f&&f(t);while(p.length)p.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,o=1;o<r.length;o++){var i=r[o];0!==a[i]&&(n=!1)}n&&(u.splice(t--,1),e=c(c.s=r[0]))}return e}var n={},o={app:0},a={app:0},u=[];function i(e){return c.p+"js/"+({about:"about"}[e]||e)+"."+{about:"93743c22"}[e]+".js"}function c(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,c),r.l=!0,r.exports}c.e=function(e){var t=[],r={about:1};o[e]?t.push(o[e]):0!==o[e]&&r[e]&&t.push(o[e]=new Promise((function(t,r){for(var n="css/"+({about:"about"}[e]||e)+"."+{about:"8d0e9591"}[e]+".css",a=c.p+n,u=document.getElementsByTagName("link"),i=0;i<u.length;i++){var l=u[i],s=l.getAttribute("data-href")||l.getAttribute("href");if("stylesheet"===l.rel&&(s===n||s===a))return t()}var p=document.getElementsByTagName("style");for(i=0;i<p.length;i++){l=p[i],s=l.getAttribute("data-href");if(s===n||s===a)return t()}var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.onload=t,f.onerror=function(t){var n=t&&t.target&&t.target.src||a,u=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");u.code="CSS_CHUNK_LOAD_FAILED",u.request=n,delete o[e],f.parentNode.removeChild(f),r(u)},f.href=a;var d=document.getElementsByTagName("head")[0];d.appendChild(f)})).then((function(){o[e]=0})));var n=a[e];if(0!==n)if(n)t.push(n[2]);else{var u=new Promise((function(t,r){n=a[e]=[t,r]}));t.push(n[2]=u);var l,s=document.createElement("script");s.charset="utf-8",s.timeout=120,c.nc&&s.setAttribute("nonce",c.nc),s.src=i(e);var p=new Error;l=function(t){s.onerror=s.onload=null,clearTimeout(f);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;p.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",p.name="ChunkLoadError",p.type=n,p.request=o,r[1](p)}a[e]=void 0}};var f=setTimeout((function(){l({type:"timeout",target:s})}),12e4);s.onerror=s.onload=l,document.head.appendChild(s)}return Promise.all(t)},c.m=e,c.c=n,c.d=function(e,t,r){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},c.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(c.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)c.d(r,n,function(t){return e[t]}.bind(null,n));return r},c.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="/jak-project/",c.oe=function(e){throw console.error(e),e};var l=window["webpackJsonp"]=window["webpackJsonp"]||[],s=l.push.bind(l);l.push=t,l=l.slice();for(var p=0;p<l.length;p++)t(l[p]);var f=s;u.push([0,"chunk-vendors"]),r()})({0:function(e,t,r){e.exports=r("56d7")},"56d7":function(e,t,r){"use strict";r.r(t);r("e260"),r("e6cf"),r("cca6"),r("a79d");var n=r("2b0e"),o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("v-app",[r("v-main",[r("router-view")],1)],1)},a=[],u={name:"App",components:{},data:function(){return{}}},i=u,c=r("2877"),l=r("6544"),s=r.n(l),p=r("7496"),f=r("f6c4"),d=Object(c["a"])(i,o,a,!1,null,null,null),h=d.exports;s()(d,{VApp:p["a"],VMain:f["a"]});var m=r("f309");n["a"].use(m["a"]);var v=new m["a"]({theme:{dark:!0}}),b=(r("d3b7"),r("3ca3"),r("ddb0"),r("8c4f"));n["a"].use(b["a"]);var g=[{path:"/",name:"Home",component:function(){return r.e("about").then(r.bind(null,"bb51"))}}],y=new b["a"]({mode:"history",base:"/jak-project/",routes:g}),w=y;n["a"].config.productionTip=!1,new n["a"]({vuetify:v,router:w,render:function(e){return e(h)}}).$mount("#app")}});
//# sourceMappingURL=app.1e67702b.js.map
(function(e){function t(t){for(var n,o,i=t[0],c=t[1],l=t[2],s=0,p=[];s<i.length;s++)o=i[s],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&p.push(a[o][0]),a[o]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);f&&f(t);while(p.length)p.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,o=1;o<r.length;o++){var i=r[o];0!==a[i]&&(n=!1)}n&&(u.splice(t--,1),e=c(c.s=r[0]))}return e}var n={},o={app:0},a={app:0},u=[];function i(e){return c.p+"js/"+({about:"about"}[e]||e)+"."+{about:"9d55a69c"}[e]+".js"}function c(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,c),r.l=!0,r.exports}c.e=function(e){var t=[],r={about:1};o[e]?t.push(o[e]):0!==o[e]&&r[e]&&t.push(o[e]=new Promise((function(t,r){for(var n="css/"+({about:"about"}[e]||e)+"."+{about:"c2633d65"}[e]+".css",a=c.p+n,u=document.getElementsByTagName("link"),i=0;i<u.length;i++){var l=u[i],s=l.getAttribute("data-href")||l.getAttribute("href");if("stylesheet"===l.rel&&(s===n||s===a))return t()}var p=document.getElementsByTagName("style");for(i=0;i<p.length;i++){l=p[i],s=l.getAttribute("data-href");if(s===n||s===a)return t()}var f=document.createElement("link");f.rel="stylesheet",f.type="text/css",f.onload=t,f.onerror=function(t){var n=t&&t.target&&t.target.src||a,u=new Error("Loading CSS chunk "+e+" failed.\n("+n+")");u.code="CSS_CHUNK_LOAD_FAILED",u.request=n,delete o[e],f.parentNode.removeChild(f),r(u)},f.href=a;var d=document.getElementsByTagName("head")[0];d.appendChild(f)})).then((function(){o[e]=0})));var n=a[e];if(0!==n)if(n)t.push(n[2]);else{var u=new Promise((function(t,r){n=a[e]=[t,r]}));t.push(n[2]=u);var l,s=document.createElement("script");s.charset="utf-8",s.timeout=120,c.nc&&s.setAttribute("nonce",c.nc),s.src=i(e);var p=new Error;l=function(t){s.onerror=s.onload=null,clearTimeout(f);var r=a[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;p.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",p.name="ChunkLoadError",p.type=n,p.request=o,r[1](p)}a[e]=void 0}};var f=setTimeout((function(){l({type:"timeout",target:s})}),12e4);s.onerror=s.onload=l,document.head.appendChild(s)}return Promise.all(t)},c.m=e,c.c=n,c.d=function(e,t,r){c.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},c.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,t){if(1&t&&(e=c(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(c.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)c.d(r,n,function(t){return e[t]}.bind(null,n));return r},c.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return c.d(t,"a",t),t},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.p="/jak-project/",c.oe=function(e){throw console.error(e),e};var l=window["webpackJsonp"]=window["webpackJsonp"]||[],s=l.push.bind(l);l.push=t,l=l.slice();for(var p=0;p<l.length;p++)t(l[p]);var f=s;u.push([0,"chunk-vendors"]),r()})({0:function(e,t,r){e.exports=r("56d7")},"56d7":function(e,t,r){"use strict";r.r(t);r("e260"),r("e6cf"),r("cca6"),r("a79d");var n=r("2b0e"),o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("v-app",[r("v-main",[r("router-view")],1)],1)},a=[],u={name:"App",components:{},data:function(){return{}}},i=u,c=r("2877"),l=r("6544"),s=r.n(l),p=r("7496"),f=r("f6c4"),d=Object(c["a"])(i,o,a,!1,null,null,null),h=d.exports;s()(d,{VApp:p["a"],VMain:f["a"]});var m=r("f309");n["a"].use(m["a"]);var v=new m["a"]({theme:{dark:!0}}),b=(r("d3b7"),r("3ca3"),r("ddb0"),r("8c4f"));n["a"].use(b["a"]);var g=[{path:"/",name:"Home",component:function(){return r.e("about").then(r.bind(null,"bb51"))}}],y=new b["a"]({mode:"history",base:"/jak-project/",routes:g}),w=y;n["a"].config.productionTip=!1,new n["a"]({vuetify:v,router:w,render:function(e){return e(h)}}).$mount("#app")}});
//# sourceMappingURL=app.b551871a.js.map
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
@@ -73,6 +73,7 @@ set(RUNTIME_SOURCE
overlord/stream.cpp
graphics/gfx.cpp
graphics/display.cpp
graphics/pipelines/opengl.cpp
system/vm/dmac.cpp
system/vm/vm.cpp)
+112 -35
View File
@@ -4,51 +4,128 @@
*/
#include "display.h"
#include "gfx.h"
#include "common/log/log.h"
namespace Display {
/* ****************************** */
/* Internal functions */
/* ****************************** */
GLFWwindow* display = NULL;
namespace {
void InitDisplay(int width, int height, const char* title, GLFWwindow*& d) {
if (d) {
lg::warn("InitDisplay has already created a display window");
return;
}
// request OpenGL 3.0 (placeholder)
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
d = glfwCreateWindow(width, height, title, NULL, NULL);
if (!d) {
lg::error("InitDisplay failed - Could not create display window");
return;
}
glfwMakeContextCurrent(d);
if (!gladLoadGL()) {
lg::error("GL init fail");
KillDisplay(d);
return;
}
// enable vsync by default
glfwSwapInterval(1);
lg::debug("init display #x{}", (uintptr_t)d);
bool renderer_is_correct(const GfxRendererModule* renderer, GfxPipeline pipeline) {
return renderer->pipeline == pipeline;
}
void KillDisplay(GLFWwindow*& d) {
lg::debug("kill display #x{}", (uintptr_t)d);
if (!d) {
lg::warn("KillDisplay called when no display was available");
void set_main_display(std::shared_ptr<GfxDisplay> display) {
if (Display::g_displays.size() > 0) {
Display::g_displays[0] = display;
} else {
Display::g_displays.push_back(display);
}
}
} // namespace
/* ****************************** */
/* GfxDisplay */
/* ****************************** */
GfxDisplay::GfxDisplay(GLFWwindow* a_window) {
set_renderer(GfxPipeline::OpenGL);
set_window(a_window);
}
GfxDisplay::~GfxDisplay() {
m_renderer->kill_display(this);
// window_generic_ptr = nullptr;
}
void GfxDisplay::set_renderer(GfxPipeline pipeline) {
if (is_active()) {
lg::error("Can't change display's renderer while window exists.");
return;
}
if (m_renderer != nullptr) {
lg::error("A display changed renderer unexpectedly.");
return;
}
glfwDestroyWindow(d);
d = NULL;
m_renderer = Gfx::GetRenderer(pipeline);
}
void GfxDisplay::set_window(GLFWwindow* window) {
if (!renderer_is_correct(m_renderer, GfxPipeline::OpenGL)) {
lg::error("Can't set OpenGL window when using {}", m_renderer->name);
return;
}
if (is_active()) {
lg::error("Already have a window. Close window first.");
return;
}
this->window_glfw = window;
}
void GfxDisplay::set_title(const char* title) {
if (!is_active()) {
lg::error("No window to set title `{}`.", title);
return;
}
m_title = title;
}
void GfxDisplay::render_graphics() {
m_renderer->render_display(this);
}
/* ****************************** */
/* DISPLAY */
/* ****************************** */
namespace Display {
std::vector<std::shared_ptr<GfxDisplay>> g_displays;
std::shared_ptr<GfxDisplay> GetMainDisplay() {
if (g_displays.size() == 0)
return NULL;
return g_displays.front()->is_active() ? g_displays.front() : NULL;
}
int InitMainDisplay(int width, int height, const char* title, GfxSettings& settings) {
if (GetMainDisplay() != NULL) {
lg::warn("InitMainDisplay called when main display already exists.");
return 1;
}
auto display = settings.renderer->make_main_display(width, height, title, settings);
if (display == NULL) {
lg::error("Failed to make main display.");
return 1;
}
set_main_display(display);
}
void KillDisplay(std::shared_ptr<GfxDisplay> display) {
// lg::debug("kill display #x{:x}", (uintptr_t)display);
if (!display->is_active()) {
lg::warn("display #x{:x} cant be killed because it is not active");
return;
}
if (GetMainDisplay() == display) {
// killing the main display, kill all children displays too!
for (int i = 1; i < g_displays.size(); ++i) {
KillDisplay(g_displays.at(i));
}
}
// find this display in the list and remove it from there
// if everything went right the smart pointer should delete the display.
auto this_disp = std::find(g_displays.begin(), g_displays.end(), display);
g_displays.erase(this_disp);
}
} // namespace Display
+38 -11
View File
@@ -5,21 +5,48 @@
* Display for graphics. This is the game window, distinct from the runtime console.
*/
#ifndef RUNTIME_DISPLAY_H
#define RUNTIME_DISPLAY_H
#include "pipelines/opengl.h"
#include "gfx.h"
#include <vector>
#include <memory>
#include "opengl.h"
// a GfxDisplay class is equivalent to a window that displays stuff. This holds an actual internal
// window pointer used by whichever renderer. It also contains functions for setting and
// retrieving certain window parameters.
class GfxDisplay {
const char* m_title;
const GfxRendererModule* m_renderer = nullptr;
public:
GfxDisplay(GLFWwindow* a_window); // OpenGL window constructor
~GfxDisplay(); // destructor - this calls the renderer's function for getting rid of a window,
// and we can then get rid of the GfxDisplay itself
// all kinds of windows for the display
union {
void* window_generic_ptr = nullptr;
GLFWwindow* window_glfw;
};
bool is_active() const { return window_generic_ptr != nullptr; }
void set_renderer(GfxPipeline pipeline);
void set_window(GLFWwindow* window);
void set_title(const char* title);
const char* get_title() const { return m_title; }
void render_graphics();
};
namespace Display {
// TODO - eventually we might actually want to support having multiple windows and viewpoints
// so it would be nice if we didn't end up designing this system such that this MUST be
// a single window.
extern GLFWwindow* display;
// a list of displays. the first one is the "main" display, all others are spectator-like extra
// views.
extern std::vector<std::shared_ptr<GfxDisplay>> g_displays;
void InitDisplay(int width, int height, const char* title, GLFWwindow*& d);
void KillDisplay(GLFWwindow*& d);
int InitMainDisplay(int width, int height, const char* title, GfxSettings& settings);
void KillDisplay(std::shared_ptr<GfxDisplay> display);
std::shared_ptr<GfxDisplay> GetMainDisplay();
} // namespace Display
#endif // RUNTIME_DISPLAY_H
+48 -31
View File
@@ -1,6 +1,6 @@
/*!
* @file gfx.cpp
* Graphics component for the runtime. Handles some low-level routines.
* Graphics component for the runtime. Abstraction layer for the main graphics routines.
*/
#include "gfx.h"
@@ -9,62 +9,79 @@
#include "game/runtime.h"
#include "display.h"
#include "opengl.h"
#include "pipelines/opengl.h"
namespace {
// initializes a gfx settings.
// TODO save and load from file
void InitSettings(GfxSettings& settings) {
// use opengl by default for now
settings.renderer = Gfx::GetRenderer(GfxPipeline::OpenGL); // Gfx::renderers[0];
// 1 screen update per frame
settings.vsync = 1;
return;
}
} // namespace
namespace Gfx {
void GlfwErrorCallback(int err, const char* msg) {
lg::error("GLFW ERR {}: " + std::string(msg), err);
GfxVertex g_vertices_temp[VERTEX_BUFFER_LENGTH_TEMP];
GfxSettings g_settings;
// const std::vector<const GfxRendererModule*> renderers = {&moduleOpenGL};
const GfxRendererModule* GetRenderer(GfxPipeline pipeline) {
switch (pipeline) {
case GfxPipeline::Invalid:
lg::error("Requested invalid graphics pipeline!");
return NULL;
break;
case GfxPipeline::OpenGL:
return &moduleOpenGL;
default:
lg::error("Unknown graphics pipeline {}", (u64)pipeline);
return NULL;
}
}
u32 Init() {
if (glfwSetErrorCallback(GlfwErrorCallback) != NULL) {
lg::warn("glfwSetErrorCallback has been re-set!");
}
lg::info("GFX Init");
// initialize settings
InitSettings(g_settings);
if (!glfwInit()) {
lg::error("glfwInit error");
if (g_settings.renderer->init()) {
lg::error("Gfx::Init error");
return 1;
}
if (g_main_thread_id != std::this_thread::get_id()) {
lg::warn("ran Gfx::Init outside main thread. Init display elsewhere?");
} else {
Display::InitDisplay(640, 480, "testy", Display::display);
Display::InitMainDisplay(640, 480, "testy", g_settings);
}
return 0;
}
void Loop(std::function<bool()> f) {
lg::info("GFX Loop");
while (f()) {
// run display-specific things
if (Display::display) {
// check if we have a display
if (Display::GetMainDisplay()) {
// lg::debug("run display");
glfwMakeContextCurrent(Display::display);
// render graphics
glClear(GL_COLOR_BUFFER_BIT);
glfwSwapBuffers(Display::display);
// poll events TODO integrate input with cpad
glfwPollEvents();
// exit if display window was closed
if (glfwWindowShouldClose(Display::display)) {
// Display::KillDisplay(Display::display);
MasterExit = 2;
}
Display::GetMainDisplay()->render_graphics();
}
}
}
u32 Exit() {
lg::debug("gfx exit");
Display::KillDisplay(Display::display);
glfwTerminate();
glfwSetErrorCallback(NULL);
lg::info("GFX Exit");
Display::KillDisplay(Display::GetMainDisplay());
g_settings.renderer->exit();
return 0;
}
+51 -7
View File
@@ -2,23 +2,67 @@
/*!
* @file gfx.h
* Graphics component for the runtime. Handles some low-level routines.
* Graphics component for the runtime. Abstraction layer for the main graphics routines.
*/
#ifndef RUNTIME_GFX_H
#define RUNTIME_GFX_H
#include <functional>
#include <memory>
#include "common/common_types.h"
#include "display.h"
#include "game/kernel/kboot.h"
// forward declarations
struct GfxSettings;
class GfxDisplay;
// enum for rendering pipeline
enum class GfxPipeline { Invalid = 0, OpenGL };
// module for the different rendering pipelines
struct GfxRendererModule {
std::function<int()> init;
std::function<std::shared_ptr<GfxDisplay>(int w, int h, const char* title, GfxSettings& settings)>
make_main_display;
std::function<void(GfxDisplay* display)> kill_display;
std::function<void(GfxDisplay* display)> render_display;
std::function<void()> exit;
GfxPipeline pipeline;
const char* name;
};
// store settings related to the gfx systems
struct GfxSettings {
const GfxRendererModule* renderer; // which rendering pipeline to use.
int vsync; // (temp) number of screen update per frame
};
// struct for a single vertex. this should in theory be renderer-agnostic
struct GfxVertex {
// x y z
float x, y, z;
// rgba or the full u32 thing.
union {
u32 rgba;
struct {
u8 r, g, b, a;
};
};
};
namespace Gfx {
static constexpr int VERTEX_BUFFER_LENGTH_TEMP = 4096;
extern GfxVertex g_vertices_temp[VERTEX_BUFFER_LENGTH_TEMP];
extern GfxSettings g_settings;
// extern const std::vector<const GfxRendererModule*> renderers;
const GfxRendererModule* GetRenderer(GfxPipeline pipeline);
u32 Init();
void Loop(std::function<bool()> f);
u32 Exit();
} // namespace Gfx
#endif // RUNTIME_GFX_H
-15
View File
@@ -1,15 +0,0 @@
#pragma once
/*!
* @file opengl.h
* OpenGL includes.
*/
#ifndef RUNTIME_OPENGL_H
#define RUNTIME_OPENGL_H
#define GLFW_INCLUDE_NONE
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#endif // RUNTIME_OPENGL_H
+127
View File
@@ -0,0 +1,127 @@
/*!
* @file opengl.cpp
* Lower-level OpenGL implementation.
*/
#include "opengl.h"
#include "game/graphics/gfx.h"
#include "game/graphics/display.h"
#include "common/log/log.h"
#include <memory>
namespace {
void SetDisplayCallbacks(GLFWwindow* d) {
glfwSetKeyCallback(d, [](GLFWwindow* window, int key, int scancode, int action, int mods) {
if (action == GlfwKeyAction::Press) {
lg::debug("KEY PRESS: key: {} scancode: {} mods: {:X}", key, scancode, mods);
} else if (action == GlfwKeyAction::Release) {
lg::debug("KEY RELEASE: key: {} scancode: {} mods: {:X}", key, scancode, mods);
}
});
}
void ErrorCallback(int err, const char* msg) {
lg::error("GLFW ERR {}: " + std::string(msg), err);
}
bool HasError() {
return glfwGetError(NULL) != GLFW_NO_ERROR;
}
} // namespace
static bool gl_inited = false;
static int gl_init() {
if (glfwSetErrorCallback(ErrorCallback) != NULL) {
lg::warn("glfwSetErrorCallback has been re-set!");
}
if (glfwInit() == GLFW_FALSE) {
lg::error("glfwInit error");
return 1;
}
// request OpenGL 3.0 (placeholder)
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
return 0;
}
static void gl_exit() {
glfwTerminate();
glfwSetErrorCallback(NULL);
}
static std::shared_ptr<GfxDisplay> gl_make_main_display(int width,
int height,
const char* title,
GfxSettings& settings) {
GLFWwindow* window = glfwCreateWindow(width, height, title, NULL, NULL);
if (!window) {
lg::error("gl_make_main_display failed - Could not create display window");
return NULL;
}
glfwMakeContextCurrent(window);
if (!gl_inited && !gladLoadGL()) {
lg::error("GL init fail");
return NULL;
}
gl_inited = true;
// enable vsync by default
// glfwSwapInterval(1);
glfwSwapInterval(settings.vsync);
SetDisplayCallbacks(window);
if (HasError()) {
lg::error("gl_make_main_display error");
return NULL;
}
std::shared_ptr<GfxDisplay> display = std::make_shared<GfxDisplay>(window);
// lg::debug("init display #x{:x}", (uintptr_t)display);
return display;
}
static void gl_kill_display(GfxDisplay* display) {
glfwDestroyWindow(display->window_glfw);
}
static void gl_render_display(GfxDisplay* display) {
GLFWwindow* window = display->window_glfw;
glfwMakeContextCurrent(window);
// render graphics
glClear(GL_COLOR_BUFFER_BIT);
glfwSwapBuffers(window);
// poll events TODO integrate input with cpad
glfwPollEvents();
// exit if display window was closed
if (glfwWindowShouldClose(window)) {
// Display::KillDisplay(window);
MasterExit = 2;
}
}
const GfxRendererModule moduleOpenGL = {
gl_init, // init
gl_make_main_display, // make_main_display
gl_kill_display, // kill_display
gl_render_display, // render_display
gl_exit, // exit
GfxPipeline::OpenGL, // pipeline
"OpenGL 3.0" // name
};
+20
View File
@@ -0,0 +1,20 @@
#pragma once
/*!
* @file opengl.h
* OpenGL includes.
*/
#define GLFW_INCLUDE_NONE
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include "game/graphics/gfx.h"
enum GlfwKeyAction {
Release = GLFW_RELEASE, // falling edge of key press
Press = GLFW_PRESS, // rising edge of key press
Repeat = GLFW_REPEAT // repeated input on hold e.g. when typing something
};
extern const GfxRendererModule moduleOpenGL;
-2
View File
@@ -48,9 +48,7 @@
#include "game/overlord/stream.h"
#include "game/overlord/sbank.h"
#include "game/graphics/opengl.h"
#include "game/graphics/gfx.h"
#include "game/graphics/display.h"
#include "game/system/vm/vm.h"
#include "game/system/vm/dmac.h"
-5
View File
@@ -6,9 +6,6 @@
* Not meant to work as a full DMAC emulator, just enough to inspect DMA packets.
*/
#ifndef VM_DMAC_H
#define VM_DMAC_H
#include "common/common_types.h"
#include "game/kernel/Ptr.h"
@@ -73,5 +70,3 @@ static_assert(alignof(DmaChannelRegisters) == 0x10, "DmaChannelRegisters unalign
void dmac_init_globals();
} // namespace VM
#endif // VM_DMAC_H
-5
View File
@@ -7,9 +7,6 @@
* Not an emulator!
*/
#ifndef VM_H
#define VM_H
#include "common/common_types.h"
namespace VM {
@@ -33,5 +30,3 @@ void unsubscribe_component();
u64 get_vm_ptr(u32 ptr);
} // namespace VM
#endif // VM_H
+3 -3
View File
@@ -110,15 +110,15 @@
(dummy-9 () none 9)
(dummy-10 () none 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-12 (_type_ vector float uint process bone uint) float 12) ;; TODO - bone not confirmed
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-16 () none 16)
(dummy-16 (_type_ vector float uint process uint) none 16)
(dummy-17 () none 17)
(dummy-18 () none 18)
(dummy-19 () none 19)
(dummy-20 () none 20)
(dummy-20 (_type_ vector float uint bone uint) none 20) ;; TODO - bone not confirmed
(dummy-21 () none 21)
(dummy-22 () none 22)
(dummy-23 () none 23)
+10 -8
View File
@@ -62,33 +62,35 @@
:flag-assert #x900000020
)
(declare-type collide-shape-prim basic)
(deftype collide-shape-intersect (basic)
((move-vec vector :inline :offset-assert 16)
(best-u float :offset-assert 32)
(best-tri collide-tri-result :inline :offset-assert 48)
(best-from-prim basic :offset-assert 132)
(best-to-prim basic :offset-assert 136)
(best-from-prim collide-shape-prim :offset-assert 132)
(best-to-prim collide-shape-prim :offset-assert 136)
)
:method-count-assert 10
:size-assert #x8c
:flag-assert #xa0000008c
(:methods
(dummy-9 () none 9)
)
(dummy-9 () none 9)
)
)
(declare-type collide-shape-prim basic)
(deftype collide-overlap-result (structure)
((best-dist float :offset-assert 0)
(best-from-prim basic :offset-assert 4)
(best-to-prim basic :offset-assert 8)
(best-from-prim collide-shape-prim :offset-assert 4)
(best-to-prim collide-shape-prim :offset-assert 8)
(best-from-tri collide-tri-result :inline :offset-assert 16)
)
:method-count-assert 10
:size-assert #x64
:flag-assert #xa00000064
(:methods
(reset! (_type_) none 9)
)
(reset! (_type_) none 9)
)
)
(defmethod reset! collide-overlap-result ((obj collide-overlap-result))
+2
View File
@@ -5,3 +5,5 @@
;; name in dgo: collide-shape
;; dgos: GAME, ENGINE
;; TODO - for misty-teetertotter | rigid-body
(define-extern default-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector none)) ;; TODO - not completely confirmed
+1 -37
View File
@@ -343,43 +343,7 @@
(defun disasm-dma-tag ((arg0 dma-tag) (arg1 symbol))
(format arg1 "(dma-tag ")
;; this is a case statement.
(let ((t9-1 format)
(a0-2 arg1)
(a1-2 "~s")
(v1-1 (-> arg0 id))
)
(t9-1 a0-2 a1-2 (cond
((= v1-1 (dma-tag-id end))
"end"
)
((= v1-1 (dma-tag-id ret))
"ret"
)
((= v1-1 (dma-tag-id call))
"call"
)
((= v1-1 (dma-tag-id refs))
"refs"
)
((= v1-1 (dma-tag-id ref))
"ref"
)
((= v1-1 (dma-tag-id next))
"next"
)
((= v1-1 (dma-tag-id cnt))
"cnt"
)
((zero? v1-1)
"refe"
)
(else
"*unknown*"
)
)
)
)
(format arg1 "~s" (enum->string dma-tag-id (-> arg0 id)))
(if (> (the-as uint (-> arg0 addr)) 0)
(format arg1 " :addr #x~8x" (-> arg0 addr))
)
+9 -1
View File
@@ -5,5 +5,13 @@
;; name in dgo: process-drawable
;; dgos: GAME, ENGINE
;; TODO - for sunken-elevator
;; TODO - for water-anim | sunken-elevator
(define-extern ja-post (function int))
;; TODO - for rigid-body
(define-extern rider-post (function int))
(define-extern transform-post (function int))
;; TODO - for misty-teetertotter
(define-extern transform-post (function int))
(define-extern ja-done? (function int symbol))
;; TODO - for misty-warehouse
(define-extern rider-trans (function int))
+5
View File
@@ -117,3 +117,8 @@
)
(the-as entity-actor #f)
)
;; TODO - for misty-teetertotter | rigid-body
(define-extern process-drawable-from-entity! (function process-drawable object none))
;; TODO - for misty-warehouse
(define-extern process-entity-status! (function process entity-perm-status symbol int))
+1 -13
View File
@@ -62,19 +62,7 @@
)
(defun pickup-type->string ((arg0 pickup-type))
(case arg0
(((pickup-type eco-pill-random)) "eco-pill-random")
(((pickup-type buzzer)) "buzzer")
(((pickup-type eco-pill)) "eco-pill")
(((pickup-type fuel-cell)) "fuel-cell")
(((pickup-type money)) "money")
(((pickup-type eco-green)) "eco-green")
(((pickup-type eco-blue)) "eco-blue")
(((pickup-type eco-red)) "eco-red")
(((pickup-type eco-yellow)) "eco-yellow")
(((pickup-type none)) "none")
(else "*unknown*")
)
(enum->string pickup-type arg0)
)
;; Each individual enemy and pickup process will allocate a fact-info on its process heap
+15 -15
View File
@@ -110,21 +110,21 @@
)
(deftype attack-info (structure)
((trans vector :inline :offset-assert 0)
(vector vector :inline :offset-assert 16)
(intersection vector :inline :offset-assert 32)
(attacker uint64 :offset-assert 48) ;; handle
(invinc-time uint64 :offset-assert 56)
(mask uint32 :offset-assert 64)
(mode basic :offset-assert 68)
(shove-back meters :offset-assert 72)
(shove-up meters :offset-assert 76)
(speed meters :offset-assert 80)
(dist meters :offset-assert 84)
(control float :offset-assert 88)
(angle basic :offset-assert 92)
(rotate-to degrees :offset-assert 96)
(prev-state basic :offset-assert 100)
((trans vector :inline :offset-assert 0)
(vector vector :inline :offset-assert 16)
(intersection vector :inline :offset-assert 32)
(attacker uint64 :offset-assert 48) ;; handle
(invinc-time uint64 :offset-assert 56)
(mask uint32 :offset-assert 64)
(mode symbol :offset-assert 68)
(shove-back meters :offset-assert 72)
(shove-up meters :offset-assert 76)
(speed meters :offset-assert 80)
(dist meters :offset-assert 84)
(control float :offset-assert 88)
(angle symbol :offset-assert 92)
(rotate-to degrees :offset-assert 96)
(prev-state state :offset-assert 100)
)
:method-count-assert 10
:size-assert #x68
+7 -7
View File
@@ -126,11 +126,11 @@
(leaving-misty 114)
(assistant-village3 115)
(max 116)
(*unknown* 255))
)
;; Game parameters.
(deftype game-bank (basic)
((life-max-default float :offset-assert 4)
((life-max-default float :offset-assert 4) ;; yes this life system works, but does nothing
(life-start-default float :offset-assert 8)
(life-single-inc float :offset-assert 12)
(money-task-inc float :offset-assert 16)
@@ -142,11 +142,11 @@
)
(define *GAME-bank* (new 'static 'game-bank
:life-max-default 99.000000
:life-start-default 5.000000
:life-single-inc 1.000000
:money-task-inc 90.000000
:money-oracle-inc 120.000000
:life-max-default 99.0
:life-start-default 5.0
:life-single-inc 1.0
:money-task-inc 90.0
:money-oracle-inc 120.0
)
)
+1 -120
View File
@@ -708,126 +708,7 @@
)
(defun-debug game-task->string ((arg0 game-task))
(case arg0
(((game-task max)) "max")
(((game-task assistant-village3)) "assistant-village3")
(((game-task leaving-misty)) "leaving-misty")
(((game-task plunger-lurker-hit)) "plunger-lurker-hit")
(((game-task finalboss-movies)) "finalboss-movies")
(((game-task village4-button)) "village4-button")
(((game-task ogre-secret)) "ogre-secret")
(((game-task intro)) "intro")
(((game-task lavatube-start)) "lavatube-start")
(((game-task lavatube-balls)) "lavatube-balls")
(((game-task red-eggtop)) "red-eggtop")
(((game-task village3-button)) "village3-button")
(((game-task swamp-arm)) "swamp-arm")
(((game-task village2-levitator)) "village2-levitator")
(((game-task firecanyon-assistant)) "firecanyon-assistant")
(((game-task village3-oracle-money2)) "village3-oracle-money2")
(((game-task village3-oracle-money1)) "village3-oracle-money1")
(((game-task village3-miner-money4)) "village3-miner-money4")
(((game-task village3-miner-money3)) "village3-miner-money3")
(((game-task village3-miner-money2)) "village3-miner-money2")
(((game-task village3-miner-money1)) "village3-miner-money1")
(((game-task training-buzzer)) "training-buzzer")
(((game-task training-climb)) "training-climb")
(((game-task training-door)) "training-door")
(((game-task training-gimmie)) "training-gimmie")
(((game-task citadel-buzzer)) "citadel-buzzer")
(((game-task lavatube-buzzer)) "lavatube-buzzer")
(((game-task lavatube-end)) "lavatube-end")
(((game-task ogre-buzzer)) "ogre-buzzer")
(((game-task ogre-end)) "ogre-end")
(((game-task ogre-boss)) "ogre-boss")
(((game-task cave-buzzer)) "cave-buzzer")
(((game-task cave-platforms)) "cave-platforms")
(((game-task cave-spider-tunnel)) "cave-spider-tunnel")
(((game-task cave-swing-poles)) "cave-swing-poles")
(((game-task cave-robot-climb)) "cave-robot-climb")
(((game-task cave-dark-climb)) "cave-dark-climb")
(((game-task cave-dark-crystals)) "cave-dark-crystals")
(((game-task cave-gnawers)) "cave-gnawers")
(((game-task village3-buzzer)) "village3-buzzer")
(((game-task village2-buzzer)) "village2-buzzer")
(((game-task village1-buzzer)) "village1-buzzer")
(((game-task village3-extra1)) "village3-extra1")
(((game-task citadel-sage-yellow)) "citadel-sage-yellow")
(((game-task citadel-sage-red)) "citadel-sage-red")
(((game-task citadel-sage-blue)) "citadel-sage-blue")
(((game-task citadel-sage-green)) "citadel-sage-green")
(((game-task firecanyon-end)) "firecanyon-end")
(((game-task firecanyon-buzzer)) "firecanyon-buzzer")
(((game-task snow-cage)) "snow-cage")
(((game-task snow-bumpers)) "snow-bumpers")
(((game-task snow-buzzer)) "snow-buzzer")
(((game-task snow-bunnies)) "snow-bunnies")
(((game-task snow-ball)) "snow-ball")
(((game-task snow-fort)) "snow-fort")
(((game-task snow-ram)) "snow-ram")
(((game-task snow-eggtop)) "snow-eggtop")
(((game-task rolling-ring-chase-2)) "rolling-ring-chase-2")
(((game-task rolling-ring-chase-1)) "rolling-ring-chase-1")
(((game-task rolling-buzzer)) "rolling-buzzer")
(((game-task rolling-lake)) "rolling-lake")
(((game-task rolling-plants)) "rolling-plants")
(((game-task rolling-moles)) "rolling-moles")
(((game-task rolling-robbers)) "rolling-robbers")
(((game-task rolling-race)) "rolling-race")
(((game-task sunken-spinning-room)) "sunken-spinning-room")
(((game-task sunken-top-of-helix)) "sunken-top-of-helix")
(((game-task sunken-buzzer)) "sunken-buzzer")
(((game-task sunken-sharks)) "sunken-sharks")
(((game-task sunken-room)) "sunken-room")
(((game-task sunken-slide)) "sunken-slide")
(((game-task sunken-pipe)) "sunken-pipe")
(((game-task sunken-platforms)) "sunken-platforms")
(((game-task swamp-buzzer)) "swamp-buzzer")
(((game-task swamp-tether-4)) "swamp-tether-4")
(((game-task swamp-tether-3)) "swamp-tether-3")
(((game-task swamp-tether-2)) "swamp-tether-2")
(((game-task swamp-tether-1)) "swamp-tether-1")
(((game-task swamp-battle)) "swamp-battle")
(((game-task swamp-flutflut)) "swamp-flutflut")
(((game-task swamp-billy)) "swamp-billy")
(((game-task village2-oracle-money2)) "village2-oracle-money2")
(((game-task village2-oracle-money1)) "village2-oracle-money1")
(((game-task village2-warrior-money)) "village2-warrior-money")
(((game-task village2-geologist-money)) "village2-geologist-money")
(((game-task village2-gambler-money)) "village2-gambler-money")
(((game-task misty-eco-challenge)) "misty-eco-challenge")
(((game-task misty-bike-jump)) "misty-bike-jump")
(((game-task misty-buzzer)) "misty-buzzer")
(((game-task misty-bike)) "misty-bike")
(((game-task misty-cannon)) "misty-cannon")
(((game-task misty-warehouse)) "misty-warehouse")
(((game-task misty-boat)) "misty-boat")
(((game-task misty-muse)) "misty-muse")
(((game-task beach-sentinel)) "beach-sentinel")
(((game-task beach-gimmie)) "beach-gimmie")
(((game-task beach-buzzer)) "beach-buzzer")
(((game-task beach-cannon)) "beach-cannon")
(((game-task beach-seagull)) "beach-seagull")
(((game-task beach-flutflut)) "beach-flutflut")
(((game-task beach-pelican)) "beach-pelican")
(((game-task beach-ecorocks)) "beach-ecorocks")
(((game-task village1-oracle-money2)) "village1-oracle-money2")
(((game-task village1-oracle-money1)) "village1-oracle-money1")
(((game-task village1-uncle-money)) "village1-uncle-money")
(((game-task village1-mayor-money)) "village1-mayor-money")
(((game-task village1-yakow)) "village1-yakow")
(((game-task jungle-temple-door)) "jungle-temple-door")
(((game-task jungle-canyon-end)) "jungle-canyon-end")
(((game-task jungle-buzzer)) "jungle-buzzer")
(((game-task jungle-plant)) "jungle-plant")
(((game-task jungle-fishgame)) "jungle-fishgame")
(((game-task jungle-tower)) "jungle-tower")
(((game-task jungle-lurkerm)) "jungle-lurkerm")
(((game-task jungle-eggtop)) "jungle-eggtop")
(((game-task complete)) "complete")
(((game-task none)) "none")
(else "*unknown*")
)
(enum->string game-task arg0)
)
(defmethod debug-print game-info ((obj game-info) (arg0 symbol))
+1 -49
View File
@@ -131,55 +131,7 @@
)
(defun-debug game-save-elt->string ((arg0 game-save-elt))
"Convert a game-save-elt to a string"
(let ((v1-0 arg0))
(cond
((= v1-0 (game-save-elt aspect-ratio)) "aspect-ratio")
((= v1-0 (game-save-elt video-mode)) "video-mode")
((= v1-0 (game-save-elt play-hints)) "play-hints")
((= v1-0 (game-save-elt vibration)) "vibration")
((= v1-0 (game-save-elt screeny)) "screeny")
((= v1-0 (game-save-elt screenx)) "screenx")
((= v1-0 (game-save-elt language)) "language")
((= v1-0 (game-save-elt dialog-volume)) "dialog-volume")
((= v1-0 (game-save-elt music-volume)) "music-volume")
((= v1-0 (game-save-elt sfx-volume)) "sfx-volume")
((= v1-0 (game-save-elt in-level-time)) "in-level-time")
((= v1-0 (game-save-elt auto-save-count)) "auto-save-count")
((= v1-0 (game-save-elt death-pos)) "death-pos")
((= v1-0 (game-save-elt deaths-per-level)) "deaths-per-level")
((= v1-0 (game-save-elt enter-level-time)) "enter-level-time")
((= v1-0 (game-save-elt fuel-cell-time)) "fuel-cell-time")
((= v1-0 (game-save-elt continue-time)) "continue-time")
((= v1-0 (game-save-elt fuel-cell-pickup-time)) "fuel-cell-pickup-time")
((= v1-0 (game-save-elt hit-time)) "hit-time")
((= v1-0 (game-save-elt death-time)) "death-time")
((= v1-0 (game-save-elt continue-timke)) "continue-timke")
((= v1-0 (game-save-elt game-start-time)) "game-start-time")
((= v1-0 (game-save-elt fuel-cell-deaths)) "fuel-cell-deaths")
((= v1-0 (game-save-elt continue-deaths)) "continue-deaths")
((= v1-0 (game-save-elt total-deaths)) "total-deaths")
((= v1-0 (game-save-elt level-open-list)) "level-open-list")
((= v1-0 (game-save-elt text-list)) "text-list")
((= v1-0 (game-save-elt hint-list)) "hint-list")
((= v1-0 (game-save-elt perm-list)) "perm-list")
((= v1-0 (game-save-elt task-list)) "task-list")
((= v1-0 (game-save-elt death-movie-tick)) "death-movie-tick")
((= v1-0 (game-save-elt fuel-cell)) "fuel-cell")
((= v1-0 (game-save-elt buzzer-total)) "buzzer-total")
((= v1-0 (game-save-elt moeny-per-level)) "money-per-level")
((= v1-0 (game-save-elt money-total)) "money-total")
((= v1-0 (game-save-elt money)) "money")
((= v1-0 (game-save-elt life)) "life")
((= v1-0 (game-save-elt continue)) "continue")
((= v1-0 (game-save-elt integral-time)) "integral-time")
((= v1-0 (game-save-elt game-time)) "game-time")
((= v1-0 (game-save-elt real-time)) "real-time")
((= v1-0 (game-save-elt base-time)) "base-time")
((= v1-0 (game-save-elt name)) "name")
(else "*unknown*")
)
)
(enum->string game-save-elt arg0)
)
(defun progress-level-index->string ((arg0 int))
+1 -3
View File
@@ -71,9 +71,7 @@
)
(deftype camera-tracker (process)
(
;(name basic :offset-assert 4)
(grab-target uint64 :offset 120)
((grab-target handle :offset 120)
(grab-event basic :offset-assert 128)
(release-event basic :offset-assert 132)
(old-global-mask uint32 :offset-assert 136)
+7 -1
View File
@@ -11,4 +11,10 @@
:method-count-assert 15
:size-assert #x70
:flag-assert #xf00000070
)
)
;; TODO - for misty-warehouse
(define-extern camera-tracker-init (function function none)) ;; TODO - not confirmed, see misty-warehouse::camera-view
(define-extern process-grab? (function process symbol))
(define-extern camera-change-to (function string int symbol none)) ;; TODO - not confirmed yet
(define-extern process-release? (function process symbol))
+23 -23
View File
@@ -6,28 +6,28 @@
;; dgos: GAME, ENGINE
(deftype projectile (process-drawable)
((base-trans vector :inline :offset-assert 176)
(target vector :inline :offset-assert 192)
(target-base vector :inline :offset-assert 208)
(parent-base vector :inline :offset-assert 224)
(parent-quat vector :inline :offset-assert 240)
(base-vector vector :inline :offset-assert 256)
(timeout uint64 :offset-assert 272)
(options uint64 :offset-assert 280)
(last-target uint64 :offset-assert 288)
(notify-handle uint64 :offset-assert 296)
(max-speed float :offset-assert 304)
(max-turn float :offset-assert 308)
(old-dist float 16 :offset-assert 312)
(old-dist-count int32 :offset-assert 376)
(hits int32 :offset-assert 380)
(max-hits int32 :offset-assert 384)
(tween float :offset-assert 388)
(attack-mode basic :offset-assert 392)
(update-velocity basic :offset-assert 396)
(counter int32 :offset-assert 400)
(target-count int32 :offset-assert 404)
(sound-id sound-id :offset-assert 408)
((base-trans vector :inline :offset-assert 176)
(target vector :inline :offset-assert 192)
(target-base vector :inline :offset-assert 208)
(parent-base vector :inline :offset-assert 224)
(parent-quat vector :inline :offset-assert 240)
(base-vector vector :inline :offset-assert 256)
(timeout uint64 :offset-assert 272)
(options uint64 :offset-assert 280)
(last-target uint64 :offset-assert 288)
(notify-handle uint64 :offset-assert 296)
(max-speed float :offset-assert 304)
(max-turn float :offset-assert 308)
(old-dist float 16 :offset-assert 312)
(old-dist-count int32 :offset-assert 376)
(hits int32 :offset-assert 380)
(max-hits int32 :offset-assert 384)
(tween float :offset-assert 388)
(attack-mode basic :offset-assert 392)
(update-velocity basic :offset-assert 396)
(counter int32 :offset-assert 400)
(target-count int32 :offset-assert 404)
(sound-id sound-id :offset-assert 408)
)
:heap-base #x130
:method-count-assert 29
@@ -38,7 +38,7 @@
(projectile-dissipate () none 21) ;; state
(projectile-impact () none 22) ;; state
(dummy-23 () none 23)
(dummy-24 () none 24)
(dummy-24 (_type_) none 24)
(dummy-25 () none 25)
(dummy-26 () none 26)
(dummy-27 () none 27)
+1 -11
View File
@@ -6,17 +6,7 @@
;; dgos: GAME, ENGINE
(defun-debug task-status->string ((arg0 task-status))
(case arg0
(((task-status need-resolution)) "need-resolution")
(((task-status need-reward-speech)) "need-reward-speech")
(((task-status need-reminder)) "need-reminder")
(((task-status need-reminder-a)) "need-reminder-a")
(((task-status need-introduction)) "need-introduction")
(((task-status need-hint)) "need-hint")
(((task-status unknown)) "unknown")
(((task-status invalid)) "invalid")
(else "*unknown*")
)
(enum->string task-status arg0)
)
(defmethod get-game-task task-cstage ((obj task-cstage))
+1 -16
View File
@@ -98,22 +98,7 @@
(defun psm->string ((arg0 gs-psm))
"Get the name of a texture format."
(case arg0
(((gs-psm mz16s)) "mz16s")
(((gs-psm mz16)) "mz16")
(((gs-psm mz24)) "mz24")
(((gs-psm mz32)) "mz32")
(((gs-psm mt4hh)) "mt4hh")
(((gs-psm mt4hl)) "mt4hl")
(((gs-psm mt8h)) "mt8h")
(((gs-psm mt4)) "mt4")
(((gs-psm mt8)) "mt8")
(((gs-psm ct16s)) "ct16s")
(((gs-psm ct16)) "ct16")
(((gs-psm ct24)) "ct24")
(((gs-psm ct32)) "ct32")
(else "*unknown*")
)
(enum->string gs-psm arg0)
)
+2
View File
@@ -7,3 +7,5 @@
;; TODO - for ocean-transition
(define-extern *ocean-map* ocean-map)
;; TODO - for rigid-body
(define-extern ocean-get-height (function vector float))
+1 -1
View File
@@ -149,7 +149,7 @@
)
;; definition for function ripple-find-height
(defun ripple-find-height ((arg0 process-drawable) (arg1 basic) (arg2 vector))
(defun ripple-find-height ((arg0 process-drawable) (arg1 int) (arg2 vector))
(local-vars (sv-16 float) (sv-32 float))
(let* ((f30-0 (-> arg0 root trans y))
(v1-1 (-> arg0 draw))
+336
View File
@@ -5,3 +5,339 @@
;; name in dgo: shadow
;; dgos: GAME, ENGINE
;; definition for function add-fake-shadow-to-buffer
;; INFO: Return type mismatch int vs none.
(defun
add-fake-shadow-to-buffer
((arg0 vector) (arg1 vector) (arg2 float) (arg3 int))
(let ((v1-0 *fake-shadow-buffer*))
(when (< (-> v1-0 num-shadows) 32)
(let ((t0-5 (-> v1-0 data (-> v1-0 num-shadows))))
(set! (-> t0-5 px) (-> arg0 x))
(set! (-> t0-5 py) (-> arg0 y))
(set! (-> t0-5 pz) (-> arg0 z))
(set! (-> t0-5 scale) arg2)
(set! (-> t0-5 qx) (-> arg1 x))
(set! (-> t0-5 qy) (-> arg1 y))
(set! (-> t0-5 qz) (-> arg1 z))
(set! (-> t0-5 flags) arg3)
)
(+! (-> v1-0 num-shadows) 1)
)
)
0
(none)
)
;; definition for function swap-fake-shadow-buffers
;; INFO: Return type mismatch int vs none.
(defun swap-fake-shadow-buffers ()
(set! *fake-shadow-buffer* (if (= *fake-shadow-buffer* *fake-shadow-buffer-1*)
*fake-shadow-buffer-2*
*fake-shadow-buffer-1*
)
)
(set! (-> *fake-shadow-buffer* num-shadows) 0)
0
(none)
)
;; definition for function draw-shadow
;; INFO: Return type mismatch int vs none.
(defun
draw-shadow
((arg0 vector)
(arg1 vector)
(arg2 vector)
(arg3 float)
(arg4 float)
(arg5 float)
)
(let ((f0-1 (- (-> arg0 y) (-> arg1 y))))
(if (< f0-1 arg4)
(add-fake-shadow-to-buffer
arg1
arg2
(* (- 1.0 (/ f0-1 arg4)) arg3)
(the-as int arg5)
)
)
)
0
(none)
)
;; definition for function compute-and-draw-shadow
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defun
compute-and-draw-shadow
((arg0 vector)
(arg1 vector)
(arg2 vector)
(arg3 vector)
(arg4 float)
(arg5 float)
)
(local-vars
(v1-10 float)
(v1-11 float)
(sv-96 vector)
(sv-112 (function quaternion vector float quaternion))
(sv-128 vector)
(sv-144 vector)
)
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
)
(init-vf0-vector)
(set! sv-96 arg2)
(let ((s4-0 arg3)
(s3-0 arg4)
(s2-0 arg5)
)
(when (< (- (-> arg0 y) (-> arg1 y)) s3-0)
(set! sv-144 (new 'stack-no-clear 'vector))
(let ((s0-0 (new 'stack-no-clear 'vector))
(s1-0 (new 'stack-no-clear 'sparticle-cpuinfo))
)
(set! (-> arg1 y) (+ 40.96 (-> arg1 y)))
(set! (-> sv-144 x) (-> sv-96 z))
(set! (-> sv-144 y) 0.0)
(set! (-> sv-144 z) (- (-> sv-96 x)))
(vector-normalize! sv-144 1.0)
(set! sv-112 quaternion-vector-angle!)
(set! sv-128 s0-0)
(let ((a2-1 (acos (-> sv-96 y))))
(sv-112 (the-as quaternion sv-128) sv-144 a2-1)
)
(let ((v1-9 s1-0))
(cond
((< (-> s0-0 w) 0.0)
(.lvf vf1 (&-> v1-9 vel-sxvel quad))
(.lvf vf2 (&-> s0-0 quad))
(.sub.vf vf1 vf0 vf2 :mask #b111)
(.svf (&-> v1-9 vel-sxvel quad) vf1)
(.mov v1-10 vf1)
)
(else
(.lvf vf1 (&-> v1-9 vel-sxvel quad))
(.lvf vf2 (&-> s0-0 quad))
(.add.vf vf1 vf0 vf2 :mask #b111)
(.svf (&-> v1-9 vel-sxvel quad) vf1)
(.mov v1-11 vf1)
)
)
)
(draw-shadow arg0 arg1 (-> s1-0 vel-sxvel) (the-as float s4-0) s3-0 s2-0)
)
)
)
0
(none)
)
)
;; definition for function find-ground-and-draw-shadow
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defun
find-ground-and-draw-shadow
((arg0 vector)
(arg1 vector)
(arg2 float)
(arg3 uint)
(arg4 process)
(arg5 float)
(arg6 float)
)
(let ((s2-0 (new 'stack-no-clear 'vector)))
(set! (-> s2-0 quad) (-> arg0 quad))
(new 'stack-no-clear 'vector)
(+! (-> s2-0 y) arg5)
(let ((s4-0 (new 'stack-no-clear 'bone)))
(cond
((>=
(dummy-12 *collide-cache* s2-0 arg6 arg3 arg4 s4-0 (the-as uint 1))
0.0
)
(if (!= arg2 0.0)
(compute-and-draw-shadow
s2-0
(-> s4-0 position)
(-> s4-0 scale)
(the-as vector arg2)
arg6
(the-as float 0)
)
)
(if (and arg1 (!= (shr (shl (-> s4-0 cache bone-matrix) 52) 58) 3))
(set! (-> arg1 quad) (-> s4-0 position quad))
)
)
(else
(if arg1
(vector+float*!
arg1
arg0
(-> *standard-dynamics* gravity-normal)
(- arg6)
)
)
)
)
)
)
0
(none)
)
;; definition for function do-target-shadow
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defbehavior do-target-shadow target ()
(if
(and
(logtest? (-> self control status) 1)
(!= (-> self control unknown-surface mode) 'swim)
(!= (-> self control unknown-surface mode) 'dive)
(!= (-> self next-state name) 'target-flop)
(zero? (logand (-> self draw status) 38))
)
(set! (-> self control shadow-pos quad) (-> self control trans quad))
(find-ground-and-draw-shadow
(-> self control trans)
(-> self control shadow-pos)
0.0
(-> (the-as collide-shape-prim (-> self control root-prim)) collide-with)
self
0.0
81920.0
)
)
0
(none)
)
;; failed to figure out what this is:
(set!
(-> *part-id-table* 362)
(new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 20
(new 'static 'sp-field-init-spec :field #x1 :initial-value #x200000)
(new 'static 'sp-field-init-spec
:field #x6
:flags #x1
:initial-value #x41000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #xd
:flags #x1
:initial-value #x4499999a
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x10
:flags #x1
:initial-value -956301312
:random-range #x47800000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x11
:flags #x3
:initial-value -4
:random-mult 1
)
(new 'static 'sp-field-init-spec
:field #x12
:flags #x1
:initial-value #x42b40000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x13
:flags #x1
:initial-value #x42b40000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x14
:flags #x1
:initial-value #x42b40000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x15
:flags #x1
:initial-value #x41a00000
:random-range #x41a00000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x1a
:flags #x1
:initial-value #x4103126f
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x1c
:flags #x1
:initial-value #x41888889
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x20
:flags #x3
:initial-value -4
:random-mult 1
)
(new 'static 'sp-field-init-spec
:field #x24
:flags #x1
:initial-value -1097229926
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x2e
:initial-value #x138c
:random-mult 1
)
(new 'static 'sp-field-init-spec
:field #x2f
:initial-value 12
:random-mult 1
)
(new 'static 'sp-field-init-spec
:field #x36
:flags #x1
:initial-value -983331271
:random-range #x452aaaab
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x3a
:flags #x1
:initial-value #x46800000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x3b
:flags #x1
:initial-value -956301312
:random-range #x47800000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x3e
:flags #x1
:initial-value #x444ccccd
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec :field #x43)
)
)
)
+1 -20
View File
@@ -224,26 +224,7 @@
(camera 16))
(defun-debug perf-stat-bucket->string ((arg0 perf-stat-bucket))
(case arg0
(((perf-stat-bucket camera)) "camera")
(((perf-stat-bucket collide)) "collide")
(((perf-stat-bucket nav)) "nav")
(((perf-stat-bucket bones)) "bones")
(((perf-stat-bucket proto-tie-n)) "proto-tie-n")
(((perf-stat-bucket proto-tie)) "proto-tie")
(((perf-stat-bucket proto-tie-g)) "proto-tie-g")
(((perf-stat-bucket inst-tie)) "inst-tie")
(((perf-stat-bucket proto-shrub)) "proto-shrub")
(((perf-stat-bucket inst-shrub)) "inst-shrub")
(((perf-stat-bucket tfrag-near)) "tfrag-near")
(((perf-stat-bucket tfrag)) "tfrag")
(((perf-stat-bucket drawable)) "drawable")
(((perf-stat-bucket background)) "background")
(((perf-stat-bucket tie-generic)) "tie-generic")
(((perf-stat-bucket mercneric)) "mercneric")
(((perf-stat-bucket all-code)) "all-code")
(else "*unknown*")
)
(enum->string perf-stat-bucket arg0)
)
+54 -3
View File
@@ -97,16 +97,67 @@
:method-count-assert 30
:size-assert #xd4
:flag-assert #x1e007000d4
;; inherited inspect of process-drawable
(:methods
(water-vol-idle () none 20) ;; state
(water-vol-startup () none 21) ;; state
(dummy-22 () none 22)
(TODO-RENAME-22 (_type_) ripple-wave-set 22)
(dummy-23 () none 23)
(dummy-24 () none 24)
(dummy-25 () none 25)
(TODO-RENAME-25 (_type_) quaternion 25)
(dummy-26 () none 26)
(dummy-27 () none 27)
(dummy-28 () none 28)
(get-ripple-height (_type_ vector) float 28)
(dummy-29 () none 29)
)
)
;; Manually Added
(define-extern *water-anim-sunken-dark-eco-qbert-sg* skeleton-group)
(define-extern *water-anim-sunken-dark-eco-platform-room-sg* skeleton-group)
(define-extern *water-anim-sunken-dark-eco-helix-room-sg* skeleton-group)
(define-extern *water-anim-sunken-big-room-sg* skeleton-group)
(define-extern *water-anim-sunken-first-room-from-entrance-sg* skeleton-group)
(define-extern *water-anim-sunken-qbert-room-sg* skeleton-group)
(define-extern *water-anim-sunken-first-right-branch-sg* skeleton-group)
(define-extern *water-anim-sunken-circular-with-bullys-sg* skeleton-group)
(define-extern *water-anim-sunken-hall-with-one-whirlpool-sg* skeleton-group)
(define-extern *water-anim-sunken-hall-with-three-whirlpools-sg* skeleton-group)
(define-extern *water-anim-sunken-start-of-helix-slide-sg* skeleton-group)
(define-extern *water-anim-sunken-room-above-exit-chamber-sg* skeleton-group)
(define-extern *water-anim-sunken-hall-before-big-room-sg* skeleton-group)
(define-extern *water-anim-sunken-short-piece-sg* skeleton-group)
(define-extern *water-anim-sunken-big-room-upper-water-sg* skeleton-group)
(define-extern *water-anim-maincave-center-pool-sg* skeleton-group)
(define-extern *water-anim-maincave-lower-right-pool-sg* skeleton-group)
(define-extern *water-anim-maincave-mid-right-pool-sg* skeleton-group)
(define-extern *water-anim-maincave-lower-left-pool-sg* skeleton-group)
(define-extern *water-anim-maincave-mid-left-pool-sg* skeleton-group)
(define-extern *water-anim-maincave-water-with-crystal-sg* skeleton-group)
(define-extern *water-anim-robocave-main-pool-sg* skeleton-group)
(define-extern *water-anim-misty-mud-by-arena-sg* skeleton-group)
(define-extern *water-anim-misty-mud-above-skeleton-sg* skeleton-group)
(define-extern *water-anim-misty-mud-behind-skeleton-sg* skeleton-group)
(define-extern *water-anim-misty-mud-above-skull-back-sg* skeleton-group)
(define-extern *water-anim-misty-mud-above-skull-front-sg* skeleton-group)
(define-extern *water-anim-misty-mud-other-near-skull-sg* skeleton-group)
(define-extern *water-anim-misty-mud-near-skull-sg* skeleton-group)
(define-extern *water-anim-misty-mud-under-spine-sg* skeleton-group)
(define-extern *water-anim-misty-mud-by-dock-sg* skeleton-group)
(define-extern *water-anim-misty-mud-island-near-dock-sg* skeleton-group)
(define-extern *water-anim-misty-mud-lonely-island-sg* skeleton-group)
(define-extern *water-anim-misty-dark-eco-pool-sg* skeleton-group)
(define-extern *water-anim-ogre-lava-sg* skeleton-group)
(define-extern *water-anim-jungle-river-sg* skeleton-group)
(define-extern *water-anim-village3-lava-sg* skeleton-group)
(define-extern *water-anim-training-lake-sg* skeleton-group)
(define-extern *water-anim-darkcave-water-with-crystal-sg* skeleton-group)
(define-extern *water-anim-rolling-water-back-sg* skeleton-group)
(define-extern *water-anim-rolling-water-front-sg* skeleton-group)
(define-extern *water-anim-finalboss-dark-eco-pool-sg* skeleton-group)
(define-extern *water-anim-lavatube-energy-lava-sg* skeleton-group)
(define-extern *water-anim-village1-rice-paddy-sg* skeleton-group)
(define-extern *water-anim-village1-fountain-sg* skeleton-group)
(define-extern *water-anim-village1-rice-paddy-mid-sg* skeleton-group)
(define-extern *water-anim-village1-rice-paddy-top-sg* skeleton-group)
(define-extern *water-anim-village2-bucket-sg* skeleton-group)
+1 -26
View File
@@ -182,32 +182,7 @@
)
(defun-debug sound-command->string ((cmd sound-command))
(case cmd
(((sound-command unload-music)) "unload-music")
(((sound-command list-sounds)) "list-sounds")
(((sound-command shutdown)) "shutdown")
(((sound-command set-ear-trans)) "set-ear-trans")
(((sound-command set-reverb)) "set-reverb")
(((sound-command set-flava)) "set-flava")
(((sound-command set-language)) "set-language")
(((sound-command reload-info)) "reload-info")
(((sound-command set-sound-falloff)) "set-sound-falloff")
(((sound-command set-falloff-curve)) "set-falloff-curve")
(((sound-command get-irx-version)) "get-irx-version")
(((sound-command continue-group)) "continue-group")
(((sound-command stop-group)) "stop-group")
(((sound-command pause-group)) "pause-group")
(((sound-command set-master-volume)) "set-master-volume")
(((sound-command set-param)) "set-param")
(((sound-command continue-sound)) "continue-sound")
(((sound-command stop-sound)) "stop-sound")
(((sound-command pause-sound)) "pause-sound")
(((sound-command play)) "play")
(((sound-command unload-bank)) "unload-bank")
(((sound-command load-music)) "load-music")
(((sound-command load-bank)) "load-bank")
(else "*unknown*")
)
(enum->string sound-command cmd)
)
(defun sound-buffer-dump ()
+4
View File
@@ -84,3 +84,7 @@
)
(define-extern part-group-pointer? (function pointer symbol))
;; TODO - for shadow
(define-extern *part-id-table* (array sparticle-launcher))
(define-extern *part-group-id-table* (array sparticle-launch-group))
@@ -6,19 +6,19 @@
;; dgos: GAME, ENGINE
(deftype sp-field-init-spec (structure)
((field uint16 :offset-assert 0)
(flags uint16 :offset-assert 2)
(initial-valuef float :offset-assert 4)
(random-rangef float :offset-assert 8)
(random-multf float :offset-assert 12)
(initial-value int32 :offset 4)
(random-range int32 :offset 8)
(random-mult int32 :offset 12)
(func basic :offset 4)
(tex uint32 :offset 4)
(pntr uint32 :offset 4)
(sym basic :offset 4)
(sound basic :offset 4)
((field uint16 :offset-assert 0)
(flags uint16 :offset-assert 2)
(initial-value int32 :offset-assert 4)
(random-range int32 :offset-assert 8)
(random-mult int32 :offset-assert 12)
(initial-valuef float :offset 4) ;; TODO - floats suck - some of these values end up being NaN - these should come before the int32 fields
(random-rangef float :offset 8) ;; TODO - floats suck - some of these values end up being NaN - these should come before the int32 fields
(random-multf float :offset 12) ;; TODO - floats suck - some of these values end up being NaN - these should come before the int32 fields
(func basic :offset 4)
(tex uint32 :offset 4)
(pntr uint32 :offset 4)
(sym basic :offset 4)
(sound basic :offset 4)
)
:method-count-assert 9
:size-assert #x10
@@ -28,7 +28,7 @@
(deftype sparticle-launcher (basic)
((birthaccum float :offset-assert 4)
(soundaccum float :offset-assert 8)
(init-specs uint32 :offset-assert 12)
(init-specs (inline-array sp-field-init-spec) :offset-assert 12)
)
:method-count-assert 9
:size-assert #x10
@@ -5,3 +5,6 @@
;; name in dgo: sparticle-launcher
;; dgos: GAME, ENGINE
;; TODO - for shadow
(define *part-id-table* (new 'global 'boxed-array sparticle-launcher 3584))
(define *part-group-id-table* (new 'global 'boxed-array sparticle-launch-group 1024))
+3 -42
View File
@@ -70,54 +70,15 @@
)
(defun-debug pat-material->string ((pat pat-surface))
(case (-> pat material)
(((pat-material neutral)) "neutral")
(((pat-material rotate)) "rotate")
(((pat-material stopproj)) "stopproj")
(((pat-material swamp)) "swamp")
(((pat-material tube)) "tube")
(((pat-material straw)) "straw")
(((pat-material metal)) "metal")
(((pat-material dirt)) "dirt")
(((pat-material gravel)) "gravel")
(((pat-material crwood)) "crwood")
(((pat-material lava)) "lava")
(((pat-material hotcoals)) "hotcoals")
(((pat-material deepsnow)) "deepsnow")
(((pat-material snow)) "snow")
(((pat-material pcmetal)) "pcmetal")
(((pat-material grass)) "grass")
(((pat-material wood)) "wood")
(((pat-material sand)) "sand")
(((pat-material tar)) "tar")
(((pat-material waterbottom)) "waterbottom")
(((pat-material quicksand)) "quicksand")
(((pat-material ice)) "ice")
(((pat-material stone)) "stone")
(else "*unknown*")
)
(enum->string pat-material (-> pat material))
)
(defun-debug pat-mode->string ((pat pat-surface))
(case (-> pat mode)
(((pat-mode obstacle)) "obstacle")
(((pat-mode wall)) "wall")
(((pat-mode ground)) "ground")
(else "*unknown*")
)
(enum->string pat-mode (-> pat mode))
)
(defun-debug pat-event->string ((pat pat-surface))
(case (-> pat event)
(((pat-event melt)) "melt")
(((pat-event burnup)) "burnup")
(((pat-event deadlyup)) "deadlyup")
(((pat-event burn)) "burn")
(((pat-event endlessfall)) "endlessfall")
(((pat-event deadly)) "deadly")
(((pat-event none)) "none")
(else "*unknown*")
)
(enum->string pat-event (-> pat event))
)
(deftype pat-mode-info (structure)
+2
View File
@@ -88,6 +88,8 @@
(jungle-temple-door #x265)
(misty-bike-jump #x266)
(misty-eco-challenge #x267)
(misty-teetertotter-bonk-dax-tutorial #x2a4)
(village2-gambler-money #x300)
(village2-geologist-money #x301)
+36 -1
View File
@@ -524,7 +524,7 @@
(defmacro logtesta? (a b)
"does a have ALL of the bits in b?"
`(= (logand ,a ,b) ,b)
`(= (logand ,b ,a) ,b)
)
(defmacro deref (t addr &rest fields)
@@ -707,3 +707,38 @@
;; load the default project
(load-project "goal_src/game.gp")
;;;;;;;;;;;;;;;;;;;
;; enum stuff
;;;;;;;;;;;;;;;;;;;
(defmacro enum->string (enum input)
"return the name of an enum value"
`(case ,input
,@(apply (lambda (x) `(((,enum ,(car x) )) ,(symbol->string (car x) ) )) (reverse (get-enum-vals enum)))
(else "*unknown*")
)
)
(defmacro bit-enum->string (enum input stream)
"print the enum bits in input to stream"
(with-gensyms (val str)
`(let ((,val ,input)
(,str ,stream))
,@(apply (lambda (x)
`(if (logtesta? ,val (,enum ,(car x)))
(format ,str ,(fmt #f "{} " (car x)))
)
) (reverse (get-enum-vals enum)))
)
)
)
+80
View File
@@ -62,6 +62,9 @@
(defsmacro cddr (x)
`(cdr (cdr ,x)))
(defsmacro cdddr (x)
`(cdr (cdr (cdr ,x))))
(desfun first (x)
(car x))
@@ -116,6 +119,40 @@
)
)
(desfun reverse (lst)
(if (null? lst)
'()
(let ((old-lst lst)
(new-lst '()))
(while (not (null? old-lst))
(set! new-lst (cons (car old-lst) new-lst))
(set! old-lst (cdr old-lst))
)
new-lst
)
)
)
(desfun reverse-recursive (lst)
(if (null? lst)
'()
(let ((old-lst lst)
(new-lst '()))
(while (not (null? old-lst))
(let ((cur-obj (car old-lst)))
(set! new-lst (cons (if (pair? cur-obj)
(reverse-recursive cur-obj)
cur-obj
)
new-lst))
(set! old-lst (cdr old-lst))
)
)
new-lst
)
)
)
(defsmacro let (bindings &rest body)
`((lambda ,(apply first bindings) ,@body)
,@(apply second bindings)))
@@ -239,6 +276,49 @@
)
;;;;;;;;;;;;;;;;;;;
;; enum stuff
;;;;;;;;;;;;;;;;;;;
(desfun enum-length (enum)
(length (get-enum-vals enum))
)
(defsmacro doenum (bindings &rest body)
;; (doenum (name-var val-var 'enum &rest result) &rest body)
(with-gensyms (enum-vals)
`(let ((,enum-vals (get-enum-vals ,(third bindings))))
(while (not (null? ,enum-vals))
(let ((,(first bindings) (caar ,enum-vals)) ;; name
(,(second bindings) (cdar ,enum-vals)) ;; value
)
,@body
)
(set! ,enum-vals (cdr ,enum-vals))
)
,@(cdddr bindings)
)
)
)
(desfun enum-max (enum)
"get the highest value in an enum"
(let ((max-val -999999999))
(doenum (name val enum)
(when (> val max-val)
(set! max-val val))
)
max-val
)
)
;; shortcut to quit GOOS
+2 -2
View File
@@ -228,7 +228,7 @@
)
(declare-type process basic)
(declare-type res-lump basic)
(deftype process-tree (basic)
((name basic :offset-assert 4)
(mask process-mask :offset-assert 8)
@@ -243,7 +243,7 @@
(new (symbol type basic) _type_ 0)
(activate (_type_ process-tree basic pointer) process-tree 9)
(deactivate (_type_) none 10)
(dummy-method-11 (_type_ object) none 11)
(copy-defaults! (_type_ res-lump) none 11)
(run-logic? (_type_) symbol 12)
(dummy-method () none 13)
)
+3 -10
View File
@@ -212,7 +212,7 @@
(new (symbol type basic) _type_ 0)
(activate (_type_ process-tree basic pointer) process-tree 9)
(deactivate (_type_) none 10)
(dummy-method-11 (_type_ object) none 11)
(copy-defaults! (_type_ res-lump) none 11)
(run-logic? (_type_) symbol 12)
(dummy-method () none 13)
)
@@ -246,16 +246,9 @@
(connection-list connectable :inline :offset-assert #x60)
(stack uint8 :dynamic :offset-assert #x70)
)
(:methods
(new (symbol type basic int) _type_ 0)
(activate (_type_ process-tree basic pointer) process-tree 9)
(deactivate (process) none 10)
(dummy-method-11 (_type_ object) none 11)
(run-logic? (process) symbol 12)
(dummy-method () none 13)
)
)
:size-assert #x70
:method-count-assert 14
:no-runtime-type ;; already defined by kscheme. Don't do it again.
@@ -593,4 +586,4 @@
(defmacro scratchpad-object (type &key (offset 0))
"Access an object on the scratchpad."
`(the-as ,type (&+ *fake-scratchpad-data* ,offset))
)
)
+1 -78
View File
@@ -279,84 +279,7 @@
;; Each process-tree element has a process-mask which indicates what type of node it is.
(defun-debug stream<-process-mask ((arg0 object) (arg1 process-mask))
(let ((s4-0 arg1))
(if (= (logand #x1000000 (the-as int s4-0)) (process-mask death))
(format arg0 "death ")
)
(if (= (logand #x800000 (the-as int s4-0)) (process-mask attackable))
(format arg0 "attackable ")
)
(if (= (logand #x400000 (the-as int s4-0)) (process-mask projectile))
(format arg0 "projectile ")
)
(if (= (logand #x200000 (the-as int s4-0)) (process-mask entity))
(format arg0 "entity ")
)
(if (= (logand #x100000 (the-as int s4-0)) (process-mask ambient))
(format arg0 "ambient ")
)
(if (= (logand #x80000 (the-as int s4-0)) (process-mask platform))
(format arg0 "platform ")
)
(if (= (logand #x40000 (the-as int s4-0)) (process-mask camera))
(format arg0 "camera ")
)
(if (= (logand #x20000 (the-as int s4-0)) (process-mask enemy))
(format arg0 "enemy ")
)
(if (= (logand #x10000 (the-as int s4-0)) (process-mask collectable))
(format arg0 "collectable ")
)
(if (= (logand s4-0 (process-mask crate)) (process-mask crate))
(format arg0 "crate ")
)
(if (= (logand s4-0 (process-mask sidekick)) (process-mask sidekick))
(format arg0 "sidekick ")
)
(if (= (logand s4-0 (process-mask target)) (process-mask target))
(format arg0 "target ")
)
(if
(= (logand s4-0 (process-mask movie-subject)) (process-mask movie-subject))
(format arg0 "movie-subject ")
)
(if (= (logand s4-0 (process-mask movie)) (process-mask movie))
(format arg0 "movie ")
)
(if (= (logand s4-0 (process-mask going)) (process-mask going))
(format arg0 "going ")
)
(if (= (logand s4-0 (process-mask heap-shrunk)) (process-mask heap-shrunk))
(format arg0 "heap-shrunk ")
)
(if (= (logand s4-0 (process-mask process-tree)) (process-mask process-tree))
(format arg0 "process-tree ")
)
(if (= (logand s4-0 (process-mask sleep-code)) (process-mask sleep-code))
(format arg0 "sleep-code ")
)
(if (= (logand s4-0 (process-mask sleep)) (process-mask sleep))
(format arg0 "sleep ")
)
(if (= (logand s4-0 (process-mask actor-pause)) (process-mask actor-pause))
(format arg0 "actor-pause ")
)
(if (= (logand s4-0 (process-mask progress)) (process-mask progress))
(format arg0 "progress ")
)
(if (= (logand s4-0 (process-mask menu)) (process-mask menu))
(format arg0 "menu ")
)
(if (= (logand s4-0 (process-mask pause)) (process-mask pause))
(format arg0 "pause ")
)
(if (= (logand s4-0 (process-mask draw)) (process-mask draw))
(format arg0 "draw ")
)
(if (= (logand s4-0 (process-mask execute)) (process-mask execute))
(format arg0 "execute ")
)
)
(bit-enum->string process-mask arg1 arg0)
arg1
)
+191
View File
@@ -5,3 +5,194 @@
;; name in dgo: twister
;; dgos: BEA, L1
;; definition of type twist-joint
(deftype twist-joint (structure)
((ry float :offset-assert 0)
(max-dry float :offset-assert 4)
)
:allow-misaligned :method-count-assert 9
:size-assert #x8
:flag-assert #x900000008
)
;; definition of type twister
(deftype twister (basic)
((num-joints int32 :offset-assert 4)
(first-joint int32 :offset-assert 8)
(last-joint int32 :offset-assert 12)
(something uint16 :offset 12)
(max-speed float :offset-assert 16)
(smoothing float :offset-assert 20)
(min-dist float :offset-assert 24)
(target float :offset-assert 28)
(ry float :offset-assert 32)
(max-speed-ry float :offset-assert 36)
(data twist-joint :inline :dynamic :offset-assert 40)
)
:method-count-assert 13
:size-assert #x28
:flag-assert #xd00000028
(:methods
(new (symbol _type_ int int float float float float) _type_ 0)
(TODO-RENAME-9 (_type_ int int float) none 9)
(set-target! (_type_ float) none 10)
(TODO-RENAME-11 (_type_) none 11)
(TODO-RENAME-12 (_type_ process-drawable) none 12)
)
)
;; definition for method 0 of type twister
(defmethod
new
twister
((allocation symbol)
(type-to-make twister)
(arg0 int)
(arg1 int)
(arg2 float)
(arg3 float)
(arg4 float)
(arg5 float)
)
(let* ((gp-0 (+ (- 1 arg0) arg1))
(v0-0
(object-new
allocation
(the-as type type-to-make)
(the-as int (+ (-> type-to-make something) (* gp-0 16)))
)
)
)
(set! (-> v0-0 first-joint) arg0)
(set! (-> v0-0 last-joint) arg1)
(set! (-> v0-0 num-joints) gp-0)
(set! (-> v0-0 max-speed) arg2)
(set! (-> v0-0 smoothing) arg4)
(set! (-> v0-0 min-dist) arg5)
(set! (-> v0-0 target) 0.0)
(set! (-> v0-0 ry) 0.0)
(set! (-> v0-0 max-speed-ry) arg3)
(dotimes (v1-4 gp-0)
(set! (-> v0-0 data v1-4 ry) 0.0)
(set! (-> v0-0 data v1-4 max-dry) 0.0)
)
v0-0
)
)
;; definition for method 5 of type twister
(defmethod asize-of twister ((obj twister))
(+ (* (-> obj num-joints) 16) 40)
)
;; definition for method 9 of type twister
;; INFO: Return type mismatch int vs none.
(defmethod
TODO-RENAME-9
twister
((obj twister) (arg0 int) (arg1 int) (arg2 float))
(let ((v1-1 (- arg0 (-> obj first-joint)))
(a1-2 (- arg1 (-> obj first-joint)))
)
(while (>= a1-2 v1-1)
(set! (-> obj data v1-1 max-dry) arg2)
(+! v1-1 1)
)
)
0
(none)
)
;; definition for method 10 of type twister
;; INFO: Return type mismatch int vs none.
(defmethod set-target! twister ((obj twister) (arg0 float))
(set! (-> obj target) arg0)
0
(none)
)
;; definition for method 11 of type twister
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-11 twister ((obj twister))
(let* ((s5-0 (+ (-> obj num-joints) -1))
(s4-0 (-> obj data s5-0))
)
(let ((f0-2 (deg-diff (-> s4-0 ry) (-> obj target))))
(+!
(-> s4-0 ry)
(seek-with-smooth
0.0
f0-2
(-> obj max-speed)
(-> obj smoothing)
(-> obj min-dist)
)
)
)
(let ((f30-1 (-> s4-0 ry)))
(while (> s5-0 0)
(+! s5-0 -1)
(let ((s4-1 (-> obj data s5-0)))
(let ((f0-9 (deg-diff f30-1 (-> s4-1 ry))))
(cond
((= (-> s4-1 max-dry) 0.0)
(set! f0-9 0.0)
)
((< (fabs f0-9) (-> s4-1 max-dry))
)
((< f0-9 0.0)
(set!
f0-9
(seek-with-smooth
f0-9
(- (-> s4-1 max-dry))
(-> obj max-speed)
(-> obj smoothing)
(-> obj min-dist)
)
)
)
(else
(set!
f0-9
(seek-with-smooth
f0-9
(-> s4-1 max-dry)
(-> obj max-speed)
(-> obj smoothing)
(-> obj min-dist)
)
)
)
)
(+! f30-1 f0-9)
)
(set! (-> s4-1 ry) f30-1)
)
)
)
)
0
(none)
)
;; definition for method 12 of type twister
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-12 twister ((obj twister) (arg0 process-drawable))
(let ((s4-0 (new 'stack-no-clear 'matrix)))
(dotimes (s3-0 (-> obj num-joints))
(let
((s2-0
(-> arg0 node-list data (+ (-> obj first-joint) s3-0) bone transform)
)
)
(matrix-rotate-y! s4-0 (-> obj data s3-0 ry))
(vector-! (-> s2-0 vector 3) (-> s2-0 vector 3) (-> arg0 root trans))
(matrix*! s2-0 s2-0 s4-0)
(vector+! (-> s2-0 vector 3) (-> s2-0 vector 3) (-> arg0 root trans))
)
)
)
0
(none)
)
+82
View File
@@ -5,3 +5,85 @@
;; name in dgo: wobbler
;; dgos: BEA, L1
;; definition of type wobbler
(deftype wobbler (basic)
((posx float :offset-assert 4)
(posy float :offset-assert 8)
(velx float :offset-assert 12)
(vely float :offset-assert 16)
(spring float :offset-assert 20)
(damping float :offset-assert 24)
(height float :offset-assert 28)
)
:method-count-assert 13
:size-assert #x20
:flag-assert #xd00000020
(:methods
(reset! (_type_ float float float) none 9)
(inc-xy-vel! (_type_ float float) none 10)
(move! (_type_) none 11)
(TODO-RENAME-12 (_type_ quaternion) none 12)
)
)
;; definition for method 9 of type wobbler
;; INFO: Return type mismatch int vs none.
(defmethod reset! wobbler ((obj wobbler) (arg0 float) (arg1 float) (arg2 float))
(set! (-> obj posx) 0.0)
(set! (-> obj posy) 0.0)
(set! (-> obj velx) 0.0)
(set! (-> obj vely) 0.0)
(set! (-> obj spring) arg0)
(set! (-> obj damping) arg1)
(set! (-> obj height) arg2)
0
(none)
)
;; definition for method 10 of type wobbler
;; INFO: Return type mismatch int vs none.
(defmethod inc-xy-vel! wobbler ((obj wobbler) (arg0 float) (arg1 float))
(+! (-> obj velx) arg0)
(+! (-> obj vely) arg1)
0
(none)
)
;; definition for method 11 of type wobbler
;; INFO: Return type mismatch int vs none.
(defmethod move! wobbler ((obj wobbler))
(+! (-> obj posx) (* (-> obj velx) (-> *display* seconds-per-frame)))
(+! (-> obj posy) (* (-> obj vely) (-> *display* seconds-per-frame)))
(set! (-> obj velx) (* (-> obj velx) (-> obj damping)))
(set! (-> obj vely) (* (-> obj vely) (-> obj damping)))
(+! (-> obj velx) (* (* -1.0 (-> obj posx)) (-> obj spring)))
(+! (-> obj vely) (* (* -1.0 (-> obj posy)) (-> obj spring)))
0
(none)
)
;; definition for method 12 of type wobbler
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-12 wobbler ((obj wobbler) (arg0 quaternion))
(let ((s5-0 (new 'stack-no-clear 'vector)))
(set! (-> s5-0 x) (-> obj posy))
(set! (-> s5-0 y) 0.0)
(set! (-> s5-0 z) (- (-> obj posx)))
(vector-normalize! s5-0 1.0)
(let*
((f0-8
(/
(sqrtf
(+ (* (-> obj posx) (-> obj posx)) (* (-> obj posy) (-> obj posy)))
)
(-> obj height)
)
)
(f0-9 (atan f0-8 1.0))
)
(quaternion-vector-angle! arg0 s5-0 f0-9)
)
)
0
(none)
)
+30
View File
@@ -5,3 +5,33 @@
;; name in dgo: baseplat
;; dgos: GAME, COMMON, L1
;; TODO - for misty-warehouse
(deftype eco-door (process-drawable)
((root-override collide-shape :score 100 :offset 112)
(speed float :offset-assert 176)
(open-distance float :offset-assert 180)
(close-distance float :offset-assert 184)
(out-dir vector :inline :offset-assert 192)
(open-sound uint128 :offset-assert 208)
(close-sound uint128 :offset-assert 224)
(state-actor basic :offset-assert 240)
(flags int32 :offset-assert 244)
(locked symbol :offset-assert 248)
(auto-close symbol :offset-assert 252)
(one-way symbol :offset-assert 256)
)
:method-count-assert 27
:size-assert #x104
:heap-base #xa0
:flag-assert #x1b00a00104
;; inherited inspect of process-drawable
(:methods
(dummy-20 () none 20)
(dummy-21 () none 21)
(dummy-22 () none 22)
(dummy-23 () none 23)
(TODO-RENAME-24 (_type_) none 24)
(TODO-RENAME-25 (_type_) none 25)
(dummy-26 () none 26)
)
)
+14 -14
View File
@@ -31,20 +31,20 @@
:size-assert #x1a8
:flag-assert #x17000001a8
(:methods
(dummy-9 () none 9)
(dummy-10 () none 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-16 () none 16)
(dummy-17 () none 17)
(dummy-18 () none 18)
(dummy-19 () none 19)
(dummy-20 () none 20)
(dummy-21 () none 21)
(dummy-22 () none 22)
(TODO-RENAME-9 (_type_ float float float float) none 9)
(dummy-10 (_type_ float) none 10)
(clear-force-torque! (_type_) none 11)
(clear-momentum! (_type_) none 12)
(TODO-RENAME-13 (_type_ vector vector) none 13)
(TODO-RENAME-14 (_type_ vector vector) none 14)
(TODO-RENAME-15 (_type_ vector) none 15)
(TODO-RENAME-16 (_type_ vector vector float) none 16)
(TODO-RENAME-17 (_type_ vector vector) vector 17)
(TODO-RENAME-18 (_type_ vector) vector 18)
(dummy-19 (_type_) none 19)
(dummy-20 (_type_) none 20)
(TODO-RENAME-21 (_type_) none 21)
(TODO-RENAME-22 (_type_ vector quaternion float float) none 22)
)
)
File diff suppressed because it is too large Load Diff
+83
View File
@@ -5,3 +5,86 @@
;; name in dgo: ticky
;; dgos: GAME, COMMON, L1
;; definition of type ticky
(deftype ticky (structure)
((delay-til-ramp uint64 :offset-assert 0)
(delay-til-timeout uint64 :offset-assert 8)
(starting-time uint64 :offset-assert 16)
(last-tick-time uint64 :offset-assert 24)
)
:method-count-assert 12
:size-assert #x20
:flag-assert #xc00000020
(:methods
(sleep (_type_ uint) none 9)
(reached-delay? (_type_ uint) symbol 10)
(completed? (_type_) symbol 11)
)
)
;; definition for method 9 of type ticky
;; INFO: Return type mismatch int vs none.
(defmethod sleep ticky ((obj ticky) (arg0 uint))
(set! (-> obj starting-time) (-> *display* base-frame-counter))
(set! (-> obj delay-til-timeout) arg0)
(set! (-> obj delay-til-ramp) (max 0 (the-as int (+ arg0 -1200))))
(set! (-> obj last-tick-time) (the-as uint 0))
0
(none)
)
;; definition for method 11 of type ticky
(defmethod completed? ticky ((obj ticky))
(let ((gp-0 #f))
(let ((v1-2 (- (-> *display* base-frame-counter) (-> obj starting-time))))
(cond
((>= (the-as int v1-2) (the-as int (-> obj delay-til-timeout)))
(set! gp-0 #t)
)
(else
(let*
((f0-1
(fmin
1.0
(/
(the float (max 0 (the-as int (- v1-2 (-> obj delay-til-ramp)))))
(the float (- (-> obj delay-til-timeout) (-> obj delay-til-ramp)))
)
)
)
(v1-7 (the int (lerp 105.0 41.0 f0-1)))
)
(when
(>=
(the-as
int
(- (-> *display* base-frame-counter) (-> obj last-tick-time))
)
v1-7
)
(set! (-> obj last-tick-time) (-> *display* base-frame-counter))
(sound-play-by-name
(static-sound-name "stopwatch")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
)
)
)
)
)
gp-0
)
)
;; definition for method 10 of type ticky
(defmethod reached-delay? ticky ((obj ticky) (arg0 uint))
(>=
(the-as int (- (-> *display* base-frame-counter) (-> obj starting-time)))
(the-as int arg0)
)
)
+99
View File
@@ -5,3 +5,102 @@
;; name in dgo: tippy
;; dgos: GAME, COMMON, L1
;; definition of type tippy
(deftype tippy (structure)
((axis vector :inline :offset-assert 0)
(angle float :offset-assert 16)
(orig quaternion :inline :offset-assert 32)
(dist-ratio float :offset-assert 48)
(damping float :offset-assert 52)
(1-damping float :offset-assert 56)
)
:method-count-assert 11
:size-assert #x3c
:flag-assert #xb0000003c
(:methods
(reset! (_type_ process-drawable float float) none 9)
(TODO-RENAME-10 (_type_ process-drawable vector) symbol 10)
)
)
;; definition for method 3 of type tippy
(defmethod inspect tippy ((obj tippy))
(format #t "[~8x] ~A~%" obj 'tippy)
(format #t "~Taxis: #<vector @ #x~X>~%" (-> obj axis))
(format #t "~Tangle: ~f~%" (-> obj angle))
(format #t "~Torig: #<quaternion @ #x~X>~%" (-> obj orig))
(format #t "~Tdist-ratio: ~f~%" (-> obj dist-ratio))
(format #t "~Tdamping: ~f~%" (-> obj damping))
(format #t "~T1-damping: ~f~%" (-> obj 1-damping))
obj
)
;; definition for method 9 of type tippy
;; INFO: Return type mismatch int vs none.
(defmethod
reset!
tippy
((obj tippy) (arg0 process-drawable) (arg1 float) (arg2 float))
(set-vector! (-> obj axis) 0.0 0.0 0.0 1.0)
(set! (-> obj angle) 0.0)
(quaternion-copy! (-> obj orig) (-> arg0 root quat))
(set! (-> obj dist-ratio) arg1)
(set! (-> obj damping) arg2)
(set! (-> obj 1-damping) (- 1.0 arg2))
0
(none)
)
;; definition for method 10 of type tippy
(defmethod
TODO-RENAME-10
tippy
((obj tippy) (arg0 process-drawable) (arg1 vector))
(let ((s4-0 #t))
(cond
(arg1
(let ((s3-0 (new 'stack-no-clear 'vector)))
0.0
(set! (-> s3-0 x) (- (-> arg1 z) (-> arg0 root trans z)))
(set! (-> s3-0 y) 0.0)
(set! (-> s3-0 z) (- (-> arg0 root trans x) (-> arg1 x)))
(let ((f0-6 (vector-length s3-0)))
(vector-float*! s3-0 s3-0 (/ 1.0 f0-6))
(let ((f30-0 (* f0-6 (-> obj dist-ratio))))
(set!
(-> obj axis x)
(+
(* (-> obj 1-damping) (-> obj axis x))
(* (-> obj damping) (-> s3-0 x))
)
)
(set! (-> obj axis y) 0.0)
(set!
(-> obj axis z)
(+
(* (-> obj 1-damping) (-> obj axis z))
(* (-> obj damping) (-> s3-0 z))
)
)
(vector-normalize! (-> obj axis) 1.0)
(set!
(-> obj angle)
(+ (* (-> obj 1-damping) (-> obj angle)) (* (-> obj damping) f30-0))
)
)
)
)
)
(else
(set! (-> obj angle) (* (-> obj 1-damping) (-> obj angle)))
(when (< (-> obj angle) 182.04445)
(set! (-> obj angle) 0.0)
(set! s4-0 #f)
)
)
)
(quaternion-vector-angle! (-> arg0 root quat) (-> obj axis) (-> obj angle))
(quaternion*! (-> arg0 root quat) (-> arg0 root quat) (-> obj orig))
s4-0
)
)
File diff suppressed because it is too large Load Diff
+472
View File
@@ -5,3 +5,475 @@
;; name in dgo: misty-teetertotter
;; dgos: L1, MIS
;; definition of type teetertotter
(deftype teetertotter (process-drawable)
((launched-player basic :offset-assert 176)
(in-launch-window basic :offset-assert 180)
(rock-is-dangerous basic :offset-assert 184)
)
:heap-base #x50
:method-count-assert 20
:size-assert #xbc
:flag-assert #x14005000bc
)
(define-extern *teetertotter-sg* skeleton-group)
(define-extern teetertotter-idle (state none)) ;; unknown type
(define-extern teetertotter-launch (state none)) ;; unknown type
(define-extern teetertotter-bend (state none)) ;; unknown type
;; failed to figure out what this is:
(let
((v1-1
(new 'static 'skeleton-group
:art-group-name "teetertotter"
:bounds (new 'static 'vector :w 32768.0)
:max-lod 2
:version #x6
)
)
)
(set! (-> v1-1 jgeo) 0)
(set! (-> v1-1 janim) 4)
(set! (-> v1-1 mgeo 0) (the-as uint 1))
(set! (-> v1-1 lod-dist 0) 81920.0)
(set! (-> v1-1 mgeo 1) (the-as uint 2))
(set! (-> v1-1 lod-dist 1) 163840.0)
(set! (-> v1-1 mgeo 2) (the-as uint 3))
(set! (-> v1-1 lod-dist 2) 4095996000.0)
(set! *teetertotter-sg* v1-1)
)
;; definition for function target-on-end-of-teetertotter?
;; Used lq/sq
(defun target-on-end-of-teetertotter? ((arg0 teetertotter))
(let
((gp-1
(vector-!
(new-stack-vector0)
(-> *target* control trans)
(-> arg0 root trans)
)
)
)
(if
(<
(vector-dot
(vector-x-quaternion! (new-stack-vector0) (-> arg0 root quat))
gp-1
)
-8192.0
)
#t
)
)
)
;; failed to figure out what this is:
(let
((v1-3
(new 'static 'state
:name 'teetertotter-idle
:next #f
:exit #f
:code #f
:trans #f
:post #f
:enter #f
:event #f
)
)
)
(set! teetertotter-idle (the-as (state none) v1-3))
(set!
(-> v1-3 event)
(lambda :behavior teetertotter
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'attack)
(case (-> arg3 param 1)
(('flop)
(when (target-on-end-of-teetertotter? self)
(set! (-> self in-launch-window) #f)
(increment-success-for-hint
(the-as level-hint-control 676)
)
(go teetertotter-launch)
)
)
)
)
((= v1-0 'bonk)
(when (target-on-end-of-teetertotter? self)
(level-hint-spawn
(game-text-id misty-teetertotter-bonk-dax-tutorial)
"sksp0070"
#f
*entity-pool*
0
)
(go teetertotter-bend)
)
)
)
)
)
)
)
(set!
(-> v1-3 code)
(lambda :behavior teetertotter () (let ((gp-0 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
gp-0
(the-as
art-joint-anim
(-> self draw art-group data 4)
)
num-func-identity
)
(set! (-> gp-0 frame-num) 0.0)
)
(while #t
(suspend)
)
(none)
)
)
(set! (-> v1-3 post) transform-post)
)
;; failed to figure out what this is:
(let
((v1-4
(new 'static 'state
:name 'teetertotter-launch
:next #f
:exit #f
:code #f
:trans #f
:post #f
:enter #f
:event #f
)
)
)
(set! teetertotter-launch (the-as (state none) v1-4))
(set!
(-> v1-4 event)
(lambda :behavior teetertotter
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(when (= arg2 'touch)
(-> arg3 param 0)
(let ((t9-0 (method-of-type touching-shapes-entry dummy-12)))
(-> self root)
1
(when (and (t9-0) (-> self rock-is-dangerous))
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-2 from) self)
(set! (-> a1-2 num-params) 2)
(set! (-> a1-2 message) 'attack)
(set! (-> a1-2 param 0) (-> arg3 param 0))
(let ((a0-2 (new 'static 'attack-info :mask #x20)))
(set! (-> a0-2 mode) 'deadly)
(set! (-> a1-2 param 1) (the-as uint a0-2))
)
(send-event-function arg0 a1-2)
)
)
)
(-> arg3 param 0)
(let ((t9-2 (method-of-type touching-shapes-entry dummy-12)))
(-> self root)
2
(when
(and
(t9-2)
(target-on-end-of-teetertotter? self)
(not (-> self launched-player))
(-> self in-launch-window)
)
(let ((a1-4 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-4 from) self)
(set! (-> a1-4 num-params) 2)
(set! (-> a1-4 message) 'shove)
(set! (-> a1-4 param 0) (the-as uint #f))
(let ((v1-16 (new 'static 'attack-info :mask #xcc0)))
(set! (-> v1-16 shove-back) 0.0)
(set! (-> v1-16 shove-up) 53248.0)
(set! (-> v1-16 angle) 'jump)
(set! (-> v1-16 control) 1.0)
(set! (-> a1-4 param 1) (the-as uint v1-16))
)
(when (send-event-function arg0 a1-4)
(let ((v0-0 #t))
(set! (-> self launched-player) v0-0)
v0-0
)
)
)
)
)
)
)
)
(set!
(-> v1-4 code)
(lambda :behavior teetertotter
()
(local-vars (v1-16 symbol) (f0-4 float))
(set! (-> self launched-player) #f)
(let ((a0-0 (-> self skel root-channel 0)))
(set!
(-> a0-0 frame-group)
(the-as art-joint-anim (-> self draw art-group data 4))
)
(set!
(-> a0-0 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 4))
data
0
length
)
-1
)
)
)
(set! (-> a0-0 param 1) 1.0)
(set! (-> a0-0 frame-num) 0.0)
(joint-control-channel-group!
a0-0
(the-as art-joint-anim (-> self draw art-group data 4))
num-func-seek!
)
)
(until (begin
(set! (-> self rock-is-dangerous) (and v1-16 (>= 76.0 f0-4)))
(suspend)
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 param 0)
(the float (+ (-> a0-2 frame-group data 0 length) -1))
)
(set! (-> a0-2 param 1) 1.0)
(joint-control-channel-group-eval!
a0-2
(the-as art-joint-anim #f)
num-func-seek!
)
)
(ja-done? 0)
)
(set! f0-4 (ja-aframe-num 0))
(set! (-> self in-launch-window) (and (>= f0-4 76.0) (>= 82.0 f0-4)))
(set! v1-16 (>= f0-4 12.0))
)
(go teetertotter-idle)
(none)
)
)
(set! (-> v1-4 post) rider-post)
)
;; failed to figure out what this is:
(let
((v1-5
(new 'static 'state
:name 'teetertotter-bend
:next #f
:exit #f
:code #f
:trans #f
:post #f
:enter #f
:event #f
)
)
)
(set! teetertotter-bend (the-as (state none) v1-5))
(set!
(-> v1-5 code)
(lambda :behavior teetertotter () (let ((a0-0 (-> self skel root-channel 0)))
(set!
(-> a0-0 frame-group)
(the-as
art-joint-anim
(-> self draw art-group data 5)
)
)
(set!
(-> a0-0 param 0)
(the
float
(+
(->
(the-as
art-joint-anim
(-> self draw art-group data 5)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-0 param 1) 1.0)
(set! (-> a0-0 frame-num) 0.0)
(joint-control-channel-group!
a0-0
(the-as
art-joint-anim
(-> self draw art-group data 5)
)
num-func-seek!
)
)
(until (begin
(suspend)
(let ((a0-1 (-> self skel root-channel 0)))
(set!
(-> a0-1 param 0)
(the float (+ (-> a0-1 frame-group data 0 length) -1))
)
(set! (-> a0-1 param 1) 1.0)
(joint-control-channel-group-eval!
a0-1
(the-as art-joint-anim #f)
num-func-seek!
)
)
(ja-done? 0)
)
(empty)
)
(go teetertotter-idle)
(none)
)
)
(set! (-> v1-5 post) rider-post)
)
;; definition for method 11 of type teetertotter
(defmethod copy-defaults! teetertotter ((obj teetertotter) (arg0 res-lump))
(let
((s4-0
(new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))
)
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(let ((t9-2 (method-of-object s4-0 dummy-29)))
1
(t9-2)
)
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 5) 0)))
(set! (-> s3-0 prim-core collide-as) (the-as uint 2048))
(set! (-> s3-0 collide-with) (the-as uint 16))
(set! (-> s3-0 prim-core action) (the-as uint 1))
(set-vector! (-> s3-0 local-sphere) 0.0 12288.0 0.0 36864.0)
((method-of-object s4-0 dummy-46))
(let ((s2-0 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1))))
(set! (-> s2-0 prim-core collide-as) (the-as uint 2048))
(set! (-> s2-0 collide-with) (the-as uint 16))
(set! (-> s2-0 prim-core action) (the-as uint 1))
(set! (-> s2-0 prim-core offense) 4)
(set! (-> s2-0 transform-index) 5)
(set-vector! (-> s2-0 local-sphere) -4096.0 2048.0 0.0 5120.0)
)
((method-of-object s3-0 dummy-28))
(let
((s2-1
(new
'process
'collide-shape-prim-mesh
s4-0
(the-as uint 0)
(the-as uint 2)
)
)
)
(set! (-> s2-1 prim-core collide-as) (the-as uint 2048))
(set! (-> s2-1 collide-with) (the-as uint 16))
(set! (-> s2-1 prim-core action) (the-as uint 3))
(set! (-> s2-1 prim-core offense) 4)
(set! (-> s2-1 transform-index) 7)
(set-vector! (-> s2-1 local-sphere) 0.0 0.0 0.0 32768.0)
)
((method-of-object s3-0 dummy-28))
(let
((s2-2
(new
'process
'collide-shape-prim-mesh
s4-0
(the-as uint 1)
(the-as uint 0)
)
)
)
(set! (-> s2-2 prim-core collide-as) (the-as uint 2048))
(set! (-> s2-2 collide-with) (the-as uint 16))
(set! (-> s2-2 prim-core action) (the-as uint 1))
(set! (-> s2-2 prim-core offense) 4)
(set! (-> s2-2 transform-index) 4)
(set-vector! (-> s2-2 local-sphere) 0.0 0.0 0.0 32768.0)
)
((method-of-object s3-0 dummy-28))
(let
((s2-3
(new
'process
'collide-shape-prim-mesh
s4-0
(the-as uint 2)
(the-as uint 0)
)
)
)
(set! (-> s2-3 prim-core collide-as) (the-as uint 2048))
(set! (-> s2-3 collide-with) (the-as uint 16))
(set! (-> s2-3 prim-core action) (the-as uint 1))
(set! (-> s2-3 prim-core offense) 4)
(set! (-> s2-3 transform-index) 3)
(set-vector! (-> s2-3 local-sphere) 0.0 0.0 0.0 32768.0)
)
((method-of-object s3-0 dummy-28))
(let
((s2-4
(new
'process
'collide-shape-prim-mesh
s4-0
(the-as uint 3)
(the-as uint 2)
)
)
)
(set! (-> s2-4 prim-core collide-as) (the-as uint 2048))
(set! (-> s2-4 collide-with) (the-as uint 16))
(set! (-> s2-4 prim-core action) (the-as uint 3))
(set! (-> s2-4 prim-core offense) 4)
(set! (-> s2-4 transform-index) 3)
(set-vector! (-> s2-4 local-sphere) 0.0 0.0 0.0 32768.0)
)
((method-of-object s3-0 dummy-28))
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
((method-of-object s4-0 dummy-50))
(set! (-> obj root) s4-0)
)
(process-drawable-from-entity! obj arg0)
(dummy-14 obj *teetertotter-sg* '())
(set! (-> obj launched-player) #f)
(set! (-> obj in-launch-window) #f)
(set! (-> obj rock-is-dangerous) #f)
(go teetertotter-idle)
(none)
)
+461
View File
@@ -5,3 +5,464 @@
;; name in dgo: misty-warehouse
;; dgos: L1, MIS
(define-extern *rounddoor-sg* skeleton-group)
(define-extern *silostep-sg* skeleton-group)
(define-extern silostep-rise (state none)) ;; unknown type
(define-extern silostep-idle (state none)) ;; unknown type
(define-extern silostep-camera (state none)) ;; unknown type
;; definition of type silostep
(deftype silostep (process-drawable)
((anim-limit float :offset-assert 176)
(cam-tracker uint64 :offset-assert 184)
)
:heap-base #x50
:method-count-assert 20
:size-assert #xc0
:flag-assert #x14005000c0
)
;; failed to figure out what this is:
(let
((v1-1
(new 'static 'skeleton-group
:art-group-name "silostep"
:bounds
(new 'static 'vector :y 8192.0 :w 32768.0)
:version #x6
)
)
)
(set! (-> v1-1 jgeo) 0)
(set! (-> v1-1 janim) 2)
(set! (-> v1-1 mgeo 0) (the-as uint 1))
(set! (-> v1-1 lod-dist 0) 4095996000.0)
(set! *silostep-sg* v1-1)
)
;; failed to figure out what this is:
(let
((v1-2
(new 'static 'state
:name 'silostep-idle
:next #f
:exit #f
:code #f
:trans #f
:post #f
:enter #f
:event #f
)
)
)
(set! silostep-idle (the-as (state none) v1-2))
(set!
(-> v1-2 event)
(the-as
(function process int symbol event-message-block object)
(lambda :behavior silostep
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('trigger)
(go silostep-camera)
)
(('trigger-rise)
enter-state
(go silostep-rise)
)
)
(none)
)
)
)
(set!
(-> v1-2 code)
(lambda :behavior silostep () (let ((gp-0 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
gp-0
(the-as
art-joint-anim
(-> self draw art-group data 2)
)
num-func-identity
)
(set! (-> gp-0 frame-num) 0.0)
)
(transform-post)
(while #t
(suspend)
)
(none)
)
)
(set! (-> v1-2 post) ja-post)
)
;; definition for function misty-camera-view
(defbehavior misty-camera-view silostep ()
(let* ((gp-0 (get-process *default-dead-pool* camera-tracker #x4000))
(v1-1 (when gp-0
(let ((t9-1 (method-of-type camera-tracker activate)))
(t9-1
(the-as camera-tracker gp-0)
self
'camera-tracker
(the-as pointer #x70004000)
)
)
((the-as
(function object object object object)
run-function-in-process
)
gp-0
camera-tracker-init
(lambda :behavior camera-tracker
()
(while (not (process-grab? *target*))
(suspend)
)
(camera-change-to "camera-160" 150 #f)
(let ((gp-0 (-> *display* base-frame-counter)))
(until (begin
(suspend)
(>=
(the-as
int
(- (-> *display* base-frame-counter) gp-0)
)
900
)
)
(empty)
)
)
(while
(not
(process-release? (handle->process (-> self grab-target)))
)
(suspend)
)
(camera-change-to (the-as string 'base) 150 #f)
(none)
)
)
(-> gp-0 ppointer)
)
)
(v0-3
(logior (shl (-> v1-1 0 pid) 32) (new 'static 'handle :process v1-1))
)
)
(set! (-> self cam-tracker) (the-as uint v0-3))
v0-3
)
)
;; failed to figure out what this is:
(let
((v1-4
(new 'static 'state
:name 'silostep-camera
:next #f
:exit #f
:code #f
:trans #f
:post #f
:enter #f
:event #f
)
)
)
(set! silostep-camera (the-as (state none) v1-4))
(set!
(-> v1-4 code)
(lambda :behavior silostep
()
(misty-camera-view)
(let* ((gp-0 (get-task-control (game-task misty-warehouse)))
(v1-1 (get-reminder gp-0 0))
)
(save-reminder gp-0 (logior v1-1 2) 0)
)
(set! (-> self state-time) (-> *display* base-frame-counter))
(let ((gp-1 (-> *display* base-frame-counter)))
(until (begin
(suspend)
(>= (the-as int (- (-> *display* base-frame-counter) gp-1)) 300)
)
(empty)
)
)
(sound-play-by-name
(static-sound-name "arena-steps")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(send-to-all-after (-> self link) 'trigger-rise)
enter-state
(go silostep-rise)
(none)
)
)
(set! (-> v1-4 post) ja-post)
)
;; failed to figure out what this is:
(let
((v1-5
(new 'static 'state
:name 'silostep-rise
:next #f
:exit #f
:code #f
:trans #f
:post #f
:enter #f
:event #f
)
)
)
(set! silostep-rise (the-as (state none) v1-5))
(set!
(-> v1-5 code)
(lambda :behavior silostep
((arg0 symbol))
(process-entity-status! self (entity-perm-status complete) #t)
(when (not arg0)
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 frame-group)
(the-as art-joint-anim (-> self draw art-group data 2))
)
(set! (-> a0-2 param 0) (-> self anim-limit))
(set! (-> a0-2 param 1) 1.0)
(set! (-> a0-2 frame-num) 0.0)
(joint-control-channel-group!
a0-2
(the-as art-joint-anim (-> self draw art-group data 2))
num-func-seek!
)
)
(until (begin
(rider-trans)
(rider-post)
(suspend)
(let ((a0-3 (-> self skel root-channel 0)))
(set! (-> a0-3 param 0) (-> self anim-limit))
(set! (-> a0-3 param 1) 1.0)
(joint-control-channel-group-eval!
a0-3
(the-as art-joint-anim #f)
num-func-seek!
)
)
(ja-done? 0)
)
(empty)
)
)
(let ((gp-1 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
gp-1
(the-as art-joint-anim (-> self draw art-group data 2))
num-func-identity
)
(set! (-> gp-1 frame-num) (-> self anim-limit))
)
(rider-post)
(while #t
(ja-post)
(suspend)
)
(none)
)
)
(set! (-> v1-5 post) #f)
)
;; definition for method 11 of type silostep
(defmethod copy-defaults! silostep ((obj silostep) (arg0 res-lump))
(logior! (-> obj mask) (process-mask movie-subject))
(let
((s4-0
(new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))
)
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(let ((t9-2 (method-of-object s4-0 dummy-29)))
1
(t9-2)
)
(let
((s3-0
(new
'process
'collide-shape-prim-mesh
s4-0
(the-as uint 0)
(the-as uint 0)
)
)
)
(set! (-> s3-0 prim-core collide-as) (the-as uint 2048))
(set! (-> s3-0 collide-with) (the-as uint 16))
(set! (-> s3-0 prim-core action) (the-as uint 1))
(set! (-> s3-0 prim-core offense) 4)
(set! (-> s3-0 transform-index) 4)
(set-vector! (-> s3-0 local-sphere) 0.0 4096.0 0.0 18432.0)
)
((method-of-object s4-0 dummy-46))
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
((method-of-object s4-0 dummy-50))
(set! (-> obj root) s4-0)
)
(process-drawable-from-entity! obj arg0)
(dummy-14 obj *silostep-sg* '())
(set!
(-> obj anim-limit)
(*
(get-property-value-float
arg0
'distance
'interp
-1000000000.0
1.0
(the-as (pointer res-tag) #f)
*res-static-buf*
)
(the
float
(+
(-> (the-as art-joint-anim (-> obj draw art-group data 2)) data 0 length)
-1
)
)
)
)
(set! (-> obj link) (new 'process 'actor-link-info obj))
(cond
((and
(-> obj entity)
(nonzero?
(logand (-> obj entity extra perm status) (entity-perm-status complete))
)
)
enter-state
#t
(go silostep-rise)
)
(else
(go silostep-idle)
)
)
(none)
)
;; failed to figure out what this is:
(let
((v1-6
(new 'static 'skeleton-group
:art-group-name "rounddoor"
:bounds (new 'static 'vector :w 32768.0)
:max-lod 1
:version #x6
)
)
)
(set! (-> v1-6 jgeo) 0)
(set! (-> v1-6 janim) 3)
(set! (-> v1-6 mgeo 0) (the-as uint 1))
(set! (-> v1-6 lod-dist 0) 81920.0)
(set! (-> v1-6 mgeo 1) (the-as uint 2))
(set! (-> v1-6 lod-dist 1) 4095996000.0)
(set! *rounddoor-sg* v1-6)
)
;; definition of type rounddoor
(deftype rounddoor (eco-door)
()
:heap-base #xa0
:method-count-assert 27
:size-assert #x104
:flag-assert #x1b00a00104
)
;; definition for method 3 of type rounddoor
(defmethod inspect rounddoor ((obj rounddoor))
(let ((t9-0 (method-of-type eco-door inspect)))
(t9-0 obj)
)
obj
)
;; definition for method 24 of type rounddoor
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-24 rounddoor ((obj rounddoor))
(let
((s5-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-others))))
(let
((s4-0
(new
'process
'collide-shape-prim-mesh
s5-0
(the-as uint 0)
(the-as uint 0)
)
)
)
(set! (-> s4-0 prim-core collide-as) (the-as uint 2048))
(set! (-> s4-0 collide-with) (the-as uint 16))
(set! (-> s4-0 prim-core action) (the-as uint 1))
(set! (-> s4-0 prim-core offense) 4)
(set! (-> s4-0 transform-index) 0)
(set-vector! (-> s4-0 local-sphere) -12288.0 0.0 0.0 40960.0)
)
((method-of-object s5-0 dummy-46))
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
((method-of-object s5-0 dummy-50))
(set! (-> obj root-override) s5-0)
)
0
(none)
)
;; definition for method 25 of type rounddoor
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defmethod TODO-RENAME-25 rounddoor ((obj rounddoor))
(dummy-14 obj *rounddoor-sg* '())
(set! (-> obj open-distance) 69632.0)
(set! (-> obj close-distance) 81920.0)
(set!
(-> obj open-sound)
(the-as
uint128
(make-u128 (the-as uint #x6e65706f2d72) (the-as uint #x6f6f64616e657261))
)
)
(set!
(-> obj close-sound)
(the-as
uint128
(make-u128 (the-as uint #x65736f6c632d72) (the-as uint #x6f6f64616e657261))
)
)
(set! (-> obj speed) 1.5)
(set! (-> obj auto-close) #t)
(set! (-> obj one-way) #t)
(vector-x-quaternion! (-> obj out-dir) (-> obj root-override quat))
(set!
(-> obj out-dir w)
(- 8192.0 (vector-dot (-> obj out-dir) (-> obj root-override trans)))
)
(dummy-47 (-> obj root-override))
0
(none)
)
+97
View File
@@ -5,3 +5,100 @@
;; name in dgo: mud
;; dgos: L1, MIS
;; definition of type mud
(deftype mud (water-anim)
()
:heap-base #x70
:method-count-assert 30
:size-assert #xdc
:flag-assert #x1e007000dc
)
;; definition for symbol ripple-for-mud, type ripple-wave-set
(define
ripple-for-mud
(new 'static 'ripple-wave-set
:count 3
:converted #f
:normal-scale 1.0
:wave
(new 'static 'inline-array ripple-wave 4
(new 'static 'ripple-wave :scale 40.0 :xdiv 1 :speed 1.5)
(new 'static 'ripple-wave :scale 40.0 :xdiv -1 :zdiv 1 :speed 1.5)
(new 'static 'ripple-wave :scale 20.0 :xdiv 5 :zdiv 3 :speed 0.75)
(new 'static 'ripple-wave)
)
)
)
;; definition for symbol ripple-for-small-mud, type ripple-wave-set
(define
ripple-for-small-mud
(new 'static 'ripple-wave-set
:count 3
:converted #f
:normal-scale 1.0
:wave
(new 'static 'inline-array ripple-wave 4
(new 'static 'ripple-wave :scale 20.0 :xdiv 2 :speed 0.5)
(new 'static 'ripple-wave :scale 20.0 :xdiv -2 :zdiv 2 :speed 0.5)
(new 'static 'ripple-wave :scale 20.0 :xdiv 5 :zdiv 3 :speed 0.75)
(new 'static 'ripple-wave)
)
)
)
;; definition for method 22 of type mud
(defmethod TODO-RENAME-22 mud ((obj mud))
(let ((t9-0 (method-of-type water-anim TODO-RENAME-22)))
(t9-0 obj)
)
(set! (-> obj flags) (logand -8388609 (-> obj flags)))
(set! (-> obj flags) (logior #x40000 (-> obj flags)))
(let ((gp-0 (new 'process 'ripple-control)))
(set! (-> obj draw ripple) gp-0)
(set! (-> gp-0 global-scale) 3072.0)
(set! (-> gp-0 waveform) ripple-for-mud)
(let
((v1-9
(the-as
object
((method-of-type res-lump get-property-data)
(-> obj entity)
'water-anim-fade-dist
'interp
-1000000000.0
(the-as pointer #f)
(the-as (pointer res-tag) #f)
*res-static-buf*
)
)
)
)
(when (the-as pointer v1-9)
(set!
(-> gp-0 close-fade-dist)
(-> (the-as ripple-control v1-9) global-scale)
)
(set!
(-> gp-0 far-fade-dist)
(-> (the-as ripple-control v1-9) last-frame-scale)
)
)
)
(case (-> obj look)
((21 25 29)
(set! (-> gp-0 close-fade-dist) 4096000000.0)
(set! (-> gp-0 far-fade-dist) 8192000000.0)
)
)
(case (-> obj look)
((22 25 24 27 26 31)
(let ((v0-3 ripple-for-small-mud))
(set! (-> gp-0 waveform) v0-3)
v0-3
)
)
)
)
)
+44
View File
@@ -0,0 +1,44 @@
import glob
src_files = glob.glob("./goal_src/**/*.g[cs]", recursive=True)
data_files = glob.glob("./goal_src/**/*.gd", recursive=True)
# Find how many of each have been started
src_files_started = 0
src_files_finished = 0
data_files_started = 0
for f in src_files:
with open(f, "r") as temp_file:
lines = temp_file.readlines()
line_count = len(lines)
if line_count > 7:
# Check to see if there are any TODOs
if any("TODO" in string for string in lines):
src_files_finished = src_files_finished + 1
else:
src_files_started = src_files_started + 1
for f in data_files:
with open(f, "r") as temp_file:
line_count = len(temp_file.readlines())
if line_count > 7:
data_files_started = data_files_started + 1
import json
with open('./docs/gh-pages-proj/src/config/progress.json', 'r+', encoding='utf-8') as f:
data = {
'jak1': {
'fileProgress': {
'src_files_total': len(src_files),
'src_files_finished': src_files_finished,
'src_files_started': src_files_started,
'data_files_total': len(data_files),
'data_files_started': data_files_started
}
}
}
f.seek(0)
json.dump(data, f, ensure_ascii=False, indent=2)
f.truncate()
@@ -189,15 +189,15 @@
(dummy-9 () none 9)
(dummy-10 () none 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-12 (_type_ vector float uint process bone uint) float 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-16 () none 16)
(dummy-16 (_type_ vector float uint process uint) none 16)
(dummy-17 () none 17)
(dummy-18 () none 18)
(dummy-19 () none 19)
(dummy-20 () none 20)
(dummy-20 (_type_ vector float uint bone uint) none 20)
(dummy-21 () none 21)
(dummy-22 () none 22)
(dummy-23 () none 23)
@@ -94,8 +94,8 @@
((move-vec vector :inline :offset-assert 16)
(best-u float :offset-assert 32)
(best-tri collide-tri-result :inline :offset-assert 48)
(best-from-prim basic :offset-assert 132)
(best-to-prim basic :offset-assert 136)
(best-from-prim collide-shape-prim :offset-assert 132)
(best-to-prim collide-shape-prim :offset-assert 136)
)
:method-count-assert 10
:size-assert #x8c
@@ -119,8 +119,8 @@
;; definition of type collide-overlap-result
(deftype collide-overlap-result (structure)
((best-dist float :offset-assert 0)
(best-from-prim basic :offset-assert 4)
(best-to-prim basic :offset-assert 8)
(best-from-prim collide-shape-prim :offset-assert 4)
(best-to-prim collide-shape-prim :offset-assert 8)
(best-from-tri collide-tri-result :inline :offset-assert 16)
)
:method-count-assert 10
+3 -3
View File
@@ -126,15 +126,15 @@
(attacker uint64 :offset-assert 48)
(invinc-time uint64 :offset-assert 56)
(mask uint32 :offset-assert 64)
(mode basic :offset-assert 68)
(mode symbol :offset-assert 68)
(shove-back meters :offset-assert 72)
(shove-up meters :offset-assert 76)
(speed meters :offset-assert 80)
(dist meters :offset-assert 84)
(control float :offset-assert 88)
(angle basic :offset-assert 92)
(angle symbol :offset-assert 92)
(rotate-to degrees :offset-assert 96)
(prev-state basic :offset-assert 100)
(prev-state state :offset-assert 100)
)
:method-count-assert 10
:size-assert #x68
+1 -1
View File
@@ -121,7 +121,7 @@
;; definition of type camera-tracker
(deftype camera-tracker (process)
((grab-target uint64 :offset 120)
((grab-target handle :offset 120)
(grab-event basic :offset-assert 128)
(release-event basic :offset-assert 132)
(old-global-mask uint32 :offset-assert 136)
+1 -1
View File
@@ -35,7 +35,7 @@
(projectile-dissipate () none 21)
(projectile-impact () none 22)
(dummy-23 () none 23)
(dummy-24 () none 24)
(dummy-24 (_type_) none 24)
(dummy-25 () none 25)
(dummy-26 () none 26)
(dummy-27 () none 27)
+1 -1
View File
@@ -183,7 +183,7 @@
)
;; definition for function ripple-find-height
(defun ripple-find-height ((arg0 process-drawable) (arg1 basic) (arg2 vector))
(defun ripple-find-height ((arg0 process-drawable) (arg1 int) (arg2 vector))
(local-vars (sv-16 float) (sv-32 float))
(let* ((f30-0 (-> arg0 root trans y))
(v1-1 (-> arg0 draw))
@@ -0,0 +1,339 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for function add-fake-shadow-to-buffer
;; INFO: Return type mismatch int vs none.
(defun
add-fake-shadow-to-buffer
((arg0 vector) (arg1 vector) (arg2 float) (arg3 int))
(let ((v1-0 *fake-shadow-buffer*))
(when (< (-> v1-0 num-shadows) 32)
(let ((t0-5 (-> v1-0 data (-> v1-0 num-shadows))))
(set! (-> t0-5 px) (-> arg0 x))
(set! (-> t0-5 py) (-> arg0 y))
(set! (-> t0-5 pz) (-> arg0 z))
(set! (-> t0-5 scale) arg2)
(set! (-> t0-5 qx) (-> arg1 x))
(set! (-> t0-5 qy) (-> arg1 y))
(set! (-> t0-5 qz) (-> arg1 z))
(set! (-> t0-5 flags) arg3)
)
(+! (-> v1-0 num-shadows) 1)
)
)
0
(none)
)
;; definition for function swap-fake-shadow-buffers
;; INFO: Return type mismatch int vs none.
(defun swap-fake-shadow-buffers ()
(set! *fake-shadow-buffer* (if (= *fake-shadow-buffer* *fake-shadow-buffer-1*)
*fake-shadow-buffer-2*
*fake-shadow-buffer-1*
)
)
(set! (-> *fake-shadow-buffer* num-shadows) 0)
0
(none)
)
;; definition for function draw-shadow
;; INFO: Return type mismatch int vs none.
(defun
draw-shadow
((arg0 vector)
(arg1 vector)
(arg2 vector)
(arg3 float)
(arg4 float)
(arg5 float)
)
(let ((f0-1 (- (-> arg0 y) (-> arg1 y))))
(if (< f0-1 arg4)
(add-fake-shadow-to-buffer
arg1
arg2
(* (- 1.0 (/ f0-1 arg4)) arg3)
(the-as int arg5)
)
)
)
0
(none)
)
;; definition for function compute-and-draw-shadow
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defun
compute-and-draw-shadow
((arg0 vector)
(arg1 vector)
(arg2 vector)
(arg3 vector)
(arg4 float)
(arg5 float)
)
(local-vars
(v1-10 float)
(v1-11 float)
(sv-96 vector)
(sv-112 (function quaternion vector float quaternion))
(sv-128 vector)
(sv-144 vector)
)
(rlet ((vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
)
(init-vf0-vector)
(set! sv-96 arg2)
(let ((s4-0 arg3)
(s3-0 arg4)
(s2-0 arg5)
)
(when (< (- (-> arg0 y) (-> arg1 y)) s3-0)
(set! sv-144 (new 'stack-no-clear 'vector))
(let ((s0-0 (new 'stack-no-clear 'vector))
(s1-0 (new 'stack-no-clear 'sparticle-cpuinfo))
)
(set! (-> arg1 y) (+ 40.96 (-> arg1 y)))
(set! (-> sv-144 x) (-> sv-96 z))
(set! (-> sv-144 y) 0.0)
(set! (-> sv-144 z) (- (-> sv-96 x)))
(vector-normalize! sv-144 1.0)
(set! sv-112 quaternion-vector-angle!)
(set! sv-128 s0-0)
(let ((a2-1 (acos (-> sv-96 y))))
(sv-112 (the-as quaternion sv-128) sv-144 a2-1)
)
(let ((v1-9 s1-0))
(cond
((< (-> s0-0 w) 0.0)
(.lvf vf1 (&-> v1-9 vel-sxvel quad))
(.lvf vf2 (&-> s0-0 quad))
(.sub.vf vf1 vf0 vf2 :mask #b111)
(.svf (&-> v1-9 vel-sxvel quad) vf1)
(.mov v1-10 vf1)
)
(else
(.lvf vf1 (&-> v1-9 vel-sxvel quad))
(.lvf vf2 (&-> s0-0 quad))
(.add.vf vf1 vf0 vf2 :mask #b111)
(.svf (&-> v1-9 vel-sxvel quad) vf1)
(.mov v1-11 vf1)
)
)
)
(draw-shadow arg0 arg1 (-> s1-0 vel-sxvel) (the-as float s4-0) s3-0 s2-0)
)
)
)
0
(none)
)
)
;; definition for function find-ground-and-draw-shadow
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defun
find-ground-and-draw-shadow
((arg0 vector)
(arg1 vector)
(arg2 float)
(arg3 uint)
(arg4 process)
(arg5 float)
(arg6 float)
)
(let ((s2-0 (new 'stack-no-clear 'vector)))
(set! (-> s2-0 quad) (-> arg0 quad))
(new 'stack-no-clear 'vector)
(+! (-> s2-0 y) arg5)
(let ((s4-0 (new 'stack-no-clear 'bone)))
(cond
((>=
(dummy-12 *collide-cache* s2-0 arg6 arg3 arg4 s4-0 (the-as uint 1))
0.0
)
(if (!= arg2 0.0)
(compute-and-draw-shadow
s2-0
(-> s4-0 transform vector 3)
(-> s4-0 scale)
(the-as vector arg2)
arg6
(the-as float 0)
)
)
(if (and arg1 (!= (shr (shl (-> s4-0 cache bone-matrix) 52) 58) 3))
(set! (-> arg1 quad) (-> s4-0 transform vector 3 quad))
)
)
(else
(if arg1
(vector+float*!
arg1
arg0
(-> *standard-dynamics* gravity-normal)
(- arg6)
)
)
)
)
)
)
0
(none)
)
;; definition for function do-target-shadow
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defbehavior do-target-shadow target ()
(if
(and
(logtest? (-> self control status) 1)
(!= (-> self control unknown-surface mode) 'swim)
(!= (-> self control unknown-surface mode) 'dive)
(!= (-> self next-state name) 'target-flop)
(zero? (logand (-> self draw status) 38))
)
(set! (-> self control shadow-pos quad) (-> self control trans quad))
(find-ground-and-draw-shadow
(-> self control trans)
(-> self control shadow-pos)
0.0
(-> (the-as collide-shape-prim (-> self control root-prim)) collide-with)
self
0.0
81920.0
)
)
0
(none)
)
;; failed to figure out what this is:
(set!
(-> *part-id-table* 362)
(new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 20
(new 'static 'sp-field-init-spec :field #x1 :initial-value #x200000)
(new 'static 'sp-field-init-spec
:field #x6
:flags #x1
:initial-value #x41000000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #xd
:flags #x1
:initial-value #x4499999a
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x10
:flags #x1
:initial-value -956301312
:random-range #x47800000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x11
:flags #x3
:initial-value -4
:random-mult 1
)
(new 'static 'sp-field-init-spec
:field #x12
:flags #x1
:initial-value #x42b40000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x13
:flags #x1
:initial-value #x42b40000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x14
:flags #x1
:initial-value #x42b40000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x15
:flags #x1
:initial-value #x41a00000
:random-range #x41a00000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x1a
:flags #x1
:initial-value #x4103126f
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x1c
:flags #x1
:initial-value #x41888889
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x20
:flags #x3
:initial-value -4
:random-mult 1
)
(new 'static 'sp-field-init-spec
:field #x24
:flags #x1
:initial-value -1097229926
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x2e
:initial-value #x138c
:random-mult 1
)
(new 'static 'sp-field-init-spec
:field #x2f
:initial-value 12
:random-mult 1
)
(new 'static 'sp-field-init-spec
:field #x36
:flags #x1
:initial-value -983331271
:random-range #x452aaaab
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x3a
:flags #x1
:initial-value #x46800000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x3b
:flags #x1
:initial-value -956301312
:random-range #x47800000
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec
:field #x3e
:flags #x1
:initial-value #x444ccccd
:random-mult #x3f800000
)
(new 'static 'sp-field-init-spec :field #x43)
)
)
)
@@ -5,12 +5,12 @@
(deftype sp-field-init-spec (structure)
((field uint16 :offset-assert 0)
(flags uint16 :offset-assert 2)
(initial-valuef float :offset-assert 4)
(random-rangef float :offset-assert 8)
(random-multf float :offset-assert 12)
(initial-value int32 :offset 4)
(random-range int32 :offset 8)
(random-mult int32 :offset 12)
(initial-value int32 :offset-assert 4)
(random-range int32 :offset-assert 8)
(random-mult int32 :offset-assert 12)
(initial-valuef float :offset 4)
(random-rangef float :offset 8)
(random-multf float :offset 12)
(func basic :offset 4)
(tex uint32 :offset 4)
(pntr uint32 :offset 4)
@@ -30,9 +30,9 @@
(format #t "~Tinitial-valuef: ~f~%" (-> obj initial-valuef))
(format #t "~Trandom-rangef: ~f~%" (-> obj random-rangef))
(format #t "~Trandom-multf: ~f~%" (-> obj random-multf))
(format #t "~Tinitial-value: ~D~%" (-> obj initial-valuef))
(format #t "~Trandom-range: ~D~%" (-> obj random-rangef))
(format #t "~Trandom-mult: ~D~%" (-> obj random-multf))
(format #t "~Tinitial-value: ~D~%" (-> obj initial-value))
(format #t "~Trandom-range: ~D~%" (-> obj random-range))
(format #t "~Trandom-mult: ~D~%" (-> obj random-mult))
(format #t "~Tfunc: ~A~%" (-> obj initial-valuef))
(format #t "~Ttex: ~D~%" (-> obj initial-valuef))
(format #t "~Tpntr: #x~X~%" (-> obj initial-valuef))
@@ -43,9 +43,9 @@
;; definition of type sparticle-launcher
(deftype sparticle-launcher (basic)
((birthaccum float :offset-assert 4)
(soundaccum float :offset-assert 8)
(init-specs uint32 :offset-assert 12)
((birthaccum float :offset-assert 4)
(soundaccum float :offset-assert 8)
(init-specs (inline-array sp-field-init-spec) :offset-assert 12)
)
:method-count-assert 9
:size-assert #x10
+3 -3
View File
@@ -151,13 +151,13 @@
(:methods
(water-vol-idle () none 20)
(water-vol-startup () none 21)
(dummy-22 () none 22)
(TODO-RENAME-22 (_type_) ripple-wave-set 22)
(dummy-23 () none 23)
(dummy-24 () none 24)
(dummy-25 () none 25)
(TODO-RENAME-25 (_type_) quaternion 25)
(dummy-26 () none 26)
(dummy-27 () none 27)
(dummy-28 () none 28)
(get-ripple-height (_type_ vector) float 28)
(dummy-29 () none 29)
)
)
+222
View File
@@ -0,0 +1,222 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type twist-joint
(deftype twist-joint (structure)
((ry float :offset-assert 0)
(max-dry float :offset-assert 4)
)
:allow-misaligned :method-count-assert 9
:size-assert #x8
:flag-assert #x900000008
)
;; definition for method 3 of type twist-joint
(defmethod inspect twist-joint ((obj twist-joint))
(format #t "[~8x] ~A~%" obj 'twist-joint)
(format #t "~Try: ~f~%" (-> obj ry))
(format #t "~Tmax-dry: ~f~%" (-> obj max-dry))
obj
)
;; definition of type twister
(deftype twister (basic)
((num-joints int32 :offset-assert 4)
(first-joint int32 :offset-assert 8)
(last-joint int32 :offset-assert 12)
(something uint16 :offset 12)
(max-speed float :offset-assert 16)
(smoothing float :offset-assert 20)
(min-dist float :offset-assert 24)
(target float :offset-assert 28)
(ry float :offset-assert 32)
(max-speed-ry float :offset-assert 36)
(data twist-joint :inline :dynamic :offset-assert 40)
)
:method-count-assert 13
:size-assert #x28
:flag-assert #xd00000028
(:methods
(new (symbol _type_ int int float float float float) _type_ 0)
(TODO-RENAME-9 (_type_ int int float) none 9)
(set-target! (_type_ float) none 10)
(TODO-RENAME-11 (_type_) none 11)
(TODO-RENAME-12 (_type_ process-drawable) none 12)
)
)
;; definition for method 3 of type twister
(defmethod inspect twister ((obj twister))
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Tnum-joints: ~D~%" (-> obj num-joints))
(format #t "~Tfirst-joint: ~D~%" (-> obj first-joint))
(format #t "~Tlast-joint: ~D~%" (-> obj last-joint))
(format #t "~Tmax-speed: ~f~%" (-> obj max-speed))
(format #t "~Tsmoothing: ~f~%" (-> obj smoothing))
(format #t "~Tmin-dist: ~f~%" (-> obj min-dist))
(format #t "~Ttarget: ~f~%" (-> obj target))
(format #t "~Try: ~f~%" (-> obj ry))
(format #t "~Tmax-speed-ry: ~f~%" (-> obj max-speed-ry))
(format #t "~Tdata[0] @ #x~X~%" (-> obj data))
obj
)
;; definition for method 0 of type twister
(defmethod
new
twister
((allocation symbol)
(type-to-make twister)
(arg0 int)
(arg1 int)
(arg2 float)
(arg3 float)
(arg4 float)
(arg5 float)
)
(let* ((gp-0 (+ (- 1 arg0) arg1))
(v0-0
(object-new
allocation
(the-as type type-to-make)
(the-as int (+ (-> type-to-make something) (* gp-0 16)))
)
)
)
(set! (-> v0-0 first-joint) arg0)
(set! (-> v0-0 last-joint) arg1)
(set! (-> v0-0 num-joints) gp-0)
(set! (-> v0-0 max-speed) arg2)
(set! (-> v0-0 smoothing) arg4)
(set! (-> v0-0 min-dist) arg5)
(set! (-> v0-0 target) 0.0)
(set! (-> v0-0 ry) 0.0)
(set! (-> v0-0 max-speed-ry) arg3)
(dotimes (v1-4 gp-0)
(set! (-> v0-0 data v1-4 ry) 0.0)
(set! (-> v0-0 data v1-4 max-dry) 0.0)
)
v0-0
)
)
;; definition for method 5 of type twister
(defmethod asize-of twister ((obj twister))
(+ (* (-> obj num-joints) 16) 40)
)
;; definition for method 9 of type twister
;; INFO: Return type mismatch int vs none.
(defmethod
TODO-RENAME-9
twister
((obj twister) (arg0 int) (arg1 int) (arg2 float))
(let ((v1-1 (- arg0 (-> obj first-joint)))
(a1-2 (- arg1 (-> obj first-joint)))
)
(while (>= a1-2 v1-1)
(set! (-> obj data v1-1 max-dry) arg2)
(+! v1-1 1)
)
)
0
(none)
)
;; definition for method 10 of type twister
;; INFO: Return type mismatch int vs none.
(defmethod set-target! twister ((obj twister) (arg0 float))
(set! (-> obj target) arg0)
0
(none)
)
;; definition for method 11 of type twister
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-11 twister ((obj twister))
(let* ((s5-0 (+ (-> obj num-joints) -1))
(s4-0 (-> obj data s5-0))
)
(let ((f0-2 (deg-diff (-> s4-0 ry) (-> obj target))))
(+!
(-> s4-0 ry)
(seek-with-smooth
0.0
f0-2
(-> obj max-speed)
(-> obj smoothing)
(-> obj min-dist)
)
)
)
(let ((f30-1 (-> s4-0 ry)))
(while (> s5-0 0)
(+! s5-0 -1)
(let ((s4-1 (-> obj data s5-0)))
(let ((f0-9 (deg-diff f30-1 (-> s4-1 ry))))
(cond
((= (-> s4-1 max-dry) 0.0)
(set! f0-9 0.0)
)
((< (fabs f0-9) (-> s4-1 max-dry))
)
((< f0-9 0.0)
(set!
f0-9
(seek-with-smooth
f0-9
(- (-> s4-1 max-dry))
(-> obj max-speed)
(-> obj smoothing)
(-> obj min-dist)
)
)
)
(else
(set!
f0-9
(seek-with-smooth
f0-9
(-> s4-1 max-dry)
(-> obj max-speed)
(-> obj smoothing)
(-> obj min-dist)
)
)
)
)
(+! f30-1 f0-9)
)
(set! (-> s4-1 ry) f30-1)
)
)
)
)
0
(none)
)
;; definition for method 12 of type twister
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-12 twister ((obj twister) (arg0 process-drawable))
(let ((s4-0 (new 'stack-no-clear 'matrix)))
(dotimes (s3-0 (-> obj num-joints))
(let
((s2-0
(-> arg0 node-list data (+ (-> obj first-joint) s3-0) bone transform)
)
)
(matrix-rotate-y! s4-0 (-> obj data s3-0 ry))
(vector-! (-> s2-0 vector 3) (-> s2-0 vector 3) (-> arg0 root trans))
(matrix*! s2-0 s2-0 s4-0)
(vector+! (-> s2-0 vector 3) (-> s2-0 vector 3) (-> arg0 root trans))
)
)
)
0
(none)
)
+102
View File
@@ -0,0 +1,102 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type wobbler
(deftype wobbler (basic)
((posx float :offset-assert 4)
(posy float :offset-assert 8)
(velx float :offset-assert 12)
(vely float :offset-assert 16)
(spring float :offset-assert 20)
(damping float :offset-assert 24)
(height float :offset-assert 28)
)
:method-count-assert 13
:size-assert #x20
:flag-assert #xd00000020
(:methods
(reset! (_type_ float float float) none 9)
(inc-xy-vel! (_type_ float float) none 10)
(move! (_type_) none 11)
(TODO-RENAME-12 (_type_ quaternion) none 12)
)
)
;; definition for method 3 of type wobbler
(defmethod inspect wobbler ((obj wobbler))
(format #t "[~8x] ~A~%" obj (-> obj type))
(format #t "~Tposx: ~f~%" (-> obj posx))
(format #t "~Tposy: ~f~%" (-> obj posy))
(format #t "~Tvelx: ~f~%" (-> obj velx))
(format #t "~Tvely: ~f~%" (-> obj vely))
(format #t "~Tspring: ~f~%" (-> obj spring))
(format #t "~Tdamping: ~f~%" (-> obj damping))
(format #t "~Theight: ~f~%" (-> obj height))
obj
)
;; definition for method 9 of type wobbler
;; INFO: Return type mismatch int vs none.
(defmethod reset! wobbler ((obj wobbler) (arg0 float) (arg1 float) (arg2 float))
(set! (-> obj posx) 0.0)
(set! (-> obj posy) 0.0)
(set! (-> obj velx) 0.0)
(set! (-> obj vely) 0.0)
(set! (-> obj spring) arg0)
(set! (-> obj damping) arg1)
(set! (-> obj height) arg2)
0
(none)
)
;; definition for method 10 of type wobbler
;; INFO: Return type mismatch int vs none.
(defmethod inc-xy-vel! wobbler ((obj wobbler) (arg0 float) (arg1 float))
(+! (-> obj velx) arg0)
(+! (-> obj vely) arg1)
0
(none)
)
;; definition for method 11 of type wobbler
;; INFO: Return type mismatch int vs none.
(defmethod move! wobbler ((obj wobbler))
(+! (-> obj posx) (* (-> obj velx) (-> *display* seconds-per-frame)))
(+! (-> obj posy) (* (-> obj vely) (-> *display* seconds-per-frame)))
(set! (-> obj velx) (* (-> obj velx) (-> obj damping)))
(set! (-> obj vely) (* (-> obj vely) (-> obj damping)))
(+! (-> obj velx) (* (* -1.0 (-> obj posx)) (-> obj spring)))
(+! (-> obj vely) (* (* -1.0 (-> obj posy)) (-> obj spring)))
0
(none)
)
;; definition for method 12 of type wobbler
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-12 wobbler ((obj wobbler) (arg0 quaternion))
(let ((s5-0 (new 'stack-no-clear 'vector)))
(set! (-> s5-0 x) (-> obj posy))
(set! (-> s5-0 y) 0.0)
(set! (-> s5-0 z) (- (-> obj posx)))
(vector-normalize! s5-0 1.0)
(let*
((f0-8
(/
(sqrtf
(+ (* (-> obj posx) (-> obj posx)) (* (-> obj posy) (-> obj posy)))
)
(-> obj height)
)
)
(f0-9 (atan f0-8 1.0))
)
(quaternion-vector-angle! arg0 s5-0 f0-9)
)
)
0
(none)
)
+14 -14
View File
@@ -27,20 +27,20 @@
:size-assert #x1a8
:flag-assert #x17000001a8
(:methods
(dummy-9 () none 9)
(dummy-10 () none 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-16 () none 16)
(dummy-17 () none 17)
(dummy-18 () none 18)
(dummy-19 () none 19)
(dummy-20 () none 20)
(dummy-21 () none 21)
(dummy-22 () none 22)
(TODO-RENAME-9 (_type_ float float float float) none 9)
(dummy-10 (_type_ float) none 10)
(clear-force-torque! (_type_) none 11)
(clear-momentum! (_type_) none 12)
(TODO-RENAME-13 (_type_ vector vector) none 13)
(TODO-RENAME-14 (_type_ vector vector) none 14)
(TODO-RENAME-15 (_type_ vector) none 15)
(TODO-RENAME-16 (_type_ vector vector float) none 16)
(TODO-RENAME-17 (_type_ vector vector) vector 17)
(TODO-RENAME-18 (_type_ vector) vector 18)
(dummy-19 (_type_) none 19)
(dummy-20 (_type_) none 20)
(TODO-RENAME-21 (_type_) none 21)
(TODO-RENAME-22 (_type_ vector quaternion float float) none 22)
)
)
File diff suppressed because it is too large Load Diff
+100
View File
@@ -0,0 +1,100 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type ticky
(deftype ticky (structure)
((delay-til-ramp uint64 :offset-assert 0)
(delay-til-timeout uint64 :offset-assert 8)
(starting-time uint64 :offset-assert 16)
(last-tick-time uint64 :offset-assert 24)
)
:method-count-assert 12
:size-assert #x20
:flag-assert #xc00000020
(:methods
(sleep (_type_ uint) none 9)
(reached-delay? (_type_ uint) symbol 10)
(completed? (_type_) symbol 11)
)
)
;; definition for method 3 of type ticky
(defmethod inspect ticky ((obj ticky))
(format #t "[~8x] ~A~%" obj 'ticky)
(format #t "~Tdelay-til-ramp: ~D~%" (-> obj delay-til-ramp))
(format #t "~Tdelay-til-timeout: ~D~%" (-> obj delay-til-timeout))
(format #t "~Tstarting-time: ~D~%" (-> obj starting-time))
(format #t "~Tlast-tick-time: ~D~%" (-> obj last-tick-time))
obj
)
;; definition for method 9 of type ticky
;; INFO: Return type mismatch int vs none.
(defmethod sleep ticky ((obj ticky) (arg0 uint))
(set! (-> obj starting-time) (-> *display* base-frame-counter))
(set! (-> obj delay-til-timeout) arg0)
(set! (-> obj delay-til-ramp) (max 0 (the-as int (+ arg0 -1200))))
(set! (-> obj last-tick-time) (the-as uint 0))
0
(none)
)
;; definition for method 11 of type ticky
(defmethod completed? ticky ((obj ticky))
(let ((gp-0 #f))
(let ((v1-2 (- (-> *display* base-frame-counter) (-> obj starting-time))))
(cond
((>= (the-as int v1-2) (the-as int (-> obj delay-til-timeout)))
(set! gp-0 #t)
)
(else
(let*
((f0-1
(fmin
1.0
(/
(the float (max 0 (the-as int (- v1-2 (-> obj delay-til-ramp)))))
(the float (- (-> obj delay-til-timeout) (-> obj delay-til-ramp)))
)
)
)
(v1-7 (the int (lerp 105.0 41.0 f0-1)))
)
(when
(>=
(the-as
int
(- (-> *display* base-frame-counter) (-> obj last-tick-time))
)
v1-7
)
(set! (-> obj last-tick-time) (-> *display* base-frame-counter))
(sound-play-by-name
(static-sound-name "stopwatch")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
)
)
)
)
)
gp-0
)
)
;; definition for method 10 of type ticky
(defmethod reached-delay? ticky ((obj ticky) (arg0 uint))
(>=
(the-as int (- (-> *display* base-frame-counter) (-> obj starting-time)))
(the-as int arg0)
)
)
+106
View File
@@ -0,0 +1,106 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type tippy
(deftype tippy (structure)
((axis vector :inline :offset-assert 0)
(angle float :offset-assert 16)
(orig quaternion :inline :offset-assert 32)
(dist-ratio float :offset-assert 48)
(damping float :offset-assert 52)
(1-damping float :offset-assert 56)
)
:method-count-assert 11
:size-assert #x3c
:flag-assert #xb0000003c
(:methods
(reset! (_type_ process-drawable float float) none 9)
(TODO-RENAME-10 (_type_ process-drawable vector) symbol 10)
)
)
;; definition for method 3 of type tippy
(defmethod inspect tippy ((obj tippy))
(format #t "[~8x] ~A~%" obj 'tippy)
(format #t "~Taxis: #<vector @ #x~X>~%" (-> obj axis))
(format #t "~Tangle: ~f~%" (-> obj angle))
(format #t "~Torig: #<quaternion @ #x~X>~%" (-> obj orig))
(format #t "~Tdist-ratio: ~f~%" (-> obj dist-ratio))
(format #t "~Tdamping: ~f~%" (-> obj damping))
(format #t "~T1-damping: ~f~%" (-> obj 1-damping))
obj
)
;; definition for method 9 of type tippy
;; INFO: Return type mismatch int vs none.
(defmethod
reset!
tippy
((obj tippy) (arg0 process-drawable) (arg1 float) (arg2 float))
(set-vector! (-> obj axis) 0.0 0.0 0.0 1.0)
(set! (-> obj angle) 0.0)
(quaternion-copy! (-> obj orig) (-> arg0 root quat))
(set! (-> obj dist-ratio) arg1)
(set! (-> obj damping) arg2)
(set! (-> obj 1-damping) (- 1.0 arg2))
0
(none)
)
;; definition for method 10 of type tippy
(defmethod
TODO-RENAME-10
tippy
((obj tippy) (arg0 process-drawable) (arg1 vector))
(let ((s4-0 #t))
(cond
(arg1
(let ((s3-0 (new 'stack-no-clear 'vector)))
0.0
(set! (-> s3-0 x) (- (-> arg1 z) (-> arg0 root trans z)))
(set! (-> s3-0 y) 0.0)
(set! (-> s3-0 z) (- (-> arg0 root trans x) (-> arg1 x)))
(let ((f0-6 (vector-length s3-0)))
(vector-float*! s3-0 s3-0 (/ 1.0 f0-6))
(let ((f30-0 (* f0-6 (-> obj dist-ratio))))
(set!
(-> obj axis x)
(+
(* (-> obj 1-damping) (-> obj axis x))
(* (-> obj damping) (-> s3-0 x))
)
)
(set! (-> obj axis y) 0.0)
(set!
(-> obj axis z)
(+
(* (-> obj 1-damping) (-> obj axis z))
(* (-> obj damping) (-> s3-0 z))
)
)
(vector-normalize! (-> obj axis) 1.0)
(set!
(-> obj angle)
(+ (* (-> obj 1-damping) (-> obj angle)) (* (-> obj damping) f30-0))
)
)
)
)
)
(else
(set! (-> obj angle) (* (-> obj 1-damping) (-> obj angle)))
(when (< (-> obj angle) 182.04445)
(set! (-> obj angle) 0.0)
(set! s4-0 #f)
)
)
)
(quaternion-vector-angle! (-> arg0 root quat) (-> obj axis) (-> obj angle))
(quaternion*! (-> arg0 root quat) (-> arg0 root quat) (-> obj orig))
s4-0
)
)
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,481 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type teetertotter
(deftype teetertotter (process-drawable)
((launched-player basic :offset-assert 176)
(in-launch-window basic :offset-assert 180)
(rock-is-dangerous basic :offset-assert 184)
)
:heap-base #x50
:method-count-assert 20
:size-assert #xbc
:flag-assert #x14005000bc
)
;; definition for method 3 of type teetertotter
(defmethod inspect teetertotter ((obj teetertotter))
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~T~Tlaunched-player: ~A~%" (-> obj launched-player))
(format #t "~T~Tin-launch-window: ~A~%" (-> obj in-launch-window))
(format #t "~T~Trock-is-dangerous: ~A~%" (-> obj rock-is-dangerous))
obj
)
;; failed to figure out what this is:
(let
((v1-1
(new 'static 'skeleton-group
:art-group-name "teetertotter"
:bounds (new 'static 'vector :w 32768.0)
:max-lod 2
:version #x6
)
)
)
(set! (-> v1-1 jgeo) 0)
(set! (-> v1-1 janim) 4)
(set! (-> v1-1 mgeo 0) (the-as uint 1))
(set! (-> v1-1 lod-dist 0) 81920.0)
(set! (-> v1-1 mgeo 1) (the-as uint 2))
(set! (-> v1-1 lod-dist 1) 163840.0)
(set! (-> v1-1 mgeo 2) (the-as uint 3))
(set! (-> v1-1 lod-dist 2) 4095996000.0)
(set! *teetertotter-sg* v1-1)
)
;; definition for function target-on-end-of-teetertotter?
;; Used lq/sq
(defun target-on-end-of-teetertotter? ((arg0 teetertotter))
(let
((gp-1
(vector-!
(new-stack-vector0)
(-> *target* control trans)
(-> arg0 root trans)
)
)
)
(if
(<
(vector-dot
(vector-x-quaternion! (new-stack-vector0) (-> arg0 root quat))
gp-1
)
-8192.0
)
#t
)
)
)
;; failed to figure out what this is:
(let
((v1-3
(new 'static 'state
:name 'teetertotter-idle
:next #f
:exit #f
:code #f
:trans #f
:post #f
:enter #f
:event #f
)
)
)
(set! teetertotter-idle (the-as (state none) v1-3))
(set!
(-> v1-3 event)
(lambda :behavior teetertotter
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v1-0 arg2))
(the-as object (cond
((= v1-0 'attack)
(case (-> arg3 param 1)
(('flop)
(when (target-on-end-of-teetertotter? self)
(set! (-> self in-launch-window) #f)
(increment-success-for-hint
(the-as level-hint-control 676)
)
(go teetertotter-launch)
)
)
)
)
((= v1-0 'bonk)
(when (target-on-end-of-teetertotter? self)
(level-hint-spawn
(game-text-id misty-teetertotter-bonk-dax-tutorial)
"sksp0070"
#f
*entity-pool*
0
)
(go teetertotter-bend)
)
)
)
)
)
)
)
(set!
(-> v1-3 code)
(lambda :behavior teetertotter () (let ((gp-0 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
gp-0
(the-as
art-joint-anim
(-> self draw art-group data 4)
)
num-func-identity
)
(set! (-> gp-0 frame-num) 0.0)
)
(while #t
(suspend)
)
(none)
)
)
(set! (-> v1-3 post) transform-post)
)
;; failed to figure out what this is:
(let
((v1-4
(new 'static 'state
:name 'teetertotter-launch
:next #f
:exit #f
:code #f
:trans #f
:post #f
:enter #f
:event #f
)
)
)
(set! teetertotter-launch (the-as (state none) v1-4))
(set!
(-> v1-4 event)
(lambda :behavior teetertotter
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(when (= arg2 'touch)
(-> arg3 param 0)
(let ((t9-0 (method-of-type touching-shapes-entry dummy-12)))
(-> self root)
1
(when (and (t9-0) (-> self rock-is-dangerous))
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-2 from) self)
(set! (-> a1-2 num-params) 2)
(set! (-> a1-2 message) 'attack)
(set! (-> a1-2 param 0) (-> arg3 param 0))
(let ((a0-2 (new 'static 'attack-info :mask #x20)))
(set! (-> a0-2 mode) 'deadly)
(set! (-> a1-2 param 1) (the-as uint a0-2))
)
(send-event-function arg0 a1-2)
)
)
)
(-> arg3 param 0)
(let ((t9-2 (method-of-type touching-shapes-entry dummy-12)))
(-> self root)
2
(when
(and
(t9-2)
(target-on-end-of-teetertotter? self)
(not (-> self launched-player))
(-> self in-launch-window)
)
(let ((a1-4 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-4 from) self)
(set! (-> a1-4 num-params) 2)
(set! (-> a1-4 message) 'shove)
(set! (-> a1-4 param 0) (the-as uint #f))
(let ((v1-16 (new 'static 'attack-info :mask #xcc0)))
(set! (-> v1-16 shove-back) 0.0)
(set! (-> v1-16 shove-up) 53248.0)
(set! (-> v1-16 angle) 'jump)
(set! (-> v1-16 control) 1.0)
(set! (-> a1-4 param 1) (the-as uint v1-16))
)
(when (send-event-function arg0 a1-4)
(let ((v0-0 #t))
(set! (-> self launched-player) v0-0)
v0-0
)
)
)
)
)
)
)
)
(set!
(-> v1-4 code)
(lambda :behavior teetertotter
()
(local-vars (v1-16 symbol) (f0-4 float))
(set! (-> self launched-player) #f)
(let ((a0-0 (-> self skel root-channel 0)))
(set!
(-> a0-0 frame-group)
(the-as art-joint-anim (-> self draw art-group data 4))
)
(set!
(-> a0-0 param 0)
(the
float
(+
(->
(the-as art-joint-anim (-> self draw art-group data 4))
data
0
length
)
-1
)
)
)
(set! (-> a0-0 param 1) 1.0)
(set! (-> a0-0 frame-num) 0.0)
(joint-control-channel-group!
a0-0
(the-as art-joint-anim (-> self draw art-group data 4))
num-func-seek!
)
)
(until (begin
(set! (-> self rock-is-dangerous) (and v1-16 (>= 76.0 f0-4)))
(suspend)
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 param 0)
(the float (+ (-> a0-2 frame-group data 0 length) -1))
)
(set! (-> a0-2 param 1) 1.0)
(joint-control-channel-group-eval!
a0-2
(the-as art-joint-anim #f)
num-func-seek!
)
)
(ja-done? 0)
)
(set! f0-4 (ja-aframe-num 0))
(set! (-> self in-launch-window) (and (>= f0-4 76.0) (>= 82.0 f0-4)))
(set! v1-16 (>= f0-4 12.0))
)
(go teetertotter-idle)
(none)
)
)
(set! (-> v1-4 post) rider-post)
)
;; failed to figure out what this is:
(let
((v1-5
(new 'static 'state
:name 'teetertotter-bend
:next #f
:exit #f
:code #f
:trans #f
:post #f
:enter #f
:event #f
)
)
)
(set! teetertotter-bend (the-as (state none) v1-5))
(set!
(-> v1-5 code)
(lambda :behavior teetertotter () (let ((a0-0 (-> self skel root-channel 0)))
(set!
(-> a0-0 frame-group)
(the-as
art-joint-anim
(-> self draw art-group data 5)
)
)
(set!
(-> a0-0 param 0)
(the
float
(+
(->
(the-as
art-joint-anim
(-> self draw art-group data 5)
)
data
0
length
)
-1
)
)
)
(set! (-> a0-0 param 1) 1.0)
(set! (-> a0-0 frame-num) 0.0)
(joint-control-channel-group!
a0-0
(the-as
art-joint-anim
(-> self draw art-group data 5)
)
num-func-seek!
)
)
(until (begin
(suspend)
(let ((a0-1 (-> self skel root-channel 0)))
(set!
(-> a0-1 param 0)
(the float (+ (-> a0-1 frame-group data 0 length) -1))
)
(set! (-> a0-1 param 1) 1.0)
(joint-control-channel-group-eval!
a0-1
(the-as art-joint-anim #f)
num-func-seek!
)
)
(ja-done? 0)
)
(empty)
)
(go teetertotter-idle)
(none)
)
)
(set! (-> v1-5 post) rider-post)
)
;; definition for method 11 of type teetertotter
(defmethod copy-defaults! teetertotter ((obj teetertotter) (arg0 res-lump))
(let
((s4-0
(new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))
)
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(let ((t9-2 (method-of-object s4-0 dummy-29)))
1
(t9-2)
)
(let ((s3-0 (new 'process 'collide-shape-prim-group s4-0 (the-as uint 5) 0)))
(set! (-> s3-0 prim-core collide-as) (the-as uint 2048))
(set! (-> s3-0 collide-with) (the-as uint 16))
(set! (-> s3-0 prim-core action) (the-as uint 1))
(set-vector! (-> s3-0 local-sphere) 0.0 12288.0 0.0 36864.0)
((method-of-object s4-0 dummy-46))
(let ((s2-0 (new 'process 'collide-shape-prim-sphere s4-0 (the-as uint 1))))
(set! (-> s2-0 prim-core collide-as) (the-as uint 2048))
(set! (-> s2-0 collide-with) (the-as uint 16))
(set! (-> s2-0 prim-core action) (the-as uint 1))
(set! (-> s2-0 prim-core offense) 4)
(set! (-> s2-0 transform-index) 5)
(set-vector! (-> s2-0 local-sphere) -4096.0 2048.0 0.0 5120.0)
)
((method-of-object s3-0 dummy-28))
(let
((s2-1
(new
'process
'collide-shape-prim-mesh
s4-0
(the-as uint 0)
(the-as uint 2)
)
)
)
(set! (-> s2-1 prim-core collide-as) (the-as uint 2048))
(set! (-> s2-1 collide-with) (the-as uint 16))
(set! (-> s2-1 prim-core action) (the-as uint 3))
(set! (-> s2-1 prim-core offense) 4)
(set! (-> s2-1 transform-index) 7)
(set-vector! (-> s2-1 local-sphere) 0.0 0.0 0.0 32768.0)
)
((method-of-object s3-0 dummy-28))
(let
((s2-2
(new
'process
'collide-shape-prim-mesh
s4-0
(the-as uint 1)
(the-as uint 0)
)
)
)
(set! (-> s2-2 prim-core collide-as) (the-as uint 2048))
(set! (-> s2-2 collide-with) (the-as uint 16))
(set! (-> s2-2 prim-core action) (the-as uint 1))
(set! (-> s2-2 prim-core offense) 4)
(set! (-> s2-2 transform-index) 4)
(set-vector! (-> s2-2 local-sphere) 0.0 0.0 0.0 32768.0)
)
((method-of-object s3-0 dummy-28))
(let
((s2-3
(new
'process
'collide-shape-prim-mesh
s4-0
(the-as uint 2)
(the-as uint 0)
)
)
)
(set! (-> s2-3 prim-core collide-as) (the-as uint 2048))
(set! (-> s2-3 collide-with) (the-as uint 16))
(set! (-> s2-3 prim-core action) (the-as uint 1))
(set! (-> s2-3 prim-core offense) 4)
(set! (-> s2-3 transform-index) 3)
(set-vector! (-> s2-3 local-sphere) 0.0 0.0 0.0 32768.0)
)
((method-of-object s3-0 dummy-28))
(let
((s2-4
(new
'process
'collide-shape-prim-mesh
s4-0
(the-as uint 3)
(the-as uint 2)
)
)
)
(set! (-> s2-4 prim-core collide-as) (the-as uint 2048))
(set! (-> s2-4 collide-with) (the-as uint 16))
(set! (-> s2-4 prim-core action) (the-as uint 3))
(set! (-> s2-4 prim-core offense) 4)
(set! (-> s2-4 transform-index) 3)
(set-vector! (-> s2-4 local-sphere) 0.0 0.0 0.0 32768.0)
)
((method-of-object s3-0 dummy-28))
)
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
((method-of-object s4-0 dummy-50))
(set! (-> obj root) s4-0)
)
(process-drawable-from-entity! obj arg0)
(dummy-14 obj *teetertotter-sg* '())
(set! (-> obj launched-player) #f)
(set! (-> obj in-launch-window) #f)
(set! (-> obj rock-is-dangerous) #f)
(go teetertotter-idle)
(none)
)
@@ -0,0 +1,468 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type silostep
(deftype silostep (process-drawable)
((anim-limit float :offset-assert 176)
(cam-tracker uint64 :offset-assert 184)
)
:heap-base #x50
:method-count-assert 20
:size-assert #xc0
:flag-assert #x14005000c0
)
;; definition for method 3 of type silostep
(defmethod inspect silostep ((obj silostep))
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~T~Tanim-limit: ~f~%" (-> obj anim-limit))
(format #t "~T~Tcam-tracker: ~D~%" (-> obj cam-tracker))
obj
)
;; failed to figure out what this is:
(let
((v1-1
(new 'static 'skeleton-group
:art-group-name "silostep"
:bounds
(new 'static 'vector :y 8192.0 :w 32768.0)
:version #x6
)
)
)
(set! (-> v1-1 jgeo) 0)
(set! (-> v1-1 janim) 2)
(set! (-> v1-1 mgeo 0) (the-as uint 1))
(set! (-> v1-1 lod-dist 0) 4095996000.0)
(set! *silostep-sg* v1-1)
)
;; failed to figure out what this is:
(let
((v1-2
(new 'static 'state
:name 'silostep-idle
:next #f
:exit #f
:code #f
:trans #f
:post #f
:enter #f
:event #f
)
)
)
(set! silostep-idle (the-as (state none) v1-2))
(set!
(-> v1-2 event)
(the-as
(function process int symbol event-message-block object)
(lambda :behavior silostep
((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('trigger)
(go silostep-camera)
)
(('trigger-rise)
enter-state
(go silostep-rise)
)
)
(none)
)
)
)
(set!
(-> v1-2 code)
(lambda :behavior silostep () (let ((gp-0 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
gp-0
(the-as
art-joint-anim
(-> self draw art-group data 2)
)
num-func-identity
)
(set! (-> gp-0 frame-num) 0.0)
)
(transform-post)
(while #t
(suspend)
)
(none)
)
)
(set! (-> v1-2 post) ja-post)
)
;; definition for function misty-camera-view
(defbehavior misty-camera-view silostep ()
(let* ((gp-0 (get-process *default-dead-pool* camera-tracker #x4000))
(v1-1 (when gp-0
(let ((t9-1 (method-of-type camera-tracker activate)))
(t9-1
(the-as camera-tracker gp-0)
self
'camera-tracker
(the-as pointer #x70004000)
)
)
((the-as
(function object object object object)
run-function-in-process
)
gp-0
camera-tracker-init
(lambda :behavior camera-tracker
()
(while (not (process-grab? *target*))
(suspend)
)
(camera-change-to "camera-160" 150 #f)
(let ((gp-0 (-> *display* base-frame-counter)))
(until (begin
(suspend)
(>=
(the-as
int
(- (-> *display* base-frame-counter) gp-0)
)
900
)
)
(empty)
)
)
(while
(not
(process-release? (handle->process (-> self grab-target)))
)
(suspend)
)
(camera-change-to (the-as string 'base) 150 #f)
(none)
)
)
(-> gp-0 ppointer)
)
)
(v0-3
(logior (shl (-> v1-1 0 pid) 32) (new 'static 'handle :process v1-1))
)
)
(set! (-> self cam-tracker) (the-as uint v0-3))
v0-3
)
)
;; failed to figure out what this is:
(let
((v1-4
(new 'static 'state
:name 'silostep-camera
:next #f
:exit #f
:code #f
:trans #f
:post #f
:enter #f
:event #f
)
)
)
(set! silostep-camera (the-as (state none) v1-4))
(set!
(-> v1-4 code)
(lambda :behavior silostep
()
(misty-camera-view)
(let* ((gp-0 (get-task-control (game-task misty-warehouse)))
(v1-1 (get-reminder gp-0 0))
)
(save-reminder gp-0 (logior v1-1 2) 0)
)
(set! (-> self state-time) (-> *display* base-frame-counter))
(let ((gp-1 (-> *display* base-frame-counter)))
(until (begin
(suspend)
(>= (the-as int (- (-> *display* base-frame-counter) gp-1)) 300)
)
(empty)
)
)
(sound-play-by-name
(static-sound-name "arena-steps")
(new-sound-id)
1024
0
0
(the-as uint 1)
(the-as vector #t)
)
(send-to-all-after (-> self link) 'trigger-rise)
enter-state
(go silostep-rise)
(none)
)
)
(set! (-> v1-4 post) ja-post)
)
;; failed to figure out what this is:
(let
((v1-5
(new 'static 'state
:name 'silostep-rise
:next #f
:exit #f
:code #f
:trans #f
:post #f
:enter #f
:event #f
)
)
)
(set! silostep-rise (the-as (state none) v1-5))
(set!
(-> v1-5 code)
(lambda :behavior silostep
((arg0 symbol))
(process-entity-status! self (entity-perm-status complete) #t)
(when (not arg0)
(let ((a0-2 (-> self skel root-channel 0)))
(set!
(-> a0-2 frame-group)
(the-as art-joint-anim (-> self draw art-group data 2))
)
(set! (-> a0-2 param 0) (-> self anim-limit))
(set! (-> a0-2 param 1) 1.0)
(set! (-> a0-2 frame-num) 0.0)
(joint-control-channel-group!
a0-2
(the-as art-joint-anim (-> self draw art-group data 2))
num-func-seek!
)
)
(until (begin
(rider-trans)
(rider-post)
(suspend)
(let ((a0-3 (-> self skel root-channel 0)))
(set! (-> a0-3 param 0) (-> self anim-limit))
(set! (-> a0-3 param 1) 1.0)
(joint-control-channel-group-eval!
a0-3
(the-as art-joint-anim #f)
num-func-seek!
)
)
(ja-done? 0)
)
(empty)
)
)
(let ((gp-1 (-> self skel root-channel 0)))
(joint-control-channel-group-eval!
gp-1
(the-as art-joint-anim (-> self draw art-group data 2))
num-func-identity
)
(set! (-> gp-1 frame-num) (-> self anim-limit))
)
(rider-post)
(while #t
(ja-post)
(suspend)
)
(none)
)
)
(set! (-> v1-5 post) #f)
)
;; definition for method 11 of type silostep
(defmethod copy-defaults! silostep ((obj silostep) (arg0 res-lump))
(logior! (-> obj mask) (process-mask movie-subject))
(let
((s4-0
(new 'process 'collide-shape-moving obj (collide-list-enum hit-by-player))
)
)
(set! (-> s4-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s4-0 reaction) default-collision-reaction)
(set! (-> s4-0 no-reaction) nothing)
(let ((t9-2 (method-of-object s4-0 dummy-29)))
1
(t9-2)
)
(let
((s3-0
(new
'process
'collide-shape-prim-mesh
s4-0
(the-as uint 0)
(the-as uint 0)
)
)
)
(set! (-> s3-0 prim-core collide-as) (the-as uint 2048))
(set! (-> s3-0 collide-with) (the-as uint 16))
(set! (-> s3-0 prim-core action) (the-as uint 1))
(set! (-> s3-0 prim-core offense) 4)
(set! (-> s3-0 transform-index) 4)
(set-vector! (-> s3-0 local-sphere) 0.0 4096.0 0.0 18432.0)
)
((method-of-object s4-0 dummy-46))
(set! (-> s4-0 nav-radius) (* 0.75 (-> s4-0 root-prim local-sphere w)))
((method-of-object s4-0 dummy-50))
(set! (-> obj root) s4-0)
)
(process-drawable-from-entity! obj arg0)
(dummy-14 obj *silostep-sg* '())
(set!
(-> obj anim-limit)
(*
(get-property-value-float
arg0
'distance
'interp
-1000000000.0
1.0
(the-as (pointer res-tag) #f)
*res-static-buf*
)
(the
float
(+
(-> (the-as art-joint-anim (-> obj draw art-group data 2)) data 0 length)
-1
)
)
)
)
(set! (-> obj link) (new 'process 'actor-link-info obj))
(cond
((and
(-> obj entity)
(nonzero?
(logand (-> obj entity extra perm status) (entity-perm-status complete))
)
)
enter-state
#t
(go silostep-rise)
)
(else
(go silostep-idle)
)
)
(none)
)
;; failed to figure out what this is:
(let
((v1-6
(new 'static 'skeleton-group
:art-group-name "rounddoor"
:bounds (new 'static 'vector :w 32768.0)
:max-lod 1
:version #x6
)
)
)
(set! (-> v1-6 jgeo) 0)
(set! (-> v1-6 janim) 3)
(set! (-> v1-6 mgeo 0) (the-as uint 1))
(set! (-> v1-6 lod-dist 0) 81920.0)
(set! (-> v1-6 mgeo 1) (the-as uint 2))
(set! (-> v1-6 lod-dist 1) 4095996000.0)
(set! *rounddoor-sg* v1-6)
)
;; definition of type rounddoor
(deftype rounddoor (eco-door)
()
:heap-base #xa0
:method-count-assert 27
:size-assert #x104
:flag-assert #x1b00a00104
)
;; definition for method 3 of type rounddoor
(defmethod inspect rounddoor ((obj rounddoor))
(let ((t9-0 (method-of-type eco-door inspect)))
(t9-0 obj)
)
obj
)
;; definition for method 24 of type rounddoor
;; INFO: Return type mismatch int vs none.
(defmethod TODO-RENAME-24 rounddoor ((obj rounddoor))
(let
((s5-0 (new 'process 'collide-shape obj (collide-list-enum hit-by-others))))
(let
((s4-0
(new
'process
'collide-shape-prim-mesh
s5-0
(the-as uint 0)
(the-as uint 0)
)
)
)
(set! (-> s4-0 prim-core collide-as) (the-as uint 2048))
(set! (-> s4-0 collide-with) (the-as uint 16))
(set! (-> s4-0 prim-core action) (the-as uint 1))
(set! (-> s4-0 prim-core offense) 4)
(set! (-> s4-0 transform-index) 0)
(set-vector! (-> s4-0 local-sphere) -12288.0 0.0 0.0 40960.0)
)
((method-of-object s5-0 dummy-46))
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
((method-of-object s5-0 dummy-50))
(set! (-> obj root-override) s5-0)
)
0
(none)
)
;; definition for method 25 of type rounddoor
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defmethod TODO-RENAME-25 rounddoor ((obj rounddoor))
(dummy-14 obj *rounddoor-sg* '())
(set! (-> obj open-distance) 69632.0)
(set! (-> obj close-distance) 81920.0)
(set!
(-> obj open-sound)
(the-as
uint128
(make-u128 (the-as uint #x6e65706f2d72) (the-as uint #x6f6f64616e657261))
)
)
(set!
(-> obj close-sound)
(the-as
uint128
(make-u128 (the-as uint #x65736f6c632d72) (the-as uint #x6f6f64616e657261))
)
)
(set! (-> obj speed) 1.5)
(set! (-> obj auto-close) #t)
(set! (-> obj one-way) #t)
(vector-x-quaternion! (-> obj out-dir) (-> obj root-override quat))
(set!
(-> obj out-dir w)
(- 8192.0 (vector-dot (-> obj out-dir) (-> obj root-override trans)))
)
(dummy-47 (-> obj root-override))
0
(none)
)
+112
View File
@@ -0,0 +1,112 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type mud
(deftype mud (water-anim)
()
:heap-base #x70
:method-count-assert 30
:size-assert #xdc
:flag-assert #x1e007000dc
)
;; definition for method 3 of type mud
(defmethod inspect mud ((obj mud))
(let ((t9-0 (method-of-type water-anim inspect)))
(t9-0 obj)
)
obj
)
;; definition for symbol ripple-for-mud, type ripple-wave-set
(define
ripple-for-mud
(new 'static 'ripple-wave-set
:count 3
:converted #f
:normal-scale 1.0
:wave
(new 'static 'inline-array ripple-wave 4
(new 'static 'ripple-wave :scale 40.0 :xdiv 1 :speed 1.5)
(new 'static 'ripple-wave :scale 40.0 :xdiv -1 :zdiv 1 :speed 1.5)
(new 'static 'ripple-wave :scale 20.0 :xdiv 5 :zdiv 3 :speed 0.75)
(new 'static 'ripple-wave)
)
)
)
;; definition for symbol ripple-for-small-mud, type ripple-wave-set
(define
ripple-for-small-mud
(new 'static 'ripple-wave-set
:count 3
:converted #f
:normal-scale 1.0
:wave
(new 'static 'inline-array ripple-wave 4
(new 'static 'ripple-wave :scale 20.0 :xdiv 2 :speed 0.5)
(new 'static 'ripple-wave :scale 20.0 :xdiv -2 :zdiv 2 :speed 0.5)
(new 'static 'ripple-wave :scale 20.0 :xdiv 5 :zdiv 3 :speed 0.75)
(new 'static 'ripple-wave)
)
)
)
;; definition for method 22 of type mud
(defmethod TODO-RENAME-22 mud ((obj mud))
(let ((t9-0 (method-of-type water-anim TODO-RENAME-22)))
(t9-0 obj)
)
(set! (-> obj flags) (logand -8388609 (-> obj flags)))
(set! (-> obj flags) (logior #x40000 (-> obj flags)))
(let ((gp-0 (new 'process 'ripple-control)))
(set! (-> obj draw ripple) gp-0)
(set! (-> gp-0 global-scale) 3072.0)
(set! (-> gp-0 waveform) ripple-for-mud)
(let
((v1-9
(the-as
object
((method-of-type res-lump get-property-data)
(-> obj entity)
'water-anim-fade-dist
'interp
-1000000000.0
(the-as pointer #f)
(the-as (pointer res-tag) #f)
*res-static-buf*
)
)
)
)
(when (the-as pointer v1-9)
(set!
(-> gp-0 close-fade-dist)
(-> (the-as ripple-control v1-9) global-scale)
)
(set!
(-> gp-0 far-fade-dist)
(-> (the-as ripple-control v1-9) last-frame-scale)
)
)
)
(case (-> obj look)
((21 25 29)
(set! (-> gp-0 close-fade-dist) 4096000000.0)
(set! (-> gp-0 far-fade-dist) 8192000000.0)
)
)
(case (-> obj look)
((22 25 24 27 26 31)
(let ((v0-3 ripple-for-small-mud))
(set! (-> gp-0 waveform) v0-3)
v0-3
)
)
)
)
)

Some files were not shown because too many files have changed in this diff Show More