mirror of
https://github.com/open-goal/jak-project
synced 2026-08-21 23:00:45 -04:00
[decomp] loader prelim work + some cleanup (#697)
* [decomp] `loader` prelim work + some cleanup * more things * more * even more * yet even more * minor fixes * decompiler fix + use behaviors for two funcs * last functions * Create loader_REF.gc * more work * change vag tool config format + unrelated farmer and yakow stuff * update some things * fix some decomp * cleanup things i came across + make dgo compileable * fix consistency test * update refs * offline test: skip buggy `external-art-buffer` method * fix test
This commit is contained in:
@@ -82,6 +82,13 @@
|
||||
"projectTarget" : "memory_dump_tool.exe (bin\\memory_dump_tool.exe)",
|
||||
"name" : "Run - EE Memory Analyze",
|
||||
"args" : [ "${workspaceRoot}/eeMemory.bin", "${workspaceRoot}"]
|
||||
},
|
||||
{
|
||||
"type" : "default",
|
||||
"project" : "CMakeLists.txt",
|
||||
"projectTarget" : "dgo_unpacker.exe (bin\\dgo_unpacker.exe)",
|
||||
"name" : "Run - DGO Unpacker (test)",
|
||||
"args" : [ "C:\\GameData\\Jak1\\Backup\\DGO-PAL\\GAME", "C:\\GameData\\Jak1\\Backup\\DISC-PAL\\CGO\\GAME.CGO"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -58,4 +58,4 @@ std::string DgoReader::description_as_json() const {
|
||||
}
|
||||
|
||||
return j.dump(4);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ struct StackInstrInfo {
|
||||
constexpr StackInstrInfo stack_instrs[] = {{InstructionKind::SQ, false, 16, false},
|
||||
{InstructionKind::LQ, true, 16, false},
|
||||
{InstructionKind::SW, false, 4, false},
|
||||
{InstructionKind::SH, false, 2, false},
|
||||
{InstructionKind::SB, false, 1, false},
|
||||
{InstructionKind::LBU, true, 1, false},
|
||||
//{InstructionKind::LWU, true, 4, false}
|
||||
@@ -111,4 +112,4 @@ StackSpillMap build_spill_map(const std::vector<Instruction>& instructions, Rang
|
||||
map.finalize();
|
||||
return map;
|
||||
}
|
||||
} // namespace decompiler
|
||||
} // namespace decompiler
|
||||
|
||||
@@ -15,7 +15,8 @@ TypeState construct_initial_typestate(const TypeSpec& f_ts, const Env& env) {
|
||||
}
|
||||
|
||||
// todo, more specific process types for behaviors.
|
||||
result.get(Register(Reg::GPR, Reg::S6)) = TP_Type::make_from_ts(TypeSpec("process"));
|
||||
result.get(Register(Reg::GPR, Reg::S6)) =
|
||||
TP_Type::make_from_ts(TypeSpec(f_ts.try_get_tag("behavior").value_or("process")));
|
||||
|
||||
// initialize stack slots as uninitialized
|
||||
for (auto slot_info : env.stack_spills().map()) {
|
||||
|
||||
+382
-423
File diff suppressed because it is too large
Load Diff
@@ -241,9 +241,6 @@
|
||||
"sp-process-block-2d",
|
||||
"sp-get-particle",
|
||||
|
||||
// loader BUG
|
||||
"(method 10 external-art-buffer)",
|
||||
|
||||
// game-info BUG
|
||||
"(method 11 fact-info-target)",
|
||||
|
||||
@@ -469,7 +466,9 @@
|
||||
"debug-menu-send-msg",
|
||||
"debug-menu-find-from-template",
|
||||
"build-continue-menu",
|
||||
"(method 8 process-tree)"
|
||||
"(method 8 process-tree)",
|
||||
"(method 16 load-state)",
|
||||
"(method 15 load-state)"
|
||||
],
|
||||
|
||||
// If format is used with the wrong number of arguments,
|
||||
@@ -495,7 +494,8 @@
|
||||
" pris-anim ~192H~5DK ~280Hpris-generic~456H~5DK~%": 2,
|
||||
" textures ~192H~5DK ~280Htextures~456H~5DK~%": 2,
|
||||
" entity ~192H~5DK~%": 2,
|
||||
" misc ~192H~5DK ~280Hsprite~456H~5DK~%": 2
|
||||
" misc ~192H~5DK ~280Hsprite~456H~5DK~%": 2,
|
||||
"ERROR: <asg> ~A in spool anim loop for ~A ~D, but not loaded.~": 3
|
||||
},
|
||||
|
||||
"blocks_ending_in_asm_branch": {
|
||||
|
||||
@@ -259,15 +259,10 @@
|
||||
],
|
||||
|
||||
// uncomment the next line to extract audio to wave files.
|
||||
//"audio_dir_file_name": "VAG/VAGDIR.AYB",
|
||||
"audio_dir_file_name" : "",
|
||||
//"audio_dir_file_name": "jak1/VAG",
|
||||
"audio_dir_file_name": "",
|
||||
|
||||
"streamed_audio_file_names": [
|
||||
"VAG/VAGWAD.ENG",
|
||||
"VAG/VAGWAD.FRE",
|
||||
"VAG/VAGWAD.GER",
|
||||
"VAG/VAGWAD.ITA",
|
||||
"VAG/VAGWAD.JAP",
|
||||
"VAG/VAGWAD.SPA"
|
||||
"VAGWAD.ENG"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -609,7 +609,11 @@
|
||||
["L255", "float", true]
|
||||
],
|
||||
|
||||
"load-boundary": [["L327", "(inline-array lbvtx)", true, 3]],
|
||||
"load-boundary": [
|
||||
["L327", "(inline-array lbvtx)", true, 3],
|
||||
["L336", "float", true],
|
||||
["L337", "float", true]
|
||||
],
|
||||
|
||||
"shrub-work": [["L3", "instance-shrub-work", true]],
|
||||
|
||||
@@ -1197,6 +1201,35 @@
|
||||
["L78", "rgba", true],
|
||||
["L79", "rgba", true]
|
||||
],
|
||||
|
||||
"loader": [
|
||||
["L279", "float", true],
|
||||
["L283", "float", true],
|
||||
["L285", "float", true],
|
||||
["L286", "float", true],
|
||||
["L280", "float", true],
|
||||
["L281", "float", true],
|
||||
["L278", "float", true]
|
||||
],
|
||||
|
||||
"yakow": [
|
||||
["L150", "float", true],
|
||||
["L162", "float", true],
|
||||
["L160", "float", true],
|
||||
["L155", "float", true],
|
||||
["L163", "float", true],
|
||||
["L159", "float", true],
|
||||
["L154", "float", true],
|
||||
["L153", "float", true],
|
||||
["L169", "float", true],
|
||||
["L161", "float", true],
|
||||
["L152", "float", true],
|
||||
["L149", "float", true]
|
||||
],
|
||||
|
||||
"farmer": [
|
||||
["L50", "float", true]
|
||||
],
|
||||
|
||||
// please do not add things after this entry! git is dumb.
|
||||
"object-file-that-doesnt-actually-exist-and-i-just-put-this-here-to-prevent-merge-conflicts-with-this-file": []
|
||||
|
||||
@@ -543,5 +543,23 @@
|
||||
|
||||
"(method 10 align-control)": [[16, "vector"]],
|
||||
|
||||
"(method 15 load-state)": [
|
||||
[16, "event-message-block"],
|
||||
[96, "event-message-block"]
|
||||
],
|
||||
|
||||
"(method 43 farmer)": [
|
||||
[16, "vector"]
|
||||
],
|
||||
|
||||
"yakow-post": [
|
||||
[16, "vector"],
|
||||
[32, "vector"],
|
||||
[48, "vector"],
|
||||
[64, "vector"],
|
||||
[80, "vector"],
|
||||
[96, "vector"]
|
||||
],
|
||||
|
||||
"placeholder-do-not-add-below!": []
|
||||
}
|
||||
|
||||
@@ -1082,6 +1082,71 @@
|
||||
[196, "s4", "pointer"],
|
||||
[[203, 210], "s4", "game-save-tag"]
|
||||
],
|
||||
|
||||
"drawable-load": [
|
||||
[17, "s5", "drawable"],
|
||||
[18, "s5", "drawable"],
|
||||
[20, "s5", "drawable"],
|
||||
[25, "s5", "drawable"],
|
||||
[27, "s5", "drawable"]
|
||||
],
|
||||
"art-load": [
|
||||
[9, "s5", "art"],
|
||||
[13, "s5", "art"],
|
||||
[15, "s5", "art"]
|
||||
],
|
||||
"art-group-load-check": [
|
||||
[22, "s3", "art-group"],
|
||||
[31, "s3", "art-group"],
|
||||
[43, "s3", "art-group"],
|
||||
[50, "s3", "art-group"],
|
||||
[52, "s3", "art-group"]
|
||||
],
|
||||
"(method 13 art-group)": [[16, "s3", "art-joint-anim"]],
|
||||
"(method 14 art-group)": [[16, "s3", "art-joint-anim"]],
|
||||
|
||||
"(method 9 external-art-control)": [
|
||||
[171, "s4", "external-art-buffer"],
|
||||
[172, "s4", "external-art-buffer"],
|
||||
[173, "s4", "external-art-buffer"],
|
||||
[177, "s4", "external-art-buffer"],
|
||||
[183, "s4", "external-art-buffer"],
|
||||
[190, "s4", "external-art-buffer"],
|
||||
|
||||
[233, "s4", "spool-anim"],
|
||||
[240, "s4", "spool-anim"],
|
||||
[243, "s4", "spool-anim"],
|
||||
[248, "s4", "spool-anim"],
|
||||
[249, "s4", "spool-anim"],
|
||||
[253, "s4", "spool-anim"],
|
||||
[257, "s4", "spool-anim"]
|
||||
],
|
||||
|
||||
"(method 10 external-art-control)": [
|
||||
[18, "v1", "spool-anim"]
|
||||
],
|
||||
|
||||
"(method 16 external-art-control)": [
|
||||
[37, "a0", "process"],
|
||||
[17, "s5", "process-drawable"]
|
||||
],
|
||||
|
||||
"ja-play-spooled-anim": [
|
||||
[154, "a0", "process"],
|
||||
[286, "s2", "art-joint-anim"],
|
||||
[294, "s2", "art-joint-anim"],
|
||||
[295, "s2", "art-joint-anim"],
|
||||
[306, "s2", "art-joint-anim"],
|
||||
[320, "s2", "art-joint-anim"],
|
||||
[324, "s2", "art-joint-anim"]
|
||||
],
|
||||
|
||||
"(method 11 external-art-control)": [
|
||||
[127, "a0", "process"],
|
||||
[151, "a0", "process"],
|
||||
[168, "a0", "process"],
|
||||
[18, "s5", "process-drawable"]
|
||||
],
|
||||
|
||||
"debug-menu-item-var-update-display-str": [
|
||||
[[44, 49], "v1", "int"],
|
||||
@@ -1179,6 +1244,28 @@
|
||||
"blackout": [[[20, 24], "v1", "dma-packet"]],
|
||||
|
||||
"(method 10 external-art-control)": [[18, "v1", "pointer"]],
|
||||
|
||||
"(method 15 load-state)": [
|
||||
[31, "t9", "(function int)"],
|
||||
[291, "s5", "entity-actor"],
|
||||
[370, "s3", "process-drawable"]
|
||||
],
|
||||
|
||||
"yakow-default-event-handler": [
|
||||
[27, "a0", "collide-shape"],
|
||||
[32, "a0", "collide-shape"]
|
||||
],
|
||||
|
||||
"(method 11 yakow)": [
|
||||
[184, "v1", "vector"],
|
||||
[186, "v1", "vector"],
|
||||
[189, "v1", "vector"]
|
||||
],
|
||||
|
||||
"yakow-post": [
|
||||
[114, "a0", "collide-shape-moving"],
|
||||
[130, "a0", "collide-shape-moving"]
|
||||
],
|
||||
|
||||
"placeholder-do-not-add-below": []
|
||||
}
|
||||
|
||||
@@ -2392,6 +2392,24 @@
|
||||
}
|
||||
},
|
||||
|
||||
"(method 13 art-group)": {
|
||||
"vars":{
|
||||
"s3-0":"art-elt",
|
||||
"s4-0":"janim",
|
||||
"v1-9":"janim-group",
|
||||
"s2-0":"success"
|
||||
}
|
||||
},
|
||||
|
||||
"(method 14 art-group)": {
|
||||
"vars":{
|
||||
"s3-0":"art-elt",
|
||||
"s4-0":"janim",
|
||||
"v1-9":"janim-group",
|
||||
"s3-1":"success"
|
||||
}
|
||||
},
|
||||
|
||||
"(method 16 process-drawable)" : {
|
||||
"vars": {
|
||||
"s3-0":"body-T-world",
|
||||
@@ -2411,5 +2429,15 @@
|
||||
"f0-6":"abs-vel-limit",
|
||||
"f0-10":"dpos"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ja-play-spooled-anim" : {
|
||||
"vars": {
|
||||
"sv-16":"spool-part",
|
||||
"sv-28":"old-skel-status",
|
||||
"sv-64":"spool-sound"
|
||||
}
|
||||
},
|
||||
|
||||
"aaaaaaaaaaaaaaaaaaaaaaa" : {}
|
||||
}
|
||||
|
||||
@@ -181,9 +181,10 @@ AudioFileInfo process_audio_file(const std::vector<u8>& data,
|
||||
}
|
||||
|
||||
void process_streamed_audio(const std::string& dir, const std::vector<std::string>& audio_files) {
|
||||
lg::info("Streaming audio: {}\n", dir);
|
||||
auto dir_file_name = file_util::combine_path(dir, "VAGDIR.AYB");
|
||||
lg::info("Streaming audio: {}\n", dir_file_name);
|
||||
file_util::create_dir_if_needed(file_util::get_file_path({"assets", "streaming_audio"}));
|
||||
auto dir_data = read_audio_dir(file_util::get_file_path({"iso_data", dir}));
|
||||
auto dir_data = read_audio_dir(file_util::get_file_path({"iso_data", dir_file_name}));
|
||||
double audio_len = 0.f;
|
||||
|
||||
std::vector<std::string> langs;
|
||||
@@ -198,7 +199,7 @@ void process_streamed_audio(const std::string& dir, const std::vector<std::strin
|
||||
|
||||
for (size_t lang_id = 0; lang_id < audio_files.size(); lang_id++) {
|
||||
auto& file = audio_files[lang_id];
|
||||
auto wad_data = file_util::read_binary_file(file_util::get_file_path({"iso_data", file}));
|
||||
auto wad_data = file_util::read_binary_file(file_util::get_file_path({"iso_data", dir, file}));
|
||||
auto suffix = std::filesystem::path(file).extension().u8string().substr(1);
|
||||
langs.push_back(suffix);
|
||||
dir_data.set_file_size(wad_data.size());
|
||||
|
||||
@@ -293,7 +293,7 @@
|
||||
(pat-ignore-mask pat-surface :offset-assert 148)
|
||||
(event-self basic :offset-assert 152)
|
||||
(event-other basic :offset-assert 156)
|
||||
(root-prim basic :offset-assert 160)
|
||||
(root-prim collide-shape-prim :offset-assert 160)
|
||||
(riders basic :offset-assert 164)
|
||||
(backup-collide-as uint64 :offset-assert 168)
|
||||
(backup-collide-with uint64 :offset-assert 176)
|
||||
|
||||
@@ -179,8 +179,8 @@
|
||||
:size-assert #x20
|
||||
:flag-assert #xf00000020
|
||||
(:methods
|
||||
(dummy-13 (_type_) int 13)
|
||||
(dummy-14 (_type_) int 14)
|
||||
(link-art! (_type_) art-group 13)
|
||||
(unlink-art! (_type_) int 14)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -157,3 +157,5 @@
|
||||
(defmacro mem-usage-id-int (kind)
|
||||
`(the int (mem-usage-id ,kind))
|
||||
)
|
||||
|
||||
(defun-extern mem-size basic symbol int int)
|
||||
|
||||
@@ -5,3 +5,65 @@
|
||||
;; name in dgo: memory-usage
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
(when *debug-segment*
|
||||
|
||||
(defmethod inspect memory-usage-block ((obj memory-usage-block))
|
||||
(format #t "-------------------------------------------------------------~%")
|
||||
(format #t " # name count bytes used aligned bytes~%")
|
||||
(format #t "-------------------------------------------------------------~%")
|
||||
(let ((s5-0 0)
|
||||
(s4-0 0)
|
||||
)
|
||||
(dotimes (s3-0 (-> obj length))
|
||||
(let ((v1-2 (-> obj data s3-0)))
|
||||
(+! s5-0 (-> v1-2 used))
|
||||
(+! s4-0 (-> v1-2 total))
|
||||
(format #t "~3D: ~20S ~7D ~8D ~8D~%" s3-0 (-> v1-2 name) (-> v1-2 count) (-> v1-2 used) (-> v1-2 total))
|
||||
)
|
||||
)
|
||||
(format #t "total: ~8D ~8D~%" s5-0 s4-0)
|
||||
)
|
||||
(format #t "-------------------------------------------------------------~%")
|
||||
obj
|
||||
)
|
||||
|
||||
(defmethod mem-usage object ((obj object) (arg0 memory-usage-block) (arg1 int))
|
||||
(if obj
|
||||
(format #t "WARNING: mem-usage called on object, probably not what was wanted for ~A~%" obj)
|
||||
)
|
||||
obj
|
||||
)
|
||||
|
||||
(defmethod calculate-total memory-usage-block ((obj memory-usage-block))
|
||||
(let ((v0-0 0))
|
||||
(dotimes (v1-0 (-> obj length))
|
||||
(+! v0-0 (-> obj data v1-0 total))
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod reset! memory-usage-block ((obj memory-usage-block))
|
||||
(set! (-> obj length) 0)
|
||||
(dotimes (v1-0 109)
|
||||
(set! (-> obj data v1-0 used) 0)
|
||||
(set! (-> obj data v1-0 total) 0)
|
||||
(set! (-> obj data v1-0 count) 0)
|
||||
)
|
||||
obj
|
||||
)
|
||||
|
||||
(defun mem-size ((arg0 basic) (arg1 symbol) (arg2 int))
|
||||
(let ((gp-0 (new 'stack 'memory-usage-block)))
|
||||
(mem-usage arg0 gp-0 arg2)
|
||||
(if arg1
|
||||
(inspect gp-0)
|
||||
)
|
||||
(calculate-total gp-0)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -42,12 +42,12 @@
|
||||
;; The following functions can be applied to a joint-control-channel to change the frame number.
|
||||
;; They return the resulting frame number as well.
|
||||
|
||||
(defun num-func-none ((arg0 joint-control-channel))
|
||||
(defun num-func-none ((arg0 joint-control-channel) (arg2 float) (arg2 float))
|
||||
"Don't change anything."
|
||||
(-> arg0 frame-num)
|
||||
)
|
||||
|
||||
(defun num-func-+! ((arg0 joint-control-channel) (arg1 float))
|
||||
(defun num-func-+! ((arg0 joint-control-channel) (arg1 float) (arg2 float))
|
||||
"Increment the frame number, taking into account the animation speed and current game rate."
|
||||
(let ((f0-1
|
||||
(+ (-> arg0 frame-num)
|
||||
@@ -60,7 +60,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defun num-func--! ((arg0 joint-control-channel) (arg1 float))
|
||||
(defun num-func--! ((arg0 joint-control-channel) (arg1 float) (arg2 float))
|
||||
"Decrement the frame number, taking into account the animation speed and current game rate."
|
||||
(let ((f0-1
|
||||
(- (-> arg0 frame-num)
|
||||
@@ -73,7 +73,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defun num-func-loop! ((chan joint-control-channel) (inc float))
|
||||
(defun num-func-loop! ((chan joint-control-channel) (inc float) (arg2 float))
|
||||
"Like num-func-+!, but will wrap to 0 after going past the end."
|
||||
|
||||
;; get the duration from the joint-animation-compressed.
|
||||
@@ -107,7 +107,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defun num-func-blend-in! ((arg0 joint-control-channel) (arg1 float))
|
||||
(defun num-func-blend-in! ((arg0 joint-control-channel) (arg1 float) (arg2 float))
|
||||
"Seek frame-interp toward 1. Once its there, do a joint-control-reset."
|
||||
(let* ((v0-0 (seek (-> arg0 frame-interp) 1.0 (* arg1 (-> *display* time-adjust-ratio))))
|
||||
(f30-0 (the-as float v0-0))
|
||||
@@ -121,7 +121,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defun num-func-chan ((arg0 joint-control-channel) (arg1 float))
|
||||
(defun num-func-chan ((arg0 joint-control-channel) (arg1 float) (arg2 float))
|
||||
"Copies the frame number from the channel arg1."
|
||||
;; this is a super hack.
|
||||
;; we know that we're in an inline-array of joint-control-channels
|
||||
@@ -143,7 +143,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defun num-func-identity ((arg0 joint-control-channel))
|
||||
(defun num-func-identity ((arg0 joint-control-channel) (arg1 float) (arg2 float))
|
||||
"seems to be the same thing as none."
|
||||
(-> arg0 frame-num)
|
||||
)
|
||||
|
||||
@@ -89,25 +89,25 @@
|
||||
:size-assert #x10
|
||||
:flag-assert #x1a00000010
|
||||
(:methods
|
||||
(new (symbol type process) _type_ 0)
|
||||
(get-matching-actor-type-mask (_type_ type) int 9)
|
||||
(actor-count-before (_type_) int 10)
|
||||
(link (_type_) entity-actor 11)
|
||||
(get-next (_type_) entity-actor 12)
|
||||
(get-prev (_type_) entity-actor 13)
|
||||
(get-next-process (_type_) process 14)
|
||||
(get-prev-process (_type_) process 15)
|
||||
(apply-function-forward (_type_ (function entity-actor object object) object) int 16)
|
||||
(apply-function-reverse (_type_ (function entity-actor object object) object) int 17)
|
||||
(apply-all (_type_ (function entity-actor object object) object) int 18)
|
||||
(send-to-all (_type_ object) none 19)
|
||||
(send-to-all-after (_type_ object) object 20)
|
||||
(send-to-all-before (_type_ object) object 21)
|
||||
(send-to-next-and-prev (_type_ object) none 22)
|
||||
(send-to-next (_type_ object) none 23)
|
||||
(send-to-prev (_type_ object) none 24)
|
||||
(actor-count (_type_) int 25)
|
||||
)
|
||||
(new (symbol type process) _type_ 0)
|
||||
(get-matching-actor-type-mask (_type_ type) int 9)
|
||||
(actor-count-before (_type_) int 10)
|
||||
(link (_type_) entity-actor 11)
|
||||
(get-next (_type_) entity-actor 12)
|
||||
(get-prev (_type_) entity-actor 13)
|
||||
(get-next-process (_type_) process 14)
|
||||
(get-prev-process (_type_) process 15)
|
||||
(apply-function-forward (_type_ (function entity-actor object object) object) int 16)
|
||||
(apply-function-reverse (_type_ (function entity-actor object object) object) int 17)
|
||||
(apply-all (_type_ (function entity-actor object object) object) int 18)
|
||||
(send-to-all (_type_ symbol) none 19)
|
||||
(send-to-all-after (_type_ symbol) object 20)
|
||||
(send-to-all-before (_type_ symbol) object 21)
|
||||
(send-to-next-and-prev (_type_ symbol) none 22)
|
||||
(send-to-next (_type_ symbol) none 23)
|
||||
(send-to-prev (_type_ symbol) none 24)
|
||||
(actor-count (_type_) int 25)
|
||||
)
|
||||
)
|
||||
|
||||
;;;;;;;;;;;;;;;;
|
||||
@@ -244,76 +244,51 @@
|
||||
0
|
||||
)
|
||||
|
||||
;; method 20
|
||||
(defmethod send-to-all-after actor-link-info ((obj actor-link-info) (message object))
|
||||
(with-pp
|
||||
(let ((iter (-> obj next))
|
||||
(result (the object #f)))
|
||||
(while iter
|
||||
(let ((proc (-> (the entity-links (-> iter extra)) process)))
|
||||
(when proc
|
||||
(let ((msg-block (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> msg-block from) pp)
|
||||
(set! (-> msg-block num-params) 0)
|
||||
(set! (-> msg-block message) (the basic message))
|
||||
(defmethod send-to-all-after actor-link-info ((obj actor-link-info) (message symbol))
|
||||
"Send an event to all processes after this link with no parameters."
|
||||
|
||||
(let ((send-result (send-event-function (the process proc) msg-block)))
|
||||
(set! result (and result send-result))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! iter (entity-actor-lookup iter 'next-actor 0))
|
||||
(let ((iter (-> obj next))
|
||||
(result (the object #f)))
|
||||
(while iter
|
||||
(let ((proc (-> (the entity-links (-> iter extra)) process)))
|
||||
(when proc
|
||||
(set! result (and result (send-event proc message)))
|
||||
)
|
||||
(set! iter (entity-actor-lookup iter 'next-actor 0))
|
||||
)
|
||||
result
|
||||
)
|
||||
result
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod send-to-all-before actor-link-info ((obj actor-link-info) (message object))
|
||||
(with-pp
|
||||
(let ((iter (-> obj prev))
|
||||
(result (the object #f)))
|
||||
(while iter
|
||||
(let ((proc (-> (the entity-links (-> iter extra)) process)))
|
||||
(when proc
|
||||
(let ((msg-block (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> msg-block from) pp)
|
||||
(set! (-> msg-block num-params) 0)
|
||||
(set! (-> msg-block message) (the basic message))
|
||||
(defmethod send-to-all-before actor-link-info ((obj actor-link-info) (message symbol))
|
||||
"Send an event to all processes before this link with no parameters."
|
||||
|
||||
(let ((send-result (send-event-function (the process proc) msg-block)))
|
||||
(set! result (and result send-result))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! iter (entity-actor-lookup iter 'prev-actor 0))
|
||||
(let ((iter (-> obj prev))
|
||||
(result (the object #f)))
|
||||
(while iter
|
||||
(let ((proc (-> (the entity-links (-> iter extra)) process)))
|
||||
(when proc
|
||||
(set! result (and result (send-event proc message)))
|
||||
)
|
||||
(set! iter (entity-actor-lookup iter 'prev-actor 0))
|
||||
)
|
||||
result
|
||||
)
|
||||
result
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod send-to-next actor-link-info ((obj actor-link-info) (arg0 object))
|
||||
(defmethod send-to-next actor-link-info ((obj actor-link-info) (message symbol))
|
||||
"Send event arg0 to the next actor's process"
|
||||
(with-pp
|
||||
(let ((a0-1 (-> obj next)))
|
||||
;; do we have a next?
|
||||
(when a0-1
|
||||
;; get the actual process
|
||||
(let ((a0-2 (-> (the-as entity-links (-> a0-1 extra)) process)))
|
||||
;; do we have a process?
|
||||
(when a0-2
|
||||
;; create a block on the stack
|
||||
(let ((v1-4 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-4 from) pp)
|
||||
(set! (-> v1-4 num-params) 0)
|
||||
(set! (-> v1-4 message) (the-as basic arg0))
|
||||
;; and send it!
|
||||
(send-event-function (the process a0-2) v1-4)
|
||||
)
|
||||
)
|
||||
|
||||
(let ((a0-1 (-> obj next)))
|
||||
;; do we have a next?
|
||||
(when a0-1
|
||||
;; get the actual process
|
||||
(let ((a0-2 (-> (the-as entity-links (-> a0-1 extra)) process)))
|
||||
;; do we have a process?
|
||||
(when a0-2
|
||||
(send-event a0-2 message)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -321,20 +296,14 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod send-to-prev actor-link-info ((obj actor-link-info) (arg0 object))
|
||||
(defmethod send-to-prev actor-link-info ((obj actor-link-info) (message symbol))
|
||||
"Send event arg1 to the next actor's process."
|
||||
(with-pp
|
||||
(let ((a0-1 (-> obj prev)))
|
||||
(when a0-1
|
||||
(let ((a0-2 (-> (the-as entity-links (-> a0-1 extra)) process)))
|
||||
(when a0-2
|
||||
(let ((v1-4 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-4 from) pp)
|
||||
(set! (-> v1-4 num-params) 0)
|
||||
(set! (-> v1-4 message) (the-as basic arg0))
|
||||
(send-event-function (the process a0-2) v1-4)
|
||||
)
|
||||
)
|
||||
|
||||
(let ((a0-1 (-> obj prev)))
|
||||
(when a0-1
|
||||
(let ((a0-2 (-> (the-as entity-links (-> a0-1 extra)) process)))
|
||||
(when a0-2
|
||||
(send-event a0-2 message)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -342,16 +311,17 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod send-to-next-and-prev actor-link-info ((obj actor-link-info) (arg0 object))
|
||||
"Send event arg0 to both next and prev."
|
||||
(send-to-next obj arg0)
|
||||
(send-to-prev obj arg0)
|
||||
(defmethod send-to-next-and-prev actor-link-info ((obj actor-link-info) (msg symbol))
|
||||
"Send an event to both next and prev with no params."
|
||||
|
||||
(send-to-next obj msg)
|
||||
(send-to-prev obj msg)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod send-to-all actor-link-info ((obj actor-link-info) (arg0 object))
|
||||
(send-to-all-after obj arg0)
|
||||
(send-to-all-before obj arg0)
|
||||
(defmethod send-to-all actor-link-info ((obj actor-link-info) (msg symbol))
|
||||
(send-to-all-after obj msg)
|
||||
(send-to-all-before obj msg)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -432,13 +402,9 @@
|
||||
)
|
||||
|
||||
(defun actor-link-subtask-complete-hook ((arg0 entity-actor) (arg1 (pointer symbol)))
|
||||
"Sets arg1 if the thing is complete. Returns the opposite value."
|
||||
"Sets arg1 if the thing is complete. Does not continue the apply if the complete perm is set."
|
||||
(cond
|
||||
((nonzero? (logand
|
||||
(-> (the-as entity-links (-> arg0 extra)) perm status)
|
||||
(entity-perm-status complete)
|
||||
)
|
||||
)
|
||||
((logtest? (-> (the-as entity-links (-> arg0 extra)) perm status) (entity-perm-status complete))
|
||||
(set! (-> arg1 0) #t)
|
||||
#f
|
||||
)
|
||||
@@ -450,13 +416,9 @@
|
||||
)
|
||||
|
||||
(defun actor-link-dead-hook ((arg0 entity-actor) (arg1 (pointer symbol)))
|
||||
"Sets arg1 is the thing is dead. Returns the opposite value."
|
||||
"Sets arg1 is the thing is dead. Does not continue the apply if the dead perm is set."
|
||||
(cond
|
||||
((nonzero? (logand
|
||||
(-> (the-as entity-links (-> arg0 extra)) perm status)
|
||||
(entity-perm-status dead)
|
||||
)
|
||||
)
|
||||
((logtest? (-> (the-as entity-links (-> arg0 extra)) perm status) (entity-perm-status dead))
|
||||
(set! (-> arg1 0) #t)
|
||||
#f
|
||||
)
|
||||
|
||||
@@ -5,13 +5,8 @@
|
||||
;; name in dgo: entity-h
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; definition for symbol *generate-actor-vis*, type symbol
|
||||
(define *generate-actor-vis* #f)
|
||||
|
||||
;; definition for symbol *generate-actor-vis-start*, type symbol
|
||||
(define *generate-actor-vis-start* #f)
|
||||
|
||||
;; definition for symbol *generate-actor-vis-output*, type symbol
|
||||
(define *generate-actor-vis-output* #f)
|
||||
|
||||
(defenum entity-perm-status
|
||||
@@ -31,43 +26,42 @@
|
||||
|
||||
;; definition of type entity-perm
|
||||
(deftype entity-perm (structure)
|
||||
((user-object object 2 :offset-assert 0)
|
||||
(user-uint64 uint64 :offset 0)
|
||||
(user-float float 2 :offset 0)
|
||||
(user-int32 int32 2 :offset 0)
|
||||
(user-uint32 uint32 2 :offset 0)
|
||||
(user-int16 int16 4 :offset 0)
|
||||
(user-uint16 uint16 4 :offset 0)
|
||||
(user-int8 int8 8 :offset 0)
|
||||
(user-uint8 uint8 8 :offset 0)
|
||||
(status entity-perm-status :offset-assert 8)
|
||||
(dummy uint8 1 :offset-assert 10)
|
||||
(task uint8 :offset-assert 11)
|
||||
(aid uint32 :offset-assert 12)
|
||||
(quad uint128 :offset 0)
|
||||
((user-object object 2 :offset-assert 0)
|
||||
(user-uint64 uint64 :offset 0)
|
||||
(user-float float 2 :offset 0)
|
||||
(user-int32 int32 2 :offset 0)
|
||||
(user-uint32 uint32 2 :offset 0)
|
||||
(user-int16 int16 4 :offset 0)
|
||||
(user-uint16 uint16 4 :offset 0)
|
||||
(user-int8 int8 8 :offset 0)
|
||||
(user-uint8 uint8 8 :offset 0)
|
||||
(status entity-perm-status :offset-assert 8)
|
||||
(dummy uint8 1 :offset-assert 10)
|
||||
(task game-task :offset-assert 11)
|
||||
(aid actor-id :offset-assert 12)
|
||||
(quad uint128 :offset 0)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 10
|
||||
:size-assert #x10
|
||||
:flag-assert #xa00000010
|
||||
(:methods
|
||||
(update-perm! (_type_ symbol entity-perm-status) _type_ 9)
|
||||
)
|
||||
(update-perm! (_type_ symbol entity-perm-status) _type_ 9)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type entity-links
|
||||
(deftype entity-links (structure)
|
||||
((prev-link entity-links :offset-assert 0)
|
||||
(next-link entity-links :offset-assert 4)
|
||||
(entity entity :offset-assert 8)
|
||||
(process process :offset-assert 12)
|
||||
(level level :offset-assert 16)
|
||||
(vis-id int32 :offset-assert 20)
|
||||
(trans vector :inline :offset-assert 32)
|
||||
(perm entity-perm :inline :offset-assert 48)
|
||||
(status uint16 :offset 56)
|
||||
(aid uint32 :offset 60)
|
||||
(task uint8 :offset 59)
|
||||
((prev-link entity-links :offset-assert 0)
|
||||
(next-link entity-links :offset-assert 4)
|
||||
(entity entity :offset-assert 8)
|
||||
(process process :offset-assert 12)
|
||||
(level level :offset-assert 16)
|
||||
(vis-id int32 :offset-assert 20)
|
||||
(trans vector :inline :offset-assert 32)
|
||||
(perm entity-perm :inline :offset-assert 48)
|
||||
(status uint16 :offset 56)
|
||||
(aid actor-id :offset 60)
|
||||
(task game-task :offset 59)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x40
|
||||
@@ -77,17 +71,15 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type entity-perm-array
|
||||
(deftype entity-perm-array (inline-array-class)
|
||||
((data entity-perm :inline :dynamic :offset-assert 16))
|
||||
((data entity-perm :inline :dynamic :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
(set! (-> entity-perm-array heap-base) (the-as uint 16))
|
||||
|
||||
;; definition of type entity-links-array
|
||||
(deftype entity-links-array (inline-array-class)
|
||||
((data entity-links :inline :dynamic :offset-assert 16)
|
||||
)
|
||||
@@ -95,13 +87,11 @@
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
(set! (-> entity-links-array heap-base) (the-as uint 64))
|
||||
|
||||
;; definition of type entity
|
||||
(deftype entity (res-lump)
|
||||
((trans vector :inline :offset-assert 32)
|
||||
(aid uint32 :offset-assert 48)
|
||||
((trans vector :inline :offset-assert 32)
|
||||
(aid uint32 :offset-assert 48)
|
||||
)
|
||||
:method-count-assert 27
|
||||
:size-assert #x34
|
||||
@@ -115,45 +105,40 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type entity-camera
|
||||
(deftype entity-camera (entity)
|
||||
((connect connectable :inline :offset-assert 64)
|
||||
((connect connectable :inline :offset-assert 64)
|
||||
)
|
||||
:method-count-assert 27
|
||||
:size-assert #x50
|
||||
:flag-assert #x1b00000050
|
||||
)
|
||||
|
||||
;; definition of type entity-ambient-data
|
||||
(deftype entity-ambient-data (structure)
|
||||
((user-object object 3 :offset-assert 0)
|
||||
(function basic :offset-assert 12)
|
||||
(quad uint128 :offset 0)
|
||||
(user-uint64 uint64 1 :offset 0)
|
||||
(user-float float 3 :offset 0)
|
||||
(user-int32 int32 3 :offset 0)
|
||||
(user-uint32 uint32 3 :offset 0)
|
||||
(user-int16 int16 6 :offset 0)
|
||||
(user-uint16 uint16 6 :offset 0)
|
||||
(user-int8 int8 12 :offset 0)
|
||||
(user-uint8 uint8 12 :offset 0)
|
||||
((user-object object 3 :offset-assert 0)
|
||||
(function basic :offset-assert 12)
|
||||
(quad uint128 :offset 0)
|
||||
(user-uint64 uint64 1 :offset 0)
|
||||
(user-float float 3 :offset 0)
|
||||
(user-int32 int32 3 :offset 0)
|
||||
(user-uint32 uint32 3 :offset 0)
|
||||
(user-int16 int16 6 :offset 0)
|
||||
(user-uint16 uint16 6 :offset 0)
|
||||
(user-int8 int8 12 :offset 0)
|
||||
(user-uint8 uint8 12 :offset 0)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; definition of type entity-ambient-data-array
|
||||
(deftype entity-ambient-data-array (inline-array-class)
|
||||
()
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
(set! (-> entity-ambient-data-array heap-base) (the-as uint 16))
|
||||
|
||||
;; definition of type entity-ambient
|
||||
(deftype entity-ambient (entity)
|
||||
()
|
||||
:method-count-assert 29
|
||||
@@ -165,33 +150,30 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type entity-actor
|
||||
(declare-type nav-mesh basic)
|
||||
(deftype entity-actor (entity)
|
||||
((nav-mesh nav-mesh :offset-assert 52)
|
||||
(etype type :offset-assert 56)
|
||||
(task uint8 :offset-assert 60)
|
||||
(vis-id uint16 :offset-assert 62)
|
||||
(quat quaternion :inline :offset-assert 64)
|
||||
((nav-mesh nav-mesh :offset-assert 52)
|
||||
(etype type :offset-assert 56)
|
||||
(task uint8 :offset-assert 60)
|
||||
(vis-id uint16 :offset-assert 62)
|
||||
(quat quaternion :inline :offset-assert 64)
|
||||
)
|
||||
:method-count-assert 31
|
||||
:size-assert #x50
|
||||
:flag-assert #x1f00000050
|
||||
(:methods
|
||||
(next-actor (_type_) entity-actor 27)
|
||||
(prev-actor (_type_) entity-actor 28)
|
||||
(dummy-29 () none 29)
|
||||
(dummy-30 () none 30)
|
||||
)
|
||||
(next-actor (_type_) entity-actor 27)
|
||||
(prev-actor (_type_) entity-actor 28)
|
||||
(dummy-29 () none 29)
|
||||
(dummy-30 () none 30)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type entity-info
|
||||
(deftype entity-info (basic)
|
||||
((ptype type :offset-assert 4)
|
||||
(package basic :offset-assert 8)
|
||||
(art-group pair :offset-assert 12)
|
||||
(pool basic :offset-assert 16)
|
||||
(heap-size int32 :offset-assert 20)
|
||||
((ptype type :offset-assert 4)
|
||||
(package basic :offset-assert 8)
|
||||
(art-group pair :offset-assert 12)
|
||||
(pool basic :offset-assert 16)
|
||||
(heap-size int32 :offset-assert 20)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x18
|
||||
@@ -205,23 +187,21 @@
|
||||
(set! entity-nav-login (the-as (function entity-actor none) nothing))
|
||||
)
|
||||
|
||||
;; definition of type actor-bank
|
||||
(deftype actor-bank (basic)
|
||||
((pause-dist float :offset-assert 4)
|
||||
(birth-dist float :offset-assert 8)
|
||||
(birth-max int32 :offset-assert 12)
|
||||
((pause-dist float :offset-assert 4)
|
||||
(birth-dist float :offset-assert 8)
|
||||
(birth-max int32 :offset-assert 12)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; definition for symbol *ACTOR-bank*, type actor-bank
|
||||
(define *ACTOR-bank*
|
||||
(new 'static 'actor-bank
|
||||
:pause-dist 204800.0
|
||||
:birth-dist 901120.0
|
||||
:birth-max 10
|
||||
:pause-dist (meters 50) ;; actor activity range?
|
||||
:birth-dist (meters 220) ;; draw distance or something?
|
||||
:birth-max 10 ;; maximum actor births per frame? (it is known they dont all happen at once)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -6,25 +6,29 @@
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
|
||||
(declare-type collide-shape basic)
|
||||
(declare-type water-control basic)
|
||||
(declare-type nav-control basic)
|
||||
(declare-type path-control basic)
|
||||
(declare-type vol-control basic)
|
||||
(declare-type actor-link-info basic)
|
||||
(declare-type sparticle-launch-control basic)
|
||||
(declare-type water-control basic)
|
||||
(declare-type collide-shape basic)
|
||||
(deftype process-drawable (process)
|
||||
((root trsqv :offset-assert 112)
|
||||
(node-list cspace-array :offset-assert 116)
|
||||
(draw draw-control :offset-assert 120)
|
||||
(skel joint-control :offset-assert 124)
|
||||
(nav basic :offset-assert 128)
|
||||
(nav nav-control :offset-assert 128)
|
||||
(align align-control :offset-assert 132)
|
||||
(path basic :offset-assert 136)
|
||||
(vol basic :offset-assert 140)
|
||||
(path path-control :offset-assert 136)
|
||||
(vol vol-control :offset-assert 140)
|
||||
(fact fact-info :offset-assert 144)
|
||||
(link basic :offset-assert 148)
|
||||
(link actor-link-info :offset-assert 148)
|
||||
(part sparticle-launch-control :offset-assert 152)
|
||||
(water water-control :offset-assert 156)
|
||||
(sound ambient-sound :offset-assert 160)
|
||||
(state-flags uint32 :offset-assert 164)
|
||||
(state-time uint64 :offset-assert 168)
|
||||
(state-time seconds :offset-assert 168)
|
||||
)
|
||||
:heap-base #x40
|
||||
:method-count-assert 20
|
||||
@@ -144,4 +148,4 @@
|
||||
)
|
||||
|
||||
|
||||
(declare-type target basic)
|
||||
(declare-type target process-drawable)
|
||||
@@ -158,7 +158,7 @@
|
||||
|
||||
;; the possible state for a level.
|
||||
(deftype level-buffer-state (structure)
|
||||
((name basic :offset-assert 0) ;; level name
|
||||
((name symbol :offset-assert 0) ;; level name
|
||||
(display? symbol :offset-assert 4) ;; should it be drawn?
|
||||
(force-vis? symbol :offset-assert 8) ;; ? should it have its vis loaded?
|
||||
(force-inside? symbol :offset-assert 12) ;; ?
|
||||
@@ -187,11 +187,11 @@
|
||||
(want-display-level (_type_ symbol symbol) int 12)
|
||||
(want-vis (_type_ symbol) int 13)
|
||||
(want-force-vis (_type_ symbol symbol) int 14)
|
||||
(dummy-15 () none 15)
|
||||
(dummy-16 () none 16)
|
||||
(dummy-17 () none 17)
|
||||
(dummy-18 () none 18)
|
||||
(dummy-19 () none 19)
|
||||
(dummy-15 (_type_ pair) none 15)
|
||||
(dummy-16 (_type_ float) int 16)
|
||||
(dummy-17 (_type_ pair) int 17)
|
||||
(dummy-18 (_type_) int 18)
|
||||
(dummy-19 (_type_) int 19)
|
||||
(dummy-20 () none 20)
|
||||
)
|
||||
)
|
||||
@@ -206,19 +206,19 @@
|
||||
|
||||
;; a game checkpoint
|
||||
(deftype continue-point (basic)
|
||||
((name string :offset-assert 4)
|
||||
(level basic :offset-assert 8)
|
||||
(flags uint32 :offset-assert 12)
|
||||
(trans vector :inline :offset-assert 16)
|
||||
(quat quaternion :inline :offset-assert 32)
|
||||
(camera-trans vector :inline :offset-assert 48)
|
||||
(camera-rot float 9 :offset-assert 64)
|
||||
(load-commands pair :offset-assert 100)
|
||||
(vis-nick basic :offset-assert 104)
|
||||
(lev0 basic :offset-assert 108)
|
||||
(disp0 basic :offset-assert 112)
|
||||
(lev1 basic :offset-assert 116)
|
||||
(disp1 basic :offset-assert 120)
|
||||
((name string :offset-assert 4)
|
||||
(level symbol :offset-assert 8)
|
||||
(flags uint32 :offset-assert 12)
|
||||
(trans vector :inline :offset-assert 16)
|
||||
(quat quaternion :inline :offset-assert 32)
|
||||
(camera-trans vector :inline :offset-assert 48)
|
||||
(camera-rot float 9 :offset-assert 64)
|
||||
(load-commands pair :offset-assert 100)
|
||||
(vis-nick symbol :offset-assert 104)
|
||||
(lev0 symbol :offset-assert 108)
|
||||
(disp0 symbol :offset-assert 112)
|
||||
(lev1 symbol :offset-assert 116)
|
||||
(disp1 symbol :offset-assert 120)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x7c
|
||||
@@ -287,7 +287,7 @@
|
||||
(initialize! (_type_ symbol game-save string) _type_ 9)
|
||||
(adjust (_type_ symbol float handle) float 10)
|
||||
(task-complete? (_type_ game-task) symbol 11)
|
||||
(lookup-entity-perm-by-aid (_type_ uint) entity-perm 12)
|
||||
(lookup-entity-perm-by-aid (_type_ actor-id) entity-perm 12)
|
||||
(get-entity-task-perm (_type_ game-task) entity-perm 13)
|
||||
(copy-perms-from-level! (_type_ level) none 14)
|
||||
(copy-perms-to-level! (_type_ level) none 15)
|
||||
|
||||
+122
-360
@@ -551,10 +551,10 @@
|
||||
|
||||
;; todo method 11
|
||||
|
||||
(defmethod lookup-entity-perm-by-aid game-info ((obj game-info) (arg0 uint))
|
||||
(defmethod lookup-entity-perm-by-aid game-info ((obj game-info) (aid actor-id))
|
||||
(let ((v1-0 (-> obj perm-list)))
|
||||
(countdown (a0-1 (-> v1-0 length))
|
||||
(if (= arg0 (-> v1-0 data a0-1 aid))
|
||||
(if (= aid (-> v1-0 data a0-1 aid))
|
||||
(return (-> v1-0 data a0-1))
|
||||
)
|
||||
)
|
||||
@@ -708,363 +708,125 @@
|
||||
)
|
||||
|
||||
(defun-debug game-task->string ((arg0 game-task))
|
||||
(let ((v1-0 arg0))
|
||||
(cond
|
||||
((= v1-0 (game-task max))
|
||||
"max"
|
||||
)
|
||||
((= v1-0 (game-task assistant-village3))
|
||||
"assistant-village3"
|
||||
)
|
||||
((= v1-0 (game-task leaving-misty))
|
||||
"leaving-misty"
|
||||
)
|
||||
((= v1-0 (game-task plunger-lurker-hit))
|
||||
"plunger-lurker-hit"
|
||||
)
|
||||
((= v1-0 (game-task finalboss-movies))
|
||||
"finalboss-movies"
|
||||
)
|
||||
((= v1-0 (game-task village4-button))
|
||||
"village4-button"
|
||||
)
|
||||
((= v1-0 (game-task ogre-secret))
|
||||
"ogre-secret"
|
||||
)
|
||||
((= v1-0 (game-task intro))
|
||||
"intro"
|
||||
)
|
||||
((= v1-0 (game-task lavatube-start))
|
||||
"lavatube-start"
|
||||
)
|
||||
((= v1-0 (game-task lavatube-balls))
|
||||
"lavatube-balls"
|
||||
)
|
||||
((= v1-0 (game-task red-eggtop))
|
||||
"red-eggtop"
|
||||
)
|
||||
((= v1-0 (game-task village3-button))
|
||||
"village3-button"
|
||||
)
|
||||
((= v1-0 (game-task swamp-arm))
|
||||
"swamp-arm"
|
||||
)
|
||||
((= v1-0 (game-task village2-levitator))
|
||||
"village2-levitator"
|
||||
)
|
||||
((= v1-0 (game-task firecanyon-assistant))
|
||||
"firecanyon-assistant"
|
||||
)
|
||||
((= v1-0 (game-task village3-oracle-money2))
|
||||
"village3-oracle-money2"
|
||||
)
|
||||
((= v1-0 (game-task village3-oracle-money1))
|
||||
"village3-oracle-money1"
|
||||
)
|
||||
((= v1-0 (game-task village3-miner-money4))
|
||||
"village3-miner-money4"
|
||||
)
|
||||
((= v1-0 (game-task village3-miner-money3))
|
||||
"village3-miner-money3"
|
||||
)
|
||||
((= v1-0 (game-task village3-miner-money2))
|
||||
"village3-miner-money2"
|
||||
)
|
||||
((= v1-0 (game-task village3-miner-money1))
|
||||
"village3-miner-money1"
|
||||
)
|
||||
((= v1-0 (game-task training-buzzer))
|
||||
"training-buzzer"
|
||||
)
|
||||
((= v1-0 (game-task training-climb))
|
||||
"training-climb"
|
||||
)
|
||||
((= v1-0 (game-task training-door))
|
||||
"training-door"
|
||||
)
|
||||
((= v1-0 (game-task training-gimmie))
|
||||
"training-gimmie"
|
||||
)
|
||||
((= v1-0 (game-task citadel-buzzer))
|
||||
"citadel-buzzer"
|
||||
)
|
||||
((= v1-0 (game-task lavatube-buzzer))
|
||||
"lavatube-buzzer"
|
||||
)
|
||||
((= v1-0 (game-task lavatube-end))
|
||||
"lavatube-end"
|
||||
)
|
||||
((= v1-0 (game-task ogre-buzzer))
|
||||
"ogre-buzzer"
|
||||
)
|
||||
((= v1-0 (game-task ogre-end))
|
||||
"ogre-end"
|
||||
)
|
||||
((= v1-0 (game-task ogre-boss))
|
||||
"ogre-boss"
|
||||
)
|
||||
((= v1-0 (game-task cave-buzzer))
|
||||
"cave-buzzer"
|
||||
)
|
||||
((= v1-0 (game-task cave-platforms))
|
||||
"cave-platforms"
|
||||
)
|
||||
((= v1-0 (game-task cave-spider-tunnel))
|
||||
"cave-spider-tunnel"
|
||||
)
|
||||
((= v1-0 (game-task cave-swing-poles))
|
||||
"cave-swing-poles"
|
||||
)
|
||||
((= v1-0 (game-task cave-robot-climb))
|
||||
"cave-robot-climb"
|
||||
)
|
||||
((= v1-0 (game-task cave-dark-climb))
|
||||
"cave-dark-climb"
|
||||
)
|
||||
((= v1-0 (game-task cave-dark-crystals))
|
||||
"cave-dark-crystals"
|
||||
)
|
||||
((= v1-0 (game-task cave-gnawers))
|
||||
"cave-gnawers"
|
||||
)
|
||||
((= v1-0 (game-task village3-buzzer))
|
||||
"village3-buzzer"
|
||||
)
|
||||
((= v1-0 (game-task village2-buzzer))
|
||||
"village2-buzzer"
|
||||
)
|
||||
((= v1-0 (game-task village1-buzzer))
|
||||
"village1-buzzer"
|
||||
)
|
||||
((= v1-0 (game-task village3-extra1))
|
||||
"village3-extra1"
|
||||
)
|
||||
((= v1-0 (game-task citadel-sage-yellow))
|
||||
"citadel-sage-yellow"
|
||||
)
|
||||
((= v1-0 (game-task citadel-sage-red))
|
||||
"citadel-sage-red"
|
||||
)
|
||||
((= v1-0 (game-task citadel-sage-blue))
|
||||
"citadel-sage-blue"
|
||||
)
|
||||
((= v1-0 (game-task citadel-sage-green))
|
||||
"citadel-sage-green"
|
||||
)
|
||||
((= v1-0 (game-task firecanyon-end))
|
||||
"firecanyon-end"
|
||||
)
|
||||
((= v1-0 (game-task firecanyon-buzzer))
|
||||
"firecanyon-buzzer"
|
||||
)
|
||||
((= v1-0 (game-task snow-cage))
|
||||
"snow-cage"
|
||||
)
|
||||
((= v1-0 (game-task snow-bumpers))
|
||||
"snow-bumpers"
|
||||
)
|
||||
((= v1-0 (game-task snow-buzzer))
|
||||
"snow-buzzer"
|
||||
)
|
||||
((= v1-0 (game-task snow-bunnies))
|
||||
"snow-bunnies"
|
||||
)
|
||||
((= v1-0 (game-task snow-ball))
|
||||
"snow-ball"
|
||||
)
|
||||
((= v1-0 (game-task snow-fort))
|
||||
"snow-fort"
|
||||
)
|
||||
((= v1-0 (game-task snow-ram))
|
||||
"snow-ram"
|
||||
)
|
||||
((= v1-0 (game-task snow-eggtop))
|
||||
"snow-eggtop"
|
||||
)
|
||||
((= v1-0 (game-task rolling-ring-chase-2))
|
||||
"rolling-ring-chase-2"
|
||||
)
|
||||
((= v1-0 (game-task rolling-ring-chase-1))
|
||||
"rolling-ring-chase-1"
|
||||
)
|
||||
((= v1-0 (game-task rolling-buzzer))
|
||||
"rolling-buzzer"
|
||||
)
|
||||
((= v1-0 (game-task rolling-lake))
|
||||
"rolling-lake"
|
||||
)
|
||||
((= v1-0 (game-task rolling-plants))
|
||||
"rolling-plants"
|
||||
)
|
||||
((= v1-0 (game-task rolling-moles))
|
||||
"rolling-moles"
|
||||
)
|
||||
((= v1-0 (game-task rolling-robbers))
|
||||
"rolling-robbers"
|
||||
)
|
||||
((= v1-0 (game-task rolling-race))
|
||||
"rolling-race"
|
||||
)
|
||||
((= v1-0 (game-task sunken-spinning-room))
|
||||
"sunken-spinning-room"
|
||||
)
|
||||
((= v1-0 (game-task sunken-top-of-helix))
|
||||
"sunken-top-of-helix"
|
||||
)
|
||||
((= v1-0 (game-task sunken-buzzer))
|
||||
"sunken-buzzer"
|
||||
)
|
||||
((= v1-0 (game-task sunken-sharks))
|
||||
"sunken-sharks"
|
||||
)
|
||||
((= v1-0 (game-task sunken-room))
|
||||
"sunken-room"
|
||||
)
|
||||
((= v1-0 (game-task sunken-slide))
|
||||
"sunken-slide"
|
||||
)
|
||||
((= v1-0 (game-task sunken-pipe))
|
||||
"sunken-pipe"
|
||||
)
|
||||
((= v1-0 (game-task sunken-platforms))
|
||||
"sunken-platforms"
|
||||
)
|
||||
((= v1-0 (game-task swamp-buzzer))
|
||||
"swamp-buzzer"
|
||||
)
|
||||
((= v1-0 (game-task swamp-tether-4))
|
||||
"swamp-tether-4"
|
||||
)
|
||||
((= v1-0 (game-task swamp-tether-3))
|
||||
"swamp-tether-3"
|
||||
)
|
||||
((= v1-0 (game-task swamp-tether-2))
|
||||
"swamp-tether-2"
|
||||
)
|
||||
((= v1-0 (game-task swamp-tether-1))
|
||||
"swamp-tether-1"
|
||||
)
|
||||
((= v1-0 (game-task swamp-battle))
|
||||
"swamp-battle"
|
||||
)
|
||||
((= v1-0 (game-task swamp-flutflut))
|
||||
"swamp-flutflut"
|
||||
)
|
||||
((= v1-0 (game-task swamp-billy))
|
||||
"swamp-billy"
|
||||
)
|
||||
((= v1-0 (game-task village2-oracle-money2))
|
||||
"village2-oracle-money2"
|
||||
)
|
||||
((= v1-0 (game-task village2-oracle-money1))
|
||||
"village2-oracle-money1"
|
||||
)
|
||||
((= v1-0 (game-task village2-warrior-money))
|
||||
"village2-warrior-money"
|
||||
)
|
||||
((= v1-0 (game-task village2-geologist-money))
|
||||
"village2-geologist-money"
|
||||
)
|
||||
((= v1-0 (game-task village2-gambler-money))
|
||||
"village2-gambler-money"
|
||||
)
|
||||
((= v1-0 (game-task misty-eco-challenge))
|
||||
"misty-eco-challenge"
|
||||
)
|
||||
((= v1-0 (game-task misty-bike-jump))
|
||||
"misty-bike-jump"
|
||||
)
|
||||
((= v1-0 (game-task misty-buzzer))
|
||||
"misty-buzzer"
|
||||
)
|
||||
((= v1-0 (game-task misty-bike))
|
||||
"misty-bike"
|
||||
)
|
||||
((= v1-0 (game-task misty-cannon))
|
||||
"misty-cannon"
|
||||
)
|
||||
((= v1-0 (game-task misty-warehouse))
|
||||
"misty-warehouse"
|
||||
)
|
||||
((= v1-0 (game-task misty-boat))
|
||||
"misty-boat"
|
||||
)
|
||||
((= v1-0 (game-task misty-muse))
|
||||
"misty-muse"
|
||||
)
|
||||
((= v1-0 (game-task beach-sentinel))
|
||||
"beach-sentinel"
|
||||
)
|
||||
((= v1-0 (game-task beach-gimmie))
|
||||
"beach-gimmie"
|
||||
)
|
||||
((= v1-0 (game-task beach-buzzer))
|
||||
"beach-buzzer"
|
||||
)
|
||||
((= v1-0 (game-task beach-cannon))
|
||||
"beach-cannon"
|
||||
)
|
||||
((= v1-0 (game-task beach-seagull))
|
||||
"beach-seagull"
|
||||
)
|
||||
((= v1-0 (game-task beach-flutflut))
|
||||
"beach-flutflut"
|
||||
)
|
||||
((= v1-0 (game-task beach-pelican))
|
||||
"beach-pelican"
|
||||
)
|
||||
((= v1-0 (game-task beach-ecorocks))
|
||||
"beach-ecorocks"
|
||||
)
|
||||
((= v1-0 (game-task village1-oracle-money2))
|
||||
"village1-oracle-money2"
|
||||
)
|
||||
((= v1-0 (game-task village1-oracle-money1))
|
||||
"village1-oracle-money1"
|
||||
)
|
||||
((= v1-0 (game-task village1-uncle-money))
|
||||
"village1-uncle-money"
|
||||
)
|
||||
((= v1-0 (game-task village1-mayor-money))
|
||||
"village1-mayor-money"
|
||||
)
|
||||
((= v1-0 (game-task village1-yakow))
|
||||
"village1-yakow"
|
||||
)
|
||||
((= v1-0 (game-task jungle-temple-door))
|
||||
"jungle-temple-door"
|
||||
)
|
||||
((= v1-0 (game-task jungle-canyon-end))
|
||||
"jungle-canyon-end"
|
||||
)
|
||||
((= v1-0 (game-task jungle-buzzer))
|
||||
"jungle-buzzer"
|
||||
)
|
||||
((= v1-0 (game-task jungle-plant))
|
||||
"jungle-plant"
|
||||
)
|
||||
((= v1-0 (game-task jungle-fishgame))
|
||||
"jungle-fishgame"
|
||||
)
|
||||
((= v1-0 (game-task jungle-tower))
|
||||
"jungle-tower"
|
||||
)
|
||||
((= v1-0 (game-task jungle-lurkerm))
|
||||
"jungle-lurkerm"
|
||||
)
|
||||
((= v1-0 (game-task jungle-eggtop))
|
||||
"jungle-eggtop"
|
||||
)
|
||||
((= v1-0 (game-task complete))
|
||||
"complete"
|
||||
)
|
||||
((= v1-0 (game-task none))
|
||||
"none"
|
||||
)
|
||||
(else
|
||||
"*unknown*"
|
||||
)
|
||||
)
|
||||
(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*")
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1103,7 +865,7 @@
|
||||
(let ((v1-15 (new 'global 'entity-perm-array 116)))
|
||||
(set! (-> gp-0 task-perm-list) v1-15)
|
||||
(dotimes (a0-24 (-> v1-15 length))
|
||||
(set! (-> v1-15 data a0-24 task) (the-as uint a0-24))
|
||||
(set! (-> v1-15 data a0-24 task) (the-as game-task a0-24))
|
||||
)
|
||||
(set!
|
||||
(-> v1-15 data 1 status)
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
((new-trans-hook function :offset-assert 176)
|
||||
(cur-trans-hook function :offset-assert 180)
|
||||
(cur-event-hook function :offset-assert 184)
|
||||
(new-joint-anim basic :offset-assert 188)
|
||||
(new-joint-anim art-joint-anim :offset-assert 188)
|
||||
(new-joint-anim-blend uint64 :offset-assert 192)
|
||||
(anim-mode basic :offset-assert 200)
|
||||
(anim-mode symbol :offset-assert 200)
|
||||
(cur-grab-handle uint64 :offset-assert 208)
|
||||
(cur-target-handle uint64 :offset-assert 216)
|
||||
(old-grab-pos vector :inline :offset-assert 224)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
;; name in dgo: settings
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; definition for method 9 of type setting-data
|
||||
|
||||
(defmethod handle-pending-updates setting-data ((obj setting-data) (arg0 engine))
|
||||
"this goes through the list of pending setting changes in
|
||||
the engine/connection list and updates the setting-data"
|
||||
@@ -29,28 +29,13 @@
|
||||
(('process-mask)
|
||||
(case (-> conn param1)
|
||||
(('set)
|
||||
(set!
|
||||
(-> obj process-mask)
|
||||
(logior
|
||||
(-> obj process-mask)
|
||||
(the-as uint (the-as int (-> conn param3)))
|
||||
)
|
||||
)
|
||||
(logior! (-> obj process-mask) (the-as process-mask (-> conn param3)))
|
||||
)
|
||||
(('clear)
|
||||
(set!
|
||||
(-> obj process-mask)
|
||||
(logand
|
||||
(-> obj process-mask)
|
||||
(the-as uint (the-as uint (lognot (the-as uint (-> conn param3)))))
|
||||
)
|
||||
)
|
||||
(logclear! (-> obj process-mask) (the-as process-mask (-> conn param3)))
|
||||
)
|
||||
(('abs)
|
||||
(set!
|
||||
(-> obj process-mask)
|
||||
(the-as process-mask (the-as int (-> conn param3)))
|
||||
)
|
||||
(set! (-> obj process-mask) (the-as process-mask (-> conn param3)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -211,16 +196,10 @@
|
||||
(('common-page)
|
||||
(case (-> conn param1)
|
||||
(('set)
|
||||
(set! (-> obj common-page)
|
||||
(logior (-> obj common-page) (the-as int (-> conn param3)))
|
||||
)
|
||||
(logior! (-> obj common-page) (the-as int (-> conn param3)))
|
||||
)
|
||||
(('clear)
|
||||
(set! (-> obj common-page)
|
||||
(logand (-> obj common-page)
|
||||
(the-as int (the-as uint (lognot (the-as uint (-> conn param3)))))
|
||||
)
|
||||
)
|
||||
(logclear! (-> obj common-page) (the-as int (-> conn param3)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -232,35 +211,13 @@
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 9 of type setting-control
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod
|
||||
push-setting!
|
||||
setting-control
|
||||
((obj setting-control)
|
||||
(arg0 process)
|
||||
(arg1 (function object object object object object))
|
||||
(arg2 object)
|
||||
(arg3 object)
|
||||
(arg4 object)
|
||||
)
|
||||
(defmethod push-setting! setting-control ((obj setting-control) (arg0 process) (arg1 (function object object object object object)) (arg2 object) (arg3 object) (arg4 object))
|
||||
(add-connection (-> obj engine) arg0 arg1 arg2 arg3 arg4)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type setting-control
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod
|
||||
set-setting!
|
||||
setting-control
|
||||
((obj setting-control)
|
||||
(arg0 process)
|
||||
(arg1 symbol)
|
||||
(arg2 symbol)
|
||||
(arg3 float)
|
||||
(arg4 int)
|
||||
)
|
||||
(defmethod set-setting! setting-control ((obj setting-control) (arg0 process) (arg1 symbol) (arg2 symbol) (arg3 float) (arg4 int))
|
||||
(clear-pending-settings-from-process obj arg0 arg1)
|
||||
(add-connection
|
||||
(-> obj engine)
|
||||
@@ -274,12 +231,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type setting-control
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod
|
||||
clear-pending-settings-from-process
|
||||
setting-control
|
||||
((obj setting-control) (arg0 process) (arg1 symbol))
|
||||
(defmethod clear-pending-settings-from-process setting-control ((obj setting-control) (arg0 process) (arg1 symbol))
|
||||
(when arg0
|
||||
(let ((s5-0 (-> obj engine))
|
||||
(s4-0 (-> arg0 connection-list next1))
|
||||
@@ -303,7 +255,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 12 of type setting-control
|
||||
|
||||
(defmethod copy-settings-from-target! setting-control ((obj setting-control))
|
||||
(let ((gp-0 (-> obj current)))
|
||||
(let ((s5-0 (-> obj target)))
|
||||
@@ -338,54 +290,26 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 13 of type setting-control
|
||||
|
||||
(defmethod update-per-frame-settings! setting-control ((obj setting-control))
|
||||
(copy-settings-from-target! obj)
|
||||
(let ((gp-0 (-> obj current)))
|
||||
(let ((s5-1 (-> obj target)))
|
||||
(when *sound-player-enable*
|
||||
(when (!= (-> gp-0 sfx-volume) (-> s5-1 sfx-volume))
|
||||
(set!
|
||||
(-> gp-0 sfx-volume)
|
||||
(seek
|
||||
(-> gp-0 sfx-volume)
|
||||
(-> s5-1 sfx-volume)
|
||||
(* 100.0 (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
(seek! (-> gp-0 sfx-volume) (-> s5-1 sfx-volume) (* 100.0 (-> *display* seconds-per-frame)))
|
||||
(sound-set-volume (the-as uint 1) (-> gp-0 sfx-volume))
|
||||
)
|
||||
(when (!= (-> gp-0 music-volume) (-> s5-1 music-volume))
|
||||
(set!
|
||||
(-> gp-0 music-volume)
|
||||
(seek
|
||||
(-> gp-0 music-volume)
|
||||
(-> s5-1 music-volume)
|
||||
(* 100.0 (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
(seek! (-> gp-0 music-volume) (-> s5-1 music-volume) (* 100.0 (-> *display* seconds-per-frame)))
|
||||
(sound-set-volume (the-as uint 2) (-> gp-0 music-volume))
|
||||
)
|
||||
(when (!= (-> gp-0 dialog-volume) (-> s5-1 dialog-volume))
|
||||
(set!
|
||||
(-> gp-0 dialog-volume)
|
||||
(seek
|
||||
(-> gp-0 dialog-volume)
|
||||
(-> s5-1 dialog-volume)
|
||||
(* 100.0 (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
(seek! (-> gp-0 dialog-volume) (-> s5-1 dialog-volume) (* 100.0 (-> *display* seconds-per-frame)))
|
||||
(sound-set-volume (the-as uint 4) (-> gp-0 dialog-volume))
|
||||
)
|
||||
(when (!= (-> gp-0 ambient-volume) (-> s5-1 ambient-volume))
|
||||
(set!
|
||||
(-> gp-0 ambient-volume)
|
||||
(seek
|
||||
(-> gp-0 ambient-volume)
|
||||
(-> s5-1 ambient-volume)
|
||||
(* 100.0 (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
(seek! (-> gp-0 ambient-volume) (-> s5-1 ambient-volume) (* 100.0 (-> *display* seconds-per-frame)))
|
||||
(sound-set-volume (the-as uint 16) (-> gp-0 ambient-volume))
|
||||
)
|
||||
)
|
||||
@@ -393,16 +317,13 @@
|
||||
(set! (-> gp-0 language) (-> s5-1 language))
|
||||
(set-language (-> gp-0 language))
|
||||
)
|
||||
(when
|
||||
(and
|
||||
(!= (-> s5-1 music) (-> gp-0 music))
|
||||
(and
|
||||
(< 0.0 (-> *setting-control* current music-volume))
|
||||
(zero? (rpc-busy? 1))
|
||||
*sound-bank-1*
|
||||
*sound-bank-2*
|
||||
)
|
||||
)
|
||||
(when (and (!= (-> s5-1 music) (-> gp-0 music))
|
||||
(and (< 0.0 (-> *setting-control* current music-volume))
|
||||
(zero? (rpc-busy? 1))
|
||||
*sound-bank-1*
|
||||
*sound-bank-2*
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((-> s5-1 music)
|
||||
(format 0 "Load music ~A~%" (-> s5-1 music))
|
||||
@@ -415,13 +336,7 @@
|
||||
)
|
||||
(set! (-> gp-0 music) (-> s5-1 music))
|
||||
)
|
||||
(set!
|
||||
(-> s5-1 sound-flava)
|
||||
(the-as
|
||||
uint
|
||||
(flava-lookup (-> gp-0 music) (the-as int (-> s5-1 sound-flava)))
|
||||
)
|
||||
)
|
||||
(set! (-> s5-1 sound-flava) (the-as uint (flava-lookup (-> gp-0 music) (the-as int (-> s5-1 sound-flava)))))
|
||||
(set! (-> gp-0 sound-flava) (-> s5-1 sound-flava))
|
||||
(if *sound-player-enable*
|
||||
(sound-set-flava (-> gp-0 sound-flava))
|
||||
@@ -449,14 +364,7 @@
|
||||
(set! (-> gp-0 bg-r) (-> s5-1 bg-r))
|
||||
(set! (-> gp-0 bg-g) (-> s5-1 bg-g))
|
||||
(set! (-> gp-0 bg-b) (-> s5-1 bg-b))
|
||||
(set!
|
||||
(-> gp-0 bg-a)
|
||||
(seek
|
||||
(-> gp-0 bg-a)
|
||||
(-> s5-1 bg-a)
|
||||
(* (-> s5-1 bg-a-speed) (-> *display* seconds-per-frame))
|
||||
)
|
||||
)
|
||||
(seek! (-> gp-0 bg-a) (-> s5-1 bg-a) (* (-> s5-1 bg-a-speed) (-> *display* seconds-per-frame)))
|
||||
)
|
||||
(let ((v1-60 (-> *display* frames (-> *display* on-screen) display))
|
||||
(f0-39 (-> gp-0 bg-a))
|
||||
@@ -488,7 +396,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
|
||||
(when (zero? *setting-control*)
|
||||
(set! *setting-control* (new 'global 'setting-control 32))
|
||||
(let ((gp-0 (-> *setting-control* default))
|
||||
@@ -498,38 +406,14 @@
|
||||
(set! (-> gp-0 ocean-off) #f)
|
||||
(set! (-> gp-0 allow-look-around) #t)
|
||||
(set! (-> gp-0 border-mode) #f)
|
||||
(set!
|
||||
(-> gp-0 sfx-volume)
|
||||
(the float (* 5 (the int (+ 0.5 (* 15.0 f0-2)))))
|
||||
)
|
||||
(set!
|
||||
(-> gp-0 music-volume)
|
||||
(the float (* 5 (the int (+ 0.5 (* 13.0 f0-2)))))
|
||||
)
|
||||
(set!
|
||||
(-> gp-0 dialog-volume)
|
||||
(the float (* 5 (the int (+ 0.5 (* 20.0 f0-2)))))
|
||||
)
|
||||
(set!
|
||||
(-> gp-0 ambient-volume)
|
||||
(the float (* 5 (the int (+ 0.5 (* 15.0 f0-2)))))
|
||||
)
|
||||
(set!
|
||||
(-> gp-0 sfx-volume-movie)
|
||||
(the float (* 5 (the int (+ 0.5 (* 11.0 f0-2)))))
|
||||
)
|
||||
(set!
|
||||
(-> gp-0 music-volume-movie)
|
||||
(the float (* 5 (the int (+ 0.5 (* 13.0 f0-2)))))
|
||||
)
|
||||
(set!
|
||||
(-> gp-0 ambient-volume-movie)
|
||||
(the float (* 5 (the int (+ 0.5 (* 11.0 f0-2)))))
|
||||
)
|
||||
(set!
|
||||
(-> gp-0 dialog-volume-hint)
|
||||
(the float (* 5 (the int (+ 0.5 (* 16.0 f0-2)))))
|
||||
)
|
||||
(set! (-> gp-0 sfx-volume) (the float (* 5 (the int (+ 0.5 (* 15.0 f0-2))))))
|
||||
(set! (-> gp-0 music-volume) (the float (* 5 (the int (+ 0.5 (* 13.0 f0-2))))))
|
||||
(set! (-> gp-0 dialog-volume) (the float (* 5 (the int (+ 0.5 (* 20.0 f0-2))))))
|
||||
(set! (-> gp-0 ambient-volume) (the float (* 5 (the int (+ 0.5 (* 15.0 f0-2))))))
|
||||
(set! (-> gp-0 sfx-volume-movie) (the float (* 5 (the int (+ 0.5 (* 11.0 f0-2))))))
|
||||
(set! (-> gp-0 music-volume-movie) (the float (* 5 (the int (+ 0.5 (* 13.0 f0-2))))))
|
||||
(set! (-> gp-0 ambient-volume-movie) (the float (* 5 (the int (+ 0.5 (* 11.0 f0-2))))))
|
||||
(set! (-> gp-0 dialog-volume-hint) (the float (* 5 (the int (+ 0.5 (* 16.0 f0-2))))))
|
||||
)
|
||||
(set! (-> gp-0 language) (the-as int (scf-get-language)))
|
||||
(set! (-> gp-0 process-mask) (process-mask execute sleep))
|
||||
|
||||
@@ -85,7 +85,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type ambient-control
|
||||
(deftype ambient-control (structure)
|
||||
((last-ambient-time uint64 :offset-assert 0)
|
||||
(last-ambient basic :offset-assert 8)
|
||||
@@ -95,18 +94,17 @@
|
||||
:size-assert #x10
|
||||
:flag-assert #xc00000010
|
||||
(:methods
|
||||
(dummy-9 () none 9)
|
||||
(dummy-9 (_type_ vector int float process-drawable) none 9)
|
||||
(dummy-10 () none 10)
|
||||
(dummy-11 () none 11)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type process-taskable
|
||||
(deftype process-taskable (process-drawable)
|
||||
((tasks basic :offset-assert 176)
|
||||
((tasks task-control :offset-assert 176)
|
||||
(query gui-query :inline :offset-assert 180)
|
||||
(old-target-pos transformq :inline :offset-assert 208)
|
||||
(cell-for-task uint8 :offset-assert 256)
|
||||
(cell-for-task game-task :offset-assert 256)
|
||||
(cell-x uint64 :offset-assert 264)
|
||||
(cam-joint-index int32 :offset-assert 272)
|
||||
(skippable basic :offset-assert 276)
|
||||
@@ -134,39 +132,39 @@
|
||||
:size-assert #x17c
|
||||
:flag-assert #x350110017c
|
||||
(:methods
|
||||
(dummy-20 () none 20)
|
||||
(dummy-21 () none 21)
|
||||
(dummy-22 () none 22)
|
||||
(dummy-23 () none 23)
|
||||
(dummy-24 () none 24)
|
||||
(dummy-25 () none 25)
|
||||
(dummy-26 () none 26)
|
||||
(dummy-27 () none 27)
|
||||
(dummy-28 () none 28)
|
||||
(dummy-29 () none 29)
|
||||
(dummy-30 () none 30)
|
||||
(dummy-31 () none 31)
|
||||
(dummy-32 () none 32)
|
||||
(dummy-33 () none 33)
|
||||
(dummy-34 () none 34)
|
||||
(dummy-35 () none 35)
|
||||
(dummy-36 () none 36)
|
||||
(dummy-37 () none 37)
|
||||
(dummy-38 () none 38)
|
||||
(dummy-39 () none 39)
|
||||
(dummy-40 () none 40)
|
||||
(dummy-41 () none 41)
|
||||
(dummy-42 () none 42)
|
||||
(dummy-43 () none 43)
|
||||
(dummy-44 () none 44)
|
||||
(dummy-45 () none 45)
|
||||
(dummy-46 () none 46)
|
||||
(dummy-47 () none 47)
|
||||
(dummy-48 () none 48)
|
||||
(dummy-49 () none 49)
|
||||
(dummy-50 () none 50)
|
||||
(dummy-51 () none 51)
|
||||
(dummy-52 () none 52)
|
||||
(dummy-20 (_type_) none 20)
|
||||
(dummy-21 (_type_) none 21)
|
||||
(dummy-22 (_type_) none 22)
|
||||
(dummy-23 (_type_) none 23)
|
||||
(dummy-24 (_type_) none 24)
|
||||
(dummy-25 (_type_) none 25)
|
||||
(dummy-26 (_type_) none 26)
|
||||
(dummy-27 (_type_) none 27)
|
||||
(dummy-28 (_type_) none 28)
|
||||
(dummy-29 (_type_) none 29)
|
||||
(dummy-30 (_type_) none 30)
|
||||
(dummy-31 (_type_) none 31)
|
||||
(dummy-32 (_type_ symbol) spool-anim 32)
|
||||
(dummy-33 (_type_) none 33)
|
||||
(dummy-34 (_type_) none 34)
|
||||
(dummy-35 (_type_) none 35)
|
||||
(dummy-36 (_type_) none 36)
|
||||
(dummy-37 (_type_) none 37)
|
||||
(dummy-38 (_type_) none 38)
|
||||
(dummy-39 (_type_) none 39)
|
||||
(dummy-40 (_type_ object skeleton-group int int vector int) none 40)
|
||||
(dummy-41 (_type_) none 41)
|
||||
(dummy-42 (_type_) none 42)
|
||||
(dummy-43 (_type_) none 43)
|
||||
(dummy-44 (_type_) none 44)
|
||||
(dummy-45 (_type_) none 45)
|
||||
(dummy-46 (_type_) none 46)
|
||||
(dummy-47 (_type_) none 47)
|
||||
(dummy-48 (_type_) none 48)
|
||||
(dummy-49 (_type_) none 49)
|
||||
(dummy-50 (_type_) none 50)
|
||||
(dummy-51 (_type_) none 51)
|
||||
(dummy-52 (_type_) none 52)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -1,39 +1,22 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition (debug) for function task-status->string
|
||||
;; name: task-control.gc
|
||||
;; name in dgo: task-control
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
(defun-debug task-status->string ((arg0 task-status))
|
||||
(let ((v1-0 arg0))
|
||||
(cond
|
||||
((= v1-0 7)
|
||||
"need-resolution"
|
||||
)
|
||||
((= v1-0 6)
|
||||
"need-reward-speech"
|
||||
)
|
||||
((= v1-0 5)
|
||||
"need-reminder"
|
||||
)
|
||||
((= v1-0 4)
|
||||
"need-reminder-a"
|
||||
)
|
||||
((= v1-0 3)
|
||||
"need-introduction"
|
||||
)
|
||||
((= v1-0 2)
|
||||
"need-hint"
|
||||
)
|
||||
((= v1-0 1)
|
||||
"unknown"
|
||||
)
|
||||
((zero? v1-0)
|
||||
"invalid"
|
||||
)
|
||||
(else
|
||||
"*unknown*"
|
||||
)
|
||||
(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*")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod get-game-task task-cstage ((obj task-cstage))
|
||||
@@ -48,41 +31,43 @@
|
||||
|
||||
(defmethod closed? task-cstage ((obj task-cstage))
|
||||
"Is the closed flag set?"
|
||||
(nonzero? (logand (-> obj flags) (task-flags closed)))
|
||||
(declare (inline))
|
||||
|
||||
(logtest? (-> obj flags) (task-flags closed))
|
||||
)
|
||||
|
||||
(defmethod closed-by-default? task-cstage ((obj task-cstage))
|
||||
"Is the closed-by-default flag set?"
|
||||
(nonzero? (logand (-> obj flags) (task-flags closed-by-default)))
|
||||
(declare (inline))
|
||||
|
||||
(logtest? (-> obj flags) (task-flags closed-by-default))
|
||||
)
|
||||
|
||||
(defmethod task-available? task-cstage ((obj task-cstage) (arg0 task-control))
|
||||
"Is this task available to be the current task?"
|
||||
(let ((a0-1 obj))
|
||||
(cond
|
||||
((nonzero? (logand (-> a0-1 flags) (task-flags closed)))
|
||||
;; closed flag is set, we're already closed.
|
||||
#f
|
||||
)
|
||||
((>= (the-as int (-> (get-entity-task-perm *game-info* (-> obj game-task)) user-uint8 0))
|
||||
(the-as int (-> obj status))
|
||||
)
|
||||
;; the permanent entity for this task has stored that we have progresssed past
|
||||
;; our status. Remember that we are closed, and return #f.
|
||||
(set! (-> obj flags) (logior (-> obj flags) (task-flags closed)))
|
||||
#f
|
||||
)
|
||||
((task-complete? *game-info* (-> obj game-task))
|
||||
;; the game-info thinks that we have completed this task already.
|
||||
;; remember we are closed and return #f
|
||||
(set! (-> obj flags) (logior (-> obj flags) (task-flags closed)))
|
||||
#f
|
||||
)
|
||||
(else
|
||||
;; we aren't closed. Check the condition.
|
||||
((-> obj condition) arg0)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((closed? obj)
|
||||
;; we're already closed.
|
||||
#f
|
||||
)
|
||||
((>= (the-as int (-> (get-entity-task-perm *game-info* (-> obj game-task)) user-uint8 0))
|
||||
(the-as int (-> obj status))
|
||||
)
|
||||
;; the permanent entity for this task has stored that we have progresssed past
|
||||
;; our status. Remember that we are closed, and return #f.
|
||||
(logior! (-> obj flags) (task-flags closed))
|
||||
#f
|
||||
)
|
||||
((task-complete? *game-info* (-> obj game-task))
|
||||
;; the game-info thinks that we have completed this task already.
|
||||
;; remember we are closed and return #f
|
||||
(logior! (-> obj flags) (task-flags closed))
|
||||
#f
|
||||
)
|
||||
(else
|
||||
;; we aren't closed. Check the condition.
|
||||
((-> obj condition) arg0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -94,16 +79,14 @@
|
||||
)
|
||||
|
||||
;; flag as closed
|
||||
(set! (-> obj flags) (logior (-> obj flags) (task-flags closed)))
|
||||
(logior! (-> obj flags) (task-flags closed))
|
||||
;; do we have an entity to update?
|
||||
(when (nonzero? (logand (-> obj flags) (task-flags has-entity)))
|
||||
(when (logtest? (-> obj flags) (task-flags has-entity))
|
||||
|
||||
;; look up the permanent storage for the entity associated with our task
|
||||
(let ((v1-9 (get-entity-task-perm *game-info* (-> obj game-task))))
|
||||
;; we set a bit to indicate that we are storing a non-default status
|
||||
(set! (-> v1-9 status)
|
||||
(logior (-> v1-9 status) (entity-perm-status user-set-from-cstage))
|
||||
)
|
||||
(logior! (-> v1-9 status) (entity-perm-status user-set-from-cstage))
|
||||
;; and store the actual status (only increment)
|
||||
(if (< (-> v1-9 user-uint8 0) (the-as uint (-> obj status)))
|
||||
(set! (-> v1-9 user-int8 0) (the-as int (-> obj status)))
|
||||
@@ -115,7 +98,7 @@
|
||||
|
||||
(defmethod open-task! task-cstage ((obj task-cstage))
|
||||
"Clear the closed flag."
|
||||
(set! (-> obj flags) (logand (lognot (task-flags closed)) (-> obj flags)))
|
||||
(logclear! (-> obj flags) (task-flags closed))
|
||||
0
|
||||
)
|
||||
|
||||
@@ -143,7 +126,6 @@
|
||||
;; look up the current cstage's task
|
||||
(the-as int (-> obj stage (-> obj current-stage) game-task))
|
||||
)
|
||||
|
||||
)
|
||||
)
|
||||
|
||||
@@ -183,7 +165,6 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 12 of type task-control
|
||||
(defmethod close-status! task-control ((obj task-control) (arg0 task-status))
|
||||
"Close the cstage that:
|
||||
- is associated with the task for the current cstage
|
||||
@@ -234,8 +215,9 @@
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod reset! task-control ((obj task-control) (arg0 symbol) (arg1 symbol))
|
||||
"Reset a task control. arg1 to warn on null, arg1 'game for a game reset"
|
||||
(defmethod reset! task-control ((obj task-control) (reset-mode symbol) (arg1 symbol))
|
||||
"Reset a task control. arg1 to warn on null, reset-mode 'game for a game reset"
|
||||
|
||||
(when (= obj *null-task-control*)
|
||||
(if arg1
|
||||
(format 0 "ERROR<GMJ>: reset! received self of *null-task-control*~%~%")
|
||||
@@ -244,24 +226,15 @@
|
||||
)
|
||||
(dotimes (s4-0 (-> obj stage length))
|
||||
;; do we open the task?
|
||||
(if (or (= arg0 'game) ;; if we're resetting the whole game, yes
|
||||
(let ((a0-4 (-> obj stage s4-0)))
|
||||
(not (nonzero? (logand
|
||||
(-> a0-4 flags)
|
||||
(task-flags closed-by-default) ;; todo this flag?
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (or (= reset-mode 'game) ;; open every task on game reset
|
||||
(not (closed-by-default? (-> obj stage s4-0))) ;; todo this flag?
|
||||
)
|
||||
(open-task! (-> obj stage s4-0))
|
||||
)
|
||||
|
||||
;; call close-task! to send closed stuff to entities
|
||||
(let ((a0-10 (-> obj stage s4-0)))
|
||||
(if (nonzero? (logand (-> a0-10 flags) (task-flags closed)))
|
||||
(close-task! (-> obj stage s4-0))
|
||||
)
|
||||
(if (closed? (-> obj stage s4-0))
|
||||
(close-task! (-> obj stage s4-0))
|
||||
)
|
||||
)
|
||||
(the-as int #f)
|
||||
@@ -270,6 +243,7 @@
|
||||
|
||||
(defmethod closed? task-control ((obj task-control) (arg0 game-task) (arg1 task-status))
|
||||
"Is the given task/status cstage closed?"
|
||||
|
||||
(when (= obj *null-task-control*)
|
||||
(format 0 "ERROR<GMJ>: closed? received self of *null-task-control*~%~%")
|
||||
(return #f)
|
||||
@@ -279,10 +253,7 @@
|
||||
(when (and (= arg0 (-> obj stage v1-3 game-task))
|
||||
(= arg1 (-> obj stage v1-3 status))
|
||||
)
|
||||
(let ((a0-3 (-> obj stage v1-3)))
|
||||
;; is the closed set?
|
||||
(return (nonzero? (logand (-> a0-3 flags) (task-flags closed))))
|
||||
)
|
||||
(return (closed? (-> obj stage v1-3)))
|
||||
)
|
||||
)
|
||||
(format 0 "ERROR<GMJ>: closed? received non-existent task-cstage(~S ~S)--returning #t.~%"
|
||||
@@ -325,9 +296,7 @@
|
||||
)
|
||||
(let ((v1-4 (get-entity-task-perm *game-info* (-> obj stage 0 game-task))))
|
||||
;; remember that we have a change.
|
||||
(set! (-> v1-4 status)
|
||||
(logior (-> v1-4 status) (entity-perm-status user-set-from-cstage))
|
||||
)
|
||||
(logior! (-> v1-4 status) (entity-perm-status user-set-from-cstage))
|
||||
(set! (-> v1-4 user-int8 (+ arg1 1)) arg0)
|
||||
)
|
||||
0
|
||||
@@ -338,7 +307,8 @@
|
||||
;; Task Control Definitions
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; definition for symbol *assistant-tasks*, type task-control
|
||||
|
||||
;; tasks for assistant (note: keira)
|
||||
(define *assistant-tasks*
|
||||
(new 'static 'task-control
|
||||
:current-stage -1
|
||||
@@ -348,48 +318,25 @@
|
||||
(new 'static 'task-cstage
|
||||
:game-task (game-task jungle-eggtop)
|
||||
:status (task-status need-hint)
|
||||
:flags
|
||||
(task-flags has-entity closed-by-default)
|
||||
:flags (task-flags has-entity closed-by-default)
|
||||
:condition (lambda ((arg0 task-control)) #t)
|
||||
)
|
||||
(new 'static 'task-cstage
|
||||
:game-task (game-task jungle-eggtop)
|
||||
:status (task-status need-introduction)
|
||||
:flags
|
||||
(task-flags has-entity closed-by-default)
|
||||
:flags (task-flags has-entity closed-by-default)
|
||||
:condition (lambda ((arg0 task-control)) #t)
|
||||
)
|
||||
(new 'static 'task-cstage
|
||||
:game-task (game-task misty-bike)
|
||||
:status (task-status need-hint)
|
||||
:flags
|
||||
(task-flags has-entity closed-by-default)
|
||||
:flags (task-flags has-entity closed-by-default)
|
||||
:condition
|
||||
(lambda
|
||||
((arg0 task-control))
|
||||
(with-pp
|
||||
(or
|
||||
(closed? arg0 (game-task jungle-eggtop) (task-status need-reminder))
|
||||
(and
|
||||
(closed?
|
||||
arg0
|
||||
(game-task jungle-eggtop)
|
||||
(task-status need-introduction)
|
||||
)
|
||||
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-2 from) pp)
|
||||
(set! (-> a1-2 num-params) 2)
|
||||
(set! (-> a1-2 message) 'query)
|
||||
(set! (-> a1-2 param 0) (the-as uint 'pickup))
|
||||
(set! (-> a1-2 param 1) (the-as uint 6))
|
||||
(>=
|
||||
(the int (send-event-function *target* a1-2))
|
||||
(+ (get-reminder arg0 1) 3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(lambda ((arg0 task-control))
|
||||
(or (closed? arg0 (game-task jungle-eggtop) (task-status need-reminder))
|
||||
(and (closed? arg0 (game-task jungle-eggtop) (task-status need-introduction))
|
||||
(>= (the int (send-event *target* 'query 'pickup 6)) (+ (get-reminder arg0 1) 3)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(new 'static 'task-cstage
|
||||
@@ -398,31 +345,11 @@
|
||||
:flags
|
||||
(task-flags has-entity closed-by-default)
|
||||
:condition
|
||||
(lambda
|
||||
((arg0 task-control))
|
||||
(with-pp
|
||||
(or
|
||||
(closed? arg0 (game-task jungle-eggtop) (task-status need-reminder))
|
||||
(and
|
||||
(closed?
|
||||
arg0
|
||||
(game-task jungle-eggtop)
|
||||
(task-status need-introduction)
|
||||
)
|
||||
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-2 from) pp)
|
||||
(set! (-> a1-2 num-params) 2)
|
||||
(set! (-> a1-2 message) 'query)
|
||||
(set! (-> a1-2 param 0) (the-as uint 'pickup))
|
||||
(set! (-> a1-2 param 1) (the-as uint 6))
|
||||
(>=
|
||||
(the int (send-event-function *target* a1-2))
|
||||
(+ (get-reminder arg0 1) 3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(lambda ((arg0 task-control))
|
||||
(or (closed? arg0 (game-task jungle-eggtop) (task-status need-reminder))
|
||||
(and (closed? arg0 (game-task jungle-eggtop) (task-status need-introduction))
|
||||
(>= (the int (send-event *target* 'query 'pickup 6)) (+ (get-reminder arg0 1) 3)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(new 'static 'task-cstage
|
||||
@@ -452,12 +379,8 @@
|
||||
:status (task-status unknown)
|
||||
:flags (task-flags has-entity)
|
||||
:condition
|
||||
(lambda
|
||||
((arg0 task-control))
|
||||
(task-closed?
|
||||
(game-task village4-button)
|
||||
(task-status need-reward-speech)
|
||||
)
|
||||
(lambda ((arg0 task-control))
|
||||
(task-closed? (game-task village4-button) (task-status need-reward-speech))
|
||||
)
|
||||
)
|
||||
(new 'static 'task-cstage
|
||||
@@ -481,9 +404,8 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for symbol *assistant-village2-tasks*, type task-control
|
||||
(define
|
||||
*assistant-village2-tasks*
|
||||
;; tasks for assistant, village2 variant
|
||||
(define *assistant-village2-tasks*
|
||||
(new 'static 'task-control
|
||||
:current-stage -1
|
||||
:stage
|
||||
@@ -522,18 +444,7 @@
|
||||
:status (task-status need-reward-speech)
|
||||
:flags (task-flags has-entity)
|
||||
:condition
|
||||
(lambda
|
||||
((arg0 task-control))
|
||||
(with-pp (let ((a1-0 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-0 from) pp)
|
||||
(set! (-> a1-0 num-params) 2)
|
||||
(set! (-> a1-0 message) 'query)
|
||||
(set! (-> a1-0 param 0) (the-as uint 'pickup))
|
||||
(set! (-> a1-0 param 1) (the-as uint 6))
|
||||
(>= (the int (send-event-function *target* a1-0)) 45)
|
||||
)
|
||||
)
|
||||
)
|
||||
(lambda ((arg0 task-control)) (>= (the int (send-event *target* 'query 'pickup 2)) 45))
|
||||
)
|
||||
(new 'static 'task-cstage
|
||||
:game-task (game-task sunken-room)
|
||||
@@ -3392,39 +3303,23 @@
|
||||
(new 'static 'task-cstage
|
||||
:game-task (game-task village2-warrior-money)
|
||||
:status (task-status need-hint)
|
||||
:flags
|
||||
(task-flags has-entity closed-by-default)
|
||||
:flags (task-flags has-entity closed-by-default)
|
||||
:condition
|
||||
(lambda
|
||||
((arg0 task-control))
|
||||
(and
|
||||
(not (task-closed? (game-task ogre-boss) (task-status need-reminder)))
|
||||
(not
|
||||
(task-closed?
|
||||
(game-task village2-levitator)
|
||||
(task-status need-reward-speech)
|
||||
)
|
||||
)
|
||||
)
|
||||
(lambda ((arg0 task-control))
|
||||
(and (not (task-closed? (game-task ogre-boss) (task-status need-reminder)))
|
||||
(not (task-closed? (game-task village2-levitator) (task-status need-reward-speech)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(new 'static 'task-cstage
|
||||
:game-task (game-task village2-warrior-money)
|
||||
:status (task-status need-introduction)
|
||||
:flags
|
||||
(task-flags has-entity closed-by-default)
|
||||
:flags (task-flags has-entity closed-by-default)
|
||||
:condition
|
||||
(lambda
|
||||
((arg0 task-control))
|
||||
(and
|
||||
(not (task-closed? (game-task ogre-boss) (task-status need-reminder)))
|
||||
(not
|
||||
(task-closed?
|
||||
(game-task village2-levitator)
|
||||
(task-status need-reward-speech)
|
||||
)
|
||||
)
|
||||
)
|
||||
(lambda ((arg0 task-control))
|
||||
(and (not (task-closed? (game-task ogre-boss) (task-status need-reminder)))
|
||||
(not (task-closed? (game-task village2-levitator) (task-status need-reward-speech)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(new 'static 'task-cstage
|
||||
@@ -3432,31 +3327,8 @@
|
||||
:status (task-status need-reward-speech)
|
||||
:flags (task-flags has-entity)
|
||||
:condition
|
||||
(lambda
|
||||
((arg0 task-control))
|
||||
(with-pp
|
||||
(the-as
|
||||
symbol
|
||||
(and *target* (let ((a1-0 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-0 from) pp)
|
||||
(set! (-> a1-0 num-params) 2)
|
||||
(set! (-> a1-0 message) 'query)
|
||||
(set! (-> a1-0 param 0) (the-as uint 'pickup))
|
||||
(set! (-> a1-0 param 1) (the-as uint 5))
|
||||
(>=
|
||||
((the-as
|
||||
(function process event-message-block float)
|
||||
send-event-function
|
||||
)
|
||||
*target*
|
||||
a1-0
|
||||
)
|
||||
(-> *GAME-bank* money-task-inc)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(lambda ((arg0 task-control))
|
||||
(>= (the-as float (send-event *target* 'query 'pickup 5)) (-> *GAME-bank* money-task-inc))
|
||||
)
|
||||
)
|
||||
(new 'static 'task-cstage
|
||||
@@ -5234,17 +5106,8 @@
|
||||
:status (task-status need-reward-speech)
|
||||
:flags (task-flags has-entity)
|
||||
:condition
|
||||
(lambda
|
||||
((arg0 task-control))
|
||||
(with-pp (let ((a1-0 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-0 from) pp)
|
||||
(set! (-> a1-0 num-params) 2)
|
||||
(set! (-> a1-0 message) 'query)
|
||||
(set! (-> a1-0 param 0) (the-as uint 'pickup))
|
||||
(set! (-> a1-0 param 1) (the-as uint 6))
|
||||
(>= (the int (send-event-function *target* a1-0)) 72)
|
||||
)
|
||||
)
|
||||
(lambda ((arg0 task-control))
|
||||
(>= (the int (send-event *target* 'query 'pickup 6)) 72)
|
||||
)
|
||||
)
|
||||
(new 'static 'task-cstage
|
||||
@@ -5413,12 +5276,8 @@
|
||||
:status (task-status unknown)
|
||||
:flags (task-flags has-entity)
|
||||
:condition
|
||||
(lambda
|
||||
((arg0 task-control))
|
||||
(task-closed?
|
||||
(game-task village4-button)
|
||||
(task-status need-reward-speech)
|
||||
)
|
||||
(lambda ((arg0 task-control))
|
||||
(task-closed? (game-task village4-button) (task-status need-reward-speech))
|
||||
)
|
||||
)
|
||||
(new 'static 'task-cstage
|
||||
@@ -5533,17 +5392,14 @@
|
||||
0
|
||||
)
|
||||
|
||||
;; definition for function task-closed?
|
||||
(defun task-closed? ((arg0 game-task) (arg1 task-status))
|
||||
(closed? (get-task-control arg0) arg0 arg1)
|
||||
)
|
||||
|
||||
;; definition for function task-exists?
|
||||
(defun task-exists? ((arg0 game-task) (arg1 task-status))
|
||||
(exists? (get-task-control arg0) arg0 arg1)
|
||||
)
|
||||
|
||||
;; definition for function task-known?
|
||||
(defun task-known? ((arg0 game-task))
|
||||
"Is there a cstage with a non-unknown status?"
|
||||
(let ((v1-0 (get-task-status arg0)))
|
||||
@@ -5562,7 +5418,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function sages-kidnapped?
|
||||
(defun sages-kidnapped? ()
|
||||
(task-closed? (game-task village4-button) (task-status need-reward-speech))
|
||||
)
|
||||
@@ -5593,7 +5448,6 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(task-control-reset 'game)
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
;; name in dgo: depth-cue-h
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; depth-cue-h
|
||||
|
||||
(deftype depth-cue-data (structure)
|
||||
((data vector :inline :offset-assert 0)
|
||||
(sharpness float :offset 0)
|
||||
@@ -18,7 +18,6 @@
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; depth-cue-h
|
||||
(deftype depth-cue-work (structure)
|
||||
((texture-strip-tmpl dma-gif-packet :inline :offset-assert 0)
|
||||
(temp-strip-tmpl dma-gif-packet :inline :offset-assert 32)
|
||||
|
||||
@@ -39,12 +39,12 @@
|
||||
(r-sun float :offset 16)
|
||||
(r-halo float :offset 20)
|
||||
(r-aurora float :offset 24)
|
||||
(c-sun-start uint32 :offset 32)
|
||||
(c-sun-end uint32 :offset 48)
|
||||
(c-halo-start uint32 :offset 36)
|
||||
(c-halo-end uint32 :offset 52)
|
||||
(c-aurora-start uint32 :offset 40)
|
||||
(c-aurora-end uint32 :offset 56)
|
||||
(c-sun-start rgba :offset 32)
|
||||
(c-sun-end rgba :offset 48)
|
||||
(c-halo-start rgba :offset 36)
|
||||
(c-halo-end rgba :offset 52)
|
||||
(c-aurora-start rgba :offset 40)
|
||||
(c-aurora-end rgba :offset 56)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x40
|
||||
@@ -76,9 +76,7 @@
|
||||
)
|
||||
|
||||
(deftype sky-upload-data (basic)
|
||||
(
|
||||
;;(data UNKNOWN 27 :offset-assert 16)
|
||||
(circle sky-circle-data :inline :offset-assert 16)
|
||||
((circle sky-circle-data :inline :offset-assert 16)
|
||||
(sun sky-sun-data 2 :inline :offset-assert 288)
|
||||
(moon sky-moon-data :inline :offset-assert 416)
|
||||
(data uint128 27 :offset 16)
|
||||
@@ -106,12 +104,12 @@
|
||||
)
|
||||
|
||||
(defmethod new sky-parms ((allocation symbol) (type-to-make type))
|
||||
(local-vars (v0-0 sky-parms))
|
||||
(set! v0-0
|
||||
(object-new allocation type-to-make (the-as int (-> type-to-make size)))
|
||||
)
|
||||
(set! (-> v0-0 upload-data type) sky-upload-data)
|
||||
v0-0
|
||||
"allocate a new sky-parms"
|
||||
|
||||
(let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(set! (-> v0-0 upload-data type) sky-upload-data)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
(define *sky-parms* (new 'global 'sky-parms))
|
||||
|
||||
@@ -5,10 +5,7 @@
|
||||
;; name in dgo: sky-utils
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; definition for function sky-set-sun-radii
|
||||
(defun
|
||||
sky-set-sun-radii
|
||||
((arg0 sky-parms) (arg1 int) (arg2 float) (arg3 float) (arg4 float))
|
||||
(defun sky-set-sun-radii ((arg0 sky-parms) (arg1 int) (arg2 float) (arg3 float) (arg4 float))
|
||||
(let ((v1-0 (logand arg1 1)))
|
||||
(set! (-> arg0 upload-data sun v1-0 r-sun) arg2)
|
||||
(set! (-> arg0 upload-data sun v1-0 r-halo) arg3)
|
||||
@@ -17,10 +14,7 @@
|
||||
#f
|
||||
)
|
||||
|
||||
;; definition for function sky-set-sun-colors
|
||||
(defun
|
||||
sky-set-sun-colors
|
||||
((arg0 sky-parms) (arg1 int) (arg2 uint) (arg3 uint) (arg4 uint) (arg5 uint))
|
||||
(defun sky-set-sun-colors ((arg0 sky-parms) (arg1 int) (arg2 rgba) (arg3 rgba) (arg4 rgba) (arg5 rgba))
|
||||
(let ((v1-0 (logand arg1 1)))
|
||||
(set! (-> arg0 upload-data sun v1-0 c-sun-start) arg2)
|
||||
(set! (-> arg0 upload-data sun v1-0 c-sun-end) arg3)
|
||||
@@ -32,10 +26,7 @@
|
||||
#f
|
||||
)
|
||||
|
||||
;; definition for function sky-set-sun-colors-sun
|
||||
(defun
|
||||
sky-set-sun-colors-sun
|
||||
((arg0 sky-parms) (arg1 int) (arg2 uint) (arg3 uint))
|
||||
(defun sky-set-sun-colors-sun ((arg0 sky-parms) (arg1 int) (arg2 rgba) (arg3 rgba))
|
||||
(let ((v1-0 (logand arg1 1)))
|
||||
(set! (-> arg0 upload-data sun v1-0 c-sun-start) arg2)
|
||||
(set! (-> arg0 upload-data sun v1-0 c-sun-end) arg3)
|
||||
@@ -43,10 +34,7 @@
|
||||
#f
|
||||
)
|
||||
|
||||
;; definition for function sky-set-sun-colors-halo
|
||||
(defun
|
||||
sky-set-sun-colors-halo
|
||||
((arg0 sky-parms) (arg1 int) (arg2 uint) (arg3 uint))
|
||||
(defun sky-set-sun-colors-halo ((arg0 sky-parms) (arg1 int) (arg2 rgba) (arg3 rgba))
|
||||
(let ((v1-0 (logand arg1 1)))
|
||||
(set! (-> arg0 upload-data sun v1-0 c-halo-start) arg2)
|
||||
(set! (-> arg0 upload-data sun v1-0 c-halo-end) arg3)
|
||||
@@ -54,10 +42,7 @@
|
||||
#f
|
||||
)
|
||||
|
||||
;; definition for function sky-set-sun-colors-aurora
|
||||
(defun
|
||||
sky-set-sun-colors-aurora
|
||||
((arg0 sky-parms) (arg1 int) (arg2 uint) (arg3 uint))
|
||||
(defun sky-set-sun-colors-aurora ((arg0 sky-parms) (arg1 int) (arg2 rgba) (arg3 rgba))
|
||||
(let ((v1-0 (logand arg1 1)))
|
||||
(set! (-> arg0 upload-data sun v1-0 c-aurora-start) arg2)
|
||||
(set! (-> arg0 upload-data sun v1-0 c-aurora-end) arg3)
|
||||
@@ -65,18 +50,7 @@
|
||||
#f
|
||||
)
|
||||
|
||||
;; definition for function sky-set-orbit
|
||||
(defun
|
||||
sky-set-orbit
|
||||
((arg0 sky-parms)
|
||||
(arg1 int)
|
||||
(arg2 float)
|
||||
(arg3 float)
|
||||
(arg4 float)
|
||||
(arg5 float)
|
||||
(arg6 float)
|
||||
(arg7 float)
|
||||
)
|
||||
(defun sky-set-orbit ((arg0 sky-parms) (arg1 int) (arg2 float) (arg3 float) (arg4 float) (arg5 float) (arg6 float) (arg7 float))
|
||||
(set! (-> arg0 orbit arg1 high-noon) arg2)
|
||||
(set! (-> arg0 orbit arg1 tilt) (* 0.017453292 arg3))
|
||||
(set! (-> arg0 orbit arg1 rise) (* 0.017453292 arg4))
|
||||
|
||||
@@ -382,7 +382,7 @@
|
||||
)
|
||||
)
|
||||
(('loading-bt)
|
||||
;; finished loading the background!
|
||||
;; finished loading the last object!
|
||||
(level-status-set! obj 'loading-done)
|
||||
(level-status-set! obj 'loaded)
|
||||
)
|
||||
@@ -406,7 +406,7 @@
|
||||
;; something has finished loading!
|
||||
(cond
|
||||
((not last-obj)
|
||||
;; not the last object, so it's some non-background file. start linking
|
||||
;; not the last object. start linking
|
||||
(cond
|
||||
((dgo-load-link (the-as dgo-header a0-15) (-> obj heap) *print-login* #f)
|
||||
;; linking finished (that was fast)
|
||||
@@ -421,7 +421,7 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
;; the background is always the last object, so we're loading the background now
|
||||
;; we're loading the last object now, which has different rules
|
||||
(set! (-> obj heap top) (-> obj heap top-base))
|
||||
(level-status-set! obj 'loading-bt)
|
||||
)
|
||||
@@ -434,7 +434,7 @@
|
||||
(level-update-after-load obj *login-state*)
|
||||
)
|
||||
(('loading-bt)
|
||||
;; link the bt object
|
||||
;; link the last object
|
||||
(let ((a0-26 (align64 (-> obj heap current))))
|
||||
(cond
|
||||
((dgo-load-link (the-as dgo-header a0-26) (-> obj heap) *print-login* #t)
|
||||
@@ -452,7 +452,7 @@
|
||||
)
|
||||
|
||||
(defmethod load-begin level ((obj level))
|
||||
"Start loading the level. Uses 2 megabyte heaps for loading each non-bt object."
|
||||
"Start loading the level. Uses 2 megabyte heaps for loading each object."
|
||||
|
||||
(set! loading-level (-> obj heap))
|
||||
(set! (-> *level* loading-level) obj)
|
||||
@@ -575,7 +575,7 @@
|
||||
(let ((s2-2 (-> loaded-level art-group art-group-array v1-39)))
|
||||
(dummy-9 s2-2)
|
||||
(if (dummy-12 s2-2)
|
||||
(dummy-13 s2-2)
|
||||
(link-art! s2-2)
|
||||
)
|
||||
)
|
||||
(1+! (-> level-login-state elts))
|
||||
@@ -788,7 +788,7 @@
|
||||
(dotimes (s5-0 (-> obj art-group art-group-array length))
|
||||
(let ((s4-0 (-> obj art-group art-group-array s5-0)))
|
||||
(if (dummy-12 s4-0)
|
||||
(dummy-14 s4-0)
|
||||
(unlink-art! s4-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1200,12 +1200,12 @@
|
||||
0
|
||||
)
|
||||
|
||||
(defun play ((use-vis symbol) (arg1 symbol))
|
||||
(defun play ((use-vis symbol) (init-game symbol))
|
||||
"The entry point to the actual game! This allocates the level heaps, loads some data, sets some default parameters and sets the startup level."
|
||||
|
||||
;; temp
|
||||
(format #t "(play ~A ~A) has been called!~%" use-vis arg1)
|
||||
(format 0 "(play ~A ~A) has been called!~%" use-vis arg1)
|
||||
(format #t "(play :use-vis ~A :init-game ~A) has been called!~%" use-vis init-game)
|
||||
(format 0 "(play :use-vis ~A :init-game ~A) has been called!~%" use-vis init-game)
|
||||
;;(kernel-shutdown)
|
||||
|
||||
(let ((startup-level (case *kernel-boot-message*
|
||||
@@ -1260,8 +1260,8 @@
|
||||
(load-dbg "Load complete. Level: ~A. Now starting display!~%" (-> *level* level0))
|
||||
(on #t)
|
||||
(load-dbg "Display started: ~A~%" *dproc*)
|
||||
(when arg1
|
||||
;; (dummy-9 *game-info* 'game #f (the-as string #f)) TODO
|
||||
(when init-game
|
||||
(initialize! *game-info* 'game (the-as game-save #f) (the-as string #f))
|
||||
)
|
||||
0
|
||||
)
|
||||
@@ -1307,87 +1307,55 @@
|
||||
)
|
||||
)
|
||||
(when (and gp-0 (!= gp-0 *sound-bank-1*) (!= gp-0 *sound-bank-2*))
|
||||
(if (not *sound-bank-1*)
|
||||
(return (begin
|
||||
(format 0 "Load soundbank ~A~%" gp-0)
|
||||
(sound-bank-load (string->sound-name (symbol->string gp-0)))
|
||||
(set! *sound-bank-1* gp-0)
|
||||
0
|
||||
)
|
||||
)
|
||||
(when (not *sound-bank-1*)
|
||||
(format 0 "Load soundbank ~A~%" gp-0)
|
||||
(sound-bank-load (string->sound-name (symbol->string gp-0)))
|
||||
(set! *sound-bank-1* gp-0)
|
||||
(return 0)
|
||||
)
|
||||
(if (not *sound-bank-2*)
|
||||
(return (begin
|
||||
(format 0 "Load soundbank ~A~%" gp-0)
|
||||
(sound-bank-load (string->sound-name (symbol->string gp-0)))
|
||||
(set! *sound-bank-2* gp-0)
|
||||
0
|
||||
)
|
||||
)
|
||||
(when (not *sound-bank-2*)
|
||||
(format 0 "Load soundbank ~A~%" gp-0)
|
||||
(sound-bank-load (string->sound-name (symbol->string gp-0)))
|
||||
(set! *sound-bank-2* gp-0)
|
||||
(return 0)
|
||||
)
|
||||
(if (!= *sound-bank-1* s5-0)
|
||||
(return (begin
|
||||
(format 0 "Unload soundbank ~A~%" *sound-bank-1*)
|
||||
(sound-bank-unload
|
||||
(string->sound-name (symbol->string *sound-bank-1*))
|
||||
)
|
||||
(set! *sound-bank-1* #f)
|
||||
0
|
||||
)
|
||||
)
|
||||
(when (!= *sound-bank-1* s5-0)
|
||||
(format 0 "Unload soundbank ~A~%" *sound-bank-1*)
|
||||
(sound-bank-unload (string->sound-name (symbol->string *sound-bank-1*)))
|
||||
(set! *sound-bank-1* #f)
|
||||
(return 0)
|
||||
)
|
||||
(if (!= *sound-bank-2* s5-0)
|
||||
(return (begin
|
||||
(format 0 "Unload soundbank ~A~%" *sound-bank-2*)
|
||||
(sound-bank-unload
|
||||
(string->sound-name (symbol->string *sound-bank-2*))
|
||||
)
|
||||
(set! *sound-bank-2* #f)
|
||||
0
|
||||
)
|
||||
)
|
||||
(when (!= *sound-bank-2* s5-0)
|
||||
(format 0 "Unload soundbank ~A~%" *sound-bank-2*)
|
||||
(sound-bank-unload (string->sound-name (symbol->string *sound-bank-2*)))
|
||||
(set! *sound-bank-2* #f)
|
||||
(return 0)
|
||||
)
|
||||
)
|
||||
(when (and s5-0 (!= s5-0 *sound-bank-1*) (!= s5-0 *sound-bank-2*))
|
||||
(if (not *sound-bank-1*)
|
||||
(return (begin
|
||||
(format 0 "Load soundbank ~A~%" s5-0)
|
||||
(sound-bank-load (string->sound-name (symbol->string s5-0)))
|
||||
(set! *sound-bank-1* s5-0)
|
||||
0
|
||||
)
|
||||
)
|
||||
(when (not *sound-bank-1*)
|
||||
(format 0 "Load soundbank ~A~%" s5-0)
|
||||
(sound-bank-load (string->sound-name (symbol->string s5-0)))
|
||||
(set! *sound-bank-1* s5-0)
|
||||
(return 0)
|
||||
)
|
||||
(if (not *sound-bank-2*)
|
||||
(return (begin
|
||||
(format 0 "Load soundbank ~A~%" s5-0)
|
||||
(sound-bank-load (string->sound-name (symbol->string s5-0)))
|
||||
(set! *sound-bank-2* s5-0)
|
||||
0
|
||||
)
|
||||
)
|
||||
(when (not *sound-bank-2*)
|
||||
(format 0 "Load soundbank ~A~%" s5-0)
|
||||
(sound-bank-load (string->sound-name (symbol->string s5-0)))
|
||||
(set! *sound-bank-2* s5-0)
|
||||
(return 0)
|
||||
)
|
||||
(if (!= *sound-bank-1* gp-0)
|
||||
(return (begin
|
||||
(format 0 "Unload soundbank ~A~%" *sound-bank-1*)
|
||||
(sound-bank-unload
|
||||
(string->sound-name (symbol->string *sound-bank-1*))
|
||||
)
|
||||
(set! *sound-bank-1* #f)
|
||||
0
|
||||
)
|
||||
)
|
||||
(when (!= *sound-bank-1* gp-0)
|
||||
(format 0 "Unload soundbank ~A~%" *sound-bank-1*)
|
||||
(sound-bank-unload (string->sound-name (symbol->string *sound-bank-1*)))
|
||||
(set! *sound-bank-1* #f)
|
||||
(return 0)
|
||||
)
|
||||
(if (!= *sound-bank-2* gp-0)
|
||||
(return (begin
|
||||
(format 0 "Unload soundbank ~A~%" *sound-bank-2*)
|
||||
(sound-bank-unload
|
||||
(string->sound-name (symbol->string *sound-bank-2*))
|
||||
)
|
||||
(set! *sound-bank-2* #f)
|
||||
0
|
||||
)
|
||||
)
|
||||
(when (!= *sound-bank-2* gp-0)
|
||||
(format 0 "Unload soundbank ~A~%" *sound-bank-2*)
|
||||
(sound-bank-unload (string->sound-name (symbol->string *sound-bank-2*)))
|
||||
(set! *sound-bank-2* #f)
|
||||
(return 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -183,16 +183,15 @@ struct DgoHeader {
|
||||
;; STR PLAY
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; unknown. I think related to playing cutscene stuff?
|
||||
;; play streamed audio for a STR
|
||||
|
||||
(defun str-play-async ((name string) (addr pointer))
|
||||
(defun str-play-async ((name string) (id sound-id))
|
||||
"Queue a play cmd to do... something?
|
||||
Locks the queue, doesn't check other locks"
|
||||
(set! *que-str-lock* #t)
|
||||
(let ((cmd (the-as load-chunk-msg (add-element *play-str-rpc*))))
|
||||
(charp<-string (-> cmd basename) name)
|
||||
;; might be an id?
|
||||
(set! (-> cmd address) addr)
|
||||
(set! (-> cmd address) (the-as pointer id))
|
||||
;; probably using a different enum here
|
||||
(set! (-> cmd result) (load-msg-result done))
|
||||
)
|
||||
|
||||
@@ -8,6 +8,13 @@
|
||||
;; This is not well-understood yet, but it is definitely related to streaming animation loading,
|
||||
;; and possibly art-group stuff.
|
||||
|
||||
|
||||
(defconstant SPOOL_PRIORITY_LOWEST 100000000.0)
|
||||
(defconstant SPOOL_PRIORITY_RECALC -99.0)
|
||||
(defconstant SPOOL_PRIORITY_HIGHEST -20.0)
|
||||
(defconstant SPOOL_PRIORITY_HIGH -10.0)
|
||||
|
||||
|
||||
;; This type didn't have an inspect method, so these field names are made up.
|
||||
(declare-type art-group basic)
|
||||
(deftype load-dir (basic)
|
||||
@@ -18,19 +25,20 @@
|
||||
:flag-assert #xb00000010
|
||||
(:methods
|
||||
(new (symbol type int basic) _type_ 0)
|
||||
(dummy-9 () none 9)
|
||||
(dummy-10 () none 10)
|
||||
(dummy-9 (_type_ string symbol kheap int) art-group 9)
|
||||
(dummy-10 (_type_ art-group) art-group 10)
|
||||
)
|
||||
)
|
||||
|
||||
;; specialization of load-dir where the data-array holds art-groups.
|
||||
(declare-type art-group basic)
|
||||
(deftype load-dir-art-group (load-dir)
|
||||
((art-group-array (array art-group) :offset 12)
|
||||
)
|
||||
:flag-assert #xb00000010
|
||||
(:methods
|
||||
(new (symbol type int basic) _type_ 0)
|
||||
(dummy-9 (_type_ string symbol kheap int) art-group 9)
|
||||
(dummy-10 (_type_ art-group) art-group 10)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -76,13 +84,13 @@
|
||||
(heap kheap :inline :offset-assert 32)
|
||||
(pending-load-file string :offset-assert 48)
|
||||
(pending-load-file-part int32 :offset-assert 52)
|
||||
(pending-load-file-owner uint64 :offset-assert 56)
|
||||
(pending-load-file-owner handle :offset-assert 56)
|
||||
(pending-load-file-priority float :offset-assert 64)
|
||||
(load-file string :offset-assert 68)
|
||||
(load-file-part int32 :offset-assert 72)
|
||||
(load-file-owner uint64 :offset-assert 80)
|
||||
(load-file-owner handle :offset-assert 80)
|
||||
(load-file-priority float :offset-assert 88)
|
||||
(buf uint32 :offset-assert 92)
|
||||
(buf pointer :offset-assert 92)
|
||||
(len int32 :offset-assert 96)
|
||||
(art-group art-group :offset-assert 100)
|
||||
)
|
||||
@@ -91,13 +99,13 @@
|
||||
:flag-assert #x1000000068
|
||||
(:methods
|
||||
(new (symbol type int) _type_ 0)
|
||||
(dummy-9 (_type_ symbol int symbol float) 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)
|
||||
(want-file (_type_ string int handle float) int 9)
|
||||
(update (_type_) int 10)
|
||||
(inactive? (_type_) symbol 11)
|
||||
(file-status (_type_ string int) symbol 12)
|
||||
(link-file (_type_ art-group) art-group 13)
|
||||
(unlink-file (_type_ art-group) int 14)
|
||||
(unlock! (_type_) symbol 15)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -107,12 +115,12 @@
|
||||
(set! (-> obj index) idx)
|
||||
(set! (-> obj load-file) #f)
|
||||
(set! (-> obj load-file-part) -1)
|
||||
(set! (-> obj load-file-owner) (the-as uint #f))
|
||||
(set! (-> obj load-file-priority) 100000000.0)
|
||||
(set! (-> obj load-file-owner) (the-as handle #f))
|
||||
(set! (-> obj load-file-priority) SPOOL_PRIORITY_LOWEST)
|
||||
(set! (-> obj pending-load-file) #f)
|
||||
(set! (-> obj pending-load-file-part) -1)
|
||||
(set! (-> obj pending-load-file-owner) (the-as uint #f))
|
||||
(set! (-> obj pending-load-file-priority) 100000000.0)
|
||||
(set! (-> obj pending-load-file-owner) (the-as handle #f))
|
||||
(set! (-> obj pending-load-file-priority) SPOOL_PRIORITY_LOWEST)
|
||||
(set! (-> obj art-group) #f)
|
||||
(set! (-> obj status) 'initialize)
|
||||
(set! (-> obj locked?) #f)
|
||||
@@ -123,11 +131,13 @@
|
||||
|
||||
(deftype spool-anim (basic)
|
||||
((name string :offset 16) ;; why?
|
||||
(index int32 :offset-assert 20)
|
||||
(buf1 external-art-buffer :offset 16) ;; custom
|
||||
(buf2 external-art-buffer :offset-assert 20) ;; custom (also what?)
|
||||
(index int32 :offset 20)
|
||||
(parts int32 :offset-assert 24)
|
||||
(priority float :offset-assert 28)
|
||||
(owner uint64 :offset-assert 32)
|
||||
(command-list basic :offset-assert 40)
|
||||
(owner handle :offset-assert 32)
|
||||
(command-list pair :offset-assert 40)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 9
|
||||
@@ -137,11 +147,11 @@
|
||||
|
||||
(deftype external-art-control (basic)
|
||||
((buffer external-art-buffer 2 :offset-assert 4)
|
||||
(rec spool-anim 3 :inline)
|
||||
(spool-lock uint64 :offset-assert 160)
|
||||
(reserve-buffer basic :offset-assert 168)
|
||||
(rec spool-anim 3 :inline :offset-assert 16)
|
||||
(spool-lock handle :offset-assert 160)
|
||||
(reserve-buffer external-art-buffer :offset-assert 168)
|
||||
(reserve-buffer-count int32 :offset-assert 172)
|
||||
(active-stream basic :offset-assert 176)
|
||||
(active-stream string :offset-assert 176)
|
||||
(preload-stream spool-anim :inline :offset-assert 184)
|
||||
(last-preload-stream spool-anim :inline :offset-assert 232)
|
||||
(end-pad uint32)
|
||||
@@ -151,17 +161,18 @@
|
||||
:flag-assert #x1100000118
|
||||
(:methods
|
||||
(new (symbol type) _type_ 0)
|
||||
(dummy-9 (_type_ symbol) none 9)
|
||||
(dummy-10 (_type_) 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)
|
||||
(update (_type_ symbol) int 9)
|
||||
(clear-rec (_type_) int 10)
|
||||
(spool-push (_type_ string int process float) int 11)
|
||||
(file-status (_type_ string int) symbol 12)
|
||||
(reserve-alloc (_type_) kheap 13)
|
||||
(reserve-free (_type_ kheap) int 14)
|
||||
(none-reserved? (_type_) symbol 15)
|
||||
(try-preload-stream (_type_ string int process float) int 16)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmethod new external-art-control ((allocation symbol) (type-to-make type))
|
||||
(let ((obj (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
;; allocate buffers.
|
||||
@@ -176,19 +187,25 @@
|
||||
;; set up recs
|
||||
(dotimes (rec-idx 3)
|
||||
(set! (-> obj rec rec-idx name) #f)
|
||||
(set! (-> obj rec rec-idx priority) 100000000.0)
|
||||
(set! (-> obj rec rec-idx owner) (the-as uint #f))
|
||||
(set! (-> obj rec rec-idx priority) SPOOL_PRIORITY_LOWEST)
|
||||
(set! (-> obj rec rec-idx owner) (the-as handle #f))
|
||||
)
|
||||
;; set up defaults.
|
||||
(set! (-> obj spool-lock) (the-as uint #f))
|
||||
(set! (-> obj spool-lock) (the-as handle #f))
|
||||
(set! (-> obj reserve-buffer) #f)
|
||||
(set! (-> obj active-stream) #f)
|
||||
(set! (-> obj preload-stream name) #f)
|
||||
(set! (-> obj preload-stream priority) 100000000.0)
|
||||
(set! (-> obj preload-stream owner) (the-as uint #f))
|
||||
(set! (-> obj preload-stream priority) SPOOL_PRIORITY_LOWEST)
|
||||
(set! (-> obj preload-stream owner) (the-as handle #f))
|
||||
(set! (-> obj last-preload-stream name) #f)
|
||||
(set! (-> obj last-preload-stream priority) 100000000.0)
|
||||
(set! (-> obj last-preload-stream owner) (the-as uint #f))
|
||||
(set! (-> obj last-preload-stream priority) SPOOL_PRIORITY_LOWEST)
|
||||
(set! (-> obj last-preload-stream owner) (the-as handle #f))
|
||||
obj
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define-extern *art-control* external-art-control)
|
||||
(defun-extern art-group-load-check string kheap int art-group)
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -139,6 +139,15 @@
|
||||
)
|
||||
)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;; utility macros
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defmacro seek! (place target rate)
|
||||
"Macro to use seek in-place. place is the target, and where the result is stored."
|
||||
`(set! ,place (seek ,place ,target ,rate))
|
||||
)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;; integer utility
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
@@ -505,17 +505,17 @@
|
||||
|
||||
(defun vector-seconds ((arg0 vector) (arg1 vector))
|
||||
"Convert from actual seconds to the seconds unit."
|
||||
(set! (-> arg0 data 0) (seconds (-> arg1 data 0)))
|
||||
(set! (-> arg0 data 1) (seconds (-> arg1 data 1)))
|
||||
(set! (-> arg0 data 2) (seconds (-> arg1 data 2)))
|
||||
(set! (-> arg0 data 0) (fsec (-> arg1 data 0)))
|
||||
(set! (-> arg0 data 1) (fsec (-> arg1 data 1)))
|
||||
(set! (-> arg0 data 2) (fsec (-> arg1 data 2)))
|
||||
arg0
|
||||
)
|
||||
|
||||
(defun vector-seconds! ((arg0 vector))
|
||||
"Convert from actual seconds to seconds, in place"
|
||||
(set! (-> arg0 data 0) (seconds (-> arg0 data 0)))
|
||||
(set! (-> arg0 data 1) (seconds (-> arg0 data 1)))
|
||||
(set! (-> arg0 data 2) (seconds (-> arg0 data 2)))
|
||||
(set! (-> arg0 data 0) (fsec (-> arg0 data 0)))
|
||||
(set! (-> arg0 data 1) (fsec (-> arg0 data 1)))
|
||||
(set! (-> arg0 data 2) (fsec (-> arg0 data 2)))
|
||||
arg0
|
||||
)
|
||||
|
||||
|
||||
@@ -9,6 +9,13 @@
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(display-marks 0)
|
||||
(bit1 1)
|
||||
(bit2 2)
|
||||
(bit3 3)
|
||||
(bit4 4)
|
||||
(bit5 5)
|
||||
(bit6 6)
|
||||
(bit7 7)
|
||||
(bit8 8)
|
||||
(bit13 13)
|
||||
)
|
||||
|
||||
@@ -374,7 +374,7 @@
|
||||
:flag-assert #x90000004c
|
||||
)
|
||||
|
||||
(define *current-sound-id* (the sound-id 65536))
|
||||
(define *current-sound-id* (the sound-id #x10000))
|
||||
|
||||
(deftype ambient-sound (basic)
|
||||
((spec sound-spec :offset-assert 4)
|
||||
|
||||
@@ -19,20 +19,20 @@
|
||||
)
|
||||
|
||||
(deftype sound-iop-info (basic)
|
||||
((frame uint32 :offset 16)
|
||||
(strpos int32 :offset-assert 20)
|
||||
(str-id uint32 :offset-assert 24)
|
||||
(str-id-sign int32 :offset 24)
|
||||
(freemem uint32 :offset-assert 28)
|
||||
(chinfo uint8 48 :offset-assert 32)
|
||||
(freemem2 uint32 :offset-assert 80)
|
||||
(nocd uint32 :offset-assert 84)
|
||||
(dirtycd uint32 :offset-assert 88)
|
||||
(diskspeed uint32 2 :offset-assert 92)
|
||||
(lastspeed uint32 :offset-assert 100)
|
||||
(dupseg int32 :offset-assert 104)
|
||||
(times uint32 41 :offset-assert 108)
|
||||
(times-seq uint32 :offset-assert 272)
|
||||
((frame uint32 :offset 16)
|
||||
(strpos int32 :offset-assert 20)
|
||||
(str-id sound-id :offset-assert 24)
|
||||
(str-id-sign int32 :offset 24)
|
||||
(freemem uint32 :offset-assert 28)
|
||||
(chinfo uint8 48 :offset-assert 32)
|
||||
(freemem2 uint32 :offset-assert 80)
|
||||
(nocd uint32 :offset-assert 84)
|
||||
(dirtycd uint32 :offset-assert 88)
|
||||
(diskspeed uint32 2 :offset-assert 92)
|
||||
(lastspeed uint32 :offset-assert 100)
|
||||
(dupseg int32 :offset-assert 104)
|
||||
(times uint32 41 :offset-assert 108)
|
||||
(times-seq uint32 :offset-assert 272)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x114
|
||||
@@ -50,10 +50,10 @@
|
||||
(defun current-str-id ()
|
||||
"Return id of the current stream"
|
||||
|
||||
(-> *sound-iop-info* str-id-sign)
|
||||
(the-as sound-id (-> *sound-iop-info* str-id-sign))
|
||||
)
|
||||
|
||||
(defun current-str-pos ((str int))
|
||||
(defun current-str-pos ((str sound-id))
|
||||
"Return position of the current stream. Return -1 if specified stream is not current"
|
||||
|
||||
(let ((ret -1))
|
||||
@@ -886,7 +886,7 @@
|
||||
3 : to-maincave
|
||||
4 : to-snow
|
||||
5 : sage-green
|
||||
6 : voicebox
|
||||
6 : assistant
|
||||
7 : birdlady
|
||||
8 : mayor
|
||||
9 : sculptor
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
(defun init-target ((cont continue-point))
|
||||
|
||||
"NOTHING11!!!!"
|
||||
(looping-code)
|
||||
|
||||
(the object 0)
|
||||
)
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
(deftype sidekick (process-drawable)
|
||||
((control control-info :offset 112)
|
||||
(anim-seed uint64 :offset 192)
|
||||
(shadow-in-movie? basic :offset-assert 200)
|
||||
(shadow-in-movie? symbol :offset-assert 200)
|
||||
)
|
||||
:heap-base #x60
|
||||
:method-count-assert 20
|
||||
|
||||
@@ -1360,13 +1360,14 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; goes down by 24 or 23 every time
|
||||
(define *task-egg-starting-x*
|
||||
(new 'static 'boxed-array :type int32 :length 9 :allocated-length 9
|
||||
#xda
|
||||
#xc2
|
||||
#xab
|
||||
#x93
|
||||
#x7c
|
||||
218
|
||||
194
|
||||
171
|
||||
147
|
||||
124
|
||||
100
|
||||
77
|
||||
53
|
||||
|
||||
@@ -33,7 +33,8 @@
|
||||
(defmacro meters (x)
|
||||
"Convert number to meters.
|
||||
If the input is a constant float or integer, the result will be a
|
||||
compile time constant float. Otherwise, it will not be constant."
|
||||
compile time constant float. Otherwise, it will not be constant.
|
||||
Returns float."
|
||||
|
||||
;; we don't have enough constant propagation for the compiler to figure this out.
|
||||
(cond
|
||||
@@ -55,6 +56,7 @@
|
||||
;; quickly by converting to an int, masking, and back to float
|
||||
(defglobalconstant DEGREES_PER_ROT 65536.0)
|
||||
|
||||
;; this was deg in GOAL
|
||||
(defmacro degrees (x)
|
||||
"Convert number to degrees unit.
|
||||
Will keep a constant float/int constant."
|
||||
@@ -76,15 +78,27 @@
|
||||
;; an unsigned 32-bit integer can store about 150 days
|
||||
(defglobalconstant TICKS_PER_SECOND 300) ;; 5 t/frame @ 60fps, 6 t/frame @ 50fps
|
||||
|
||||
;; this was usec in GOAL
|
||||
(defmacro seconds (x)
|
||||
"Convert number to seconds unit."
|
||||
"Convert number to seconds unit.
|
||||
Returns uint."
|
||||
(cond
|
||||
((float? x)
|
||||
(* 1.0 TICKS_PER_SECOND x)
|
||||
)
|
||||
((integer? x)
|
||||
((or (integer? x) (float? x))
|
||||
(* TICKS_PER_SECOND x)
|
||||
)
|
||||
(#t
|
||||
`(the uint (* TICKS_PER_SECOND ,x))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro fsec (x)
|
||||
"Convert number to seconds unit.
|
||||
Returns float."
|
||||
(cond
|
||||
((or (integer? x) (float? x))
|
||||
(* 1.0 TICKS_PER_SECOND x)
|
||||
)
|
||||
(#t
|
||||
`(* 1.0 TICKS_PER_SECOND ,x)
|
||||
)
|
||||
|
||||
+22
-5
@@ -301,7 +301,8 @@
|
||||
)
|
||||
|
||||
(defmacro dotimes (var &rest body)
|
||||
"Loop like for (int i = 0; i < end; i++)"
|
||||
"Loop like for (int i = 0; i < end; i++)
|
||||
var is a list made up of a variable to bind the amount to (second item), and the remaining forms are evaluated after the loop is finished."
|
||||
`(let (( ,(first var) 0))
|
||||
(while (< ,(first var) ,(second var))
|
||||
,@body
|
||||
@@ -488,14 +489,30 @@
|
||||
`(set! ,place (logxor ,place ,amount))
|
||||
)
|
||||
|
||||
(defmacro lognor! (place amount)
|
||||
`(set! ,place (lognor ,place ,amount))
|
||||
)
|
||||
|
||||
(defmacro logand! (place amount)
|
||||
`(set! ,place (logand ,place ,amount))
|
||||
)
|
||||
|
||||
(defmacro logclear (a b)
|
||||
"Returns the result of setting the bits in b to zero in a"
|
||||
`(logand (lognot ,b) ,a)
|
||||
)
|
||||
|
||||
(defmacro logclear! (a b)
|
||||
"Sets the bits in b to zero in a, in place"
|
||||
`(set! ,a (logand (lognot ,b) ,a))
|
||||
)
|
||||
|
||||
(defmacro logtest? (a b)
|
||||
"does a have any of the bits in b?"
|
||||
`(nonzero? (logand ,a ,b))
|
||||
)
|
||||
|
||||
(defmacro logtesta? (a b)
|
||||
"does a have ALL of the bits in b?"
|
||||
`(= (logand ,a ,b) ,b)
|
||||
)
|
||||
|
||||
(defmacro deref (t addr &rest fields)
|
||||
`(-> (the-as (pointer ,t) ,addr) ,@fields)
|
||||
)
|
||||
|
||||
@@ -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 () none 11)
|
||||
(dummy-method-11 (_type_ object) none 11)
|
||||
(run-logic? (_type_) symbol 12)
|
||||
(dummy-method () none 13)
|
||||
)
|
||||
|
||||
@@ -118,12 +118,12 @@
|
||||
(allow-to-run process-mask :offset-assert 12)
|
||||
(next-pid int32 :offset-assert 16)
|
||||
(fast-stack-top pointer :offset-assert 20)
|
||||
(current-process basic :offset-assert 24)
|
||||
(current-process process :offset-assert 24)
|
||||
(relocating-process basic :offset-assert 28)
|
||||
(relocating-min int32 :offset-assert 32)
|
||||
(relocating-max int32 :offset-assert 36)
|
||||
(relocating-offset int32 :offset-assert 40)
|
||||
(low-memory-message basic :offset-assert 44)
|
||||
(low-memory-message symbol :offset-assert 44)
|
||||
)
|
||||
|
||||
:size-assert #x30
|
||||
@@ -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 () none 11)
|
||||
(dummy-method-11 (_type_ object) none 11)
|
||||
(run-logic? (_type_) symbol 12)
|
||||
(dummy-method () none 13)
|
||||
)
|
||||
@@ -236,7 +236,7 @@
|
||||
(state state :offset-assert #x38)
|
||||
(trans-hook function :offset-assert #x3c)
|
||||
(post-hook function :offset-assert #x40)
|
||||
(event-hook (function basic int basic event-message-block object) :offset-assert #x44)
|
||||
(event-hook (function process int symbol event-message-block object) :offset-assert #x44)
|
||||
(allocated-length int32 :offset-assert #x48)
|
||||
(next-state state :offset-assert #x4c)
|
||||
(heap-base pointer :offset-assert #x50)
|
||||
@@ -251,7 +251,7 @@
|
||||
(new (symbol type basic int) _type_ 0)
|
||||
(activate (_type_ process-tree basic pointer) process-tree 9)
|
||||
(deactivate (process) none 10)
|
||||
(dummy-method-11 () none 11)
|
||||
(dummy-method-11 (_type_ object) none 11)
|
||||
(run-logic? (process) symbol 12)
|
||||
(dummy-method () none 13)
|
||||
)
|
||||
@@ -447,14 +447,14 @@
|
||||
(trans (function object) :offset-assert 20)
|
||||
(post function :offset-assert 24)
|
||||
(enter (function object object object object object object object) :offset-assert 28)
|
||||
(event (function basic int basic event-message-block object) :offset-assert 32)
|
||||
(event (function process int symbol event-message-block object) :offset-assert 32)
|
||||
)
|
||||
(:methods
|
||||
(new (symbol type basic function
|
||||
(function object)
|
||||
(function object object object object object object object)
|
||||
(function object)
|
||||
(function basic int basic event-message-block object)) _type_ 0)
|
||||
(function process int symbol event-message-block object)) _type_ 0)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x24
|
||||
@@ -464,10 +464,10 @@
|
||||
|
||||
;; Not sure what this is, but it's probably used in the event system.
|
||||
(deftype event-message-block (structure)
|
||||
((to basic :offset-assert 0)
|
||||
(from basic :offset-assert 4)
|
||||
((to process :offset-assert 0)
|
||||
(from process :offset-assert 4)
|
||||
(num-params int32 :offset-assert 8)
|
||||
(message basic :offset-assert 12)
|
||||
(message symbol :offset-assert 12)
|
||||
(param uint64 7 :offset-assert 16)
|
||||
)
|
||||
|
||||
@@ -571,3 +571,21 @@
|
||||
`(define ,name (lambda :name ,name :behavior ,process-type ,bindings ,@body))
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro handle->name (handle)
|
||||
"get the name of a process using a handle. #f is the result if the handle was invalid."
|
||||
|
||||
(with-gensyms (proc)
|
||||
`(let ((proc (handle->process ,handle)))
|
||||
(if proc
|
||||
(-> proc name)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(defmacro with-sp (&rest body)
|
||||
`(rlet ((sp :reg rsp :reset-here #t :type pointer))
|
||||
,@body)
|
||||
)
|
||||
|
||||
@@ -144,16 +144,16 @@ There are several ways to "go"
|
||||
(trans (function object))
|
||||
(enter (function object object object object object object object))
|
||||
(exit (function object))
|
||||
(event (function basic int basic event-message-block object)))
|
||||
(event (function process int symbol event-message-block object)))
|
||||
"Allocate a new state. It seems like this isn't really used much and most states are
|
||||
statically allocated and as a result don't have the constructor called."
|
||||
(let ((obj (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
|
||||
(set! (-> obj name) name)
|
||||
(set! (-> obj next) '#f)
|
||||
(set! (-> obj next) #f)
|
||||
(set! (-> obj exit) exit)
|
||||
(set! (-> obj code) code)
|
||||
(set! (-> obj trans) trans)
|
||||
(set! (-> obj post) '#f)
|
||||
(set! (-> obj post) #f)
|
||||
(set! (-> obj enter) enter)
|
||||
(set! (-> obj event) event)
|
||||
obj
|
||||
@@ -318,6 +318,8 @@ There are several ways to "go"
|
||||
)
|
||||
|
||||
(defun send-event-function ((proc process) (msg event-message-block))
|
||||
"Function to send an event to a process. Please use the send-event macros when possible"
|
||||
|
||||
(with-pp
|
||||
(when (and proc (!= (-> proc type) process-tree) (-> proc event-hook))
|
||||
(let ((pp-backup pp))
|
||||
@@ -332,6 +334,8 @@ There are several ways to "go"
|
||||
)
|
||||
|
||||
(defmacro send-event (proc msg &rest params)
|
||||
"Send an event to a process. This should be used over send-event-function"
|
||||
|
||||
`(with-pp
|
||||
(let ((event-data (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> event-data from) pp)
|
||||
|
||||
@@ -389,17 +389,17 @@
|
||||
|
||||
;; definition of type collide-shape
|
||||
(deftype collide-shape (trsqv)
|
||||
((process process :offset-assert 140)
|
||||
(max-iteration-count uint8 :offset-assert 144)
|
||||
(nav-flags uint8 :offset-assert 145)
|
||||
(pad-byte uint8 2 :offset-assert 146)
|
||||
(pat-ignore-mask pat-surface :offset-assert 148)
|
||||
(event-self basic :offset-assert 152)
|
||||
(event-other basic :offset-assert 156)
|
||||
(root-prim basic :offset-assert 160)
|
||||
(riders basic :offset-assert 164)
|
||||
(backup-collide-as uint64 :offset-assert 168)
|
||||
(backup-collide-with uint64 :offset-assert 176)
|
||||
((process process :offset-assert 140)
|
||||
(max-iteration-count uint8 :offset-assert 144)
|
||||
(nav-flags uint8 :offset-assert 145)
|
||||
(pad-byte uint8 2 :offset-assert 146)
|
||||
(pat-ignore-mask pat-surface :offset-assert 148)
|
||||
(event-self basic :offset-assert 152)
|
||||
(event-other basic :offset-assert 156)
|
||||
(root-prim collide-shape-prim :offset-assert 160)
|
||||
(riders basic :offset-assert 164)
|
||||
(backup-collide-as uint64 :offset-assert 168)
|
||||
(backup-collide-with uint64 :offset-assert 176)
|
||||
)
|
||||
:method-count-assert 56
|
||||
:size-assert #xb8
|
||||
|
||||
@@ -296,8 +296,8 @@
|
||||
:size-assert #x20
|
||||
:flag-assert #xf00000020
|
||||
(:methods
|
||||
(dummy-13 (_type_) int 13)
|
||||
(dummy-14 (_type_) int 14)
|
||||
(link-art! (_type_) art-group 13)
|
||||
(unlink-art! (_type_) int 14)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -36,12 +36,12 @@
|
||||
)
|
||||
|
||||
;; definition for function num-func-none
|
||||
(defun num-func-none ((arg0 joint-control-channel))
|
||||
(defun num-func-none ((arg0 joint-control-channel) (arg1 float) (arg2 float))
|
||||
(-> arg0 frame-num)
|
||||
)
|
||||
|
||||
;; definition for function num-func-+!
|
||||
(defun num-func-+! ((arg0 joint-control-channel) (arg1 float))
|
||||
(defun num-func-+! ((arg0 joint-control-channel) (arg1 float) (arg2 float))
|
||||
(let
|
||||
((f0-1
|
||||
(+
|
||||
@@ -56,7 +56,7 @@
|
||||
)
|
||||
|
||||
;; definition for function num-func--!
|
||||
(defun num-func--! ((arg0 joint-control-channel) (arg1 float))
|
||||
(defun num-func--! ((arg0 joint-control-channel) (arg1 float) (arg2 float))
|
||||
(let
|
||||
((f0-1
|
||||
(-
|
||||
@@ -71,7 +71,7 @@
|
||||
)
|
||||
|
||||
;; definition for function num-func-loop!
|
||||
(defun num-func-loop! ((chan joint-control-channel) (inc float))
|
||||
(defun num-func-loop! ((chan joint-control-channel) (inc float) (arg2 float))
|
||||
(let* ((duration (the float (+ (-> chan frame-group data 0 length) -1)))
|
||||
(after-inc
|
||||
(+
|
||||
@@ -112,7 +112,9 @@
|
||||
)
|
||||
|
||||
;; definition for function num-func-blend-in!
|
||||
(defun num-func-blend-in! ((arg0 joint-control-channel) (arg1 float))
|
||||
(defun
|
||||
num-func-blend-in!
|
||||
((arg0 joint-control-channel) (arg1 float) (arg2 float))
|
||||
(let
|
||||
((f30-0
|
||||
(seek (-> arg0 frame-interp) 1.0 (* arg1 (-> *display* time-adjust-ratio)))
|
||||
@@ -128,7 +130,7 @@
|
||||
)
|
||||
|
||||
;; definition for function num-func-chan
|
||||
(defun num-func-chan ((arg0 joint-control-channel) (arg1 float))
|
||||
(defun num-func-chan ((arg0 joint-control-channel) (arg1 float) (arg2 float))
|
||||
(let
|
||||
((f0-2
|
||||
(->
|
||||
@@ -149,7 +151,7 @@
|
||||
)
|
||||
|
||||
;; definition for function num-func-identity
|
||||
(defun num-func-identity ((arg0 joint-control-channel))
|
||||
(defun num-func-identity ((arg0 joint-control-channel) (arg1 float) (arg2 float))
|
||||
(-> arg0 frame-num)
|
||||
)
|
||||
|
||||
|
||||
@@ -79,12 +79,12 @@
|
||||
(apply-function-forward (_type_ (function entity-actor object object) object) int 16)
|
||||
(apply-function-reverse (_type_ (function entity-actor object object) object) int 17)
|
||||
(apply-all (_type_ (function entity-actor object object) object) int 18)
|
||||
(send-to-all (_type_ object) none 19)
|
||||
(send-to-all-after (_type_ object) object 20)
|
||||
(send-to-all-before (_type_ object) object 21)
|
||||
(send-to-next-and-prev (_type_ object) none 22)
|
||||
(send-to-next (_type_ object) none 23)
|
||||
(send-to-prev (_type_ object) none 24)
|
||||
(send-to-all (_type_ symbol) none 19)
|
||||
(send-to-all-after (_type_ symbol) object 20)
|
||||
(send-to-all-before (_type_ symbol) object 21)
|
||||
(send-to-next-and-prev (_type_ symbol) none 22)
|
||||
(send-to-next (_type_ symbol) none 23)
|
||||
(send-to-prev (_type_ symbol) none 24)
|
||||
(actor-count (_type_) int 25)
|
||||
)
|
||||
)
|
||||
@@ -236,7 +236,7 @@
|
||||
(defmethod
|
||||
send-to-all-after
|
||||
actor-link-info
|
||||
((obj actor-link-info) (message object))
|
||||
((obj actor-link-info) (message symbol))
|
||||
(with-pp
|
||||
(let ((iter (-> obj next))
|
||||
(result (the-as object #f))
|
||||
@@ -247,7 +247,7 @@
|
||||
(let ((msg-block (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> msg-block from) pp)
|
||||
(set! (-> msg-block num-params) 0)
|
||||
(set! (-> msg-block message) (the-as basic message))
|
||||
(set! (-> msg-block message) message)
|
||||
(let ((v1-3 (send-event-function proc msg-block)))
|
||||
(b! v1-3 cfg-4 :likely-delay (set! result v1-3))
|
||||
)
|
||||
@@ -266,7 +266,7 @@
|
||||
(defmethod
|
||||
send-to-all-before
|
||||
actor-link-info
|
||||
((obj actor-link-info) (arg0 object))
|
||||
((obj actor-link-info) (arg0 symbol))
|
||||
(with-pp
|
||||
(let ((s4-0 (-> obj prev))
|
||||
(s5-0 (the-as object #f))
|
||||
@@ -277,7 +277,7 @@
|
||||
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-1 from) pp)
|
||||
(set! (-> a1-1 num-params) 0)
|
||||
(set! (-> a1-1 message) (the-as basic arg0))
|
||||
(set! (-> a1-1 message) arg0)
|
||||
(let ((v1-3 (send-event-function a0-1 a1-1)))
|
||||
(b! v1-3 cfg-4 :likely-delay (set! s5-0 v1-3))
|
||||
)
|
||||
@@ -294,7 +294,7 @@
|
||||
|
||||
;; definition for method 23 of type actor-link-info
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod send-to-next actor-link-info ((obj actor-link-info) (arg0 object))
|
||||
(defmethod send-to-next actor-link-info ((obj actor-link-info) (arg0 symbol))
|
||||
(with-pp
|
||||
(let ((a0-1 (-> obj next)))
|
||||
(when a0-1
|
||||
@@ -303,7 +303,7 @@
|
||||
(let ((v1-4 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-4 from) pp)
|
||||
(set! (-> v1-4 num-params) 0)
|
||||
(set! (-> v1-4 message) (the-as basic arg0))
|
||||
(set! (-> v1-4 message) arg0)
|
||||
(send-event-function a0-2 v1-4)
|
||||
)
|
||||
)
|
||||
@@ -317,7 +317,7 @@
|
||||
|
||||
;; definition for method 24 of type actor-link-info
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod send-to-prev actor-link-info ((obj actor-link-info) (arg0 object))
|
||||
(defmethod send-to-prev actor-link-info ((obj actor-link-info) (arg0 symbol))
|
||||
(with-pp
|
||||
(let ((a0-1 (-> obj prev)))
|
||||
(when a0-1
|
||||
@@ -326,7 +326,7 @@
|
||||
(let ((v1-4 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-4 from) pp)
|
||||
(set! (-> v1-4 num-params) 0)
|
||||
(set! (-> v1-4 message) (the-as basic arg0))
|
||||
(set! (-> v1-4 message) arg0)
|
||||
(send-event-function a0-2 v1-4)
|
||||
)
|
||||
)
|
||||
@@ -342,7 +342,7 @@
|
||||
(defmethod
|
||||
send-to-next-and-prev
|
||||
actor-link-info
|
||||
((obj actor-link-info) (arg0 object))
|
||||
((obj actor-link-info) (arg0 symbol))
|
||||
(send-to-next obj arg0)
|
||||
(send-to-prev obj arg0)
|
||||
(none)
|
||||
@@ -350,7 +350,7 @@
|
||||
|
||||
;; definition for method 19 of type actor-link-info
|
||||
;; INFO: Return type mismatch object vs none.
|
||||
(defmethod send-to-all actor-link-info ((obj actor-link-info) (arg0 object))
|
||||
(defmethod send-to-all actor-link-info ((obj actor-link-info) (arg0 symbol))
|
||||
(send-to-all-after obj arg0)
|
||||
(send-to-all-before obj arg0)
|
||||
(none)
|
||||
@@ -490,7 +490,3 @@
|
||||
incomplete-count
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
(user-uint8 uint8 8 :offset 0)
|
||||
(status entity-perm-status :offset-assert 8)
|
||||
(dummy uint8 1 :offset-assert 10)
|
||||
(task uint8 :offset-assert 11)
|
||||
(aid uint32 :offset-assert 12)
|
||||
(task game-task :offset-assert 11)
|
||||
(aid actor-id :offset-assert 12)
|
||||
(quad uint128 :offset 0)
|
||||
)
|
||||
:pack-me
|
||||
@@ -68,8 +68,8 @@
|
||||
(trans vector :inline :offset-assert 32)
|
||||
(perm entity-perm :inline :offset-assert 48)
|
||||
(status uint16 :offset 56)
|
||||
(aid uint32 :offset 60)
|
||||
(task uint8 :offset 59)
|
||||
(aid actor-id :offset 60)
|
||||
(task game-task :offset 59)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x40
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
(node-list cspace-array :offset-assert 116)
|
||||
(draw draw-control :offset-assert 120)
|
||||
(skel joint-control :offset-assert 124)
|
||||
(nav basic :offset-assert 128)
|
||||
(nav nav-control :offset-assert 128)
|
||||
(align align-control :offset-assert 132)
|
||||
(path basic :offset-assert 136)
|
||||
(vol basic :offset-assert 140)
|
||||
(path path-control :offset-assert 136)
|
||||
(vol vol-control :offset-assert 140)
|
||||
(fact fact-info :offset-assert 144)
|
||||
(link basic :offset-assert 148)
|
||||
(link actor-link-info :offset-assert 148)
|
||||
(part sparticle-launch-control :offset-assert 152)
|
||||
(water water-control :offset-assert 156)
|
||||
(sound ambient-sound :offset-assert 160)
|
||||
(state-flags uint32 :offset-assert 164)
|
||||
(state-time uint64 :offset-assert 168)
|
||||
(state-time seconds :offset-assert 168)
|
||||
)
|
||||
:heap-base #x40
|
||||
:method-count-assert 20
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
;; definition of type level-buffer-state
|
||||
(deftype level-buffer-state (structure)
|
||||
((name basic :offset-assert 0)
|
||||
((name symbol :offset-assert 0)
|
||||
(display? symbol :offset-assert 4)
|
||||
(force-vis? symbol :offset-assert 8)
|
||||
(force-inside? symbol :offset-assert 12)
|
||||
@@ -89,11 +89,11 @@
|
||||
(want-display-level (_type_ symbol symbol) int 12)
|
||||
(want-vis (_type_ symbol) int 13)
|
||||
(want-force-vis (_type_ symbol symbol) int 14)
|
||||
(dummy-15 () none 15)
|
||||
(dummy-16 () none 16)
|
||||
(dummy-17 () none 17)
|
||||
(dummy-18 () none 18)
|
||||
(dummy-19 () none 19)
|
||||
(dummy-15 (_type_ pair) none 15)
|
||||
(dummy-16 (_type_ float) int 16)
|
||||
(dummy-17 (_type_ pair) int 17)
|
||||
(dummy-18 (_type_) int 18)
|
||||
(dummy-19 (_type_) int 19)
|
||||
(dummy-20 () none 20)
|
||||
)
|
||||
)
|
||||
@@ -119,18 +119,18 @@
|
||||
;; definition of type continue-point
|
||||
(deftype continue-point (basic)
|
||||
((name string :offset-assert 4)
|
||||
(level basic :offset-assert 8)
|
||||
(level symbol :offset-assert 8)
|
||||
(flags uint32 :offset-assert 12)
|
||||
(trans vector :inline :offset-assert 16)
|
||||
(quat quaternion :inline :offset-assert 32)
|
||||
(camera-trans vector :inline :offset-assert 48)
|
||||
(camera-rot float 9 :offset-assert 64)
|
||||
(load-commands pair :offset-assert 100)
|
||||
(vis-nick basic :offset-assert 104)
|
||||
(lev0 basic :offset-assert 108)
|
||||
(disp0 basic :offset-assert 112)
|
||||
(lev1 basic :offset-assert 116)
|
||||
(disp1 basic :offset-assert 120)
|
||||
(vis-nick symbol :offset-assert 104)
|
||||
(lev0 symbol :offset-assert 108)
|
||||
(disp0 symbol :offset-assert 112)
|
||||
(lev1 symbol :offset-assert 116)
|
||||
(disp1 symbol :offset-assert 120)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x7c
|
||||
@@ -213,7 +213,7 @@
|
||||
(initialize! (_type_ symbol game-save string) _type_ 9)
|
||||
(adjust (_type_ symbol float handle) float 10)
|
||||
(task-complete? (_type_ game-task) symbol 11)
|
||||
(lookup-entity-perm-by-aid (_type_ uint) entity-perm 12)
|
||||
(lookup-entity-perm-by-aid (_type_ actor-id) entity-perm 12)
|
||||
(get-entity-task-perm (_type_ game-task) entity-perm 13)
|
||||
(copy-perms-from-level! (_type_ level) none 14)
|
||||
(copy-perms-to-level! (_type_ level) none 15)
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
|
||||
;; definition of type manipy
|
||||
(deftype manipy (process-drawable)
|
||||
((new-trans-hook function :offset-assert 176)
|
||||
(cur-trans-hook function :offset-assert 180)
|
||||
(cur-event-hook function :offset-assert 184)
|
||||
(new-joint-anim basic :offset-assert 188)
|
||||
(new-joint-anim-blend uint64 :offset-assert 192)
|
||||
(anim-mode basic :offset-assert 200)
|
||||
(cur-grab-handle uint64 :offset-assert 208)
|
||||
(cur-target-handle uint64 :offset-assert 216)
|
||||
(old-grab-pos vector :inline :offset-assert 224)
|
||||
(joint joint 4 :offset-assert 240)
|
||||
(new-post-hook function :offset-assert 256)
|
||||
(cur-post-hook function :offset-assert 260)
|
||||
(clone-copy-trans basic :offset-assert 264)
|
||||
(shadow-backup basic :offset-assert 268)
|
||||
(draw? symbol :offset-assert 272)
|
||||
((new-trans-hook function :offset-assert 176)
|
||||
(cur-trans-hook function :offset-assert 180)
|
||||
(cur-event-hook function :offset-assert 184)
|
||||
(new-joint-anim art-joint-anim :offset-assert 188)
|
||||
(new-joint-anim-blend uint64 :offset-assert 192)
|
||||
(anim-mode symbol :offset-assert 200)
|
||||
(cur-grab-handle uint64 :offset-assert 208)
|
||||
(cur-target-handle uint64 :offset-assert 216)
|
||||
(old-grab-pos vector :inline :offset-assert 224)
|
||||
(joint joint 4 :offset-assert 240)
|
||||
(new-post-hook function :offset-assert 256)
|
||||
(cur-post-hook function :offset-assert 260)
|
||||
(clone-copy-trans basic :offset-assert 264)
|
||||
(shadow-backup basic :offset-assert 268)
|
||||
(draw? symbol :offset-assert 272)
|
||||
)
|
||||
:heap-base #xb0
|
||||
:method-count-assert 20
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
:size-assert #x10
|
||||
:flag-assert #xc00000010
|
||||
(:methods
|
||||
(dummy-9 () none 9)
|
||||
(dummy-9 (_type_ vector int float process-drawable) none 9)
|
||||
(dummy-10 () none 10)
|
||||
(dummy-11 () none 11)
|
||||
)
|
||||
@@ -89,10 +89,10 @@
|
||||
|
||||
;; definition of type process-taskable
|
||||
(deftype process-taskable (process-drawable)
|
||||
((tasks basic :offset-assert 176)
|
||||
((tasks task-control :offset-assert 176)
|
||||
(query gui-query :inline :offset-assert 180)
|
||||
(old-target-pos transformq :inline :offset-assert 208)
|
||||
(cell-for-task uint8 :offset-assert 256)
|
||||
(cell-for-task game-task :offset-assert 256)
|
||||
(cell-x uint64 :offset-assert 264)
|
||||
(cam-joint-index int32 :offset-assert 272)
|
||||
(skippable basic :offset-assert 276)
|
||||
@@ -120,39 +120,39 @@
|
||||
:size-assert #x17c
|
||||
:flag-assert #x350110017c
|
||||
(:methods
|
||||
(dummy-20 () none 20)
|
||||
(dummy-21 () none 21)
|
||||
(dummy-22 () none 22)
|
||||
(dummy-23 () none 23)
|
||||
(dummy-24 () none 24)
|
||||
(dummy-25 () none 25)
|
||||
(dummy-26 () none 26)
|
||||
(dummy-27 () none 27)
|
||||
(dummy-28 () none 28)
|
||||
(dummy-29 () none 29)
|
||||
(dummy-30 () none 30)
|
||||
(dummy-31 () none 31)
|
||||
(dummy-32 () none 32)
|
||||
(dummy-33 () none 33)
|
||||
(dummy-34 () none 34)
|
||||
(dummy-35 () none 35)
|
||||
(dummy-36 () none 36)
|
||||
(dummy-37 () none 37)
|
||||
(dummy-38 () none 38)
|
||||
(dummy-39 () none 39)
|
||||
(dummy-40 () none 40)
|
||||
(dummy-41 () none 41)
|
||||
(dummy-42 () none 42)
|
||||
(dummy-43 () none 43)
|
||||
(dummy-44 () none 44)
|
||||
(dummy-45 () none 45)
|
||||
(dummy-46 () none 46)
|
||||
(dummy-47 () none 47)
|
||||
(dummy-48 () none 48)
|
||||
(dummy-49 () none 49)
|
||||
(dummy-50 () none 50)
|
||||
(dummy-51 () none 51)
|
||||
(dummy-52 () none 52)
|
||||
(dummy-20 (_type_) none 20)
|
||||
(dummy-21 (_type_) none 21)
|
||||
(dummy-22 (_type_) none 22)
|
||||
(dummy-23 (_type_) none 23)
|
||||
(dummy-24 (_type_) none 24)
|
||||
(dummy-25 (_type_) none 25)
|
||||
(dummy-26 (_type_) none 26)
|
||||
(dummy-27 (_type_) none 27)
|
||||
(dummy-28 (_type_) none 28)
|
||||
(dummy-29 (_type_) none 29)
|
||||
(dummy-30 (_type_) none 30)
|
||||
(dummy-31 (_type_) none 31)
|
||||
(dummy-32 (_type_ symbol) spool-anim 32)
|
||||
(dummy-33 (_type_) none 33)
|
||||
(dummy-34 (_type_) none 34)
|
||||
(dummy-35 (_type_) none 35)
|
||||
(dummy-36 (_type_) none 36)
|
||||
(dummy-37 (_type_) none 37)
|
||||
(dummy-38 (_type_) none 38)
|
||||
(dummy-39 (_type_) none 39)
|
||||
(dummy-40 (_type_ object skeleton-group int int vector int) none 40)
|
||||
(dummy-41 (_type_) none 41)
|
||||
(dummy-42 (_type_) none 42)
|
||||
(dummy-43 (_type_) none 43)
|
||||
(dummy-44 (_type_) none 44)
|
||||
(dummy-45 (_type_) none 45)
|
||||
(dummy-46 (_type_) none 46)
|
||||
(dummy-47 (_type_) none 47)
|
||||
(dummy-48 (_type_) none 48)
|
||||
(dummy-49 (_type_) none 49)
|
||||
(dummy-50 (_type_) none 50)
|
||||
(dummy-51 (_type_) none 51)
|
||||
(dummy-52 (_type_) none 52)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -62,12 +62,12 @@
|
||||
(r-sun float :offset 16)
|
||||
(r-halo float :offset 20)
|
||||
(r-aurora float :offset 24)
|
||||
(c-sun-start uint32 :offset 32)
|
||||
(c-sun-end uint32 :offset 48)
|
||||
(c-halo-start uint32 :offset 36)
|
||||
(c-halo-end uint32 :offset 52)
|
||||
(c-aurora-start uint32 :offset 40)
|
||||
(c-aurora-end uint32 :offset 56)
|
||||
(c-sun-start rgba :offset 32)
|
||||
(c-sun-end rgba :offset 48)
|
||||
(c-halo-start rgba :offset 36)
|
||||
(c-halo-end rgba :offset 52)
|
||||
(c-aurora-start rgba :offset 40)
|
||||
(c-aurora-end rgba :offset 56)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x40
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
;; definition for function sky-set-sun-colors
|
||||
(defun
|
||||
sky-set-sun-colors
|
||||
((arg0 sky-parms) (arg1 int) (arg2 uint) (arg3 uint) (arg4 uint) (arg5 uint))
|
||||
((arg0 sky-parms) (arg1 int) (arg2 rgba) (arg3 rgba) (arg4 rgba) (arg5 rgba))
|
||||
(let ((v1-0 (logand arg1 1)))
|
||||
(set! (-> arg0 upload-data sun v1-0 c-sun-start) arg2)
|
||||
(set! (-> arg0 upload-data sun v1-0 c-sun-end) arg3)
|
||||
@@ -31,7 +31,7 @@
|
||||
;; definition for function sky-set-sun-colors-sun
|
||||
(defun
|
||||
sky-set-sun-colors-sun
|
||||
((arg0 sky-parms) (arg1 int) (arg2 uint) (arg3 uint))
|
||||
((arg0 sky-parms) (arg1 int) (arg2 rgba) (arg3 rgba))
|
||||
(let ((v1-0 (logand arg1 1)))
|
||||
(set! (-> arg0 upload-data sun v1-0 c-sun-start) arg2)
|
||||
(set! (-> arg0 upload-data sun v1-0 c-sun-end) arg3)
|
||||
@@ -42,7 +42,7 @@
|
||||
;; definition for function sky-set-sun-colors-halo
|
||||
(defun
|
||||
sky-set-sun-colors-halo
|
||||
((arg0 sky-parms) (arg1 int) (arg2 uint) (arg3 uint))
|
||||
((arg0 sky-parms) (arg1 int) (arg2 rgba) (arg3 rgba))
|
||||
(let ((v1-0 (logand arg1 1)))
|
||||
(set! (-> arg0 upload-data sun v1-0 c-halo-start) arg2)
|
||||
(set! (-> arg0 upload-data sun v1-0 c-halo-end) arg3)
|
||||
@@ -53,7 +53,7 @@
|
||||
;; definition for function sky-set-sun-colors-aurora
|
||||
(defun
|
||||
sky-set-sun-colors-aurora
|
||||
((arg0 sky-parms) (arg1 int) (arg2 uint) (arg3 uint))
|
||||
((arg0 sky-parms) (arg1 int) (arg2 rgba) (arg3 rgba))
|
||||
(let ((v1-0 (logand arg1 1)))
|
||||
(set! (-> arg0 upload-data sun v1-0 c-aurora-start) arg2)
|
||||
(set! (-> arg0 upload-data sun v1-0 c-aurora-end) arg3)
|
||||
@@ -81,7 +81,3 @@
|
||||
(set! (-> arg0 orbit arg1 max-halo) arg7)
|
||||
#f
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -142,11 +142,11 @@
|
||||
|
||||
;; definition for function str-play-async
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun str-play-async ((name string) (addr pointer))
|
||||
(defun str-play-async ((name string) (addr sound-id))
|
||||
(set! *que-str-lock* #t)
|
||||
(let ((cmd (the-as load-chunk-msg (add-element *play-str-rpc*))))
|
||||
(charp<-string (-> cmd basename) name)
|
||||
(set! (-> cmd address) addr)
|
||||
(set! (-> cmd address) (the-as pointer addr))
|
||||
(set! (-> cmd result) (load-msg-result done))
|
||||
)
|
||||
0
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
:flag-assert #xb00000010
|
||||
(:methods
|
||||
(new (symbol type int basic) _type_ 0)
|
||||
(dummy-9 () none 9)
|
||||
(dummy-10 () none 10)
|
||||
(dummy-9 (_type_ string symbol kheap int) art-group 9)
|
||||
(dummy-10 (_type_ art-group) art-group 10)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -83,13 +83,13 @@
|
||||
(heap kheap :inline :offset-assert 32)
|
||||
(pending-load-file string :offset-assert 48)
|
||||
(pending-load-file-part int32 :offset-assert 52)
|
||||
(pending-load-file-owner uint64 :offset-assert 56)
|
||||
(pending-load-file-owner handle :offset-assert 56)
|
||||
(pending-load-file-priority float :offset-assert 64)
|
||||
(load-file string :offset-assert 68)
|
||||
(load-file-part int32 :offset-assert 72)
|
||||
(load-file-owner uint64 :offset-assert 80)
|
||||
(load-file-owner handle :offset-assert 80)
|
||||
(load-file-priority float :offset-assert 88)
|
||||
(buf uint32 :offset-assert 92)
|
||||
(buf pointer :offset-assert 92)
|
||||
(len int32 :offset-assert 96)
|
||||
(art-group art-group :offset-assert 100)
|
||||
)
|
||||
@@ -98,13 +98,13 @@
|
||||
:flag-assert #x1000000068
|
||||
(:methods
|
||||
(new (symbol type int) _type_ 0)
|
||||
(dummy-9 (_type_ symbol int symbol float) 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)
|
||||
(want-file (_type_ string int handle float) int 9)
|
||||
(update (_type_) int 10)
|
||||
(inactive? (_type_) symbol 11)
|
||||
(file-status (_type_ string int) symbol 12)
|
||||
(link-file (_type_ art-group) art-group 13)
|
||||
(unlink-file (_type_ art-group) int 14)
|
||||
(unlock! (_type_) symbol 15)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -148,11 +148,11 @@
|
||||
(set! (-> obj index) idx)
|
||||
(set! (-> obj load-file) #f)
|
||||
(set! (-> obj load-file-part) -1)
|
||||
(set! (-> obj load-file-owner) (the-as uint #f))
|
||||
(set! (-> obj load-file-owner) (the-as handle #f))
|
||||
(set! (-> obj load-file-priority) 100000000.0)
|
||||
(set! (-> obj pending-load-file) #f)
|
||||
(set! (-> obj pending-load-file-part) -1)
|
||||
(set! (-> obj pending-load-file-owner) (the-as uint #f))
|
||||
(set! (-> obj pending-load-file-owner) (the-as handle #f))
|
||||
(set! (-> obj pending-load-file-priority) 100000000.0)
|
||||
(set! (-> obj art-group) #f)
|
||||
(set! (-> obj status) 'initialize)
|
||||
@@ -164,12 +164,14 @@
|
||||
|
||||
;; definition of type spool-anim
|
||||
(deftype spool-anim (basic)
|
||||
((name string :offset 16)
|
||||
(index int32 :offset-assert 20)
|
||||
(parts int32 :offset-assert 24)
|
||||
(priority float :offset-assert 28)
|
||||
(owner uint64 :offset-assert 32)
|
||||
(command-list basic :offset-assert 40)
|
||||
((name string :offset 16)
|
||||
(buf1 external-art-buffer :offset 16)
|
||||
(buf2 external-art-buffer :offset-assert 20)
|
||||
(index int32 :offset 20)
|
||||
(parts int32 :offset-assert 24)
|
||||
(priority float :offset-assert 28)
|
||||
(owner handle :offset-assert 32)
|
||||
(command-list pair :offset-assert 40)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 9
|
||||
@@ -181,7 +183,7 @@
|
||||
(defmethod inspect spool-anim ((obj spool-anim))
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tname: ~A~%" (-> obj name))
|
||||
(format #t "~Tindex: ~D~%" (-> obj index))
|
||||
(format #t "~Tindex: ~D~%" (-> obj buf2))
|
||||
(format #t "~Tparts: ~D~%" (-> obj parts))
|
||||
(format #t "~Tpriority: ~f~%" (-> obj priority))
|
||||
(format #t "~Towner: ~D~%" (-> obj owner))
|
||||
@@ -193,10 +195,10 @@
|
||||
(deftype external-art-control (basic)
|
||||
((buffer external-art-buffer 2 :offset-assert 4)
|
||||
(rec spool-anim 3 :inline :offset-assert 16)
|
||||
(spool-lock uint64 :offset-assert 160)
|
||||
(reserve-buffer basic :offset-assert 168)
|
||||
(spool-lock handle :offset-assert 160)
|
||||
(reserve-buffer external-art-buffer :offset-assert 168)
|
||||
(reserve-buffer-count int32 :offset-assert 172)
|
||||
(active-stream basic :offset-assert 176)
|
||||
(active-stream string :offset-assert 176)
|
||||
(preload-stream spool-anim :inline :offset-assert 184)
|
||||
(last-preload-stream spool-anim :inline :offset-assert 232)
|
||||
(end-pad uint32 :offset-assert 276)
|
||||
@@ -206,14 +208,14 @@
|
||||
:flag-assert #x1100000118
|
||||
(:methods
|
||||
(new (symbol type) _type_ 0)
|
||||
(dummy-9 (_type_ symbol) none 9)
|
||||
(dummy-10 (_type_) 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)
|
||||
(update (_type_ symbol) int 9)
|
||||
(clear-rec (_type_) int 10)
|
||||
(spool-push (_type_ string int process float) int 11)
|
||||
(file-status (_type_ string int) symbol 12)
|
||||
(reserve-alloc (_type_) kheap 13)
|
||||
(reserve-free (_type_ kheap) int 14)
|
||||
(none-reserved? (_type_) symbol 15)
|
||||
(try-preload-stream (_type_ string int process float) int 16)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -257,17 +259,17 @@
|
||||
(dotimes (rec-idx 3)
|
||||
(set! (-> obj rec rec-idx name) #f)
|
||||
(set! (-> obj rec rec-idx priority) 100000000.0)
|
||||
(set! (-> obj rec rec-idx owner) (the-as uint #f))
|
||||
(set! (-> obj rec rec-idx owner) (the-as handle #f))
|
||||
)
|
||||
(set! (-> obj spool-lock) (the-as uint #f))
|
||||
(set! (-> obj spool-lock) (the-as handle #f))
|
||||
(set! (-> obj reserve-buffer) #f)
|
||||
(set! (-> obj active-stream) #f)
|
||||
(set! (-> obj preload-stream name) #f)
|
||||
(set! (-> obj preload-stream priority) 100000000.0)
|
||||
(set! (-> obj preload-stream owner) (the-as uint #f))
|
||||
(set! (-> obj preload-stream owner) (the-as handle #f))
|
||||
(set! (-> obj last-preload-stream name) #f)
|
||||
(set! (-> obj last-preload-stream priority) 100000000.0)
|
||||
(set! (-> obj last-preload-stream owner) (the-as uint #f))
|
||||
(set! (-> obj last-preload-stream owner) (the-as handle #f))
|
||||
obj
|
||||
)
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -20,20 +20,20 @@
|
||||
|
||||
;; definition of type sound-iop-info
|
||||
(deftype sound-iop-info (basic)
|
||||
((frame uint32 :offset 16)
|
||||
(strpos int32 :offset-assert 20)
|
||||
(str-id uint32 :offset-assert 24)
|
||||
(str-id-sign int32 :offset 24)
|
||||
(freemem uint32 :offset-assert 28)
|
||||
(chinfo uint8 48 :offset-assert 32)
|
||||
(freemem2 uint32 :offset-assert 80)
|
||||
(nocd uint32 :offset-assert 84)
|
||||
(dirtycd uint32 :offset-assert 88)
|
||||
(diskspeed uint32 2 :offset-assert 92)
|
||||
(lastspeed uint32 :offset-assert 100)
|
||||
(dupseg int32 :offset-assert 104)
|
||||
(times uint32 41 :offset-assert 108)
|
||||
(times-seq uint32 :offset-assert 272)
|
||||
((frame uint32 :offset 16)
|
||||
(strpos int32 :offset-assert 20)
|
||||
(str-id sound-id :offset-assert 24)
|
||||
(str-id-sign int32 :offset 24)
|
||||
(freemem uint32 :offset-assert 28)
|
||||
(chinfo uint8 48 :offset-assert 32)
|
||||
(freemem2 uint32 :offset-assert 80)
|
||||
(nocd uint32 :offset-assert 84)
|
||||
(dirtycd uint32 :offset-assert 88)
|
||||
(diskspeed uint32 2 :offset-assert 92)
|
||||
(lastspeed uint32 :offset-assert 100)
|
||||
(dupseg int32 :offset-assert 104)
|
||||
(times uint32 41 :offset-assert 108)
|
||||
(times-seq uint32 :offset-assert 272)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x114
|
||||
@@ -69,12 +69,13 @@
|
||||
)
|
||||
|
||||
;; definition for function current-str-id
|
||||
;; INFO: Return type mismatch int vs sound-id.
|
||||
(defun current-str-id ()
|
||||
(-> *sound-iop-info* str-id-sign)
|
||||
(the-as sound-id (-> *sound-iop-info* str-id-sign))
|
||||
)
|
||||
|
||||
;; definition for function current-str-pos
|
||||
(defun current-str-pos ((arg0 int))
|
||||
(defun current-str-pos ((arg0 sound-id))
|
||||
(let ((v0-0 -1))
|
||||
(if (= arg0 (-> *sound-iop-info* str-id))
|
||||
(set! v0-0 (-> *sound-iop-info* strpos))
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
(deftype sidekick (process-drawable)
|
||||
((control control-info :offset 112)
|
||||
(anim-seed uint64 :offset 192)
|
||||
(shadow-in-movie? basic :offset-assert 200)
|
||||
(shadow-in-movie? symbol :offset-assert 200)
|
||||
)
|
||||
:heap-base #x60
|
||||
:method-count-assert 20
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
(allow-to-run process-mask :offset-assert 12)
|
||||
(next-pid int32 :offset-assert 16)
|
||||
(fast-stack-top pointer :offset-assert 20)
|
||||
(current-process basic :offset-assert 24)
|
||||
(current-process process :offset-assert 24)
|
||||
(relocating-process basic :offset-assert 28)
|
||||
(relocating-min int32 :offset-assert 32)
|
||||
(relocating-max int32 :offset-assert 36)
|
||||
(relocating-offset int32 :offset-assert 40)
|
||||
(low-memory-message basic :offset-assert 44)
|
||||
(low-memory-message symbol :offset-assert 44)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x30
|
||||
@@ -304,13 +304,13 @@
|
||||
(trans (function object) :offset-assert 20)
|
||||
(post function :offset-assert 24)
|
||||
(enter (function object object object object object object object) :offset-assert 28)
|
||||
(event (function basic int basic event-message-block object) :offset-assert 32)
|
||||
(event (function process int symbol event-message-block object) :offset-assert 32)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x24
|
||||
:flag-assert #x900000024
|
||||
(:methods
|
||||
(new (symbol type basic function (function object) (function object object object object object object object) (function object) (function basic int basic event-message-block object)) _type_ 0)
|
||||
(new (symbol type basic function (function object) (function object object object object object object object) (function object) (function process int symbol event-message-block object)) _type_ 0)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -330,11 +330,11 @@
|
||||
|
||||
;; definition of type event-message-block
|
||||
(deftype event-message-block (structure)
|
||||
((to basic :offset-assert 0)
|
||||
(from basic :offset-assert 4)
|
||||
(num-params int32 :offset-assert 8)
|
||||
(message basic :offset-assert 12)
|
||||
(param uint64 7 :offset-assert 16)
|
||||
((to process :offset-assert 0)
|
||||
(from process :offset-assert 4)
|
||||
(num-params int32 :offset-assert 8)
|
||||
(message symbol :offset-assert 12)
|
||||
(param uint64 7 :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x48
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
(trans (function object))
|
||||
(enter (function object object object object object object object))
|
||||
(exit (function object))
|
||||
(event (function basic int basic event-message-block object))
|
||||
(event (function process int symbol event-message-block object))
|
||||
)
|
||||
(let
|
||||
((obj
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
:name "name"
|
||||
:bf (new 'static 'basic-field-test-bitfield :f1 1 :f3 1)
|
||||
:kc (new 'static 'kernel-context :next-pid 12)
|
||||
:kci (new 'static 'kernel-context :current-process 'asdf :relocating-min 33))))
|
||||
:kci (new 'static 'kernel-context :low-memory-message 'asdf :relocating-min 33))))
|
||||
(format #t "~A ~D ~f ~A ~D" (-> obj name) (-> obj kc next-pid) (-> obj pos) (-> obj list) (-> obj bf))
|
||||
(format #t " ~D ~D ~A ~A~%"
|
||||
(-> obj kci relocating-min)
|
||||
(logand 15 (the int (-> obj kci)))
|
||||
(-> obj kci type)
|
||||
(-> obj kci current-process))
|
||||
(-> obj kci low-memory-message))
|
||||
)
|
||||
@@ -151,7 +151,10 @@ const std::unordered_set<std::string> g_functions_to_skip_compiling = {
|
||||
"get-task-status",
|
||||
|
||||
// aligner - return-from-thread, currently not supported
|
||||
"(method 9 align-control)"};
|
||||
"(method 9 align-control)",
|
||||
|
||||
// loader - decompiler bug with detecting handle macros
|
||||
"(method 10 external-art-buffer)"};
|
||||
|
||||
// default location for the data. It can be changed with a command line argument.
|
||||
std::string g_iso_data_path = "";
|
||||
|
||||
Reference in New Issue
Block a user