mirror of
https://github.com/open-goal/jak-project
synced 2026-08-26 00:03:48 -04:00
[decomp] add a bunch of flag enums (#1350)
* update refs * first pass * update refs 2 * update * update * update * stuff and things * accidentally wiped this * fancy decomp for static sound specs * clang * 5 more refs
This commit is contained in:
@@ -198,8 +198,9 @@ void break_list(Node* node) {
|
||||
node->top_line_count = 1;
|
||||
|
||||
const std::unordered_set<std::string> sameline_splitters = {
|
||||
"if", "<", ">", "<=", ">=", "set!", "=", "!=", "+", "-", "*",
|
||||
"/", "the", "->", "and", "or", "logand", "logior", "logxor", "+!", "*!", "logtest?"};
|
||||
"if", "<", ">", "<=", ">=", "set!", "=", "!=", "+",
|
||||
"-", "*", "/", "the", "->", "and", "or", "logand", "logior",
|
||||
"logxor", "+!", "*!", "logtest?", "not", "zero?", "nonzero?"};
|
||||
|
||||
if (node->child_nodes.at(0).kind == Node::Kind::LIST) {
|
||||
// ((foo
|
||||
|
||||
@@ -2460,7 +2460,6 @@ void DecompiledDataElement::do_decomp(const Env& env, const LinkedObjectFile* fi
|
||||
if (m_label_info) {
|
||||
m_description = decompile_at_label_with_hint(*m_label_info, m_label, env.file->labels,
|
||||
env.file->words_by_seg, *env.dts, file);
|
||||
|
||||
} else {
|
||||
m_description = decompile_at_label_guess_type(m_label, env.file->labels, env.file->words_by_seg,
|
||||
env.dts->ts, file);
|
||||
|
||||
@@ -153,10 +153,16 @@ std::vector<DefstateElement::Entry> get_defstate_entries(
|
||||
}
|
||||
}
|
||||
// name = code/event/etc
|
||||
if (skip_states.count(state_name) > 0) {
|
||||
if (skip_states.at(state_name).find(name) != skip_states.at(state_name).end()) {
|
||||
std::string name_to_check_for_skip = state_name;
|
||||
if (skip_states.count(name_to_check_for_skip) == 0) {
|
||||
name_to_check_for_skip =
|
||||
fmt::format("({} {})", state_name, state_type.last_arg().base_type());
|
||||
}
|
||||
if (skip_states.count(name_to_check_for_skip) > 0) {
|
||||
if (skip_states.at(name_to_check_for_skip).find(name) !=
|
||||
skip_states.at(name_to_check_for_skip).end()) {
|
||||
env.func->warnings.general_warning("SKIP: skipping '{}' handler for state '{}'", name,
|
||||
state_name);
|
||||
name_to_check_for_skip);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
+395
-50
@@ -2914,6 +2914,20 @@
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
(defenum sound-mask
|
||||
:bitfield #t
|
||||
:type uint16
|
||||
(volume)
|
||||
(pitch)
|
||||
(bend)
|
||||
(unused)
|
||||
(time)
|
||||
(trans)
|
||||
(fo-min)
|
||||
(fo-max)
|
||||
(fo-curve)
|
||||
)
|
||||
|
||||
(deftype sound-rpc-cmd (structure)
|
||||
((rsvd1 uint16 :offset-assert 0)
|
||||
(command sound-command :offset-assert 2)
|
||||
@@ -2924,7 +2938,7 @@
|
||||
)
|
||||
|
||||
(deftype sound-play-parms (structure)
|
||||
((mask uint16 :offset-assert 0)
|
||||
((mask sound-mask :offset-assert 0)
|
||||
(pitch-mod int16 :offset-assert 2)
|
||||
(bend int16 :offset-assert 4)
|
||||
(fo-min int16 :offset-assert 6)
|
||||
@@ -3191,12 +3205,12 @@
|
||||
)
|
||||
|
||||
(deftype sound-spec (basic)
|
||||
((mask uint16 :offset-assert 4)
|
||||
((mask sound-mask :offset-assert 4)
|
||||
(num float :offset-assert 8)
|
||||
(group uint8 :offset-assert 12)
|
||||
(sound-name sound-name :score 20 :offset 16)
|
||||
(sound-name-char uint8 16 :offset 16) ;; moved to after sound-name
|
||||
(trans float 4 :offset-assert 32) ;; guess
|
||||
(sound-name sound-name :score 20 :offset 16)
|
||||
(sound-name-char uint8 16 :offset 16) ;; moved to after sound-name
|
||||
(trans float 4 :offset-assert 32) ;; guess
|
||||
(volume int32 :offset-assert 48)
|
||||
(pitch-mod int32 :offset-assert 52)
|
||||
(bend int32 :offset-assert 56)
|
||||
@@ -3219,15 +3233,15 @@
|
||||
(playing-id sound-id :offset-assert 8)
|
||||
(trans vector :inline :offset-assert 16)
|
||||
(name sound-name :offset-assert 32)
|
||||
(play-time time-frame :offset-assert 48)
|
||||
(time-base time-frame :offset-assert 56)
|
||||
(time-random time-frame :offset-assert 64)
|
||||
(play-time time-frame :offset-assert 48)
|
||||
(time-base time-frame :offset-assert 56)
|
||||
(time-random time-frame :offset-assert 64)
|
||||
(volume int32 :offset-assert 72)
|
||||
(pitch int32 :offset-assert 76)
|
||||
(falloff-near int32 :offset-assert 80)
|
||||
(falloff-far int32 :offset-assert 84)
|
||||
(falloff-mode int32 :offset-assert 88)
|
||||
(params (pointer float) :offset-assert 92)
|
||||
(params (pointer float) :offset-assert 92)
|
||||
(param-count int32 :offset-assert 96)
|
||||
(entity entity :offset-assert 100)
|
||||
(sound-count int32 :offset-assert 104)
|
||||
@@ -9080,9 +9094,46 @@
|
||||
|
||||
;; - Types
|
||||
|
||||
(defenum shadow-flags
|
||||
:bitfield #t
|
||||
:type int32
|
||||
(shdf00)
|
||||
(shdf01)
|
||||
(shdf02)
|
||||
(shdf03)
|
||||
(shdf04)
|
||||
(shdf05)
|
||||
(shdf06)
|
||||
(shdf07)
|
||||
(shdf08)
|
||||
(shdf09)
|
||||
(shdf10)
|
||||
(shdf11)
|
||||
(shdf12)
|
||||
(shdf13)
|
||||
(shdf14)
|
||||
(shdf15)
|
||||
(shdf16)
|
||||
(shdf17)
|
||||
(shdf18)
|
||||
(shdf19)
|
||||
(shdf20)
|
||||
(shdf21)
|
||||
(shdf22)
|
||||
(shdf23)
|
||||
(shdf24)
|
||||
(shdf25)
|
||||
(shdf26)
|
||||
(shdf27)
|
||||
(shdf28)
|
||||
(shdf29)
|
||||
(shdf30)
|
||||
(shdf31)
|
||||
)
|
||||
|
||||
(deftype shadow-settings (structure)
|
||||
((center vector :inline :offset-assert 0)
|
||||
(flags int32 :score 100 :offset 12)
|
||||
(flags shadow-flags :score 100 :offset 12)
|
||||
(shadow-dir vector :inline :offset-assert 16)
|
||||
(dist-to-locus float :offset 28)
|
||||
(bot-plane plane :inline :offset-assert 32)
|
||||
@@ -10087,6 +10138,43 @@
|
||||
|
||||
;; - Types
|
||||
|
||||
(defenum surface-flags
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(surf00)
|
||||
(surf01)
|
||||
(surf02)
|
||||
(surf03)
|
||||
(surf04)
|
||||
(surf05)
|
||||
(surf06)
|
||||
(surf07)
|
||||
(surf08)
|
||||
(surf09)
|
||||
(surf10)
|
||||
(surf11)
|
||||
(surf12)
|
||||
(surf13)
|
||||
(surf14)
|
||||
(surf15)
|
||||
(surf16)
|
||||
(surf17)
|
||||
(surf18)
|
||||
(surf19)
|
||||
(surf20)
|
||||
(surf21)
|
||||
(surf22)
|
||||
(surf23)
|
||||
(surf24)
|
||||
(surf25)
|
||||
(surf26)
|
||||
(surf27)
|
||||
(surf28)
|
||||
(surf29)
|
||||
(surf30)
|
||||
(surf31)
|
||||
)
|
||||
|
||||
(deftype surface (basic)
|
||||
((name symbol :offset-assert 4)
|
||||
;; data went here
|
||||
@@ -10119,7 +10207,7 @@
|
||||
(mult-hook (function surface surface surface int none) :offset-assert 140)
|
||||
;; dataw went here
|
||||
(mode symbol :offset-assert 144)
|
||||
(flags uint32 :offset-assert 148)
|
||||
(flags surface-flags :offset-assert 148)
|
||||
(data float 30 :offset 8)
|
||||
(hook function 4 :offset 128)
|
||||
(dataw uint32 2 :offset 144)
|
||||
@@ -10370,13 +10458,50 @@
|
||||
|
||||
;; - Types
|
||||
|
||||
(defenum align-flags
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(algf00)
|
||||
(algf01)
|
||||
(algf02)
|
||||
(algf03)
|
||||
(algf04)
|
||||
(algf05)
|
||||
(algf06)
|
||||
(algf07)
|
||||
(algf08)
|
||||
(algf09)
|
||||
(algf10)
|
||||
(algf11)
|
||||
(algf12)
|
||||
(algf13)
|
||||
(algf14)
|
||||
(algf15)
|
||||
(algf16)
|
||||
(algf17)
|
||||
(algf18)
|
||||
(algf19)
|
||||
(algf20)
|
||||
(algf21)
|
||||
(algf22)
|
||||
(algf23)
|
||||
(algf24)
|
||||
(algf25)
|
||||
(algf26)
|
||||
(algf27)
|
||||
(algf28)
|
||||
(algf29)
|
||||
(algf30)
|
||||
(algf31)
|
||||
)
|
||||
|
||||
(deftype align-control (basic)
|
||||
((flags uint32 :offset-assert 4)
|
||||
(process process-drawable :offset-assert 8)
|
||||
(frame-group art-joint-anim :offset-assert 12)
|
||||
((flags align-flags :offset-assert 4)
|
||||
(process process-drawable :offset-assert 8)
|
||||
(frame-group art-joint-anim :offset-assert 12)
|
||||
(frame-num float :offset-assert 16)
|
||||
(matrix matrix 2 :inline :offset-assert 32)
|
||||
(transform transform 2 :inline :offset-assert 160)
|
||||
(matrix matrix 2 :inline :offset-assert 32)
|
||||
(transform transform 2 :inline :offset-assert 160)
|
||||
(delta transformq :inline :offset-assert 256)
|
||||
(last-speed meters :offset-assert 304)
|
||||
(align transformq :inline :offset 160)
|
||||
@@ -10403,6 +10528,43 @@
|
||||
|
||||
;; - Types
|
||||
|
||||
(defenum state-flags
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(sf00)
|
||||
(sf01)
|
||||
(sf02)
|
||||
(sf03)
|
||||
(sf04)
|
||||
(sf05)
|
||||
(sf06)
|
||||
(sf07)
|
||||
(sf08)
|
||||
(sf09)
|
||||
(sf10)
|
||||
(sf11)
|
||||
(sf12)
|
||||
(sf13)
|
||||
(sf14)
|
||||
(sf15)
|
||||
(sf16)
|
||||
(sf17)
|
||||
(sf18)
|
||||
(sf19)
|
||||
(sf20)
|
||||
(sf21)
|
||||
(sf22)
|
||||
(sf23)
|
||||
(sf24)
|
||||
(sf25)
|
||||
(sf26)
|
||||
(sf27)
|
||||
(sf28)
|
||||
(sf29)
|
||||
(sf30)
|
||||
(sf31)
|
||||
)
|
||||
|
||||
(declare-type nav-control basic)
|
||||
(declare-type path-control basic)
|
||||
(declare-type vol-control basic)
|
||||
@@ -10425,7 +10587,7 @@
|
||||
(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-flags state-flags :offset-assert 164)
|
||||
(state-time time-frame :offset-assert 168)
|
||||
)
|
||||
:heap-base #x40
|
||||
@@ -11624,6 +11786,78 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defenum cshape-moving-flags
|
||||
:bitfield #t
|
||||
:type uint64
|
||||
(onsurf)
|
||||
(onground)
|
||||
(tsurf)
|
||||
(twall)
|
||||
(t-ciel)
|
||||
(t-act)
|
||||
(csmf06)
|
||||
(csmf07)
|
||||
(csmf08)
|
||||
(csmf09)
|
||||
(on-water)
|
||||
(csmf11)
|
||||
(csmf12)
|
||||
(csmf13)
|
||||
(csmf14)
|
||||
(csmf15)
|
||||
(csmf16)
|
||||
(csmf17)
|
||||
(csmf18)
|
||||
(csmf19)
|
||||
(csmf20)
|
||||
(csmf21)
|
||||
(csmf22)
|
||||
(csmf23)
|
||||
(csmf24)
|
||||
(csmf25)
|
||||
(csmf26)
|
||||
(csmf27)
|
||||
(csmf28)
|
||||
(csmf29)
|
||||
)
|
||||
|
||||
(defenum cshape-reaction-flags
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(csrf00)
|
||||
(csrf01)
|
||||
(csrf02)
|
||||
(csrf03)
|
||||
(csrf04)
|
||||
(csrf05)
|
||||
(csrf06)
|
||||
(csrf07)
|
||||
(csrf08)
|
||||
(csrf09)
|
||||
(csrf10)
|
||||
(csrf11)
|
||||
(csrf12)
|
||||
(csrf13)
|
||||
(csrf14)
|
||||
(csrf15)
|
||||
(csrf16)
|
||||
(csrf17)
|
||||
(csrf18)
|
||||
(csrf19)
|
||||
(csrf20)
|
||||
(csrf21)
|
||||
(csrf22)
|
||||
(csrf23)
|
||||
(csrf24)
|
||||
(csrf25)
|
||||
(csrf26)
|
||||
(csrf27)
|
||||
(csrf28)
|
||||
(csrf29)
|
||||
(csrf30)
|
||||
(csrf31)
|
||||
)
|
||||
|
||||
(deftype collide-shape-moving (collide-shape)
|
||||
((rider-time time-frame :offset-assert 184)
|
||||
(rider-last-move vector :inline :offset-assert 192)
|
||||
@@ -11631,12 +11865,12 @@
|
||||
(poly-pat pat-surface :offset-assert 256)
|
||||
(cur-pat pat-surface :offset-assert 260)
|
||||
(ground-pat pat-surface :offset-assert 264)
|
||||
(status uint64 :offset-assert 272) ;; 1: onsurf 2: onground 4: tsurf 8: twall 16: t-ciel 32: t-act ?? 1024: on-water
|
||||
(old-status uint64 :offset-assert 280)
|
||||
(prev-status uint64 :offset-assert 288)
|
||||
(reaction-flag uint32 :offset-assert 296)
|
||||
(reaction (function collide-shape-moving collide-shape-intersect vector vector uint) :offset-assert 300)
|
||||
(no-reaction (function collide-shape-moving collide-shape-intersect vector vector none) :offset-assert 304)
|
||||
(status cshape-moving-flags :offset-assert 272)
|
||||
(old-status cshape-moving-flags :offset-assert 280)
|
||||
(prev-status cshape-moving-flags :offset-assert 288)
|
||||
(reaction-flag cshape-reaction-flags :offset-assert 296)
|
||||
(reaction (function collide-shape-moving collide-shape-intersect vector vector cshape-moving-flags) :offset-assert 300)
|
||||
(no-reaction (function collide-shape-moving collide-shape-intersect vector vector none) :offset-assert 304)
|
||||
(local-normal vector :inline :offset-assert 320)
|
||||
(surface-normal vector :inline :offset-assert 336)
|
||||
(poly-normal vector :inline :offset-assert 352)
|
||||
@@ -11693,9 +11927,9 @@
|
||||
(local-normal vector :inline :offset-assert 64)
|
||||
(surface-normal vector :inline :offset-assert 80)
|
||||
(time time-frame :offset-assert 96)
|
||||
(status uint64 :offset-assert 104)
|
||||
(status cshape-moving-flags :offset-assert 104)
|
||||
(pat pat-surface :offset-assert 112)
|
||||
(reaction-flag uint32 :offset-assert 116)
|
||||
(reaction-flag cshape-reaction-flags :offset-assert 116)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x78
|
||||
@@ -18939,8 +19173,8 @@
|
||||
|
||||
(define-extern target-attack-up (function target symbol symbol none))
|
||||
(define-extern find-ground-point (function control-info vector float float vector))
|
||||
(define-extern default-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector uint)) ;; TODO - not completely confirmed
|
||||
(define-extern simple-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector uint))
|
||||
(define-extern default-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector cshape-moving-flags))
|
||||
(define-extern simple-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector cshape-moving-flags))
|
||||
(define-extern collide-shape-draw-debug-marks (function none))
|
||||
(define-extern debug-report-col-stats (function int))
|
||||
|
||||
@@ -19022,24 +19256,61 @@
|
||||
|
||||
;; - Types
|
||||
|
||||
(defenum water-flags
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(wt00)
|
||||
(wt01)
|
||||
(wt02)
|
||||
(wt03)
|
||||
(wt04)
|
||||
(wt05)
|
||||
(wt06)
|
||||
(wt07)
|
||||
(wt08)
|
||||
(wt09)
|
||||
(wt10)
|
||||
(wt11)
|
||||
(wt12)
|
||||
(wt13)
|
||||
(wt14)
|
||||
(wt15)
|
||||
(wt16)
|
||||
(wt17)
|
||||
(wt18)
|
||||
(wt19)
|
||||
(wt20)
|
||||
(wt21)
|
||||
(wt22)
|
||||
(wt23)
|
||||
(wt24)
|
||||
(wt25)
|
||||
(wt26)
|
||||
(wt27)
|
||||
(wt28)
|
||||
(wt29)
|
||||
(wt30)
|
||||
(wt31)
|
||||
)
|
||||
|
||||
(deftype water-control (basic)
|
||||
((flags uint32 :offset-assert 4)
|
||||
(process process-drawable :offset-assert 8)
|
||||
((flags water-flags :offset-assert 4)
|
||||
(process process-drawable :offset-assert 8)
|
||||
(joint-index int32 :offset-assert 12)
|
||||
(top-y-offset float :offset-assert 16)
|
||||
(ripple-size meters :offset-assert 20)
|
||||
(enter-water-time time-frame :offset-assert 24)
|
||||
(wade-time time-frame :offset-assert 32)
|
||||
(on-water-time time-frame :offset-assert 40)
|
||||
(enter-swim-time time-frame :offset-assert 48)
|
||||
(swim-time time-frame :offset-assert 56)
|
||||
(enter-water-time time-frame :offset-assert 24)
|
||||
(wade-time time-frame :offset-assert 32)
|
||||
(on-water-time time-frame :offset-assert 40)
|
||||
(enter-swim-time time-frame :offset-assert 48)
|
||||
(swim-time time-frame :offset-assert 56)
|
||||
(base-height meters :offset-assert 64)
|
||||
(wade-height meters :offset-assert 68)
|
||||
(swim-height meters :offset-assert 72)
|
||||
(surface-height meters :offset-assert 76)
|
||||
(bottom-height meters :offset-assert 80)
|
||||
(height meters :offset-assert 84)
|
||||
(height-offset float 4 :offset-assert 88)
|
||||
(height-offset float 4 :offset-assert 88)
|
||||
(real-ocean-offset meters :offset 88)
|
||||
(ocean-offset meters :offset 92)
|
||||
(bob-offset meters :offset 96)
|
||||
@@ -19047,13 +19318,13 @@
|
||||
(swim-depth meters :offset-assert 104)
|
||||
(bob smush-control :inline :offset-assert 112)
|
||||
(volume handle :offset-assert 144) ;; handle?
|
||||
(bottom vector 2 :inline :offset-assert 160)
|
||||
(top vector 2 :inline :offset-assert 192)
|
||||
(bottom vector 2 :inline :offset-assert 160)
|
||||
(top vector 2 :inline :offset-assert 192)
|
||||
(enter-water-pos vector :inline :offset-assert 224)
|
||||
(drip-old-pos vector :inline :offset-assert 240)
|
||||
(drip-joint-index int32 :offset-assert 256)
|
||||
(drip-wetness float :offset-assert 260)
|
||||
(drip-time time-frame :offset-assert 264)
|
||||
(drip-time time-frame :offset-assert 264)
|
||||
(drip-speed float :offset-assert 272)
|
||||
(drip-height meters :offset-assert 276)
|
||||
(drip-mult float :offset-assert 280)
|
||||
@@ -19079,9 +19350,9 @@
|
||||
(wade-height meters :offset-assert 180)
|
||||
(swim-height meters :offset-assert 184)
|
||||
(bottom-height meters :offset-assert 188)
|
||||
(attack-event symbol :offset-assert 192)
|
||||
(attack-event symbol :offset-assert 192)
|
||||
(target handle :offset-assert 200)
|
||||
(flags uint32 :offset-assert 208)
|
||||
(flags water-flags :offset-assert 208)
|
||||
)
|
||||
:heap-base #x70
|
||||
:method-count-assert 30
|
||||
@@ -19094,11 +19365,11 @@
|
||||
(TODO-RENAME-22 (_type_) none 22) ;; can also return an obs?
|
||||
(reset-root! (_type_) none 23)
|
||||
(set-stack-size! (_type_) none 24)
|
||||
(TODO-RENAME-25 (_type_) object 25)
|
||||
(TODO-RENAME-25 (_type_) none 25)
|
||||
(TODO-RENAME-26 (_type_) none 26)
|
||||
(dummy-27 (_type_) none 27)
|
||||
(get-ripple-height (_type_ vector) float 28)
|
||||
(TODO-RENAME-29 (_type_) uint 29)
|
||||
(TODO-RENAME-29 (_type_) none 29)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -19501,6 +19772,43 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defenum vol-flags
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(volf00)
|
||||
(volf01)
|
||||
(volf02)
|
||||
(volf03)
|
||||
(volf04)
|
||||
(volf05)
|
||||
(volf06)
|
||||
(volf07)
|
||||
(volf08)
|
||||
(volf09)
|
||||
(volf10)
|
||||
(volf11)
|
||||
(volf12)
|
||||
(volf13)
|
||||
(volf14)
|
||||
(volf15)
|
||||
(volf16)
|
||||
(volf17)
|
||||
(volf18)
|
||||
(volf19)
|
||||
(volf20)
|
||||
(volf21)
|
||||
(volf22)
|
||||
(volf23)
|
||||
(volf24)
|
||||
(volf25)
|
||||
(volf26)
|
||||
(volf27)
|
||||
(volf28)
|
||||
(volf29)
|
||||
(volf30)
|
||||
(volf31)
|
||||
)
|
||||
|
||||
(deftype vol-control (basic)
|
||||
((flags uint32 :offset-assert 4)
|
||||
(process process-drawable :offset-assert 8)
|
||||
@@ -20284,7 +20592,7 @@
|
||||
(define-extern collide-shape-moving-angle-set! (function collide-shape-moving vector vector none))
|
||||
(define-extern target-collision-low-coverage (function control-info collide-shape-intersect vector (pointer uint32) (pointer uint64) (pointer symbol) uint)) ;; i think the pointers are lies - TODO
|
||||
(define-extern poly-find-nearest-edge (function vector (inline-array vector) vector vector vector))
|
||||
(define-extern target-collision-reaction (function control-info collide-shape-intersect vector vector uint))
|
||||
(define-extern target-collision-reaction (function control-info collide-shape-intersect vector vector cshape-moving-flags))
|
||||
(define-extern target-collision-no-reaction (function control-info collide-shape-intersect vector vector none))
|
||||
|
||||
|
||||
@@ -20315,7 +20623,7 @@
|
||||
(define-extern add-thrust (function symbol :behavior target))
|
||||
(define-extern add-gravity (function vector :behavior target))
|
||||
(define-extern do-rotations2 (function int :behavior target))
|
||||
(define-extern reverse-conversions (function vector uint :behavior target))
|
||||
(define-extern reverse-conversions (function vector none :behavior target))
|
||||
(define-extern bend-gravity (function symbol :behavior target))
|
||||
(define-extern post-flag-setup (function none :behavior target))
|
||||
(define-extern joint-points (function none :behavior target))
|
||||
@@ -21851,7 +22159,7 @@
|
||||
|
||||
;; - Functions
|
||||
|
||||
(define-extern projectile-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector uint))
|
||||
(define-extern projectile-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector cshape-moving-flags))
|
||||
(define-extern projectile-update-velocity-space-wars (function projectile none))
|
||||
(define-extern find-nearest-attackable (function vector float uint uint vector float projectile)) ;; Whatever te search returns (match from search-info)
|
||||
(define-extern find-ground-and-draw-shadow (function vector vector float collide-kind process-drawable float float none))
|
||||
@@ -23051,6 +23359,43 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defenum eco-door-flags
|
||||
:bitfield #t
|
||||
:type int32
|
||||
(ecdf00)
|
||||
(ecdf01)
|
||||
(auto-close)
|
||||
(one-way)
|
||||
(ecdf04)
|
||||
(ecdf05)
|
||||
(ecdf06)
|
||||
(ecdf07)
|
||||
(ecdf08)
|
||||
(ecdf09)
|
||||
(ecdf10)
|
||||
(ecdf11)
|
||||
(ecdf12)
|
||||
(ecdf13)
|
||||
(ecdf14)
|
||||
(ecdf15)
|
||||
(ecdf16)
|
||||
(ecdf17)
|
||||
(ecdf18)
|
||||
(ecdf19)
|
||||
(ecdf20)
|
||||
(ecdf21)
|
||||
(ecdf22)
|
||||
(ecdf23)
|
||||
(ecdf24)
|
||||
(ecdf25)
|
||||
(ecdf26)
|
||||
(ecdf27)
|
||||
(ecdf28)
|
||||
(ecdf29)
|
||||
(ecdf30)
|
||||
(ecdf31)
|
||||
)
|
||||
|
||||
(deftype eco-door (process-drawable)
|
||||
((root-override collide-shape :score 100 :offset 112)
|
||||
(speed float :offset-assert 176)
|
||||
@@ -23060,7 +23405,7 @@
|
||||
(open-sound sound-name :offset-assert 208)
|
||||
(close-sound sound-name :offset-assert 224)
|
||||
(state-actor entity-actor :offset-assert 240)
|
||||
(flags int32 :offset-assert 244)
|
||||
(flags eco-door-flags :offset-assert 244)
|
||||
(locked symbol :offset-assert 248)
|
||||
(auto-close symbol :offset-assert 252)
|
||||
(one-way symbol :offset-assert 256)
|
||||
@@ -23795,7 +24140,7 @@
|
||||
(define-extern spawn-mistycannon-missile (function process-tree vector vector float float float float entity none))
|
||||
(define-extern angle-tracker-apply-move! (function angle-tracker float float))
|
||||
(define-extern mistycannon-missile-init-by-other (function mistycannon-init-data entity none :behavior mistycannon-missile))
|
||||
(define-extern mistycannon-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector uint))
|
||||
(define-extern mistycannon-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector cshape-moving-flags))
|
||||
(define-extern angle-tracker-get-value (function angle-tracker float))
|
||||
(define-extern angle-tracker-set-value (function angle-tracker float float))
|
||||
(define-extern solve-missile-tilt (function quadratic-solution float float float float symbol))
|
||||
@@ -24501,7 +24846,7 @@
|
||||
;; - Functions
|
||||
|
||||
(define-extern seagull-init-by-other (function vector int seagullflock none :behavior seagull))
|
||||
(define-extern seagull-reaction (function collide-shape-moving collide-shape-intersect vector vector uint))
|
||||
(define-extern seagull-reaction (function collide-shape-moving collide-shape-intersect vector vector cshape-moving-flags))
|
||||
(define-extern seagull-post (function none :behavior seagull))
|
||||
(define-extern beach-rock-trigger (function int))
|
||||
|
||||
@@ -27318,7 +27663,7 @@
|
||||
|
||||
;; - Functions
|
||||
|
||||
(define-extern racer-collision-reaction (function control-info collide-shape-intersect vector vector uint))
|
||||
(define-extern racer-collision-reaction (function control-info collide-shape-intersect vector vector cshape-moving-flags))
|
||||
(define-extern racer-service-slide (function none :behavior target))
|
||||
(define-extern racer-xz (function float float none :behavior target))
|
||||
(define-extern racer-thrust (function basic float none :behavior target))
|
||||
@@ -31542,7 +31887,7 @@
|
||||
:heap-base #x60
|
||||
:flag-assert #x15006000cc
|
||||
(:methods
|
||||
(dummy-20 (_type_ float) uint 20)
|
||||
(dummy-20 (_type_ float) cshape-moving-flags 20)
|
||||
)
|
||||
(:states
|
||||
(whirlpool-idle))
|
||||
|
||||
@@ -5143,7 +5143,10 @@
|
||||
[50, "s5", "eco-collectable"]
|
||||
],
|
||||
|
||||
"fuel-cell-init-by-other": [[118, "gp", "vector"]],
|
||||
"fuel-cell-init-by-other": [
|
||||
[108, "v0", "fact-options"],
|
||||
[118, "gp", "vector"]
|
||||
],
|
||||
|
||||
"ecovalve-init-by-other": [
|
||||
[95, "a0", "process-drawable"],
|
||||
@@ -5194,7 +5197,10 @@
|
||||
|
||||
"(code die eco)": [[53, "v1", "float"]],
|
||||
|
||||
"(trans pickup fuel-cell)": [[92, "v1", "float"]],
|
||||
"(trans pickup fuel-cell)": [
|
||||
[92, "v1", "float"],
|
||||
[130, "v0", "fact-options"]
|
||||
],
|
||||
|
||||
"(enter notice-blue eco-collectable)": [[13, "v1", "float"]],
|
||||
|
||||
|
||||
@@ -288,6 +288,18 @@ goos::Object decompile_value_array(const TypeSpec& elt_type,
|
||||
}
|
||||
|
||||
namespace {
|
||||
float word_as_float(const LinkedWord& w) {
|
||||
ASSERT(w.kind() == LinkedWord::PLAIN_DATA);
|
||||
float v;
|
||||
memcpy(&v, &w.data, 4);
|
||||
return v;
|
||||
}
|
||||
|
||||
s32 word_as_s32(const LinkedWord& w) {
|
||||
ASSERT(w.kind() == LinkedWord::PLAIN_DATA);
|
||||
return w.data;
|
||||
}
|
||||
|
||||
std::string print_def(const goos::Object& obj) {
|
||||
if (obj.is_pair() && obj.as_pair()->car.is_symbol() &&
|
||||
obj.as_pair()->car.as_symbol()->name == "quote") {
|
||||
@@ -578,6 +590,147 @@ goos::Object sp_launch_grp_launcher_decompile(const std::vector<LinkedWord>& wor
|
||||
file, TypeSpec("sparticle-group-item"), 32);
|
||||
}
|
||||
|
||||
goos::Object decompile_sound_spec(const TypeSpec& type,
|
||||
const DecompilerLabel& label,
|
||||
const std::vector<DecompilerLabel>& labels,
|
||||
const std::vector<std::vector<LinkedWord>>& words,
|
||||
const TypeSystem& ts,
|
||||
const LinkedObjectFile* file) {
|
||||
// auto normal = decompile_structure(type, label, labels, words, ts, file, false);
|
||||
// fmt::print("Doing: {}\n", normal.print());
|
||||
auto uncast_type_info = ts.lookup_type(type);
|
||||
auto type_info = dynamic_cast<StructureType*>(uncast_type_info);
|
||||
if (!type_info) {
|
||||
throw std::runtime_error(fmt::format("Type {} wasn't a structure type.", type.print()));
|
||||
}
|
||||
ASSERT(type_info->get_size_in_memory() == 0x4c);
|
||||
|
||||
// get words for real
|
||||
auto offset_location = label.offset - type_info->get_offset();
|
||||
int word_count = (type_info->get_size_in_memory() + 3) / 4;
|
||||
std::vector<LinkedWord> obj_words;
|
||||
obj_words.insert(obj_words.begin(),
|
||||
words.at(label.target_segment).begin() + (offset_location / 4) + 1,
|
||||
words.at(label.target_segment).begin() + (offset_location / 4) + word_count);
|
||||
|
||||
for (int i = 0; i < word_count - 1; ++i) {
|
||||
if (i == word_count - 2 && !obj_words.at(i).data) {
|
||||
// just some default initialized sound spec, don't attempt anything fancy.
|
||||
return decompile_structure(type, label, labels, words, ts, file, false);
|
||||
}
|
||||
if (obj_words.at(i).data)
|
||||
break;
|
||||
}
|
||||
|
||||
u16 implicit_mask = 0;
|
||||
u16 mask = obj_words.at(0).data;
|
||||
float num = word_as_float(obj_words.at(1));
|
||||
u8 group = obj_words.at(2).data;
|
||||
char sound_name[17];
|
||||
sound_name[16] = 0;
|
||||
memcpy(&sound_name[0], &obj_words.at(3).data, sizeof(u32));
|
||||
memcpy(&sound_name[4], &obj_words.at(4).data, sizeof(u32));
|
||||
memcpy(&sound_name[8], &obj_words.at(5).data, sizeof(u32));
|
||||
memcpy(&sound_name[12], &obj_words.at(6).data, sizeof(u32));
|
||||
std::string name(sound_name);
|
||||
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
if (obj_words.at(7 + i).data) {
|
||||
throw std::runtime_error("static sound-spec trans was not zero.");
|
||||
}
|
||||
}
|
||||
|
||||
s32 volume = word_as_s32(obj_words.at(11));
|
||||
s32 pitch = word_as_s32(obj_words.at(12));
|
||||
s32 bend = word_as_s32(obj_words.at(13));
|
||||
s16 fo_min = word_as_s32(obj_words.at(14));
|
||||
s16 fo_max = word_as_s32(obj_words.at(14)) >> 16;
|
||||
s8 fo_curve = word_as_s32(obj_words.at(15));
|
||||
s8 priority = word_as_s32(obj_words.at(15)) >> 8;
|
||||
s32 auto_time = word_as_s32(obj_words.at(16));
|
||||
s32 auto_from = word_as_s32(obj_words.at(17));
|
||||
|
||||
if (bend) {
|
||||
throw std::runtime_error("static sound-spec bend was not zero.");
|
||||
}
|
||||
if (fo_curve) {
|
||||
throw std::runtime_error("static sound-spec fo_curve was not zero.");
|
||||
}
|
||||
if (priority) {
|
||||
throw std::runtime_error("static sound-spec priority was not zero.");
|
||||
}
|
||||
if (auto_time) {
|
||||
throw std::runtime_error("static sound-spec auto_time was not zero.");
|
||||
}
|
||||
if (auto_from) {
|
||||
throw std::runtime_error("static sound-spec auto_from was not zero.");
|
||||
}
|
||||
|
||||
std::vector<goos::Object> the_macro;
|
||||
|
||||
the_macro.push_back(pretty_print::to_symbol("static-sound-spec"));
|
||||
the_macro.push_back(goos::StringObject::make_new(name));
|
||||
if (num != 1) {
|
||||
the_macro.push_back(pretty_print::to_symbol(fmt::format(":num {}", num)));
|
||||
}
|
||||
if (group != 1) {
|
||||
the_macro.push_back(pretty_print::to_symbol(fmt::format(":group {}", num)));
|
||||
}
|
||||
if ((mask & 1) || volume != 1024) {
|
||||
implicit_mask |= 1 << 0;
|
||||
float volf = volume / 10.24f;
|
||||
// volume is fixed point, and floats should round towards zero, so we convert specific ints
|
||||
// to better-looking floats that end up being the same value.
|
||||
// there should be a more automated way to do this, but i am a bit lazy.
|
||||
switch (volume) {
|
||||
case 0x2cc:
|
||||
volf = 70;
|
||||
break;
|
||||
case 0x333:
|
||||
volf = 80;
|
||||
break;
|
||||
}
|
||||
the_macro.push_back(pretty_print::to_symbol(fmt::format(":volume {}", float_to_string(volf))));
|
||||
}
|
||||
if (pitch != 0) {
|
||||
implicit_mask |= 1 << 1;
|
||||
the_macro.push_back(pretty_print::to_symbol(fmt::format(":pitch-mod {}", pitch)));
|
||||
}
|
||||
if (fo_min != 0) {
|
||||
implicit_mask |= 1 << 6;
|
||||
the_macro.push_back(pretty_print::to_symbol(fmt::format(":fo-min {}", fo_min)));
|
||||
}
|
||||
if (fo_max != 0) {
|
||||
implicit_mask |= 1 << 7;
|
||||
the_macro.push_back(pretty_print::to_symbol(fmt::format(":fo-max {}", fo_max)));
|
||||
}
|
||||
|
||||
if (mask < implicit_mask) {
|
||||
throw std::runtime_error(
|
||||
fmt::format("static sound-spec too many implicit masks: #x{:x}", implicit_mask ^ mask));
|
||||
}
|
||||
u16 final_mask = mask ^ implicit_mask;
|
||||
if (final_mask) {
|
||||
lg::error(
|
||||
"final_mask in static sound-spec decomp: #x{:x}. This is fine, but should be reported.",
|
||||
final_mask);
|
||||
std::string mask_list = ":mask (";
|
||||
bool first = true;
|
||||
for (const auto& m : decompile_bitfield_enum_from_int(TypeSpec("sound-mask"), ts, final_mask)) {
|
||||
if (!first) {
|
||||
mask_list += " ";
|
||||
}
|
||||
mask_list += m;
|
||||
first = false;
|
||||
}
|
||||
mask_list += ")";
|
||||
|
||||
the_macro.push_back(pretty_print::to_symbol(mask_list));
|
||||
}
|
||||
|
||||
return pretty_print::build_list(the_macro);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
goos::Object decompile_structure(const TypeSpec& type,
|
||||
@@ -587,13 +740,19 @@ goos::Object decompile_structure(const TypeSpec& type,
|
||||
const TypeSystem& ts,
|
||||
const LinkedObjectFile* file,
|
||||
bool use_fancy_macros) {
|
||||
if (use_fancy_macros && type == TypeSpec("sp-field-init-spec")) {
|
||||
return decompile_sparticle_field_init(type, label, labels, words, ts, file);
|
||||
// some structures we want to decompile to fancy macros instead of a raw static definiton
|
||||
if (use_fancy_macros) {
|
||||
if (type == TypeSpec("sp-field-init-spec")) {
|
||||
return decompile_sparticle_field_init(type, label, labels, words, ts, file);
|
||||
}
|
||||
if (type == TypeSpec("sparticle-group-item")) {
|
||||
return decompile_sparticle_group_item(type, label, labels, words, ts, file);
|
||||
}
|
||||
if (type == TypeSpec("sound-spec")) {
|
||||
return decompile_sound_spec(type, label, labels, words, ts, file);
|
||||
}
|
||||
}
|
||||
|
||||
if (use_fancy_macros && type == TypeSpec("sparticle-group-item")) {
|
||||
return decompile_sparticle_group_item(type, label, labels, words, ts, file);
|
||||
}
|
||||
// first step, get type info and words
|
||||
TypeSpec actual_type = type;
|
||||
auto uncast_type_info = ts.lookup_type(actual_type);
|
||||
|
||||
@@ -448,7 +448,7 @@ goos::Object decompile_sparticle_group_item(const TypeSpec& type,
|
||||
const std::vector<std::vector<LinkedWord>>& words,
|
||||
const TypeSystem& ts,
|
||||
const LinkedObjectFile* file) {
|
||||
auto normal = decompile_structure(type, label, labels, words, ts, file, false);
|
||||
// auto normal = decompile_structure(type, label, labels, words, ts, file, false);
|
||||
// fmt::print("Doing: {}\n", normal.print());
|
||||
auto uncast_type_info = ts.lookup_type(type);
|
||||
auto type_info = dynamic_cast<StructureType*>(uncast_type_info);
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
)
|
||||
(and *target*
|
||||
(!= (-> *target* next-state name) 'target-look-around)
|
||||
(zero? (logand (-> *target* state-flags) #x8008))
|
||||
(zero? (logand (-> *target* state-flags) (state-flags sf03 sf15)))
|
||||
(= *master-mode* 'game)
|
||||
)
|
||||
)
|
||||
@@ -750,9 +750,9 @@
|
||||
(set! sv-16 (symbol->string (res-lump-struct s5-0 'effect-name symbol :time f30-0)))
|
||||
(let ((s4-2 (new 'stack 'sound-spec)))
|
||||
(set! (-> s4-2 sound-name) (string->sound-name sv-16))
|
||||
(logior! (-> s4-2 mask) 1)
|
||||
(logior! (-> s4-2 mask) (sound-mask volume))
|
||||
(set! (-> s4-2 volume) 1024)
|
||||
(logior! (-> s4-2 mask) 4)
|
||||
(logior! (-> s4-2 mask) (sound-mask bend))
|
||||
(set! (-> s4-2 bend) (the int (* 327.66998 (rand-vu-float-range -100.0 100.0))))
|
||||
(set! sv-112 (new 'static 'res-tag))
|
||||
(let ((a1-7 ((method-of-type res-lump get-property-data)
|
||||
@@ -802,7 +802,7 @@
|
||||
(s4-0 (new 'stack 'sound-spec))
|
||||
)
|
||||
(set! (-> s4-0 sound-name) (string->sound-name s2-0))
|
||||
(logior! (-> s4-0 mask) 1)
|
||||
(logior! (-> s4-0 mask) (sound-mask volume))
|
||||
(set! (-> s4-0 volume) 1024)
|
||||
(when (the-as (pointer res-tag) s3-0)
|
||||
(let ((t9-2 effect-param->sound-spec)
|
||||
|
||||
@@ -823,7 +823,7 @@
|
||||
)
|
||||
(sound-trans-convert (-> gp-3 parms trans) a1-23)
|
||||
)
|
||||
(set! (-> gp-3 parms mask) (the-as uint 32))
|
||||
(set! (-> gp-3 parms mask) (sound-mask trans))
|
||||
(-> gp-3 id)
|
||||
)
|
||||
(let ((gp-4 (the-as sound-rpc-set-param (get-sound-buffer-entry))))
|
||||
@@ -840,7 +840,7 @@
|
||||
)
|
||||
(sound-trans-convert (-> gp-4 parms trans) a1-25)
|
||||
)
|
||||
(set! (-> gp-4 parms mask) (the-as uint 32))
|
||||
(set! (-> gp-4 parms mask) (sound-mask trans))
|
||||
(-> gp-4 id)
|
||||
)
|
||||
(let ((gp-5 (the-as sound-rpc-set-param (get-sound-buffer-entry))))
|
||||
@@ -857,7 +857,7 @@
|
||||
)
|
||||
(sound-trans-convert (-> gp-5 parms trans) a1-27)
|
||||
)
|
||||
(set! (-> gp-5 parms mask) (the-as uint 32))
|
||||
(set! (-> gp-5 parms mask) (sound-mask trans))
|
||||
(-> gp-5 id)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -5,9 +5,46 @@
|
||||
;; name in dgo: aligner-h
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
(defenum align-flags
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(algf00)
|
||||
(algf01)
|
||||
(algf02)
|
||||
(algf03)
|
||||
(algf04)
|
||||
(algf05)
|
||||
(algf06)
|
||||
(algf07)
|
||||
(algf08)
|
||||
(algf09)
|
||||
(algf10)
|
||||
(algf11)
|
||||
(algf12)
|
||||
(algf13)
|
||||
(algf14)
|
||||
(algf15)
|
||||
(algf16)
|
||||
(algf17)
|
||||
(algf18)
|
||||
(algf19)
|
||||
(algf20)
|
||||
(algf21)
|
||||
(algf22)
|
||||
(algf23)
|
||||
(algf24)
|
||||
(algf25)
|
||||
(algf26)
|
||||
(algf27)
|
||||
(algf28)
|
||||
(algf29)
|
||||
(algf30)
|
||||
(algf31)
|
||||
)
|
||||
|
||||
;; The align control is responsible for aligning an animation to a moving character.
|
||||
(deftype align-control (basic)
|
||||
((flags uint32 :offset-assert 4)
|
||||
((flags align-flags :offset-assert 4)
|
||||
(process process-drawable :offset-assert 8)
|
||||
(frame-group art-joint-anim :offset-assert 12)
|
||||
(frame-num float :offset-assert 16)
|
||||
@@ -45,3 +82,5 @@
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+61
-134
@@ -5,10 +5,10 @@
|
||||
;; name in dgo: aligner
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; definition for method 9 of type align-control
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; WARN: Unsupported inline assembly instruction kind - [lw ra, return-from-thread(s7)]
|
||||
;; WARN: Unsupported inline assembly instruction kind - [jr ra]
|
||||
;; Used lq/sq
|
||||
(defmethod TODO-RENAME-9 align-control ((obj align-control))
|
||||
(local-vars (a0-9 symbol) (s7-0 none) (ra-0 int))
|
||||
(with-pp
|
||||
@@ -21,11 +21,7 @@
|
||||
(a2-0 (= a0-4 a1-0))
|
||||
)
|
||||
(cond
|
||||
((or a2-0 (begin
|
||||
(set! a1-0 'stack1)
|
||||
(= a0-4 a1-0)
|
||||
)
|
||||
)
|
||||
((or a2-0 (begin (set! a1-0 'stack1) (= a0-4 a1-0)))
|
||||
)
|
||||
(else
|
||||
; TODO - support decompiling the return-from-thread
|
||||
@@ -62,37 +58,30 @@
|
||||
(set! a0-9 (< (* (-> a0-8 param 0) (- f0-0 (-> obj frame-num))) 0.0))
|
||||
)
|
||||
(else
|
||||
(set! a0-9 (= f0-0 0.0))
|
||||
)
|
||||
(set! a0-9 (= f0-0 0.0))
|
||||
)
|
||||
)
|
||||
(if a0-9
|
||||
(logior! (-> obj flags) 1)
|
||||
(set! (-> obj flags) (logand -2 (the-as int (-> obj flags))))
|
||||
(logior! (-> obj flags) (align-flags algf00))
|
||||
(logclear! (-> obj flags) (align-flags algf00))
|
||||
)
|
||||
(set! (-> obj frame-group) v1-16)
|
||||
(set! (-> obj frame-num) f0-0)
|
||||
)
|
||||
(mem-copy!
|
||||
(the-as pointer (-> obj transform 1))
|
||||
(the-as pointer (-> obj transform))
|
||||
48
|
||||
)
|
||||
(quaternion-copy!
|
||||
(the-as quaternion (-> obj transform 1 rot))
|
||||
(-> obj align quat)
|
||||
)
|
||||
(mem-copy! (the-as pointer (-> obj transform 1)) (the-as pointer (-> obj transform)) 48)
|
||||
(quaternion-copy! (the-as quaternion (-> obj transform 1 rot)) (-> obj align quat))
|
||||
(set! (-> obj transform 1 scale quad) (-> obj align scale quad))
|
||||
(let* ((a2-5 (-> obj matrix 1))
|
||||
(let* ((a2-5 (-> obj matrix 1 vector))
|
||||
(a3-0 (-> obj matrix))
|
||||
(v1-19 (-> a3-0 0 vector 0 quad))
|
||||
(a0-18 (-> a3-0 0 vector 1 quad))
|
||||
(a1-12 (-> a3-0 0 vector 2 quad))
|
||||
(a3-1 (-> a3-0 0 vector 3 quad))
|
||||
)
|
||||
(set! (-> a2-5 vector 0 quad) v1-19)
|
||||
(set! (-> a2-5 vector 1 quad) a0-18)
|
||||
(set! (-> a2-5 vector 2 quad) a1-12)
|
||||
(set! (-> a2-5 vector 3 quad) a3-1)
|
||||
(set! (-> a2-5 0 quad) v1-19)
|
||||
(set! (-> a2-5 1 quad) a0-18)
|
||||
(set! (-> a2-5 2 quad) a1-12)
|
||||
(set! (-> a2-5 3 quad) a3-1)
|
||||
)
|
||||
(let ((s5-1 (-> obj process node-list data 1)))
|
||||
(cspace<-matrix-no-push-joint! s5-1 (-> obj process skel))
|
||||
@@ -108,71 +97,43 @@
|
||||
(set! (-> v1-23 0 vector 2 quad) a2-6)
|
||||
(set! (-> v1-23 0 vector 3 quad) a3-3)
|
||||
)
|
||||
(vector*!
|
||||
(the-as vector (-> obj transform))
|
||||
(-> s5-1 bone position)
|
||||
(-> obj process root scale)
|
||||
)
|
||||
(vector*! (the-as vector (-> obj transform)) (-> s5-1 bone transform vector 3) (-> obj process root scale))
|
||||
)
|
||||
(vector-!
|
||||
(the-as vector (-> obj delta))
|
||||
(the-as vector (-> obj transform))
|
||||
(the-as vector (-> obj transform 1))
|
||||
)
|
||||
(the-as vector (-> obj delta))
|
||||
(the-as vector (-> obj transform))
|
||||
(the-as vector (-> obj transform 1))
|
||||
)
|
||||
(set-vector!
|
||||
(-> obj align scale)
|
||||
(vector-length (the-as vector (-> obj matrix)))
|
||||
(vector-length (-> obj matrix 0 vector 1))
|
||||
(vector-length (-> obj matrix 0 vector 2))
|
||||
1.0
|
||||
)
|
||||
(vector-!
|
||||
(-> obj delta scale)
|
||||
(-> obj align scale)
|
||||
(-> obj transform 1 scale)
|
||||
)
|
||||
(let
|
||||
((a2-8
|
||||
(matrix-inv-scale! (new 'stack-no-clear 'matrix) (-> obj align scale))
|
||||
)
|
||||
)
|
||||
(quaternion-normalize!
|
||||
(matrix->quaternion
|
||||
(-> obj align quat)
|
||||
(matrix*! a2-8 (the-as matrix (-> obj matrix)) a2-8)
|
||||
)
|
||||
)
|
||||
(-> obj align scale)
|
||||
(vector-length (the-as vector (-> obj matrix)))
|
||||
(vector-length (-> obj matrix 0 vector 1))
|
||||
(vector-length (-> obj matrix 0 vector 2))
|
||||
1.0
|
||||
)
|
||||
(let
|
||||
((a1-24
|
||||
(quaternion-inverse!
|
||||
(new 'stack-no-clear 'quaternion)
|
||||
(the-as quaternion (-> obj transform 1 rot))
|
||||
)
|
||||
)
|
||||
)
|
||||
(vector-! (-> obj delta scale) (-> obj align scale) (-> obj transform 1 scale))
|
||||
(let ((a2-8 (matrix-inv-scale! (new 'stack-no-clear 'matrix) (-> obj align scale))))
|
||||
(quaternion-normalize!
|
||||
(quaternion*! (-> obj delta quat) a1-24 (-> obj align quat))
|
||||
)
|
||||
(matrix->quaternion (-> obj align quat) (matrix*! a2-8 (the-as matrix (-> obj matrix)) a2-8))
|
||||
)
|
||||
)
|
||||
(let ((a1-24 (quaternion-inverse! (new 'stack-no-clear 'quaternion) (the-as quaternion (-> obj transform 1 rot)))))
|
||||
(quaternion-normalize! (quaternion*! (-> obj delta quat) a1-24 (-> obj align quat)))
|
||||
)
|
||||
(-> obj delta)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 12 of type align-control
|
||||
;; INFO: Return type mismatch (inline-array transform) vs transform.
|
||||
(defmethod first-transform align-control ((obj align-control))
|
||||
(the-as transform (-> obj transform))
|
||||
)
|
||||
|
||||
;; definition for method 13 of type align-control
|
||||
(defmethod snd-transform align-control ((obj align-control))
|
||||
(-> obj transform 1)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type align-control
|
||||
(defmethod TODO-RENAME-10 align-control ((obj align-control) (arg0 int) (arg1 float) (arg2 float) (arg3 float))
|
||||
(when (zero? (logand (-> obj flags) 1))
|
||||
(when (zero? (logand (-> obj flags) (align-flags algf00)))
|
||||
(let* ((a0-1 (-> obj process))
|
||||
(t9-0 (method-of-object a0-1 apply-alignment))
|
||||
(v1-4 (-> obj delta))
|
||||
@@ -188,79 +149,45 @@
|
||||
(-> obj process root)
|
||||
)
|
||||
|
||||
;; definition for method 26 of type trsqv
|
||||
(defmethod
|
||||
TODO-RENAME-26
|
||||
trsqv
|
||||
((obj trsqv) (arg0 int) (arg1 vector) (arg2 float))
|
||||
(defmethod TODO-RENAME-26 trsqv ((obj trsqv) (arg0 int) (arg1 vector) (arg2 float))
|
||||
(let ((gp-0 (-> obj transv)))
|
||||
(when (nonzero? (logand arg0 4))
|
||||
(set! (-> gp-0 x) (-> arg1 x))
|
||||
(set! (-> gp-0 z) (-> arg1 z))
|
||||
(let
|
||||
((f0-4
|
||||
(fmin (* (vector-xz-length arg1) (-> *display* frames-per-second)) arg2)
|
||||
)
|
||||
(when (logtest? arg0 4)
|
||||
(set! (-> gp-0 x) (-> arg1 x))
|
||||
(set! (-> gp-0 z) (-> arg1 z))
|
||||
(let ((f0-4 (fmin (* (vector-xz-length arg1) (-> *display* frames-per-second)) arg2)))
|
||||
(vector-xz-normalize! gp-0 f0-4)
|
||||
)
|
||||
)
|
||||
(vector-xz-normalize! gp-0 f0-4)
|
||||
)
|
||||
)
|
||||
)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 11 of type align-control
|
||||
;; INFO: Return type mismatch trsqv vs none.
|
||||
(defmethod
|
||||
TODO-RENAME-11
|
||||
align-control
|
||||
((obj align-control)
|
||||
(arg0 int)
|
||||
(arg1 vector)
|
||||
(arg2 int)
|
||||
(arg3 float)
|
||||
(arg4 float)
|
||||
)
|
||||
(when (zero? (logand (-> obj flags) 1))
|
||||
(let ((s5-0 (-> obj delta)))
|
||||
(let ((s3-0 (-> obj process root transv)))
|
||||
(if (nonzero? (logand arg0 2))
|
||||
(set!
|
||||
(-> s3-0 y)
|
||||
(* (* (-> s5-0 trans y) arg3) (-> *display* frames-per-second))
|
||||
)
|
||||
)
|
||||
(when (nonzero? (logand arg0 4))
|
||||
(set! (-> s3-0 x) (-> arg1 x))
|
||||
(set! (-> s3-0 z) (-> arg1 z))
|
||||
(let
|
||||
((f0-8
|
||||
(*
|
||||
(fmin
|
||||
(vector-xz-length arg1)
|
||||
(* (vector-xz-length (-> s5-0 trans)) arg4)
|
||||
)
|
||||
(-> *display* frames-per-second)
|
||||
(defmethod TODO-RENAME-11 align-control ((obj align-control) (arg0 int) (arg1 vector) (arg2 int) (arg3 float) (arg4 float))
|
||||
(when (zero? (logand (-> obj flags) (align-flags algf00)))
|
||||
(let ((s5-0 (-> obj delta)))
|
||||
(let ((s3-0 (-> obj process root transv)))
|
||||
(if (logtest? arg0 2)
|
||||
(set! (-> s3-0 y) (* (-> s5-0 trans y) arg3 (-> *display* frames-per-second)))
|
||||
)
|
||||
(when (logtest? arg0 4)
|
||||
(set! (-> s3-0 x) (-> arg1 x))
|
||||
(set! (-> s3-0 z) (-> arg1 z))
|
||||
(let ((f0-8 (* (fmin (vector-xz-length arg1) (* (vector-xz-length (-> s5-0 trans)) arg4))
|
||||
(-> *display* frames-per-second)
|
||||
)
|
||||
)
|
||||
(t9-2 vector-xz-normalize!)
|
||||
)
|
||||
(set! (-> obj last-speed) f0-8)
|
||||
(t9-2 s3-0 f0-8)
|
||||
)
|
||||
)
|
||||
)
|
||||
(t9-2 vector-xz-normalize!)
|
||||
)
|
||||
(set! (-> obj last-speed) f0-8)
|
||||
(t9-2 s3-0 f0-8)
|
||||
)
|
||||
(if (logtest? arg0 16)
|
||||
(quaternion-normalize! (quaternion*! (-> obj process root quat) (-> obj process root quat) (-> s5-0 quat)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (nonzero? (logand arg0 16))
|
||||
(quaternion-normalize!
|
||||
(quaternion*!
|
||||
(-> obj process root quat)
|
||||
(-> obj process root quat)
|
||||
(-> s5-0 quat)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(-> obj process root)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -65,10 +65,11 @@
|
||||
(set! (-> self foot-offset) (-> *CAMERA_MASTER-bank* onscreen-foot-height))
|
||||
(set! (-> self head-offset) (-> *CAMERA_MASTER-bank* onscreen-head-height))
|
||||
(set! (-> self target-height) (-> *CAMERA_MASTER-bank* target-height))
|
||||
(set! (-> self on-ground) (not (and (logtest? (-> *target* control unknown-surface00 flags) 2048)
|
||||
(zero? (logand (-> *target* control status) 1))
|
||||
)
|
||||
)
|
||||
(set! (-> self on-ground)
|
||||
(not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags surf11))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self on-pole) #f)
|
||||
(set! (-> self ease-t) 1.0)
|
||||
@@ -99,7 +100,9 @@
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and (logtest? (-> *target* water flags) 4096) (zero? (logand (-> *target* water flags) 16)))
|
||||
((and (logtest? (-> *target* water flags) (water-flags wt12))
|
||||
(zero? (logand (-> *target* water flags) (water-flags wt04)))
|
||||
)
|
||||
(set! (-> self under-water) 2)
|
||||
)
|
||||
(else
|
||||
@@ -322,7 +325,9 @@
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and (logtest? (-> *target* water flags) 4096) (zero? (logand (-> *target* water flags) 16)))
|
||||
((and (logtest? (-> *target* water flags) (water-flags wt12))
|
||||
(zero? (logand (-> *target* water flags) (water-flags wt04)))
|
||||
)
|
||||
(set! (-> self under-water) 2)
|
||||
)
|
||||
((> (-> self under-water) 0)
|
||||
@@ -372,17 +377,18 @@
|
||||
(vector--float*! s5-2 (-> self tpos-curr) (-> self local-down) (-> self target-height))
|
||||
(vector-float*! gp-5 (-> self tgt-rot-mat vector 2) 4915.2)
|
||||
(vector-! s5-2 s5-2 gp-5)
|
||||
(let ((f0-20 (fill-and-probe-using-line-sphere
|
||||
*collide-cache*
|
||||
s5-2
|
||||
gp-5
|
||||
4300.8
|
||||
(collide-kind background)
|
||||
(the-as process #f)
|
||||
s4-2
|
||||
4098
|
||||
)
|
||||
)
|
||||
(let ((f0-20
|
||||
(fill-and-probe-using-line-sphere
|
||||
*collide-cache*
|
||||
s5-2
|
||||
gp-5
|
||||
4300.8
|
||||
(collide-kind background)
|
||||
(the-as process #f)
|
||||
s4-2
|
||||
4098
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (< 0.0 f0-20) (< f0-20 1.0))
|
||||
(vector+float*! (-> self tpos-curr) (-> self tpos-curr) gp-5 (+ -1.0 f0-20))
|
||||
@@ -390,16 +396,17 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self on-ground) (not (and (logtest? (-> *target* control unknown-surface00 flags) 2048)
|
||||
(zero? (logand (-> *target* control status) 1))
|
||||
)
|
||||
)
|
||||
(set! (-> self on-ground)
|
||||
(not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags surf11))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((gp-6 (new-stack-vector0)))
|
||||
0.0
|
||||
(cond
|
||||
((and (and (logtest? (-> *target* control unknown-surface00 flags) 2048)
|
||||
(zero? (logand (-> *target* control status) 1))
|
||||
((and (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags surf11))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
(!= (-> *target* control unknown-surface00 name) 'launch-jump)
|
||||
)
|
||||
@@ -445,7 +452,7 @@
|
||||
(vector-! gp-6 (-> self tpos-curr) (-> self tpos-old))
|
||||
(let ((f0-38 (vector-dot gp-6 (-> self local-down))))
|
||||
(cond
|
||||
((logtest? (-> *target* water flags) 512)
|
||||
((logtest? (-> *target* water flags) (water-flags wt09))
|
||||
(set! (-> self upspeed) 0.0)
|
||||
)
|
||||
((< 0.0 f0-38)
|
||||
@@ -474,7 +481,7 @@
|
||||
(reset-follow)
|
||||
)
|
||||
(let ((v1-196 (-> *target* water flags)))
|
||||
(when (and (logtest? v1-196 512) (logtest? v1-196 6144))
|
||||
(when (and (logtest? v1-196 (water-flags wt09)) (logtest? v1-196 (water-flags wt11 wt12)))
|
||||
(let ((f0-45 (- (-> *target* water base-height) (-> self target-height))))
|
||||
(if (< (-> self tpos-curr-adj y) f0-45)
|
||||
(set! (-> self tpos-curr-adj y) f0-45)
|
||||
|
||||
@@ -460,7 +460,10 @@
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(if (and *target* (logtest? (-> *camera* master-options) 2) (logtest? (-> *target* state-flags) 512))
|
||||
(if (and *target*
|
||||
(logtest? (-> *camera* master-options) 2)
|
||||
(logtest? (-> *target* state-flags) (state-flags sf09))
|
||||
)
|
||||
(send-event *target* 'end-mode)
|
||||
)
|
||||
(none)
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
(if (= (-> arg0 poly-pat mode) (pat-mode wall))
|
||||
(set! sv-104 (logior sv-104 1))
|
||||
)
|
||||
(if (logtest? (-> arg0 unknown-surface00 flags) 2048)
|
||||
(if (logtest? (-> arg0 unknown-surface00 flags) (surface-flags surf11))
|
||||
(set! sv-104 (logior sv-104 32))
|
||||
)
|
||||
(let ((v1-23 (new 'stack-no-clear 'vector)))
|
||||
@@ -251,7 +251,7 @@
|
||||
(& sv-160)
|
||||
)
|
||||
)
|
||||
(when (zero? (logand (-> arg0 prev-status) 1))
|
||||
(when (zero? (logand (-> arg0 prev-status) (cshape-moving-flags onsurf)))
|
||||
(set! (-> arg0 ground-impact-vel) (- (vector-dot (-> arg0 transv) (-> arg0 dynam gravity-normal))))
|
||||
(set! sv-96 (logior sv-96 2048))
|
||||
(when (not sv-160)
|
||||
@@ -314,19 +314,18 @@
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((not
|
||||
(and (>= (-> arg1 best-from-prim local-sphere w)
|
||||
(vector-dot
|
||||
(-> arg0 ground-poly-normal)
|
||||
(vector-! (new 'stack-no-clear 'vector) (-> arg1 best-tri intersect) (-> arg0 ground-touch-point))
|
||||
)
|
||||
)
|
||||
(and (< 0.0 (vector-dot (-> arg0 ground-poly-normal) arg2))
|
||||
(< (- (-> *display* base-frame-counter) (-> arg0 unknown-dword10)) (seconds 0.3))
|
||||
(zero? (logand sv-104 32))
|
||||
)
|
||||
)
|
||||
)
|
||||
((not (and (>= (-> arg1 best-from-prim local-sphere w)
|
||||
(vector-dot
|
||||
(-> arg0 ground-poly-normal)
|
||||
(vector-! (new 'stack-no-clear 'vector) (-> arg1 best-tri intersect) (-> arg0 ground-touch-point))
|
||||
)
|
||||
)
|
||||
(and (< 0.0 (vector-dot (-> arg0 ground-poly-normal) arg2))
|
||||
(< (- (-> *display* base-frame-counter) (-> arg0 unknown-dword10)) (seconds 0.3))
|
||||
(zero? (logand sv-104 32))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! sv-104 (logior sv-104 256))
|
||||
@@ -365,7 +364,7 @@
|
||||
)
|
||||
)
|
||||
(logior! (-> arg0 status) sv-96)
|
||||
(set! (-> arg0 reaction-flag) (the-as uint sv-104))
|
||||
(set! (-> arg0 reaction-flag) (the-as cshape-reaction-flags sv-104))
|
||||
(update!
|
||||
(-> arg0 history-data (-> arg0 unknown-halfword00))
|
||||
arg0
|
||||
@@ -374,16 +373,16 @@
|
||||
arg2
|
||||
)
|
||||
(set! (-> arg0 unknown-halfword00) (logand (+ (-> arg0 unknown-halfword00) 1) 127))
|
||||
(the-as uint sv-96)
|
||||
(the-as cshape-moving-flags sv-96)
|
||||
)
|
||||
|
||||
(defun target-collision-no-reaction ((arg0 control-info) (arg1 collide-shape-intersect) (arg2 vector) (arg3 vector))
|
||||
(if (= (-> arg0 unknown-surface00 mode) 'air)
|
||||
(logior! (-> arg0 reaction-flag) 32)
|
||||
(logior! (-> arg0 reaction-flag) (cshape-reaction-flags csrf05))
|
||||
)
|
||||
(let ((s5-0 (-> arg0 history-data (-> arg0 unknown-halfword00))))
|
||||
(update! s5-0 arg0 (-> arg0 trans) arg3 arg2)
|
||||
(logior! (-> s5-0 status) 256)
|
||||
(logior! (-> s5-0 status) (cshape-moving-flags csmf08))
|
||||
)
|
||||
(set! (-> arg0 unknown-halfword00) (logand (+ (-> arg0 unknown-halfword00) 1) 127))
|
||||
0
|
||||
|
||||
@@ -539,7 +539,79 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; More complicated collide-shape?
|
||||
(defenum cshape-moving-flags
|
||||
:bitfield #t
|
||||
:type uint64
|
||||
(onsurf)
|
||||
(onground)
|
||||
(tsurf)
|
||||
(twall)
|
||||
(t-ciel)
|
||||
(t-act)
|
||||
(csmf06)
|
||||
(csmf07)
|
||||
(csmf08)
|
||||
(csmf09)
|
||||
(on-water)
|
||||
(csmf11)
|
||||
(csmf12)
|
||||
(csmf13)
|
||||
(csmf14)
|
||||
(csmf15)
|
||||
(csmf16)
|
||||
(csmf17)
|
||||
(csmf18)
|
||||
(csmf19)
|
||||
(csmf20)
|
||||
(csmf21)
|
||||
(csmf22)
|
||||
(csmf23)
|
||||
(csmf24)
|
||||
(csmf25)
|
||||
(csmf26)
|
||||
(csmf27)
|
||||
(csmf28)
|
||||
(csmf29)
|
||||
)
|
||||
|
||||
(defenum cshape-reaction-flags
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(csrf00)
|
||||
(csrf01)
|
||||
(csrf02)
|
||||
(csrf03)
|
||||
(csrf04)
|
||||
(csrf05)
|
||||
(csrf06)
|
||||
(csrf07)
|
||||
(csrf08)
|
||||
(csrf09)
|
||||
(csrf10)
|
||||
(csrf11)
|
||||
(csrf12)
|
||||
(csrf13)
|
||||
(csrf14)
|
||||
(csrf15)
|
||||
(csrf16)
|
||||
(csrf17)
|
||||
(csrf18)
|
||||
(csrf19)
|
||||
(csrf20)
|
||||
(csrf21)
|
||||
(csrf22)
|
||||
(csrf23)
|
||||
(csrf24)
|
||||
(csrf25)
|
||||
(csrf26)
|
||||
(csrf27)
|
||||
(csrf28)
|
||||
(csrf29)
|
||||
(csrf30)
|
||||
(csrf31)
|
||||
)
|
||||
|
||||
;; A collide-shape for independently moving objects
|
||||
(deftype collide-shape-moving (collide-shape)
|
||||
((rider-time time-frame :offset-assert 184)
|
||||
(rider-last-move vector :inline :offset-assert 192)
|
||||
@@ -547,11 +619,11 @@
|
||||
(poly-pat pat-surface :offset-assert 256)
|
||||
(cur-pat pat-surface :offset-assert 260)
|
||||
(ground-pat pat-surface :offset-assert 264)
|
||||
(status uint64 :offset-assert 272)
|
||||
(old-status uint64 :offset-assert 280)
|
||||
(prev-status uint64 :offset-assert 288)
|
||||
(reaction-flag uint32 :offset-assert 296)
|
||||
(reaction (function collide-shape-moving collide-shape-intersect vector vector uint) :offset-assert 300)
|
||||
(status cshape-moving-flags :offset-assert 272)
|
||||
(old-status cshape-moving-flags :offset-assert 280)
|
||||
(prev-status cshape-moving-flags :offset-assert 288)
|
||||
(reaction-flag cshape-reaction-flags :offset-assert 296)
|
||||
(reaction (function collide-shape-moving collide-shape-intersect vector vector cshape-moving-flags) :offset-assert 300)
|
||||
(no-reaction (function collide-shape-moving collide-shape-intersect vector vector none) :offset-assert 304)
|
||||
(local-normal vector :inline :offset-assert 320)
|
||||
(surface-normal vector :inline :offset-assert 336)
|
||||
@@ -564,8 +636,8 @@
|
||||
(poly-angle float :offset-assert 424)
|
||||
(touch-angle float :offset-assert 428)
|
||||
(coverage float :offset-assert 432)
|
||||
(dynam dynamics :offset-assert 436)
|
||||
(surf surface :offset-assert 440)
|
||||
(dynam dynamics :offset-assert 436)
|
||||
(surf surface :offset-assert 440)
|
||||
)
|
||||
:method-count-assert 65
|
||||
:size-assert #x1bc
|
||||
|
||||
@@ -1103,7 +1103,7 @@
|
||||
)
|
||||
)
|
||||
(logior! (-> arg0 status) sv-80)
|
||||
(the-as uint sv-80)
|
||||
(the-as cshape-moving-flags sv-80)
|
||||
)
|
||||
|
||||
(defun simple-collision-reaction ((arg0 collide-shape-moving) (arg1 collide-shape-intersect) (arg2 vector) (arg3 vector))
|
||||
@@ -1123,7 +1123,7 @@
|
||||
)
|
||||
(let ((v0-1 (logior s5-0 7)))
|
||||
(logior! (-> arg0 status) v0-1)
|
||||
(the-as uint v0-1)
|
||||
(the-as cshape-moving-flags v0-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1176,7 +1176,7 @@
|
||||
)
|
||||
|
||||
;; do the collision reaction! this function should move the collide shape.
|
||||
(set! (-> obj prev-status) (the-as uint ((-> obj reaction) obj s5-0 arg0 arg1)))
|
||||
(set! (-> obj prev-status) (the-as cshape-moving-flags ((-> obj reaction) obj s5-0 arg0 arg1)))
|
||||
|
||||
;; debug draw collision marks.
|
||||
(when *display-collision-marks*
|
||||
@@ -1224,9 +1224,9 @@
|
||||
)
|
||||
(else
|
||||
;; didn't hit anything! call the no-reaction function.
|
||||
(set! (-> obj reaction-flag) (the-as uint 0))
|
||||
(set! (-> obj reaction-flag) (cshape-reaction-flags))
|
||||
((-> obj no-reaction) obj s5-0 arg0 arg1)
|
||||
(set! (-> obj prev-status) (the-as uint 0))
|
||||
(set! (-> obj prev-status) (cshape-moving-flags))
|
||||
;; and do the move ourself
|
||||
(move-by-vector! obj s2-0)
|
||||
;; velocity is unchanged
|
||||
@@ -1282,7 +1282,22 @@
|
||||
(set! (-> obj prev-status) (-> obj status))
|
||||
|
||||
;; setup
|
||||
(set! (-> obj status) (logand -16128 (-> obj status)))
|
||||
(logclear! (-> obj status) (cshape-moving-flags
|
||||
onsurf
|
||||
onground
|
||||
tsurf
|
||||
twall
|
||||
t-ciel
|
||||
t-act
|
||||
csmf06
|
||||
csmf07
|
||||
csmf09
|
||||
on-water
|
||||
csmf11
|
||||
csmf12
|
||||
csmf13
|
||||
)
|
||||
)
|
||||
(set! (-> obj local-normal quad) (-> obj dynam gravity-normal quad))
|
||||
(set! (-> obj surface-normal quad) (-> obj dynam gravity-normal quad))
|
||||
(set! (-> obj poly-normal quad) (-> obj dynam gravity-normal quad))
|
||||
@@ -1461,7 +1476,22 @@
|
||||
(set! (-> obj trans-old 1 quad) (-> obj trans-old 0 quad))
|
||||
(set! (-> obj trans-old 0 quad) (-> obj trans quad))
|
||||
(set! (-> obj prev-status) (-> obj status))
|
||||
(set! (-> obj status) (logand -16128 (-> obj status)))
|
||||
(logclear! (-> obj status) (cshape-moving-flags
|
||||
onsurf
|
||||
onground
|
||||
tsurf
|
||||
twall
|
||||
t-ciel
|
||||
t-act
|
||||
csmf06
|
||||
csmf07
|
||||
csmf09
|
||||
on-water
|
||||
csmf11
|
||||
csmf12
|
||||
csmf13
|
||||
)
|
||||
)
|
||||
(set! (-> obj local-normal quad) (-> obj dynam gravity-normal quad))
|
||||
(set! (-> obj surface-normal quad) (-> obj dynam gravity-normal quad))
|
||||
(set! (-> obj poly-normal quad) (-> obj dynam gravity-normal quad))
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
(local-normal vector :inline :offset-assert 64)
|
||||
(surface-normal vector :inline :offset-assert 80)
|
||||
(time time-frame :offset-assert 96)
|
||||
(status uint64 :offset-assert 104)
|
||||
(status cshape-moving-flags :offset-assert 104)
|
||||
(pat pat-surface :offset-assert 112)
|
||||
(reaction-flag uint32 :offset-assert 116)
|
||||
(reaction-flag cshape-reaction-flags :offset-assert 116)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x78
|
||||
|
||||
@@ -624,7 +624,7 @@
|
||||
(new
|
||||
'debug
|
||||
'debug-menu-item-flag
|
||||
(the-as string (-> s3-1 array-data s2-1 name))
|
||||
(-> s3-1 array-data s2-1 name)
|
||||
(-> s3-1 array-data s2-1 name)
|
||||
dm-instance-pick-func
|
||||
)
|
||||
@@ -636,7 +636,7 @@
|
||||
(new
|
||||
'debug
|
||||
'debug-menu-item-flag
|
||||
(the-as string (-> s3-1 array-data s2-1 name))
|
||||
(-> s3-1 array-data s2-1 name)
|
||||
(-> s3-1 array-data s2-1 name)
|
||||
dm-enable-instance-func
|
||||
)
|
||||
@@ -3757,15 +3757,18 @@
|
||||
(function "Play" #f (lambda () (play #t #t)))
|
||||
(function "Start" #f (lambda () (the-as int (start 'debug (get-or-create-continue! *game-info*)))))
|
||||
(function "Stop" #f (lambda () (stop 'debug)))
|
||||
(flag "Invulnerable" #f (lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(if *target*
|
||||
(set! (-> *target* state-flags) (logxor (-> *target* state-flags) 16))
|
||||
)
|
||||
)
|
||||
(the-as symbol (and *target* (logtest? (-> *target* state-flags) 16)))
|
||||
)
|
||||
(flag
|
||||
"Invulnerable"
|
||||
#f
|
||||
(lambda ((arg0 int) (arg1 debug-menu-msg))
|
||||
(when (= arg1 (debug-menu-msg press))
|
||||
(if *target*
|
||||
(set! (-> *target* state-flags) (logxor (-> *target* state-flags) (state-flags sf04)))
|
||||
)
|
||||
)
|
||||
(the-as symbol (and *target* (logtest? (-> *target* state-flags) (state-flags sf04))))
|
||||
)
|
||||
)
|
||||
(function
|
||||
"Reset Trans"
|
||||
#f
|
||||
|
||||
@@ -1086,8 +1086,8 @@
|
||||
|
||||
(defbehavior process-drawable-delay-player process-drawable ((arg0 time-frame))
|
||||
(while (and *target*
|
||||
(logtest? (-> *target* control unknown-surface00 flags) 2048)
|
||||
(zero? (logand (-> *target* control status) 1))
|
||||
(logtest? (-> *target* control unknown-surface00 flags) (surface-flags surf11))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
@@ -1198,11 +1198,10 @@
|
||||
(else
|
||||
(set! s5-0 (cond
|
||||
((valid? (-> s2-0 frame-group) art-joint-anim "joint-control frame-group" #t *valid-con*)
|
||||
(when (not
|
||||
(and (>= (the int (-> s2-0 frame-num)) 0)
|
||||
(< (the int (-> s2-0 frame-num)) (-> s2-0 frame-group data 0 length))
|
||||
)
|
||||
)
|
||||
(when (not (and (>= (the int (-> s2-0 frame-num)) 0)
|
||||
(< (the int (-> s2-0 frame-num)) (-> s2-0 frame-group data 0 length))
|
||||
)
|
||||
)
|
||||
(format
|
||||
*valid-con*
|
||||
"ERROR: ~`joint-control-channel`P #~D has an invalid frame-num ~F/~D [0-~D]~%"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defun eco-fadeout ((arg0 sparticle-system) (arg1 sparticle-cpuinfo))
|
||||
(if (zero? (logand (-> (the-as process-drawable (-> arg1 key proc)) state-flags) 1))
|
||||
(if (zero? (logand (-> (the-as process-drawable (-> arg1 key proc)) state-flags) (state-flags sf00)))
|
||||
(set! (-> arg1 next-time) (the-as uint (* (-> *sp-frame-time* x) 2)))
|
||||
)
|
||||
0
|
||||
@@ -27,7 +27,7 @@
|
||||
(set! (-> arg2 y) (-> a0-3 world-sphere y))
|
||||
(set! (-> arg2 z) (-> a0-3 world-sphere z))
|
||||
)
|
||||
(if (zero? (logand (-> v1-1 state-flags) 1))
|
||||
(if (zero? (logand (-> v1-1 state-flags) (state-flags sf00)))
|
||||
(set! (-> arg1 next-time) (the-as uint (* (-> *sp-frame-time* x) 2)))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -172,60 +172,28 @@
|
||||
(set! (-> obj collect-effect) (-> *part-group-id-table* 68))
|
||||
(set! (-> obj collect-effect2) (-> *part-group-id-table* 57))
|
||||
(set! (-> obj collect-effect-time) (seconds 0.5))
|
||||
(set! (-> obj sound-name) (new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "yel-eco-idle")
|
||||
:volume #x400
|
||||
:fo-max 15
|
||||
)
|
||||
)
|
||||
(set! (-> obj sound-name) (static-sound-spec "yel-eco-idle" :fo-max 15))
|
||||
)
|
||||
(((pickup-type eco-red))
|
||||
(set! (-> obj eco-effect) (-> *part-group-id-table* 48))
|
||||
(set! (-> obj collect-effect) (-> *part-group-id-table* 69))
|
||||
(set! (-> obj collect-effect2) (-> *part-group-id-table* 49))
|
||||
(set! (-> obj collect-effect-time) (seconds 0.5))
|
||||
(set! (-> obj sound-name) (new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "red-eco-idle")
|
||||
:volume #x400
|
||||
:fo-max 15
|
||||
)
|
||||
)
|
||||
(set! (-> obj sound-name) (static-sound-spec "red-eco-idle" :fo-max 15))
|
||||
)
|
||||
(((pickup-type eco-blue))
|
||||
(set! (-> obj eco-effect) (-> *part-group-id-table* 42))
|
||||
(set! (-> obj collect-effect) (-> *part-group-id-table* 67))
|
||||
(set! (-> obj collect-effect2) (-> *part-group-id-table* 43))
|
||||
(set! (-> obj collect-effect-time) (seconds 0.5))
|
||||
(set! (-> obj sound-name) (new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "blue-eco-idle")
|
||||
:volume #x400
|
||||
:fo-max 15
|
||||
)
|
||||
)
|
||||
(set! (-> obj sound-name) (static-sound-spec "blue-eco-idle" :fo-max 15))
|
||||
)
|
||||
(((pickup-type eco-green))
|
||||
(set! (-> obj eco-effect) (-> *part-group-id-table* 58))
|
||||
(set! (-> obj collect-effect) (-> *part-group-id-table* 66))
|
||||
(set! (-> obj collect-effect2) (-> *part-group-id-table* 61))
|
||||
(set! (-> obj collect-effect-time) (seconds 0.5))
|
||||
(set! (-> obj sound-name) (new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "green-eco-idle")
|
||||
:volume #x400
|
||||
:fo-max 15
|
||||
)
|
||||
)
|
||||
(set! (-> obj sound-name) (static-sound-spec "green-eco-idle" :fo-max 15))
|
||||
)
|
||||
(((pickup-type eco-pill))
|
||||
(set! (-> obj eco-effect) (-> *part-group-id-table* 59))
|
||||
@@ -234,9 +202,9 @@
|
||||
)
|
||||
)
|
||||
(set! (-> obj part) (create-launch-control (-> obj eco-effect) obj))
|
||||
(when (-> obj sound-name)
|
||||
(set! (-> obj sound) (new 'process 'ambient-sound (-> obj sound-name) (-> obj root-override trans)))
|
||||
)
|
||||
(if (-> obj sound-name)
|
||||
(set! (-> obj sound) (new 'process 'ambient-sound (-> obj sound-name) (-> obj root-override trans)))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -639,7 +607,7 @@
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(set! (-> self actor-pause) #f)
|
||||
(logior! (-> self flags) (collectable-flags fading))
|
||||
(logior! (-> self state-flags) 1)
|
||||
(logior! (-> self state-flags) (state-flags sf00))
|
||||
(set! (-> gp-0 fade) (* 0.0033333334 (the float v1-10)))
|
||||
)
|
||||
)
|
||||
@@ -1525,7 +1493,7 @@
|
||||
(not *progress-process*)
|
||||
(!= (-> self next-state name) 'pickup)
|
||||
*target*
|
||||
(zero? (logand (-> *target* state-flags) #x8100))
|
||||
(zero? (logand (-> *target* state-flags) (state-flags sf08 sf15)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1670,13 +1638,12 @@
|
||||
(set! (-> self state-object) #f)
|
||||
(kill-and-free-particles (-> self part))
|
||||
(logior! (-> self draw status) (draw-status skip-bones))
|
||||
(if (not
|
||||
(or (logtest? (the-as int (res-lump-value (-> self entity) 'options uint128 :time (the-as float -1000000000.0)))
|
||||
4096
|
||||
)
|
||||
(and *target* (logtest? (-> *target* control root-prim prim-core action) (collide-action ca-9)))
|
||||
)
|
||||
)
|
||||
(if (not (or (logtest? (res-lump-value (-> self entity) 'options fact-options :time (the-as float -1000000000.0))
|
||||
(fact-options powerup)
|
||||
)
|
||||
(and *target* (logtest? (-> *target* control root-prim prim-core action) (collide-action ca-9)))
|
||||
)
|
||||
)
|
||||
(send-event *camera* 'teleport-to-other-start-string)
|
||||
)
|
||||
)
|
||||
@@ -2115,19 +2082,8 @@
|
||||
(set! (-> obj base quad) (-> obj root-override trans quad))
|
||||
(set! (-> obj old-base quad) (-> obj root-override trans quad))
|
||||
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 63) obj))
|
||||
(set! (-> obj sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "powercell-idle")
|
||||
:volume #x400
|
||||
:fo-max 40
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "powercell-idle" :fo-max 40) (-> obj root-override trans))
|
||||
)
|
||||
(set! (-> obj victory-anim) (fuel-cell-pick-anim obj))
|
||||
obj
|
||||
@@ -2171,11 +2127,10 @@
|
||||
(go-virtual jump)
|
||||
)
|
||||
((and gp-1
|
||||
(zero?
|
||||
(logand (the-as int (res-lump-value (-> self entity) 'options uint128 :time (the-as float -1000000000.0)))
|
||||
128
|
||||
)
|
||||
)
|
||||
(zero? (logand (res-lump-value (-> self entity) 'options fact-options :time (the-as float -1000000000.0))
|
||||
(fact-options fop7)
|
||||
)
|
||||
)
|
||||
(zero? (logand (-> self fact options) (fact-options fop7)))
|
||||
)
|
||||
(set! (-> self jump-pos quad) (-> (the-as vector gp-1) quad))
|
||||
@@ -2471,19 +2426,8 @@
|
||||
(set! (-> obj fact) (new 'process 'fact-info obj (pickup-type buzzer) (the-as float 0.0)))
|
||||
(initialize-skeleton obj *buzzer-sg* '())
|
||||
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 65) obj))
|
||||
(set! (-> obj sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "buzzer")
|
||||
:volume #x400
|
||||
:fo-max 40
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "buzzer" :fo-max 40) (-> obj root-override trans))
|
||||
)
|
||||
(set! (-> obj victory-anim) (fuel-cell-pick-anim obj))
|
||||
obj
|
||||
|
||||
@@ -537,9 +537,8 @@
|
||||
)
|
||||
(else
|
||||
(when (and (!= s4-0 (-> self incomming-attack-id)) (= (-> self root-override trans y) (-> self base y)))
|
||||
(if (not
|
||||
(and (!= *kernel-boot-message* 'play) (= (-> *setting-control* current language) (language-enum japanese)))
|
||||
)
|
||||
(if (not (and (!= *kernel-boot-message* 'play) (= (-> *setting-control* current language) (language-enum japanese)))
|
||||
)
|
||||
(level-hint-spawn
|
||||
(game-text-id sage-voicebox-hint-crate-iron)
|
||||
"sagevb36"
|
||||
@@ -1375,15 +1374,7 @@
|
||||
(set! (-> obj sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x82
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "buzzer")
|
||||
:volume #x400
|
||||
:pitch-mod -762
|
||||
:fo-max 40
|
||||
)
|
||||
(static-sound-spec "buzzer" :pitch-mod -762 :fo-max 40)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -84,39 +84,39 @@
|
||||
(while (> arg2 0)
|
||||
(case (the int (-> arg1 0))
|
||||
((3)
|
||||
(logior! (-> arg0 mask) 1)
|
||||
(logior! (-> arg0 mask) (sound-mask volume))
|
||||
(set! (-> arg0 volume) (the int (* 10.24 (-> arg1 1))))
|
||||
)
|
||||
((4)
|
||||
(logior! (-> arg0 mask) 1)
|
||||
(logior! (-> arg0 mask) (sound-mask volume))
|
||||
(+! (-> arg0 volume) (the int (* 10.24 (* (-> arg1 1) (rand-vu)))))
|
||||
)
|
||||
((5)
|
||||
(logior! (-> arg0 mask) 2)
|
||||
(logior! (-> arg0 mask) (sound-mask pitch))
|
||||
(set! (-> arg0 pitch-mod) (the int (* 1524.0 (-> arg1 1))))
|
||||
)
|
||||
((6)
|
||||
(logior! (-> arg0 mask) 2)
|
||||
(logior! (-> arg0 mask) (sound-mask pitch))
|
||||
(+! (-> arg0 pitch-mod) (the int (* 1524.0 (* (-> arg1 1) (rand-vu)))))
|
||||
)
|
||||
((9)
|
||||
(logior! (-> arg0 mask) 4)
|
||||
(logior! (-> arg0 mask) (sound-mask bend))
|
||||
(set! (-> arg0 bend) (the int (* 327.66998 (-> arg1 1))))
|
||||
)
|
||||
((10)
|
||||
(logior! (-> arg0 mask) 4)
|
||||
(logior! (-> arg0 mask) (sound-mask bend))
|
||||
(+! (-> arg0 bend) (the int (* 327.66998 (* (-> arg1 1) (rand-vu)))))
|
||||
)
|
||||
((11)
|
||||
(logior! (-> arg0 mask) 64)
|
||||
(logior! (-> arg0 mask) (sound-mask fo-min))
|
||||
(set! (-> arg0 fo-min) (the int (-> arg1 1)))
|
||||
)
|
||||
((12)
|
||||
(logior! (-> arg0 mask) 128)
|
||||
(logior! (-> arg0 mask) (sound-mask fo-max))
|
||||
(set! (-> arg0 fo-max) (the int (-> arg1 1)))
|
||||
)
|
||||
((13)
|
||||
(logior! (-> arg0 mask) 256)
|
||||
(logior! (-> arg0 mask) (sound-mask fo-curve))
|
||||
(set! (-> arg0 fo-curve) (the int (-> arg1 1)))
|
||||
)
|
||||
((19)
|
||||
@@ -506,10 +506,10 @@
|
||||
)
|
||||
(let ((a2-29 (-> *display* frames (-> *display* last-screen) frame run-time)))
|
||||
(cond
|
||||
((< 9000 (the-as int a2-29))
|
||||
((< 9000 a2-29)
|
||||
(set! a1-42 (* a1-42 4))
|
||||
)
|
||||
((< 7000 (the-as int a2-29))
|
||||
((< 7000 a2-29)
|
||||
(set! a1-42 (* a1-42 2))
|
||||
)
|
||||
)
|
||||
@@ -583,7 +583,7 @@
|
||||
(set! s1-0 (sound-name-with-material 'flut-land arg4 ""))
|
||||
)
|
||||
(('effect-land-poof)
|
||||
(when (< (the-as int a0-4) 9000)
|
||||
(when (< a0-4 9000)
|
||||
(let* ((a0-13 obj)
|
||||
(t9-8 (method-of-object a0-13 dummy-10))
|
||||
(v1-15 (-> arg4 material))
|
||||
@@ -650,7 +650,7 @@
|
||||
)
|
||||
)
|
||||
(('effect-run-poof)
|
||||
(when (< (the-as int a0-4) 9000)
|
||||
(when (< a0-4 9000)
|
||||
(let* ((a0-14 obj)
|
||||
(t9-9 (method-of-object a0-14 dummy-10))
|
||||
(v1-20 (-> arg4 material))
|
||||
@@ -782,7 +782,7 @@
|
||||
)
|
||||
)
|
||||
(('effect-just-poof)
|
||||
(when (< (the-as int a0-4) 9000)
|
||||
(when (< a0-4 9000)
|
||||
(let* ((a0-16 obj)
|
||||
(t9-11 (method-of-object a0-16 dummy-10))
|
||||
(v1-29 (-> arg4 material))
|
||||
@@ -1075,9 +1075,9 @@
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 sound-name) s0-0)
|
||||
(logior! (-> gp-0 mask) 1)
|
||||
(logior! (-> gp-0 mask) (sound-mask volume))
|
||||
(set! (-> gp-0 volume) 1024)
|
||||
(logior! (-> gp-0 mask) 4)
|
||||
(logior! (-> gp-0 mask) (sound-mask bend))
|
||||
(set! (-> gp-0 bend) (the int (* 327.66998 (rand-vu-float-range -100.0 100.0))))
|
||||
(set! sv-112 (new 'static 'res-tag))
|
||||
(let* ((t9-3 (method-of-type res-lump get-property-data))
|
||||
@@ -1148,7 +1148,7 @@
|
||||
#t
|
||||
)
|
||||
)
|
||||
((logtest? (-> self water flags) 512)
|
||||
((logtest? (-> self water flags) (water-flags wt09))
|
||||
(dummy-10 (-> self skel effect) 'effect-land-water -1.0 -1)
|
||||
)
|
||||
(else
|
||||
|
||||
@@ -17,6 +17,43 @@
|
||||
(declare-type water-control basic)
|
||||
(declare-type collide-shape basic)
|
||||
|
||||
(defenum state-flags
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(sf00)
|
||||
(sf01)
|
||||
(sf02)
|
||||
(sf03)
|
||||
(sf04)
|
||||
(sf05)
|
||||
(sf06)
|
||||
(sf07)
|
||||
(sf08)
|
||||
(sf09)
|
||||
(sf10)
|
||||
(sf11)
|
||||
(sf12)
|
||||
(sf13)
|
||||
(sf14)
|
||||
(sf15)
|
||||
(sf16)
|
||||
(sf17)
|
||||
(sf18)
|
||||
(sf19)
|
||||
(sf20)
|
||||
(sf21)
|
||||
(sf22)
|
||||
(sf23)
|
||||
(sf24)
|
||||
(sf25)
|
||||
(sf26)
|
||||
(sf27)
|
||||
(sf28)
|
||||
(sf29)
|
||||
(sf30)
|
||||
(sf31)
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -64,7 +101,7 @@
|
||||
(sound ambient-sound :offset-assert 160)
|
||||
|
||||
;; seems to only be used in target?
|
||||
(state-flags uint32 :offset-assert 164)
|
||||
(state-flags state-flags :offset-assert 164)
|
||||
|
||||
;; the time when we last did something. Used for different things in different objects
|
||||
(state-time time-frame :offset-assert 168)
|
||||
|
||||
@@ -2048,7 +2048,7 @@
|
||||
(set! (-> v1-0 parms volume) -4)
|
||||
(set! (-> v1-0 auto-time) 120)
|
||||
(set! (-> v1-0 auto-from) 2)
|
||||
(set! (-> v1-0 parms mask) (the-as uint 17))
|
||||
(set! (-> v1-0 parms mask) (sound-mask volume time))
|
||||
(-> v1-0 id)
|
||||
)
|
||||
(none)
|
||||
|
||||
@@ -646,7 +646,7 @@
|
||||
(set! (-> v1-64 parms volume) -4)
|
||||
(set! (-> v1-64 auto-time) 48)
|
||||
(set! (-> v1-64 auto-from) 2)
|
||||
(set! (-> v1-64 parms mask) (the-as uint 17))
|
||||
(set! (-> v1-64 parms mask) (sound-mask volume time))
|
||||
(-> v1-64 id)
|
||||
)
|
||||
)
|
||||
@@ -665,12 +665,12 @@
|
||||
)
|
||||
(set! (-> self fact-info-target eco-level) 0.0)
|
||||
(set! (-> self fact-info-target eco-timeout) 0)
|
||||
(set! (-> self state-flags) (logand -65 (-> self state-flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf06))
|
||||
(send-event self 'reset-collide)
|
||||
(stop! (-> self sound))
|
||||
)
|
||||
(when (and (< 0.0 (-> self fact-info-target eco-level))
|
||||
(zero? (logand (-> self state-flags) 512))
|
||||
(zero? (logand (-> self state-flags) (state-flags sf09)))
|
||||
(zero? (logand (-> self draw status) (draw-status hidden no-anim)))
|
||||
(not (movie?))
|
||||
(rand-vu-percent?
|
||||
@@ -758,7 +758,9 @@
|
||||
(change-sound! (-> self sound) (static-sound-name "blue-eco-jak"))
|
||||
(let ((v1-150 (rand-vu-int-range 3 (+ (-> self node-list length) -1))))
|
||||
(cond
|
||||
((and (logtest? (-> self control unknown-surface00 flags) 2048) (zero? (logand (-> self control status) 1)))
|
||||
((and (logtest? (-> self control unknown-surface00 flags) (surface-flags surf11))
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
(set! (-> *part-id-table* 259 init-specs 4 initial-valuef) 0.0)
|
||||
(set! (-> *part-id-table* 259 init-specs 4 random-rangef) 65536.0)
|
||||
)
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
(set! sv-80 (logior sv-80 16))
|
||||
)
|
||||
(set! sv-224 (< (fabs (-> arg0 surface-angle)) (-> *pat-mode-info* (-> arg0 cur-pat mode) wall-angle)))
|
||||
(if (zero? (logand (-> arg0 prev-status) 1))
|
||||
(if (zero? (logand (-> arg0 prev-status) (cshape-moving-flags onsurf)))
|
||||
(set! (-> arg0 ground-impact-vel) (- (vector-dot (-> arg0 transv) (-> arg0 dynam gravity-normal))))
|
||||
)
|
||||
(set! sv-80 (logior sv-80 4))
|
||||
@@ -170,7 +170,7 @@
|
||||
)
|
||||
)
|
||||
(logior! (-> arg0 status) sv-80)
|
||||
(the-as uint sv-80)
|
||||
(the-as cshape-moving-flags sv-80)
|
||||
)
|
||||
|
||||
(defpartgroup group-yellow-eco-fireball
|
||||
@@ -723,7 +723,9 @@
|
||||
(countdown (v1-35 16)
|
||||
(+! f0-16 (-> self old-dist v1-35))
|
||||
)
|
||||
(if (or (and (logtest? (-> self root-override status) 8) (< f0-16 2048.0)) (< f0-16 204.8))
|
||||
(if (or (and (logtest? (-> self root-override status) (cshape-moving-flags twall)) (< f0-16 2048.0))
|
||||
(< f0-16 204.8)
|
||||
)
|
||||
(set! gp-0 #t)
|
||||
)
|
||||
)
|
||||
@@ -745,7 +747,7 @@
|
||||
(s3-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> arg0 root-override transv) 1.0))
|
||||
(f30-0 (vector-length (-> arg0 root-override transv)))
|
||||
)
|
||||
(if (logtest? (-> arg0 root-override status) 4)
|
||||
(if (logtest? (-> arg0 root-override status) (cshape-moving-flags tsurf))
|
||||
(vector-flatten! s5-1 s5-1 (-> arg0 root-override local-normal))
|
||||
)
|
||||
(vector-normalize-copy! s4-0 s5-1 1.0)
|
||||
@@ -989,7 +991,7 @@
|
||||
(case (-> *target* current-level name)
|
||||
(('swamp)
|
||||
(set! (-> obj water) (new 'process 'water-control obj 0 0.0 8192.0 2048.0))
|
||||
(set! (-> obj water flags) (the-as uint 146))
|
||||
(set! (-> obj water flags) (water-flags wt01 wt04 wt07))
|
||||
(set! (-> obj water height) (if (logtest? (-> obj options) 64)
|
||||
8192.0
|
||||
10240.0
|
||||
@@ -1000,7 +1002,7 @@
|
||||
(('ogre)
|
||||
(when (zero? (logand (-> obj options) 128))
|
||||
(set! (-> obj water) (new 'process 'water-control obj 0 0.0 8192.0 2048.0))
|
||||
(set! (-> obj water flags) (the-as uint 146))
|
||||
(set! (-> obj water flags) (water-flags wt01 wt04 wt07))
|
||||
(set! (-> obj water height) 129024.0)
|
||||
(logior! (-> obj root-override root-prim collide-with) (collide-kind water))
|
||||
)
|
||||
@@ -1008,7 +1010,7 @@
|
||||
(('finalboss)
|
||||
(set! (-> obj root-override trans y) (+ 4096.0 (-> obj root-override trans y)))
|
||||
(set! (-> obj water) (new 'process 'water-control obj 0 0.0 8192.0 2048.0))
|
||||
(set! (-> obj water flags) (the-as uint 146))
|
||||
(set! (-> obj water flags) (water-flags wt01 wt04 wt07))
|
||||
(set! (-> obj water height) 1977958.4)
|
||||
(logior! (-> obj root-override root-prim collide-with) (collide-kind water))
|
||||
)
|
||||
@@ -1072,7 +1074,7 @@
|
||||
)
|
||||
(sound-trans-convert (-> s5-0 parms trans) a1-3)
|
||||
)
|
||||
(set! (-> s5-0 parms mask) (the-as uint 32))
|
||||
(set! (-> s5-0 parms mask) (sound-mask trans))
|
||||
(-> s5-0 id)
|
||||
)
|
||||
0
|
||||
|
||||
@@ -764,7 +764,7 @@
|
||||
(defbehavior process-taskable-hide-enter process-taskable ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(let ((v1-3 (-> self draw shadow-ctrl)))
|
||||
(logior! (-> v1-3 settings flags) 32)
|
||||
(logior! (-> v1-3 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(process-taskable-clean-up-after-talking)
|
||||
@@ -786,7 +786,7 @@
|
||||
(restore-collide-with-as (-> self root-override))
|
||||
(process-entity-status! self (entity-perm-status bit-3) #t)
|
||||
(let ((v1-7 (-> self draw shadow-ctrl)))
|
||||
(set! (-> v1-7 settings flags) (logand -33 (-> v1-7 settings flags)))
|
||||
(logclear! (-> v1-7 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
)
|
||||
@@ -1052,11 +1052,10 @@
|
||||
)
|
||||
((begin
|
||||
(dummy-46 self)
|
||||
(and (not
|
||||
(and (logtest? (-> *target* control unknown-surface00 flags) 2048)
|
||||
(zero? (logand (-> *target* control status) 1))
|
||||
)
|
||||
)
|
||||
(and (not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags surf11))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
(< (-> (target-pos 0) y) (+ 8192.0 (-> self root-override root-prim prim-core world-sphere y)))
|
||||
(less-than-hack (vector-vector-distance (target-pos 0) (the-as vector (-> self root-override root-prim prim-core)))
|
||||
32768.0
|
||||
@@ -1443,7 +1442,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((v1-10 gp-0))
|
||||
(logior! (-> v1-10 settings flags) 32)
|
||||
(logior! (-> v1-10 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
@@ -5,9 +5,46 @@
|
||||
;; name in dgo: shadow-cpu-h
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
(defenum shadow-flags
|
||||
:bitfield #t
|
||||
:type int32
|
||||
(shdf00)
|
||||
(shdf01)
|
||||
(shdf02)
|
||||
(shdf03)
|
||||
(shdf04)
|
||||
(shdf05)
|
||||
(shdf06)
|
||||
(shdf07)
|
||||
(shdf08)
|
||||
(shdf09)
|
||||
(shdf10)
|
||||
(shdf11)
|
||||
(shdf12)
|
||||
(shdf13)
|
||||
(shdf14)
|
||||
(shdf15)
|
||||
(shdf16)
|
||||
(shdf17)
|
||||
(shdf18)
|
||||
(shdf19)
|
||||
(shdf20)
|
||||
(shdf21)
|
||||
(shdf22)
|
||||
(shdf23)
|
||||
(shdf24)
|
||||
(shdf25)
|
||||
(shdf26)
|
||||
(shdf27)
|
||||
(shdf28)
|
||||
(shdf29)
|
||||
(shdf30)
|
||||
(shdf31)
|
||||
)
|
||||
|
||||
(deftype shadow-settings (structure)
|
||||
((center vector :inline :offset-assert 0)
|
||||
(flags int32 :offset 12)
|
||||
(flags shadow-flags :offset 12)
|
||||
(shadow-dir vector :inline :offset-assert 16)
|
||||
(dist-to-locus float :offset 28)
|
||||
(bot-plane plane :inline :offset-assert 32)
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
;; name in dgo: shadow-cpu
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defmethod asize-of shadow-geo ((obj shadow-geo))
|
||||
(the-as int (-> obj total-size))
|
||||
)
|
||||
@@ -443,6 +445,7 @@
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
|
||||
(deftype shadow-dcache (structure)
|
||||
((vtx-table uint32 :offset-assert 0)
|
||||
(single-edge-table uint32 :offset-assert 4)
|
||||
@@ -599,7 +602,7 @@
|
||||
0.0
|
||||
)
|
||||
(let ((v1-2 obj))
|
||||
(set! (-> v1-2 settings flags) (logand -33 (-> v1-2 settings flags)))
|
||||
(logclear! (-> v1-2 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(let ((v1-4 obj))
|
||||
@@ -611,7 +614,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((v1-7 obj))
|
||||
(logior! (-> v1-7 settings flags) 32)
|
||||
(logior! (-> v1-7 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
)
|
||||
@@ -620,4 +623,8 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
)
|
||||
|
||||
(defbehavior do-target-shadow target ()
|
||||
(if (and (logtest? (-> self control status) 1)
|
||||
(if (and (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(!= (-> self control unknown-surface00 mode) 'swim)
|
||||
(!= (-> self control unknown-surface00 mode) 'dive)
|
||||
(!= (-> self next-state name) 'target-flop)
|
||||
|
||||
@@ -5,59 +5,47 @@
|
||||
;; name in dgo: water-h
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
(define-extern *water-anim-sunken-dark-eco-qbert-sg* skeleton-group)
|
||||
(define-extern *water-anim-sunken-dark-eco-platform-room-sg* skeleton-group)
|
||||
(define-extern *water-anim-sunken-dark-eco-helix-room-sg* skeleton-group)
|
||||
(define-extern *water-anim-sunken-big-room-sg* skeleton-group)
|
||||
(define-extern *water-anim-sunken-first-room-from-entrance-sg* skeleton-group)
|
||||
(define-extern *water-anim-sunken-qbert-room-sg* skeleton-group)
|
||||
(define-extern *water-anim-sunken-first-right-branch-sg* skeleton-group)
|
||||
(define-extern *water-anim-sunken-circular-with-bullys-sg* skeleton-group)
|
||||
(define-extern *water-anim-sunken-hall-with-one-whirlpool-sg* skeleton-group)
|
||||
(define-extern *water-anim-sunken-hall-with-three-whirlpools-sg* skeleton-group)
|
||||
(define-extern *water-anim-sunken-start-of-helix-slide-sg* skeleton-group)
|
||||
(define-extern *water-anim-sunken-room-above-exit-chamber-sg* skeleton-group)
|
||||
(define-extern *water-anim-sunken-hall-before-big-room-sg* skeleton-group)
|
||||
(define-extern *water-anim-sunken-short-piece-sg* skeleton-group)
|
||||
(define-extern *water-anim-sunken-big-room-upper-water-sg* skeleton-group)
|
||||
(define-extern *water-anim-maincave-center-pool-sg* skeleton-group)
|
||||
(define-extern *water-anim-maincave-lower-right-pool-sg* skeleton-group)
|
||||
(define-extern *water-anim-maincave-mid-right-pool-sg* skeleton-group)
|
||||
(define-extern *water-anim-maincave-lower-left-pool-sg* skeleton-group)
|
||||
(define-extern *water-anim-maincave-mid-left-pool-sg* skeleton-group)
|
||||
(define-extern *water-anim-maincave-water-with-crystal-sg* skeleton-group)
|
||||
(define-extern *water-anim-robocave-main-pool-sg* skeleton-group)
|
||||
(define-extern *water-anim-misty-mud-by-arena-sg* skeleton-group)
|
||||
(define-extern *water-anim-misty-mud-above-skeleton-sg* skeleton-group)
|
||||
(define-extern *water-anim-misty-mud-behind-skeleton-sg* skeleton-group)
|
||||
(define-extern *water-anim-misty-mud-above-skull-back-sg* skeleton-group)
|
||||
(define-extern *water-anim-misty-mud-above-skull-front-sg* skeleton-group)
|
||||
(define-extern *water-anim-misty-mud-other-near-skull-sg* skeleton-group)
|
||||
(define-extern *water-anim-misty-mud-near-skull-sg* skeleton-group)
|
||||
(define-extern *water-anim-misty-mud-under-spine-sg* skeleton-group)
|
||||
(define-extern *water-anim-misty-mud-by-dock-sg* skeleton-group)
|
||||
(define-extern *water-anim-misty-mud-island-near-dock-sg* skeleton-group)
|
||||
(define-extern *water-anim-misty-mud-lonely-island-sg* skeleton-group)
|
||||
(define-extern *water-anim-misty-dark-eco-pool-sg* skeleton-group)
|
||||
(define-extern *water-anim-ogre-lava-sg* skeleton-group)
|
||||
(define-extern *water-anim-jungle-river-sg* skeleton-group)
|
||||
(define-extern *water-anim-village3-lava-sg* skeleton-group)
|
||||
(define-extern *water-anim-training-lake-sg* skeleton-group)
|
||||
(define-extern *water-anim-darkcave-water-with-crystal-sg* skeleton-group)
|
||||
(define-extern *water-anim-rolling-water-back-sg* skeleton-group)
|
||||
(define-extern *water-anim-rolling-water-front-sg* skeleton-group)
|
||||
(define-extern *water-anim-finalboss-dark-eco-pool-sg* skeleton-group)
|
||||
(define-extern *water-anim-lavatube-energy-lava-sg* skeleton-group)
|
||||
(define-extern *water-anim-village1-rice-paddy-sg* skeleton-group)
|
||||
(define-extern *water-anim-village1-fountain-sg* skeleton-group)
|
||||
(define-extern *water-anim-village1-rice-paddy-mid-sg* skeleton-group)
|
||||
(define-extern *water-anim-village1-rice-paddy-top-sg* skeleton-group)
|
||||
(define-extern *water-anim-village2-bucket-sg* skeleton-group)
|
||||
(defenum water-flags
|
||||
:bitfield #t
|
||||
:type uint32
|
||||
(wt00)
|
||||
(wt01)
|
||||
(wt02)
|
||||
(wt03)
|
||||
(wt04)
|
||||
(wt05)
|
||||
(wt06)
|
||||
(wt07)
|
||||
(wt08)
|
||||
(wt09)
|
||||
(wt10)
|
||||
(wt11)
|
||||
(wt12)
|
||||
(wt13)
|
||||
(wt14)
|
||||
(wt15)
|
||||
(wt16)
|
||||
(wt17)
|
||||
(wt18)
|
||||
(wt19)
|
||||
(wt20)
|
||||
(wt21)
|
||||
(wt22)
|
||||
(wt23)
|
||||
(wt24)
|
||||
(wt25)
|
||||
(wt26)
|
||||
(wt27)
|
||||
(wt28)
|
||||
(wt29)
|
||||
(wt30)
|
||||
(wt31)
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype water-control (basic)
|
||||
((flags uint32 :offset-assert 4)
|
||||
((flags water-flags :offset-assert 4)
|
||||
(process process-drawable :offset-assert 8)
|
||||
(joint-index int32 :offset-assert 12)
|
||||
(top-y-offset float :offset-assert 16)
|
||||
@@ -110,7 +98,7 @@
|
||||
|
||||
|
||||
(defmethod display-water-marks? water-control ((obj water-control))
|
||||
(and *display-water-marks* (logtest? (-> obj flags) 1))
|
||||
(and *display-water-marks* (logtest? (-> obj flags) (water-flags wt00)))
|
||||
)
|
||||
|
||||
(defmethod new water-control ((allocation symbol) (type-to-make type) (arg0 process) (arg1 int) (arg2 float) (arg3 float) (arg4 float))
|
||||
@@ -133,13 +121,13 @@
|
||||
)
|
||||
|
||||
(deftype water-vol (process-drawable)
|
||||
((water-height meters :offset-assert 176)
|
||||
(wade-height meters :offset-assert 180)
|
||||
(swim-height meters :offset-assert 184)
|
||||
(bottom-height meters :offset-assert 188)
|
||||
(attack-event symbol :offset-assert 192)
|
||||
(target handle :offset-assert 200)
|
||||
(flags uint32 :offset-assert 208)
|
||||
((water-height meters :offset-assert 176)
|
||||
(wade-height meters :offset-assert 180)
|
||||
(swim-height meters :offset-assert 184)
|
||||
(bottom-height meters :offset-assert 188)
|
||||
(attack-event symbol :offset-assert 192)
|
||||
(target handle :offset-assert 200)
|
||||
(flags water-flags :offset-assert 208)
|
||||
)
|
||||
:heap-base #x70
|
||||
:method-count-assert 30
|
||||
@@ -151,11 +139,11 @@
|
||||
(TODO-RENAME-22 (_type_) none 22)
|
||||
(reset-root! (_type_) none 23)
|
||||
(set-stack-size! (_type_) none 24)
|
||||
(TODO-RENAME-25 (_type_) object 25)
|
||||
(TODO-RENAME-25 (_type_) none 25)
|
||||
(TODO-RENAME-26 (_type_) none 26)
|
||||
(dummy-27 (_type_) none 27)
|
||||
(get-ripple-height (_type_ vector) float 28)
|
||||
(TODO-RENAME-29 (_type_) uint 29)
|
||||
(TODO-RENAME-29 (_type_) none 29)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -679,11 +679,11 @@
|
||||
(with-pp
|
||||
(let ((s5-0 (-> obj flags)))
|
||||
(cond
|
||||
((zero? (logand (-> obj flags) 2))
|
||||
(set! (-> obj flags) (logand -97793 (-> obj flags)))
|
||||
((zero? (logand (-> obj flags) (water-flags wt01)))
|
||||
(logclear! (-> obj flags) (water-flags wt09 wt10 wt11 wt12 wt13 wt14 wt16))
|
||||
)
|
||||
((and (logtest? #x200000 (-> obj flags)) (logtest? (-> obj process state-flags) 256))
|
||||
(set! (-> obj flags) (logior #x10000 (-> obj flags)))
|
||||
((and (logtest? (water-flags wt21) (-> obj flags)) (logtest? (-> obj process state-flags) (state-flags sf08)))
|
||||
(set! (-> obj flags) (logior (water-flags wt16) (-> obj flags)))
|
||||
)
|
||||
((begin
|
||||
(set! (-> obj top 1 quad) (-> obj top 0 quad))
|
||||
@@ -691,28 +691,27 @@
|
||||
(+! (-> obj top 0 y) (-> obj top-y-offset))
|
||||
(set! (-> obj bottom 1 quad) (-> obj bottom 0 quad))
|
||||
(set! (-> obj bottom 0 quad) (-> obj process root trans quad))
|
||||
(set! (-> obj flags) (logand -31745 (-> obj flags)))
|
||||
(logclear! (-> obj flags) (water-flags wt10 wt11 wt12 wt13 wt14))
|
||||
(set! (-> obj bob-offset) (update! (-> obj bob)))
|
||||
(cond
|
||||
((and (logtest? (-> obj flags) 256)
|
||||
(zero?
|
||||
(logand (-> (the-as collide-shape-moving (-> obj process root)) root-prim prim-core action)
|
||||
(collide-action ca-9)
|
||||
)
|
||||
)
|
||||
((and (logtest? (-> obj flags) (water-flags wt08))
|
||||
(zero? (logand (-> (the-as collide-shape-moving (-> obj process root)) root-prim prim-core action)
|
||||
(collide-action ca-9)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj real-ocean-offset) (- (ocean-get-height (the-as vector (-> obj bottom))) (-> obj base-height)))
|
||||
(if (zero? (logand (-> obj flags) 512))
|
||||
(if (zero? (logand (-> obj flags) (water-flags wt09)))
|
||||
(set! (-> obj ocean-offset) (-> obj real-ocean-offset))
|
||||
(set! (-> obj ocean-offset) (lerp (-> obj ocean-offset) (-> obj real-ocean-offset) 0.2))
|
||||
)
|
||||
)
|
||||
((logtest? #x100000 (-> obj flags))
|
||||
((logtest? (water-flags wt20) (-> obj flags))
|
||||
(let* ((a0-26 (-> obj volume process 0))
|
||||
(f30-0 (ripple-find-height (the-as process-drawable a0-26) 0 (the-as vector (-> obj bottom))))
|
||||
)
|
||||
(set! (-> obj real-ocean-offset) (- f30-0 (-> obj base-height)))
|
||||
(if (zero? (logand (-> obj flags) 512))
|
||||
(if (zero? (logand (-> obj flags) (water-flags wt09)))
|
||||
(set! (-> obj ocean-offset) (-> obj real-ocean-offset))
|
||||
(set! (-> obj ocean-offset) (lerp (-> obj ocean-offset) (-> obj real-ocean-offset) 0.2))
|
||||
)
|
||||
@@ -739,13 +738,13 @@
|
||||
(set! (-> obj swim-depth) (fmax 0.0 (- (- (-> obj surface-height) (-> obj swim-height)) (-> obj bottom 0 y))))
|
||||
(>= (-> obj height) (-> obj bottom 0 y))
|
||||
)
|
||||
(if (logtest? (-> (the-as collide-shape-moving (-> obj process root)) status) 1024)
|
||||
(if (logtest? (-> (the-as collide-shape-moving (-> obj process root)) status) (cshape-moving-flags on-water))
|
||||
(set! (-> obj on-water-time) (-> *display* base-frame-counter))
|
||||
)
|
||||
(set! (-> obj drip-wetness) 1.0)
|
||||
(set! (-> obj drip-height) (fmax (- (-> obj surface-height) (-> obj bottom 0 y)) (-> obj drip-height)))
|
||||
(set! (-> obj drip-speed) 15.0)
|
||||
(if (zero? (logand (-> obj flags) 512))
|
||||
(if (zero? (logand (-> obj flags) (water-flags wt09)))
|
||||
(TODO-RENAME-15 obj)
|
||||
)
|
||||
(cond
|
||||
@@ -756,8 +755,8 @@
|
||||
(set! (-> s4-0 y) (-> obj surface-height))
|
||||
(when (and (logtest? (-> obj process draw status) (draw-status was-drawn))
|
||||
(zero? (-> obj process draw cur-lod))
|
||||
(logtest? #x400000 (-> obj flags))
|
||||
(logtest? #x800000 (-> obj flags))
|
||||
(logtest? (water-flags wt22) (-> obj flags))
|
||||
(logtest? (water-flags wt23) (-> obj flags))
|
||||
)
|
||||
(let ((f30-1 (y-angle (-> obj process root)))
|
||||
(f28-0 (vector-xz-length (-> obj process root transv)))
|
||||
@@ -812,10 +811,10 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(logior! (-> obj flags) 8192)
|
||||
(logior! (-> obj flags) (water-flags wt13))
|
||||
)
|
||||
)
|
||||
(when (and (logtest? (-> obj flags) 32) (logtest? #x800000 (-> obj flags)))
|
||||
(when (and (logtest? (-> obj flags) (water-flags wt05)) (logtest? (water-flags wt23) (-> obj flags)))
|
||||
(let* ((v1-124 (rand-vu-int-range 3 (+ (-> obj process node-list length) -1)))
|
||||
(s4-1 (vector<-cspace! (new 'stack-no-clear 'vector) (-> obj process node-list data v1-124)))
|
||||
)
|
||||
@@ -860,22 +859,25 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (logtest? (-> obj flags) 16)
|
||||
(and s4-3 (zero? (logand (-> (the-as collide-shape-moving (-> obj process root)) status) 1024)))
|
||||
(if (and (logtest? (-> obj flags) (water-flags wt04))
|
||||
(and s4-3
|
||||
(zero? (logand (-> (the-as collide-shape-moving (-> obj process root)) status) (cshape-moving-flags on-water))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj bob amp) (* 0.8 (-> obj bob amp)))
|
||||
)
|
||||
(cond
|
||||
((and (logtest? (-> obj flags) 8)
|
||||
(or (logtest? (-> (the-as collide-shape-moving (-> obj process root)) status) 1024)
|
||||
((and (logtest? (-> obj flags) (water-flags wt03))
|
||||
(or (logtest? (-> (the-as collide-shape-moving (-> obj process root)) status) (cshape-moving-flags on-water))
|
||||
(>= f30-3 (-> obj bottom 0 y))
|
||||
(and (logtest? s5-0 2048)
|
||||
(logtest? (-> (the-as collide-shape-moving (-> obj process root)) status) 4)
|
||||
(zero? (logand (-> (the-as collide-shape-moving (-> obj process root)) status) 1))
|
||||
(and (logtest? s5-0 (water-flags wt11))
|
||||
(logtest? (-> (the-as collide-shape-moving (-> obj process root)) status) (cshape-moving-flags tsurf))
|
||||
(zero? (logand (-> (the-as collide-shape-moving (-> obj process root)) status) (cshape-moving-flags onsurf)))
|
||||
(>= (+ 204.8 f30-3) (-> obj bottom 0 y))
|
||||
)
|
||||
)
|
||||
(or (logtest? s5-0 2048)
|
||||
(or (logtest? s5-0 (water-flags wt11))
|
||||
(< 12288.0 (vector-xz-length (-> obj process root transv)))
|
||||
(< (+ (-> *display* base-frame-counter) (seconds -0.2)) (-> obj enter-water-time))
|
||||
(>= (+ (- 204.8 (fmin 6144.0 (+ (-> obj ocean-offset) (-> obj bob-offset) (-> obj align-offset)))) f30-3)
|
||||
@@ -885,39 +887,39 @@
|
||||
)
|
||||
(set! (-> obj swim-time) (-> *display* base-frame-counter))
|
||||
(send-event (-> obj process) 'swim)
|
||||
(logior! (-> obj flags) 2048)
|
||||
(if (zero? (logand s5-0 2048))
|
||||
(logior! (-> obj flags) (water-flags wt11))
|
||||
(if (zero? (logand s5-0 (water-flags wt11)))
|
||||
(set! (-> obj enter-swim-time) (-> *display* base-frame-counter))
|
||||
)
|
||||
(cond
|
||||
((and (logtest? (-> obj flags) 16)
|
||||
(logtest? (-> (the-as collide-shape-moving (-> obj process root)) status) 4)
|
||||
(zero? (logand #x10000 (-> obj flags)))
|
||||
((and (logtest? (-> obj flags) (water-flags wt04))
|
||||
(logtest? (-> (the-as collide-shape-moving (-> obj process root)) status) (cshape-moving-flags tsurf))
|
||||
(zero? (logand (water-flags wt16) (-> obj flags)))
|
||||
)
|
||||
(let ((v1-200 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> v1-200 quad) (-> obj bottom 0 quad))
|
||||
(set! (-> v1-200 y) (- (-> obj height) (-> obj swim-height)))
|
||||
(let ((s4-4 (-> obj process root)))
|
||||
(when (and (zero? (logand (-> (the-as collide-shape-moving s4-4) status) 4096))
|
||||
(logtest? (-> obj flags) 2048)
|
||||
(when (and (zero? (logand (-> (the-as collide-shape-moving s4-4) status) (cshape-moving-flags csmf12)))
|
||||
(logtest? (-> obj flags) (water-flags wt11))
|
||||
(zero? (logand (-> (the-as collide-shape-moving s4-4) root-prim prim-core action) (collide-action ca-9)))
|
||||
)
|
||||
(let ((a1-27 (vector-! (new 'stack-no-clear 'vector) v1-200 (-> s4-4 trans))))
|
||||
(vector-float*! a1-27 a1-27 (-> *display* frames-per-second))
|
||||
(integrate-and-collide! (the-as collide-shape-moving s4-4) a1-27)
|
||||
)
|
||||
(logior! (-> (the-as collide-shape-moving s4-4) status) 1031)
|
||||
(logior! (-> (the-as collide-shape-moving s4-4) status) (cshape-moving-flags onsurf onground tsurf on-water))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((and (< (-> obj bottom 0 y) f30-3) (zero? (logand #x10000 (-> obj flags))))
|
||||
(logior! (-> obj flags) 4096)
|
||||
((and (< (-> obj bottom 0 y) f30-3) (zero? (logand (water-flags wt16) (-> obj flags))))
|
||||
(logior! (-> obj flags) (water-flags wt12))
|
||||
)
|
||||
)
|
||||
)
|
||||
((begin
|
||||
(set! s4-3 (and (logtest? (-> obj flags) 4)
|
||||
(set! s4-3 (and (logtest? (-> obj flags) (water-flags wt02))
|
||||
(or (not (!= (-> obj bob amp) 0.0))
|
||||
(>= (- (-> *display* base-frame-counter) (-> obj swim-time)) (seconds 0.05))
|
||||
)
|
||||
@@ -928,15 +930,15 @@
|
||||
)
|
||||
(set! (-> obj wade-time) (-> *display* base-frame-counter))
|
||||
(send-event (-> obj process) 'wade)
|
||||
(logior! (-> obj flags) 1024)
|
||||
(logior! (-> obj flags) (water-flags wt10))
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and (logtest? (-> obj flags) 8)
|
||||
(when (and (logtest? (-> obj flags) (water-flags wt03))
|
||||
(< (-> obj bottom 1 y) f30-3)
|
||||
(and (< f30-3 (-> obj bottom 0 y)) (logtest? s5-0 4096))
|
||||
(and (< f30-3 (-> obj bottom 0 y)) (logtest? s5-0 (water-flags wt12)))
|
||||
)
|
||||
(logior! (-> obj flags) 2048)
|
||||
(logior! (-> obj flags) (water-flags wt11))
|
||||
(let ((a1-30 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> a1-30 quad) (-> obj bottom 0 quad))
|
||||
(let ((s5-1 (-> obj process root)))
|
||||
@@ -944,7 +946,7 @@
|
||||
(when (zero? (logand (-> (the-as collide-shape-moving s5-1) root-prim prim-core action) (collide-action ca-9)))
|
||||
(let ((f30-4 (-> (the-as collide-shape-moving s5-1) ground-impact-vel)))
|
||||
(move-to-ground-point! (the-as collide-shape-moving s5-1) a1-30 (-> s5-1 transv) *up-vector*)
|
||||
(logior! (-> (the-as collide-shape-moving s5-1) status) 1024)
|
||||
(logior! (-> (the-as collide-shape-moving s5-1) status) (cshape-moving-flags on-water))
|
||||
(set! (-> (the-as collide-shape-moving s5-1) ground-impact-vel) f30-4)
|
||||
)
|
||||
)
|
||||
@@ -952,8 +954,10 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and (logtest? #x20000 (-> obj flags)) (= (-> obj process type) target))
|
||||
(when (and (logtest? (-> (the-as collide-shape-moving (-> obj process root)) status) 1025)
|
||||
(when (and (logtest? (water-flags wt17) (-> obj flags)) (= (-> obj process type) target))
|
||||
(when (and (logtest? (-> (the-as collide-shape-moving (-> obj process root)) status)
|
||||
(cshape-moving-flags onsurf on-water)
|
||||
)
|
||||
(zero? (logand (-> (the-as collide-shape-moving (-> obj process root)) root-prim prim-core action)
|
||||
(collide-action ca-9)
|
||||
)
|
||||
@@ -1008,17 +1012,19 @@
|
||||
)
|
||||
)
|
||||
(else
|
||||
(if (logtest? (-> obj flags) 512)
|
||||
(if (logtest? (-> obj flags) (water-flags wt09))
|
||||
(TODO-RENAME-16 obj)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (not
|
||||
(or (zero? (logand (-> obj flags) 64)) (zero? (logand #x800000 (-> obj flags))) (= (-> obj drip-wetness) 0.0))
|
||||
)
|
||||
(when (not (or (zero? (logand (-> obj flags) (water-flags wt06)))
|
||||
(zero? (logand (water-flags wt23) (-> obj flags)))
|
||||
(= (-> obj drip-wetness) 0.0)
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> obj flags) #x8000)
|
||||
((logtest? (-> obj flags) (water-flags wt15))
|
||||
(let ((a2-15
|
||||
(vector<-cspace! (new 'stack-no-clear 'vector) (-> obj process node-list data (-> obj drip-joint-index)))
|
||||
)
|
||||
@@ -1039,7 +1045,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> obj drip-time) (-> *display* base-frame-counter))
|
||||
(set! (-> obj flags) (logand -32769 (-> obj flags)))
|
||||
(logclear! (-> obj flags) (water-flags wt15))
|
||||
(seek! (-> obj drip-wetness) 0.0 (* 0.001 (-> obj drip-speed)))
|
||||
(set! (-> obj drip-speed) (* 1.05 (-> obj drip-speed)))
|
||||
(if (= (-> obj drip-wetness) 0.0)
|
||||
@@ -1059,7 +1065,7 @@
|
||||
)
|
||||
(set! (-> obj drip-joint-index) s5-2)
|
||||
(set! (-> obj drip-old-pos quad) (-> v1-328 quad))
|
||||
(logior! (-> obj flags) #x8000)
|
||||
(logior! (-> obj flags) (water-flags wt15))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1169,11 +1175,11 @@
|
||||
|
||||
(defmethod TODO-RENAME-15 water-control ((obj water-control))
|
||||
(with-pp
|
||||
(logior! (-> obj flags) 512)
|
||||
(set! (-> obj flags) (logand -65537 (-> obj flags)))
|
||||
(logior! (-> obj flags) (water-flags wt09))
|
||||
(logclear! (-> obj flags) (water-flags wt16))
|
||||
(set! (-> obj enter-water-time) (-> *display* base-frame-counter))
|
||||
(set-vector! (-> obj enter-water-pos) (-> obj bottom 0 x) (-> obj surface-height) (-> obj bottom 0 z) 1.0)
|
||||
(when (and (logtest? (-> obj flags) 32) (logtest? #x800000 (-> obj flags)))
|
||||
(when (and (logtest? (-> obj flags) (water-flags wt05)) (logtest? (water-flags wt23) (-> obj flags)))
|
||||
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-1 from) pp)
|
||||
(set! (-> a1-1 num-params) 1)
|
||||
@@ -1189,7 +1195,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (logtest? #x20000 (-> obj flags))
|
||||
(if (logtest? (water-flags wt17) (-> obj flags))
|
||||
(set! (-> obj swim-height) 2867.2)
|
||||
)
|
||||
0
|
||||
@@ -1198,9 +1204,9 @@
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-16 water-control ((obj water-control))
|
||||
(set! (-> obj flags) (logand -513 (-> obj flags)))
|
||||
(logclear! (-> obj flags) (water-flags wt09))
|
||||
(set-zero! (-> obj bob))
|
||||
(if (logtest? #x20000 (-> obj flags))
|
||||
(if (logtest? (water-flags wt17) (-> obj flags))
|
||||
(set! (-> obj swim-height) 2867.2)
|
||||
)
|
||||
0
|
||||
@@ -1234,7 +1240,7 @@
|
||||
)
|
||||
|
||||
(defmethod dummy-13 water-control ((obj water-control) (arg0 float) (arg1 vector) (arg2 int) (arg3 vector))
|
||||
(when (and (logtest? (-> obj flags) 32) (logtest? #x800000 (-> obj flags)))
|
||||
(when (and (logtest? (-> obj flags) (water-flags wt05)) (logtest? (water-flags wt23) (-> obj flags)))
|
||||
(let ((a1-3 (vector+float*! (new 'stack-no-clear 'vector) arg1 arg3 0.05)))
|
||||
(set! (-> a1-3 y) (-> obj surface-height))
|
||||
(splash-spawn (the-as basic arg0) (the-as basic a1-3) arg2)
|
||||
@@ -1247,7 +1253,7 @@
|
||||
(defmethod dummy-27 water-vol ((obj water-vol))
|
||||
(when (handle->process (-> obj target))
|
||||
(let ((v1-7 (-> (the-as target (-> obj target process 0)) water)))
|
||||
(set! (-> v1-7 flags) (logand -129892623 (-> v1-7 flags)))
|
||||
(logclear! (-> v1-7 flags) (water-flags wt01 wt02 wt03 wt08 wt17 wt18 wt19 wt20 wt21 wt23 wt24 wt25 wt26))
|
||||
(set! (-> v1-7 volume) (the-as handle #f))
|
||||
)
|
||||
(set! (-> obj target) (the-as handle #f))
|
||||
@@ -1277,8 +1283,8 @@
|
||||
)
|
||||
(else
|
||||
(let ((v1-15 (-> (the-as target (-> obj target process 0)) water)))
|
||||
(when (and (logtest? #x80000 (-> obj flags))
|
||||
(logtest? (-> v1-15 flags) 512)
|
||||
(when (and (logtest? (water-flags wt19) (-> obj flags))
|
||||
(logtest? (-> v1-15 flags) (water-flags wt09))
|
||||
(>= (-> v1-15 surface-height) (-> v1-15 bottom 0 y))
|
||||
)
|
||||
(let ((v1-18 (-> obj attack-event)))
|
||||
@@ -1332,7 +1338,7 @@
|
||||
(process-entity-status! obj (entity-perm-status bit-3) #t)
|
||||
(set! (-> s5-0 volume) (process->handle obj))
|
||||
(set! (-> obj target) (process->handle *target*))
|
||||
(logior! (-> s5-0 flags) 2)
|
||||
(logior! (-> s5-0 flags) (water-flags wt01))
|
||||
(set! (-> s5-0 base-height) (-> obj water-height))
|
||||
(set! (-> s5-0 ocean-offset) 0.0)
|
||||
(logior! (-> s5-0 flags) (-> obj flags))
|
||||
@@ -1399,10 +1405,10 @@
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-25 water-vol ((obj water-vol))
|
||||
(the-as object 0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: disable def twice: 85. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
|
||||
(defmethod TODO-RENAME-29 water-vol ((obj water-vol))
|
||||
(local-vars (sv-16 res-tag))
|
||||
(set! (-> obj attack-event) (the-as symbol ((method-of-type res-lump get-property-struct)
|
||||
@@ -1440,30 +1446,27 @@
|
||||
(set! (-> obj wade-height) (-> v1-8 1))
|
||||
(set! (-> obj swim-height) (-> v1-8 2))
|
||||
(if (>= (-> sv-16 elt-count) (the-as uint 4))
|
||||
(set! (-> obj flags) (the-as uint (the int (-> v1-8 3))))
|
||||
(set! (-> obj flags) (the-as water-flags (the int (-> v1-8 3))))
|
||||
)
|
||||
(if (>= (-> sv-16 elt-count) (the-as uint 5))
|
||||
(set! (-> obj bottom-height) (-> v1-8 4))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj flags) (logior #x800000 (-> obj flags)))
|
||||
(set! (-> obj flags) (logior (water-flags wt23) (-> obj flags)))
|
||||
(cond
|
||||
((zero? (-> obj flags))
|
||||
(if (< 0.0 (-> obj wade-height))
|
||||
(logior! (-> obj flags) 4)
|
||||
(logior! (-> obj flags) (water-flags wt02))
|
||||
)
|
||||
(when (< 0.0 (-> obj swim-height))
|
||||
(let ((v0-4 (logior (-> obj flags) 8)))
|
||||
(set! (-> obj flags) v0-4)
|
||||
v0-4
|
||||
(if (< 0.0 (-> obj swim-height))
|
||||
(logior! (-> obj flags) (water-flags wt03))
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(the-as uint #f)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-22 water-vol ((obj water-vol))
|
||||
|
||||
@@ -1992,7 +1992,9 @@
|
||||
(s3-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(when (and *target*
|
||||
(or (logtest? (-> obj flags) (nav-control-flags navcf11)) (logtest? (-> *target* state-flags) #x80f8))
|
||||
(or (logtest? (-> obj flags) (nav-control-flags navcf11))
|
||||
(logtest? (-> *target* state-flags) (state-flags sf03 sf04 sf05 sf06 sf07 sf15))
|
||||
)
|
||||
)
|
||||
(let ((s2-0 obj)
|
||||
(s1-0 (-> *target* control))
|
||||
|
||||
@@ -137,6 +137,20 @@
|
||||
(default 49)
|
||||
)
|
||||
|
||||
(defenum sound-mask
|
||||
:bitfield #t
|
||||
:type uint16
|
||||
(volume)
|
||||
(pitch)
|
||||
(bend)
|
||||
(unused)
|
||||
(time)
|
||||
(trans)
|
||||
(fo-min)
|
||||
(fo-max)
|
||||
(fo-curve)
|
||||
)
|
||||
|
||||
;; like should match the sound type in OVERLORD
|
||||
;; This is shared between all sound RPCs and acts like the header for the sound messages
|
||||
(deftype sound-rpc-cmd (structure)
|
||||
@@ -149,7 +163,7 @@
|
||||
)
|
||||
|
||||
(deftype sound-play-parms (structure)
|
||||
((mask uint16 :offset-assert 0)
|
||||
((mask sound-mask :offset-assert 0)
|
||||
(pitch-mod int16 :offset-assert 2)
|
||||
(bend int16 :offset-assert 4)
|
||||
(fo-min int16 :offset-assert 6)
|
||||
@@ -417,12 +431,12 @@
|
||||
)
|
||||
|
||||
(deftype sound-spec (basic)
|
||||
((mask uint16 :offset-assert 4)
|
||||
((mask sound-mask :offset-assert 4)
|
||||
(num float :offset-assert 8)
|
||||
(group uint8 :offset-assert 12)
|
||||
(sound-name sound-name :score 20 :offset 16)
|
||||
(sound-name-char uint8 16 :offset 16) ;; moved to after sound-name
|
||||
(trans float 4 :offset-assert 32) ;; guess
|
||||
(sound-name sound-name :score 20 :offset 16)
|
||||
(sound-name-char uint8 16 :offset 16) ;; moved to after sound-name
|
||||
(trans float 4 :offset-assert 32) ;; guess
|
||||
(volume int32 :offset-assert 48)
|
||||
(pitch-mod int32 :offset-assert 52)
|
||||
(bend int32 :offset-assert 56)
|
||||
@@ -438,6 +452,37 @@
|
||||
:flag-assert #x90000004c
|
||||
)
|
||||
|
||||
(defmacro sound-vol (vol)
|
||||
"convert to sound volume units"
|
||||
(if (number? vol)
|
||||
(* 1 (/ (* vol 1024) 100))
|
||||
`(the int (/ (* ,vol 1024) 100))
|
||||
)
|
||||
)
|
||||
|
||||
(defmacro static-sound-spec (name &key (num 1.0) &key (group 1)
|
||||
&key (volume #f)
|
||||
&key (pitch-mod 0)
|
||||
&key (fo-min 0) &key (fo-max 0)
|
||||
&key (mask ()))
|
||||
(let ((snd-mask mask)
|
||||
(snd-volume 100.0))
|
||||
(when (nonzero? fo-max) (cons! snd-mask 'fo-max))
|
||||
(when (nonzero? fo-min) (cons! snd-mask 'fo-min))
|
||||
(when (nonzero? pitch-mod) (cons! snd-mask 'pitch))
|
||||
(when volume (cons! snd-mask 'volume) (set! snd-volume volume))
|
||||
`(new 'static 'sound-spec
|
||||
:sound-name (static-sound-name ,name)
|
||||
:num ,num
|
||||
:group ,group
|
||||
:volume (sound-vol ,snd-volume)
|
||||
:pitch-mod ,pitch-mod
|
||||
:fo-min ,fo-min
|
||||
:fo-max ,fo-max
|
||||
:mask (sound-mask ,@snd-mask)
|
||||
))
|
||||
)
|
||||
|
||||
;; each sound command gets a unique ID.
|
||||
(define *current-sound-id* (the sound-id #x10000))
|
||||
|
||||
@@ -455,7 +500,7 @@
|
||||
(falloff-near int32 :offset-assert 80)
|
||||
(falloff-far int32 :offset-assert 84)
|
||||
(falloff-mode int32 :offset-assert 88)
|
||||
(params (pointer float) :offset-assert 92)
|
||||
(params (pointer float) :offset-assert 92)
|
||||
(param-count int32 :offset-assert 96)
|
||||
(entity entity :offset-assert 100)
|
||||
(sound-count int32 :offset-assert 104)
|
||||
|
||||
@@ -367,7 +367,7 @@
|
||||
(set! (-> cmd command) (sound-command play))
|
||||
(set! (-> cmd id) id)
|
||||
(set! (-> cmd name) name)
|
||||
(set! (-> cmd parms mask) (the-as uint 0))
|
||||
(set! (-> cmd parms mask) (sound-mask))
|
||||
(set! (-> cmd parms group) (the-as uint sv-16))
|
||||
(set! (-> cmd parms volume) vol)
|
||||
(set! (-> cmd parms pitch-mod) pitch)
|
||||
@@ -583,9 +583,9 @@
|
||||
(set! (-> obj volume) 1024)
|
||||
(set! (-> obj pitch) 0)
|
||||
(when (and spec (!= spec *ambient-spec*))
|
||||
(if (nonzero? (logand (-> spec mask) 1))
|
||||
(if (logtest? (-> spec mask) (sound-mask volume))
|
||||
(set! (-> obj volume) (-> spec volume)))
|
||||
(if (nonzero? (logand (-> spec mask) 2))
|
||||
(if (logtest? (-> spec mask) (sound-mask pitch))
|
||||
(set! (-> obj pitch) (-> spec pitch-mod)))
|
||||
)
|
||||
(cond
|
||||
@@ -635,13 +635,9 @@
|
||||
(set! (-> spec bend) 0)
|
||||
(set! (-> spec sound-name) (-> obj name))
|
||||
(set! (-> spec fo-max) (-> obj falloff-far))
|
||||
(set! (-> spec mask) (the-as uint 0))
|
||||
(set! (-> spec mask) (sound-mask))
|
||||
(if (-> obj params)
|
||||
(effect-param->sound-spec
|
||||
spec
|
||||
(the-as (pointer float) (-> obj params))
|
||||
(-> obj param-count)
|
||||
)
|
||||
(effect-param->sound-spec spec (-> obj params) (-> obj param-count))
|
||||
)
|
||||
)
|
||||
(if (and (nonzero? (-> spec fo-max))
|
||||
@@ -720,7 +716,7 @@
|
||||
|
||||
(sound-trans-from-process cmd sound-trans)
|
||||
|
||||
(set! (-> cmd parms mask) (the-as uint #x20))
|
||||
(set! (-> cmd parms mask) (sound-mask trans))
|
||||
(-> cmd id)
|
||||
)
|
||||
)
|
||||
@@ -735,7 +731,7 @@
|
||||
(set! (-> cmd command) (sound-command set-param))
|
||||
(set! (-> cmd id) (-> obj playing-id))
|
||||
(set! (-> cmd parms volume) (the int (* 10.24 (the float arg0))))
|
||||
(set! (-> cmd parms mask) (the-as uint 1))
|
||||
(set! (-> cmd parms mask) (sound-mask volume))
|
||||
(-> cmd id)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
)
|
||||
(let ((s5-0 (new-stack-vector0)))
|
||||
(vector-z-quaternion! s5-0 (-> self control unknown-quaternion00))
|
||||
(when (logtest? (-> self control unknown-surface00 flags) 2)
|
||||
(when (logtest? (-> self control unknown-surface00 flags) (surface-flags surf01))
|
||||
(vector-flatten! s5-0 s5-0 (-> self control dynam gravity-normal))
|
||||
(vector-normalize! s5-0 1.0)
|
||||
)
|
||||
@@ -54,10 +54,8 @@
|
||||
(defbehavior reverse-conversions target ((arg0 vector))
|
||||
(set! (-> self control unknown-float01) (vector-xz-length (-> self control unknown-vector00)))
|
||||
(vector-matrix*! arg0 (-> self control unknown-vector00) (-> self control unknown-matrix01))
|
||||
(let ((v0-2 (-> self control status)))
|
||||
(set! (-> self control old-status) v0-2)
|
||||
v0-2
|
||||
)
|
||||
(set! (-> self control old-status) (-> self control status))
|
||||
(none)
|
||||
)
|
||||
|
||||
(defun-debug draw-history ((arg0 control-info))
|
||||
@@ -108,7 +106,7 @@
|
||||
(meters 0.000024414063)
|
||||
(the-as rgba (+ #x408040 (shl s4-0 24)))
|
||||
)
|
||||
(when (zero? (logand (-> s2-0 status) 256))
|
||||
(when (zero? (logand (-> s2-0 status) (cshape-moving-flags csmf08)))
|
||||
(add-debug-line
|
||||
(logtest? s5-0 1)
|
||||
(bucket-id debug-no-zbuf)
|
||||
@@ -166,7 +164,7 @@
|
||||
#t
|
||||
"~6D ~8S #x~8X "
|
||||
(-> s4-0 time)
|
||||
(if (logtest? (-> s4-0 status) 256)
|
||||
(if (logtest? (-> s4-0 status) (cshape-moving-flags csmf08))
|
||||
"air"
|
||||
(-> *pat-mode-info* (-> s4-0 pat mode) name)
|
||||
)
|
||||
@@ -175,19 +173,19 @@
|
||||
(format
|
||||
#t
|
||||
"~C~C~C~C~C~C"
|
||||
(if (zero? (logand s3-0 1))
|
||||
(if (zero? (logand s3-0 (cshape-reaction-flags csrf00)))
|
||||
103
|
||||
87
|
||||
)
|
||||
(if (zero? (logand s3-0 2))
|
||||
(if (zero? (logand s3-0 (cshape-reaction-flags csrf01)))
|
||||
103
|
||||
87
|
||||
)
|
||||
(cond
|
||||
((logtest? s3-0 2048)
|
||||
((logtest? s3-0 (cshape-reaction-flags csrf11))
|
||||
71
|
||||
)
|
||||
((zero? (logand s3-0 4))
|
||||
((zero? (logand s3-0 (cshape-reaction-flags csrf02)))
|
||||
103
|
||||
)
|
||||
(else
|
||||
@@ -195,21 +193,21 @@
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((logtest? s3-0 512)
|
||||
((logtest? s3-0 (cshape-reaction-flags csrf09))
|
||||
66
|
||||
)
|
||||
((logtest? s3-0 8)
|
||||
((logtest? s3-0 (cshape-reaction-flags csrf03))
|
||||
76
|
||||
)
|
||||
(else
|
||||
99
|
||||
)
|
||||
)
|
||||
(if (zero? (logand s3-0 16))
|
||||
(if (zero? (logand s3-0 (cshape-reaction-flags csrf04)))
|
||||
110
|
||||
66
|
||||
)
|
||||
(if (zero? (logand s3-0 32))
|
||||
(if (zero? (logand s3-0 (cshape-reaction-flags csrf05)))
|
||||
103
|
||||
65
|
||||
)
|
||||
@@ -217,18 +215,18 @@
|
||||
(format
|
||||
#t
|
||||
"~C~C "
|
||||
(if (logtest? s3-0 64)
|
||||
(if (logtest? s3-0 (cshape-reaction-flags csrf06))
|
||||
78
|
||||
95
|
||||
)
|
||||
(cond
|
||||
((logtest? s3-0 1024)
|
||||
((logtest? s3-0 (cshape-reaction-flags csrf10))
|
||||
76
|
||||
)
|
||||
((logtest? s3-0 256)
|
||||
((logtest? s3-0 (cshape-reaction-flags csrf08))
|
||||
67
|
||||
)
|
||||
((logtest? s3-0 128)
|
||||
((logtest? s3-0 (cshape-reaction-flags csrf07))
|
||||
108
|
||||
)
|
||||
(else
|
||||
@@ -325,31 +323,31 @@
|
||||
(format
|
||||
arg1
|
||||
"~0k~9S ~9S ~9S ~9S ~9S ~9S~%"
|
||||
(if (logtest? (-> arg0 control status) 1)
|
||||
(if (logtest? (-> arg0 control status) (cshape-moving-flags onsurf))
|
||||
"on-surface"
|
||||
""
|
||||
)
|
||||
(if (logtest? (-> arg0 control status) 2)
|
||||
(if (logtest? (-> arg0 control status) (cshape-moving-flags onground))
|
||||
"on-ground"
|
||||
""
|
||||
)
|
||||
(if (logtest? (-> arg0 control status) 4)
|
||||
(if (logtest? (-> arg0 control status) (cshape-moving-flags tsurf))
|
||||
"t-surface"
|
||||
""
|
||||
)
|
||||
(if (logtest? (-> arg0 control status) 8)
|
||||
(if (logtest? (-> arg0 control status) (cshape-moving-flags twall))
|
||||
"t-wall"
|
||||
""
|
||||
)
|
||||
(if (logtest? (-> arg0 control status) 32)
|
||||
(if (logtest? (-> arg0 control status) (cshape-moving-flags t-act))
|
||||
"t-act"
|
||||
""
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> arg0 control status) 16)
|
||||
((logtest? (-> arg0 control status) (cshape-moving-flags t-ciel))
|
||||
"t-ceil"
|
||||
)
|
||||
((logtest? (-> arg0 control status) 1024)
|
||||
((logtest? (-> arg0 control status) (cshape-moving-flags on-water))
|
||||
"on-water"
|
||||
)
|
||||
(else
|
||||
@@ -364,24 +362,24 @@
|
||||
"in water ~A at ~M ~5S ~5S ~5S ~5S "
|
||||
(-> v1-49 name)
|
||||
(-> arg0 water height)
|
||||
(if (logtest? (-> arg0 water flags) 512)
|
||||
(if (logtest? (-> arg0 water flags) (water-flags wt09))
|
||||
"water"
|
||||
""
|
||||
)
|
||||
(if (logtest? (-> arg0 water flags) 1024)
|
||||
(if (logtest? (-> arg0 water flags) (water-flags wt10))
|
||||
"wade"
|
||||
""
|
||||
)
|
||||
(if (logtest? (-> arg0 water flags) 2048)
|
||||
(if (logtest? (-> arg0 water flags) (water-flags wt11))
|
||||
"swim"
|
||||
""
|
||||
)
|
||||
(if (logtest? (-> arg0 water flags) 4096)
|
||||
(if (logtest? (-> arg0 water flags) (water-flags wt12))
|
||||
"under"
|
||||
""
|
||||
)
|
||||
)
|
||||
(format arg1 "~2S~%" (if (logtest? (-> arg0 water flags) 16)
|
||||
(format arg1 "~2S~%" (if (logtest? (-> arg0 water flags) (water-flags wt04))
|
||||
"sg"
|
||||
""
|
||||
)
|
||||
@@ -555,7 +553,7 @@
|
||||
(let ((f1-1 (* 0.0625 f1-0)))
|
||||
(set! (-> self control unknown-int10) a0-3)
|
||||
(set! (-> self control unknown-float100) f1-1)
|
||||
(if (logtest? (-> self control unknown-surface01 flags) 8)
|
||||
(if (logtest? (-> self control unknown-surface01 flags) (surface-flags surf03))
|
||||
(set! (-> v1-6 0) (the-as uint (-> *display* base-frame-counter)))
|
||||
)
|
||||
(and (>= (the-as uint (- (-> *display* base-frame-counter) (the-as int (-> v1-6 0)))) (the-as uint 300))
|
||||
@@ -564,7 +562,7 @@
|
||||
(< 0.7 (-> self control unknown-float20))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword20)) (seconds 0.3))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword21)) (seconds 0.3))
|
||||
(logtest? (-> self control status) 1)
|
||||
(logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(and (< 0.7 (-> self control surface-angle)) #t)
|
||||
)
|
||||
)
|
||||
@@ -750,7 +748,9 @@
|
||||
)
|
||||
(vector-matrix*! s2-3 s3-3 (-> self control unknown-matrix01))
|
||||
(let ((f28-2 (vector-vector-xz-distance s3-3 s4-0)))
|
||||
(when (and (zero? (logand (-> self control status) 4)) (< (vector-xz-length gp-0) (vector-xz-length s3-3)))
|
||||
(when (and (zero? (logand (-> self control status) (cshape-moving-flags tsurf)))
|
||||
(< (vector-xz-length gp-0) (vector-xz-length s3-3))
|
||||
)
|
||||
(let ((f0-50 (lerp-scale 163840.0 0.0 f28-2 0.0 20480.0)))
|
||||
(if (and (< f28-2 20480.0) (< (-> s4-0 z) 0.0))
|
||||
(set! f0-50 (* 2.0 f0-50))
|
||||
@@ -760,9 +760,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) 8))
|
||||
(logtest? (-> self control old-status) 8)
|
||||
(logtest? (-> self control unknown-surface00 flags) 2048)
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags twall)))
|
||||
(logtest? (-> self control old-status) (cshape-moving-flags twall))
|
||||
(logtest? (-> self control unknown-surface00 flags) (surface-flags surf11))
|
||||
(< 0.0 (-> gp-0 y))
|
||||
(< 0.0 (vector-dot
|
||||
(-> self control dynam gravity-normal)
|
||||
@@ -779,9 +779,9 @@
|
||||
(if (< (- (-> *display* base-frame-counter) (-> self control unknown-dword70)) (seconds 0.2))
|
||||
(set! f30-4 (+ 204800.0 f30-4))
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) 8))
|
||||
(and (logtest? (-> self control old-status) 8)
|
||||
(logtest? (-> self control unknown-surface00 flags) 2048)
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags twall)))
|
||||
(and (logtest? (-> self control old-status) (cshape-moving-flags twall))
|
||||
(logtest? (-> self control unknown-surface00 flags) (surface-flags surf11))
|
||||
(< 0.0 (-> gp-0 y))
|
||||
(< (-> gp-0 z) 0.0)
|
||||
)
|
||||
@@ -898,15 +898,16 @@
|
||||
(defbehavior do-rotations2 target ()
|
||||
(let ((gp-0 (vector-z-quaternion! (new-stack-vector0) (-> self control dir-targ)))
|
||||
(s5-0
|
||||
(if (and (or (zero? (logand (logior (-> self control status) (-> self control old-status)) 5))
|
||||
(if (and (or (zero? (logand (logior (-> self control status) (-> self control old-status)) (cshape-moving-flags onsurf tsurf))
|
||||
)
|
||||
(< (- (-> *display* base-frame-counter) (-> self control unknown-dword20)) (seconds 0.5))
|
||||
(!= (-> self next-state name) 'target-walk)
|
||||
(< (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.5))
|
||||
(< (- (-> *display* base-frame-counter) (-> self control unknown-dword21)) (seconds 0.5))
|
||||
(logtest? (-> self control unknown-surface01 flags) 16)
|
||||
(logtest? (-> self control unknown-surface01 flags) (surface-flags surf04))
|
||||
(!= (-> self control unknown-float41) 0.0)
|
||||
)
|
||||
(zero? (logand (-> self control unknown-surface01 flags) 32))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags surf05)))
|
||||
)
|
||||
(-> self control unknown-vector20)
|
||||
(-> self control transv)
|
||||
@@ -993,12 +994,12 @@
|
||||
(set! (-> self control unknown-vector10 quad) (-> self control transv quad))
|
||||
((-> self control unknown-surface01 active-hook))
|
||||
(cond
|
||||
((logtest? (-> self control status) 1)
|
||||
((logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(set! (-> self control unknown-dword11) (-> *display* base-frame-counter))
|
||||
(set! (-> self control unknown-vector52 quad) (-> self control trans quad))
|
||||
(if (and (>= (-> self control coverage) 1.0)
|
||||
(zero? (logand (-> self control status) 1056))
|
||||
(logtest? (-> self control status) 2)
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags t-act on-water)))
|
||||
(logtest? (-> self control status) (cshape-moving-flags onground))
|
||||
)
|
||||
(set! (-> self control last-known-safe-ground quad) (-> self control trans quad))
|
||||
)
|
||||
@@ -1006,7 +1007,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((v1-25 (-> self control trans)))
|
||||
(when (logtest? (-> self control old-status) 1)
|
||||
(when (logtest? (-> self control old-status) (cshape-moving-flags onsurf))
|
||||
(set! (-> self control unknown-vector110 quad) (-> self control unknown-vector52 quad))
|
||||
(set! (-> self control unknown-vector111 quad) (-> self control unknown-vector52 quad))
|
||||
)
|
||||
@@ -1028,10 +1029,9 @@
|
||||
(zero? (logand (-> *kernel-context* prevent-from-run) (process-mask movie)))
|
||||
)
|
||||
(if (and (= (-> self cam-user-mode) 'normal)
|
||||
(logtest? (-> self control unknown-surface00 flags) 1)
|
||||
(zero?
|
||||
(logand (-> self control root-prim prim-core action) (collide-action ca-7 ca-8 ca-9 ca-12 ca-13 ca-14))
|
||||
)
|
||||
(logtest? (-> self control unknown-surface00 flags) (surface-flags surf00))
|
||||
(zero? (logand (-> self control root-prim prim-core action) (collide-action ca-7 ca-8 ca-9 ca-12 ca-13 ca-14))
|
||||
)
|
||||
(-> *setting-control* current allow-look-around)
|
||||
(>= (- (-> *display* base-frame-counter) (-> self no-look-around-wait)) (seconds 0.05))
|
||||
(not (and (= (-> self control ground-pat material) (pat-material ice))
|
||||
@@ -1045,7 +1045,7 @@
|
||||
(when (and (= *cheat-mode* 'debug)
|
||||
(cpad-hold? (-> self control unknown-cpad-info00 number) r2)
|
||||
(not *pause-lock*)
|
||||
(zero? (logand (-> self state-flags) 768))
|
||||
(zero? (logand (-> self state-flags) (state-flags sf08 sf09)))
|
||||
)
|
||||
(if (!= (-> self next-state name) 'target-falling)
|
||||
(send-event self 'change-mode 'falling)
|
||||
@@ -1090,8 +1090,10 @@
|
||||
(set! (-> self control surf) *standard-ground-surface*)
|
||||
)
|
||||
(let ((f0-17 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))))
|
||||
(if (and (or (logtest? (-> self control unknown-surface01 flags) 1024)
|
||||
(and (= (-> self next-state name) 'target-walk) (zero? (logand (-> self control status) 1)))
|
||||
(if (and (or (logtest? (-> self control unknown-surface01 flags) (surface-flags surf10))
|
||||
(and (= (-> self next-state name) 'target-walk)
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
(< f0-17 0.0)
|
||||
(or (not (and (= *cheat-mode* 'debug) (cpad-hold? (-> self control unknown-cpad-info00 number) r2)))
|
||||
@@ -1136,10 +1138,10 @@
|
||||
)
|
||||
|
||||
(defbehavior post-flag-setup target ()
|
||||
(if (logtest? (-> self control status) 40)
|
||||
(if (logtest? (-> self control status) (cshape-moving-flags twall t-act))
|
||||
(set! (-> self control unknown-dword20) (-> *display* base-frame-counter))
|
||||
)
|
||||
(when (logtest? (-> self state-flags) 32)
|
||||
(when (logtest? (-> self state-flags) (state-flags sf05))
|
||||
(if (< (logand (- (-> *display* base-frame-counter) (-> self control unknown-dword80)) 3) 1)
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
@@ -1154,16 +1156,19 @@
|
||||
)
|
||||
|
||||
(defbehavior bend-gravity target ()
|
||||
(set! (-> self control unknown-float82) (if (logtest? (-> self control status) 1)
|
||||
(set! (-> self control unknown-float82) (if (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
32.0
|
||||
2.0
|
||||
)
|
||||
)
|
||||
(let ((f0-2 (if (and (logtest? (-> self control status) 8) (zero? (logand (-> self control status) 1)))
|
||||
0.0
|
||||
(-> self control unknown-float81)
|
||||
)
|
||||
(let ((f0-2
|
||||
(if (and (logtest? (-> self control status) (cshape-moving-flags twall))
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
0.0
|
||||
(-> self control unknown-float81)
|
||||
)
|
||||
)
|
||||
)
|
||||
(seek!
|
||||
(-> self control unknown-float80)
|
||||
@@ -1416,17 +1421,20 @@
|
||||
(else
|
||||
(let ((v1-11 (-> self water flags)))
|
||||
(cond
|
||||
((and (logtest? v1-11 512) (logtest? v1-11 6144))
|
||||
((and (logtest? v1-11 (water-flags wt09)) (logtest? v1-11 (water-flags wt11 wt12)))
|
||||
(vector<-cspace!
|
||||
(the-as vector (&-> (-> self control) unknown-qword00))
|
||||
(the-as cspace (-> self node-list data))
|
||||
)
|
||||
(if (not (and (logtest? (-> self water flags) 4096) (zero? (logand (-> self water flags) 16))))
|
||||
(if (not (and (logtest? (-> self water flags) (water-flags wt12))
|
||||
(zero? (logand (-> self water flags) (water-flags wt04)))
|
||||
)
|
||||
)
|
||||
(set! (-> self control unknown-float30) (- (-> self water base-height) (-> self water swim-height)))
|
||||
)
|
||||
(&-> (-> self control) unknown-qword00)
|
||||
)
|
||||
((and (logtest? (-> self water flags) 512) (logtest? #x40000 (-> self water flags)))
|
||||
((and (logtest? (-> self water flags) (water-flags wt09)) (logtest? (water-flags wt18) (-> self water flags)))
|
||||
(vector<-cspace!
|
||||
(the-as vector (&-> (-> self control) unknown-qword00))
|
||||
(the-as cspace (-> self node-list data))
|
||||
@@ -1464,7 +1472,7 @@
|
||||
(cond
|
||||
((logtest? (-> self control root-prim prim-core action) (collide-action ca-9 ca-13))
|
||||
)
|
||||
((logtest? (-> self water flags) 1024)
|
||||
((logtest? (-> self water flags) (water-flags wt10))
|
||||
(let ((f30-0 (- (- (-> self control trans y) (- (-> self water height) (-> self water wade-height))))))
|
||||
(set! (-> *wade-surface* alignv)
|
||||
(lerp-scale 1.0 0.5 f30-0 0.0 (- (-> self water swim-height) (-> self water wade-height)))
|
||||
@@ -1477,10 +1485,10 @@
|
||||
)
|
||||
(set! (-> self control surf) *wade-surface*)
|
||||
)
|
||||
((logtest? (-> self water flags) 2048)
|
||||
((logtest? (-> self water flags) (water-flags wt11))
|
||||
(set! (-> self control surf) *swim-surface*)
|
||||
)
|
||||
((and (logtest? (-> self water flags) 512) (logtest? #x40000 (-> self water flags)))
|
||||
((and (logtest? (-> self water flags) (water-flags wt09)) (logtest? (water-flags wt18) (-> self water flags)))
|
||||
(set! (-> self control surf) *quicksand-surface*)
|
||||
)
|
||||
)
|
||||
@@ -1508,8 +1516,8 @@
|
||||
)
|
||||
)
|
||||
(target-calc-camera-pos)
|
||||
(when (logtest? (-> self state-flags) #x4000)
|
||||
(set! (-> self state-flags) (logand -28673 (-> self state-flags)))
|
||||
(when (logtest? (-> self state-flags) (state-flags sf14))
|
||||
(logclear! (-> self state-flags) (state-flags sf12 sf13 sf14))
|
||||
(set! (-> self control unknown-float41) 0.0)
|
||||
)
|
||||
(set! (-> self control unknown-int00) 0)
|
||||
@@ -1903,7 +1911,7 @@
|
||||
)
|
||||
(target-exit)
|
||||
(target-timed-invulnerable-off self)
|
||||
(set! (-> self control status) (the-as uint 0))
|
||||
(set! (-> self control status) (cshape-moving-flags))
|
||||
(set! (-> self control unknown-dynamics00) *standard-dynamics*)
|
||||
(set! (-> self control surf) *standard-ground-surface*)
|
||||
(set! (-> self control unknown-vector02 quad) (-> self control unknown-dynamics00 gravity-normal quad))
|
||||
@@ -2027,7 +2035,7 @@
|
||||
(activate-hud self)
|
||||
(set! (-> self fp-hud) (the-as handle #f))
|
||||
(set! (-> self water) (new 'process 'water-control self 9 0.0 8192.0 2048.0))
|
||||
(set! (-> self water flags) (the-as uint #x4000f0))
|
||||
(set! (-> self water flags) (water-flags wt04 wt05 wt06 wt07 wt22))
|
||||
(reset-target-state #t)
|
||||
(set! (-> self control unknown-vector52 quad) (-> self control trans quad))
|
||||
(set! (-> self control unknown-vector52 y) (+ -819200.0 (-> self control unknown-vector52 y)))
|
||||
@@ -2074,7 +2082,7 @@
|
||||
(let* ((s5-0 (get-process *target-dead-pool* target #x4000))
|
||||
(v1-3 (when s5-0
|
||||
(let ((t9-2 (method-of-type target activate)))
|
||||
(t9-2 (the-as target s5-0) *target-pool* 'target (&-> *dram-stack* DPROCESS_STACK_SIZE))
|
||||
(t9-2 (the-as target s5-0) *target-pool* 'target (&-> *dram-stack* 14336))
|
||||
)
|
||||
(run-now-in-process s5-0 init-target arg1)
|
||||
(-> s5-0 ppointer)
|
||||
|
||||
+1062
-1100
File diff suppressed because it is too large
Load Diff
@@ -111,11 +111,10 @@
|
||||
(set! (-> *load-state* want 1 force-vis?) #f)
|
||||
(set! (-> *load-state* want 1 force-inside?) #f)
|
||||
(when (not (string= (-> arg0 name) "default"))
|
||||
(while (not
|
||||
(and (or (not (-> arg0 lev0)) (not (-> arg0 disp0)) (= (level-status *level* (-> arg0 lev0)) 'active))
|
||||
(or (not (-> arg0 lev1)) (not (-> arg0 disp1)) (= (level-status *level* (-> arg0 lev1)) 'active))
|
||||
)
|
||||
)
|
||||
(while (not (and (or (not (-> arg0 lev0)) (not (-> arg0 disp0)) (= (level-status *level* (-> arg0 lev0)) 'active))
|
||||
(or (not (-> arg0 lev1)) (not (-> arg0 disp1)) (= (level-status *level* (-> arg0 lev1)) 'active))
|
||||
)
|
||||
)
|
||||
(let ((v1-52 (lookup-level-info (-> arg0 level))))
|
||||
(if (and v1-52
|
||||
(= (-> *setting-control* current music) (-> v1-52 music-bank))
|
||||
@@ -272,7 +271,7 @@
|
||||
)
|
||||
(until (not v1-10)
|
||||
(suspend)
|
||||
(set! v1-10 (and *target* (logtest? (-> *target* state-flags) 256)))
|
||||
(set! v1-10 (and *target* (logtest? (-> *target* state-flags) (state-flags sf08))))
|
||||
)
|
||||
(set! (-> *cpad-list* cpads 0 change-time) (-> *display* base-frame-counter))
|
||||
(reset-actors 'dead)
|
||||
@@ -474,7 +473,7 @@
|
||||
(set! (-> v1-264 frame-group) (the-as art-joint-anim (-> self draw art-group data 5)))
|
||||
)
|
||||
(suspend)
|
||||
(logior! (-> self control status) 7)
|
||||
(logior! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(go target-stance)
|
||||
(none)
|
||||
)
|
||||
@@ -521,7 +520,7 @@
|
||||
(none)
|
||||
)
|
||||
:mode 'air
|
||||
:flags #x800
|
||||
:flags (surface-flags surf11)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -567,7 +566,7 @@
|
||||
(none)
|
||||
)
|
||||
:mode 'air
|
||||
:flags #x818
|
||||
:flags (surface-flags surf03 surf04 surf11)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -660,8 +659,8 @@
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
(zero? (logand (-> self state-flags) 4096))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) 384))
|
||||
(zero? (logand (-> self state-flags) (state-flags sf12)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags surf07 surf08)))
|
||||
)
|
||||
)
|
||||
(go
|
||||
@@ -687,7 +686,7 @@
|
||||
)
|
||||
#t
|
||||
)
|
||||
(logior! (-> self control status) 1)
|
||||
(logior! (-> self control status) (cshape-moving-flags onsurf))
|
||||
(return (the-as object 'stuck))
|
||||
)
|
||||
(let ((s1-0 (new-stack-vector0)))
|
||||
@@ -892,14 +891,14 @@
|
||||
(set! (-> a0-14 param 1) 1.0)
|
||||
(joint-control-channel-group-eval! a0-14 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
(set! v1-40 (or (ja-done? 0) (and arg1 (logtest? (-> self control status) 1))))
|
||||
(set! v1-40 (or (ja-done? 0) (and arg1 (logtest? (-> self control status) (cshape-moving-flags onsurf)))))
|
||||
)
|
||||
(while (and (or (zero? (logand (-> self control status) 1)) s2-1) (!= s2-1 'stuck))
|
||||
(while (and (or (zero? (logand (-> self control status) (cshape-moving-flags onsurf))) s2-1) (!= s2-1 'stuck))
|
||||
(arg2)
|
||||
(+! f30-1 (* (-> arg0 shove-back) f28-1 (-> *display* seconds-per-frame)))
|
||||
(set! s2-1 (target-hit-push s3-1 s1-1 f30-1 (* (-> arg0 shove-back) f28-1) arg0))
|
||||
(if (not s2-1)
|
||||
(set! (-> self state-flags) (logand -9 (-> self state-flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf03))
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
@@ -934,7 +933,7 @@
|
||||
)
|
||||
)
|
||||
(if (!= (-> self next-state name) 'target-death)
|
||||
(set! (-> self state-flags) (logand -32777 (-> self state-flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf03 sf15))
|
||||
)
|
||||
(target-exit)
|
||||
(none)
|
||||
@@ -951,7 +950,7 @@
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 symbol) (arg1 attack-info))
|
||||
(set! (-> self water flags) (logand -65537 (-> self water flags)))
|
||||
(logclear! (-> self water flags) (water-flags wt16))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(let ((gp-0 (-> self attack-info)))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
@@ -996,7 +995,7 @@
|
||||
)
|
||||
)
|
||||
(when (= arg0 'attack)
|
||||
(logior! (-> self state-flags) 8)
|
||||
(logior! (-> self state-flags) (state-flags sf03))
|
||||
(set! (-> self game hit-time) (-> *display* base-frame-counter))
|
||||
(case (-> gp-0 mode)
|
||||
(('endlessfall)
|
||||
@@ -1080,7 +1079,7 @@
|
||||
(none)
|
||||
)
|
||||
:post
|
||||
(the-as (function none :behavior target) target-post)
|
||||
target-post
|
||||
)
|
||||
|
||||
(define *death-spool-array*
|
||||
@@ -1139,7 +1138,7 @@
|
||||
(send-event *camera* 'joystick 0.0 -1.0)
|
||||
(TODO-RENAME-9 (-> self align))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector)))
|
||||
(when (zero? (logand (-> self align flags) 1))
|
||||
(when (zero? (logand (-> self align flags) (align-flags algf00)))
|
||||
(vector-matrix*! s5-0 (the-as vector (-> self align delta)) (-> self control unknown-matrix01))
|
||||
(vector-float*! (-> self control transv) s5-0 (-> *display* frames-per-second))
|
||||
)
|
||||
@@ -1195,7 +1194,7 @@
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(set! (-> self state-flags) (logand -32777 (-> self state-flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf03 sf15))
|
||||
(target-exit)
|
||||
(clear-pending-settings-from-process *setting-control* self 'process-mask)
|
||||
(clear-pending-settings-from-process *setting-control* self 'allow-progress)
|
||||
@@ -1225,7 +1224,7 @@
|
||||
(set-setting! *setting-control* self 'process-mask 'set (the-as float 0.0) #x14a0000)
|
||||
(copy-settings-from-target! *setting-control*)
|
||||
(set! (-> self control transv quad) (the-as uint128 0))
|
||||
(logior! (-> self state-flags) #x8000)
|
||||
(logior! (-> self state-flags) (state-flags sf15))
|
||||
(case arg0
|
||||
(('none 'instant-death)
|
||||
)
|
||||
@@ -1242,7 +1241,7 @@
|
||||
)
|
||||
(('drown 'drown-death)
|
||||
(sound-play-by-name (static-sound-name "death-drown") (new-sound-id) 1024 0 0 1 #t)
|
||||
(set! (-> self water flags) (logand -17 (-> self water flags)))
|
||||
(logclear! (-> self water flags) (water-flags wt04))
|
||||
(clear-collide-with-as (-> self control))
|
||||
(set! (-> self control unknown-surface00) *dive-mods*)
|
||||
(set! (-> self control dynam gravity-max) 6144.0)
|
||||
@@ -1274,7 +1273,7 @@
|
||||
(when (if (and (nonzero? s5-1) (type-type? (-> s5-1 type) water-vol))
|
||||
s5-1
|
||||
)
|
||||
(set! (-> self state-flags) (logior #x80000 (-> self state-flags)))
|
||||
(set! (-> self state-flags) (logior (state-flags sf19) (-> self state-flags)))
|
||||
(set! (-> self alt-cam-pos y) (+ 4096.0 (-> self water height)))
|
||||
)
|
||||
)
|
||||
@@ -1318,7 +1317,7 @@
|
||||
(sound-play-by-name (static-sound-name "death-fall") (new-sound-id) 1024 0 0 1 #t)
|
||||
(camera-change-to (the-as string cam-endlessfall) 30 #f)
|
||||
(set! (-> self control pat-ignore-mask unknown-bit) 1)
|
||||
(set! (-> self water flags) (logand -17 (-> self water flags)))
|
||||
(logclear! (-> self water flags) (water-flags wt04))
|
||||
(let ((f30-2 (fmin -4096.0 (- (-> self control ground-impact-vel)))))
|
||||
(set! (-> self control unknown-uint20) (the-as uint f30-2))
|
||||
(let ((gp-11 (new-stack-vector0)))
|
||||
@@ -1500,7 +1499,7 @@
|
||||
(set-setting! *setting-control* self 'allow-progress #f (the-as float 0.0) 0)
|
||||
(target-death-anim gp-18)
|
||||
(when (and (< (rand-vu-int-count (-> *game-info* death-movie-tick)) (* (-> *death-spool-array* length) 2))
|
||||
(zero? (logand (-> self water flags) 512))
|
||||
(zero? (logand (-> self water flags) (water-flags wt09)))
|
||||
(!= (-> self control ground-pat material) 9)
|
||||
(!= (-> self control ground-pat material) 10)
|
||||
)
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
(define-extern target-exit (function none :behavior target))
|
||||
(define-extern target-generic-event-handler (function process int symbol event-message-block object :behavior target))
|
||||
(define-extern init-sidekick (function none :behavior sidekick))
|
||||
(define-extern racer-collision-reaction (function control-info collide-shape-intersect vector vector uint))
|
||||
(define-extern racer-collision-reaction (function control-info collide-shape-intersect vector vector cshape-moving-flags))
|
||||
(define-extern start-sequence-a (function none))
|
||||
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
object
|
||||
(cond
|
||||
((= v1-0 'get-pickup)
|
||||
(when (zero? (logand (-> self state-flags) #x8000))
|
||||
(when (zero? (logand (-> self state-flags) (state-flags sf15)))
|
||||
(let ((s4-0 (-> arg3 param 0))
|
||||
(f28-0 (the-as float (-> arg3 param 1)))
|
||||
)
|
||||
@@ -133,24 +133,24 @@
|
||||
(case (-> arg3 param 0)
|
||||
(('save)
|
||||
(set! (-> self alt-cam-pos quad) (-> self control trans quad))
|
||||
(set! (-> self state-flags) (logior #x20000 (-> self state-flags)))
|
||||
(set! (-> self state-flags) (logior (state-flags sf17) (-> self state-flags)))
|
||||
(mem-copy! (the-as pointer (-> arg3 param 1)) (the-as pointer (-> self control trans)) 48)
|
||||
)
|
||||
(('restore)
|
||||
(set! (-> self state-flags) (logand -131073 (-> self state-flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf17))
|
||||
(let ((gp-1 (-> arg3 param 1)))
|
||||
(move-to-point! (-> self control) (the-as vector (+ gp-1 0)))
|
||||
(quaternion-copy! (-> self control quat) (the-as quaternion (+ gp-1 16)))
|
||||
)
|
||||
(rot->dir-targ! (-> self control))
|
||||
(logior! (-> self control status) 7)
|
||||
(logior! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(set! v0-0 (the-as object (-> *display* base-frame-counter)))
|
||||
(set! (-> self control unknown-dword11) (the-as int v0-0))
|
||||
(set! (-> self control unknown-dword11) (the-as time-frame v0-0))
|
||||
v0-0
|
||||
)
|
||||
(('reset)
|
||||
(set! v0-0 (the-as object (logand -131073 (-> self state-flags))))
|
||||
(set! (-> self state-flags) (the-as uint v0-0))
|
||||
(set! v0-0 (the-as object (logclear (-> self state-flags) (state-flags sf17))))
|
||||
(set! (-> self state-flags) (the-as state-flags v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
@@ -173,13 +173,13 @@
|
||||
(set! (-> self neck flex-blend) (the-as float (-> arg3 param 0)))
|
||||
(cond
|
||||
((-> arg3 param 1)
|
||||
(set! (-> self state-flags) (logior #x40000 (-> self state-flags)))
|
||||
(set! (-> self state-flags) (logior (state-flags sf18) (-> self state-flags)))
|
||||
(set! (-> self alt-neck-pos quad) (-> (the-as vector (-> arg3 param 1)) quad))
|
||||
(look-at-enemy! (-> self neck) (-> self alt-neck-pos) 'force arg0)
|
||||
)
|
||||
(else
|
||||
(set! v0-0 (the-as object (logand -262145 (-> self state-flags))))
|
||||
(set! (-> self state-flags) (the-as uint v0-0))
|
||||
(set! v0-0 (the-as object (logclear (-> self state-flags) (state-flags sf18))))
|
||||
(set! (-> self state-flags) (the-as state-flags v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
@@ -230,13 +230,13 @@
|
||||
(cond
|
||||
((-> arg3 param 0)
|
||||
(let ((v1-108 (-> self draw shadow-ctrl)))
|
||||
(set! (-> v1-108 settings flags) (logand -33 (-> v1-108 settings flags)))
|
||||
(logclear! (-> v1-108 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
)
|
||||
(else
|
||||
(let ((v1-110 (-> self draw shadow-ctrl)))
|
||||
(logior! (-> v1-110 settings flags) 32)
|
||||
(logior! (-> v1-110 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
)
|
||||
@@ -316,10 +316,11 @@
|
||||
(set! (-> s5-0 attacker) (process->handle arg2))
|
||||
(set! (-> s5-0 shove-back) arg0)
|
||||
(set! (-> s5-0 shove-up) arg1)
|
||||
(set! (-> s5-0 angle) (if (zero? (logand (logior (-> self control status) (-> self control old-status)) 1))
|
||||
'air
|
||||
'shove
|
||||
)
|
||||
(set! (-> s5-0 angle)
|
||||
(if (zero? (logand (logior (-> self control status) (-> self control old-status)) (cshape-moving-flags onsurf)))
|
||||
'air
|
||||
'shove
|
||||
)
|
||||
)
|
||||
(set! (-> s5-0 mask) (the-as uint 2248))
|
||||
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.1))
|
||||
@@ -338,15 +339,15 @@
|
||||
)
|
||||
|
||||
(defbehavior target-attacked target ((arg0 symbol) (arg1 attack-info) (arg2 process) (arg3 process) (arg4 (state symbol attack-info target)))
|
||||
(when (zero? (logand (-> self state-flags) 8))
|
||||
(when (zero? (logand (-> self state-flags) (state-flags sf03)))
|
||||
(cond
|
||||
((or (logtest? (-> self state-flags) 112)
|
||||
((or (logtest? (-> self state-flags) (state-flags sf04 sf05 sf06))
|
||||
(and (logtest? (-> arg1 mask) 32)
|
||||
(= (-> arg1 mode) 'darkeco)
|
||||
(and (and (= (-> self fact-info-target eco-type) (pickup-type eco-red))
|
||||
(>= (-> self fact-info-target eco-level) 1.0)
|
||||
)
|
||||
(logtest? #x100002 (-> self state-flags))
|
||||
(logtest? (state-flags sf01 sf20) (-> self state-flags))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -435,9 +436,9 @@
|
||||
#t
|
||||
)
|
||||
(else
|
||||
(logior! (-> self state-flags) 8)
|
||||
(logior! (-> self state-flags) (state-flags sf03))
|
||||
(if (and (= (-> self game mode) 'play) (and (>= 1.0 (-> self fact-info-target health)) (= arg0 'attack)))
|
||||
(logior! (-> self state-flags) #x8000)
|
||||
(logior! (-> self state-flags) (state-flags sf15))
|
||||
)
|
||||
(go arg4 arg0 (-> self attack-info-rec))
|
||||
)
|
||||
@@ -771,8 +772,8 @@
|
||||
)
|
||||
|
||||
(defbehavior target-apply-tongue target ((arg0 vector))
|
||||
(when (zero? (logand (-> self state-flags) 8))
|
||||
(logior! (-> self state-flags) #x7000)
|
||||
(when (zero? (logand (-> self state-flags) (state-flags sf03)))
|
||||
(logior! (-> self state-flags) (state-flags sf12 sf13 sf14))
|
||||
(let ((gp-1 (vector-! (new 'stack-no-clear 'vector) arg0 (-> self control trans))))
|
||||
(set! (-> self control unknown-float41) (lerp-scale
|
||||
(-> *TARGET-bank* tongue-pull-speed-min)
|
||||
@@ -829,15 +830,16 @@
|
||||
)
|
||||
)
|
||||
(('loading)
|
||||
(if (not
|
||||
(or (and (logtest? (-> self control unknown-surface00 flags) 2048) (zero? (logand (-> self control status) 1)))
|
||||
(or (logtest? (-> self water flags) 512)
|
||||
(logtest? (-> self state-flags) #x830e)
|
||||
(logtest? (-> self control root-prim prim-core action) (collide-action ca-7 ca-8 ca-9 ca-12 ca-13 ca-14))
|
||||
(>= (-> self no-load-wait) (-> *display* base-frame-counter))
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (not (or (and (logtest? (-> self control unknown-surface00 flags) (surface-flags surf11))
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
(or (logtest? (-> self water flags) (water-flags wt09))
|
||||
(logtest? (-> self state-flags) (state-flags sf01 sf02 sf03 sf08 sf09 sf15))
|
||||
(logtest? (-> self control root-prim prim-core action) (collide-action ca-7 ca-8 ca-9 ca-12 ca-13 ca-14))
|
||||
(>= (-> self no-load-wait) (-> *display* base-frame-counter))
|
||||
)
|
||||
)
|
||||
)
|
||||
(go target-load-wait)
|
||||
)
|
||||
)
|
||||
@@ -865,12 +867,14 @@
|
||||
(go target-snowball-start (process->handle (the-as process (-> arg3 param 1))))
|
||||
)
|
||||
(('tube)
|
||||
(if (and (logtest? (-> self control status) 1) (zero? (logand (-> self water flags) 512)))
|
||||
(if (and (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(zero? (logand (-> self water flags) (water-flags wt09)))
|
||||
)
|
||||
(go target-tube-start (process->handle (the-as process (-> arg3 param 1))))
|
||||
)
|
||||
)
|
||||
(('periscope)
|
||||
(if (logtest? (-> self control status) 1)
|
||||
(if (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(go target-periscope (process->handle (the-as process (-> arg3 param 1))))
|
||||
)
|
||||
)
|
||||
@@ -904,7 +908,7 @@
|
||||
(if (not (or (= (-> self control unknown-surface00 mode) 'swim)
|
||||
(= (-> self control unknown-surface00 mode) 'dive)
|
||||
(= (-> self next-state name) 'target-hit)
|
||||
(logtest? (-> self state-flags) 8)
|
||||
(logtest? (-> self state-flags) (state-flags sf03))
|
||||
)
|
||||
)
|
||||
(go target-swim-stance)
|
||||
@@ -1014,7 +1018,7 @@
|
||||
(-> self control unknown-dword50)
|
||||
(-> self control unknown-dword51)
|
||||
)
|
||||
(zero? (logand (-> self state-flags) #x8008))
|
||||
(zero? (logand (-> self state-flags) (state-flags sf03 sf15)))
|
||||
)
|
||||
(set! (-> self control unknown-vector52 quad) (-> self control trans quad))
|
||||
(target-timed-invulnerable (seconds 0.1) self)
|
||||
@@ -1080,16 +1084,16 @@ target-standard-event-handler
|
||||
(set! (-> self control unknown-vector11 quad) (the-as uint128 0))
|
||||
(set! (-> self control unknown-float41) 0.0)
|
||||
(set! (-> self control unknown-float81) 0.0)
|
||||
(set! (-> self state-flags) (logand -1835917 (-> self state-flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf02 sf03 sf07 sf08 sf09 sf18 sf19 sf20))
|
||||
(target-danger-set! 'harmless #f)
|
||||
(logior! (-> self water flags) 16)
|
||||
(set! (-> self water flags) (logand -65537 (-> self water flags)))
|
||||
(logior! (-> self water flags) (water-flags wt04))
|
||||
(logclear! (-> self water flags) (water-flags wt16))
|
||||
(set! (-> self water drip-mult) 1.0)
|
||||
(set! (-> self neck flex-blend) 1.0)
|
||||
(set! (-> self control unknown-float91) 0.0)
|
||||
(logclear! (-> self draw status) (draw-status hidden))
|
||||
(logclear! (-> self skel status) (janim-status spool))
|
||||
(set! (-> self control status) (logand -16385 (-> self control status)))
|
||||
(logclear! (-> self control status) (cshape-moving-flags csmf14))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
(-> *TARGET-bank* root-radius)
|
||||
)
|
||||
(set! (-> self control unknown-symbol30) arg0)
|
||||
(set! (-> self state-flags) (logand -3 (-> self state-flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf01))
|
||||
(set! (-> s4-0 transform-index) -2)
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-kind))
|
||||
(set! (-> s4-0 collide-with) (collide-kind))
|
||||
@@ -260,7 +260,7 @@
|
||||
(new 'static 'vector :y 6553.6 :w 1.0)
|
||||
9830.4
|
||||
)
|
||||
(logior! (-> self state-flags) 2)
|
||||
(logior! (-> self state-flags) (state-flags sf01))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-kind target target-attack))
|
||||
(set! (-> s4-0 collide-with)
|
||||
(collide-kind cak-1 cak-2 cak-3 powerup crate enemy wall-object ground-object mother-spider)
|
||||
@@ -277,7 +277,7 @@
|
||||
(new 'static 'vector :y 6553.6 :w 1.0)
|
||||
10649.6
|
||||
)
|
||||
(logior! (-> self state-flags) 2)
|
||||
(logior! (-> self state-flags) (state-flags sf01))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-kind target target-attack))
|
||||
(set! (-> s4-0 collide-with)
|
||||
(collide-kind cak-1 cak-2 cak-3 powerup crate enemy wall-object ground-object mother-spider)
|
||||
@@ -295,7 +295,7 @@
|
||||
(set! (-> s5-0 transform-index) 32)
|
||||
)
|
||||
(('duck-slide)
|
||||
(logior! (-> self state-flags) 2)
|
||||
(logior! (-> self state-flags) (state-flags sf01))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-kind target target-attack))
|
||||
(set! (-> s4-0 collide-with)
|
||||
(collide-kind cak-1 cak-2 cak-3 powerup crate enemy wall-object ground-object mother-spider)
|
||||
@@ -313,7 +313,7 @@
|
||||
(set! (-> s5-0 transform-index) 28)
|
||||
)
|
||||
(('wheel-solid)
|
||||
(logior! (-> self state-flags) 2)
|
||||
(logior! (-> self state-flags) (state-flags sf01))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-kind target target-attack))
|
||||
(set! (-> s4-0 collide-with)
|
||||
(collide-kind cak-1 cak-2 cak-3 powerup crate enemy wall-object ground-object mother-spider)
|
||||
@@ -335,7 +335,7 @@
|
||||
(set! (-> self control unknown-symbol30) 'roll)
|
||||
)
|
||||
(('flip)
|
||||
(logior! (-> self state-flags) 2)
|
||||
(logior! (-> self state-flags) (state-flags sf01))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-kind target target-attack))
|
||||
(set! (-> s4-0 collide-with)
|
||||
(collide-kind cak-1 cak-2 cak-3 powerup crate enemy wall-object ground-object mother-spider)
|
||||
@@ -362,7 +362,7 @@
|
||||
(new 'static 'vector :y 6553.6 :w 1.0)
|
||||
11878.4
|
||||
)
|
||||
(logior! (-> self state-flags) 2)
|
||||
(logior! (-> self state-flags) (state-flags sf01))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-kind target target-attack))
|
||||
(set! (-> s4-0 collide-with)
|
||||
(collide-kind cak-1 cak-2 cak-3 powerup crate enemy wall-object ground-object mother-spider)
|
||||
@@ -385,7 +385,7 @@
|
||||
(new 'static 'vector :y 6553.6 :w 1.0)
|
||||
11878.4
|
||||
)
|
||||
(logior! (-> self state-flags) 2)
|
||||
(logior! (-> self state-flags) (state-flags sf01))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-kind target target-attack))
|
||||
(set! (-> s4-0 collide-with)
|
||||
(collide-kind cak-1 cak-2 cak-3 powerup crate enemy wall-object ground-object mother-spider)
|
||||
@@ -412,7 +412,7 @@
|
||||
)
|
||||
)
|
||||
(('flop)
|
||||
(logior! (-> self state-flags) 2)
|
||||
(logior! (-> self state-flags) (state-flags sf01))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-kind target target-attack))
|
||||
(set! (-> s4-0 collide-with)
|
||||
(collide-kind cak-1 cak-2 cak-3 powerup crate enemy wall-object ground-object mother-spider)
|
||||
@@ -429,7 +429,7 @@
|
||||
(set! (-> self control unknown-symbol30) 'flop)
|
||||
)
|
||||
(('flop-down)
|
||||
(logior! (-> self state-flags) 2)
|
||||
(logior! (-> self state-flags) (state-flags sf01))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-kind target target-attack))
|
||||
(set! (-> s4-0 collide-with)
|
||||
(collide-kind cak-1 cak-2 cak-3 powerup crate enemy wall-object ground-object mother-spider)
|
||||
@@ -462,7 +462,7 @@
|
||||
(new 'static 'vector :y 6553.6 :w 1.0)
|
||||
12288.0
|
||||
)
|
||||
(logior! (-> self state-flags) 2)
|
||||
(logior! (-> self state-flags) (state-flags sf01))
|
||||
(set! (-> s4-0 prim-core collide-as) (collide-kind target target-attack))
|
||||
(set! (-> s4-0 collide-with)
|
||||
(collide-kind cak-1 cak-2 cak-3 powerup crate enemy wall-object ground-object mother-spider)
|
||||
@@ -730,18 +730,20 @@
|
||||
(not (-> *setting-control* current spooling))
|
||||
(not (-> *setting-control* current movie))
|
||||
(not (-> *setting-control* current hint))
|
||||
(zero? (logand (-> self control status) 32))
|
||||
(zero? (logand (-> self water flags) 512))
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags t-act)))
|
||||
(zero? (logand (-> self water flags) (water-flags wt09)))
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior can-jump? target ((arg0 symbol))
|
||||
(and (or (logtest? (-> self control status) 1)
|
||||
(and (or (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(< (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *TARGET-bank* ground-timeout))
|
||||
(and (logtest? (-> self control status) 1) (< 0.866 (-> self control surface-angle)))
|
||||
(and (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(< 0.866 (-> self control surface-angle))
|
||||
)
|
||||
)
|
||||
(and (zero? (logand (-> self control unknown-surface01 flags) 64))
|
||||
(zero? (logand (-> self state-flags) 2048))
|
||||
(and (zero? (logand (-> self control unknown-surface01 flags) (surface-flags surf06)))
|
||||
(zero? (logand (-> self state-flags) (state-flags sf11)))
|
||||
(case arg0
|
||||
(('target-wheel-flip)
|
||||
(>= 0.5 (-> self control unknown-float61))
|
||||
@@ -763,7 +765,7 @@
|
||||
)
|
||||
|
||||
(defbehavior fall-test target ()
|
||||
(when (and (zero? (logand (-> self control status) 1))
|
||||
(when (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *TARGET-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-15 (if (> (-> self skel active-channels) 0)
|
||||
@@ -781,7 +783,7 @@
|
||||
)
|
||||
)
|
||||
(when (and (< (- (-> *display* base-frame-counter) (-> self control rider-time)) (-> *TARGET-bank* ground-timeout))
|
||||
(logtest? (-> self control unknown-surface01 flags) #x4000)
|
||||
(logtest? (-> self control unknown-surface01 flags) (surface-flags surf14))
|
||||
)
|
||||
(+! (-> self control transv x) (-> self control rider-last-move x))
|
||||
(+! (-> self control transv z) (-> self control rider-last-move z))
|
||||
@@ -792,9 +794,9 @@
|
||||
)
|
||||
|
||||
(defbehavior slide-down-test target ()
|
||||
(if (and (zero? (logand (-> self control status) 129))
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf csmf07)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *TARGET-bank* ground-timeout))
|
||||
(logtest? (-> self control status) 4)
|
||||
(logtest? (-> self control status) (cshape-moving-flags tsurf))
|
||||
(< 0.5 (-> self control surface-angle))
|
||||
)
|
||||
(go target-slide-down)
|
||||
@@ -803,26 +805,29 @@
|
||||
)
|
||||
|
||||
(defbehavior smack-surface? target ((arg0 symbol))
|
||||
(and (< 0.7 (-> self control touch-angle)) (and (< (-> self control surface-angle) 0.3)
|
||||
(logtest? (-> self control status) 8)
|
||||
(or arg0 (zero? (logand (-> self control status) 32)))
|
||||
)
|
||||
(and (< 0.7 (-> self control touch-angle))
|
||||
(and (< (-> self control surface-angle) 0.3)
|
||||
(logtest? (-> self control status) (cshape-moving-flags twall))
|
||||
(or arg0 (zero? (logand (-> self control status) (cshape-moving-flags t-act))))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior can-wheel? target ()
|
||||
(and (logtest? (-> self control status) 1)
|
||||
(or (zero? (logand (-> self control status) 8)) (>= 0.7 (-> self control touch-angle)))
|
||||
(and (< (-> self control unknown-float61) 0.7) (zero? (logand (-> self state-flags) 8192)))
|
||||
(and (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(or (zero? (logand (-> self control status) (cshape-moving-flags twall)))
|
||||
(>= 0.7 (-> self control touch-angle))
|
||||
)
|
||||
(and (< (-> self control unknown-float61) 0.7) (zero? (logand (-> self state-flags) (state-flags sf13))))
|
||||
)
|
||||
)
|
||||
|
||||
(defbehavior can-duck? target ()
|
||||
(and (logtest? (-> self control status) 1)
|
||||
(and (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(>= (-> self control unknown-float60) 0.7)
|
||||
(zero? (logand (-> self water flags) 6144))
|
||||
(zero? (logand (-> self state-flags) 8192))
|
||||
(or (zero? (logand (-> self water flags) 1024))
|
||||
(zero? (logand (-> self water flags) (water-flags wt11 wt12)))
|
||||
(zero? (logand (-> self state-flags) (state-flags sf13)))
|
||||
(or (zero? (logand (-> self water flags) (water-flags wt10)))
|
||||
(< (- (- (-> self control trans y) (- (-> self water base-height) (-> self water wade-height)))) 2457.6)
|
||||
)
|
||||
)
|
||||
@@ -860,15 +865,15 @@
|
||||
(pad-buttons square)
|
||||
)
|
||||
)
|
||||
(or (and (logtest? (-> self state-flags) 4096)
|
||||
(or (zero? (logand (-> self state-flags) #x4000))
|
||||
(or (and (logtest? (-> self state-flags) (state-flags sf12))
|
||||
(or (zero? (logand (-> self state-flags) (state-flags sf14)))
|
||||
(not (and (= (-> self fact-info-target eco-type) (pickup-type eco-yellow))
|
||||
(>= (-> self fact-info-target eco-level) 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(logtest? (-> self control unknown-surface01 flags) 384)
|
||||
(logtest? (-> self control unknown-surface01 flags) (surface-flags surf07 surf08))
|
||||
)
|
||||
)
|
||||
#f
|
||||
@@ -900,7 +905,9 @@
|
||||
|
||||
(defbehavior can-feet? target ()
|
||||
(cond
|
||||
((or (logtest? (-> self state-flags) 4096) (logtest? (-> self control unknown-surface01 flags) 640))
|
||||
((or (logtest? (-> self state-flags) (state-flags sf12))
|
||||
(logtest? (-> self control unknown-surface01 flags) (surface-flags surf07 surf09))
|
||||
)
|
||||
#f
|
||||
)
|
||||
((>= (- (-> *display* base-frame-counter) (-> *TARGET-bank* attack-timeout)) (-> self control unknown-dword33))
|
||||
@@ -975,7 +982,7 @@
|
||||
)
|
||||
|
||||
(defun target-timed-invulnerable ((arg0 time-frame) (arg1 target))
|
||||
(logior! (-> arg1 state-flags) 32)
|
||||
(logior! (-> arg1 state-flags) (state-flags sf05))
|
||||
(set! (-> arg1 control unknown-dword80) (-> *display* base-frame-counter))
|
||||
(set! (-> arg1 control unknown-dword81) arg0)
|
||||
(set-collide-kinds (-> arg1 control) 2 (collide-kind target-attack) (collide-kind))
|
||||
@@ -985,7 +992,7 @@
|
||||
|
||||
(defun target-timed-invulnerable-off ((arg0 target))
|
||||
(logclear! (-> arg0 draw status) (draw-status hidden))
|
||||
(set! (-> arg0 state-flags) (logand -33 (-> arg0 state-flags)))
|
||||
(logclear! (-> arg0 state-flags) (state-flags sf05))
|
||||
(set-collide-kinds (-> arg0 control) 2 (collide-kind) (collide-kind target-attack))
|
||||
0
|
||||
(none)
|
||||
@@ -1163,7 +1170,7 @@
|
||||
((not gp-0)
|
||||
(camera-pos)
|
||||
)
|
||||
((logtest? (-> gp-0 state-flags) 1024)
|
||||
((logtest? (-> gp-0 state-flags) (state-flags sf10))
|
||||
(add-debug-sphere
|
||||
*display-camera-marks*
|
||||
(bucket-id debug-no-zbuf)
|
||||
@@ -1173,7 +1180,7 @@
|
||||
)
|
||||
(-> gp-0 alt-cam-pos)
|
||||
)
|
||||
((logtest? #x20000 (-> gp-0 state-flags))
|
||||
((logtest? (state-flags sf17) (-> gp-0 state-flags))
|
||||
(add-debug-sphere
|
||||
*display-camera-marks*
|
||||
(bucket-id debug-no-zbuf)
|
||||
@@ -1183,7 +1190,7 @@
|
||||
)
|
||||
(-> gp-0 alt-cam-pos)
|
||||
)
|
||||
((logtest? #x80000 (-> gp-0 state-flags))
|
||||
((logtest? (state-flags sf19) (-> gp-0 state-flags))
|
||||
(let ((s5-0 (the-as object (new 'static 'vector))))
|
||||
(set! (-> (the-as vector s5-0) quad) (-> (&-> (-> gp-0 control) unknown-qword00) 0))
|
||||
(set! (-> (the-as vector s5-0) y) (fmax (-> (the-as vector s5-0) y) (-> gp-0 alt-cam-pos y)))
|
||||
|
||||
@@ -147,12 +147,13 @@
|
||||
(b! #t cfg-23 :delay (nop!))
|
||||
(label cfg-7)
|
||||
(cond
|
||||
((and (logtest? (-> self control status) 1) (not (= (if (> (-> self skel active-channels) 0)
|
||||
(-> self skel root-channel 0 frame-group)
|
||||
)
|
||||
(-> self draw art-group data 35)
|
||||
)
|
||||
)
|
||||
((and (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(not (= (if (> (-> self skel active-channels) 0)
|
||||
(-> self skel root-channel 0 frame-group)
|
||||
)
|
||||
(-> self draw art-group data 35)
|
||||
)
|
||||
)
|
||||
)
|
||||
(ja-channel-push! 1 6)
|
||||
(let ((v1-21 (-> self skel root-channel 0)))
|
||||
@@ -198,14 +199,14 @@
|
||||
)
|
||||
(pad-buttons x)
|
||||
)
|
||||
(zero? (logand (-> self water flags) 512))
|
||||
(zero? (logand (-> self water flags) (water-flags wt09)))
|
||||
(< (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 3))
|
||||
(zero? (logand (-> self state-flags) 2048))
|
||||
(zero? (logand (-> self state-flags) (state-flags sf11)))
|
||||
)
|
||||
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f))
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> self control status) 1)
|
||||
(if (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(go target-hit-ground #f)
|
||||
)
|
||||
(when (if (and (< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance))
|
||||
@@ -215,7 +216,7 @@
|
||||
)
|
||||
#t
|
||||
)
|
||||
(logior! (-> self control status) 1)
|
||||
(logior! (-> self control status) (cshape-moving-flags onsurf))
|
||||
(go target-hit-ground 'stuck)
|
||||
)
|
||||
(if (!= (-> self state-time) (-> *display* base-frame-counter))
|
||||
@@ -599,7 +600,7 @@
|
||||
:trans
|
||||
(behavior ()
|
||||
((-> self state-hook))
|
||||
(if (logtest? (-> self water flags) 1024)
|
||||
(if (logtest? (-> self water flags) (water-flags wt10))
|
||||
(go target-wade-stance)
|
||||
)
|
||||
(when (= (-> self control ground-pat material) (pat-material ice))
|
||||
@@ -1625,7 +1626,7 @@
|
||||
(if (can-hands? #t)
|
||||
(go target-running-attack)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) 1))
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (seconds 0.08))
|
||||
)
|
||||
(go target-falling #f)
|
||||
@@ -1683,12 +1684,12 @@
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
(when (or (logtest? (-> self control status) 1)
|
||||
(when (or (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(if (< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance))
|
||||
#t
|
||||
)
|
||||
)
|
||||
(logior! (-> self control status) 1)
|
||||
(logior! (-> self control status) (cshape-moving-flags onsurf))
|
||||
(go target-duck-stance)
|
||||
)
|
||||
(none)
|
||||
@@ -1729,7 +1730,7 @@
|
||||
)
|
||||
|
||||
(defbehavior init-var-jump target ((arg0 float) (arg1 float) (arg2 vector) (arg3 vector) (arg4 vector))
|
||||
(set! (-> self control status) (logand -16385 (-> self control status)))
|
||||
(logclear! (-> self control status) (cshape-moving-flags csmf14))
|
||||
(delete-back-vel)
|
||||
(when (< (- (-> *display* base-frame-counter) (-> self control rider-time)) (seconds 0.05))
|
||||
(let ((f0-1
|
||||
@@ -1742,7 +1743,7 @@
|
||||
(set! arg0 (+ arg0 f0-1))
|
||||
(set! arg1 (+ arg1 f0-1))
|
||||
)
|
||||
(when (or (logtest? (-> self control unknown-surface01 flags) #x4000)
|
||||
(when (or (logtest? (-> self control unknown-surface01 flags) (surface-flags surf14))
|
||||
(= (-> self control poly-pat material) (pat-material rotate))
|
||||
)
|
||||
(+! (-> self control transv x) (-> self control rider-last-move x))
|
||||
@@ -1910,10 +1911,9 @@
|
||||
:trans
|
||||
(behavior ()
|
||||
((-> self state-hook))
|
||||
(if (and (or (zero?
|
||||
(logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1 r1))
|
||||
)
|
||||
(logtest? (-> self state-flags) 8192)
|
||||
(if (and (or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1 r1))
|
||||
)
|
||||
(logtest? (-> self state-flags) (state-flags sf13))
|
||||
)
|
||||
(let ((v1-13 (if (> (-> self skel active-channels) 0)
|
||||
(-> self skel root-channel 0 frame-group)
|
||||
@@ -2064,11 +2064,10 @@
|
||||
:trans
|
||||
(behavior ()
|
||||
((-> self state-hook))
|
||||
(if (and (or (zero?
|
||||
(logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1 r1))
|
||||
)
|
||||
(logtest? (-> self state-flags) 8192)
|
||||
(and (logtest? (-> self water flags) 1024)
|
||||
(if (and (or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1 r1))
|
||||
)
|
||||
(logtest? (-> self state-flags) (state-flags sf13))
|
||||
(and (logtest? (-> self water flags) (water-flags wt10))
|
||||
(>= (- (- (-> self control trans y) (- (-> self water base-height) (-> self water wade-height)))) 2457.6)
|
||||
)
|
||||
)
|
||||
@@ -2213,7 +2212,7 @@
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(sound-play-by-name (static-sound-name "jump") (new-sound-id) 716 0 0 1 #t)
|
||||
(init-var-jump arg0 arg1 (the-as vector #t) (the-as vector #t) (-> self control transv))
|
||||
(set! (-> self control status) (logand -8 (-> self control status)))
|
||||
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(set! arg2 (cond
|
||||
(arg2
|
||||
(empty)
|
||||
@@ -2256,8 +2255,8 @@
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) x)
|
||||
(< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 12288.0)
|
||||
(and (< -61440.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(zero? (logand (-> self water flags) 512))
|
||||
(zero? (logand (-> self state-flags) 2048))
|
||||
(zero? (logand (-> self water flags) (water-flags wt09)))
|
||||
(zero? (logand (-> self state-flags) (state-flags sf11)))
|
||||
)
|
||||
)
|
||||
(go target-double-jump (-> *TARGET-bank* double-jump-height-min) (-> *TARGET-bank* double-jump-height-max))
|
||||
@@ -2268,8 +2267,8 @@
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
(zero? (logand (-> self state-flags) 4096))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) 384))
|
||||
(zero? (logand (-> self state-flags) (state-flags sf12)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags surf07 surf08)))
|
||||
)
|
||||
)
|
||||
(go
|
||||
@@ -2438,7 +2437,7 @@
|
||||
)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(init-var-jump arg0 arg1 (the-as vector #t) (the-as vector #t) (-> self control transv))
|
||||
(set! (-> self control status) (logand -8 (-> self control status)))
|
||||
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(set! (-> self control unknown-surface00) *double-jump-mods*)
|
||||
(none)
|
||||
)
|
||||
@@ -2462,8 +2461,8 @@
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
(zero? (logand (-> self state-flags) 4096))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) 384))
|
||||
(zero? (logand (-> self state-flags) (state-flags sf12)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags surf07 surf08)))
|
||||
)
|
||||
)
|
||||
(go
|
||||
@@ -2549,7 +2548,7 @@
|
||||
(go target-duck-high-jump arg0 arg1 (the-as symbol arg2))
|
||||
)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self control status) (logand -8 (-> self control status)))
|
||||
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(sound-play-by-name (static-sound-name "jump") (new-sound-id) 1024 457 0 1 #t)
|
||||
(init-var-jump arg0 arg1 (the-as vector #t) (the-as vector #t) (-> self control transv))
|
||||
(set! (-> self control unknown-surface00) (cond
|
||||
@@ -2595,8 +2594,8 @@
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
(zero? (logand (-> self state-flags) 4096))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) 384))
|
||||
(zero? (logand (-> self state-flags) (state-flags sf12)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags surf07 surf08)))
|
||||
)
|
||||
)
|
||||
(go
|
||||
@@ -2630,7 +2629,7 @@
|
||||
:enter
|
||||
(behavior ((arg0 float) (arg1 float) (arg2 symbol))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self control status) (logand -8 (-> self control status)))
|
||||
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(set! (-> self control unknown-surface00) *turn-around-mods*)
|
||||
(none)
|
||||
)
|
||||
@@ -2699,7 +2698,7 @@
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(sound-play-by-name (static-sound-name "jump") (new-sound-id) 819 -609 0 1 #t)
|
||||
(init-var-jump arg0 arg1 (the-as vector #t) (the-as vector #f) (-> self control transv))
|
||||
(set! (-> self control status) (logand -8 (-> self control status)))
|
||||
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(cond
|
||||
((= arg2 'launch)
|
||||
(set! (-> self neck flex-blend) 0.0)
|
||||
@@ -2857,7 +2856,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (< (-> *TARGET-bank* fall-far) f0-1) (zero? (logand (-> self control status) 1024)))
|
||||
(if (and (< (-> *TARGET-bank* fall-far) f0-1)
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags on-water)))
|
||||
)
|
||||
(go target-hit-ground-hard f0-1)
|
||||
)
|
||||
)
|
||||
@@ -2910,7 +2911,7 @@
|
||||
(go target-duck-stance)
|
||||
)
|
||||
(when (!= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0)
|
||||
(if (logtest? (-> self water flags) 1024)
|
||||
(if (logtest? (-> self water flags) (water-flags wt10))
|
||||
(go target-wade-walk)
|
||||
(go target-walk)
|
||||
)
|
||||
@@ -3107,7 +3108,9 @@
|
||||
(behavior ()
|
||||
(when (!= (-> self state-time) (-> *display* base-frame-counter))
|
||||
(if (and (or (smack-surface? #t)
|
||||
(and (>= (-> self control unknown-float63) 0.7) (zero? (logand (-> self control status) 32)))
|
||||
(and (>= (-> self control unknown-float63) 0.7)
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags t-act)))
|
||||
)
|
||||
)
|
||||
(begin
|
||||
(set! (-> self control unknown-int21) (the-as int (-> *display* base-frame-counter)))
|
||||
@@ -3147,14 +3150,13 @@
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) x)
|
||||
(and (< 4096.0 (-> self control unknown-float01))
|
||||
(or (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.1))
|
||||
(zero?
|
||||
(logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0)
|
||||
(pad-buttons square)
|
||||
)
|
||||
)
|
||||
(zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0)
|
||||
(pad-buttons square)
|
||||
)
|
||||
)
|
||||
)
|
||||
(zero? (logand (-> self state-flags) 6144))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) 128))
|
||||
(zero? (logand (-> self state-flags) (state-flags sf11 sf12)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags surf07)))
|
||||
)
|
||||
)
|
||||
(go
|
||||
@@ -3163,7 +3165,7 @@
|
||||
(-> *TARGET-bank* attack-jump-height-max)
|
||||
)
|
||||
)
|
||||
(if (and (logtest? (-> self water flags) 512)
|
||||
(if (and (logtest? (-> self water flags) (water-flags wt09))
|
||||
(zero? (mod (- (-> *display* base-frame-counter) (-> self state-time)) 21))
|
||||
)
|
||||
(dummy-13
|
||||
@@ -3192,7 +3194,7 @@
|
||||
)
|
||||
:code
|
||||
(behavior ()
|
||||
(if (logtest? (-> self water flags) 512)
|
||||
(if (logtest? (-> self water flags) (water-flags wt09))
|
||||
(sound-play-by-name (static-sound-name "swim-stroke") (new-sound-id) 1024 0 0 1 #t)
|
||||
)
|
||||
(ja-channel-push! 1 6)
|
||||
@@ -3215,7 +3217,7 @@
|
||||
(when (not (ja-min? 0))
|
||||
(cond
|
||||
((and (>= (ja-aframe-num 0) 20.0)
|
||||
(and (and (zero? (logand (-> self control status) 1))
|
||||
(and (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *TARGET-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-39 (if (> (-> self skel active-channels) 0)
|
||||
@@ -3223,12 +3225,11 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(or (not
|
||||
(or (= v1-39 (-> self draw art-group data 59))
|
||||
(= v1-39 (-> self draw art-group data 60))
|
||||
(= v1-39 (-> self draw art-group data 61))
|
||||
)
|
||||
)
|
||||
(or (not (or (= v1-39 (-> self draw art-group data 59))
|
||||
(= v1-39 (-> self draw art-group data 60))
|
||||
(= v1-39 (-> self draw art-group data 61))
|
||||
)
|
||||
)
|
||||
(< 4096.0 (target-height-above-ground))
|
||||
)
|
||||
)
|
||||
@@ -3289,7 +3290,7 @@
|
||||
(+! gp-2 1)
|
||||
)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) 1))
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *TARGET-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-121 (if (> (-> self skel active-channels) 0)
|
||||
@@ -3333,7 +3334,7 @@
|
||||
:enter
|
||||
(behavior ((arg0 symbol))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self control status) (logand -8 (-> self control status)))
|
||||
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(target-start-attack)
|
||||
(target-danger-set! 'spin-air #f)
|
||||
(set! (-> self control unknown-surface00) *jump-attack-mods*)
|
||||
@@ -3411,7 +3412,7 @@
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
(when (logtest? (-> self control status) 1)
|
||||
(when (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(set-quaternion! (-> self control) (-> self control dir-targ))
|
||||
(go target-hit-ground #f)
|
||||
)
|
||||
@@ -3479,11 +3480,10 @@
|
||||
(let ((f0-8 (target-height-above-ground))
|
||||
(f1-1 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
)
|
||||
(while (not
|
||||
(or (and (< (fabs (/ f0-8 (* 0.0033333334 f1-1))) 150.0) (< f1-1 0.0))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 1.7))
|
||||
)
|
||||
)
|
||||
(while (not (or (and (< (fabs (/ f0-8 (* 0.0033333334 f1-1))) 150.0) (< f1-1 0.0))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 1.7))
|
||||
)
|
||||
)
|
||||
(quaternion-rotate-y!
|
||||
(-> self control unknown-quaternion00)
|
||||
(-> self control unknown-quaternion00)
|
||||
@@ -3608,7 +3608,7 @@
|
||||
)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(init-var-jump arg0 arg1 (the-as vector #t) (the-as vector #f) (-> self control transv))
|
||||
(set! (-> self control status) (logand -8 (-> self control status)))
|
||||
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(set! (-> self control unknown-surface00) *uppercut-jump-mods*)
|
||||
(target-start-attack)
|
||||
(target-danger-set! 'uppercut #f)
|
||||
@@ -3618,7 +3618,7 @@
|
||||
target-exit
|
||||
:trans
|
||||
(behavior ()
|
||||
(if (logtest? (-> self control status) 1)
|
||||
(if (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(go target-hit-ground #f)
|
||||
)
|
||||
(when (and (cpad-pressed? (-> self control unknown-cpad-info00 number) square)
|
||||
@@ -3627,8 +3627,8 @@
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
(zero? (logand (-> self state-flags) 4096))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) 384))
|
||||
(zero? (logand (-> self state-flags) (state-flags sf12)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags surf07 surf08)))
|
||||
)
|
||||
)
|
||||
(set-quaternion! (-> self control) (-> self control dir-targ))
|
||||
@@ -3755,7 +3755,7 @@
|
||||
(set-forward-vel (-> self control unknown-float01))
|
||||
)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self control status) (logand -8 (-> self control status)))
|
||||
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(set! (-> self control unknown-surface00) *flop-mods*)
|
||||
(set! (-> self control unknown-uint20) (the-as uint 0))
|
||||
(set! (-> self control dynam gravity-max) 245760.0)
|
||||
@@ -3789,7 +3789,7 @@
|
||||
:trans
|
||||
(behavior ()
|
||||
(delete-back-vel)
|
||||
(let ((gp-1 (logtest? (-> self control status) 1)))
|
||||
(let ((gp-1 (logtest? (-> self control status) (cshape-moving-flags onsurf))))
|
||||
(when (and (not gp-1) (let ((v1-6 (if (> (-> self skel active-channels) 0)
|
||||
(-> self skel root-channel 0 frame-group)
|
||||
)
|
||||
@@ -3799,9 +3799,9 @@
|
||||
)
|
||||
)
|
||||
(when (and (or (< (target-move-dist (seconds 0.1)) 1638.4)
|
||||
(and (logtest? (-> self control status) 8) (< 0.7 (-> self control poly-angle)))
|
||||
(and (logtest? (-> self control status) (cshape-moving-flags twall)) (< 0.7 (-> self control poly-angle)))
|
||||
)
|
||||
(zero? (logand (-> self control status) 32))
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags t-act)))
|
||||
(>= (-> self control unknown-uint20) (the-as uint 2))
|
||||
)
|
||||
(set! (-> self control unknown-dword36) (-> *display* base-frame-counter))
|
||||
@@ -3809,7 +3809,7 @@
|
||||
)
|
||||
)
|
||||
(when gp-1
|
||||
(logior! (-> self control status) 1)
|
||||
(logior! (-> self control status) (cshape-moving-flags onsurf))
|
||||
(when (and (= (-> self fact-info-target eco-type) (pickup-type eco-red))
|
||||
(>= (-> self fact-info-target eco-level) 1.0)
|
||||
)
|
||||
@@ -4055,8 +4055,8 @@
|
||||
(set! (-> self control unknown-uint20) (the-as uint arg0))
|
||||
(set-forward-vel (the-as float 0.0))
|
||||
(set! (-> self control unknown-surface00) *flop-land-mods*)
|
||||
(set! (-> *flop-land-mods* flags) (logand -1025 (-> *flop-land-mods* flags)))
|
||||
(set! (-> self state-flags) (logior #x100000 (-> self state-flags)))
|
||||
(logclear! (-> *flop-land-mods* flags) (surface-flags surf10))
|
||||
(set! (-> self state-flags) (logior (state-flags sf20) (-> self state-flags)))
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
@@ -4092,7 +4092,7 @@
|
||||
(if (and (or (= v1-33 (-> self draw art-group data 65)) (= v1-33 (-> self draw art-group data 68)))
|
||||
(>= (ja-aframe-num 0) 28.0)
|
||||
)
|
||||
(logior! (-> *flop-land-mods* flags) 1024)
|
||||
(logior! (-> *flop-land-mods* flags) (surface-flags surf10))
|
||||
)
|
||||
)
|
||||
(slide-down-test)
|
||||
@@ -4296,7 +4296,9 @@
|
||||
(set! (-> s4-0 frame-num) 0.0)
|
||||
)
|
||||
(let ((f30-0 1.0))
|
||||
(until (or (ja-max? 0) (and (>= (ja-aframe-num 0) 4.0) (logtest? (-> self control status) 1)))
|
||||
(until (or (ja-max? 0)
|
||||
(and (>= (ja-aframe-num 0) 4.0) (logtest? (-> self control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
(when (and (>= (ja-aframe-num 0) 3.0) (not (-> self control unknown-symbol30)))
|
||||
(set! (-> self event-hook) target-dangerous-event-handler)
|
||||
(target-start-attack)
|
||||
@@ -4334,7 +4336,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(while (zero? (logand (-> self control status) 1))
|
||||
(while (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.01))
|
||||
(when (not (= (if (> (-> self skel active-channels) 0)
|
||||
(-> self skel root-channel 0 frame-group)
|
||||
|
||||
@@ -556,7 +556,7 @@
|
||||
(behavior ()
|
||||
(set! (-> self cam-user-mode) 'look-around)
|
||||
(set! (-> self control unknown-surface00) *duck-mods*)
|
||||
(logior! (-> self state-flags) 512)
|
||||
(logior! (-> self state-flags) (state-flags sf09))
|
||||
(send-event *camera* 'blend-from-as-fixed)
|
||||
(send-event *camera* 'no-intro)
|
||||
(camera-change-to (the-as string 'cam-eye) 60 #f)
|
||||
@@ -740,7 +740,7 @@
|
||||
(behavior ()
|
||||
(set! (-> self neck flex-blend) 0.0)
|
||||
(set! (-> self control unknown-surface00) *duck-mods*)
|
||||
(logior! (-> self state-flags) 512)
|
||||
(logior! (-> self state-flags) (state-flags sf09))
|
||||
(send-event *camera* 'blend-from-as-fixed)
|
||||
(send-event *camera* 'clear-entity)
|
||||
(send-event *camera* 'no-intro)
|
||||
@@ -916,13 +916,13 @@
|
||||
(behavior ()
|
||||
(set! (-> self control unknown-surface00) *grab-mods*)
|
||||
(set! (-> self neck flex-blend) 0.0)
|
||||
(logior! (-> self state-flags) 272)
|
||||
(logior! (-> self state-flags) (state-flags sf04 sf08))
|
||||
(set! (-> self control unknown-uint20) (the-as uint 'stance))
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(set! (-> self state-flags) (logand -17 (-> self state-flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf04))
|
||||
(target-exit)
|
||||
(none)
|
||||
)
|
||||
@@ -930,7 +930,7 @@
|
||||
(behavior ()
|
||||
(set-forward-vel (the-as float (-> (new 'static 'array int32 1 0) 0)))
|
||||
(let ((gp-0 0))
|
||||
(while (zero? (logand (-> self control status) 1))
|
||||
(while (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(target-falling-anim-trans)
|
||||
(+! gp-0 (- (-> *display* base-frame-counter) (-> *display* old-base-frame-counter)))
|
||||
(suspend)
|
||||
@@ -1133,7 +1133,7 @@
|
||||
)
|
||||
:post
|
||||
(behavior ()
|
||||
(if (logtest? (-> self control status) 1)
|
||||
(if (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(set! (-> self control transv quad) (the-as uint128 0))
|
||||
)
|
||||
(target-no-stick-post)
|
||||
@@ -1178,7 +1178,7 @@
|
||||
)
|
||||
(pad-buttons x)
|
||||
)
|
||||
(zero? (logand (-> self state-flags) 2048))
|
||||
(zero? (logand (-> self state-flags) (state-flags sf11)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.1))
|
||||
)
|
||||
(set! (-> self control transv quad) (the-as uint128 0))
|
||||
@@ -1201,7 +1201,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self control status) (logand -8 (-> self control status)))
|
||||
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(go target-falling 'target-pole-cycle)
|
||||
)
|
||||
((>= (ja-aframe-num 0) 14.0)
|
||||
@@ -1502,7 +1502,7 @@
|
||||
)
|
||||
(pad-buttons x)
|
||||
)
|
||||
(zero? (logand (-> self state-flags) 2048))
|
||||
(zero? (logand (-> self state-flags) (state-flags sf11)))
|
||||
)
|
||||
(cond
|
||||
((or (< -0.2 (local-pad-angle))
|
||||
@@ -1680,7 +1680,7 @@
|
||||
(until (ja-done? 0)
|
||||
(target-compute-edge-rider)
|
||||
(TODO-RENAME-9 (-> self align))
|
||||
(when (zero? (logand (-> self align flags) 1))
|
||||
(when (zero? (logand (-> self align flags) (align-flags algf00)))
|
||||
(vector-matrix*! s4-0 (the-as vector (-> self align delta)) (-> self control unknown-matrix01))
|
||||
(move-by-vector! (-> self control) s4-0)
|
||||
)
|
||||
@@ -1723,7 +1723,7 @@
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(TODO-RENAME-9 (-> self align))
|
||||
(when (zero? (logand (-> self align flags) 1))
|
||||
(when (zero? (logand (-> self align flags) (align-flags algf00)))
|
||||
(vector-matrix*! gp-0 (the-as vector (-> self align delta)) (-> self control unknown-matrix01))
|
||||
(move-by-vector! (-> self control) gp-0)
|
||||
)
|
||||
@@ -1739,7 +1739,7 @@
|
||||
(logclear! (-> self control root-prim prim-core action) (collide-action ca-3 ca-7))
|
||||
(vector-float*! (-> self control transv) (-> self control unknown-vector101) -40960.0)
|
||||
(when (and (< (- (-> *display* base-frame-counter) (-> self control rider-time)) (seconds 0.2))
|
||||
(or (logtest? (-> self control unknown-surface01 flags) #x4000)
|
||||
(or (logtest? (-> self control unknown-surface01 flags) (surface-flags surf14))
|
||||
(= (-> self control poly-pat material) (pat-material rotate))
|
||||
)
|
||||
)
|
||||
@@ -1892,7 +1892,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> self control status) 1)
|
||||
(if (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(go target-stance)
|
||||
(go target-falling #f)
|
||||
)
|
||||
@@ -1922,7 +1922,7 @@
|
||||
:slope-up-traction 1.0
|
||||
:align-speed 1.0
|
||||
:mode 'air
|
||||
:flags #x800
|
||||
:flags (surface-flags surf11)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -2044,7 +2044,7 @@
|
||||
(joint-control-channel-group-eval! a0-22 (the-as art-joint-anim #f) num-func-seek!)
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> self control status) 1)
|
||||
(if (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(go target-stance)
|
||||
(go target-falling #f)
|
||||
)
|
||||
@@ -2103,8 +2103,8 @@
|
||||
)
|
||||
(pad-buttons x)
|
||||
)
|
||||
(zero? (logand (-> self water flags) 512))
|
||||
(zero? (logand (-> self state-flags) 2048))
|
||||
(zero? (logand (-> self water flags) (water-flags wt09)))
|
||||
(zero? (logand (-> self state-flags) (state-flags sf11)))
|
||||
)
|
||||
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f))
|
||||
)
|
||||
@@ -2173,10 +2173,10 @@
|
||||
:trans
|
||||
(behavior ()
|
||||
((-> self state-hook))
|
||||
(when (and (zero? (logand (-> self water flags) 1024))
|
||||
(when (and (zero? (logand (-> self water flags) (water-flags wt10)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self water wade-time)) (seconds 0.05))
|
||||
)
|
||||
(if (logtest? (-> self water flags) 2048)
|
||||
(if (logtest? (-> self water flags) (water-flags wt11))
|
||||
(go target-swim-stance)
|
||||
(go target-stance)
|
||||
)
|
||||
@@ -2224,10 +2224,10 @@
|
||||
:trans
|
||||
(behavior ()
|
||||
((-> self state-hook))
|
||||
(when (and (zero? (logand (-> self water flags) 1024))
|
||||
(when (and (zero? (logand (-> self water flags) (water-flags wt10)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self water wade-time)) (seconds 0.1))
|
||||
)
|
||||
(if (logtest? (-> self water flags) 2048)
|
||||
(if (logtest? (-> self water flags) (water-flags wt11))
|
||||
(go target-swim-stance)
|
||||
(go target-stance)
|
||||
)
|
||||
@@ -2555,7 +2555,7 @@
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self control unknown-surface00) *swim-mods*)
|
||||
(logior! (-> self water flags) 16)
|
||||
(logior! (-> self water flags) (water-flags wt04))
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
@@ -2577,13 +2577,15 @@
|
||||
:trans
|
||||
(behavior ()
|
||||
((-> self state-hook))
|
||||
(if (and (logtest? (-> self control status) 1) (zero? (logand (-> self control status) 1024)))
|
||||
(if (and (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags on-water)))
|
||||
)
|
||||
(set-zero! (-> self water bob))
|
||||
)
|
||||
(when (and (zero? (logand (-> self water flags) 2048))
|
||||
(when (and (zero? (logand (-> self water flags) (water-flags wt11)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.1))
|
||||
)
|
||||
(if (logtest? (-> self water flags) 1024)
|
||||
(if (logtest? (-> self water flags) (water-flags wt10))
|
||||
(go target-wade-stance)
|
||||
(go target-stance)
|
||||
)
|
||||
@@ -2728,13 +2730,15 @@
|
||||
:trans
|
||||
(behavior ()
|
||||
((-> self state-hook))
|
||||
(if (and (logtest? (-> self control status) 1) (zero? (logand (-> self control status) 1024)))
|
||||
(if (and (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags on-water)))
|
||||
)
|
||||
(set-zero! (-> self water bob))
|
||||
)
|
||||
(when (and (zero? (logand (-> self water flags) 2048))
|
||||
(when (and (zero? (logand (-> self water flags) (water-flags wt11)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self water swim-time)) (seconds 0.1))
|
||||
)
|
||||
(if (logtest? (-> self water flags) 1024)
|
||||
(if (logtest? (-> self water flags) (water-flags wt10))
|
||||
(go target-wade-stance)
|
||||
(go target-stance)
|
||||
)
|
||||
@@ -2813,7 +2817,7 @@
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(TODO-RENAME-9 (-> self align))
|
||||
(if (zero? (logand (-> self align flags) 1))
|
||||
(if (zero? (logand (-> self align flags) (align-flags algf00)))
|
||||
(set! (-> self control unknown-surface00 target-speed)
|
||||
(* (-> self align delta trans z) (-> self control unknown-surface01 alignv) (-> *display* frames-per-second))
|
||||
)
|
||||
@@ -2843,7 +2847,7 @@
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(TODO-RENAME-9 (-> self align))
|
||||
(if (zero? (logand (-> self align flags) 1))
|
||||
(if (zero? (logand (-> self align flags) (align-flags algf00)))
|
||||
(set! (-> self control unknown-surface00 target-speed)
|
||||
(* (-> self align delta trans z) (-> self control unknown-surface01 alignv) (-> *display* frames-per-second))
|
||||
)
|
||||
@@ -2884,7 +2888,7 @@
|
||||
:enter
|
||||
(behavior ()
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self water flags) (logand -17 (-> self water flags)))
|
||||
(logclear! (-> self water flags) (water-flags wt04))
|
||||
(set! (-> self control unknown-surface00) *dive-mods*)
|
||||
(set! (-> self control dynam gravity-max) 16384.0)
|
||||
(set! (-> self control dynam gravity-length) 16384.0)
|
||||
@@ -3044,7 +3048,7 @@
|
||||
(go target-swim-up)
|
||||
)
|
||||
(if (or (>= (- (-> *display* base-frame-counter) (-> self state-time)) s5-0)
|
||||
(and (logtest? (-> self control status) 1)
|
||||
(and (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(and (< (-> self water swim-depth) 8192.0)
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) gp-0)
|
||||
)
|
||||
@@ -3101,8 +3105,8 @@
|
||||
:trans
|
||||
(behavior ()
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) x)
|
||||
(zero? (logand (-> self state-flags) 2048))
|
||||
(zero? (logand (-> self water flags) #x6000))
|
||||
(zero? (logand (-> self state-flags) (state-flags sf11)))
|
||||
(zero? (logand (-> self water flags) (water-flags wt13 wt14)))
|
||||
)
|
||||
(go
|
||||
target-swim-jump-jump
|
||||
@@ -3154,7 +3158,7 @@
|
||||
(the-as float (-> (new 'static 'array int32 1 0) 0))
|
||||
(the-as float 0.1)
|
||||
)
|
||||
(if (and (zero? (logand (-> self water flags) 4096))
|
||||
(if (and (zero? (logand (-> self water flags) (water-flags wt12)))
|
||||
(or (>= (ja-aframe-num 0) 222.0)
|
||||
(and (!= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0)
|
||||
(>= (ja-aframe-num 0) 200.0)
|
||||
@@ -3164,8 +3168,8 @@
|
||||
(goto cfg-37)
|
||||
)
|
||||
(TODO-RENAME-9 (-> self align))
|
||||
(when (zero? (logand (-> self water flags) 4096))
|
||||
(logior! (-> self water flags) 16)
|
||||
(when (zero? (logand (-> self water flags) (water-flags wt12)))
|
||||
(logior! (-> self water flags) (water-flags wt04))
|
||||
(set! gp-0 #f)
|
||||
)
|
||||
(if gp-0
|
||||
@@ -3198,14 +3202,14 @@
|
||||
(the-as float (-> (new 'static 'array int32 1 0) 0))
|
||||
(the-as float 0.1)
|
||||
)
|
||||
(if (zero? (logand (-> self water flags) 4096))
|
||||
(if (zero? (logand (-> self water flags) (water-flags wt12)))
|
||||
(goto cfg-37)
|
||||
)
|
||||
(if (cpad-pressed? (-> self control unknown-cpad-info00 number) x)
|
||||
(set! f30-0 2.0)
|
||||
)
|
||||
(TODO-RENAME-9 (-> self align))
|
||||
(when (logtest? (-> self water flags) 4096)
|
||||
(when (logtest? (-> self water flags) (water-flags wt12))
|
||||
(TODO-RENAME-10 (-> self align) 2 (the-as float 1.0) (the-as float 1.0) (the-as float 1.0))
|
||||
(set! (-> self control transv y) (+ 8192.0 (* 8192.0 f30-0)))
|
||||
)
|
||||
@@ -3218,7 +3222,7 @@
|
||||
)
|
||||
)
|
||||
(label cfg-37)
|
||||
(logior! (-> self water flags) 16)
|
||||
(logior! (-> self water flags) (water-flags wt04))
|
||||
(set! (-> self water swim-time) (-> *display* base-frame-counter))
|
||||
(start-bobbing! (-> self water) (the-as float -4096.0) 600 1500)
|
||||
(set! (-> self water bob start-time) (+ (-> *display* base-frame-counter) (seconds -0.05)))
|
||||
@@ -3240,8 +3244,8 @@
|
||||
(behavior ()
|
||||
(cond
|
||||
((< (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.5))
|
||||
(set! (-> self water flags) (logior #x10000 (-> self water flags)))
|
||||
(set! (-> self control status) (logand -8 (-> self control status)))
|
||||
(set! (-> self water flags) (logior (water-flags wt16) (-> self water flags)))
|
||||
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
)
|
||||
(else
|
||||
(set! (-> self trans-hook) (-> target-jump trans))
|
||||
@@ -3266,7 +3270,7 @@
|
||||
((-> target-swim-stance exit))
|
||||
(die-on-next-update! (-> self water bob))
|
||||
(set! (-> self water align-offset) 0.0)
|
||||
(set! (-> self water flags) (logior #x10000 (-> self water flags)))
|
||||
(set! (-> self water flags) (logior (water-flags wt16) (-> self water flags)))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
@@ -3283,7 +3287,7 @@
|
||||
)
|
||||
(until (and (ja-done? 0) (= (-> self skel root-channel 0) (-> self skel channel)))
|
||||
(TODO-RENAME-9 (-> self align))
|
||||
(if (zero? (logand (-> self align flags) 1))
|
||||
(if (zero? (logand (-> self align flags) (align-flags algf00)))
|
||||
(+! (-> self water align-offset) (* 0.6 (-> self align delta trans y)))
|
||||
)
|
||||
(suspend)
|
||||
@@ -3541,15 +3545,15 @@
|
||||
(behavior ()
|
||||
(target-exit)
|
||||
(set! (-> self cam-user-mode) 'normal)
|
||||
(logior! (-> self state-flags) 256)
|
||||
(set! (-> self state-flags) (logand -17 (-> self state-flags)))
|
||||
(logior! (-> self state-flags) (state-flags sf08))
|
||||
(logclear! (-> self state-flags) (state-flags sf04))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
(behavior ((arg0 handle))
|
||||
(set! (-> self neck flex-blend) 0.0)
|
||||
(target-exit)
|
||||
(logior! (-> self state-flags) 144)
|
||||
(logior! (-> self state-flags) (state-flags sf04 sf07))
|
||||
(let ((v1-4 (handle->process arg0)))
|
||||
(if v1-4
|
||||
(quaterion<-rotate-y-vector (-> self control dir-targ) (vector-!
|
||||
@@ -3620,7 +3624,7 @@
|
||||
#f
|
||||
(-> self control root-prim collide-with)
|
||||
)
|
||||
(logior! (-> self state-flags) 256)
|
||||
(logior! (-> self state-flags) (state-flags sf08))
|
||||
(set! (-> self neck flex-blend) 0.0)
|
||||
(none)
|
||||
)
|
||||
@@ -3675,7 +3679,7 @@
|
||||
(set! (-> self control unknown-vector102 quad) (-> self control trans quad))
|
||||
(set! (-> self control unknown-uint20) (the-as uint #t))
|
||||
(quaternion-copy! (the-as quaternion (-> self control unknown-vector103)) (-> self control quat))
|
||||
(logior! (-> self state-flags) 256)
|
||||
(logior! (-> self state-flags) (state-flags sf08))
|
||||
(vector-reset! (-> self control transv))
|
||||
(set! (-> self neck flex-blend) 0.0)
|
||||
(send-event (ppointer->process (-> self sidekick)) 'shadow #t)
|
||||
@@ -3702,7 +3706,7 @@
|
||||
#t
|
||||
(-> self control root-prim collide-with)
|
||||
)
|
||||
(when (logtest? (-> self control status) 1024)
|
||||
(when (logtest? (-> self control status) (cshape-moving-flags on-water))
|
||||
(let ((a1-6 (new-stack-vector0)))
|
||||
(set! (-> a1-6 x) (-> self control trans x))
|
||||
(set! (-> a1-6 y) (-> self water height))
|
||||
@@ -3720,7 +3724,7 @@
|
||||
)
|
||||
)
|
||||
(rot->dir-targ! (-> self control))
|
||||
(logior! (-> self control status) 7)
|
||||
(logior! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(set! (-> self control unknown-dword11) (-> *display* base-frame-counter))
|
||||
(ja-channel-set! 0)
|
||||
(ja-post)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
(not (movie?))
|
||||
(>= (- (-> *display* base-frame-counter) (-> *game-info* letterbox-time)) (seconds 0.1))
|
||||
(>= (- (-> *display* base-frame-counter) (-> *game-info* blackout-time)) (seconds 0.1))
|
||||
(not (and *target* (logtest? (-> *target* state-flags) 256)))
|
||||
(not (and *target* (logtest? (-> *target* state-flags) (state-flags sf08))))
|
||||
)
|
||||
)
|
||||
(when (or (!= (-> obj value) arg0)
|
||||
|
||||
@@ -229,6 +229,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defsmacro cons! (lst obj) `(set! ,lst (cons ,obj ,lst)))
|
||||
|
||||
(desfun append! (lst obj)
|
||||
"adds obj to the end of lst. only edits inplace if lst is not null."
|
||||
@@ -285,6 +286,14 @@
|
||||
`(type? 'integer ,x)
|
||||
)
|
||||
|
||||
(defsmacro number? (x)
|
||||
`(or (float? ,x) (integer? ,x))
|
||||
)
|
||||
|
||||
(defsmacro != (a b) `(not (= ,a ,b)))
|
||||
(defsmacro zero? (x) `(= ,x 0))
|
||||
(defsmacro nonzero? (x) `(!= ,x 0))
|
||||
|
||||
(defsmacro pair? (x)
|
||||
`(type? 'pair ,x)
|
||||
)
|
||||
|
||||
@@ -816,7 +816,7 @@
|
||||
)
|
||||
(while (< s5-0 2)
|
||||
(cond
|
||||
((logtest? (-> self root-override status) 1)
|
||||
((logtest? (-> self root-override status) (cshape-moving-flags onsurf))
|
||||
(when (not gp-0)
|
||||
(+! s5-0 1)
|
||||
(set! f30-0 0.8)
|
||||
@@ -850,7 +850,7 @@
|
||||
)
|
||||
(while (< 2048.0 (vector-length (-> self root-override transv)))
|
||||
(cond
|
||||
((logtest? (-> self root-override status) 1)
|
||||
((logtest? (-> self root-override status) (cshape-moving-flags onsurf))
|
||||
(vector-float*! (-> self root-override transv) (-> self root-override transv) 0.8)
|
||||
)
|
||||
(else
|
||||
@@ -1344,7 +1344,7 @@
|
||||
)
|
||||
(suspend)
|
||||
(set! v1-25 (and (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.5))
|
||||
(logtest? (-> self root-override status) 1)
|
||||
(logtest? (-> self root-override status) (cshape-moving-flags onsurf))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -616,9 +616,7 @@
|
||||
((sp-flt spt-fade-a -0.014222222))
|
||||
)
|
||||
|
||||
(define sound-beach-waterfall
|
||||
(new 'static 'sound-spec :num 1.0 :group #x1 :sound-name (static-sound-name "waterfall") :volume #x400)
|
||||
)
|
||||
(define sound-beach-waterfall (static-sound-spec "waterfall"))
|
||||
|
||||
(defpartgroup group-beach-butterflies
|
||||
:id 171
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
)
|
||||
)
|
||||
0
|
||||
(set! (-> v1-1 settings flags) (logand -9 (-> v1-1 settings flags)))
|
||||
(logclear! (-> v1-1 settings flags) (shadow-flags shdf03))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
@@ -47,16 +47,19 @@
|
||||
(defmethod draw-npc-shadow bird-lady ((obj bird-lady))
|
||||
(-> obj draw shadow-ctrl)
|
||||
(cond
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status was-drawn)))
|
||||
((and (-> obj draw shadow)
|
||||
(zero? (-> obj draw cur-lod))
|
||||
(logtest? (-> obj draw status) (draw-status was-drawn))
|
||||
)
|
||||
(let ((v1-9 (-> obj draw shadow-ctrl)))
|
||||
(set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags)))
|
||||
(logclear! (-> v1-9 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(update-direction-from-time-of-day (-> obj draw shadow-ctrl))
|
||||
)
|
||||
(else
|
||||
(let ((v1-14 (-> obj draw shadow-ctrl)))
|
||||
(logior! (-> v1-14 settings flags) 32)
|
||||
(logior! (-> v1-14 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
@@ -485,7 +485,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
(if (logtest? (-> *target* state-flags) #x80f8)
|
||||
(if (logtest? (-> *target* state-flags) (state-flags sf03 sf04 sf05 sf06 sf07 sf15))
|
||||
(go-virtual nav-enemy-victory)
|
||||
)
|
||||
(if (< (ja-aframe-num 0) 2.0)
|
||||
|
||||
@@ -44,16 +44,19 @@
|
||||
(defmethod draw-npc-shadow mayor ((obj mayor))
|
||||
(-> obj draw shadow-ctrl)
|
||||
(cond
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status was-drawn)))
|
||||
((and (-> obj draw shadow)
|
||||
(zero? (-> obj draw cur-lod))
|
||||
(logtest? (-> obj draw status) (draw-status was-drawn))
|
||||
)
|
||||
(let ((v1-9 (-> obj draw shadow-ctrl)))
|
||||
(set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags)))
|
||||
(logclear! (-> v1-9 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(update-direction-from-time-of-day (-> obj draw shadow-ctrl))
|
||||
)
|
||||
(else
|
||||
(let ((v1-14 (-> obj draw shadow-ctrl)))
|
||||
(set! (-> v1-14 settings flags) (logior (the-as int (-> v1-14 settings flags)) 32))
|
||||
(set! (-> v1-14 settings flags) (the-as shadow-flags (logior (the-as int (-> v1-14 settings flags)) 32)))
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
@@ -54,16 +54,19 @@
|
||||
(defmethod draw-npc-shadow sculptor ((obj sculptor))
|
||||
(-> obj draw shadow-ctrl)
|
||||
(cond
|
||||
((and (-> obj draw shadow) (zero? (-> obj draw cur-lod)) (logtest? (-> obj draw status) (draw-status was-drawn)))
|
||||
((and (-> obj draw shadow)
|
||||
(zero? (-> obj draw cur-lod))
|
||||
(logtest? (-> obj draw status) (draw-status was-drawn))
|
||||
)
|
||||
(let ((v1-9 (-> obj draw shadow-ctrl)))
|
||||
(set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags)))
|
||||
(logclear! (-> v1-9 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(update-direction-from-time-of-day (-> obj draw shadow-ctrl))
|
||||
)
|
||||
(else
|
||||
(let ((v1-14 (-> obj draw shadow-ctrl)))
|
||||
(logior! (-> v1-14 settings flags) 32)
|
||||
(logior! (-> v1-14 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
@@ -34,9 +34,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(define sound-seagull-squall
|
||||
(new 'static 'sound-spec :num 1.0 :group #x1 :sound-name (static-sound-name "seagulls-2") :volume #x400)
|
||||
)
|
||||
(define sound-seagull-squall (static-sound-spec "seagulls-2"))
|
||||
|
||||
(deftype seagull (process-drawable)
|
||||
((root-override collide-shape-moving :offset 112)
|
||||
@@ -1294,8 +1292,8 @@
|
||||
(set! (-> (the-as seagull s4-1) temp-heading-time) 300)
|
||||
)
|
||||
(let ((v0-2 (logior s5-0 3)))
|
||||
(set! (-> arg0 status) (the-as uint v0-2))
|
||||
(the-as uint v0-2)
|
||||
(set! (-> arg0 status) (the-as cshape-moving-flags v0-2))
|
||||
(the-as cshape-moving-flags v0-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -454,19 +454,8 @@
|
||||
)
|
||||
)
|
||||
(dummy-21 obj)
|
||||
(set! (-> obj sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "rotate-plat")
|
||||
:volume #x400
|
||||
:fo-max 20
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "rotate-plat" :fo-max 20) (-> obj root-override trans))
|
||||
)
|
||||
(logior! (-> obj skel status) (janim-status inited))
|
||||
(go citb-disc-idle)
|
||||
@@ -1068,19 +1057,8 @@
|
||||
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 601) obj))
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
(set! (-> obj shield-on) #t)
|
||||
(set! (-> obj sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "robotcage-lp")
|
||||
:volume #x400
|
||||
:fo-max #x96
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "robotcage-lp" :fo-max 150) (-> obj root-override trans))
|
||||
)
|
||||
(if (= (get-task-status (-> obj entity extra perm task)) (task-status invalid))
|
||||
(go citb-robotboss-die)
|
||||
@@ -1755,19 +1733,8 @@
|
||||
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 600) obj))
|
||||
(set! (-> obj part-broken) (create-launch-control (-> *part-group-id-table* 597) obj))
|
||||
(set! (-> obj part-mushroom) (create-launch-control (-> *part-group-id-table* 599) obj))
|
||||
(set! (-> obj sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "mushroom-gen")
|
||||
:volume #x400
|
||||
:fo-max 20
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "mushroom-gen" :fo-max 20) (-> obj root-override trans))
|
||||
)
|
||||
0
|
||||
(none)
|
||||
@@ -1956,7 +1923,7 @@
|
||||
)
|
||||
(send-event (handle->process (the-as handle gp-1)) 'mask 2048)
|
||||
(while (handle->process (the-as handle gp-1))
|
||||
(set! (-> *target* state-flags) (logand -17 (-> *target* state-flags)))
|
||||
(logclear! (-> *target* state-flags) (state-flags sf04))
|
||||
(suspend)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -216,19 +216,8 @@
|
||||
(set-vector! (-> obj bar-array 10) 0.0 f0-1 f1-0 1.0)
|
||||
(set-vector! (-> obj bar-array 11) f2-0 f0-1 f1-0 1.0)
|
||||
)
|
||||
(set! (-> obj sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "sagecage-gen")
|
||||
:volume #x400
|
||||
:fo-max 20
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "sagecage-gen" :fo-max 20) (-> obj root-override trans))
|
||||
)
|
||||
(set! (-> obj bars-on) (not (task-complete? *game-info* (-> obj entity extra perm task))))
|
||||
(citb-sagecage-update-collision)
|
||||
@@ -525,7 +514,7 @@
|
||||
(set! (-> a0-3 settings top-plane w) (- 4096.0))
|
||||
)
|
||||
0
|
||||
(set! (-> v1-1 settings flags) (logand -13 (-> v1-1 settings flags)))
|
||||
(logclear! (-> v1-1 settings flags) (shadow-flags shdf02 shdf03))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
@@ -539,14 +528,14 @@
|
||||
(logtest? (-> obj draw status) (draw-status was-drawn))
|
||||
)
|
||||
(let ((v1-9 (-> obj draw shadow-ctrl)))
|
||||
(set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags)))
|
||||
(logclear! (-> v1-9 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(update-direction-from-time-of-day (-> obj draw shadow-ctrl))
|
||||
)
|
||||
(else
|
||||
(let ((v1-14 (-> obj draw shadow-ctrl)))
|
||||
(logior! (-> v1-14 settings flags) 32)
|
||||
(logior! (-> v1-14 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
)
|
||||
@@ -642,7 +631,7 @@
|
||||
(set! (-> a0-3 settings top-plane w) (- 4096.0))
|
||||
)
|
||||
0
|
||||
(set! (-> v1-1 settings flags) (logand -13 (-> v1-1 settings flags)))
|
||||
(logclear! (-> v1-1 settings flags) (shadow-flags shdf02 shdf03))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
@@ -656,14 +645,14 @@
|
||||
(logtest? (-> obj draw status) (draw-status was-drawn))
|
||||
)
|
||||
(let ((v1-9 (-> obj draw shadow-ctrl)))
|
||||
(set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags)))
|
||||
(logclear! (-> v1-9 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(update-direction-from-time-of-day (-> obj draw shadow-ctrl))
|
||||
)
|
||||
(else
|
||||
(let ((v1-14 (-> obj draw shadow-ctrl)))
|
||||
(logior! (-> v1-14 settings flags) 32)
|
||||
(logior! (-> v1-14 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
)
|
||||
@@ -764,7 +753,7 @@
|
||||
(set! (-> a0-3 settings top-plane w) (- 4096.0))
|
||||
)
|
||||
0
|
||||
(set! (-> v1-1 settings flags) (logand -13 (-> v1-1 settings flags)))
|
||||
(logclear! (-> v1-1 settings flags) (shadow-flags shdf02 shdf03))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
@@ -778,14 +767,14 @@
|
||||
(logtest? (-> obj draw status) (draw-status was-drawn))
|
||||
)
|
||||
(let ((v1-9 (-> obj draw shadow-ctrl)))
|
||||
(set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags)))
|
||||
(logclear! (-> v1-9 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(update-direction-from-time-of-day (-> obj draw shadow-ctrl))
|
||||
)
|
||||
(else
|
||||
(let ((v1-14 (-> obj draw shadow-ctrl)))
|
||||
(logior! (-> v1-14 settings flags) 32)
|
||||
(logior! (-> v1-14 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
)
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
(defmethod TODO-RENAME-48 citb-bunny ((obj citb-bunny) (arg0 object))
|
||||
(dummy-60 obj)
|
||||
(TODO-RENAME-45 obj *citb-bunny-nav-enemy-info*)
|
||||
(set! (-> obj draw shadow-ctrl settings flags) (logand -9 (-> obj draw shadow-ctrl settings flags)))
|
||||
(logclear! (-> obj draw shadow-ctrl settings flags) (shadow-flags shdf03))
|
||||
(cond
|
||||
((zero? (res-lump-value (-> obj entity) 'mode uint128))
|
||||
(set! (-> obj defense) (the-as uint 1))
|
||||
|
||||
@@ -642,19 +642,8 @@
|
||||
(set! (-> obj idle-offset) 0.0)
|
||||
(set! (-> obj float-offset) (res-lump-float (-> obj entity) 'height-info :default 4096.0))
|
||||
(set! (-> obj float-height-offset) (-> obj idle-offset))
|
||||
(set! (-> obj sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "eco-plat-hover")
|
||||
:volume #x400
|
||||
:fo-max 50
|
||||
)
|
||||
(-> obj root-overlay trans)
|
||||
)
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "eco-plat-hover" :fo-max 50) (-> obj root-overlay trans))
|
||||
)
|
||||
(let ((s5-0 (-> obj info control-point-count)))
|
||||
(dotimes (s4-0 s5-0)
|
||||
@@ -835,19 +824,8 @@
|
||||
(defmethod dummy-22 citb-donut ((obj citb-donut))
|
||||
(initialize-skeleton obj *citb-donut-sg* '())
|
||||
(setup-params! (-> obj sync) (the-as uint 9000) 0.0 0.15 0.15)
|
||||
(set! (-> obj sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "rotate-plat")
|
||||
:volume #x400
|
||||
:fo-max 20
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "rotate-plat" :fo-max 20) (-> obj root-override trans))
|
||||
)
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
0
|
||||
|
||||
@@ -593,7 +593,7 @@
|
||||
:slope-up-traction 1.0
|
||||
:align-speed 1.0
|
||||
:mode 'air
|
||||
:flags #x20
|
||||
:flags (surface-flags surf05)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -615,20 +615,20 @@
|
||||
:enter
|
||||
(behavior ((arg0 vector) (arg1 vector))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self control status) (logand -8 (-> self control status)))
|
||||
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(set! (-> self control unknown-surface00) *warp-jump-mods*)
|
||||
(set! (-> self control unknown-vector102 quad) (-> arg0 quad))
|
||||
(set! (-> self control unknown-vector103 quad) (-> arg1 quad))
|
||||
(set! (-> self control unknown-vector102 y) (+ -4096.0 (-> self control unknown-vector102 y)))
|
||||
(set! (-> self control unknown-uint20) (the-as uint #f))
|
||||
(vector-reset! (-> self control transv))
|
||||
(logior! (-> self state-flags) 1024)
|
||||
(logior! (-> self state-flags) (state-flags sf10))
|
||||
(set! (-> self alt-cam-pos quad) (-> arg1 quad))
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(set! (-> self state-flags) (logand -1025 (-> self state-flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf10))
|
||||
(none)
|
||||
)
|
||||
:code
|
||||
|
||||
@@ -5,6 +5,43 @@
|
||||
;; name in dgo: baseplat
|
||||
;; dgos: GAME, COMMON, L1
|
||||
|
||||
(defenum eco-door-flags
|
||||
:bitfield #t
|
||||
:type int32
|
||||
(ecdf00)
|
||||
(ecdf01)
|
||||
(auto-close)
|
||||
(one-way)
|
||||
(ecdf04)
|
||||
(ecdf05)
|
||||
(ecdf06)
|
||||
(ecdf07)
|
||||
(ecdf08)
|
||||
(ecdf09)
|
||||
(ecdf10)
|
||||
(ecdf11)
|
||||
(ecdf12)
|
||||
(ecdf13)
|
||||
(ecdf14)
|
||||
(ecdf15)
|
||||
(ecdf16)
|
||||
(ecdf17)
|
||||
(ecdf18)
|
||||
(ecdf19)
|
||||
(ecdf20)
|
||||
(ecdf21)
|
||||
(ecdf22)
|
||||
(ecdf23)
|
||||
(ecdf24)
|
||||
(ecdf25)
|
||||
(ecdf26)
|
||||
(ecdf27)
|
||||
(ecdf28)
|
||||
(ecdf29)
|
||||
(ecdf30)
|
||||
(ecdf31)
|
||||
)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype baseplat (process-drawable)
|
||||
@@ -111,18 +148,18 @@
|
||||
)
|
||||
|
||||
(deftype eco-door (process-drawable)
|
||||
((root-override collide-shape :offset 112)
|
||||
(speed float :offset-assert 176)
|
||||
(open-distance float :offset-assert 180)
|
||||
(close-distance float :offset-assert 184)
|
||||
(out-dir vector :inline :offset-assert 192)
|
||||
(open-sound sound-name :offset-assert 208)
|
||||
(close-sound sound-name :offset-assert 224)
|
||||
(state-actor entity-actor :offset-assert 240)
|
||||
(flags int32 :offset-assert 244)
|
||||
(locked symbol :offset-assert 248)
|
||||
(auto-close symbol :offset-assert 252)
|
||||
(one-way symbol :offset-assert 256)
|
||||
((root-override collide-shape :offset 112)
|
||||
(speed float :offset-assert 176)
|
||||
(open-distance float :offset-assert 180)
|
||||
(close-distance float :offset-assert 184)
|
||||
(out-dir vector :inline :offset-assert 192)
|
||||
(open-sound sound-name :offset-assert 208)
|
||||
(close-sound sound-name :offset-assert 224)
|
||||
(state-actor entity-actor :offset-assert 240)
|
||||
(flags eco-door-flags :offset-assert 244)
|
||||
(locked symbol :offset-assert 248)
|
||||
(auto-close symbol :offset-assert 252)
|
||||
(one-way symbol :offset-assert 256)
|
||||
)
|
||||
:heap-base #xa0
|
||||
:method-count-assert 27
|
||||
@@ -323,8 +360,8 @@ eco-door-event-handler
|
||||
(defmethod dummy-26 eco-door ((obj eco-door))
|
||||
(when (-> obj state-actor)
|
||||
(if (logtest? (-> obj state-actor extra perm status) (entity-perm-status complete))
|
||||
(set! (-> obj locked) (logtest? (-> obj flags) 2))
|
||||
(set! (-> obj locked) (logtest? (-> obj flags) 1))
|
||||
(set! (-> obj locked) (logtest? (-> obj flags) (eco-door-flags ecdf01)))
|
||||
(set! (-> obj locked) (logtest? (-> obj flags) (eco-door-flags ecdf00)))
|
||||
)
|
||||
)
|
||||
0
|
||||
@@ -371,10 +408,10 @@ eco-door-event-handler
|
||||
)
|
||||
)
|
||||
(set! (-> obj locked) #f)
|
||||
(set! (-> obj flags) (res-lump-value arg0 'flags int))
|
||||
(set! (-> obj flags) (res-lump-value arg0 'flags eco-door-flags))
|
||||
(dummy-26 obj)
|
||||
(set! (-> obj auto-close) (logtest? (-> obj flags) 4))
|
||||
(set! (-> obj one-way) (logtest? (-> obj flags) 8))
|
||||
(set! (-> obj auto-close) (logtest? (-> obj flags) (eco-door-flags auto-close)))
|
||||
(set! (-> obj one-way) (logtest? (-> obj flags) (eco-door-flags one-way)))
|
||||
(vector-z-quaternion! (-> obj out-dir) (-> obj root-override quat))
|
||||
(set! (-> obj out-dir w) (- (vector-dot (-> obj out-dir) (-> obj root-override trans))))
|
||||
(update-transforms! (-> obj root-override))
|
||||
|
||||
@@ -93,25 +93,24 @@
|
||||
(let ((t9-0 (method-of-type water-anim TODO-RENAME-25)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(set! (-> obj flags) (logand -8388609 (-> obj flags)))
|
||||
(set! (-> obj flags) (logior #x1000000 (-> obj flags)))
|
||||
(let ((v0-1 ((the-as
|
||||
(function res-lump symbol symbol float structure (pointer res-tag) pointer object)
|
||||
(method-of-type res-lump get-property-struct)
|
||||
)
|
||||
(-> obj entity)
|
||||
'attack-event
|
||||
'interp
|
||||
-1000000000.0
|
||||
'dark-eco-pool
|
||||
(the-as (pointer res-tag) #f)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
(logclear! (-> obj flags) (water-flags wt23))
|
||||
(set! (-> obj flags) (logior (water-flags wt24) (-> obj flags)))
|
||||
(set! (-> obj attack-event)
|
||||
(the-as symbol ((the-as
|
||||
(function res-lump symbol symbol float structure (pointer res-tag) pointer object)
|
||||
(method-of-type res-lump get-property-struct)
|
||||
)
|
||||
(-> obj entity)
|
||||
'attack-event
|
||||
'interp
|
||||
-1000000000.0
|
||||
'dark-eco-pool
|
||||
(the-as (pointer res-tag) #f)
|
||||
*res-static-buf*
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj attack-event) (the-as symbol v0-1))
|
||||
v0-1
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-22 dark-eco-pool ((obj dark-eco-pool))
|
||||
|
||||
@@ -75,9 +75,10 @@
|
||||
|
||||
(defmethod common-post nav-enemy ((obj nav-enemy))
|
||||
(when (and (logtest? (-> obj nav-enemy-flags) (nav-enemy-flags navenmf8))
|
||||
(or (not *target*) (and (zero? (logand (-> *target* state-flags) #x80f8))
|
||||
(>= (- (-> *display* base-frame-counter) (-> obj touch-time)) (seconds 0.05))
|
||||
)
|
||||
(or (not *target*)
|
||||
(and (zero? (logand (-> *target* state-flags) (state-flags sf03 sf04 sf05 sf06 sf07 sf15)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> obj touch-time)) (seconds 0.05))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set-collide-offense (-> obj collide-info) 2 (collide-offense touch))
|
||||
@@ -481,12 +482,15 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
|
||||
(defun nav-enemy-player-vulnerable? ()
|
||||
(the-as symbol (and *target* (zero? (logand (-> *target* state-flags) #x80f8))))
|
||||
(the-as
|
||||
symbol
|
||||
(and *target* (zero? (logand (-> *target* state-flags) (state-flags sf03 sf04 sf05 sf06 sf07 sf15))))
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-46 nav-enemy ((obj nav-enemy) (arg0 float))
|
||||
(and *target*
|
||||
(zero? (logand (-> *target* state-flags) #x80f8))
|
||||
(zero? (logand (-> *target* state-flags) (state-flags sf03 sf04 sf05 sf06 sf07 sf15)))
|
||||
(and (or (zero? (logand (-> obj nav-enemy-flags) (nav-enemy-flags navenmf12)))
|
||||
(< (vector-vector-distance (target-pos 0) (-> obj collide-info trans)) arg0)
|
||||
)
|
||||
@@ -651,14 +655,14 @@ nav-enemy-default-event-handler
|
||||
(set! (-> v1-14 frame-num) 0.0)
|
||||
)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self collide-info status) (logand -8 (-> self collide-info status)))
|
||||
(logclear! (-> self collide-info status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(until (ja-done? 0)
|
||||
(cond
|
||||
((nonzero? (-> self align))
|
||||
(when (not s4-1)
|
||||
(TODO-RENAME-9 (-> self align))
|
||||
(TODO-RENAME-10 (-> self align) 4098 1.0 arg1 1.0)
|
||||
(when (zero? (logand (-> self align flags) 1))
|
||||
(when (zero? (logand (-> self align flags) (align-flags algf00)))
|
||||
(let ((f0-6 (* (- (-> self align delta trans z)) (-> *display* frames-per-second))))
|
||||
(set! (-> self collide-info transv x) (* (-> self hit-from-dir x) f0-6))
|
||||
(set! (-> self collide-info transv z) (* (-> self hit-from-dir z) f0-6))
|
||||
@@ -1216,7 +1220,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
(if (logtest? (-> *target* state-flags) 128)
|
||||
(if (logtest? (-> *target* state-flags) (state-flags sf07))
|
||||
(go-virtual nav-enemy-patrol)
|
||||
)
|
||||
(if (logtest? (-> self nav-enemy-flags) (nav-enemy-flags navenmf8))
|
||||
@@ -1305,7 +1309,7 @@ nav-enemy-default-event-handler
|
||||
:trans
|
||||
(behavior ()
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.1))
|
||||
(if (logtest? (-> *target* state-flags) 128)
|
||||
(if (logtest? (-> *target* state-flags) (state-flags sf07))
|
||||
(go-virtual nav-enemy-patrol)
|
||||
)
|
||||
(if (and (TODO-RENAME-46 self (-> self nav-info notice-distance)) (not (nav-enemy-frustrated?)))
|
||||
@@ -1382,7 +1386,7 @@ nav-enemy-default-event-handler
|
||||
:trans
|
||||
(behavior ()
|
||||
(when (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.1))
|
||||
(if (logtest? (-> *target* state-flags) 128)
|
||||
(if (logtest? (-> *target* state-flags) (state-flags sf07))
|
||||
(go-virtual nav-enemy-patrol)
|
||||
)
|
||||
(cond
|
||||
@@ -1397,16 +1401,15 @@ nav-enemy-default-event-handler
|
||||
(set! (-> self notice-time) (-> *display* base-frame-counter))
|
||||
)
|
||||
)
|
||||
(when (not
|
||||
(or (and *target* (>= 40960.0 (vector-vector-distance (-> self collide-info trans) (-> *target* control trans))))
|
||||
(and (-> self nav-info use-proximity-notice)
|
||||
*target*
|
||||
(>= (-> self nav-info proximity-notice-distance)
|
||||
(vector-vector-distance (-> self collide-info trans) (-> *target* control trans))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (not (or (and *target* (>= 40960.0 (vector-vector-distance (-> self collide-info trans) (-> *target* control trans))))
|
||||
(and (-> self nav-info use-proximity-notice)
|
||||
*target*
|
||||
(>= (-> self nav-info proximity-notice-distance)
|
||||
(vector-vector-distance (-> self collide-info trans) (-> *target* control trans))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(logclear! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
|
||||
(if (>= (- (-> *display* base-frame-counter) (-> self state-time)) (-> self state-timeout))
|
||||
(go-virtual nav-enemy-give-up)
|
||||
@@ -1700,7 +1703,7 @@ nav-enemy-default-event-handler
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self collide-info status) (logand -8 (-> self collide-info status)))
|
||||
(logclear! (-> self collide-info status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(set! (-> self jump-time) (-> *display* base-frame-counter))
|
||||
(logior! (-> self nav-enemy-flags) (nav-enemy-flags enable-rotate))
|
||||
(cond
|
||||
|
||||
@@ -251,50 +251,47 @@
|
||||
)
|
||||
(while #t
|
||||
(calculate-pos self #t)
|
||||
(while (not
|
||||
(or (not *target*) (< (-> self inactive-distance)
|
||||
(vector-vector-xz-distance (-> self root-override trans) (-> *target* control trans))
|
||||
)
|
||||
)
|
||||
)
|
||||
(while (not (or (not *target*) (< (-> self inactive-distance)
|
||||
(vector-vector-xz-distance (-> self root-override trans) (-> *target* control trans))
|
||||
)
|
||||
)
|
||||
)
|
||||
(pos-logic self #t)
|
||||
(suspend)
|
||||
)
|
||||
(calculate-pos self #f)
|
||||
(while (and (not
|
||||
(and (and *target* (>= (-> self active-distance)
|
||||
(vector-vector-xz-distance (-> self root-override trans) (-> *target* control trans))
|
||||
)
|
||||
(while (and (not (and (and *target* (>= (-> self active-distance)
|
||||
(vector-vector-xz-distance (-> self root-override trans) (-> *target* control trans))
|
||||
)
|
||||
)
|
||||
(let ((a1-11 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-11 from) self)
|
||||
(set! (-> a1-11 num-params) 2)
|
||||
(set! (-> a1-11 message) 'query)
|
||||
(set! (-> a1-11 param 0) (the-as uint 'powerup))
|
||||
(set! (-> a1-11 param 1) (the-as uint 3))
|
||||
(or (send-event-function *target* a1-11) (-> self activated))
|
||||
)
|
||||
(let ((a1-11 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-11 from) self)
|
||||
(set! (-> a1-11 num-params) 2)
|
||||
(set! (-> a1-11 message) 'query)
|
||||
(set! (-> a1-11 param 0) (the-as uint 'powerup))
|
||||
(set! (-> a1-11 param 1) (the-as uint 3))
|
||||
(or (send-event-function *target* a1-11) (-> self activated))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(not (pos-logic self #f))
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(if (not
|
||||
(and (and *target* (>= (-> self active-distance)
|
||||
(vector-vector-xz-distance (-> self root-override trans) (-> *target* control trans))
|
||||
)
|
||||
(if (not (and (and *target* (>= (-> self active-distance)
|
||||
(vector-vector-xz-distance (-> self root-override trans) (-> *target* control trans))
|
||||
)
|
||||
)
|
||||
(let ((a1-14 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-14 from) self)
|
||||
(set! (-> a1-14 num-params) 2)
|
||||
(set! (-> a1-14 message) 'query)
|
||||
(set! (-> a1-14 param 0) (the-as uint 'powerup))
|
||||
(set! (-> a1-14 param 1) (the-as uint 3))
|
||||
(or (send-event-function *target* a1-14) (-> self activated))
|
||||
)
|
||||
(let ((a1-14 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-14 from) self)
|
||||
(set! (-> a1-14 num-params) 2)
|
||||
(set! (-> a1-14 message) 'query)
|
||||
(set! (-> a1-14 param 0) (the-as uint 'powerup))
|
||||
(set! (-> a1-14 param 1) (the-as uint 3))
|
||||
(or (send-event-function *target* a1-14) (-> self activated))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(go orb-cache-top-idle arg0)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -251,12 +251,13 @@
|
||||
)
|
||||
(rider-trans)
|
||||
(when (-> self go-back-if-lost-player?)
|
||||
(when (or (not *target*) (and (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 4))
|
||||
(not (and (logtest? (-> *target* control unknown-surface00 flags) 2048)
|
||||
(zero? (logand (-> *target* control status) 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (or (not *target*)
|
||||
(and (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 4))
|
||||
(not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags surf11))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self go-back-if-lost-player?) #f)
|
||||
(go-virtual plat-button-move-upward)
|
||||
@@ -285,7 +286,7 @@
|
||||
)
|
||||
(sound-trans-convert (-> gp-1 parms trans) a1-6)
|
||||
)
|
||||
(set! (-> gp-1 parms mask) (the-as uint 32))
|
||||
(set! (-> gp-1 parms mask) (sound-mask trans))
|
||||
(-> gp-1 id)
|
||||
)
|
||||
(if (and (-> self grab-player?) (< 0.2 (-> self path-pos)))
|
||||
@@ -330,12 +331,13 @@
|
||||
)
|
||||
(rider-trans)
|
||||
(when (-> self go-back-if-lost-player?)
|
||||
(when (or (not *target*) (and (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 4))
|
||||
(not (and (logtest? (-> *target* control unknown-surface00 flags) 2048)
|
||||
(zero? (logand (-> *target* control status) 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (or (not *target*)
|
||||
(and (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 4))
|
||||
(not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags surf11))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self go-back-if-lost-player?) #f)
|
||||
(go-virtual plat-button-move-downward)
|
||||
@@ -364,7 +366,7 @@
|
||||
)
|
||||
(sound-trans-convert (-> gp-1 parms trans) a1-6)
|
||||
)
|
||||
(set! (-> gp-1 parms mask) (the-as uint 32))
|
||||
(set! (-> gp-1 parms mask) (sound-mask trans))
|
||||
(-> gp-1 id)
|
||||
)
|
||||
(if (and (-> self grab-player?) (< (-> self path-pos) 0.8))
|
||||
|
||||
@@ -538,8 +538,8 @@ nav-enemy-default-event-handler
|
||||
(go-virtual nav-enemy-patrol)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> *target* control status) 2)
|
||||
(set! (-> self player-in-water) (logtest? (-> *target* control status) 1024))
|
||||
(when (logtest? (-> *target* control status) (cshape-moving-flags onground))
|
||||
(set! (-> self player-in-water) (logtest? (-> *target* control status) (cshape-moving-flags on-water)))
|
||||
(if (-> self player-in-water)
|
||||
(set! (-> self player-water-time) (-> *display* base-frame-counter))
|
||||
)
|
||||
@@ -832,7 +832,7 @@ nav-enemy-default-event-handler
|
||||
(TODO-RENAME-45 obj *sharkey-nav-enemy-info*)
|
||||
(logclear! (-> obj mask) (process-mask actor-pause))
|
||||
(set! (-> obj water) (new 'process 'water-control obj 3 12288.0 8192.0 2048.0))
|
||||
(set! (-> obj water flags) (the-as uint #xc00002))
|
||||
(set! (-> obj water flags) (water-flags wt01 wt22 wt23))
|
||||
(set! (-> obj water height) (res-lump-float (-> obj entity) 'water-height))
|
||||
(set! (-> obj water ripple-size) 20480.0)
|
||||
(set! (-> obj spawn-point quad) (-> obj collide-info trans quad))
|
||||
|
||||
@@ -424,207 +424,95 @@
|
||||
:skel-group '*water-anim-sunken-big-room-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "water-loop")
|
||||
:volume #x400
|
||||
:fo-min 70
|
||||
:fo-max 80
|
||||
)
|
||||
(static-sound-spec "water-loop" :fo-min 70 :fo-max 80)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group
|
||||
'*water-anim-sunken-first-room-from-entrance-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "water-loop")
|
||||
:volume #x400
|
||||
:fo-min 50
|
||||
:fo-max 60
|
||||
)
|
||||
(static-sound-spec "water-loop" :fo-min 50 :fo-max 60)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-qbert-room-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "water-loop")
|
||||
:volume #x400
|
||||
:fo-min 48
|
||||
:fo-max 58
|
||||
)
|
||||
(static-sound-spec "water-loop" :fo-min 48 :fo-max 58)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group
|
||||
'*water-anim-sunken-first-right-branch-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "water-loop")
|
||||
:volume #x400
|
||||
:fo-min 30
|
||||
:fo-max 40
|
||||
)
|
||||
(static-sound-spec "water-loop" :fo-min 30 :fo-max 40)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group
|
||||
'*water-anim-sunken-circular-with-bullys-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "water-loop")
|
||||
:volume #x400
|
||||
:fo-min 15
|
||||
:fo-max 25
|
||||
)
|
||||
(static-sound-spec "water-loop" :fo-min 15 :fo-max 25)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group
|
||||
'*water-anim-sunken-hall-with-one-whirlpool-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "water-loop")
|
||||
:volume #x400
|
||||
:fo-min 27
|
||||
:fo-max 37
|
||||
)
|
||||
(static-sound-spec "water-loop" :fo-min 27 :fo-max 37)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group
|
||||
'*water-anim-sunken-hall-with-three-whirlpools-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "water-loop")
|
||||
:volume #x400
|
||||
:fo-min 26
|
||||
:fo-max 36
|
||||
)
|
||||
(static-sound-spec "water-loop" :fo-min 26 :fo-max 36)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group
|
||||
'*water-anim-sunken-start-of-helix-slide-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "water-loop")
|
||||
:volume #x400
|
||||
:fo-min 25
|
||||
:fo-max 35
|
||||
)
|
||||
(static-sound-spec "water-loop" :fo-min 25 :fo-max 35)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group
|
||||
'*water-anim-sunken-room-above-exit-chamber-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "water-loop")
|
||||
:volume #x400
|
||||
:fo-min 45
|
||||
:fo-max 55
|
||||
)
|
||||
(static-sound-spec "water-loop" :fo-min 45 :fo-max 55)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group
|
||||
'*water-anim-sunken-hall-before-big-room-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "water-loop")
|
||||
:volume #x400
|
||||
:fo-min 20
|
||||
:fo-max 30
|
||||
)
|
||||
(static-sound-spec "water-loop" :fo-min 20 :fo-max 30)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-dark-eco-qbert-sg*
|
||||
:anim 6
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "darkeco-pool")
|
||||
:volume #x400
|
||||
:fo-min 40
|
||||
:fo-max 50
|
||||
)
|
||||
(static-sound-spec "darkeco-pool" :fo-min 40 :fo-max 50)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-sunken-short-piece-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "water-loop")
|
||||
:volume #x400
|
||||
:fo-min 20
|
||||
:fo-max 30
|
||||
)
|
||||
(static-sound-spec "water-loop" :fo-min 20 :fo-max 30)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group
|
||||
'*water-anim-sunken-big-room-upper-water-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "water-loop")
|
||||
:volume #x400
|
||||
:fo-min 27
|
||||
:fo-max 37
|
||||
)
|
||||
(static-sound-spec "water-loop" :fo-min 27 :fo-max 37)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group
|
||||
'*water-anim-sunken-dark-eco-platform-room-sg*
|
||||
:anim 6
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "darkeco-pool")
|
||||
:volume #x400
|
||||
:fo-min 22
|
||||
:fo-max 32
|
||||
)
|
||||
(static-sound-spec "darkeco-pool" :fo-min 22 :fo-max 32)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group
|
||||
@@ -636,88 +524,40 @@
|
||||
:skel-group '*water-anim-maincave-center-pool-sg*
|
||||
:anim 10
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "darkeco-pool")
|
||||
:volume #x400
|
||||
:fo-min 70
|
||||
:fo-max 80
|
||||
)
|
||||
(static-sound-spec "darkeco-pool" :fo-min 70 :fo-max 80)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group
|
||||
'*water-anim-maincave-lower-right-pool-sg*
|
||||
:anim 10
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "darkeco-pool")
|
||||
:volume #x400
|
||||
:fo-min 40
|
||||
:fo-max 50
|
||||
)
|
||||
(static-sound-spec "darkeco-pool" :fo-min 40 :fo-max 50)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group
|
||||
'*water-anim-maincave-mid-right-pool-sg*
|
||||
:anim 10
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "darkeco-pool")
|
||||
:volume #x400
|
||||
:fo-min 37
|
||||
:fo-max 47
|
||||
)
|
||||
(static-sound-spec "darkeco-pool" :fo-min 37 :fo-max 47)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group
|
||||
'*water-anim-maincave-lower-left-pool-sg*
|
||||
:anim 10
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "darkeco-pool")
|
||||
:volume #x400
|
||||
:fo-min 20
|
||||
:fo-max 30
|
||||
)
|
||||
(static-sound-spec "darkeco-pool" :fo-min 20 :fo-max 30)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-maincave-mid-left-pool-sg*
|
||||
:anim 10
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "darkeco-pool")
|
||||
:volume #x400
|
||||
:fo-min 51
|
||||
:fo-max 61
|
||||
)
|
||||
(static-sound-spec "darkeco-pool" :fo-min 51 :fo-max 61)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-robocave-main-pool-sg*
|
||||
:anim 3
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "darkeco-pool")
|
||||
:volume #x400
|
||||
:fo-min 54
|
||||
:fo-max 64
|
||||
)
|
||||
(static-sound-spec "darkeco-pool" :fo-min 54 :fo-max 64)
|
||||
)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-misty-mud-by-arena-sg* :anim 24 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look
|
||||
@@ -777,15 +617,7 @@
|
||||
:skel-group '*water-anim-misty-dark-eco-pool-sg*
|
||||
:anim 24
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "darkeco-pool")
|
||||
:volume #x400
|
||||
:fo-min 17
|
||||
:fo-max 27
|
||||
)
|
||||
(static-sound-spec "darkeco-pool" :fo-min 17 :fo-max 27)
|
||||
)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-ogre-lava-sg* :anim 2 :ambient-sound-spec #f)
|
||||
(new 'static 'water-anim-look :skel-group '*water-anim-jungle-river-sg* :anim 3 :ambient-sound-spec #f)
|
||||
@@ -804,30 +636,14 @@
|
||||
'*water-anim-sunken-dark-eco-helix-room-sg*
|
||||
:anim 6
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "helix-dark-eco")
|
||||
:volume #x400
|
||||
:fo-min #x78
|
||||
:fo-max #x82
|
||||
)
|
||||
(static-sound-spec "helix-dark-eco" :fo-min 120 :fo-max 130)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group
|
||||
'*water-anim-finalboss-dark-eco-pool-sg*
|
||||
:anim 2
|
||||
:ambient-sound-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "darkeco-pool")
|
||||
:volume #x400
|
||||
:fo-min 19
|
||||
:fo-max 29
|
||||
)
|
||||
(static-sound-spec "darkeco-pool" :fo-min 19 :fo-max 29)
|
||||
)
|
||||
(new 'static 'water-anim-look
|
||||
:skel-group '*water-anim-lavatube-energy-lava-sg*
|
||||
@@ -920,11 +736,11 @@
|
||||
)
|
||||
)
|
||||
(let ((f0-6 (res-lump-float (-> obj entity) 'rotoffset)))
|
||||
(the-as object (if (!= f0-6 0.0)
|
||||
(quaternion-rotate-y! (-> obj root quat) (-> obj root quat) f0-6)
|
||||
)
|
||||
)
|
||||
(if (!= f0-6 0.0)
|
||||
(quaternion-rotate-y! (-> obj root quat) (-> obj root quat) f0-6)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod TODO-RENAME-22 water-anim ((obj water-anim))
|
||||
|
||||
@@ -270,19 +270,8 @@
|
||||
(ja-post)
|
||||
(update-transforms! (-> obj root-override))
|
||||
(TODO-RENAME-9 *cavecrystal-light-control* (-> obj crystal-id) 0.0 obj)
|
||||
(set! (-> obj sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "crystal-on")
|
||||
:volume #x400
|
||||
:fo-max 80
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "crystal-on" :fo-max 80) (-> obj root-override trans))
|
||||
)
|
||||
(go cavecrystal-idle)
|
||||
(none)
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
(ja-post)
|
||||
(while #t
|
||||
(if (and (and *target* (>= 61440.0 (vector-vector-distance (-> self root trans) (-> *target* control trans))))
|
||||
(and (zero? (logand (-> *target* state-flags) 256))
|
||||
(and (zero? (logand (-> *target* state-flags) (state-flags sf08)))
|
||||
(and (>= (-> *game-info* fuel) 100.0)
|
||||
(not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status complete))))
|
||||
(= (get-task-status (game-task finalboss-movies)) (task-status need-reward-speech))
|
||||
@@ -359,14 +359,14 @@
|
||||
(behavior ((arg0 basic) (arg1 handle))
|
||||
(send-event *camera* 'change-to-entity-by-name "camera-403")
|
||||
(set! (-> self control unknown-surface00) *empty-mods*)
|
||||
(logior! (-> self state-flags) 272)
|
||||
(logior! (-> self state-flags) (state-flags sf04 sf08))
|
||||
(set-setting! *setting-control* self 'allow-progress #f 0.0 0)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(send-event *camera* 'change-state *camera-base-mode* 60)
|
||||
(set! (-> self state-flags) (logand -273 (-> self state-flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf04 sf08))
|
||||
(target-exit)
|
||||
(clear-pending-settings-from-process *setting-control* self 'allow-progress)
|
||||
(none)
|
||||
|
||||
@@ -452,7 +452,7 @@
|
||||
(v1-7 (-> obj draw shadow-ctrl))
|
||||
)
|
||||
(let ((a0-1 v1-7))
|
||||
(set! (-> a0-1 settings flags) (logand -33 (-> a0-1 settings flags)))
|
||||
(logclear! (-> a0-1 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(let ((a0-3 v1-7))
|
||||
@@ -465,7 +465,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((v1-9 (-> obj draw shadow-ctrl)))
|
||||
(logior! (-> v1-9 settings flags) 32)
|
||||
(logior! (-> v1-9 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
)
|
||||
@@ -626,9 +626,9 @@
|
||||
(set! (-> a0-6 settings top-plane w) (- 2048.0))
|
||||
)
|
||||
0
|
||||
(set! (-> v1-4 settings flags) (logand -9 (-> v1-4 settings flags)))
|
||||
(set! (-> v1-4 settings flags) (logand -5 (-> v1-4 settings flags)))
|
||||
(set! (-> v1-4 settings flags) (logand -33 (-> v1-4 settings flags)))
|
||||
(logclear! (-> v1-4 settings flags) (shadow-flags shdf03))
|
||||
(logclear! (-> v1-4 settings flags) (shadow-flags shdf02))
|
||||
(logclear! (-> v1-4 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(ja-channel-push! 1 60)
|
||||
@@ -801,7 +801,7 @@
|
||||
(sound-play-by-name (static-sound-name "blob-explode") (new-sound-id) 1024 0 0 1 #t)
|
||||
(activate! *camera-smush-control* 409.6 37 150 1.0 0.99)
|
||||
(let ((v1-14 (-> self draw shadow-ctrl)))
|
||||
(logior! (-> v1-14 settings flags) 32)
|
||||
(logior! (-> v1-14 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(let ((t9-7 (-> (method-of-type nav-enemy nav-enemy-die) enter)))
|
||||
@@ -898,7 +898,7 @@
|
||||
(set! (-> obj draw origin-joint-index) (the-as uint 3))
|
||||
(logclear! (-> obj collide-info nav-flags) (nav-flags navf0))
|
||||
(TODO-RENAME-45 obj *green-eco-lurker-nav-enemy-info*)
|
||||
(logior! (-> obj draw shadow-ctrl settings flags) 4)
|
||||
(logior! (-> obj draw shadow-ctrl settings flags) (shadow-flags shdf02))
|
||||
(set! (-> obj neck up) (the-as uint 0))
|
||||
(set! (-> obj neck nose) (the-as uint 1))
|
||||
(set! (-> obj neck ear) (the-as uint 2))
|
||||
|
||||
@@ -661,7 +661,7 @@
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and *target* (logtest? (-> *target* state-flags) 256))
|
||||
((and *target* (logtest? (-> *target* state-flags) (state-flags sf08)))
|
||||
(set! (-> obj last-spawned-time) (-> *display* base-frame-counter))
|
||||
(set! (-> obj delay-til-spawn) (seconds 8))
|
||||
)
|
||||
@@ -873,20 +873,8 @@
|
||||
)
|
||||
(set! (-> self part) (create-launch-control (-> *part-group-id-table* 691) self))
|
||||
(set! (-> self part2) (create-launch-control (-> *part-group-id-table* 690) self))
|
||||
(set! (-> self sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "white-eco-lp")
|
||||
:volume #x400
|
||||
:fo-min #x12c
|
||||
:fo-max #x190
|
||||
)
|
||||
(-> self root trans)
|
||||
)
|
||||
(set! (-> self sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "white-eco-lp" :fo-min 300 :fo-max 400) (-> self root trans))
|
||||
)
|
||||
(ja-post)
|
||||
(let ((f0-4 0.0))
|
||||
|
||||
@@ -504,19 +504,8 @@
|
||||
(initialize-skeleton obj *silodoor-sg* '())
|
||||
(logior! (-> obj skel status) (janim-status inited))
|
||||
(set! (-> obj root pause-adjust-distance) 1228800.0)
|
||||
(set! (-> obj sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "silo-moves")
|
||||
:volume #x400
|
||||
:fo-max 80
|
||||
)
|
||||
(-> obj root trans)
|
||||
)
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "silo-moves" :fo-max 80) (-> obj root trans))
|
||||
)
|
||||
(logclear! (-> obj mask) (process-mask actor-pause crate enemy attackable))
|
||||
(set! (-> obj part-opened) 0.0)
|
||||
|
||||
@@ -587,20 +587,7 @@
|
||||
(arcing-shot-setup arg0 arg1 arg2)
|
||||
(set! (-> self countdown-time) arg4)
|
||||
(set! (-> self flight-time) arg3)
|
||||
(set! (-> self sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "bomb-spin")
|
||||
:volume #x400
|
||||
:fo-max 80
|
||||
)
|
||||
(-> self to)
|
||||
)
|
||||
)
|
||||
(set! (-> self sound) (new 'process 'ambient-sound (static-sound-spec "bomb-spin" :fo-max 80) (-> self to)))
|
||||
(go darkecobomb-idle)
|
||||
(none)
|
||||
)
|
||||
@@ -984,19 +971,8 @@
|
||||
(set! (-> self shot-particle) (create-launch-control (-> *part-group-id-table* 665) self))
|
||||
(set! (-> self test-particle) (create-launch-control (-> *part-group-id-table* 679) self))
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(set! (-> self sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "red-fireball")
|
||||
:volume #x400
|
||||
:fo-max 80
|
||||
)
|
||||
(-> self root-override trans)
|
||||
)
|
||||
(set! (-> self sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "red-fireball" :fo-max 80) (-> self root-override trans))
|
||||
)
|
||||
(go redshot-idle)
|
||||
(none)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
(defbehavior robotboss-cut-cam-exit robotboss ()
|
||||
(set! (-> self valid-frames) 0)
|
||||
(if (and *target* (logtest? (-> *target* state-flags) 256))
|
||||
(if (and *target* (logtest? (-> *target* state-flags) (state-flags sf08)))
|
||||
(process-release? *target*)
|
||||
)
|
||||
(logclear! (-> self skel status) (janim-status inited))
|
||||
@@ -59,8 +59,8 @@
|
||||
)
|
||||
(robotboss-cut-cam-exit)
|
||||
)
|
||||
((or (and (logtest? (-> *target* control unknown-surface00 flags) 2048)
|
||||
(zero? (logand (-> *target* control status) 1))
|
||||
((or (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags surf11))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
(-> self skip-cut)
|
||||
)
|
||||
@@ -165,15 +165,14 @@
|
||||
(b! #t cfg-66 :delay (nop!))
|
||||
(label cfg-19)
|
||||
(b!
|
||||
(not
|
||||
(and (-> self des-cam-entity)
|
||||
(or (< (vector-vector-xz-distance (-> self entity extra trans) (target-pos 0)) 188416.0)
|
||||
(and *target*
|
||||
(>= 290816.0 (vector-vector-xz-distance (-> self root-override trans) (-> *target* control trans)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(not (and (-> self des-cam-entity)
|
||||
(or (< (vector-vector-xz-distance (-> self entity extra trans) (target-pos 0)) 188416.0)
|
||||
(and *target*
|
||||
(>= 290816.0 (vector-vector-xz-distance (-> self root-override trans) (-> *target* control trans)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
cfg-37
|
||||
:delay
|
||||
(empty-form)
|
||||
@@ -190,13 +189,12 @@
|
||||
(b! #t cfg-66 :delay (nop!))
|
||||
(label cfg-37)
|
||||
(b!
|
||||
(not
|
||||
(or (< (vector-vector-xz-distance (-> self entity extra trans) (target-pos 0)) 73728.0)
|
||||
(and *target*
|
||||
(>= 290816.0 (vector-vector-xz-distance (-> self root-override trans) (-> *target* control trans)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(not (or (< (vector-vector-xz-distance (-> self entity extra trans) (target-pos 0)) 73728.0)
|
||||
(and *target*
|
||||
(>= 290816.0 (vector-vector-xz-distance (-> self root-override trans) (-> *target* control trans)))
|
||||
)
|
||||
)
|
||||
)
|
||||
cfg-49
|
||||
:delay
|
||||
(empty-form)
|
||||
@@ -3826,7 +3824,7 @@
|
||||
(spawn (-> self particle 0) s4-0)
|
||||
(when (and arg1 (nonzero? (-> self looping-sound 0)))
|
||||
(update! (-> self looping-sound 0))
|
||||
(when (and *target* (zero? (logand (-> *target* state-flags) #x80f8)))
|
||||
(when (and *target* (zero? (logand (-> *target* state-flags) (state-flags sf03 sf04 sf05 sf06 sf07 sf15))))
|
||||
(let ((t2-0 (new 'stack-no-clear 'collide-tri-result))
|
||||
(a2-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
@@ -3877,7 +3875,7 @@
|
||||
(when (and arg1 (nonzero? (-> self looping-sound 1)))
|
||||
(update! (-> self looping-sound 1))
|
||||
(when (and *target*
|
||||
(zero? (logand (-> *target* state-flags) #x80f8))
|
||||
(zero? (logand (-> *target* state-flags) (state-flags sf03 sf04 sf05 sf06 sf07 sf15)))
|
||||
(>= 8192.0 (vector-vector-distance gp-0 (target-pos 0)))
|
||||
)
|
||||
(let ((a1-16 (new 'stack-no-clear 'event-message-block)))
|
||||
@@ -4533,61 +4531,17 @@
|
||||
(set! (-> obj particle 4) (create-launch-control (-> *part-group-id-table* 654) obj))
|
||||
(set! (-> obj particle 5) (create-launch-control (-> *part-group-id-table* 646) obj))
|
||||
(set! (-> obj particle 6) (create-launch-control (-> *part-group-id-table* 651) obj))
|
||||
(set! (-> obj looping-sound 0) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "robo-blue-lp")
|
||||
:volume #x400
|
||||
:fo-max 80
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(set! (-> obj looping-sound 0)
|
||||
(new 'process 'ambient-sound (static-sound-spec "robo-blue-lp" :fo-max 80) (-> obj root-override trans))
|
||||
)
|
||||
(set! (-> obj looping-sound 1) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "eco-torch")
|
||||
:volume #x400
|
||||
:fo-max 80
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(set! (-> obj looping-sound 1)
|
||||
(new 'process 'ambient-sound (static-sound-spec "eco-torch" :fo-max 80) (-> obj root-override trans))
|
||||
)
|
||||
(set! (-> obj looping-sound 2) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "red-buzz")
|
||||
:volume #x400
|
||||
:fo-max 80
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(set! (-> obj looping-sound 2)
|
||||
(new 'process 'ambient-sound (static-sound-spec "red-buzz" :fo-max 80) (-> obj root-override trans))
|
||||
)
|
||||
(set! (-> obj looping-sound 3) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "bfg-buzz")
|
||||
:volume #x400
|
||||
:fo-max 80
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(set! (-> obj looping-sound 3)
|
||||
(new 'process 'ambient-sound (static-sound-spec "bfg-buzz" :fo-max 80) (-> obj root-override trans))
|
||||
)
|
||||
(set! (-> obj blue-smoke) #f)
|
||||
(set! (-> obj red-smoke) #f)
|
||||
|
||||
@@ -397,19 +397,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "zoom-teleport")
|
||||
:volume #x400
|
||||
:fo-max 30
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "zoom-teleport" :fo-max 30) (-> obj root-override trans))
|
||||
)
|
||||
(go (method-of-object obj wait-for-start))
|
||||
(none)
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
:alignv 1.0
|
||||
:slope-up-traction 1.0
|
||||
:align-speed 1.0
|
||||
:flags #x8
|
||||
:flags (surface-flags surf03)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
:slope-up-traction 1.0
|
||||
:align-speed 1.0
|
||||
:mode 'air
|
||||
:flags #x800
|
||||
:flags (surface-flags surf11)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
:slope-up-traction 1.0
|
||||
:align-speed 1.0
|
||||
:mode 'air
|
||||
:flags #x800
|
||||
:flags (surface-flags surf11)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
:slope-up-traction 1.0
|
||||
:align-speed 1.0
|
||||
:mode 'attack
|
||||
:flags #x1018
|
||||
:flags (surface-flags surf03 surf04 surf12)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
:slope-up-traction 1.0
|
||||
:align-speed 1.0
|
||||
:mode 'attack
|
||||
:flags #x1800
|
||||
:flags (surface-flags surf11 surf12)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -218,12 +218,13 @@
|
||||
(b! #t cfg-23 :delay (nop!))
|
||||
(label cfg-7)
|
||||
(cond
|
||||
((and (logtest? (-> self control status) 1) (not (= (if (> (-> self skel active-channels) 0)
|
||||
(-> self skel root-channel 0 frame-group)
|
||||
)
|
||||
(-> self draw art-group data 145)
|
||||
)
|
||||
)
|
||||
((and (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(not (= (if (> (-> self skel active-channels) 0)
|
||||
(-> self skel root-channel 0 frame-group)
|
||||
)
|
||||
(-> self draw art-group data 145)
|
||||
)
|
||||
)
|
||||
)
|
||||
(ja-channel-push! 1 6)
|
||||
(let ((v1-21 (-> self skel root-channel 0)))
|
||||
@@ -505,7 +506,7 @@
|
||||
)
|
||||
(logclear! (-> self control root-prim prim-core action) (collide-action ca-14))
|
||||
(set! (-> self control unknown-surface00) *walk-mods*)
|
||||
(set! (-> self state-flags) (logand -1025 (-> self state-flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf10))
|
||||
(set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max))
|
||||
(set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length))
|
||||
(target-collide-set! 'normal (the-as float 0.0))
|
||||
@@ -648,7 +649,7 @@
|
||||
(if (can-hands? #t)
|
||||
(go target-flut-running-attack)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) 1))
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(and (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-37 (if (> (-> self skel active-channels) 0)
|
||||
@@ -807,7 +808,7 @@
|
||||
(if (can-hands? #t)
|
||||
(go target-flut-running-attack)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) 1))
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(and (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-37 (if (> (-> self skel active-channels) 0)
|
||||
@@ -1024,7 +1025,7 @@
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(sound-play-by-name (static-sound-name "jump") (new-sound-id) 1024 -762 0 1 #t)
|
||||
(init-var-jump arg0 arg1 (the-as vector #t) (the-as vector #t) (-> self control transv))
|
||||
(set! (-> self control status) (logand -8 (-> self control status)))
|
||||
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(set! (-> self control unknown-surface00) *flut-jump-mods*)
|
||||
(set! (-> self control unknown-float123)
|
||||
(fmax 0.0 (fmin 1.0 (* 0.00004359654 (+ -11468.8 (-> self control unknown-float01)))))
|
||||
@@ -1048,13 +1049,13 @@
|
||||
(* 0.003921569 (the float (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) abutton 6)))
|
||||
)
|
||||
)
|
||||
(if (logtest? (-> self control status) 1)
|
||||
(if (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(go target-flut-hit-ground)
|
||||
)
|
||||
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) x)
|
||||
(< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 40960.0)
|
||||
(and (zero? (logand (-> self water flags) 512))
|
||||
(zero? (logand (-> self state-flags) 2048))
|
||||
(and (zero? (logand (-> self water flags) (water-flags wt09)))
|
||||
(zero? (logand (-> self state-flags) (state-flags sf11)))
|
||||
(< 4096.0 (target-height-above-ground))
|
||||
)
|
||||
)
|
||||
@@ -1066,8 +1067,8 @@
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
(zero? (logand (-> self state-flags) 4096))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) 384))
|
||||
(zero? (logand (-> self state-flags) (state-flags sf12)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags surf07 surf08)))
|
||||
)
|
||||
)
|
||||
(go target-flut-air-attack (-> *FLUT-bank* air-attack-speed))
|
||||
@@ -1079,7 +1080,7 @@
|
||||
)
|
||||
#t
|
||||
)
|
||||
(logior! (-> self control status) 1)
|
||||
(logior! (-> self control status) (cshape-moving-flags onsurf))
|
||||
enter-state
|
||||
'stuck
|
||||
(go target-flut-hit-ground)
|
||||
@@ -1209,7 +1210,7 @@
|
||||
(init-var-jump arg0 arg1 (the-as vector #t) (the-as vector #t) (-> self control transv))
|
||||
(set! (-> self control dynam gravity-max) 40960.0)
|
||||
(set! (-> self control dynam gravity-length) 245760.0)
|
||||
(set! (-> self control status) (logand -8 (-> self control status)))
|
||||
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(set! (-> self control unknown-surface00) *flut-double-jump-mods*)
|
||||
(none)
|
||||
)
|
||||
@@ -1223,7 +1224,7 @@
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
(if (logtest? (-> self control status) 1)
|
||||
(if (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(go target-flut-hit-ground)
|
||||
)
|
||||
(if (and (logtest? (logior (logior (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-rel 0)
|
||||
@@ -1233,8 +1234,8 @@
|
||||
)
|
||||
(pad-buttons square)
|
||||
)
|
||||
(and (zero? (logand (-> self state-flags) 4096))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) 384))
|
||||
(and (zero? (logand (-> self state-flags) (state-flags sf12)))
|
||||
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags surf07 surf08)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
|
||||
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
|
||||
)
|
||||
@@ -1403,7 +1404,7 @@
|
||||
(if (move-legs?)
|
||||
(go target-flut-walk)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) 1))
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(and (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-34 (if (> (-> self skel active-channels) 0)
|
||||
@@ -1450,7 +1451,7 @@
|
||||
(-> target-flut-start exit)
|
||||
:trans
|
||||
(behavior ()
|
||||
(when (or (logtest? (-> self control status) 1)
|
||||
(when (or (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(if (and (< (target-move-dist (-> *TARGET-bank* stuck-time)) (-> *TARGET-bank* stuck-distance))
|
||||
(and (>= (- (-> *display* base-frame-counter) (-> self state-time))
|
||||
(/ (the-as int (-> *TARGET-bank* stuck-time)) 2)
|
||||
@@ -1461,7 +1462,7 @@
|
||||
#t
|
||||
)
|
||||
)
|
||||
(logior! (-> self control status) 1)
|
||||
(logior! (-> self control status) (cshape-moving-flags onsurf))
|
||||
(go target-flut-hit-ground)
|
||||
)
|
||||
(seek!
|
||||
@@ -1648,7 +1649,9 @@
|
||||
(behavior ()
|
||||
(when (!= (-> self state-time) (-> *display* base-frame-counter))
|
||||
(if (and (or (smack-surface? #t)
|
||||
(and (>= (-> self control unknown-float63) 0.7) (zero? (logand (-> self control status) 32)))
|
||||
(and (>= (-> self control unknown-float63) 0.7)
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags t-act)))
|
||||
)
|
||||
)
|
||||
(begin
|
||||
(set! (-> self control unknown-int21) (the-as int (-> *display* base-frame-counter)))
|
||||
@@ -1680,7 +1683,7 @@
|
||||
)
|
||||
(target-shoved (meters 2.0) (-> *TARGET-bank* smack-surface-height) (the-as process #f) target-flut-hit)
|
||||
)
|
||||
(if (and (logtest? (-> self water flags) 512)
|
||||
(if (and (logtest? (-> self water flags) (water-flags wt09))
|
||||
(zero? (mod (- (-> *display* base-frame-counter) (-> self state-time)) 21))
|
||||
)
|
||||
(dummy-13
|
||||
@@ -1721,7 +1724,7 @@
|
||||
(when (not (ja-min? 0))
|
||||
(cond
|
||||
((and (>= (ja-aframe-num 0) 20.0)
|
||||
(and (and (zero? (logand (-> self control status) 1))
|
||||
(and (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-39 (if (> (-> self skel active-channels) 0)
|
||||
@@ -1729,12 +1732,11 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(or (not
|
||||
(or (= v1-39 (-> self draw art-group data 59))
|
||||
(= v1-39 (-> self draw art-group data 60))
|
||||
(= v1-39 (-> self draw art-group data 61))
|
||||
)
|
||||
)
|
||||
(or (not (or (= v1-39 (-> self draw art-group data 59))
|
||||
(= v1-39 (-> self draw art-group data 60))
|
||||
(= v1-39 (-> self draw art-group data 61))
|
||||
)
|
||||
)
|
||||
(< 4096.0 (target-height-above-ground))
|
||||
)
|
||||
)
|
||||
@@ -1783,7 +1785,7 @@
|
||||
(set! f30-0 (* f30-0 (the-as float (fmin 1.0 (the-as float (-> self control unknown-float140))))))
|
||||
)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) 1))
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
|
||||
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
|
||||
(let ((v1-105 (if (> (-> self skel active-channels) 0)
|
||||
@@ -1866,7 +1868,7 @@
|
||||
(behavior ((arg0 float))
|
||||
(set-forward-vel arg0)
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(set! (-> self control status) (logand -8 (-> self control status)))
|
||||
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(set! (-> self control unknown-surface00) *flut-air-attack-mods*)
|
||||
(target-start-attack)
|
||||
(target-danger-set! 'flut-attack #f)
|
||||
@@ -1919,8 +1921,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (logtest? (-> self control status) 1)
|
||||
(logior! (-> self control status) 1)
|
||||
(when (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(logior! (-> self control status) (cshape-moving-flags onsurf))
|
||||
(remove-exit)
|
||||
(go target-flut-air-attack-hit-ground)
|
||||
)
|
||||
@@ -1931,7 +1933,7 @@
|
||||
)
|
||||
#t
|
||||
)
|
||||
(logior! (-> self control status) 1)
|
||||
(logior! (-> self control status) (cshape-moving-flags onsurf))
|
||||
(go target-flut-hit-ground)
|
||||
)
|
||||
(none)
|
||||
@@ -2087,7 +2089,7 @@
|
||||
:exit
|
||||
(behavior ()
|
||||
(if (!= (-> self next-state name) 'target-flut-death)
|
||||
(set! (-> self state-flags) (logand -32777 (-> self state-flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf03 sf15))
|
||||
)
|
||||
(target-exit)
|
||||
((-> target-flut-start exit))
|
||||
@@ -2149,7 +2151,7 @@
|
||||
)
|
||||
)
|
||||
(when (= arg0 'attack)
|
||||
(logior! (-> self state-flags) 8)
|
||||
(logior! (-> self state-flags) (state-flags sf03))
|
||||
(set! (-> self game hit-time) (-> *display* base-frame-counter))
|
||||
(case (-> gp-0 mode)
|
||||
(('endlessfall)
|
||||
@@ -2272,7 +2274,7 @@
|
||||
(-> target-death event)
|
||||
:exit
|
||||
(behavior ()
|
||||
(set! (-> self state-flags) (logand -32777 (-> self state-flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf03 sf15))
|
||||
(target-exit)
|
||||
(clear-pending-settings-from-process *setting-control* self 'process-mask)
|
||||
(copy-settings-from-target! *setting-control*)
|
||||
@@ -2283,7 +2285,7 @@
|
||||
:code
|
||||
(behavior ((arg0 symbol))
|
||||
(local-vars (v1-104 symbol))
|
||||
(logior! (-> self state-flags) #x8000)
|
||||
(logior! (-> self state-flags) (state-flags sf15))
|
||||
(set! (-> self neck flex-blend) 0.0)
|
||||
(target-timed-invulnerable-off self)
|
||||
(push-setting! *setting-control* self 'process-mask 'set 0.0 #x14a0000)
|
||||
@@ -2297,7 +2299,7 @@
|
||||
(sound-play-by-name (static-sound-name "flut-hit") (new-sound-id) 716 -2133 0 1 #t)
|
||||
(camera-change-to (the-as string cam-endlessfall) 30 #f)
|
||||
(set! (-> self control pat-ignore-mask unknown-bit) 1)
|
||||
(set! (-> self water flags) (logand -17 (-> self water flags)))
|
||||
(logclear! (-> self water flags) (water-flags wt04))
|
||||
(let ((f30-0 (fmin -4096.0 (- (-> self control ground-impact-vel)))))
|
||||
(set! (-> self control unknown-uint20) (the-as uint f30-0))
|
||||
(let ((gp-3 (new-stack-vector0)))
|
||||
@@ -2363,7 +2365,7 @@
|
||||
(until (ja-done? 0)
|
||||
(TODO-RENAME-9 (-> self align))
|
||||
(let ((gp-5 (new 'stack-no-clear 'vector)))
|
||||
(when (zero? (logand (-> self align flags) 1))
|
||||
(when (zero? (logand (-> self align flags) (align-flags algf00)))
|
||||
(vector-matrix*! gp-5 (the-as vector (-> self align delta)) (-> self control unknown-matrix01))
|
||||
(vector-float*! (-> self control transv) gp-5 (-> *display* frames-per-second))
|
||||
)
|
||||
@@ -2400,7 +2402,7 @@
|
||||
(behavior ((arg0 handle))
|
||||
(set! (-> self control transv quad) (the-as uint128 0))
|
||||
(set! (-> self alt-cam-pos quad) (-> (&-> (-> self control) unknown-qword00) 0))
|
||||
(logior! (-> self state-flags) 1024)
|
||||
(logior! (-> self state-flags) (state-flags sf10))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> gp-0 quad) (-> self control trans quad))
|
||||
@@ -2453,7 +2455,7 @@
|
||||
)
|
||||
)
|
||||
(sound-play-by-name (static-sound-name "flut-coo") (new-sound-id) 1024 0 0 1 #t)
|
||||
(set! (-> self state-flags) (logand -1025 (-> self state-flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf10))
|
||||
(set! (-> self control transv quad) (the-as uint128 0))
|
||||
(quaternion-copy! (-> self control quat) (-> self control unknown-quaternion00))
|
||||
(rot->dir-targ! (-> self control))
|
||||
@@ -2501,7 +2503,7 @@
|
||||
(behavior ((arg0 handle))
|
||||
(set-forward-vel (the-as float 0.0))
|
||||
(let ((s5-0 0))
|
||||
(while (zero? (logand (-> self control status) 1))
|
||||
(while (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(target-flut-falling-anim-trans)
|
||||
(+! s5-0 (- (-> *display* base-frame-counter) (-> *display* old-base-frame-counter)))
|
||||
(suspend)
|
||||
@@ -2636,7 +2638,7 @@
|
||||
(-> target-hit-ground enter)
|
||||
:trans
|
||||
(behavior ()
|
||||
(logior! (-> self control status) 7)
|
||||
(logior! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
((-> target-hit-ground trans))
|
||||
(none)
|
||||
)
|
||||
@@ -2693,12 +2695,12 @@
|
||||
(behavior ()
|
||||
(set! (-> self control unknown-surface00) *grab-mods*)
|
||||
(set! (-> self neck flex-blend) 0.0)
|
||||
(logior! (-> self state-flags) 272)
|
||||
(logior! (-> self state-flags) (state-flags sf04 sf08))
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(set! (-> self state-flags) (logand -273 (-> self state-flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf04 sf08))
|
||||
(target-exit)
|
||||
((-> target-flut-start exit))
|
||||
(none)
|
||||
|
||||
@@ -837,7 +837,7 @@
|
||||
)
|
||||
)
|
||||
0
|
||||
(set! (-> v1-1 settings flags) (logand -9 (-> v1-1 settings flags)))
|
||||
(logclear! (-> v1-1 settings flags) (shadow-flags shdf03))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
@@ -851,14 +851,14 @@
|
||||
(logtest? (-> obj draw status) (draw-status was-drawn))
|
||||
)
|
||||
(let ((v1-9 (-> obj draw shadow-ctrl)))
|
||||
(set! (-> v1-9 settings flags) (logand -33 (-> v1-9 settings flags)))
|
||||
(logclear! (-> v1-9 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(update-direction-from-time-of-day (-> obj draw shadow-ctrl))
|
||||
)
|
||||
(else
|
||||
(let ((v1-14 (-> obj draw shadow-ctrl)))
|
||||
(logior! (-> v1-14 settings flags) 32)
|
||||
(logior! (-> v1-14 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
)
|
||||
@@ -2196,14 +2196,14 @@
|
||||
:enter
|
||||
(behavior ((arg0 handle))
|
||||
(set! (-> self control unknown-surface00) *empty-mods*)
|
||||
(logior! (-> self state-flags) 16)
|
||||
(logior! (-> self state-flags) (state-flags sf04))
|
||||
(set-zero! (-> self control unknown-smush00))
|
||||
(set! (-> self control unknown-uint20) (the-as uint #f))
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(set! (-> self state-flags) (logand -17 (-> self state-flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf04))
|
||||
(let ((v1-2 (-> self manipy)))
|
||||
(when v1-2
|
||||
(deactivate (-> v1-2 0))
|
||||
|
||||
@@ -1393,8 +1393,8 @@
|
||||
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
(case arg2
|
||||
(('touch)
|
||||
(when (and *target* (not (and (logtest? (-> *target* control unknown-surface00 flags) 2048)
|
||||
(zero? (logand (-> *target* control status) 1))
|
||||
(when (and *target* (not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags surf11))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1467,7 +1467,7 @@
|
||||
(f30-1 81920.0)
|
||||
)
|
||||
(when (and *target* (>= f30-1 (vector-vector-distance a0-10 (-> *target* control trans))))
|
||||
(when (logtest? (-> *target* control status) 1)
|
||||
(when (logtest? (-> *target* control status) (cshape-moving-flags onsurf))
|
||||
(let ((f0-7 (fmax 4096.0 (fmin 12288.0 (+ (- 5120.0 (-> self base y)) (-> *target* control trans y))))))
|
||||
(seek! (-> self y-offset-grips) f0-7 (* 16384.0 (-> *display* seconds-per-frame)))
|
||||
)
|
||||
@@ -1894,19 +1894,8 @@
|
||||
(periscope-update-joints)
|
||||
(set! (-> obj grips-moving?) #f)
|
||||
(set! (-> obj sound-id) (new-sound-id))
|
||||
(set! (-> obj sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "eco-beam")
|
||||
:volume #x400
|
||||
:fo-max 50
|
||||
)
|
||||
(-> obj reflector-trans)
|
||||
)
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "eco-beam" :fo-max 50) (-> obj reflector-trans))
|
||||
)
|
||||
(set! (-> obj rise-sound-id) (new-sound-id))
|
||||
(set! (-> obj grips-sound-id) (new-sound-id))
|
||||
@@ -2169,19 +2158,8 @@
|
||||
(set! (-> obj link) (new 'process 'actor-link-info obj))
|
||||
(initialize-skeleton obj *reflector-mirror-sg* '())
|
||||
(set-vector! (-> obj beam-end) 1805721.6 167936.0 -932659.2 1.0)
|
||||
(set! (-> obj sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "eco-beam")
|
||||
:volume #x400
|
||||
:fo-max 50
|
||||
)
|
||||
(-> obj beam-end)
|
||||
)
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "eco-beam" :fo-max 50) (-> obj beam-end))
|
||||
)
|
||||
(if (and (-> obj entity) (logtest? (-> obj entity extra perm status) (entity-perm-status complete)))
|
||||
(go reflector-mirror-broken #t)
|
||||
|
||||
@@ -406,7 +406,7 @@ nav-enemy-default-event-handler
|
||||
(initialize-skeleton obj *junglefish-sg* '())
|
||||
(TODO-RENAME-45 obj *junglefish-nav-enemy-info*)
|
||||
(set! (-> obj water) (new 'process 'water-control obj 7 0.0 8192.0 2048.0))
|
||||
(set! (-> obj water flags) (the-as uint 2))
|
||||
(set! (-> obj water flags) (water-flags wt01))
|
||||
(set! (-> obj water height) (res-lump-float (-> obj entity) 'water-height))
|
||||
(set! (-> obj water ripple-size) 5734.4)
|
||||
(set! (-> obj collide-info trans y) (+ -4096.0 (-> obj water height)))
|
||||
|
||||
@@ -118,7 +118,9 @@
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and (-> self is-lethal?) (zero? (logand (-> *target* state-flags) #x80f8)))
|
||||
((and (-> self is-lethal?)
|
||||
(zero? (logand (-> *target* state-flags) (state-flags sf03 sf04 sf05 sf06 sf07 sf15)))
|
||||
)
|
||||
(let ((a1-2 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> a1-2 from) self)
|
||||
(set! (-> a1-2 num-params) 2)
|
||||
@@ -438,7 +440,7 @@ junglesnake-default-event-handler
|
||||
(behavior ()
|
||||
(if (and (and *target* (>= 24576.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans))))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) (-> self refractory-delay))
|
||||
(zero? (logand (-> *target* state-flags) #x80f8))
|
||||
(zero? (logand (-> *target* state-flags) (state-flags sf03 sf04 sf05 sf06 sf07 sf15)))
|
||||
)
|
||||
(go junglesnake-attack)
|
||||
)
|
||||
|
||||
@@ -1557,7 +1557,7 @@
|
||||
)
|
||||
)
|
||||
*target*
|
||||
(zero? (logand (-> *target* state-flags) #x80f8))
|
||||
(zero? (logand (-> *target* state-flags) (state-flags sf03 sf04 sf05 sf06 sf07 sf15)))
|
||||
)
|
||||
(go plant-boss-attack 1)
|
||||
)
|
||||
|
||||
@@ -888,19 +888,7 @@
|
||||
(set! (-> obj root-override) (the-as collide-shape-moving (new 'process 'trsqv)))
|
||||
(darkecobarrel-base-init arg0)
|
||||
(set! (-> obj sound)
|
||||
(new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "lav-dark-eco")
|
||||
:volume #x400
|
||||
:fo-max 30
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(new 'process 'ambient-sound (static-sound-spec "lav-dark-eco" :fo-max 30) (-> obj root-override trans))
|
||||
)
|
||||
(logior! (-> obj draw status) (draw-status hidden))
|
||||
(set! (-> obj speed) (/ 300.0 (res-lump-float (-> obj entity) 'speed :default 61440.0)))
|
||||
@@ -1398,19 +1386,8 @@
|
||||
)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(initialize-skeleton obj *chainmine-sg* '())
|
||||
(set! (-> obj sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "lava-mine-chain")
|
||||
:volume #x400
|
||||
:fo-max 30
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "lava-mine-chain" :fo-max 30) (-> obj root-override trans))
|
||||
)
|
||||
(go (method-of-object obj idle))
|
||||
(none)
|
||||
@@ -1680,8 +1657,8 @@
|
||||
(set! (-> v1-2 global-scale) 2048.0)
|
||||
(set! (-> v1-2 waveform) ripple-for-lavatube-lava)
|
||||
)
|
||||
(set! (-> obj flags) (logand -8388609 (-> obj flags)))
|
||||
(set! (-> obj flags) (logior #x2000000 (-> obj flags)))
|
||||
(logclear! (-> obj flags) (water-flags wt23))
|
||||
(set! (-> obj flags) (logior (water-flags wt25) (-> obj flags)))
|
||||
(set! (-> obj attack-event) 'heat)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -262,14 +262,7 @@
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-rnd-flt spt-num 0.7 0.6 1.0)
|
||||
(sp-sound (new 'static 'sound-spec
|
||||
:mask #x1
|
||||
:num 0.05
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "steam-release")
|
||||
:volume #x400
|
||||
)
|
||||
)
|
||||
(sp-sound (static-sound-spec "steam-release" :num 0.05 :volume 100.0))
|
||||
(sp-rnd-flt spt-x (meters 0) (meters 3) 1.0)
|
||||
(sp-flt spt-y (meters -1))
|
||||
(sp-rnd-flt spt-scale-x (meters 6) (meters 4) 1.0)
|
||||
@@ -361,14 +354,7 @@
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-rnd-flt spt-num 0.4 0.3 1.0)
|
||||
(sp-sound (new 'static 'sound-spec
|
||||
:mask #x1
|
||||
:num 0.05
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "steam-release")
|
||||
:volume #x400
|
||||
)
|
||||
)
|
||||
(sp-sound (static-sound-spec "steam-release" :num 0.05 :volume 100.0))
|
||||
(sp-rnd-flt spt-scale-x (meters 6) (meters 4) 1.0)
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
baby-spider-default-event-handler
|
||||
|
||||
(defmethod common-post baby-spider ((obj baby-spider))
|
||||
(when (logtest? (-> obj collide-info status) 1)
|
||||
(when (logtest? (-> obj collide-info status) (cshape-moving-flags onsurf))
|
||||
(vector-deg-seek (-> obj up-vector) (-> obj up-vector) (-> obj collide-info surface-normal) 910.2222)
|
||||
(vector-normalize! (-> obj up-vector) 1.0)
|
||||
)
|
||||
@@ -840,7 +840,7 @@ baby-spider-default-event-handler
|
||||
(TODO-RENAME-45 obj *baby-spider-nav-enemy-info*)
|
||||
)
|
||||
(let ((v1-11 (-> obj draw shadow-ctrl settings)))
|
||||
(set! (-> v1-11 flags) (logand -9 (-> v1-11 flags)))
|
||||
(logclear! (-> v1-11 flags) (shadow-flags shdf03))
|
||||
(set! (-> v1-11 fade-dist) 98304.0)
|
||||
)
|
||||
(vector-float*! (-> obj collide-info scale) *identity-vector* 0.63)
|
||||
|
||||
@@ -521,9 +521,10 @@
|
||||
)
|
||||
)
|
||||
(when (and (-> obj hit-player?)
|
||||
(or (not *target*) (and (zero? (logand (-> *target* state-flags) #x80f8))
|
||||
(>= (- (-> *display* base-frame-counter) (-> obj hit-player-time)) (seconds 0.05))
|
||||
)
|
||||
(or (not *target*)
|
||||
(and (zero? (logand (-> *target* state-flags) (state-flags sf03 sf04 sf05 sf06 sf07 sf15)))
|
||||
(>= (- (-> *display* base-frame-counter) (-> obj hit-player-time)) (seconds 0.05))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set-collide-offense (-> obj root-overeride) 2 (collide-offense touch))
|
||||
@@ -1311,34 +1312,10 @@
|
||||
)
|
||||
(set! (-> obj draw shadow-ctrl) *driller-lurker-shadow-control*)
|
||||
(set! (-> obj sound)
|
||||
(new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "drill-idle")
|
||||
:volume #x400
|
||||
:fo-max 40
|
||||
)
|
||||
(-> obj root-overeride trans)
|
||||
)
|
||||
(new 'process 'ambient-sound (static-sound-spec "drill-idle" :fo-max 40) (-> obj root-overeride trans))
|
||||
)
|
||||
(set! (-> obj sound2)
|
||||
(new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "drill-idle2")
|
||||
:volume #x400
|
||||
:fo-max 60
|
||||
)
|
||||
(-> obj root-overeride trans)
|
||||
)
|
||||
(new 'process 'ambient-sound (static-sound-spec "drill-idle2" :fo-max 60) (-> obj root-overeride trans))
|
||||
)
|
||||
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 331) obj))
|
||||
(let ((f0-34 (path-distance (-> obj path))))
|
||||
|
||||
@@ -1769,34 +1769,16 @@
|
||||
)
|
||||
)
|
||||
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 329) obj))
|
||||
(set! (-> obj sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "gnawer-crawl")
|
||||
:volume #x400
|
||||
:fo-min 30
|
||||
:fo-max 30
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(set! (-> obj sound)
|
||||
(new
|
||||
'process
|
||||
'ambient-sound
|
||||
(static-sound-spec "gnawer-crawl" :fo-min 30 :fo-max 30)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
)
|
||||
(set! (-> obj sound2) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "gnawer-chew")
|
||||
:volume #x400
|
||||
:fo-max 40
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(set! (-> obj sound2)
|
||||
(new 'process 'ambient-sound (static-sound-spec "gnawer-chew" :fo-max 40) (-> obj root-override trans))
|
||||
)
|
||||
(dotimes (v1-110 10)
|
||||
(let ((a0-59 (-> obj segments v1-110)))
|
||||
|
||||
@@ -199,19 +199,8 @@
|
||||
)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(initialize-skeleton obj *cavecrusher-sg* '())
|
||||
(set! (-> obj sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "crush-click")
|
||||
:volume #x400
|
||||
:fo-max 30
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "crush-click" :fo-max 30) (-> obj root-override trans))
|
||||
)
|
||||
(ja-channel-push! 1 0)
|
||||
(let ((s5-1 (-> obj skel root-channel 0)))
|
||||
@@ -347,8 +336,8 @@
|
||||
(until (or (or (not *target*)
|
||||
(< 28672.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans)))
|
||||
)
|
||||
(and (not (and (logtest? (-> *target* control unknown-surface00 flags) 2048)
|
||||
(zero? (logand (-> *target* control status) 1))
|
||||
(and (not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags surf11))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
(zero? (logand (-> *target* control root-prim prim-core action) (collide-action ca-7)))
|
||||
@@ -384,8 +373,8 @@
|
||||
)
|
||||
(until (ja-done? 0)
|
||||
(when (and (and *target* (>= 28672.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans))))
|
||||
(or (and (logtest? (-> *target* control unknown-surface00 flags) 2048)
|
||||
(zero? (logand (-> *target* control status) 1))
|
||||
(or (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags surf11))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
(logtest? (-> *target* control root-prim prim-core action) (collide-action ca-7))
|
||||
)
|
||||
@@ -866,20 +855,7 @@
|
||||
)
|
||||
(process-drawable-from-entity! obj arg0)
|
||||
(set! (-> obj sound)
|
||||
(new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "spatula")
|
||||
:volume #x400
|
||||
:fo-min 25
|
||||
:fo-max 50
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(new 'process 'ambient-sound (static-sound-spec "spatula" :fo-min 25 :fo-max 50) (-> obj root-override trans))
|
||||
)
|
||||
(case (-> (if (-> obj entity)
|
||||
(-> obj entity extra level)
|
||||
@@ -1009,20 +985,8 @@
|
||||
(set! (-> s5-1 frame-num) 0.0)
|
||||
)
|
||||
(transform-post)
|
||||
(set! (-> obj sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "spatula")
|
||||
:volume #x400
|
||||
:fo-min 25
|
||||
:fo-max 50
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "spatula" :fo-min 25 :fo-max 50) (-> obj root-override trans))
|
||||
)
|
||||
(go cavespatulatwo-idle)
|
||||
(none)
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
0.0
|
||||
)
|
||||
(let ((v1-11 (-> obj draw shadow-ctrl)))
|
||||
(set! (-> v1-11 settings flags) (logand -33 (-> v1-11 settings flags)))
|
||||
(logclear! (-> v1-11 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(let ((v1-14 (-> obj draw shadow-ctrl)))
|
||||
@@ -204,7 +204,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((v1-22 (-> obj draw shadow-ctrl)))
|
||||
(logior! (-> v1-22 settings flags) 32)
|
||||
(logior! (-> v1-22 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
)
|
||||
@@ -213,7 +213,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((v1-25 (-> obj draw shadow-ctrl)))
|
||||
(logior! (-> v1-25 settings flags) 32)
|
||||
(logior! (-> v1-25 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
)
|
||||
@@ -449,7 +449,7 @@
|
||||
)
|
||||
)
|
||||
(let ((v1-37 (-> self draw shadow-ctrl)))
|
||||
(logior! (-> v1-37 settings flags) 32)
|
||||
(logior! (-> v1-37 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(go mother-spider-egg-die-exit)
|
||||
@@ -464,7 +464,7 @@
|
||||
(behavior ()
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(let ((v1-3 (-> self draw shadow-ctrl)))
|
||||
(logior! (-> v1-3 settings flags) 32)
|
||||
(logior! (-> v1-3 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(lods-assign! (-> self draw) (-> self broken-look))
|
||||
@@ -528,7 +528,7 @@
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(clear-collide-with-as (-> self root-override))
|
||||
(let ((v1-5 (-> self draw shadow-ctrl)))
|
||||
(logior! (-> v1-5 settings flags) 32)
|
||||
(logior! (-> v1-5 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(let ((gp-0 (get-process *default-dead-pool* part-tracker #x4000)))
|
||||
@@ -581,7 +581,7 @@
|
||||
(send-event (ppointer->process (-> self parent-override)) 'untrigger)
|
||||
(logior! (-> self draw status) (draw-status hidden))
|
||||
(let ((v1-8 (-> self draw shadow-ctrl)))
|
||||
(logior! (-> v1-8 settings flags) 32)
|
||||
(logior! (-> v1-8 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(logclear! (-> self root-override nav-flags) (nav-flags navf0))
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
)
|
||||
(sound-trans-convert (-> s5-0 parms trans) a1-1)
|
||||
)
|
||||
(set! (-> s5-0 parms mask) (the-as uint 32))
|
||||
(set! (-> s5-0 parms mask) (sound-mask trans))
|
||||
(-> s5-0 id)
|
||||
)
|
||||
(let ((f0-5 (* 5120.0 (+ 0.9 (* 0.1 (cos (* 873.81335 (the float (mod (-> *display* base-frame-counter) 75)))))))))
|
||||
@@ -278,7 +278,7 @@
|
||||
(s4-0 (new 'stack-no-clear 'vector))
|
||||
(s5-0 (vector-normalize-copy! (new 'stack-no-clear 'vector) (-> arg0 root-override transv) 1.0))
|
||||
)
|
||||
(if (logtest? (-> arg0 root-override status) 4)
|
||||
(if (logtest? (-> arg0 root-override status) (cshape-moving-flags tsurf))
|
||||
(vector-flatten! s3-1 s3-1 (-> arg0 root-override local-normal))
|
||||
)
|
||||
(vector-normalize-copy! s4-0 s3-1 1.0)
|
||||
@@ -348,7 +348,7 @@
|
||||
)
|
||||
|
||||
(defmethod dummy-28 mother-spider-proj ((obj mother-spider-proj))
|
||||
(when (and *target* (zero? (logand (-> *target* state-flags) #x80f8)))
|
||||
(when (and *target* (zero? (logand (-> *target* state-flags) (state-flags sf03 sf04 sf05 sf06 sf07 sf15))))
|
||||
(let ((gp-0 (-> obj target)))
|
||||
(set! (-> gp-0 quad) (-> (target-pos 0) quad))
|
||||
(set! (-> gp-0 y) (+ 4915.2 (-> gp-0 y)))
|
||||
|
||||
@@ -408,8 +408,8 @@
|
||||
)
|
||||
|
||||
(defmethod is-player-stuck? mother-spider ((obj mother-spider))
|
||||
(when (and *target* (not (and (logtest? (-> *target* control unknown-surface00 flags) 2048)
|
||||
(zero? (logand (-> *target* control status) 1))
|
||||
(when (and *target* (not (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags surf11))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -453,7 +453,7 @@
|
||||
0.0
|
||||
)
|
||||
(let ((v1-11 (-> obj draw shadow-ctrl)))
|
||||
(set! (-> v1-11 settings flags) (logand -33 (-> v1-11 settings flags)))
|
||||
(logclear! (-> v1-11 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(let ((v1-14 (-> obj draw shadow-ctrl)))
|
||||
@@ -474,7 +474,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((v1-23 (-> obj draw shadow-ctrl)))
|
||||
(logior! (-> v1-23 settings flags) 32)
|
||||
(logior! (-> v1-23 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
)
|
||||
@@ -483,7 +483,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((v1-25 (-> obj draw shadow-ctrl)))
|
||||
(logior! (-> v1-25 settings flags) 32)
|
||||
(logior! (-> v1-25 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
)
|
||||
@@ -852,7 +852,7 @@
|
||||
:enter
|
||||
(behavior ()
|
||||
(let ((v1-1 (-> self draw shadow-ctrl)))
|
||||
(logior! (-> v1-1 settings flags) 32)
|
||||
(logior! (-> v1-1 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(set! (-> self mode) (the-as uint 0))
|
||||
@@ -1123,7 +1123,9 @@
|
||||
)
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(vector<-cspace! gp-0 (-> self node-list data 6))
|
||||
(if (or (logtest? (-> *target* state-flags) #x80f8) (< (vector-vector-distance gp-0 (camera-pos)) 8192.0))
|
||||
(if (or (logtest? (-> *target* state-flags) (state-flags sf03 sf04 sf05 sf06 sf07 sf15))
|
||||
(< (vector-vector-distance gp-0 (camera-pos)) 8192.0)
|
||||
)
|
||||
(go mother-spider-traveling (the-as uint 2))
|
||||
)
|
||||
)
|
||||
@@ -1139,8 +1141,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (or (not *target*) (and (logtest? (-> *target* control unknown-surface00 flags) 2048)
|
||||
(zero? (logand (-> *target* control status) 1))
|
||||
(if (or (not *target*) (and (logtest? (-> *target* control unknown-surface00 flags) (surface-flags surf11))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
)
|
||||
(set! (-> self last-player-in-air-time) (-> *display* base-frame-counter))
|
||||
@@ -1399,14 +1401,14 @@
|
||||
(go mother-spider-traveling (the-as uint 0))
|
||||
)
|
||||
(if (and (>= (- (-> *display* base-frame-counter) (-> self started-birthing-time)) (seconds 6))
|
||||
(zero? (logand (-> *target* state-flags) #x80f8))
|
||||
(zero? (logand (-> *target* state-flags) (state-flags sf03 sf04 sf05 sf06 sf07 sf15)))
|
||||
)
|
||||
(go mother-spider-traveling (the-as uint 1))
|
||||
)
|
||||
(if (and (>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.25))
|
||||
(> (-> self birthing-counter) 0)
|
||||
(and (>= 49152.0 (- (-> self max-dist-from-anchor) (-> self dist-from-anchor)))
|
||||
(zero? (logand (-> *target* state-flags) #x80f8))
|
||||
(zero? (logand (-> *target* state-flags) (state-flags sf03 sf04 sf05 sf06 sf07 sf15)))
|
||||
(TODO-RENAME-21 (-> self nav) (-> self root-override trans))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
:slope-up-traction 1.0
|
||||
:align-speed 1.0
|
||||
:mode 'air
|
||||
:flags #xc00
|
||||
:flags (surface-flags surf10 surf11)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -320,7 +320,7 @@
|
||||
(cond
|
||||
((>= (vector4-dot (camera-pos) (-> self shadow-enable-plane)) 0.0)
|
||||
(let ((v1-32 (-> self draw shadow-ctrl)))
|
||||
(set! (-> v1-32 settings flags) (logand -33 (-> v1-32 settings flags)))
|
||||
(logclear! (-> v1-32 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(let ((v1-35 (-> self draw shadow-ctrl)))
|
||||
@@ -334,7 +334,7 @@
|
||||
)
|
||||
(else
|
||||
(let ((v1-41 (-> self draw shadow-ctrl)))
|
||||
(logior! (-> v1-41 settings flags) 32)
|
||||
(logior! (-> v1-41 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(let ((v1-44 (-> self draw shadow-ctrl)))
|
||||
@@ -420,7 +420,7 @@
|
||||
(f26-0 (- (-> *standard-dynamics* gravity-length)))
|
||||
)
|
||||
(let ((v1-10 (-> self draw shadow-ctrl)))
|
||||
(logior! (-> v1-10 settings flags) 32)
|
||||
(logior! (-> v1-10 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(clear-collide-with-as (-> self root-override))
|
||||
@@ -486,7 +486,7 @@
|
||||
(initialize-skeleton self *keg-sg* '())
|
||||
(set! (-> self draw shadow-ctrl) (new 'process 'shadow-control 0.0 0.0 614400.0 (the-as float 60) 245760.0))
|
||||
(let ((v1-25 (-> self draw shadow-ctrl)))
|
||||
(logior! (-> v1-25 settings flags) 32)
|
||||
(logior! (-> v1-25 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(let ((s5-1 (new 'static 'vector :x -514715.0 :y 226968.0 :z 3906894.8 :w 1.0)))
|
||||
|
||||
@@ -852,14 +852,7 @@
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-rnd-flt spt-num 1.0 0.6 1.0)
|
||||
(sp-sound (new 'static 'sound-spec
|
||||
:mask #x1
|
||||
:num 0.05
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "steam-release")
|
||||
:volume #x400
|
||||
)
|
||||
)
|
||||
(sp-sound (static-sound-spec "steam-release" :num 0.05 :volume 100.0))
|
||||
(sp-rnd-flt spt-scale-x (meters 0.5) (meters 0.25) 1.0)
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -918,14 +911,7 @@
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-rnd-flt spt-num 1.0 0.6 1.0)
|
||||
(sp-sound (new 'static 'sound-spec
|
||||
:mask #x1
|
||||
:num 0.05
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "steam-release")
|
||||
:volume #x400
|
||||
)
|
||||
)
|
||||
(sp-sound (static-sound-spec "steam-release" :num 0.05 :volume 100.0))
|
||||
(sp-rnd-flt spt-scale-x (meters 0.5) (meters 0.25) 1.0)
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -985,14 +971,7 @@
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-rnd-flt spt-num 1.0 0.6 1.0)
|
||||
(sp-sound (new 'static 'sound-spec
|
||||
:mask #x1
|
||||
:num 0.05
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "steam-release")
|
||||
:volume #x400
|
||||
)
|
||||
)
|
||||
(sp-sound (static-sound-spec "steam-release" :num 0.05 :volume 100.0))
|
||||
(sp-rnd-flt spt-scale-x (meters 0.5) (meters 0.25) 1.0)
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
@@ -1052,14 +1031,7 @@
|
||||
:init-specs
|
||||
((sp-tex spt-texture (new 'static 'texture-id :page #x2))
|
||||
(sp-rnd-flt spt-num 1.0 0.6 1.0)
|
||||
(sp-sound (new 'static 'sound-spec
|
||||
:mask #x1
|
||||
:num 0.05
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "steam-release")
|
||||
:volume #x400
|
||||
)
|
||||
)
|
||||
(sp-sound (static-sound-spec "steam-release" :num 0.05 :volume 100.0))
|
||||
(sp-rnd-flt spt-scale-x (meters 0.5) (meters 0.25) 1.0)
|
||||
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
|
||||
(sp-copy-from-other spt-scale-y -4)
|
||||
|
||||
@@ -731,7 +731,7 @@
|
||||
)
|
||||
(restore-collide-with-as (-> self root-override))
|
||||
(set-vector! (-> self root-override scale) 0.6 0.6 0.6 1.0)
|
||||
(while (zero? (logand (-> self root-override status) 1))
|
||||
(while (zero? (logand (-> self root-override status) (cshape-moving-flags onsurf)))
|
||||
(if (and (zero? (-> self sfx))
|
||||
(< (if *target*
|
||||
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
|
||||
@@ -770,7 +770,7 @@
|
||||
)
|
||||
(sound-trans-convert (-> gp-1 parms trans) a1-3)
|
||||
)
|
||||
(set! (-> gp-1 parms mask) (the-as uint 32))
|
||||
(set! (-> gp-1 parms mask) (sound-mask trans))
|
||||
(-> gp-1 id)
|
||||
)
|
||||
)
|
||||
@@ -846,7 +846,7 @@
|
||||
(set! (-> self root-override root-prim prim-core offense) (collide-offense indestructible))
|
||||
(spawn-part self)
|
||||
(when (and (zero? (-> self draw cur-lod)) (logtest? (-> self draw status) (draw-status was-drawn)))
|
||||
(if (logtest? (-> self root-override status) 1)
|
||||
(if (logtest? (-> self root-override status) (cshape-moving-flags onsurf))
|
||||
(draw-shadow
|
||||
(-> self root-override shadow-pos)
|
||||
(-> self root-override shadow-pos)
|
||||
@@ -984,24 +984,8 @@
|
||||
:code
|
||||
(behavior ()
|
||||
(if (and *target* (= (-> *target* next-state name) 'target-periscope))
|
||||
(sound-play-by-spec
|
||||
(new 'static 'sound-spec
|
||||
:mask #xc0
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "explosion")
|
||||
:volume #x400
|
||||
:fo-min #xc8
|
||||
:fo-max #x190
|
||||
)
|
||||
(new-sound-id)
|
||||
(the-as vector #t)
|
||||
)
|
||||
(sound-play-by-spec
|
||||
(new 'static 'sound-spec :num 1.0 :group #x1 :sound-name (static-sound-name "explosion") :volume #x400)
|
||||
(new-sound-id)
|
||||
(the-as vector #t)
|
||||
)
|
||||
(sound-play-by-spec (static-sound-spec "explosion" :fo-min 200 :fo-max 400) (new-sound-id) (the-as vector #t))
|
||||
(sound-play-by-spec (static-sound-spec "explosion") (new-sound-id) (the-as vector #t))
|
||||
)
|
||||
(spawn (-> self part2) (-> self root-override trans))
|
||||
(ja-channel-set! 0)
|
||||
@@ -1048,7 +1032,7 @@
|
||||
(vector-float*! (-> arg0 transv) (-> arg0 transv) 0.15)
|
||||
(let ((v0-1 (logior s5-0 7)))
|
||||
(logior! (-> arg0 status) v0-1)
|
||||
(the-as uint v0-1)
|
||||
(the-as cshape-moving-flags v0-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
(let ((t9-0 (method-of-type water-anim TODO-RENAME-22)))
|
||||
(t9-0 obj)
|
||||
)
|
||||
(set! (-> obj flags) (logand -8388609 (-> obj flags)))
|
||||
(set! (-> obj flags) (logior #x40000 (-> obj flags)))
|
||||
(logclear! (-> obj flags) (water-flags wt23))
|
||||
(set! (-> obj flags) (logior (water-flags wt18) (-> obj flags)))
|
||||
(let ((gp-0 (new 'process 'ripple-control)))
|
||||
(set! (-> obj draw ripple) gp-0)
|
||||
(set! (-> gp-0 global-scale) 3072.0)
|
||||
|
||||
@@ -367,7 +367,7 @@
|
||||
(-> self root-override transv)
|
||||
(-> self root-override root-prim collide-with)
|
||||
)
|
||||
(if (or (logtest? (-> self root-override status) 8)
|
||||
(if (or (logtest? (-> self root-override status) (cshape-moving-flags twall))
|
||||
(< (vector-vector-distance (-> self root-override trans) (the-as vector (-> self root-override trans-old)))
|
||||
40.96
|
||||
)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
(set-setting! *setting-control* self 'allow-progress #f 0.0 0)
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(process-entity-status! self (entity-perm-status bit-3) #t)
|
||||
(while (or (not *target*) (logtest? (-> *target* state-flags) #x8008))
|
||||
(while (or (not *target*) (logtest? (-> *target* state-flags) (state-flags sf03 sf15)))
|
||||
(suspend)
|
||||
)
|
||||
(while (not (process-grab? *target*))
|
||||
@@ -457,7 +457,7 @@
|
||||
)
|
||||
(set! s4-0 #t)
|
||||
(let ((v1-17 s5-0))
|
||||
(set! (-> v1-17 settings flags) (logand -33 (-> v1-17 settings flags)))
|
||||
(logclear! (-> v1-17 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(let ((v1-19 s5-0))
|
||||
@@ -495,7 +495,7 @@
|
||||
)
|
||||
)
|
||||
(when (not s4-0)
|
||||
(logior! (-> s5-0 settings flags) 32)
|
||||
(logior! (-> s5-0 settings flags) (shadow-flags shdf05))
|
||||
0
|
||||
(set! (-> obj draw bounds quad) (-> obj default-bounds quad))
|
||||
(set! (-> obj draw origin-joint-index) (the-as uint 4))
|
||||
@@ -957,8 +957,8 @@
|
||||
(logclear! (-> self mask) (process-mask actor-pause))
|
||||
(close-specific-task! (game-task plunger-lurker-hit) (task-status unknown))
|
||||
(while (and *target*
|
||||
(logtest? (-> *target* control unknown-surface00 flags) 2048)
|
||||
(zero? (logand (-> *target* control status) 1))
|
||||
(logtest? (-> *target* control unknown-surface00 flags) (surface-flags surf11))
|
||||
(zero? (logand (-> *target* control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
@@ -1403,7 +1403,7 @@
|
||||
(new 'process 'shadow-control 131072.0 151552.0 614400.0 (the-as float 60) 409600.0)
|
||||
)
|
||||
(let ((v1-27 (-> obj draw shadow-ctrl)))
|
||||
(set! (-> v1-27 settings flags) (logand -33 (-> v1-27 settings flags)))
|
||||
(logclear! (-> v1-27 settings flags) (shadow-flags shdf05))
|
||||
)
|
||||
0
|
||||
(set! (-> obj alt-actor) (entity-actor-lookup arg0 'alt-actor 0))
|
||||
|
||||
@@ -1511,8 +1511,8 @@
|
||||
(set! (-> v1-2 global-scale) 2048.0)
|
||||
(set! (-> v1-2 waveform) ripple-for-ogre-lava)
|
||||
)
|
||||
(set! (-> obj flags) (logand -8388609 (-> obj flags)))
|
||||
(set! (-> obj flags) (logior #x2000000 (-> obj flags)))
|
||||
(logclear! (-> obj flags) (water-flags wt23))
|
||||
(set! (-> obj flags) (logior (water-flags wt25) (-> obj flags)))
|
||||
(set! (-> obj attack-event) 'lava)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
(if s3-1
|
||||
(set! sv-104 (logior sv-104 2))
|
||||
)
|
||||
(when (zero? (logand (-> arg0 prev-status) 1))
|
||||
(when (zero? (logand (-> arg0 prev-status) (cshape-moving-flags onsurf)))
|
||||
(set! (-> arg0 ground-impact-vel) (- (vector-dot (-> arg0 transv) (-> arg0 dynam gravity-normal))))
|
||||
(set! sv-96 (logior sv-96 2048))
|
||||
(when (not s3-1)
|
||||
@@ -116,19 +116,18 @@
|
||||
(set! (-> arg0 wall-pat) (-> arg1 best-tri pat))
|
||||
(vector-reflect-flat-above! arg2 (-> sv-88 0) sv-84)
|
||||
(cond
|
||||
((not
|
||||
(and (>= (-> arg1 best-from-prim local-sphere w)
|
||||
(vector-dot
|
||||
(-> arg0 ground-poly-normal)
|
||||
(vector-! (new 'stack-no-clear 'vector) (-> arg1 best-tri intersect) (-> arg0 ground-touch-point))
|
||||
)
|
||||
)
|
||||
(and (< 0.0 (vector-dot (-> arg0 ground-poly-normal) arg2))
|
||||
(< (- (-> *display* base-frame-counter) (-> arg0 unknown-dword10)) (seconds 0.3))
|
||||
(zero? (logand sv-104 32))
|
||||
)
|
||||
)
|
||||
)
|
||||
((not (and (>= (-> arg1 best-from-prim local-sphere w)
|
||||
(vector-dot
|
||||
(-> arg0 ground-poly-normal)
|
||||
(vector-! (new 'stack-no-clear 'vector) (-> arg1 best-tri intersect) (-> arg0 ground-touch-point))
|
||||
)
|
||||
)
|
||||
(and (< 0.0 (vector-dot (-> arg0 ground-poly-normal) arg2))
|
||||
(< (- (-> *display* base-frame-counter) (-> arg0 unknown-dword10)) (seconds 0.3))
|
||||
(zero? (logand sv-104 32))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! sv-104 (logior sv-104 256))
|
||||
@@ -183,7 +182,7 @@
|
||||
)
|
||||
)
|
||||
(logior! (-> arg0 status) sv-96)
|
||||
(set! (-> arg0 reaction-flag) (the-as uint sv-104))
|
||||
(set! (-> arg0 reaction-flag) (the-as cshape-reaction-flags sv-104))
|
||||
(update!
|
||||
(-> arg0 history-data (-> arg0 unknown-halfword00))
|
||||
arg0
|
||||
@@ -192,7 +191,7 @@
|
||||
arg2
|
||||
)
|
||||
(set! (-> arg0 unknown-halfword00) (logand (+ (-> arg0 unknown-halfword00) 1) 127))
|
||||
(the-as uint sv-96)
|
||||
(the-as cshape-moving-flags sv-96)
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
(set! (-> *hud-parts* power 0 y-sgn) 1)
|
||||
(logclear! (-> self control root-prim prim-core action) (collide-action ca-9 ca-16))
|
||||
(set! (-> self control unknown-surface00) *walk-mods*)
|
||||
(set! (-> self state-flags) (logand -1025 (-> self state-flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf10))
|
||||
(send-event *camera* 'clear-slave-option #x6000)
|
||||
(set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max))
|
||||
(set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length))
|
||||
@@ -325,7 +325,7 @@
|
||||
|
||||
(defbehavior target-racing-smack-check target ()
|
||||
(if (and (< 20480.0 (-> self control unknown-float01))
|
||||
(and (logtest? (-> self control status) 8)
|
||||
(and (logtest? (-> self control status) (cshape-moving-flags twall))
|
||||
(< (-> self control surface-angle) 0.5)
|
||||
(let ((gp-1 (vector-! (new 'stack-no-clear 'vector) (-> self control unknown-vector70) (-> self control trans)))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
@@ -387,7 +387,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (zero? (logand (-> self control status) 1))
|
||||
(if (and (zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
(or (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11))
|
||||
(* (-> *TARGET-bank* ground-timeout) 2)
|
||||
)
|
||||
@@ -612,14 +612,14 @@
|
||||
(vector-normalize! (-> self control transv) (+ (-> self control unknown-float01) (-> self racer hill-boost)))
|
||||
)
|
||||
)
|
||||
(if (and (logtest? (-> self control status) 1) (< 16384.0 (-> self control transv y)))
|
||||
(if (and (logtest? (-> self control status) (cshape-moving-flags onsurf)) (< 16384.0 (-> self control transv y)))
|
||||
(set! (-> self racer hop?) #f)
|
||||
(set! (-> self racer hop?) arg2)
|
||||
)
|
||||
(set! (-> self racer hop-start-y) (-> self control trans y))
|
||||
(racer-calc-gravity)
|
||||
(init-var-jump arg0 arg1 (the-as vector #t) (the-as vector #f) (-> self control transv))
|
||||
(set! (-> self control status) (logand -8 (-> self control status)))
|
||||
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(set! (-> self control unknown-surface00) *racer-air-mods*)
|
||||
(set! (-> self control unknown-float123)
|
||||
(fmax 0.0 (fmin 1.0 (* 0.00004359654 (+ -11468.8 (-> self control unknown-float01)))))
|
||||
@@ -654,9 +654,8 @@
|
||||
((cpad-pressed? (-> self control unknown-cpad-info00 number) l1 r1)
|
||||
(set! (-> self racer slide-down-time 0) (-> *display* base-frame-counter))
|
||||
)
|
||||
((zero?
|
||||
(logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1 r1))
|
||||
)
|
||||
((zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1 r1))
|
||||
)
|
||||
(set! (-> self racer slide-down-time 0) 0)
|
||||
0
|
||||
)
|
||||
@@ -690,7 +689,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (and (logtest? (-> self control status) 1)
|
||||
(if (and (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.1))
|
||||
)
|
||||
(go target-racing)
|
||||
@@ -738,7 +737,7 @@
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(racer-calc-gravity)
|
||||
(init-var-jump arg0 arg1 (the-as vector #t) (the-as vector #f) (-> self control transv))
|
||||
(set! (-> self control status) (logand -8 (-> self control status)))
|
||||
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
(set! (-> self control unknown-float123)
|
||||
(fmax 0.0 (fmin 1.0 (* 0.00004359654 (+ -11468.8 (-> self control unknown-float01)))))
|
||||
)
|
||||
@@ -776,7 +775,7 @@
|
||||
)
|
||||
(go target-racing-jump 2048.0 5324.8 #t)
|
||||
)
|
||||
(if (and (logtest? (-> self control status) 1)
|
||||
(if (and (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(>= (- (-> *display* base-frame-counter) (-> self state-time)) (seconds 0.1))
|
||||
)
|
||||
(go target-racing)
|
||||
@@ -929,7 +928,7 @@
|
||||
)
|
||||
:trans
|
||||
(behavior ()
|
||||
(if (logtest? (-> self control status) 1)
|
||||
(if (logtest? (-> self control status) (cshape-moving-flags onsurf))
|
||||
(go target-racing)
|
||||
)
|
||||
(target-racing-smack-check)
|
||||
@@ -980,7 +979,7 @@
|
||||
:exit
|
||||
(behavior ()
|
||||
(if (!= (-> self next-state name) 'target-racing-death)
|
||||
(set! (-> self state-flags) (logand -32777 (-> self state-flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf03 sf15))
|
||||
)
|
||||
((-> target-racing-start exit))
|
||||
(none)
|
||||
@@ -994,7 +993,7 @@
|
||||
(sound-play-by-name (static-sound-name "oof") (new-sound-id) 1024 0 0 1 #t)
|
||||
)
|
||||
(set! (-> self game hit-time) (-> *display* base-frame-counter))
|
||||
(logior! (-> self state-flags) 8)
|
||||
(logior! (-> self state-flags) (state-flags sf03))
|
||||
(set! (-> self racer boost-curve) 0.0)
|
||||
(set! (-> self racer boost-level) 0.0)
|
||||
(set! (-> self racer boost-target) 0.0)
|
||||
@@ -1066,7 +1065,7 @@
|
||||
(-> target-death event)
|
||||
:exit
|
||||
(behavior ()
|
||||
(set! (-> self state-flags) (logand -32769 (-> self state-flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf15))
|
||||
(send-event (ppointer->process (-> self manipy)) 'draw #t)
|
||||
(send-event (ppointer->process (-> self manipy)) 'anim-mode 'clone-anim)
|
||||
(target-timed-invulnerable-off self)
|
||||
@@ -1083,7 +1082,7 @@
|
||||
(set! (-> self racer stick-off) #t)
|
||||
(set! (-> self neck flex-blend) 0.0)
|
||||
(target-timed-invulnerable-off self)
|
||||
(logior! (-> self state-flags) #x8000)
|
||||
(logior! (-> self state-flags) (state-flags sf15))
|
||||
(case (-> self attack-info mode)
|
||||
(('explode 'darkeco 'heat 'death 'deadly 'balloonlurker)
|
||||
((-> target-racing-start exit))
|
||||
@@ -1311,7 +1310,7 @@
|
||||
(behavior ((arg0 handle))
|
||||
(set! (-> self control transv quad) (the-as uint128 0))
|
||||
(set! (-> self alt-cam-pos quad) (-> (&-> (-> self control) unknown-qword00) 0))
|
||||
(logior! (-> self state-flags) 1024)
|
||||
(logior! (-> self state-flags) (state-flags sf10))
|
||||
(set! (-> self state-time) (-> *display* base-frame-counter))
|
||||
(let ((gp-0 (new 'stack-no-clear 'vector)))
|
||||
(set! (-> gp-0 quad) (-> self control trans quad))
|
||||
@@ -1385,7 +1384,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self state-flags) (logand -1025 (-> self state-flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf10))
|
||||
(send-event *camera* 'set-slave-option #x6000)
|
||||
(set! (-> self control transv quad) (the-as uint128 0))
|
||||
(quaternion-copy! (-> self control quat) (-> self control unknown-quaternion00))
|
||||
@@ -1719,7 +1718,7 @@
|
||||
(-> target-hit-ground enter)
|
||||
:trans
|
||||
(behavior ()
|
||||
(logior! (-> self control status) 7)
|
||||
(logior! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
|
||||
((-> target-hit-ground trans))
|
||||
(none)
|
||||
)
|
||||
@@ -1780,15 +1779,15 @@
|
||||
(behavior ()
|
||||
(set! (-> self control unknown-surface00) *grab-mods*)
|
||||
(set! (-> self neck flex-blend) 0.0)
|
||||
(logior! (-> self state-flags) 272)
|
||||
(logior! (-> self state-flags) (state-flags sf04 sf08))
|
||||
(set! (-> self racer stick-off) #t)
|
||||
(none)
|
||||
)
|
||||
:exit
|
||||
(behavior ()
|
||||
(set! (-> self racer stick-off) #f)
|
||||
(set! (-> self state-flags) (logand -273 (-> self state-flags)))
|
||||
(set! (-> self water flags) (logand -65537 (-> self water flags)))
|
||||
(logclear! (-> self state-flags) (state-flags sf04 sf08))
|
||||
(logclear! (-> self water flags) (water-flags wt16))
|
||||
((-> target-racing-start exit))
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -475,19 +475,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj sound) (new
|
||||
'process
|
||||
'ambient-sound
|
||||
(new 'static 'sound-spec
|
||||
:mask #x80
|
||||
:num 1.0
|
||||
:group #x1
|
||||
:sound-name (static-sound-name "zoom-teleport")
|
||||
:volume #x400
|
||||
:fo-max 30
|
||||
)
|
||||
(-> obj root-override trans)
|
||||
)
|
||||
(set! (-> obj sound)
|
||||
(new 'process 'ambient-sound (static-sound-spec "zoom-teleport" :fo-max 30) (-> obj root-override trans))
|
||||
)
|
||||
(go (method-of-object obj wait-for-start))
|
||||
(none)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
:alignv 1.0
|
||||
:slope-up-traction 1.0
|
||||
:align-speed 1.0
|
||||
:flags #x1
|
||||
:flags (surface-flags surf00)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
:slope-up-traction 1.0
|
||||
:align-speed 1.0
|
||||
:mode 'air
|
||||
:flags #x801
|
||||
:flags (surface-flags surf00 surf11)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
)
|
||||
|
||||
(defbehavior racer-on-ground? racer ()
|
||||
(logtest? (-> self root-override status) 1)
|
||||
(logtest? (-> self root-override status) (cshape-moving-flags onsurf))
|
||||
)
|
||||
|
||||
(defbehavior racer-calc-gravity target ()
|
||||
@@ -128,16 +128,14 @@
|
||||
(let ((v1-1 (-> self racer slide-mode)))
|
||||
(cond
|
||||
((zero? v1-1)
|
||||
(if (zero?
|
||||
(logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1 r1))
|
||||
)
|
||||
(if (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1 r1))
|
||||
)
|
||||
(set! (-> self racer slide-mode) -1)
|
||||
)
|
||||
)
|
||||
((= v1-1 1)
|
||||
(if (zero?
|
||||
(logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1 r1))
|
||||
)
|
||||
(if (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1 r1))
|
||||
)
|
||||
(set! (-> self racer slide-mode) -1)
|
||||
)
|
||||
)
|
||||
@@ -300,11 +298,10 @@
|
||||
)
|
||||
(set! f0-13
|
||||
(cond
|
||||
((and (not
|
||||
(and (= (-> self fact-info-target eco-type) (pickup-type eco-yellow))
|
||||
(>= (-> self fact-info-target eco-level) 1.0)
|
||||
)
|
||||
)
|
||||
((and (not (and (= (-> self fact-info-target eco-type) (pickup-type eco-yellow))
|
||||
(>= (-> self fact-info-target eco-level) 1.0)
|
||||
)
|
||||
)
|
||||
(cpad-hold? (-> self control unknown-cpad-info00 number) square)
|
||||
)
|
||||
(if (and (cpad-hold? (-> self control unknown-cpad-info00 number) x)
|
||||
@@ -452,7 +449,7 @@
|
||||
)
|
||||
(deg-diff (vector-y-angle gp-0) (vector-y-angle (-> self control transv)))
|
||||
(let ((f30-2 (vector-xz-length gp-0)))
|
||||
(when (and (logtest? (-> self control status) 8)
|
||||
(when (and (logtest? (-> self control status) (cshape-moving-flags twall))
|
||||
(< 20480.0 f30-2)
|
||||
(and (< (fabs (-> self racer mod-x)) 0.5) (!= (-> self next-state name) 'target-racing-smack))
|
||||
)
|
||||
@@ -531,8 +528,10 @@
|
||||
)
|
||||
)
|
||||
(let ((f0-2
|
||||
(if (or (and (logtest? (-> self control status) 8) (zero? (logand (-> self control status) 1)))
|
||||
(logtest? (-> self state-flags) #x8000)
|
||||
(if (or (and (logtest? (-> self control status) (cshape-moving-flags twall))
|
||||
(zero? (logand (-> self control status) (cshape-moving-flags onsurf)))
|
||||
)
|
||||
(logtest? (-> self state-flags) (state-flags sf15))
|
||||
)
|
||||
0.0
|
||||
(-> self control unknown-float81)
|
||||
@@ -601,7 +600,9 @@
|
||||
((and (!= (-> self current-level name) 'ogre) (!= (-> self current-level name) 'lavatube))
|
||||
#f
|
||||
)
|
||||
((or (logtest? (-> self control status) 2) (< 12288.0 (vector-length (-> self control transv))))
|
||||
((or (logtest? (-> self control status) (cshape-moving-flags onground))
|
||||
(< 12288.0 (vector-length (-> self control transv)))
|
||||
)
|
||||
(let ((v0-5 (the-as object (-> *display* base-frame-counter))))
|
||||
(set! (-> self racer unstuck-time) (the-as time-frame v0-5))
|
||||
v0-5
|
||||
@@ -818,7 +819,7 @@
|
||||
)
|
||||
(cpad-pressed? (-> self control unknown-cpad-info00 number) circle square)
|
||||
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword82)) (seconds 0.25))
|
||||
(zero? (logand (-> self state-flags) #x8008))
|
||||
(zero? (logand (-> self state-flags) (state-flags sf03 sf15)))
|
||||
)
|
||||
(let ((gp-6 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> self control quat)))
|
||||
(s5-4 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self manipy 0 node-list data 4)))
|
||||
@@ -917,9 +918,8 @@
|
||||
(set! (-> self racer boost-curve) 0.0)
|
||||
)
|
||||
)
|
||||
(when (or (zero?
|
||||
(logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons x))
|
||||
)
|
||||
(when (or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons x))
|
||||
)
|
||||
(< (-> self control unknown-float01) 4096.0)
|
||||
(= (-> self racer boost-level) 0.0)
|
||||
)
|
||||
@@ -930,7 +930,7 @@
|
||||
(set! (-> v1-241 parms volume) -4)
|
||||
(set! (-> v1-241 auto-time) 120)
|
||||
(set! (-> v1-241 auto-from) 2)
|
||||
(set! (-> v1-241 parms mask) (the-as uint 17))
|
||||
(set! (-> v1-241 parms mask) (sound-mask volume time))
|
||||
(-> v1-241 id)
|
||||
)
|
||||
(set! (-> self racer boost-sound-id) (new 'static 'sound-id))
|
||||
@@ -955,7 +955,7 @@
|
||||
)
|
||||
(cpad-set-buzz! (-> *cpad-list* cpads 0) 0 1 (seconds 0.1))
|
||||
)
|
||||
(when (logtest? (-> self control status) 8)
|
||||
(when (logtest? (-> self control status) (cshape-moving-flags twall))
|
||||
(let* ((gp-8 (racer-find-prop-point (new 'stack-no-clear 'vector) (-> self control unknown-vector70)))
|
||||
(v1-274 (-> self control wall-pat material))
|
||||
(a1-54
|
||||
@@ -1540,7 +1540,7 @@
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((and (logtest? (-> self control status) 8)
|
||||
((and (logtest? (-> self control status) (cshape-moving-flags twall))
|
||||
(and (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (seconds 0.1))
|
||||
(or (-> self racer stick-lock) (< (target-move-dist (-> *TARGET-bank* stuck-time)) 4096.0))
|
||||
(not (and (= *cheat-mode* 'debug) (cpad-hold? (-> self control unknown-cpad-info00 number) r2)))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user