[decomp] macros for sound playback (#1453)

* `sound-play` macro

* update source

* fix `add-debug-light` lol

* fix `add-debug-light` forreal

* Update debug.gc

* update some mood/tod decomp
This commit is contained in:
ManDude
2022-06-13 23:39:22 +01:00
committed by GitHub
parent d73336bbf3
commit 8ccb1dfb66
247 changed files with 1698 additions and 2139 deletions
+13 -5
View File
@@ -28,11 +28,11 @@ std::string meters_to_string(float value, bool append_trailing_decimal) {
}
/*!
* Convert a fixed point value to a string. Fixed point values usually end up with strange numbers
* Convert a fixed point value to a float. Fixed point values usually end up with strange numbers
* that were definitely not what was written when we do a naive conversion. This function
* is a bit more clever.
*/
std::string fixed_point_to_string(s64 value, s64 scale, bool append_trailing_decimal) {
float fixed_point_to_float(s64 value, s64 scale) {
float sign = value < 0 ? -1 : 1;
value = std::abs(value);
double naive = (double)value / scale;
@@ -54,7 +54,7 @@ std::string fixed_point_to_string(s64 value, s64 scale, bool append_trailing_dec
fixed_add += 5;
}
if ((s64)((fixed_start + fixed_add) / flt_scale * scale) == value) {
return float_to_string((fixed_start + fixed_add) / flt_scale * sign, append_trailing_decimal);
return (fixed_start + fixed_add) / flt_scale * sign;
}
// add e.g. 0.001 in a 1/1000 scale
@@ -63,10 +63,18 @@ std::string fixed_point_to_string(s64 value, s64 scale, bool append_trailing_dec
fixed_add += 1;
}
if ((s64)((fixed_start + fixed_add) / flt_scale * scale) == value) {
return float_to_string((fixed_start + fixed_add) / flt_scale * sign, append_trailing_decimal);
return (fixed_start + fixed_add) / flt_scale * sign;
}
// added too much!
ASSERT_MSG(false, fmt::format("fixed_point_to_string failed hard. v: {} s: {}", value, scale));
ASSERT_MSG(false, fmt::format("fixed_point_to_float failed hard. v: {} s: {}", value, scale));
return 0;
}
/*!
* Convert a fixed point value to a string. Wrapper around fixed_point_to_string
*/
std::string fixed_point_to_string(s64 value, s64 scale, bool append_trailing_decimal) {
return float_to_string(fixed_point_to_float(value, scale), append_trailing_decimal);
}
/*!
+1
View File
@@ -3,6 +3,7 @@
#include <string>
#include "common/common_types.h"
float fixed_point_to_float(s64 value, s64 scale);
std::string fixed_point_to_string(s64 value, s64 scale, bool append_trailing_decimal = false);
std::string float_to_string(float value, bool append_trailing_decimal = true);
std::string meters_to_string(float value, bool append_trailing_decimal = false);
+127
View File
@@ -3058,6 +3058,133 @@ void FunctionCallElement::update_from_stack(const Env& env,
}
}
// check for sound-play stuff
{
if (arg_forms.size() == 7 && unstacked.at(0)->to_form(env).is_symbol("sound-play-by-name")) {
auto ssn = arg_forms.at(0)->to_string(env);
static const std::string ssn_check = "(static-sound-name \"";
// idk what a good way to do this is :(
if (ssn.substr(0, ssn_check.size()) == ssn_check) {
// get sound name
auto sound_name = ssn.substr(ssn_check.size(), ssn.size() - ssn_check.size() - 2);
// get sound id
auto so_id_f = arg_forms.at(1);
if (so_id_f->to_string(env) == "(new-sound-id)") {
so_id_f = nullptr;
}
// get sound volume
bool panic = false;
auto so_vol_o = arg_forms.at(2)->to_form(env);
Form* so_vol_f = nullptr;
if (so_vol_o.is_int()) {
auto vol_as_flt_temp = fixed_point_to_float(so_vol_o.as_int(), 1024) * 100;
// fixed point convert is good but floating point accuracy sucks so we can do even better
// with a hardcoded case
for (int i = 0; i < 100; ++i) {
if (int(i * 1024.0f / 100.0f) == so_vol_o.as_int()) {
vol_as_flt_temp = i;
break;
}
}
// make the number now...
if (int(vol_as_flt_temp * 1024.0f / 100.0f) == so_vol_o.as_int()) {
if (so_vol_o.as_int() != 1024) {
so_vol_f = pool.form<ConstantTokenElement>(float_to_string(vol_as_flt_temp, false));
}
}
} else {
auto mr_vol = match(
Matcher::cast("int", Matcher::op_fixed(FixedOperatorKind::MULTIPLICATION,
{Matcher::single(10.24f), Matcher::any(0)})),
arg_forms.at(2));
if (mr_vol.matched) {
so_vol_f = mr_vol.maps.forms.at(0);
} else {
// AAAHHHH i dont know how to handle this volume thing!
panic = true;
}
}
// get sound pitch mod
auto so_pitch_o = arg_forms.at(3)->to_form(env);
Form* so_pitch_f = nullptr;
if (so_pitch_o.is_int()) {
if (so_pitch_o.as_int() != 0) {
so_pitch_f =
pool.form<ConstantTokenElement>(fixed_point_to_string(so_pitch_o.as_int(), 1524));
}
} else {
auto mr_pitch = match(
Matcher::cast("int", Matcher::op_fixed(FixedOperatorKind::MULTIPLICATION,
{Matcher::single(1524), Matcher::any(0)})),
arg_forms.at(3));
if (mr_pitch.matched) {
so_pitch_f = mr_pitch.maps.forms.at(0);
} else {
panic = true;
}
}
// rest
if (!panic) {
auto so_bend = arg_forms.at(4);
if (so_bend->to_form(env).is_int(0)) {
so_bend = nullptr;
}
auto elt_group = arg_forms.at(5)->try_as_element<GenericElement>();
if (elt_group && elt_group->op().is_func() &&
elt_group->op().func()->to_form(env).is_symbol("sound-group") &&
elt_group->elts().size() == 1) {
Form* so_group_f = nullptr;
if (!elt_group->elts().at(0)->to_form(env).is_symbol("sfx")) {
so_group_f = pool.form<ConstantTokenElement>(
elt_group->elts().at(0)->to_form(env).as_symbol()->name);
}
auto so_positional_f = arg_forms.at(6);
if (so_positional_f->to_form(env).is_symbol("#t")) {
so_positional_f = nullptr;
}
// now make the macro call!
std::vector<Form*> macro_args;
macro_args.push_back(pool.form<StringConstantElement>(sound_name));
if (so_id_f) {
macro_args.push_back(pool.form<ConstantTokenElement>(":id"));
macro_args.push_back(so_id_f);
}
if (so_vol_f) {
macro_args.push_back(pool.form<ConstantTokenElement>(":vol"));
macro_args.push_back(so_vol_f);
}
if (so_pitch_f) {
macro_args.push_back(pool.form<ConstantTokenElement>(":pitch"));
macro_args.push_back(so_pitch_f);
}
if (so_bend) {
macro_args.push_back(pool.form<ConstantTokenElement>(":bend"));
macro_args.push_back(so_bend);
}
if (so_group_f) {
macro_args.push_back(pool.form<ConstantTokenElement>(":group"));
macro_args.push_back(so_group_f);
}
if (so_positional_f) {
macro_args.push_back(pool.form<ConstantTokenElement>(":position"));
macro_args.push_back(so_positional_f);
}
new_form = pool.alloc_element<GenericElement>(
GenericOperator::make_function(pool.form<ConstantTokenElement>("sound-play")),
macro_args);
result->push_back(new_form);
return;
}
}
}
}
}
new_form = pool.alloc_element<GenericElement>(GenericOperator::make_function(unstacked.at(0)),
arg_forms);
+23 -10
View File
@@ -2970,6 +2970,19 @@
;; - Types
(defenum sound-group
:bitfield #t
:type uint8
(sfx)
(music)
(dialog)
(sog3)
(ambient)
(sog5)
(sog6)
(sog7)
)
(deftype sound-id (uint32)
()
(:methods
@@ -3023,7 +3036,7 @@
(priority int8 :offset-assert 11)
(volume int32 :offset-assert 12)
(trans vector3w :inline :offset-assert 16)
(group uint8 :offset-assert 28)
(group sound-group :offset-assert 28)
)
:pack-me
:method-count-assert 9
@@ -3048,7 +3061,7 @@
)
(deftype sound-rpc-group-cmd (sound-rpc-cmd)
((group uint8 :offset-assert 4)
((group sound-group :offset-assert 4)
)
:method-count-assert 9
:size-assert #x5
@@ -3283,9 +3296,9 @@
(deftype sound-spec (basic)
((mask sound-mask :offset-assert 4)
(num float :offset-assert 8)
(group uint8 :offset-assert 12)
(group sound-group :offset-assert 12)
(sound-name-char uint8 16 :offset 16)
(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)
@@ -16301,7 +16314,7 @@
(define-extern effect-param->sound-spec (function sound-spec (pointer float) int sound-spec))
(define-extern ear-trans (function vector))
(define-extern sound-play-by-spec (function sound-spec sound-id vector sound-id))
(define-extern sound-play-by-name (function sound-name sound-id int int int int symbol sound-id))
(define-extern sound-play-by-name (function sound-name sound-id int int int sound-group symbol sound-id))
(define-extern sound-angle-convert (function float int))
(define-extern sound-set-ear-trans (function vector vector float int))
(define-extern activate-progress (function process progress-screen none))
@@ -16324,13 +16337,13 @@
(define-extern swap-sound-buffers (function vector vector float int))
(define-extern free-last-sound-buffer-entry (function int))
(define-extern sound-basic-cb (function int (pointer int32) none))
(define-extern sound-set-volume (function uint float int))
(define-extern sound-set-volume (function sound-group float int))
(define-extern sound-set-reverb (function int float float uint int))
(define-extern sound-pause (function sound-id int))
(define-extern sound-continue (function sound-id int))
(define-extern sound-group-pause (function uint int))
(define-extern sound-group-stop (function uint int))
(define-extern sound-group-continue (function uint int))
(define-extern sound-group-pause (function sound-group int))
(define-extern sound-group-stop (function sound-group int))
(define-extern sound-group-continue (function sound-group int))
(define-extern sound-set-falloff-curve (function int float float int))
(define-extern sound-set-sound-falloff (function sound-name int int int int))
(define-extern sound-set-flava (function uint int))
@@ -18601,7 +18614,7 @@
(define-extern update-mood-jungleb-blue (function mood-context float int none))
(define-extern update-mood-prt-color (function mood-context vector))
(define-extern update-mood-default (function mood-context float int none))
(define-extern update-mood-misty (function mood-context float float none))
(define-extern update-mood-misty (function mood-context float int none))
(define-extern update-mood-village2 (function mood-context float int none))
(define-extern update-mood-swamp (function mood-context float int none))
(define-extern update-mood-village1 (function mood-context float int none))
@@ -3739,7 +3739,18 @@
"s4-0": ["s4-0", "vector"],
"v1-42": ["v1-42", "vector"],
"s3-1": "lod-to-use",
"f30-1": "cam-dist"
"f30-1": "cam-dist",
"s3-0": "tod",
"v1-17": "shadow-msk",
"a0-10": "lev-idx",
"s0-1": "lgt",
"s1-1": "cur-lgt",
"s2-0": "vu-lgt",
"a1-22": "lgt-msk-0",
"a2-14": "lgt-msk-1",
"f26-0": "lgt-interp",
"f28-0": "interp",
"f30-0": "cur-interp"
}
},
+3 -3
View File
@@ -502,7 +502,7 @@
(s4-1 string->sound-name)
)
(format (clear *temp-string*) "spool-~S" arg0)
(let ((s5-2 (s5-1 (s4-1 *temp-string*) (new-sound-id) 1024 0 0 1 #t)))
(let ((s5-2 (s5-1 (s4-1 *temp-string*) (new-sound-id) 1024 0 0 (sound-group sfx) #t)))
(set! (-> self sound-id) s5-2)
(let ((s4-3 (-> *display* base-frame-counter)))
(while (and (!= (current-str-id) s5-2) (< (- (-> *display* base-frame-counter) s4-3) (seconds 5)))
@@ -554,7 +554,7 @@
)
(format (clear *temp-string*) "spool-~S" arg0)
(set! (-> self sound-id)
(s5-0 (s4-0 *temp-string*) (new-sound-id) 1024 1 0 1 (the-as symbol (-> self trans)))
(s5-0 (s4-0 *temp-string*) (new-sound-id) 1024 1 0 (sound-group sfx) (the-as symbol (-> self trans)))
)
)
)
@@ -563,7 +563,7 @@
(s4-2 string->sound-name)
)
(format (clear *temp-string*) "spool-~S" arg0)
(set! (-> self sound-id) (s5-1 (s4-2 *temp-string*) (new-sound-id) 1024 0 0 1 #t))
(set! (-> self sound-id) (s5-1 (s4-2 *temp-string*) (new-sound-id) 1024 0 0 (sound-group sfx) #t))
)
)
)
+12 -18
View File
@@ -677,23 +677,17 @@
)
(when (>= (-> *math-camera* trans y) -81920.0)
(if arg6
(sound-play-by-name
(static-sound-name "thunder")
*thunder-id*
(the int (* 10.24 (rand-vu-float-range 25.0 75.0)))
(the int (* 1524.0 (rand-vu-float-range -1.0 1.0)))
0
1
#t
(sound-play
"thunder"
:id *thunder-id*
:vol (rand-vu-float-range 25.0 75.0)
:pitch (rand-vu-float-range -1.0 1.0)
)
(sound-play-by-name
(static-sound-name "thunder")
*thunder-id*
(the int (* 10.24 (rand-vu-float-range 200.0 400.0)))
(the int (* 1524.0 (rand-vu-float-range -1.0 1.0)))
0
1
#t
(sound-play
"thunder"
:id *thunder-id*
:vol (rand-vu-float-range 200.0 400.0)
:pitch (rand-vu-float-range -1.0 1.0)
)
)
)
@@ -914,11 +908,11 @@
)
(defun update-mood-misty ((arg0 mood-context) (arg1 float) (arg2 float))
(defun update-mood-misty ((arg0 mood-context) (arg1 float) (arg2 int))
(update-mood-fog arg0 arg1)
(update-mood-sky-texture arg0 arg1)
(clear-mood-times arg0)
(update-mood-palette arg0 arg1 (the-as int arg2))
(update-mood-palette arg0 arg1 arg2)
(when *time-of-day-effects*
(update-mood-flames arg0 2 4 0 0.333 0.001953125 1.0)
(let* ((s4-1 (get-task-control (game-task misty-warehouse)))
+1 -1
View File
@@ -386,7 +386,7 @@
(collide-kind background)
(the-as process #f)
s4-2
(new 'static 'pat-surface :camera #x1 :nocamera #x1 :nolineofsight #x1)
(new 'static 'pat-surface :nocamera #x1 :nolineofsight #x1)
)
)
)
+4 -4
View File
@@ -1924,7 +1924,7 @@
(cam-los-spline-collide
(the-as vector (+ (the-as uint (-> *camera* target-spline)) (* 48 (-> *camera* target-spline end-point))))
arg0
(new 'static 'pat-surface :camera #x1 :nocamera #x1 :nolineofsight #x1)
(new 'static 'pat-surface :nocamera #x1 :nolineofsight #x1)
)
)
)
@@ -1957,7 +1957,7 @@
(cam-los-spline-collide
(the-as vector (+ (the-as uint (-> *camera* target-spline)) (* 48 s2-2)))
arg0
(new 'static 'pat-surface :camera #x1 :nocamera #x1 :nolineofsight #x1)
(new 'static 'pat-surface :nocamera #x1 :nolineofsight #x1)
)
)
(< f30-1 0.0)
@@ -2224,7 +2224,7 @@
(let ((f30-0 (vector-length (-> self view-flat))))
(vector--float*! s5-0 (-> *camera* tpos-curr) (-> *camera* local-down) (-> *camera* target-height))
(vector-! s5-0 s5-0 (-> self string-trans))
(cam-los-collide (-> self string-trans) s5-0 gp-0 (new 'static 'pat-surface :camera #x1 :nocamera #x1 :nolineofsight #x1))
(cam-los-collide (-> self string-trans) s5-0 gp-0 (new 'static 'pat-surface :nocamera #x1 :nolineofsight #x1))
(when (-> gp-0 vert-next y)
(when (or (= (-> self los-state) (slave-los-state ccw)) (= (-> self los-state) (slave-los-state cw)))
(let ((a0-6 (new 'stack-no-clear 'vector)))
@@ -2859,7 +2859,7 @@
(collide-kind background cak-3 wall-object ground-object cak-14)
(the-as process #f)
s4-0
(new 'static 'pat-surface :camera #x1 :nocamera #x1 :nolineofsight #x1)
(new 'static 'pat-surface :nocamera #x1 :nolineofsight #x1)
)
)
)
@@ -305,7 +305,7 @@
(-> arg0 history-data (logand (+ (-> arg0 unknown-halfword00) 127) 127))
(cond
(#f
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-options")
(set! sv-104 (logior sv-104 8192))
(vector-reflect-flat-above! arg2 (the-as vector (-> sv-88 vector)) sv-84)
)
+12 -23
View File
@@ -907,31 +907,20 @@
(defun-debug add-debug-light ((arg0 symbol) (arg1 bucket-id) (arg2 light) (arg3 vector) (arg4 string))
(if (not arg0)
(return #f)
)
(return #f)
)
(when (!= (-> arg2 levels x) 0.0)
(add-debug-vector arg0 arg1
arg3
(-> arg2 direction)
(meters 3)
(static-rgba #xff #xff #xff #x80)
(add-debug-vector arg0 arg1 arg3 (-> arg2 direction) (meters 3) (static-rgba #xff #xff #xff #x80))
(let ((light-vec-end (vector+*! (new-stack-vector0) arg3 (-> arg2 direction) (* (meters 3) (-> arg2 levels x))))
;; the original code here uses w for alpha but that looks terrible
(light-rgba (new 'static 'rgba :r (the int (* 128.0 (-> arg2 color x)))
:g (the int (* 128.0 (-> arg2 color y)))
:b (the int (* 128.0 (-> arg2 color z)))
:a 128
)))
(add-debug-text-sphere arg0 arg1 light-vec-end (* (meters 0.5) (-> arg2 levels x)) (string-format "~S ~,,2f" arg4 (-> arg2 levels x)) light-rgba)
)
)
;; this might be wrong
(let ((light-vec-end (vector+*! (new-stack-vector0) arg3 (-> arg2 direction) (* (meters 3) (-> arg2 levels x))))
(light-rgba (new 'static 'rgba :r (the int (* 128.0 (-> arg2 color x)))
:g (the int (* 128.0 (-> arg2 color y)))
:b (the int (* 128.0 (-> arg2 color z)))
:a (the int (* 128.0 (-> arg2 color w)))
))
)
(add-debug-text-sphere arg0 arg1
light-vec-end
(* (meters 0.5) (-> arg2 levels x))
(string-format "~S ~,,2f" arg4 (-> arg2 levels x))
light-rgba
)
)
)
#f
)
+74 -79
View File
@@ -521,8 +521,8 @@
(logclear! (-> arg1 status) (draw-status was-drawn))
(when (zero? (logand (-> arg1 status) (draw-status hidden no-anim no-skeleton-update)))
(let ((s4-0 (the-as vector (+ 48 (the-as int (scratchpad-object int)))))
(s2-0 (the-as vu-lights (+ 64 (the-as int (scratchpad-object int)))))
(s3-0 *time-of-day-context*)
(vu-lgt (the-as vu-lights (+ 64 (the-as int (scratchpad-object int)))))
(tod *time-of-day-context*)
)
(.lvf vf16 (&-> arg1 origin quad))
(.lvf vf17 (&-> arg1 bounds quad))
@@ -534,135 +534,130 @@
(when (sphere-in-view-frustum? (the-as sphere s4-0))
(case (-> arg1 global-effect)
(((draw-effect title))
(when (not (-> s3-0 title-updated))
(set! (-> s3-0 title-updated) #t)
(when (not (-> tod title-updated))
(set! (-> tod title-updated) #t)
(let ((s0-0 (-> *math-camera* inv-camera-rot))
(a1-1 (new 'stack-no-clear 'vector))
(s1-0 (new 'stack-no-clear 'vector))
)
(set-vector! a1-1 0.612 0.5 -0.612 0.0)
(set-vector! s1-0 -0.696 0.174 0.696 0.0)
(vector-matrix*! (the-as vector (-> s3-0 title-light-group)) a1-1 s0-0)
(vector-matrix*! (the-as vector (-> s3-0 title-light-group dir1)) s1-0 s0-0)
(vector-matrix*! (the-as vector (-> tod title-light-group)) a1-1 s0-0)
(vector-matrix*! (the-as vector (-> tod title-light-group dir1)) s1-0 s0-0)
)
(set-vector! (-> *time-of-day-context* current-shadow) 0.612 -0.5 -0.612 1.0)
)
(vu-lights<-light-group! s2-0 (-> s3-0 title-light-group))
(vu-lights<-light-group! vu-lgt (-> tod title-light-group))
)
(else
(let ((f28-0 (-> arg1 secondary-interp))
(f30-0 (-> arg1 current-secondary-interp))
(v1-17 (-> arg1 shadow-mask))
(a0-10 (-> arg1 level-index))
(s0-1 (-> s3-0 light-group (-> *target* draw light-index)))
(s1-1 (new 'stack-no-clear 'light-group))
(let ((interp (-> arg1 secondary-interp))
(cur-interp (-> arg1 current-secondary-interp))
(shadow-msk (-> arg1 shadow-mask))
(lev-idx (-> arg1 level-index))
(lgt (-> tod light-group (-> *target* draw light-index)))
(cur-lgt (new 'stack-no-clear 'light-group))
)
(cond
((= (-> arg1 light-index) 255)
)
((= a0-10 2)
(set! s0-1 (-> s3-0 light-group (-> arg1 light-index)))
((= lev-idx 2)
(set! lgt (-> tod light-group (-> arg1 light-index)))
)
(else
(set! s0-1 (-> s3-0 moods a0-10 light-group (-> arg1 light-index)))
(set! lgt (-> tod moods lev-idx light-group (-> arg1 light-index)))
)
)
(when (not (or (= a0-10 2) (zero? v1-17)))
(let* ((a1-22 (-> s3-0 light-masks-0 a0-10))
(a2-14 (-> s3-0 light-masks-1 a0-10))
(f26-0 (-> s3-0 light-interp a0-10))
(a0-13 (logand a1-22 v1-17))
(v1-18 (logand a2-14 v1-17))
(when (not (or (= lev-idx 2) (zero? shadow-msk)))
(let* ((lgt-msk-0 (-> tod light-masks-0 lev-idx))
(lgt-msk-1 (-> tod light-masks-1 lev-idx))
(lgt-interp (-> tod light-interp lev-idx))
(a0-13 (logand lgt-msk-0 shadow-msk))
(v1-18 (logand lgt-msk-1 shadow-msk))
)
(cond
((and (zero? a0-13) (zero? v1-18))
)
(else
(set! f28-0 (cond
((and (nonzero? a0-13) (nonzero? v1-18))
1.0
)
((zero? a0-13)
(quad-copy! (the-as pointer s1-1) (the-as pointer s0-1) 12)
(set! s0-1 s1-1)
(set! (-> s0-1 dir1 levels x) 0.0)
f26-0
)
(else
(quad-copy! (the-as pointer s1-1) (the-as pointer s0-1) 12)
(set! s0-1 s1-1)
(set! (-> s0-1 dir0 levels x) 0.0)
(- 1.0 f26-0)
(set! interp (cond
((and (nonzero? a0-13) (nonzero? v1-18))
1.0
)
)
((zero? a0-13)
(quad-copy! (the-as pointer cur-lgt) (the-as pointer lgt) 12)
(set! lgt cur-lgt)
(set! (-> lgt dir1 levels x) 0.0)
lgt-interp
)
(else
(quad-copy! (the-as pointer cur-lgt) (the-as pointer lgt) 12)
(set! lgt cur-lgt)
(set! (-> lgt dir0 levels x) 0.0)
(- 1.0 lgt-interp)
)
)
)
)
)
)
)
(if *teleport*
(set! f30-0 f28-0)
(set! cur-interp interp)
)
(when (not (or (paused?) (= f28-0 f30-0)))
(let ((f0-15 (- f30-0 f28-0)))
(set! f30-0 (cond
((< (fabs f0-15) 0.2)
f28-0
)
((< f0-15 0.0)
(+ 0.2 f30-0)
)
(else
(+ -0.2 f30-0)
)
)
(when (not (or (paused?) (= interp cur-interp)))
(let ((f0-15 (- cur-interp interp)))
(set! cur-interp (cond
((< (fabs f0-15) 0.2)
interp
)
((< f0-15 0.0)
(+ 0.2 cur-interp)
)
(else
(+ -0.2 cur-interp)
)
)
)
)
(set! (-> arg1 current-secondary-interp) f30-0)
(set! (-> arg1 current-secondary-interp) cur-interp)
)
(cond
((= f30-0 0.0)
(vu-lights<-light-group! s2-0 s0-1)
((= cur-interp 0.0)
(vu-lights<-light-group! vu-lgt lgt)
)
(else
(if (!= s0-1 s1-1)
(quad-copy! (the-as pointer s1-1) (the-as pointer s0-1) 12)
(if (!= lgt cur-lgt)
(quad-copy! (the-as pointer cur-lgt) (the-as pointer lgt) 12)
)
(let ((f0-20 (- 1.0 f30-0)))
(set! (-> s1-1 dir0 levels x) (* (-> s1-1 dir0 levels x) f0-20))
(set! (-> s1-1 dir0 levels y) (* (-> s1-1 dir0 levels y) f0-20))
(set! (-> s1-1 dir1 levels x) (* (-> s1-1 dir1 levels x) f0-20))
(set! (-> s1-1 dir1 levels y) (* (-> s1-1 dir1 levels y) f0-20))
(set! (-> s1-1 dir2 levels x) (* (-> s1-1 dir2 levels x) f0-20))
(set! (-> s1-1 dir2 levels y) (* (-> s1-1 dir2 levels y) f0-20))
(let ((f0-20 (- 1.0 cur-interp)))
(set! (-> cur-lgt dir0 levels x) (* (-> cur-lgt dir0 levels x) f0-20))
(set! (-> cur-lgt dir0 levels y) (* (-> cur-lgt dir0 levels y) f0-20))
(set! (-> cur-lgt dir1 levels x) (* (-> cur-lgt dir1 levels x) f0-20))
(set! (-> cur-lgt dir1 levels y) (* (-> cur-lgt dir1 levels y) f0-20))
(set! (-> cur-lgt dir2 levels x) (* (-> cur-lgt dir2 levels x) f0-20))
(set! (-> cur-lgt dir2 levels y) (* (-> cur-lgt dir2 levels y) f0-20))
)
(vu-lights<-light-group! s2-0 s1-1)
(vu-lights<-light-group! vu-lgt cur-lgt)
)
)
)
(.lvf vf2 (&-> s2-0 color 0 quad))
(.lvf vf3 (&-> s2-0 color 1 quad))
(.lvf vf4 (&-> s2-0 color 2 quad))
(.lvf vf5 (&-> s2-0 ambient quad))
(.lvf vf2 (&-> vu-lgt color 0 quad))
(.lvf vf3 (&-> vu-lgt color 1 quad))
(.lvf vf4 (&-> vu-lgt color 2 quad))
(.lvf vf5 (&-> vu-lgt ambient quad))
(.mul.vf vf5 vf5 vf28)
(.mul.vf vf2 vf2 vf28)
(.mul.vf vf3 vf3 vf28)
(.mul.vf vf4 vf4 vf28)
(.add.vf vf5 vf5 vf29)
(.svf (&-> s2-0 color 0 quad) vf2)
(.svf (&-> s2-0 color 1 quad) vf3)
(.svf (&-> s2-0 color 2 quad) vf4)
(.svf (&-> s2-0 ambient quad) vf5)
(.svf (&-> vu-lgt color 0 quad) vf2)
(.svf (&-> vu-lgt color 1 quad) vf3)
(.svf (&-> vu-lgt color 2 quad) vf4)
(.svf (&-> vu-lgt ambient quad) vf5)
(.mov v1-37 vf5)
)
)
(if *display-lights*
(add-debug-lights
#t
(bucket-id debug)
(the-as (inline-array light) (-> s3-0 light-group))
(-> arg1 origin)
)
(add-debug-lights #t (bucket-id debug) (the-as (inline-array light) (-> tod light-group)) (-> arg1 origin))
)
(let ((at-0 *math-camera*))
(.lvf vf16 (&-> at-0 plane 0 quad))
+2 -1
View File
@@ -13,7 +13,8 @@
;; DECOMP BEGINS
(defun eco-fadeout ((arg0 sparticle-system) (arg1 sparticle-cpuinfo))
(if (zero? (logand (-> (the-as process-drawable (-> arg1 key proc)) state-flags) (state-flags fade-out-particles)))
(if (zero? (logand (-> (the-as process-drawable (-> arg1 key proc)) state-flags) (state-flags fade-out-particles))
)
(set! (-> arg1 next-time) (the-as uint (* (-> *sp-frame-time* x) 2)))
)
0
+9 -9
View File
@@ -404,7 +404,7 @@
:virtual #t
:code (behavior ()
(if (type-type? (-> self type) fuel-cell)
(sound-play-by-name (static-sound-name "cell-prize") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cell-prize")
)
(logclear! (-> self mask) (process-mask actor-pause))
(let ((gp-1 (new 'stack 'trajectory)))
@@ -763,13 +763,13 @@
)
(case (-> self fact pickup-type)
(((pickup-type eco-yellow))
(sound-play-by-name (static-sound-name "y-eco-pickup") (new-sound-id) 1024 0 0 1 #t)
(sound-play "y-eco-pickup")
)
(((pickup-type eco-red))
(sound-play-by-name (static-sound-name "r-eco-pickup") (new-sound-id) 1024 0 0 1 #t)
(sound-play "r-eco-pickup")
)
(((pickup-type eco-blue))
(sound-play-by-name (static-sound-name "b-eco-pickup") (new-sound-id) 1024 0 0 1 #t)
(sound-play "b-eco-pickup")
(case (-> (level-get-target-inside *level*) name)
(('training)
(level-hint-spawn
@@ -783,10 +783,10 @@
)
)
(((pickup-type eco-green))
(sound-play-by-name (static-sound-name "g-eco-pickup") (new-sound-id) 1024 0 0 1 #t)
(sound-play "g-eco-pickup")
)
(((pickup-type eco-green) (pickup-type eco-pill))
(sound-play-by-name (static-sound-name "pill-pickup") (new-sound-id) 1024 0 0 1 #t)
(sound-play "pill-pickup")
)
)
(if (nonzero? (-> self part))
@@ -1593,7 +1593,7 @@
)
:code (behavior ((arg0 object) (arg1 handle))
(local-vars (sv-96 res-tag))
(sound-play-by-name (static-sound-name "pu-powercell") (new-sound-id) 1024 0 0 1 #t)
(sound-play "pu-powercell")
(clear-collide-with-as (-> self root-override))
(logclear! (-> self mask) (process-mask actor-pause))
(logclear! (-> self draw status) (draw-status hidden))
@@ -2109,7 +2109,7 @@
(initialize-params self 0 (the-as float 1024.0))
(logclear! (-> self mask) (process-mask actor-pause))
(set! (-> self actor-pause) #f)
(sound-play-by-name (static-sound-name "cell-prize") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cell-prize")
(go fuel-cell-clone-anim arg0)
(none)
)
@@ -2190,7 +2190,7 @@
:code (behavior ((arg0 object) (arg1 handle))
(logclear! (-> self mask) (process-mask actor-pause))
(process-entity-status! self (entity-perm-status complete) #t)
(sound-play-by-name (static-sound-name "buzzer-pickup") (new-sound-id) 1024 0 0 1 #t)
(sound-play "buzzer-pickup")
(case (-> (level-get-target-inside *level*) name)
(('training)
(level-hint-spawn
+7 -7
View File
@@ -529,7 +529,7 @@
)
(set! (-> self incomming-attack-id) s4-0)
(if (not (!= (-> self smush amp) 0.0))
(sound-play-by-name (static-sound-name "icrate-nobreak") (new-sound-id) 1024 0 0 1 #t)
(sound-play "icrate-nobreak")
)
(activate! (-> self smush) 0.1 90 150 1.0 1.0)
(go-virtual bounce-on)
@@ -572,7 +572,7 @@
)
(set! (-> self incomming-attack-id) s4-0)
(if (not (!= (-> self smush amp) 0.0))
(sound-play-by-name (static-sound-name "scrate-nobreak") (new-sound-id) 1024 0 0 1 #t)
(sound-play "scrate-nobreak")
)
(activate! (-> self smush) 0.1 90 150 1.0 1.0)
(go-virtual bounce-on)
@@ -836,16 +836,16 @@
(logior! (-> self draw status) (draw-status hidden))
(case (-> self look)
(('iron)
(sound-play-by-name (static-sound-name "icrate-break") (new-sound-id) 1024 0 0 1 #t)
(sound-play "icrate-break")
)
(('steel)
(sound-play-by-name (static-sound-name "scrate-break") (new-sound-id) 1024 0 0 1 #t)
(sound-play "scrate-break")
)
(('darkeco)
(sound-play-by-name (static-sound-name "dcrate-break") (new-sound-id) 1024 0 0 1 #t)
(sound-play "dcrate-break")
)
(else
(sound-play-by-name (static-sound-name "wcrate-break") (new-sound-id) 1024 0 0 1 #t)
(sound-play "wcrate-break")
)
)
(case (-> self defense)
@@ -1296,7 +1296,7 @@
(logior! (-> self mask) (process-mask sleep-code))
(suspend)
(let ((f30-0 57001.605))
(sound-play-by-name (static-sound-name "crate-jump") (new-sound-id) 1024 0 0 1 #t)
(sound-play "crate-jump")
(while (or (!= (-> self smush amp) 0.0) (!= f30-0 0.0))
(+! f30-0 (* -245760.0 (-> *display* seconds-per-frame)))
(+! (-> self root-override trans y) (* f30-0 (-> *display* seconds-per-frame)))
+1 -1
View File
@@ -1142,7 +1142,7 @@
)
0
0
1
(sound-group sfx)
#t
)
)
+6 -6
View File
@@ -522,7 +522,7 @@
)
;; play the sound!
(sound-play-by-name (static-sound-name "get-green-eco") (new-sound-id) 1024 0 0 1 #t)
(sound-play "get-green-eco")
)
;; remember the source.
@@ -603,7 +603,7 @@
(when (< 0.0 amount)
;; play sound.
(if (>= (- (-> *display* base-frame-counter) (-> obj money-pickup-time)) (seconds 0.05))
(sound-play-by-name (static-sound-name "money-pickup") (new-sound-id) 1024 0 0 1 #t)
(sound-play "money-pickup")
)
(set! (-> obj money-pickup-time) (-> *display* base-frame-counter))
)
@@ -692,16 +692,16 @@
(cpad-set-buzz! (-> *cpad-list* cpads 0) 0 17 (seconds 0.2))
(case kind
(((pickup-type eco-blue))
(sound-play-by-name (static-sound-name "get-blue-eco") (new-sound-id) 1024 0 0 1 #t)
(sound-play "get-blue-eco")
)
(((pickup-type eco-green))
(sound-play-by-name (static-sound-name "get-green-eco") (new-sound-id) 1024 0 0 1 #t)
(sound-play "get-green-eco")
)
(((pickup-type eco-yellow))
(sound-play-by-name (static-sound-name "get-yellow-eco") (new-sound-id) 1024 0 0 1 #t)
(sound-play "get-yellow-eco")
)
(((pickup-type eco-red))
(sound-play-by-name (static-sound-name "get-red-eco") (new-sound-id) 1024 0 0 1 #t)
(sound-play "get-red-eco")
)
)
)
+2 -2
View File
@@ -1950,7 +1950,7 @@
(go launcher-idle)
)
(spawn (-> self part) (-> self root-override trans))
(sound-play-by-name (static-sound-name "launch-idle") (-> self sound-id) 1024 0 0 1 #t)
(sound-play "launch-idle" :id (-> self sound-id))
(if (and (and *target* (>= (+ 2867.2 (-> self root-override root-prim prim-core world-sphere w))
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
)
@@ -1962,7 +1962,7 @@
(none)
)
:code (behavior ()
(sound-play-by-name (static-sound-name "launch-start") (new-sound-id) 1024 0 0 1 #t)
(sound-play "launch-start")
(anim-loop)
(none)
)
+4 -4
View File
@@ -122,7 +122,7 @@
;; ??
(set! *pause-lock* #f)
(sound-group-pause (the-as uint 255))
(sound-group-pause (sound-group sfx music dialog sog3 ambient sog5 sog6 sog7))
(hide-progress-screen)
)
(('menu)
@@ -147,7 +147,7 @@
(('game)
;; allow pausable/menu to run.
(logclear! (-> *setting-control* default process-mask) (process-mask pause menu))
(sound-group-continue (the-as uint 255))
(sound-group-continue (sound-group sfx music dialog sog3 ambient sog5 sog6 sog7))
(hide-progress-screen)
)
)
@@ -419,11 +419,11 @@
(external-cam-reset!)
)
(set! *external-cam-mode* 'pad-1)
(sound-play-by-name (static-sound-name "select-menu") (new-sound-id) 1024 0 0 1 #t)
(sound-play "select-menu")
)
(else
(set! *external-cam-mode* #f)
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-options")
)
)
)
+6 -8
View File
@@ -595,14 +595,12 @@
(let ((f30-0 (-> self control unknown-float141))
(f0-13 (lerp-scale -0.3 0.3 (-> self control unknown-float01) 0.0 81920.0))
)
(sound-play-by-name
(static-sound-name "ice-loop")
(-> self control unknown-soundid00)
(the int (* 10.24 f30-0))
(the int (* 1524.0 f0-13))
0
1
(the-as symbol (-> self control trans))
(sound-play
"ice-loop"
:id (-> self control unknown-soundid00)
:vol f30-0
:pitch f0-13
:position (the-as symbol (-> self control trans))
)
)
)
+5 -5
View File
@@ -759,7 +759,7 @@
(if (nonzero? (-> self sound-id))
(sound-stop (-> self sound-id))
)
(sound-play-by-name (static-sound-name "yellow-explode") (new-sound-id) 1024 0 0 1 #t)
(sound-play "yellow-explode")
(suspend)
(go-virtual projectile-die)
(none)
@@ -783,7 +783,7 @@
(if (nonzero? (-> self sound-id))
(sound-stop (-> self sound-id))
)
(sound-play-by-name (static-sound-name "yellow-fizzle") (new-sound-id) 1024 0 0 1 #t)
(sound-play "yellow-fizzle")
(suspend)
(go-virtual projectile-die)
(none)
@@ -918,8 +918,8 @@
(set! (-> *part-id-table* 358 init-specs 11 initial-valuef)
(the float (sar (shl (the int (+ -16384.0 f30-0)) 48) 48))
)
(sound-play-by-name (static-sound-name "yellow-fire") (new-sound-id) 1024 0 0 1 #t)
(set! (-> obj sound-id) (sound-play-by-name (static-sound-name "yellow-buzz") (new-sound-id) 1024 0 0 1 #t))
(sound-play "yellow-fire")
(set! (-> obj sound-id) (sound-play "yellow-buzz"))
(if (zero? (logand (-> obj options) 416))
(process-spawn part-tracker :init part-tracker-init (-> *part-group-id-table* 103) -1 #f #f #f s5-0 :to obj)
)
@@ -1103,7 +1103,7 @@
(defmethod dummy-27 projectile-blue ((obj projectile-blue))
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 204 (seconds 0.1))
(sound-play-by-name (static-sound-name "blue-eco-on") (new-sound-id) 1024 0 0 1 #t)
(sound-play "blue-eco-on")
(set! (-> obj mode) 2)
(set! (-> obj max-speed) (-> *TARGET-bank* yellow-projectile-speed))
(set! (-> obj update-velocity) projectile-update-velocity-space-wars)
+4 -4
View File
@@ -289,19 +289,19 @@
(when *sound-player-enable*
(when (!= (-> gp-0 sfx-volume) (-> s5-1 sfx-volume))
(seek! (-> gp-0 sfx-volume) (-> s5-1 sfx-volume) (* 100.0 (-> *display* seconds-per-frame)))
(sound-set-volume (the-as uint 1) (-> gp-0 sfx-volume))
(sound-set-volume (sound-group sfx) (-> gp-0 sfx-volume))
)
(when (!= (-> gp-0 music-volume) (-> s5-1 music-volume))
(seek! (-> gp-0 music-volume) (-> s5-1 music-volume) (* 100.0 (-> *display* seconds-per-frame)))
(sound-set-volume (the-as uint 2) (-> gp-0 music-volume))
(sound-set-volume (sound-group music) (-> gp-0 music-volume))
)
(when (!= (-> gp-0 dialog-volume) (-> s5-1 dialog-volume))
(seek! (-> gp-0 dialog-volume) (-> s5-1 dialog-volume) (* 100.0 (-> *display* seconds-per-frame)))
(sound-set-volume (the-as uint 4) (-> gp-0 dialog-volume))
(sound-set-volume (sound-group dialog) (-> gp-0 dialog-volume))
)
(when (!= (-> gp-0 ambient-volume) (-> s5-1 ambient-volume))
(seek! (-> gp-0 ambient-volume) (-> s5-1 ambient-volume) (* 100.0 (-> *display* seconds-per-frame)))
(sound-set-volume (the-as uint 16) (-> gp-0 ambient-volume))
(sound-set-volume (sound-group ambient) (-> gp-0 ambient-volume))
)
)
;; send language change to the IOP.
+88 -94
View File
@@ -21,21 +21,21 @@
(defbehavior time-of-day-update time-of-day-proc ()
"Update the particles and sky tng renderer for time-of-day effects"
(time-of-day-effect)
;; spawn or kill stars, if needed.
(cond
;; should have stars in the sky
((and (or (>= (-> self hour) 19) (>= 5 (-> self hour))) ;; night time
(and (< 45.0 (-> *time-of-day-context* num-stars)) (-> *time-of-day-context* sky)) ;; sky + stars desired
)
;; see if we need more
(when (and *dproc* (< (-> self star-count) (the int (-> *time-of-day-context* num-stars))))
(spawn (-> self stars) (math-camera-pos))
(+! (-> self star-count) 1)
)
)
;; have stars, but don't want them
((> (-> self star-count) 0)
;; kill all stars.
@@ -55,7 +55,7 @@
0
)
)
;; spawn or kill sun, if needed
(cond
((and (>= (-> self time-of-day) 6.25)
@@ -73,7 +73,7 @@
0
)
)
;; spawn or kill green sun, if needed
(cond
((and (or (>= (-> self time-of-day) 21.75) (>= 10.25 (-> self time-of-day)))
@@ -90,7 +90,7 @@
0
)
)
;; update the sky renderer.
(update-sky-tng-data (-> self time-of-day))
0
@@ -105,7 +105,7 @@
(while #t
;; tick!
(+! (-> self frame) (the int (* (-> self time-ratio) (-> *display* time-adjust-ratio))))
;; now update time...
(when (>= (-> self frame) 300)
;; 300 ticks/second
@@ -156,7 +156,7 @@
)
)
)
;; set the time of day float. This is in hours (0-24)
(let* ((f0-4 (the float (-> self frame)))
(f0-6 (+ (* 0.0033333334 f0-4) (the float (-> self second))))
@@ -205,7 +205,7 @@
)
(defun time-of-day-setup ((arg0 symbol))
"This function is weird. Returns if time of day will tick forward or not.
"This function is weird. Returns if time of day will tick forward or not.
If you set arg0 it will toggle on/off time of day.
Otherwise, calling the function has no side effects."
(when arg0
@@ -267,19 +267,19 @@
(defun update-time-of-day ((arg0 time-of-day-context))
"Update the time of day context"
;; set defaults
(set! (-> arg0 sky) #f)
(set! (-> arg0 target-interp) 0.0)
(when *target*
(set! (-> *target* draw light-index) (the-as uint 0))
(when (-> *target* sidekick)
(set! (-> *target* sidekick 0 draw light-index) (the-as uint 0))
)
)
;; see if either level gives us a sky.
(dotimes (v1-12 (-> *level* length))
(let ((a0-4 (-> *level* level v1-12)))
@@ -290,19 +290,19 @@
)
)
)
;; level distances
(let ((s4-0 (new 'stack-no-clear 'array 'float 2))) ;; was a boxed array, but the GOAL implementation seems buggy.
(set! (-> s4-0 0) 0.0)
(set! (-> s4-0 1) 0.0)
0.0
(let ((s5-0 0)
(f30-0 (-> arg0 current-interp))
)
(set! *lightning-frame-done* #f)
(set! *lightning-realtime-done* #f)
;; loop over levels and figure out which to use.
(dotimes (s3-0 2)
(let ((s2-0 (-> *level* level s3-0)))
@@ -327,7 +327,7 @@
)
)
)
;; now pick desired interpolation weights
(let* ((f0-6 (-> s4-0 0))
(f1-0 (-> s4-0 1))
@@ -347,15 +347,15 @@
;; this is a hack to pick the mood of village2 when we're closer to sunken, as long as
;; the camera is above 0.
((and (< 0.0 (-> *math-camera* trans y))
(= (-> *level* level0 name) 'village2)
(= (-> *level* level1 name) 'sunken)
)
(= (-> *level* level0 name) 'village2)
(= (-> *level* level1 name) 'sunken)
)
0.0 ;; picks 0 = village2
)
((and (< 0.0 (-> *math-camera* trans y))
(= (-> *level* level0 name) 'sunken)
(= (-> *level* level1 name) 'village2)
)
(= (-> *level* level0 name) 'sunken)
(= (-> *level* level1 name) 'village2)
)
1.0 ;; picks 1 = village 2
)
(else
@@ -365,13 +365,13 @@
)
)
)
;; normally we will slowly ramp the interpolation weights.
;; but if we've just teleported, immediately snap to the new value.
(if *teleport*
(set! f30-0 f28-0)
)
;; ramp interpolation weights.
(when (not (or (paused?) (= f28-0 f30-0)))
(let ((f0-7 (- f30-0 f28-0)))
@@ -408,13 +408,13 @@
)
)
)
;; number of active skys
(set! (-> arg0 active-count) (the-as uint s5-0))
;; interpolation value between the two level moods.
(set! (-> arg0 interp) f28-0)
)
;; Do the interpolation
(set! (-> arg0 current-interp) f30-0)
(set! *sky-drawn* #f)
@@ -481,8 +481,8 @@
(dotimes (s4-4 8)
(dotimes (s3-2 3)
(let ((s2-1 (+ (+ (* 48 s3-2) 156 (* 192 s4-4)) (the-as int arg0))))
(let ((s1-0 (+ (+ (* 48 s3-2) 156 (* 192 s4-4)) (the-as int (-> arg0 moods 0))) )
(s0-0 (+ (+ (* 48 s3-2) 156 (* 192 s4-4)) (the-as int (-> arg0 moods 1))) )
(let ((s1-0 (+ (+ (* 48 s3-2) 156 (* 192 s4-4)) (the-as int (-> arg0 moods 0))))
(s0-0 (+ (+ (* 48 s3-2) 156 (* 192 s4-4)) (the-as int (-> arg0 moods 1))))
)
(vector4-lerp! (the-as vector (+ s2-1 0)) (the-as vector (+ s1-0 0)) (the-as vector (+ s0-0 0)) f30-0)
(vector4-lerp! (the-as vector (+ s2-1 16)) (the-as vector (+ s1-0 16)) (the-as vector (+ s0-0 16)) f30-0)
@@ -506,7 +506,7 @@
)
)
)
;; setup sky stuff
(dotimes (s4-5 2)
(make-sky-textures arg0 s4-5)
@@ -530,14 +530,13 @@
(set! (-> arg0 current-sun env-color y) (* 0.5019608 (-> arg0 current-sun env-color y)))
(set! (-> arg0 current-sun env-color z) (* 0.5019608 (-> arg0 current-sun env-color z)))
(set! (-> arg0 current-sun env-color w) (* 0.5019608 (-> arg0 current-sun env-color w)))
(let ((v1-179 (-> arg0 current-fog)))
(set! *fog-color*
(new 'static 'rgba
:r (the int (-> v1-179 fog-color x))
:g (the int (-> v1-179 fog-color y))
:b (the int (-> v1-179 fog-color z))
)
(set! *fog-color* (new 'static 'rgba
:r (the int (-> v1-179 fog-color x))
:g (the int (-> v1-179 fog-color y))
:b (the int (-> v1-179 fog-color z))
)
)
)
(let ((v1-184 (-> arg0 current-fog erase-color)))
@@ -554,73 +553,68 @@
(set! (-> *math-camera* fog-end) (-> arg0 current-fog fog-dists y))
(set! (-> *math-camera* fog-max) (-> arg0 current-fog fog-dists z))
(set! (-> *math-camera* fog-min) (-> arg0 current-fog fog-dists w))
;; interp target lights. (note: added check here.)
(let* ((v1-195 (if *target* (-> *target* draw light-index) 0))
(f30-1 (-> arg0 target-interp))
(s4-6 (-> arg0 light-group))
(s5-2 (-> arg0 light-group v1-195))
)
(when (nonzero? v1-195)
(cond
((= f30-1 1.0)
)
((= f30-1 0.0)
(quad-copy! (the-as pointer (-> arg0 light-group v1-195)) (the-as pointer (-> arg0 light-group)) 12)
)
(else
(dotimes (s3-4 4)
(vector4-lerp!
(the-as vector (+ (the-as uint (-> s5-2 dir0)) (* 48 s3-4)))
(the-as vector (+ (the-as uint (-> s4-6 0)) (* 48 s3-4)))
(the-as vector (+ (the-as uint (-> s5-2 dir0)) (* 48 s3-4)))
f30-1
)
(vector4-lerp!
(the-as vector (+ (the-as uint (-> s5-2 dir0 color)) (* 48 s3-4)))
(the-as vector (+ (the-as uint (-> s4-6 0 dir0 color)) (* 48 s3-4)))
(the-as vector (+ (the-as uint (-> s5-2 dir0 color)) (* 48 s3-4)))
f30-1
)
(vector4-lerp!
(the-as vector (+ (the-as uint (-> s5-2 dir0 levels)) (* 48 s3-4)))
(the-as vector (+ (the-as uint (-> s4-6 0 dir0 levels)) (* 48 s3-4)))
(the-as vector (+ (the-as uint (-> s5-2 dir0 levels)) (* 48 s3-4)))
f30-1
)
(vector-normalize! (the-as vector (+ (the-as uint (-> s5-2 dir0)) (* 48 s3-4))) 1.0)
)
)
)
(when (nonzero? v1-195)
(cond
((= f30-1 1.0)
)
((= f30-1 0.0)
(quad-copy! (the-as pointer (-> arg0 light-group v1-195)) (the-as pointer (-> arg0 light-group)) 12)
)
(else
(dotimes (s3-4 4)
(vector4-lerp!
(the-as vector (+ (the-as uint (-> s5-2 dir0)) (* 48 s3-4)))
(the-as vector (+ (the-as uint (-> s4-6 0)) (* 48 s3-4)))
(the-as vector (+ (the-as uint (-> s5-2 dir0)) (* 48 s3-4)))
f30-1
;; some shadow thing.
(let ((a2-30 (new 'stack-no-clear 'vector)))
(set! (-> a2-30 x) (- (-> s5-2 dir0 direction x)))
(set! (-> a2-30 y) (- (-> s5-2 dir0 direction y)))
(set! (-> a2-30 z) (- (-> s5-2 dir0 direction z)))
(when (< (-> s5-2 dir0 direction y) 0.9063)
(let* ((f0-56 0.4226)
(f1-17 (-> a2-30 x))
(f1-19 (* f1-17 f1-17))
(f2-7 (-> a2-30 z))
(f0-57 (/ f0-56 (sqrtf (+ f1-19 (* f2-7 f2-7)))))
)
(set! (-> a2-30 x) (* (-> a2-30 x) f0-57))
(set! (-> a2-30 y) -0.9063)
(set! (-> a2-30 z) (* (-> a2-30 z) f0-57))
)
)
(vector4-lerp! (-> arg0 current-shadow) (-> arg0 current-shadow) a2-30 f30-1)
)
(vector4-lerp!
(the-as vector (+ (the-as uint (-> s5-2 dir0 color)) (* 48 s3-4)))
(the-as vector (+ (the-as uint (-> s4-6 0 dir0 color)) (* 48 s3-4)))
(the-as vector (+ (the-as uint (-> s5-2 dir0 color)) (* 48 s3-4)))
f30-1
)
(vector4-lerp!
(the-as vector (+ (the-as uint (-> s5-2 dir0 levels)) (* 48 s3-4)))
(the-as vector (+ (the-as uint (-> s4-6 0 dir0 levels)) (* 48 s3-4)))
(the-as vector (+ (the-as uint (-> s5-2 dir0 levels)) (* 48 s3-4)))
f30-1
)
(vector-normalize!
(the-as vector (+ (the-as uint (-> s5-2 dir0)) (* 48 s3-4)))
1.0
)
)
(vector-normalize! (-> arg0 current-shadow) 1.0)
)
)
;; some shadow thing.
(let ((a2-30 (new 'stack-no-clear 'vector)))
(set! (-> a2-30 x) (- (-> s5-2 dir0 direction x)))
(set! (-> a2-30 y) (- (-> s5-2 dir0 direction y)))
(set! (-> a2-30 z) (- (-> s5-2 dir0 direction z)))
(when (< (-> s5-2 dir0 direction y) 0.9063)
(let* ((f0-56 0.4226)
(f1-17 (-> a2-30 x))
(f1-19 (* f1-17 f1-17))
(f2-7 (-> a2-30 z))
(f0-57 (/ f0-56 (sqrtf (+ f1-19 (* f2-7 f2-7)))))
)
(set! (-> a2-30 x) (* (-> a2-30 x) f0-57))
(set! (-> a2-30 y) -0.9063)
(set! (-> a2-30 z) (* (-> a2-30 z) f0-57))
)
)
(vector4-lerp! (-> arg0 current-shadow) (-> arg0 current-shadow) a2-30 f30-1)
)
(vector-normalize! (-> arg0 current-shadow) 1.0)
)
)
(reset! *palette-fade-controls*)
0
(none)
+4 -2
View File
@@ -47,7 +47,7 @@
(let ((s5-0 (new 'stack-no-clear 'vector)))
(sp-kill-particle arg0 arg1)
(set-vector! s5-0 (-> arg2 x) (-> arg1 user-float) (-> arg2 z) 1.0)
(sound-play-by-name (static-sound-name "water-drop") (new-sound-id) 1024 0 0 1 (the-as symbol s5-0))
(sound-play "water-drop" :position (the-as symbol s5-0))
(sp-launch-particles-var
*sp-particle-system-3d*
(-> *part-id-table* 108)
@@ -642,7 +642,9 @@
((zero? (logand (-> obj flags) (water-flags wt01)))
(logclear! (-> obj flags) (water-flags wt09 wt10 wt11 wt12 wt13 wt14 wt16))
)
((and (logtest? (water-flags wt21) (-> obj flags)) (logtest? (-> obj process state-flags) (state-flags grabbed)))
((and (logtest? (water-flags wt21) (-> obj flags))
(logtest? (-> obj process state-flags) (state-flags grabbed))
)
(set! (-> obj flags) (logior (water-flags wt16) (-> obj flags)))
)
((begin
+2 -2
View File
@@ -434,8 +434,8 @@
"play the appropriate sound for inputting a cheat code"
`(if ,cheat?
(sound-play-by-name (static-sound-name "select-menu") (new-sound-id) 1024 0 0 1 #t)
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "select-menu")
(sound-play "cursor-options")
)
)
+17 -4
View File
@@ -10,6 +10,19 @@
;; The EE sends commands using the IOP RPC system to the OVERLORD IOP driver telling it to load and play sounds.
;; There is also some sort of per-frame status update, that is not included here.
(defenum sound-group
:bitfield #t
:type uint8
(sfx)
(music)
(dialog)
(sog3)
(ambient)
(sog5)
(sog6)
(sog7)
)
(deftype sound-id (uint32)
()
(:methods
@@ -173,7 +186,7 @@
(priority int8 :offset-assert 11)
(volume int32 :offset-assert 12)
(trans vector3w :inline :offset-assert 16)
(group uint8 :offset-assert 28)
(group sound-group :offset-assert 28)
)
:pack-me
:method-count-assert 9
@@ -198,7 +211,7 @@
)
(deftype sound-rpc-group-cmd (sound-rpc-cmd)
((group uint8 :offset-assert 4)
((group sound-group :offset-assert 4)
)
:method-count-assert 9
:size-assert #x5
@@ -435,9 +448,9 @@
(deftype sound-spec (basic)
((mask sound-mask :offset-assert 4)
(num float :offset-assert 8)
(group uint8 :offset-assert 12)
(group sound-group :offset-assert 12)
(sound-name-char uint8 16 :offset 16)
(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)
+16 -9
View File
@@ -301,7 +301,7 @@
)
)
(defun sound-set-volume ((group uint) (volume float))
(defun sound-set-volume ((group sound-group) (volume float))
(let ((cmd (the sound-rpc-set-master-volume (get-sound-buffer-entry))))
(set! (-> cmd command) (sound-command set-master-volume))
@@ -351,10 +351,17 @@
)
)
(defun sound-play-by-name ((name sound-name) (id sound-id) (vol int) (pitch int) (bend int) (group int) (trans symbol))
(defmacro sound-play (name &key (id (new-sound-id))
&key (vol 100.0) &key (pitch 0) &key (bend 0)
&key (group sfx)
&key (position #t))
`(sound-play-by-name (static-sound-name ,name) ,id (the int (* (/ 1024.0 100.0) ,vol)) (the int (* 1524.0 ,pitch)) ,bend (sound-group ,group) ,position)
)
(defun sound-play-by-name ((name sound-name) (id sound-id) (vol int) (pitch int) (bend int) (group sound-group) (trans symbol))
"Play a sound called name with the specified params"
(local-vars (sv-16 int))
(local-vars (sv-16 sound-group))
(set! sv-16 group)
(let ((sound-trans (the-as vector trans)))
(when *sound-player-enable*
@@ -364,7 +371,7 @@
(set! (-> cmd id) id)
(set! (-> cmd name) name)
(set! (-> cmd parms mask) (sound-mask))
(set! (-> cmd parms group) (the-as uint sv-16))
(set! (-> cmd parms group) sv-16)
(set! (-> cmd parms volume) vol)
(set! (-> cmd parms pitch-mod) pitch)
(set! (-> cmd parms bend) bend)
@@ -428,7 +435,7 @@
0
)
(defun sound-group-pause ((group uint))
(defun sound-group-pause ((group sound-group))
(let ((cmd (the sound-rpc-pause-group (get-sound-buffer-entry))))
(set! (-> cmd command) (sound-command pause-group))
@@ -437,7 +444,7 @@
0
)
(defun sound-group-stop ((group uint))
(defun sound-group-stop ((group sound-group))
(let ((cmd (the sound-rpc-stop-group (get-sound-buffer-entry))))
(set! (-> cmd command) (sound-command stop-group))
@@ -446,7 +453,7 @@
0
)
(defun sound-group-continue ((group uint))
(defun sound-group-continue ((group sound-group))
(let ((cmd (the sound-rpc-continue-group (get-sound-buffer-entry))))
(set! (-> cmd command) (sound-command continue-group))
@@ -654,7 +661,7 @@
(-> obj volume)
(-> obj pitch)
0
1
(sound-group sfx)
(the-as symbol (-> obj trans))))
)
(else
@@ -665,7 +672,7 @@
(-> obj volume)
(-> obj pitch)
0
1
(sound-group sfx)
(the-as symbol (-> obj trans))))
(set! (-> obj play-time) (+ (-> *display* base-frame-counter)
(-> obj time-base)
+12 -11
View File
@@ -585,10 +585,10 @@
(= v1-13 'up)
)
)
(sound-play-by-name (static-sound-name "hit-up") (new-sound-id) 1024 0 0 1 #t)
(sound-play "hit-up")
)
(else
(sound-play-by-name (static-sound-name "oof") (new-sound-id) 1024 0 0 1 #t)
(sound-play "oof")
)
)
)
@@ -597,7 +597,7 @@
(process-spawn-function process process-drawable-burn-effect 1200 :to self)
)
(('tar)
(sound-play-by-name (static-sound-name "get-burned") (new-sound-id) 1024 0 0 1 #t)
(sound-play "get-burned")
)
)
0
@@ -620,7 +620,8 @@
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
)
(zero? (logand (-> self state-flags) (state-flags prevent-attack)))
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08)))
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
)
)
)
(go
@@ -732,7 +733,7 @@
(ja-channel-push! 1 (seconds 0.05))
(ja-no-eval :group! eichar-jump-ja :num! (seek!) :frame-num 0.0)
(when (= (-> arg0 angle) 'air)
(sound-play-by-name (static-sound-name "smack-surface") (new-sound-id) 1024 0 0 1 #t)
(sound-play "smack-surface")
(dummy-10 (-> self skel effect) 'group-smack-surface (the-as float 0.0) 5)
(dummy-10 (-> self skel effect) 'group-smack-surface-dizzy (the-as float 0.0) 8)
)
@@ -740,7 +741,7 @@
(('shove)
(ja-channel-push! 1 (seconds 0.05))
(ja-no-eval :group! eichar-smack-surface-ja :num! (seek!) :frame-num 0.0)
(sound-play-by-name (static-sound-name "smack-surface") (new-sound-id) 1024 0 0 1 #t)
(sound-play "smack-surface")
)
(else
(when (not (ja-group? eichar-hit-from-front-ja))
@@ -1107,7 +1108,7 @@
)
)
(('drown 'drown-death)
(sound-play-by-name (static-sound-name "death-drown") (new-sound-id) 1024 0 0 1 #t)
(sound-play "death-drown")
(logclear! (-> self water flags) (water-flags wt04))
(clear-collide-with-as (-> self control))
(set! (-> self control unknown-surface00) *dive-mods*)
@@ -1146,7 +1147,7 @@
)
(cond
((= arg0 'dark-eco-pool)
(sound-play-by-name (static-sound-name "death-darkeco") (new-sound-id) 1024 0 0 1 #t)
(sound-play "death-darkeco")
(process-spawn
part-tracker
:init part-tracker-init
@@ -1160,7 +1161,7 @@
)
)
((or (= arg0 'lava) (= arg0 'melt))
(sound-play-by-name (static-sound-name "death-melt") (new-sound-id) 1024 0 0 1 #t)
(sound-play "death-melt")
(process-spawn
part-tracker
:init part-tracker-init
@@ -1185,7 +1186,7 @@
)
)
(('endlessfall)
(sound-play-by-name (static-sound-name "death-fall") (new-sound-id) 1024 0 0 1 #t)
(sound-play "death-fall")
(camera-change-to (the-as string cam-endlessfall) 30 #f)
(set! (-> self control pat-ignore-mask unknown-bit) 1)
(logclear! (-> self water flags) (water-flags wt04))
@@ -1322,7 +1323,7 @@
(else
(case arg0
(('tar)
(sound-play-by-name (static-sound-name "death-drown") (new-sound-id) 1024 0 0 1 #t)
(sound-play "death-drown")
)
)
(+! (-> *game-info* death-movie-tick) 1)
+13 -3
View File
@@ -425,7 +425,7 @@
self
)
(cpad-set-buzz! (-> *cpad-list* cpads 0) 0 255 (seconds 0.5))
(sound-play-by-name (static-sound-name "oof") (new-sound-id) 1024 0 0 1 #t)
(sound-play "oof")
#t
)
(else
@@ -1022,7 +1022,7 @@
#f
)
((= arg2 'jump)
(sound-play-by-name (static-sound-name "jump-long") (new-sound-id) 1024 0 0 1 #t)
(sound-play "jump-long")
(go
target-jump
(the-as float (-> arg3 param 0))
@@ -1077,7 +1077,17 @@ 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)
(logclear! (-> self state-flags) (state-flags sf02 being-attacked do-not-notice grabbed first-person-mode looking-at-enemy falling-into-pool-of-bad flop-hit-ground))
(logclear! (-> self state-flags) (state-flags
sf02
being-attacked
do-not-notice
grabbed
first-person-mode
looking-at-enemy
falling-into-pool-of-bad
flop-hit-ground
)
)
(target-danger-set! 'harmless #f)
(logior! (-> self water flags) (water-flags wt04))
(logclear! (-> self water flags) (water-flags wt16))
+1 -1
View File
@@ -2141,7 +2141,7 @@
)
(defbehavior process-drawable-burn-effect target ((arg0 time-frame))
(sound-play-by-name (static-sound-name "get-burned") (new-sound-id) 1024 0 0 1 #t)
(sound-play "get-burned")
(let ((s5-1 (new 'stack 'rgbaf))
(s3-0 (-> *display* base-frame-counter))
(s4-1 (-> self parent))
+3 -1
View File
@@ -813,7 +813,9 @@
(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 prevent-duck))))
(and (< (-> self control unknown-float61) 0.7)
(zero? (logand (-> self state-flags) (state-flags prevent-duck)))
)
)
)
+12 -8
View File
@@ -1422,7 +1422,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)
(sound-play "jump" :vol 70)
(init-var-jump arg0 arg1 (the-as vector #t) (the-as vector #t) (-> self control transv))
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
(set! arg2 (cond
@@ -1474,7 +1474,8 @@
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
)
(zero? (logand (-> self state-flags) (state-flags prevent-attack)))
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08)))
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
)
)
)
(go
@@ -1594,7 +1595,8 @@
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
)
(zero? (logand (-> self state-flags) (state-flags prevent-attack)))
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08)))
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
)
)
)
(go
@@ -1653,7 +1655,7 @@
)
(set! (-> self state-time) (-> *display* base-frame-counter))
(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)
(sound-play "jump" :pitch 0.3)
(init-var-jump arg0 arg1 (the-as vector #t) (the-as vector #t) (-> self control transv))
(set! (-> self control unknown-surface00) (cond
((= arg2 'flip)
@@ -1693,7 +1695,8 @@
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
)
(zero? (logand (-> self state-flags) (state-flags prevent-attack)))
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08)))
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
)
)
)
(go
@@ -1758,7 +1761,7 @@
:event target-jump-event-handler
:enter (behavior ((arg0 float) (arg1 float) (arg2 symbol))
(set! (-> self state-time) (-> *display* base-frame-counter))
(sound-play-by-name (static-sound-name "jump") (new-sound-id) 819 -609 0 1 #t)
(sound-play "jump" :vol 80 :pitch -0.4)
(init-var-jump arg0 arg1 (the-as vector #t) (the-as vector #f) (-> self control transv))
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
(cond
@@ -2194,7 +2197,7 @@
)
:code (behavior ()
(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)
(sound-play "swim-stroke")
)
(ja-channel-push! 1 (seconds 0.02))
(ja :group! eichar-attack-punch-ja :num! min)
@@ -2541,7 +2544,8 @@
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
)
(zero? (logand (-> self state-flags) (state-flags prevent-attack)))
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08)))
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
)
)
)
(set-quaternion! (-> self control) (-> self control dir-targ))
+5 -5
View File
@@ -1059,7 +1059,7 @@
(none)
)
:code (behavior ((arg0 float) (arg1 float))
(sound-play-by-name (static-sound-name "jump") (new-sound-id) 1024 0 0 1 #t)
(sound-play "jump")
(send-event *camera* 'damp-up)
(ja :group! (-> self draw art-group data 83) :num! min)
(let ((f0-1 (target-height-above-ground))
@@ -1116,7 +1116,7 @@
(none)
)
:code (behavior ((arg0 float) (arg1 float))
(sound-play-by-name (static-sound-name "jump") (new-sound-id) 1024 0 0 1 #t)
(sound-play "jump")
(until (ja-done? 0)
(suspend)
(ja :num! (seek!))
@@ -1691,7 +1691,7 @@
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f))
)
(when (and (cpad-pressed? (-> self control unknown-cpad-info00 number) circle) (can-feet?))
(sound-play-by-name (static-sound-name "swim-stroke") (new-sound-id) 1024 0 0 1 #t)
(sound-play "swim-stroke")
(dummy-13 (-> self water) (the-as float 1.4) (-> self control trans) 0 (-> self control transv))
(go target-attack)
)
@@ -1736,7 +1736,7 @@
(go target-jump (-> *TARGET-bank* jump-height-min) (-> *TARGET-bank* jump-height-max) (the-as surface #f))
)
(when (and (cpad-pressed? (-> self control unknown-cpad-info00 number) circle) (can-feet?))
(sound-play-by-name (static-sound-name "swim-stroke") (new-sound-id) 1024 0 0 1 #t)
(sound-play "swim-stroke")
(dummy-13 (-> self water) (the-as float 1.4) (-> self control trans) 0 (-> self control transv))
(go target-attack)
)
@@ -2677,7 +2677,7 @@
:to self
)
)
(sound-play-by-name (static-sound-name "launch-fire") (new-sound-id) 1024 0 0 1 #t)
(sound-play "launch-fire")
(go target-high-jump arg0 arg0 'launch)
(none)
)
+1 -1
View File
@@ -670,7 +670,7 @@
)
)
(set! (-> obj start-time) (-> *display* base-frame-counter))
(sound-play-by-name (static-sound-name "get-all-orbs") (new-sound-id) 1024 0 0 1 #t)
(sound-play "get-all-orbs")
0
(none)
)
+1 -1
View File
@@ -73,7 +73,7 @@
(when (and (!= (-> obj value) (-> obj target-value))
(>= (- (-> *display* base-frame-counter) (-> obj last-increment-time)) (seconds 0.1))
)
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-options")
(+! (-> obj value) 1)
(set! (-> obj last-increment-time) (-> *display* base-frame-counter))
)
+51 -51
View File
@@ -1008,13 +1008,13 @@
(cond
((< (-> obj option-index) 4)
(when (nonzero? (-> s5-0 file (-> obj option-index) present))
(sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "start-options")
(set! (-> *progress-state* which) (-> obj option-index))
(set! (-> obj next-display-state) (progress-screen memcard-loading))
)
)
(else
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-options")
(set! (-> obj next-display-state) (progress-screen invalid))
)
)
@@ -1022,7 +1022,7 @@
(((progress-screen save-game) (progress-screen save-game-title))
(cond
((< (-> obj option-index) 4)
(sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "start-options")
(set! (-> *progress-state* which) (-> obj option-index))
(if (zero? (-> s5-0 file (-> obj option-index) present))
(set! (-> obj next-display-state) (progress-screen memcard-saving))
@@ -1030,30 +1030,30 @@
)
)
((and (= (-> obj display-state) (progress-screen save-game-title)) (= (-> obj option-index) 4))
(sound-play-by-name (static-sound-name "starts-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "starts-options")
(sound-volume-off)
(set! (-> *game-info* mode) 'play)
(initialize! *game-info* 'game (the-as game-save #f) "intro-start")
(set-master-mode 'game)
)
(else
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-options")
(set! (-> obj next-display-state) (progress-screen invalid))
)
)
)
(((progress-screen memcard-insert))
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-options")
(set! (-> obj next-display-state) (progress-screen invalid))
)
(((progress-screen memcard-data-exists))
(cond
((-> *progress-state* yes-no-choice)
(sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "start-options")
(set! (-> obj next-display-state) (progress-screen memcard-saving))
)
(else
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-options")
(if (= (-> obj display-state-stack 0) (progress-screen title))
(set! (-> obj next-display-state) (progress-screen save-game-title))
(set! (-> obj next-display-state) (progress-screen save-game))
@@ -1064,11 +1064,11 @@
(((progress-screen memcard-no-data))
(cond
((-> *progress-state* yes-no-choice)
(sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "start-options")
(set! (-> obj next-display-state) (progress-screen memcard-creating))
)
(else
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-options")
(sound-volume-off)
(set! (-> *game-info* mode) 'play)
(initialize! *game-info* 'game (the-as game-save #f) "intro-start")
@@ -1082,18 +1082,18 @@
)
(cond
((= (-> obj display-state-stack 0) (progress-screen title))
(sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "start-options")
(sound-volume-off)
(set! (-> *game-info* mode) 'play)
(initialize! *game-info* 'game (the-as game-save #f) "intro-start")
(set-master-mode 'game)
)
((nonzero? (-> obj display-state-stack 0))
(sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "start-options")
(set-master-mode 'game)
)
(else
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-options")
(set! (-> obj next-display-state) (progress-screen invalid))
)
)
@@ -1106,19 +1106,19 @@
(progress-screen memcard-removed)
(progress-screen auto-save)
)
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-options")
(set! (-> obj next-display-state) (progress-screen invalid))
)
(((progress-screen pal-change-to-60hz))
(cond
((-> *progress-state* yes-no-choice)
(sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "start-options")
(set! (-> *setting-control* default video-mode) (-> *progress-state* video-mode-choice))
(set! (-> obj video-mode-timeout) (-> *display* real-frame-counter))
(set! (-> obj next-display-state) (progress-screen pal-now-60hz))
)
(else
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-options")
(set! (-> *progress-state* video-mode-choice) 'pal)
(set! (-> obj next-display-state) (progress-screen invalid))
)
@@ -1129,30 +1129,30 @@
((not (-> *progress-state* yes-no-choice))
(set! (-> *progress-state* video-mode-choice) 'pal)
(set! (-> *setting-control* default video-mode) (-> *progress-state* video-mode-choice))
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-options")
)
(else
(sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "start-options")
)
)
(set! (-> obj next-display-state) (progress-screen invalid))
)
(((progress-screen no-disc) (progress-screen bad-disc))
(when (is-cd-in?)
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-options")
(set! (-> obj next-display-state) (progress-screen invalid))
)
)
(((progress-screen quit))
(cond
((-> *progress-state* yes-no-choice)
(sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "start-options")
(sound-volume-off)
(set! (-> *game-info* mode) 'play)
(initialize! *game-info* 'game (the-as game-save #f) "title-start")
)
(else
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-options")
(set! (-> obj next-display-state) (progress-screen invalid))
)
)
@@ -1160,18 +1160,18 @@
(((progress-screen memcard-format))
(cond
((-> *progress-state* yes-no-choice)
(sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "start-options")
(set! (-> obj next-display-state) (progress-screen memcard-formatting))
)
((= (-> obj display-state-stack 0) (progress-screen title))
(sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "start-options")
(sound-volume-off)
(set! (-> *game-info* mode) 'play)
(initialize! *game-info* 'game (the-as game-save #f) "intro-start")
(set-master-mode 'game)
)
(else
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-options")
(set! (-> obj next-display-state) (progress-screen invalid))
)
)
@@ -1195,7 +1195,7 @@
((cpad-pressed? 0 up)
(when (not (-> obj selected-option))
(if (!= (length s5-0) 1)
(sound-play-by-name (static-sound-name "cursor-up-down") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-up-down")
)
(set! (-> obj last-option-index-change) (-> *display* real-frame-counter))
(if (> (-> obj option-index) 0)
@@ -1218,7 +1218,7 @@
(when v1-34
(when (< (seconds 0.3) (- (-> *display* real-frame-counter) (-> *progress-state* last-slider-sound)))
(set! (-> *progress-state* last-slider-sound) (-> *display* real-frame-counter))
(sound-play-by-name (static-sound-name "slider2001") (new-sound-id) 1024 0 0 1 #t)
(sound-play "slider2001")
)
)
)
@@ -1231,7 +1231,7 @@
((cpad-pressed? 0 down)
(when (not (-> obj selected-option))
(if (!= (length s5-0) 1)
(sound-play-by-name (static-sound-name "cursor-up-down") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-up-down")
)
(set! (-> obj last-option-index-change) (-> *display* real-frame-counter))
(cond
@@ -1259,7 +1259,7 @@
(when v1-69
(when (< (seconds 0.3) (- (-> *display* real-frame-counter) (-> *progress-state* last-slider-sound)))
(set! (-> *progress-state* last-slider-sound) (-> *display* real-frame-counter))
(sound-play-by-name (static-sound-name "slider2001") (new-sound-id) 1024 0 0 1 #t)
(sound-play "slider2001")
)
)
)
@@ -1308,7 +1308,7 @@
)
)
(if s4-5
(sound-play-by-name (static-sound-name "cursor-l-r") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-l-r")
)
)
)
@@ -1353,7 +1353,7 @@
)
(when (< (seconds 0.3) (- (-> *display* real-frame-counter) (-> *progress-state* last-slider-sound)))
(set! (-> *progress-state* last-slider-sound) (-> *display* real-frame-counter))
(sound-play-by-name (static-sound-name "slider2001") (new-sound-id) (the int (* 10.24 f30-0)) 0 0 1 #t)
(sound-play "slider2001" :vol f30-0)
)
)
)
@@ -1405,7 +1405,7 @@
)
)
(if v1-217
(sound-play-by-name (static-sound-name "cursor-l-r") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-l-r")
)
)
)
@@ -1450,7 +1450,7 @@
)
(when (< (seconds 0.3) (- (-> *display* real-frame-counter) (-> *progress-state* last-slider-sound)))
(set! (-> *progress-state* last-slider-sound) (-> *display* real-frame-counter))
(sound-play-by-name (static-sound-name "slider2001") (new-sound-id) (the int (* 10.24 f30-1)) 0 0 1 #t)
(sound-play "slider2001" :vol f30-1)
)
)
)
@@ -1488,7 +1488,7 @@
)
)
)
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-options")
(set! (-> obj selected-option) #f)
)
((or (can-go-back? obj)
@@ -1501,8 +1501,8 @@
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle))
(if (= (-> obj display-state) (progress-screen settings))
(sound-play-by-name (static-sound-name "menu-stats") (new-sound-id) 1024 0 0 1 #t)
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "menu-stats")
(sound-play "cursor-options")
)
(load-level-text-files (-> *level-task-data* (-> obj display-level-index) text-group-index))
(set! (-> obj next-display-state) (progress-screen invalid))
@@ -1519,7 +1519,7 @@
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons circle))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle))
(push! obj)
(sound-play-by-name (static-sound-name "select-option") (new-sound-id) 1024 0 0 1 #t)
(sound-play "select-option")
(set! (-> obj next-display-state) (the-as progress-screen (-> s5-0 (-> obj option-index) param3)))
(case (-> obj next-display-state)
(((progress-screen load-game) (progress-screen save-game) (progress-screen save-game-title))
@@ -1535,8 +1535,8 @@
)
((= (-> s5-0 (-> obj option-index) name) (game-text-id back))
(if (= (-> obj display-state) (progress-screen settings))
(sound-play-by-name (static-sound-name "menu-stats") (new-sound-id) 1024 0 0 1 #t)
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "menu-stats")
(sound-play "cursor-options")
)
(load-level-text-files (-> *level-task-data* (-> obj display-level-index) text-group-index))
(set! (-> obj next-display-state) (progress-screen invalid))
@@ -1570,7 +1570,7 @@
)
)
)
(sound-play-by-name (static-sound-name "select-option") (new-sound-id) 1024 0 0 1 #t)
(sound-play "select-option")
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x))
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons circle))
@@ -1587,7 +1587,7 @@
)
)
(else
(sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "start-options")
(set! (-> obj selected-option) #f)
(case (-> s5-0 (-> obj option-index) option-type)
(((game-option-type aspect-ratio))
@@ -1631,7 +1631,7 @@
(let ((s5-0 (-> obj display-level-index)))
(set! (-> obj next-level-index) (get-next-level-down s5-0))
(when (!= s5-0 (-> obj next-level-index))
(sound-play-by-name (static-sound-name "cursor-up-down") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-up-down")
(set! (-> obj level-transition) 2)
)
)
@@ -1640,28 +1640,28 @@
(let ((s5-2 (-> obj next-level-index)))
(set! (-> obj next-level-index) (get-next-level-up s5-2))
(when (!= s5-2 (-> obj next-level-index))
(sound-play-by-name (static-sound-name "cursor-up-down") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-up-down")
(set! (-> obj level-transition) 1)
)
)
)
((cpad-pressed? 0 square)
(when (nonzero? (-> obj display-state))
(sound-play-by-name (static-sound-name "select-option") (new-sound-id) 1024 0 0 1 #t)
(sound-play "select-option")
(set! (-> obj next-display-state) (progress-screen fuel-cell))
(set! (-> obj stat-transition) #t)
)
)
((cpad-pressed? 0 x)
(when (!= (-> obj display-state) (progress-screen money))
(sound-play-by-name (static-sound-name "select-option") (new-sound-id) 1024 0 0 1 #t)
(sound-play "select-option")
(set! (-> obj next-display-state) (progress-screen money))
(set! (-> obj stat-transition) #t)
)
)
((cpad-pressed? 0 triangle)
(when (!= (-> obj display-state) (progress-screen buzzer))
(sound-play-by-name (static-sound-name "select-option") (new-sound-id) 1024 0 0 1 #t)
(sound-play "select-option")
(set! (-> obj next-display-state) (progress-screen buzzer))
(set! (-> obj stat-transition) #t)
)
@@ -1669,7 +1669,7 @@
((cpad-pressed? 0 circle)
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons circle))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle))
(sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t)
(sound-play "start-options")
(push! obj)
(set! (-> obj next-display-state) (progress-screen settings))
)
@@ -1679,7 +1679,7 @@
(let ((s5-8 (-> obj task-index)))
(set! (-> obj task-index) (get-next-task-down (-> obj task-index) (-> obj display-level-index)))
(if (!= s5-8 (-> obj task-index))
(sound-play-by-name (static-sound-name "cursor-l-r") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-l-r")
)
)
)
@@ -1687,7 +1687,7 @@
(let ((s5-10 (-> obj task-index)))
(set! (-> obj task-index) (get-next-task-up (-> obj task-index) (-> obj display-level-index)))
(if (!= s5-10 (-> obj task-index))
(sound-play-by-name (static-sound-name "cursor-l-r") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cursor-l-r")
)
)
)
@@ -2179,11 +2179,11 @@
(-> progress-waiting event)
:enter
(behavior ()
(sound-group-pause (the-as uint 255))
(sound-group-pause (sound-group sfx music dialog sog3 ambient sog5 sog6 sog7))
(logclear! (-> *setting-control* default process-mask) (process-mask pause menu))
(add-setting! 'process-mask 'set 0.0 16)
(apply-settings *setting-control*)
(sound-play-by-name (static-sound-name "select-menu") (new-sound-id) 1024 0 0 1 #t)
(sound-play "select-menu")
(set-blackout-frames 0)
(set! *pause-lock* #f)
(none)
@@ -2214,7 +2214,7 @@
(defstate progress-going-out (progress)
:enter
(behavior ()
(sound-play-by-name (static-sound-name "menu-close") (new-sound-id) 1024 0 0 1 #t)
(sound-play "menu-close")
(hide-progress-icons)
(set! (-> self particles 3 init-pos x) -320.0)
(set! (-> self particles 4 init-pos x) -320.0)
+8 -8
View File
@@ -53,7 +53,7 @@
(rider-trans)
(let ((t2-0 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 4))))
(if (!= (+ (-> t2-0 x) (-> t2-0 y) (-> t2-0 z)) 0.0)
(sound-play-by-name (static-sound-name "gears-rumble") (-> self sound-id) 1024 0 0 1 (the-as symbol t2-0))
(sound-play "gears-rumble" :id (-> self sound-id) :position (the-as symbol t2-0))
)
)
(none)
@@ -233,8 +233,8 @@
(the-as uint 2)
)
)
(sound-play-by-name (static-sound-name "grotto-pole-hit") (new-sound-id) 1024 0 0 1 #t)
(sound-play-by-name (static-sound-name "dirt-crumble") (new-sound-id) 1024 0 0 1 #t)
(sound-play "grotto-pole-hit")
(sound-play "dirt-crumble")
(increment-success-for-hint (game-text-id beach-grottopole-increment))
(go grottopole-moving-up)
)
@@ -248,8 +248,8 @@
(the-as uint 1)
)
)
(sound-play-by-name (static-sound-name "grotto-pole-hit") (new-sound-id) 1024 0 0 1 #t)
(sound-play-by-name (static-sound-name "dirt-crumble") (new-sound-id) 1024 0 0 1 #t)
(sound-play "grotto-pole-hit")
(sound-play "dirt-crumble")
(go grottopole-moving-down)
)
)
@@ -548,7 +548,7 @@
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('attack)
(sound-play-by-name (static-sound-name "cannon-shot") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cannon-shot")
(increment-success-for-hint (game-text-id beach-eco-rock-increment))
(go ecoventrock-break #f)
)
@@ -1011,7 +1011,7 @@
)
(defbehavior flutflutegg-hit-sounds flutflutegg ()
(sound-play-by-name (static-sound-name "egg-hit") (new-sound-id) 1024 0 0 1 #t)
(sound-play "egg-hit")
(cond
((not (task-closed? (game-task beach-flutflut) (task-status need-introduction)))
)
@@ -1238,7 +1238,7 @@
)
)
)
(sound-play-by-name (static-sound-name "sack-land") (new-sound-id) 2048 0 0 1 #t)
(sound-play "sack-land" :vol 200)
(go flutflutegg-break #f)
)
(none)
+3 -1
View File
@@ -360,7 +360,9 @@ nav-enemy-default-event-handler
(none)
)
:trans (behavior ()
(if (logtest? (-> *target* state-flags) (state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying))
(if (logtest? (-> *target* state-flags)
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
)
(go-virtual nav-enemy-victory)
)
(if (< (ja-aframe-num 0) 2.0)
+2 -2
View File
@@ -69,7 +69,7 @@ nav-enemy-default-event-handler
(let ((f30-0 (rand-vu-float-range 0.9 1.1)))
(loop
(if (rand-vu-percent? 0.25)
(sound-play-by-name (static-sound-name "puppy-bark") (new-sound-id) 1024 0 0 1 #t)
(sound-play "puppy-bark")
)
(ja-no-eval :group! lurkerpuppy-run-ja :num! (seek! max f30-0) :frame-num 0.0)
(until (ja-done? 0)
@@ -170,7 +170,7 @@ nav-enemy-default-event-handler
nav-enemy-default-event-handler
)
:code (behavior ()
(sound-play-by-name (static-sound-name "head-butt") (new-sound-id) 1024 0 0 1 #t)
(sound-play "head-butt")
(go-virtual nav-enemy-victory)
(none)
)
+1 -1
View File
@@ -339,7 +339,7 @@ lurkerworm-default-post-behavior
:event lurkerworm-default-event-handler
:enter (behavior ()
(set! (-> self state-time) (-> *display* base-frame-counter))
(sound-play-by-name (static-sound-name "worm-rise1") (new-sound-id) 1024 0 0 1 #t)
(sound-play "worm-rise1")
(none)
)
:code (behavior ()
+1 -1
View File
@@ -811,7 +811,7 @@
(set! (-> v1-2 user-int8 0) 5)
)
(when (not arg0)
(sound-play-by-name (static-sound-name "scrate-break") (new-sound-id) 1024 0 0 1 #t)
(sound-play "scrate-break")
(process-spawn
part-tracker
:init part-tracker-init
+1 -1
View File
@@ -1259,7 +1259,7 @@
(if (>= (-> obj targetnum) 4)
(set! (-> obj teleport-frames) 1500)
)
(sound-play-by-name (static-sound-name "seagull-takeoff") (new-sound-id) 1024 0 0 1 #t)
(sound-play "seagull-takeoff")
(set! (-> obj alert-time) (-> *display* base-frame-counter))
)
(none)
+44 -42
View File
@@ -737,48 +737,50 @@
(defstate citb-robotboss-idle (citb-robotboss)
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(local-vars (sv-96 int) (sv-112 int))
(the-as object (cond
((= arg2 'shield-off)
(stop! (-> self sound))
(if (-> self shield-on)
(sound-play-by-name (static-sound-name "robotcage-off") (new-sound-id) 1024 0 0 1 #t)
(the-as
object
(cond
((= arg2 'shield-off)
(stop! (-> self sound))
(if (-> self shield-on)
(sound-play "robotcage-off")
)
(set! (-> self shield-on) #f)
#f
)
((= arg2 'shield-on)
(let ((v0-3 #t))
(set! (-> self shield-on) v0-3)
v0-3
)
)
((= arg2 'die)
(cleanup-for-death self)
(the-as symbol (deactivate self))
)
((or (= arg2 'touch) (= arg2 'attack))
(let ((s4-0 sound-play-by-name)
(s3-0 (make-u128 #x7061 (the-as uint #x7a2d646c65696873)))
(s2-0 (new-sound-id))
(s1-0 1024)
(s0-0 0)
)
(set! sv-96 0)
(set! sv-112 1)
(let ((t2-1 (target-pos 0)))
(s4-0 (the-as sound-name s3-0) s2-0 s1-0 s0-0 sv-96 (the-as sound-group sv-112) (the-as symbol t2-1))
)
)
(the-as symbol (send-event
arg0
'shove
(-> arg3 param 0)
(static-attack-info ((shove-up (meters 2)) (shove-back (meters 3))))
)
(set! (-> self shield-on) #f)
#f
)
((= arg2 'shield-on)
(let ((v0-3 #t))
(set! (-> self shield-on) v0-3)
v0-3
)
)
((= arg2 'die)
(cleanup-for-death self)
(the-as symbol (deactivate self))
)
((or (= arg2 'touch) (= arg2 'attack))
(let ((s4-0 sound-play-by-name)
(s3-0 (make-u128 #x7061 (the-as uint #x7a2d646c65696873)))
(s2-0 (new-sound-id))
(s1-0 1024)
(s0-0 0)
)
(set! sv-96 0)
(set! sv-112 1)
(let ((t2-1 (target-pos 0)))
(s4-0 (the-as sound-name s3-0) s2-0 s1-0 s0-0 sv-96 sv-112 (the-as symbol t2-1))
)
)
(the-as symbol (send-event
arg0
'shove
(-> arg3 param 0)
(static-attack-info ((shove-up (meters 2)) (shove-back (meters 3))))
)
)
)
)
)
)
)
)
)
)
:code (behavior ()
(let ((gp-0 (manipy-spawn (-> self root-override trans) (-> self entity) *citb-robotboss-nose-sg* #f :to self)))
@@ -1323,7 +1325,7 @@
(-> self root-override trans)
:to *entity-pool*
)
(sound-play-by-name (static-sound-name "sagecage-open") (new-sound-id) 1024 0 0 1 #t)
(sound-play "sagecage-open")
(go citb-generator-broken)
(none)
)
+2 -2
View File
@@ -103,7 +103,7 @@
(the-as object (cond
((= v1-0 'disable-bars)
(stop! (-> self sound))
(sound-play-by-name (static-sound-name "sagecage-off") (new-sound-id) 1024 0 0 1 #t)
(sound-play "sagecage-off")
(set! (-> self bars-on) #f)
(citb-sagecage-update-collision)
)
@@ -396,7 +396,7 @@
1024
0
0
1
(sound-group sfx)
(the-as symbol (-> self spawn-pos))
)
)
+2 -2
View File
@@ -169,7 +169,7 @@
)
(when (and (not s5-0) (< (-> self interp) 0.05))
(set! s5-0 #t)
(sound-play-by-name (static-sound-name "bridge-piece-up") (new-sound-id) 1024 0 0 1 (the-as symbol gp-0))
(sound-play "bridge-piece-up" :position (the-as symbol gp-0))
)
(set! (-> self spin-angle) (* 10.0 (-> self spin-speed) (-> self interp)))
(if (= (-> (the-as process-drawable (-> self parent 0)) root trans y) (-> self root-override trans y))
@@ -195,7 +195,7 @@
:code (behavior ()
(when (= (-> (the-as process-drawable (-> self parent 0)) root trans y) (-> self root-override trans y))
(set! (-> self state-time) (-> *display* base-frame-counter))
(sound-play-by-name (static-sound-name "bridge-piece-dn") (new-sound-id) 1024 0 0 1 #t)
(sound-play "bridge-piece-dn")
(let ((gp-1 (the int (* 300.0 (rand-vu-float-range 0.2 0.3)))))
(while (< (- (-> *display* base-frame-counter) (-> self state-time)) gp-1)
(set! (-> self interp)
+3 -27
View File
@@ -223,15 +223,7 @@
(eval-path-curve! (-> self path) (-> self basetrans) (-> self path-pos) 'interp)
(vector+! (-> self basetrans) (-> self basetrans) (-> self trans-offset))
(if (< (vector-vector-distance (-> self root-override trans) (ear-trans)) 81920.0)
(sound-play-by-name
(static-sound-name "eco-plat-hover")
(-> self sound-id)
1024
0
0
1
(the-as symbol (-> self root-override trans))
)
(sound-play "eco-plat-hover" :id (-> self sound-id) :position (the-as symbol (-> self root-override trans)))
)
(plat-trans)
(none)
@@ -791,15 +783,7 @@
(set! (-> self path-pos) (get-current-phase (-> self sync)))
(eval-path-curve! (-> self path) (-> self basetrans) (-> self path-pos) 'interp)
(if (< (vector-vector-distance (-> self root-override trans) (ear-trans)) 81920.0)
(sound-play-by-name
(static-sound-name "eco-plat-hover")
(-> self sound-id)
1024
0
0
1
(the-as symbol (-> self root-override trans))
)
(sound-play "eco-plat-hover" :id (-> self sound-id) :position (the-as symbol (-> self root-override trans)))
)
(plat-trans)
(none)
@@ -953,15 +937,7 @@
)
(ja-channel-push! 1 (seconds 0.1))
(restore-collide-with-as (-> self root-override))
(sound-play-by-name
(static-sound-name "eco-torch")
(new-sound-id)
1024
0
0
1
(the-as symbol (-> self blast-pos))
)
(sound-play "eco-torch" :position (the-as symbol (-> self blast-pos)))
(dotimes (gp-1 2)
(ja-no-eval :group! (-> self draw art-group data 4) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
+6 -6
View File
@@ -83,13 +83,13 @@
(case (-> arg3 param 1)
(('flop)
(TODO-RENAME-29 self (-> self event-going-down) (-> self notify-actor))
(sound-play-by-name (static-sound-name "silo-button") (new-sound-id) 1024 0 0 1 #t)
(sound-play "silo-button")
(go-virtual basebutton-going-down)
)
)
)
(('trigger)
(sound-play-by-name (static-sound-name "silo-button") (new-sound-id) 1024 0 0 1 #t)
(sound-play "silo-button")
(go-virtual basebutton-going-down)
)
(('move-to)
@@ -124,7 +124,7 @@
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('untrigger)
(sound-play-by-name (static-sound-name "silo-button") (new-sound-id) 1024 0 0 1 #t)
(sound-play "silo-button")
(go-virtual basebutton-going-up)
)
(('move-to)
@@ -163,7 +163,7 @@
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('untrigger)
(sound-play-by-name (static-sound-name "silo-button") (new-sound-id) 1024 0 0 1 #t)
(sound-play "silo-button")
(go-virtual basebutton-going-up)
)
(('move-to)
@@ -192,7 +192,7 @@
(suspend)
)
(TODO-RENAME-29 self (-> self event-going-up) (-> self notify-actor))
(sound-play-by-name (static-sound-name "silo-button") (new-sound-id) 1024 0 0 1 #t)
(sound-play "silo-button")
(go-virtual basebutton-going-up)
)
)
@@ -217,7 +217,7 @@
(move-to-vec-or-quat! self (the-as vector (-> arg3 param 0)) (the-as quaternion (-> arg3 param 1)))
)
(('trigger)
(sound-play-by-name (static-sound-name "silo-button") (new-sound-id) 1024 0 0 1 #t)
(sound-play "silo-button")
(go-virtual basebutton-going-down)
)
)
+6 -14
View File
@@ -184,11 +184,11 @@
(cond
((-> self locked)
(if (= (-> self next-state name) 'door-closed)
(sound-play-by-name (static-sound-name "door-lock") (new-sound-id) 1024 0 0 1 #t)
(sound-play "door-lock")
)
)
(else
(sound-play-by-name (static-sound-name "door-unlock") (new-sound-id) 1024 0 0 1 #t)
(sound-play "door-unlock")
)
)
#t
@@ -240,17 +240,9 @@ eco-door-event-handler
)
)
(if gp-0
(sound-play-by-name
(static-sound-name "blue-eco-on")
(new-sound-id)
1024
0
0
1
(the-as symbol (-> self root-override trans))
)
(sound-play "blue-eco-on" :position (the-as symbol (-> self root-override trans)))
)
(sound-play-by-name (-> self open-sound) (new-sound-id) 1024 0 0 1 #t)
(sound-play-by-name (-> self open-sound) (new-sound-id) 1024 0 0 (sound-group sfx) #t)
(clear-collide-with-as (-> self root-override))
(until (ja-done? 0)
(ja :num! (seek! max (-> self speed)))
@@ -312,13 +304,13 @@ eco-door-event-handler
(suspend)
)
)
(sound-play-by-name (-> self close-sound) (new-sound-id) 1024 0 0 1 #t)
(sound-play-by-name (-> self close-sound) (new-sound-id) 1024 0 0 (sound-group sfx) #t)
(until (ja-done? 0)
(ja :num! (seek! 0.0 (-> self speed)))
(suspend)
)
(if (-> self locked)
(sound-play-by-name (static-sound-name "door-lock") (new-sound-id) 1024 0 0 1 #t)
(sound-play "door-lock")
)
(go-virtual door-closed)
(none)
+1 -1
View File
@@ -533,7 +533,7 @@ battlecontroller-default-event-handler
process-drawable-fuel-cell-handler
)
:code (behavior ()
(sound-play-by-name (static-sound-name "money-pickup") (new-sound-id) 1024 -2286 0 1 #f)
(sound-play "money-pickup" :pitch -1.5 :position #f)
(battlecontroller-battle-end)
(battlecontroller-camera-off)
(battlecontroller-set-task-completed)
+2 -2
View File
@@ -48,7 +48,7 @@
(defstate launcherdoor-closed (launcherdoor)
:code (behavior ((arg0 symbol))
(if (not arg0)
(sound-play-by-name (static-sound-name "ldoor-close") (new-sound-id) 1024 0 0 1 #t)
(sound-play "ldoor-close")
)
(when *target*
(case (-> *target* current-level name)
@@ -110,7 +110,7 @@
(defstate launcherdoor-open (launcherdoor)
:code (behavior ((arg0 symbol))
(if (not arg0)
(sound-play-by-name (static-sound-name "ldoor-open") (new-sound-id) 1024 0 0 1 #t)
(sound-play "ldoor-open")
)
(set! (-> self draw force-lod) 0)
(clear-collide-with-as (-> self root-override))
+3 -3
View File
@@ -73,7 +73,7 @@
)
:code (behavior ((arg0 symbol))
(if (and (not arg0) (-> self child))
(sound-play-by-name (static-sound-name "close-orb-cash") (new-sound-id) 1024 0 0 1 #t)
(sound-play "close-orb-cash")
)
(dotimes (gp-1 (-> self money))
(let ((a0-4 (handle->process (-> self money-list gp-1))))
@@ -205,7 +205,7 @@
(calculate-pos self arg0)
(if arg0
(set! (-> self basetrans y) (-> self platform-pos))
(sound-play-by-name (static-sound-name "open-orb-cash") (new-sound-id) 1024 0 0 1 #t)
(sound-play "open-orb-cash")
)
(dotimes (s5-1 (-> self money))
(let ((s4-1 (new 'stack-no-clear 'vector)))
@@ -275,7 +275,7 @@
:trans (the-as (function none :behavior orb-cache-top) plat-trans)
:code (behavior ((arg0 symbol))
(if (not arg0)
(sound-play-by-name (static-sound-name "close-orb-cash") (new-sound-id) 1024 0 0 1 #t)
(sound-play "close-orb-cash")
)
(ja :group! (-> self draw art-group data 3) :num! (identity (ja-aframe 0.0 0)))
(new 'stack-no-clear 'vector)
+3 -3
View File
@@ -216,7 +216,7 @@
(move-to-point! (-> self root-override) gp-0)
)
)
(sound-play-by-name (static-sound-name "elev-loop") (-> self sound-id) 1024 0 0 1 #t)
(sound-play "elev-loop" :id (-> self sound-id))
(let ((gp-1 (the-as sound-rpc-set-param (get-sound-buffer-entry))))
(set! (-> gp-1 command) (sound-command set-param))
(set! (-> gp-1 id) (-> self sound-id))
@@ -290,7 +290,7 @@
(move-to-point! (-> self root-override) gp-0)
)
)
(sound-play-by-name (static-sound-name "elev-loop") (-> self sound-id) 1024 0 0 1 #t)
(sound-play "elev-loop" :id (-> self sound-id))
(let ((gp-1 (the-as sound-rpc-set-param (get-sound-buffer-entry))))
(set! (-> gp-1 command) (sound-command set-param))
(set! (-> gp-1 id) (-> self sound-id))
@@ -324,7 +324,7 @@
(process-entity-status! self (entity-perm-status bit-3) #f)
)
(sound-stop (-> self sound-id))
(sound-play-by-name (static-sound-name "elev-land") (new-sound-id) 1024 0 0 1 #t)
(sound-play "elev-land")
(loop
(if (or (not *target*)
(< 268435460.0 (vector-vector-xz-distance-squared (-> self root-override trans) (target-pos 0)))
+1 -9
View File
@@ -96,15 +96,7 @@
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('wake)
(sound-play-by-name
(static-sound-name "blue-eco-on")
(new-sound-id)
1024
0
0
1
(the-as symbol (-> self root-override trans))
)
(sound-play "blue-eco-on" :position (the-as symbol (-> self root-override trans)))
(go-virtual plat-path-active (the-as plat #f))
)
(('ridden 'edge-grabbed)
+1 -9
View File
@@ -239,15 +239,7 @@
)
(eval-path-curve! (-> self path) (-> self basetrans) (-> self path-pos) 'interp)
(if (< (vector-vector-distance (-> self root-override trans) (ear-trans)) 81920.0)
(sound-play-by-name
(static-sound-name "eco-plat-hover")
(-> self sound-id)
1024
0
0
1
(the-as symbol (-> self root-override trans))
)
(sound-play "eco-plat-hover" :id (-> self sound-id) :position (the-as symbol (-> self root-override trans)))
)
(plat-trans)
(none)
+9 -1
View File
@@ -592,7 +592,15 @@
(set! (-> self rbody lin-momentum-damping-factor) (-> self info linear-damping))
(set! (-> self rbody ang-momentum-damping-factor) (-> self info angular-damping))
(if (-> self player-impulse)
(sound-play-by-name (string->sound-name (-> self info sound-name)) (new-sound-id) 1024 0 0 1 #t)
(sound-play-by-name
(string->sound-name (-> self info sound-name))
(new-sound-id)
1024
0
0
(sound-group sfx)
#t
)
)
(TODO-RENAME-28 self)
(quaternion-copy! (-> self root-overlay quat) (-> self rbody rotation))
+7 -10
View File
@@ -362,7 +362,7 @@ nav-enemy-default-event-handler
(s5-0 (new 'stack-no-clear 'vector))
)
(-> *display* base-frame-counter)
(sound-play-by-name (static-sound-name "bigshark-bite") (new-sound-id) 1024 0 0 1 #t)
(sound-play "bigshark-bite")
(set! (-> self state-time) (-> *display* base-frame-counter))
(set! (-> gp-0 quad) (-> self collide-info trans quad))
(ja-channel-push! 1 (seconds 0.1))
@@ -488,7 +488,7 @@ nav-enemy-default-event-handler
:code (behavior ()
(set! (-> self player-water-time) (-> *display* base-frame-counter))
(ja-channel-push! 1 (seconds 0.17))
(sound-play-by-name (static-sound-name "bigshark-idle") (new-sound-id) 1024 0 0 1 #t)
(sound-play "bigshark-idle")
(loop
(ja-no-eval :group! (-> self draw art-group data (-> self nav-info run-anim))
:num! (seek! max (-> self anim-speed))
@@ -509,14 +509,11 @@ nav-enemy-default-event-handler
(f1-2 (fmax 0.0 (fmin 1.0 (- 1.0 (/ (+ -24576.0 f3-0) (+ -24576.0 (-> self spawn-distance)))))))
(f0-2 (+ 0.5 (* 1.5 f1-2)))
)
(sound-play-by-name
(static-sound-name "bigshark-alert")
(-> self sound-id)
1024
(the int (* 1524.0 f0-2))
0
1
(the-as symbol (-> self collide-info trans))
(sound-play
"bigshark-alert"
:id (-> self sound-id)
:pitch f0-2
:position (the-as symbol (-> self collide-info trans))
)
)
(none)
+1 -1
View File
@@ -50,7 +50,7 @@
)
(when (>= (- (-> *display* base-frame-counter) (-> obj last-tick-time)) v1-7)
(set! (-> obj last-tick-time) (-> *display* base-frame-counter))
(sound-play-by-name (static-sound-name "stopwatch") (new-sound-id) 1024 0 0 1 #t)
(sound-play "stopwatch")
)
)
)
+2 -2
View File
@@ -221,7 +221,7 @@
(defstate jump (powercellalt)
:virtual #t
:code (behavior ()
(sound-play-by-name (static-sound-name "cell-prize") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cell-prize")
(let ((gp-1 (new 'stack 'trajectory)))
(set! (-> self base y) (-> self jump-pos y))
(setup-from-to-duration! gp-1 (-> self root-override trans) (-> self jump-pos) 300.0 -2.2755556)
@@ -241,7 +241,7 @@
(set! (-> self root-override trans quad) (-> self jump-pos quad))
(set! (-> self base quad) (-> self root-override trans quad))
(transform-post)
(sound-play-by-name (static-sound-name "land-pcmetal") (new-sound-id) 1024 3048 0 1 #t)
(sound-play "land-pcmetal" :pitch 2)
(process-spawn
part-tracker
:init part-tracker-init
+4 -28
View File
@@ -505,15 +505,7 @@
(>= (- (-> *display* base-frame-counter) (-> self state-time)) (-> self sound-delay))
)
(set! (-> self played-sound?) #t)
(sound-play-by-name
(static-sound-name "blob-jump")
(new-sound-id)
1024
(the int (* 1524.0 (nav-enemy-rnd-float-range -0.5 0.5)))
0
1
#t
)
(sound-play "blob-jump" :pitch (nav-enemy-rnd-float-range -0.5 0.5))
)
(dummy-53 self)
0
@@ -521,15 +513,7 @@
)
:code (behavior ()
(ja-channel-push! 1 (seconds 0.2))
(sound-play-by-name
(static-sound-name "blob-out")
(new-sound-id)
1024
(the int (* 1524.0 (nav-enemy-rnd-float-range -1.0 1.0)))
0
1
#t
)
(sound-play "blob-out" :pitch (nav-enemy-rnd-float-range -1.0 1.0))
(cond
((zero? (nav-enemy-rnd-int-count 2))
(ja-no-eval :group! green-eco-lurker-jump-with-flip-ja :num! (seek!) :frame-num 0.0)
@@ -562,15 +546,7 @@
)
:code (behavior ()
(activate! *camera-smush-control* 409.6 37 150 1.0 0.99)
(sound-play-by-name
(static-sound-name "blob-land")
(new-sound-id)
1024
(the int (* 1524.0 (nav-enemy-rnd-float-range -1.0 1.0)))
0
1
#t
)
(sound-play "blob-land" :pitch (nav-enemy-rnd-float-range -1.0 1.0))
(let ((v1-4 (-> self draw shadow-ctrl)))
(let ((a0-4 v1-4))
(set! (-> a0-4 settings bot-plane w) (- -7168.0))
@@ -678,7 +654,7 @@
(-> self collide-info trans)
:to *entity-pool*
)
(sound-play-by-name (static-sound-name "blob-explode") (new-sound-id) 1024 0 0 1 #t)
(sound-play "blob-explode")
(activate! *camera-smush-control* 409.6 37 150 1.0 0.99)
(let ((v1-14 (-> self draw shadow-ctrl)))
(logior! (-> v1-14 settings flags) (shadow-flags disable-draw))
@@ -254,7 +254,7 @@
(defstate darkecobomb-explode (darkecobomb)
:code (behavior ((arg0 symbol))
(send-event *target* 'reset-pickup 'eco)
(sound-play-by-name (static-sound-name "explod-bomb") (new-sound-id) 1024 0 0 1 #f)
(sound-play "explod-bomb" :position #f)
(activate! *camera-smush-control* 819.2 37 600 1.0 0.995)
(send-event (ppointer->process (-> self parent)) 'flash 255.0)
(process-spawn
@@ -351,7 +351,7 @@
:to *entity-pool*
)
(set! (-> self next-tick) (+ -0.06 (-> self next-tick)))
(sound-play-by-name (static-sound-name "robo-warning") (new-sound-id) 1024 0 0 1 #t)
(sound-play "robo-warning")
)
)
(if (>= (- (-> *display* game-frame-counter) (-> self state-time)) (the int (-> self countdown-time)))
@@ -366,7 +366,7 @@
(none)
)
:code (behavior ()
(sound-play-by-name (static-sound-name "bomb-open") (new-sound-id) 1024 0 0 1 #t)
(sound-play "bomb-open")
(ja-no-eval :group! (-> self draw art-group data 4) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
@@ -634,7 +634,7 @@
(defstate redshot-explode (redshot)
:enter (behavior ()
(set! (-> self state-time) (-> *display* game-frame-counter))
(sound-play-by-name (static-sound-name "red-explode") (new-sound-id) 1024 0 0 1 #t)
(sound-play "red-explode")
(logclear! (-> self draw status) (draw-status hidden))
(quaternion-identity! (-> self root-override quat))
(set! (-> self ring radius-secondary) 3072.0)
+14 -6
View File
@@ -889,7 +889,7 @@
:to *entity-pool*
)
)
(sound-play-by-name (static-sound-name "bfg-fire") (new-sound-id) 1024 0 0 1 #t)
(sound-play "bfg-fire")
(none)
)
@@ -1465,7 +1465,7 @@
gp-0
:to *entity-pool*
)
(sound-play-by-name (static-sound-name "red-fire") (new-sound-id) 1024 0 0 1 #t)
(sound-play "red-fire")
)
)
)
@@ -1920,7 +1920,7 @@
gp-0
:to *entity-pool*
)
(sound-play-by-name (static-sound-name "green-fire") (new-sound-id) 1024 0 0 1 #t)
(sound-play "green-fire")
)
)
(none)
@@ -2339,7 +2339,12 @@
(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) (state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying))))
(when (and *target*
(zero? (logand (-> *target* state-flags)
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
)
)
)
(let ((t2-0 (new 'stack-no-clear 'collide-tri-result))
(a2-0 (new 'stack-no-clear 'vector))
)
@@ -2374,7 +2379,10 @@
(when (and arg1 (nonzero? (-> self looping-sound 1)))
(update! (-> self looping-sound 1))
(if (and *target*
(zero? (logand (-> *target* state-flags) (state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)))
(zero? (logand (-> *target* state-flags)
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
)
)
(>= 8192.0 (vector-vector-distance gp-0 (target-pos 0)))
)
(send-event *target* 'attack #f (static-attack-info ((shove-up (meters 2.5)) (shove-back (meters 7.5)))))
@@ -2571,7 +2579,7 @@
(+! (-> self hits-to-go) -1)
(ja-channel-push! 1 (seconds 0.1))
(ja :group! robotboss-blue-last-hit-ja)
(sound-play-by-name (static-sound-name "explod-eye") (new-sound-id) 1024 0 0 1 #t)
(sound-play "explod-eye")
(set! (-> self blue-smoke) #t)
(let ((gp-1 (new 'stack-no-clear 'vector)))
(vector<-cspace! gp-1 (-> self node-list data 7))
+1 -9
View File
@@ -149,15 +149,7 @@
(seek! (-> self path-pos) (-> self dest) (* (-> self speed) (-> *display* seconds-per-frame)))
(eval-path-curve! (-> self path) (-> self basetrans) (-> self path-pos) 'interp)
(if (< (vector-vector-distance (-> self root-override trans) (ear-trans)) 81920.0)
(sound-play-by-name
(static-sound-name "eco-plat-hover")
(-> self sound-id)
1024
0
0
1
(the-as symbol (-> self root-override trans))
)
(sound-play "eco-plat-hover" :id (-> self sound-id) :position (the-as symbol (-> self root-override trans)))
)
(plat-trans)
(when (send-event *target* 'query 'powerup (pickup-type eco-yellow))
+3 -3
View File
@@ -104,7 +104,7 @@
(ja-channel-set! 0)
(clear-collide-with-as (-> self root-override))
(ja-post)
(sound-play-by-name (static-sound-name "cool-balloon") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cool-balloon")
(process-spawn
part-tracker
:init part-tracker-init
@@ -292,7 +292,7 @@
(= (send-event *target* 'query 'mode) 'racer)
(< (vector-vector-distance (-> self root-override trans) (target-pos 0)) 225280.0)
)
(sound-play-by-name (static-sound-name "magma-rock") (new-sound-id) 1024 0 0 1 #t)
(sound-play "magma-rock")
(let ((v1-8 (entity-actor-count (-> self entity) 'alt-actor)))
0
(cond
@@ -591,7 +591,7 @@
(ja-channel-set! 0)
(clear-collide-with-as (-> self root-override))
(ja-post)
(sound-play-by-name (static-sound-name "dcrate-break") (new-sound-id) 1024 0 0 1 #t)
(sound-play "dcrate-break")
(process-spawn
part-tracker
:init part-tracker-init
+17 -16
View File
@@ -732,7 +732,6 @@
(let* ((f0-16 (current-cycle-distance (-> self skel)))
(f0-18 (/ (* 58.0 (-> self control unknown-float01)) (* 60.0 f0-16)))
)
(format *stdcon* "~% val: ~f~%" f0-16)
(if (= (-> self control surf name) '*tar-surface*)
(set! f0-18 (* 0.4 (-> self control unknown-float12)))
)
@@ -792,7 +791,7 @@
)
:enter (behavior ((arg0 float) (arg1 float))
(set! (-> self state-time) (-> *display* base-frame-counter))
(sound-play-by-name (static-sound-name "jump") (new-sound-id) 1024 -762 0 1 #t)
(sound-play "jump" :pitch -0.5)
(init-var-jump arg0 arg1 (the-as vector #t) (the-as vector #t) (-> self control transv))
(logclear! (-> self control status) (cshape-moving-flags onsurf onground tsurf))
(set! (-> self control unknown-surface00) *flut-jump-mods*)
@@ -835,7 +834,8 @@
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
)
(zero? (logand (-> self state-flags) (state-flags prevent-attack)))
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08)))
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
)
)
)
(go target-flut-air-attack (-> *FLUT-bank* air-attack-speed))
@@ -948,7 +948,8 @@
(pad-buttons square)
)
(and (zero? (logand (-> self state-flags) (state-flags prevent-attack)))
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08)))
(zero? (logand (-> self control unknown-surface01 flags) (surface-flags prevent-attacks-during-launch-jump surf08))
)
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword36))
(the-as time-frame (-> *TARGET-bank* stuck-timeout))
)
@@ -961,7 +962,7 @@
(mod-var-jump #t #t (cpad-hold? (-> self control unknown-cpad-info00 number) x) (-> self control transv))
)
(if (ja-group? (-> self draw art-group data 149))
(sound-play-by-name (static-sound-name "flut-flap") (-> self flut flap-sound-id) 1024 0 0 1 #t)
(sound-play "flut-flap" :id (-> self flut flap-sound-id))
)
(seek!
(-> self control unknown-float122)
@@ -1312,7 +1313,7 @@
)
:code (behavior ()
(ja-channel-push! 1 (seconds 0.02))
(sound-play-by-name (static-sound-name "flut-hit") (new-sound-id) 1024 0 0 1 #t)
(sound-play "flut-hit")
(ja :group! (-> self draw art-group data 150) :num! min)
(set! (-> self control dynam gravity-max) 368640.0)
(set! (-> self control dynam gravity-length) 368640.0)
@@ -1515,7 +1516,7 @@
(none)
)
:code (behavior ((arg0 float))
(sound-play-by-name (static-sound-name "flut-hit") (new-sound-id) 1024 -762 0 1 #t)
(sound-play "flut-hit" :pitch -0.5)
(ja-channel-push! 1 (seconds 0.05))
(ja-no-eval :group! (-> self draw art-group data 152)
:num! (seek! (ja-aframe (the-as float 8.0) 0))
@@ -1566,7 +1567,7 @@
(set! (-> self control unknown-dword31) 0)
(set! (-> self control unknown-dword33) 0)
(set! (-> self control unknown-surface00) *flut-air-attack-mods*)
(sound-play-by-name (static-sound-name "flop-land") (new-sound-id) 1024 -609 0 1 #t)
(sound-play "flop-land" :pitch -0.4)
(dummy-10 (-> self skel effect) 'group-flut-attack-strike-ground (ja-frame-num 0) 0)
(let ((gp-2 (process-spawn touch-tracker :init touch-tracker-init (-> self control trans) 4096.0 30 :to self)))
(send-event (ppointer->process gp-2) 'event 'attack 'flut-attack)
@@ -1739,7 +1740,7 @@
)
)
(target-hit-effect gp-0)
(sound-play-by-name (static-sound-name "flut-hit") (new-sound-id) 1024 -1524 0 1 #t)
(sound-play "flut-hit" :pitch -1)
)
(set! (-> self control unknown-surface00) *smack-mods*)
(let ((f30-0 1.0))
@@ -1749,8 +1750,8 @@
(ja-channel-set! 1)
(ja :group! (-> self draw art-group data 158) :num! min)
)
(sound-play-by-name (static-sound-name "smack-surface") (new-sound-id) 1024 0 0 1 #t)
(sound-play-by-name (static-sound-name "flut-hit") (new-sound-id) 1024 1524 0 1 #t)
(sound-play "smack-surface")
(sound-play "flut-hit" :pitch 1)
)
(else
(when (not (ja-group? (-> self draw art-group data 157)))
@@ -1794,8 +1795,8 @@
((or (= arg0 'none) (= arg0 'water-vol) (= arg0 'sharkey))
)
((= arg0 'endlessfall)
(sound-play-by-name (static-sound-name "death-fall") (new-sound-id) 1024 0 0 1 #t)
(sound-play-by-name (static-sound-name "flut-hit") (new-sound-id) 716 -2133 0 1 #t)
(sound-play "death-fall")
(sound-play "flut-hit" :vol 70 :pitch -1.4)
(camera-change-to (the-as string cam-endlessfall) 30 #f)
(set! (-> self control pat-ignore-mask unknown-bit) 1)
(logclear! (-> self water flags) (water-flags wt04))
@@ -1914,7 +1915,7 @@
)
)
(let ((gp-1 #f))
(sound-play-by-name (static-sound-name "uppercut") (new-sound-id) 1024 0 0 1 #t)
(sound-play "uppercut")
(ja-channel-push! 1 (seconds 0.05))
(ja-no-eval :group! (-> self draw art-group data 155)
:num! (seek! (ja-aframe (the-as float 24.0) 0))
@@ -1930,7 +1931,7 @@
(ja :num! (seek! (ja-aframe (the-as float 24.0) 0)))
)
)
(sound-play-by-name (static-sound-name "flut-coo") (new-sound-id) 1024 0 0 1 #t)
(sound-play "flut-coo")
(logclear! (-> self state-flags) (state-flags use-alt-cam-pos))
(set! (-> self control transv quad) (the-as uint128 0))
(quaternion-copy! (-> self control quat) (-> self control unknown-quaternion00))
@@ -2026,7 +2027,7 @@
(set! (-> self control unknown-vector102 quad) (-> gp-0 quad))
(set! (-> self control unknown-vector103 quad) (-> s4-0 quad))
)
(sound-play-by-name (static-sound-name "flut-coo") (new-sound-id) 921 -762 0 1 #t)
(sound-play "flut-coo" :vol 90 :pitch -0.5)
(ja-channel-push! 1 (seconds 0.05))
(ja-no-eval :group! (-> self draw art-group data 156) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
+1 -1
View File
@@ -39,7 +39,7 @@
(case arg2
(('bonk)
(when (send-event arg0 'jump (-> self spring-height) (-> self spring-height) #f)
(sound-play-by-name (static-sound-name "trampoline") (new-sound-id) 1024 0 0 1 #t)
(sound-play "trampoline")
(go bouncer-fire)
)
)
+5 -5
View File
@@ -922,7 +922,7 @@
:code (behavior ()
(case (-> self mode)
(('deadly 'bad)
(sound-play-by-name (static-sound-name "caught-eel") (new-sound-id) 1024 0 0 1 #t)
(sound-play "caught-eel")
(ambient-hint-spawn "sksp0a42" (-> self root trans) *entity-pool* 'ambient)
(send-event (ppointer->process (-> self parent)) 'deadly)
)
@@ -938,7 +938,7 @@
(-> self root trans)
:to *entity-pool*
)
(sound-play-by-name (static-sound-name "get-big-fish") (new-sound-id) 1024 0 0 1 #t)
(sound-play "get-big-fish")
(send-event (ppointer->process (-> self parent)) 'fisher-fish-caught 5)
)
(else
@@ -953,7 +953,7 @@
(-> self root trans)
:to *entity-pool*
)
(sound-play-by-name (static-sound-name "get-small-fish") (new-sound-id) 1024 0 0 1 #t)
(sound-play "get-small-fish")
(send-event (ppointer->process (-> self parent)) 'fisher-fish-caught 1)
)
)
@@ -1496,7 +1496,7 @@
)
(set! (-> self spawner-last) (-> self spawner))
(set! (-> self spawn-time) (-> *display* base-frame-counter))
(sound-play-by-name (static-sound-name "fish-spawn") (new-sound-id) 716 0 0 1 #t)
(sound-play "fish-spawn" :vol 70)
(fisher-spawn-ambient)
(process-spawn fisher-fish gp-0 (-> self spawner) (* 1.85 (-> self params fish-vel)) :to self)
)
@@ -1523,7 +1523,7 @@
(local-vars (v0-2 object))
(case arg2
(('fisher-fish-die)
(sound-play-by-name (static-sound-name "fish-miss") (new-sound-id) 1024 0 0 1 #t)
(sound-play "fish-miss")
(set! v0-2 (+ (-> self missed) (-> arg3 param 0)))
(set! (-> self missed) (the-as int v0-2))
v0-2
+11 -56
View File
@@ -687,7 +687,10 @@
(set! sv-32 0)
(set! sv-48 1)
(let ((t2-0 (target-pos 0)))
(the-as int (s4-0 (the-as sound-name s3-0) s2-0 s1-0 s0-0 sv-32 sv-48 (the-as symbol t2-0)))
(the-as
int
(s4-0 (the-as sound-name s3-0) s2-0 s1-0 s0-0 sv-32 (the-as sound-group sv-48) (the-as symbol t2-0))
)
)
)
)
@@ -797,15 +800,7 @@
)
(when (not (and (-> self entity) (logtest? (-> self entity extra perm status) (entity-perm-status complete))))
(sound-stop (-> self sound-id))
(sound-play-by-name
(static-sound-name "beam-connect")
(new-sound-id)
1024
0
0
1
(the-as symbol (target-pos 0))
)
(sound-play "beam-connect" :position (the-as symbol (target-pos 0)))
)
(process-entity-status! self (entity-perm-status complete) #t)
(set! gp-0 #t)
@@ -1211,15 +1206,7 @@
(defstate periscope-activate (periscope)
:exit (behavior ()
(sound-stop (-> self rise-sound-id))
(sound-play-by-name
(static-sound-name "eco-tower-stop")
(new-sound-id)
1024
0
0
1
(the-as symbol (-> self base))
)
(sound-play "eco-tower-stop" :position (the-as symbol (-> self base)))
(none)
)
:trans periscope-debug-trans
@@ -1235,15 +1222,7 @@
(set! (-> self turn) (+ 18204.445 (-> self target-turn)))
)
(until (and v1-13 (= (-> self turn) (-> self target-turn)) (= (-> self tilt) (-> self target-tilt)))
(sound-play-by-name
(static-sound-name "eco-tower-rise")
(-> self rise-sound-id)
1024
0
0
1
(the-as symbol (-> self base))
)
(sound-play "eco-tower-rise" :id (-> self rise-sound-id) :position (the-as symbol (-> self base)))
(seek! (-> self y-offset) (-> self height) (* 16384.0 (-> *display* seconds-per-frame)))
(seek! (-> self turn) (-> self target-turn) (* 7281.778 (-> *display* seconds-per-frame)))
(seek! (-> self tilt) (-> self target-tilt) (* 7281.778 (-> *display* seconds-per-frame)))
@@ -1336,15 +1315,7 @@
(if (nonzero? gp-0)
(level-hint-spawn (game-text-id zero) (the-as string #f) (-> self entity) *entity-pool* (game-task none))
)
(sound-play-by-name
(static-sound-name "site-moves")
(-> self grips-sound-id)
1024
0
0
1
(the-as symbol (-> self grips transform))
)
(sound-play "site-moves" :id (-> self grips-sound-id) :position (the-as symbol (-> self grips transform)))
(seek! (-> self y-offset-grips) f30-0 (* 16384.0 (-> *display* seconds-per-frame)))
(periscope-update-joints)
(suspend)
@@ -1423,15 +1394,7 @@
)
:post (behavior ()
(if (-> self grips-moving?)
(sound-play-by-name
(static-sound-name "site-moves")
(-> self grips-sound-id)
1024
0
0
1
(the-as symbol (-> self grips transform))
)
(sound-play "site-moves" :id (-> self grips-sound-id) :position (the-as symbol (-> self grips transform)))
(sound-stop (-> self grips-sound-id))
)
(periscope-draw-beam-impact)
@@ -1675,15 +1638,7 @@
(until (= (-> self y-offset-grips) f30-0)
(seek! (-> self y-offset-grips) f30-0 (* 16384.0 (-> *display* seconds-per-frame)))
(periscope-update-joints)
(sound-play-by-name
(static-sound-name "site-moves")
(-> self grips-sound-id)
1024
0
0
1
(the-as symbol (-> self grips transform))
)
(sound-play "site-moves" :id (-> self grips-sound-id) :position (the-as symbol (-> self grips transform)))
(suspend)
)
)
@@ -1856,7 +1811,7 @@
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('attack)
(sound-play-by-name (static-sound-name "mirror-smash") (new-sound-id) 1024 0 0 1 #t)
(sound-play "mirror-smash")
(go reflector-mirror-broken #f)
)
)
+2 -18
View File
@@ -689,15 +689,7 @@
:trans (the-as (function none :behavior precurbridge) rider-trans)
:code (behavior ()
(process-entity-status! self (entity-perm-status complete) #t)
(sound-play-by-name
(static-sound-name "blue-eco-on")
(new-sound-id)
1024
0
0
1
(the-as symbol (-> self root-override trans))
)
(sound-play "blue-eco-on" :position (the-as symbol (-> self root-override trans)))
(ja-no-eval :group! (-> self draw art-group data 3) :num! (seek! max 0.25) :frame-num 0.0)
(until (ja-done? 0)
(if (rand-vu-percent? 0.1)
@@ -990,15 +982,7 @@
(send-event *target* 'query 'powerup (pickup-type eco-blue))
)
)
(sound-play-by-name
(static-sound-name "blue-eco-on")
(new-sound-id)
1024
0
0
1
(the-as symbol (-> self root-override trans))
)
(sound-play "blue-eco-on" :position (the-as symbol (-> self root-override trans)))
(go maindoor-open #f)
)
(if (and *target*
+8 -2
View File
@@ -117,7 +117,10 @@
)
(cond
((and (-> self is-lethal?)
(zero? (logand (-> *target* state-flags) (state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)))
(zero? (logand (-> *target* state-flags)
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
)
)
)
(when (send-event arg0 'attack (-> arg3 param 0) (new 'static 'attack-info))
(let ((v0-1 (the-as object #t)))
@@ -401,7 +404,10 @@ junglesnake-default-event-handler
:trans (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) (state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)))
(zero? (logand (-> *target* state-flags)
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
)
)
)
(go junglesnake-attack)
)
+2 -2
View File
@@ -74,7 +74,7 @@
)
(loop
(ja-channel-push! 1 (seconds 0.05))
(sound-play-by-name (static-sound-name "aphid-spike-out") (new-sound-id) 1024 0 0 1 #t)
(sound-play "aphid-spike-out")
(ja-no-eval :group! (-> self draw art-group data 6) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
@@ -95,7 +95,7 @@
)
(aphid-vulnerable)
(ja-channel-push! 1 (seconds 0.05))
(sound-play-by-name (static-sound-name "aphid-spike-in") (new-sound-id) 1024 0 0 1 #t)
(sound-play "aphid-spike-in")
(ja-no-eval :group! (-> self draw art-group data 6) :num! (seek! 0.0) :frame-num max)
(until (ja-done? 0)
(suspend)
+3 -3
View File
@@ -210,7 +210,7 @@
(go eggtop-close #f)
)
(spawn (-> self part) (-> self root-override trans))
(sound-play-by-name (static-sound-name "electric-loop") (-> self sound-id) 1024 0 0 1 #t)
(sound-play "electric-loop" :id (-> self sound-id))
(none)
)
:code (behavior ()
@@ -230,7 +230,7 @@
)
:code (behavior ((arg0 symbol))
(when (not arg0)
(sound-play-by-name (static-sound-name "vent-switch") (new-sound-id) 2048 0 0 1 #t)
(sound-play "vent-switch" :vol 200)
(process-spawn
part-tracker
:init part-tracker-init
@@ -285,7 +285,7 @@
)
)
(save-reminder (get-task-control (-> self entity extra perm task)) 2 0)
(sound-play-by-name (static-sound-name "jngb-eggtop-seq") (new-sound-id) 1024 0 0 1 #t)
(sound-play "jngb-eggtop-seq")
(ja-no-eval :group! (-> self draw art-group data 2) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
+8 -5
View File
@@ -730,7 +730,7 @@
(suspend)
(ja :num! (seek! (ja-aframe (the-as float 30.0) 0)))
)
(sound-play-by-name (static-sound-name "plant-leaf") (new-sound-id) 1024 0 0 1 #t)
(sound-play "plant-leaf")
(ja-no-eval :group! plant-boss-leaf-grow-right-ja :num! (seek!) :frame-num (ja-aframe (the-as float 30.0) 0))
(until (ja-done? 0)
(suspend)
@@ -747,7 +747,7 @@
(suspend)
(ja :num! (seek! (ja-aframe (the-as float 30.0) 0)))
)
(sound-play-by-name (static-sound-name "plant-leaf") (new-sound-id) 1024 0 0 1 #t)
(sound-play "plant-leaf")
(ja-no-eval :group! plant-boss-leaf-grow-left-ja :num! (seek!) :frame-num (ja-aframe (the-as float 30.0) 0))
(until (ja-done? 0)
(suspend)
@@ -863,7 +863,7 @@
:code (behavior ()
(case (-> self side)
((1)
(sound-play-by-name (static-sound-name "plant-leaf") (new-sound-id) 1024 0 0 1 #t)
(sound-play "plant-leaf")
(ja-no-eval :group! plant-boss-leaf-grow-right-ja :num! (seek! 0.0) :frame-num max)
(until (ja-done? 0)
(suspend)
@@ -871,7 +871,7 @@
)
)
(else
(sound-play-by-name (static-sound-name "plant-leaf") (new-sound-id) 1024 0 0 1 #t)
(sound-play "plant-leaf")
(ja-no-eval :group! plant-boss-leaf-grow-left-ja :num! (seek! 0.0) :frame-num max)
(until (ja-done? 0)
(suspend)
@@ -1092,7 +1092,10 @@
)
)
*target*
(zero? (logand (-> *target* state-flags) (state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)))
(zero? (logand (-> *target* state-flags)
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
)
)
)
(go plant-boss-attack 1)
)
+2 -2
View File
@@ -65,7 +65,7 @@
((begin (set! f30-0 (- f0-1 (-> self before-turn-down-time))) (< f30-0 (-> self turn-down-time)))
(when (not gp-0)
(set! gp-0 #t)
(sound-play-by-name (static-sound-name "plat-flip") (new-sound-id) 1024 0 0 1 #t)
(sound-play "plat-flip")
)
(ja :group! plat-flip-turn-down-ja
:num! (identity (/ (* f30-0 (the float (+ (-> (the-as art-joint-anim plat-flip-turn-down-ja) data 0 length) -1)))
@@ -81,7 +81,7 @@
(else
(when (not gp-0)
(set! gp-0 #t)
(sound-play-by-name (static-sound-name "plat-flip") (new-sound-id) 1024 0 0 1 #t)
(sound-play "plat-flip")
)
(let ((f30-2 (- f30-1 (-> self before-turn-up-time))))
(ja :group! plat-flip-turn-up-ja
+1 -1
View File
@@ -778,7 +778,7 @@
(the-as object (when (= v1-0 'attack)
(when (and (>= arg1 2) (= (-> arg3 param 1) 'eco-yellow))
(increment-success-for-hint (game-text-id lavatube-shoot-the-spheres))
(sound-play-by-name (static-sound-name "dcrate-break") (new-sound-id) 1024 0 0 1 #t)
(sound-play "dcrate-break")
(process-spawn
part-tracker
:init part-tracker-init
+3 -3
View File
@@ -500,7 +500,7 @@
(ja-channel-set! 0)
(clear-collide-with-as (-> self root-override))
(ja-post)
(sound-play-by-name (static-sound-name "dcrate-break") (new-sound-id) 1024 0 0 1 #t)
(sound-play "dcrate-break")
(let ((gp-1 (new 'stack-no-clear 'vector)))
(set! (-> gp-1 quad) (-> self root-override trans quad))
(set! (-> gp-1 y) (+ -49152.0 (-> gp-1 y)))
@@ -1021,7 +1021,7 @@
(ja-channel-set! 0)
(clear-collide-with-as (-> self root-override))
(ja-post)
(sound-play-by-name (static-sound-name "dcrate-break") (new-sound-id) 1024 0 0 1 #t)
(sound-play "dcrate-break")
(let ((gp-1 (new 'stack-no-clear 'vector)))
(set! (-> gp-1 quad) (-> self root-override trans quad))
(set! (-> gp-1 y) (+ -73728.0 (-> gp-1 y)))
@@ -1197,7 +1197,7 @@
(ja-channel-set! 0)
(clear-collide-with-as (-> self root-override))
(ja-post)
(sound-play-by-name (static-sound-name "cool-balloon") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cool-balloon")
(process-spawn
part-tracker
:init part-tracker-init
+13 -4
View File
@@ -453,7 +453,7 @@
:code (behavior ()
(logclear! (-> self mask) (process-mask actor-pause))
(dotimes (gp-0 (-> *dark-crystal-flash-delays* length))
(sound-play-by-name (static-sound-name "warning") (new-sound-id) 1024 0 0 1 #t)
(sound-play "warning")
(set! (-> self draw color-mult quad) (-> self lit-color-mult quad))
(set! (-> self draw color-emissive quad) (-> self lit-color-emissive quad))
(set! (-> self state-time) (-> *display* base-frame-counter))
@@ -497,8 +497,8 @@
(logior! (-> self draw status) (draw-status hidden))
(dummy-20 self)
(if (-> self underwater?)
(sound-play-by-name (static-sound-name "water-explosion") (new-sound-id) 1024 0 0 1 #t)
(sound-play-by-name (static-sound-name "crystal-explode") (new-sound-id) 1024 0 0 1 #t)
(sound-play "water-explosion")
(sound-play "crystal-explode")
)
(process-spawn
part-tracker
@@ -582,7 +582,16 @@
(when (>= (-> obj explode-danger-radius) (vector-vector-distance s5-0 s3-0))
(vector-! s4-0 s3-0 s5-0)
(let ((t2-0 (new 'stack-no-clear 'collide-tri-result)))
(if (< (fill-and-probe-using-line-sphere *collide-cache* s5-0 s4-0 819.2 (collide-kind background) obj t2-0 (new 'static 'pat-surface :noentity #x1))
(if (< (fill-and-probe-using-line-sphere
*collide-cache*
s5-0
s4-0
819.2
(collide-kind background)
obj
t2-0
(new 'static 'pat-surface :noentity #x1)
)
0.0
)
(send-event *target* 'attack #f (new 'static 'attack-info))
+4 -1
View File
@@ -505,7 +505,10 @@
)
(when (and (-> obj hit-player?)
(or (not *target*)
(and (zero? (logand (-> *target* state-flags) (state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)))
(and (zero? (logand (-> *target* state-flags)
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
)
)
(>= (- (-> *display* base-frame-counter) (-> obj hit-player-time)) (seconds 0.05))
)
)
+2 -2
View File
@@ -843,7 +843,7 @@
(go gnawer-retreat-into-post)
)
(('attack)
(sound-play-by-name (static-sound-name "gnawer-dies") (new-sound-id) 1024 -381 0 1 #t)
(sound-play "gnawer-dies" :pitch -0.25)
(go gnawer-retreat-into-post)
)
)
@@ -1254,7 +1254,7 @@
)
)
0
(sound-play-by-name (static-sound-name "cell-prize") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cell-prize")
(until (not (-> self child))
(suspend)
)
+1 -1
View File
@@ -502,7 +502,7 @@
)
(when (-> self should-play-sound?)
(set! (-> self should-play-sound?) #f)
(sound-play-by-name (static-sound-name "hot-flame") (new-sound-id) 1024 0 0 1 #t)
(sound-play "hot-flame")
)
(cond
((< gp-0 30)
+1 -1
View File
@@ -290,7 +290,7 @@
(let ((gp-0 (new 'stack-no-clear 'vector)))
(sp-kill-particle arg0 arg1)
(if (< (rand-float-gen) 0.25)
(sound-play-by-name (static-sound-name "water-drop") (new-sound-id) 1024 0 0 1 #t)
(sound-play "water-drop")
)
(set-vector! gp-0 (-> arg2 x) (-> arg1 user-float) (-> arg2 z) 1.0)
(sp-launch-particles-var
+11 -2
View File
@@ -180,7 +180,16 @@
(set! (-> a1-1 y) (+ 1228.8 (-> a1-1 y)))
(set-vector! a2-1 0.0 -61440.0 0.0 1.0)
(cond
((>= (fill-and-probe-using-line-sphere *collide-cache* a1-1 a2-1 7372.8 (collide-kind background) obj s5-0 (new 'static 'pat-surface :noentity #x1))
((>= (fill-and-probe-using-line-sphere
*collide-cache*
a1-1
a2-1
7372.8
(collide-kind background)
obj
s5-0
(new 'static 'pat-surface :noentity #x1)
)
0.0
)
(let ((v1-11 (-> obj draw shadow-ctrl)))
@@ -240,7 +249,7 @@
)
)
(when (= f30-0 (-> self traj time))
(sound-play-by-name (static-sound-name "eggs-lands") (new-sound-id) 1024 0 0 1 #t)
(sound-play "eggs-lands")
(go mother-spider-egg-on-ground)
)
)
@@ -332,13 +332,18 @@
(set! (-> obj target quad) (-> (target-pos 0) quad))
(set! (-> obj target y) (+ 4915.2 (-> obj target y)))
(set! (-> obj target-base quad) (-> obj target quad))
(set! (-> obj sound-id) (sound-play-by-name (static-sound-name "mother-track") (new-sound-id) 1024 0 0 1 #t))
(sound-play-by-name (static-sound-name "mother-fire") (new-sound-id) 1024 0 0 1 #t)
(set! (-> obj sound-id) (sound-play "mother-track"))
(sound-play "mother-fire")
(none)
)
(defmethod dummy-28 mother-spider-proj ((obj mother-spider-proj))
(when (and *target* (zero? (logand (-> *target* state-flags) (state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying))))
(when (and *target*
(zero? (logand (-> *target* state-flags)
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
)
)
)
(let ((gp-0 (-> obj target)))
(set! (-> gp-0 quad) (-> (target-pos 0) quad))
(set! (-> gp-0 y) (+ 4915.2 (-> gp-0 y)))
@@ -376,7 +381,7 @@
(if (nonzero? (-> self sound-id))
(sound-stop (-> self sound-id))
)
(sound-play-by-name (static-sound-name "mother-hit") (new-sound-id) 1024 0 0 1 #t)
(sound-play "mother-hit")
(suspend)
(go-virtual projectile-die)
(none)
+22 -5
View File
@@ -401,7 +401,16 @@
(set-vector! a2-0 0.0 -81920.0 0.0 1.0)
(set! (-> a1-0 y) (+ -8192.0 (-> a1-0 y)))
(cond
((>= (fill-and-probe-using-line-sphere *collide-cache* a1-0 a2-0 8192.0 (collide-kind background) obj s5-0 (new 'static 'pat-surface :noentity #x1))
((>= (fill-and-probe-using-line-sphere
*collide-cache*
a1-0
a2-0
8192.0
(collide-kind background)
obj
s5-0
(new 'static 'pat-surface :noentity #x1)
)
0.0
)
(let ((v1-11 (-> obj draw shadow-ctrl)))
@@ -1017,7 +1026,9 @@
)
(let ((gp-0 (new 'stack-no-clear 'vector)))
(vector<-cspace! gp-0 (-> self node-list data 6))
(if (or (logtest? (-> *target* state-flags) (state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying))
(if (or (logtest? (-> *target* state-flags)
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
)
(< (vector-vector-distance gp-0 (camera-pos)) 8192.0)
)
(go mother-spider-traveling (the-as uint 2))
@@ -1225,14 +1236,20 @@
(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) (state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)))
(zero? (logand (-> *target* state-flags)
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
)
)
)
(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) (state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)))
(zero? (logand (-> *target* state-flags)
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
)
)
(TODO-RENAME-21 (-> self nav) (-> self root-override trans))
)
)
@@ -1300,7 +1317,7 @@
(process-spawn mother-spider-egg (-> self entity) (-> self root-override trans) s5-0 s4-0 :to self)
(+! (-> self baby-count) 1)
(+! (-> self birthing-counter) -1)
(sound-play-by-name (static-sound-name "lay-eggs") (new-sound-id) 1024 0 0 1 #t)
(sound-play "lay-eggs")
)
)
)
+1 -1
View File
@@ -107,7 +107,7 @@
(defstate spiderwebs-bounce (spiderwebs)
:code (behavior ()
(logclear! (-> self mask) (process-mask actor-pause))
(sound-play-by-name (static-sound-name "web-tramp") (new-sound-id) 1024 0 0 1 #t)
(sound-play "web-tramp")
(ja-no-eval :group! spiderwebs-bounce-ja :num! (seek! (ja-aframe 10.0 0)) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
+8 -18
View File
@@ -579,25 +579,15 @@
(f1-2 100.0)
(f0-3 (* 3.0 f0-2))
)
(sound-play-by-name
(static-sound-name "propeller")
(-> self engine-sound-id)
(the int (* 10.24 f1-2))
(the int (* 1524.0 f0-3))
0
1
(the-as symbol (-> self node-list data 4 bone transform vector 3))
(sound-play
"propeller"
:id (-> self engine-sound-id)
:vol f1-2
:pitch f0-3
:position (the-as symbol (-> self node-list data 4 bone transform vector 3))
)
)
(sound-play-by-name
(static-sound-name "pedals")
(-> self pedal-sound-id)
1024
0
0
1
(the-as symbol (-> self root-overlay trans))
)
(sound-play "pedals" :id (-> self pedal-sound-id) :position (the-as symbol (-> self root-overlay trans)))
)
)
(else
@@ -735,7 +725,7 @@
(-> self explosion-force-position)
:to *entity-pool*
)
(sound-play-by-name (static-sound-name "explosion") (new-sound-id) 1024 0 0 1 #t)
(sound-play "explosion")
(set! (-> self explosion) #t)
(vector-! (-> self explosion-force) (-> self rbody position) (-> self explosion-force-position))
(set! (-> self explosion-force y) (* 2.0 (-> self explosion-force y)))
+3 -11
View File
@@ -138,7 +138,7 @@
(let ((v1-0 arg2))
(the-as object (when (or (= v1-0 'touch) (= v1-0 'attack))
(when (send-event arg0 'attack (-> arg3 param 0) (new 'static 'attack-info))
(sound-play-by-name (static-sound-name "icrate-break") (new-sound-id) 1024 0 0 1 #t)
(sound-play "icrate-break")
(process-spawn
part-tracker
:init part-tracker-init
@@ -164,15 +164,7 @@
)
(else
(if (< (vector-vector-distance (-> self root-override trans) (ear-trans)) 163840.0)
(sound-play-by-name
(static-sound-name "barrel-roll")
(-> self sound-id)
1024
0
0
1
(the-as symbol (-> self root-override trans))
)
(sound-play "barrel-roll" :id (-> self sound-id) :position (the-as symbol (-> self root-override trans)))
)
)
)
@@ -321,7 +313,7 @@
(set! sv-48 0.0)
(activate! (-> self smush) -0.15 90 150 1.0 1.0)
(set! sv-64 f24-0)
(sound-play-by-name (static-sound-name "barrel-bounce") (new-sound-id) 819 0 0 1 #t)
(sound-play "barrel-bounce" :vol 80)
(process-spawn
part-tracker
:init part-tracker-init
+1 -1
View File
@@ -1393,7 +1393,7 @@
(defstate breakaway-about-to-fall (breakaway)
:code (behavior ()
(sound-play-by-name (static-sound-name "falling-bones") (new-sound-id) 1024 0 0 1 #t)
(sound-play "falling-bones")
(sp-launch-particles-var
*sp-particle-system-2d*
(-> *part-id-table* 281)
+1 -1
View File
@@ -98,7 +98,7 @@
(suspend)
)
)
(sound-play-by-name (static-sound-name "arena-steps") (new-sound-id) 1024 0 0 1 #t)
(sound-play "arena-steps")
(send-to-all-after (-> self link) 'trigger-rise)
(go silostep-rise #f)
(none)
+10 -40
View File
@@ -686,14 +686,11 @@
(while (< (- (-> *display* base-frame-counter) (-> self state-time)) (the int (* 300.0 (-> self muzzle-time))))
(quaternion*! (-> self root-override quat) (-> self root-override quat) (-> self tumble-quat))
(suspend)
(let ((f0-1
(fmin
1.0
(/ (the float (- (-> *display* base-frame-counter) (-> self state-time)))
(the float (the int (* 300.0 (-> self muzzle-time))))
)
)
)
(let ((f0-1 (fmin 1.0 (/ (the float (- (-> *display* base-frame-counter) (-> self state-time)))
(the float (the int (* 300.0 (-> self muzzle-time))))
)
)
)
)
(set! (-> self root-override scale x) (* 0.6 f0-1))
(set! (-> self root-override scale y) (* 0.6 f0-1))
@@ -712,18 +709,7 @@
)
)
(set! (-> self sfx)
(the-as
uint
(sound-play-by-name
(static-sound-name "sack-incoming")
(new-sound-id)
1024
0
0
1
(the-as symbol (-> self root-override trans))
)
)
(the-as uint (sound-play "sack-incoming" :position (the-as symbol (-> self root-override trans))))
)
)
(when (nonzero? (-> self sfx))
@@ -756,15 +742,7 @@
0
)
(set! (-> self ground-time) (-> *display* base-frame-counter))
(sound-play-by-name
(static-sound-name "sack-land")
(new-sound-id)
1024
0
0
1
(the-as symbol (-> self root-override trans))
)
(sound-play "sack-land" :position (the-as symbol (-> self root-override trans)))
(ja-no-eval :group! sack-hit-ja :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
@@ -1135,7 +1113,7 @@
(vector+! (-> obj hellmouth) (-> obj hellmouth) s3-0)
(spawn-mistycannon-missile obj s3-0 s2-0 f30-0 arg1 f28-0 arg2 (-> obj entity))
)
(sound-play-by-name (static-sound-name "cannon-shot") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cannon-shot")
(set! (-> obj part local-clock) 0)
(set! (-> obj part-timer) (-> *display* base-frame-counter))
(mistycannon-pick-random-target-point)
@@ -1614,7 +1592,7 @@
(rotate! self f30-0)
(tilt! self (- f28-0))
(if (or (!= f30-0 0.0) (!= f28-0 0.0))
(sound-play-by-name (static-sound-name "telescope") (-> self aim-sound-id) 1024 0 0 1 #t)
(sound-play "telescope" :id (-> self aim-sound-id))
(sound-stop (-> self aim-sound-id))
)
)
@@ -1639,15 +1617,7 @@
(set! gp-0
(seekl gp-0 300 (the-as int (- (-> *display* base-frame-counter) (-> *display* old-base-frame-counter))))
)
(sound-play-by-name
(static-sound-name "cannon-charge")
(-> self sound-id)
1024
(the int (* 1524.0 (* 0.008 (the float gp-0))))
0
1
#t
)
(sound-play "cannon-charge" :id (-> self sound-id) :pitch (* 0.008 (the float gp-0)))
)
(when (or (= gp-0 300)
(and (zero? (logand (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x))) (nonzero? gp-0))
+1 -1
View File
@@ -342,7 +342,7 @@ nav-enemy-default-event-handler
(none)
)
:code (behavior ()
(sound-play-by-name (static-sound-name "money-pickup") (new-sound-id) 1024 0 0 1 #t)
(sound-play "money-pickup")
(close-specific-task! (game-task misty-muse) (task-status need-reminder))
(process-entity-status! self (entity-perm-status dead) #t)
(suspend)
+1 -9
View File
@@ -373,15 +373,7 @@
(defstate quicksandlurker-missile-impact (quicksandlurker-missile)
:code (behavior ()
(sound-play-by-name
(static-sound-name "sack-land")
(new-sound-id)
1024
0
0
1
(the-as symbol (-> self root-override trans))
)
(sound-play "sack-land" :position (the-as symbol (-> self root-override trans)))
(process-spawn
part-tracker
:init part-tracker-init
+10 -1
View File
@@ -356,7 +356,16 @@
(set! (-> a1-1 quad) (-> obj root trans quad))
(set! (-> a1-1 y) (+ -8192.0 (-> a1-1 y)))
(set-vector! a2-0 0.0 -81920.0 0.0 1.0)
(when (>= (fill-and-probe-using-line-sphere *collide-cache* a1-1 a2-0 8192.0 (collide-kind background) pp s3-1 (new 'static 'pat-surface :noentity #x1))
(when (>= (fill-and-probe-using-line-sphere
*collide-cache*
a1-1
a2-0
8192.0
(collide-kind background)
pp
s3-1
(new 'static 'pat-surface :noentity #x1)
)
0.0
)
(set! (-> s3-1 intersect w) 8192.0)
+2 -2
View File
@@ -338,7 +338,7 @@
(ja-channel-set! 0)
(clear-collide-with-as (-> self root-override))
(ja-post)
(sound-play-by-name (static-sound-name "dcrate-break") (new-sound-id) 1024 0 0 1 #t)
(sound-play "dcrate-break")
(if arg0
(process-spawn
part-tracker
@@ -497,7 +497,7 @@
)
)
(if (-> self triggered)
(sound-play-by-name (static-sound-name "rock-in-lava") (new-sound-id) 1024 0 0 1 #t)
(sound-play "rock-in-lava")
)
(go-virtual rigid-body-platform-float)
)
+8 -64
View File
@@ -195,7 +195,7 @@
(defun ogreboss-rock-explosion-effect ((arg0 basic))
(with-pp
(sound-play-by-name (static-sound-name "ogre-explode") (new-sound-id) 1024 0 0 1 (the-as symbol arg0))
(sound-play "ogre-explode" :position (the-as symbol arg0))
(process-spawn
part-tracker
:init part-tracker-init
@@ -566,15 +566,7 @@
)
)
(spawn (-> self part) (-> self node-list data 3 bone transform vector 3))
(sound-play-by-name
(static-sound-name "ogre-rock")
(-> self sound-id)
1024
0
0
1
(the-as symbol (-> self joint transform))
)
(sound-play "ogre-rock" :id (-> self sound-id) :position (the-as symbol (-> self joint transform)))
(suspend)
)
(none)
@@ -583,15 +575,7 @@
)
(defbehavior ogreboss-super-boulder-impact-effect ogreboss-super-boulder ()
(sound-play-by-name
(static-sound-name "ogre-boulder")
(new-sound-id)
1024
0
0
1
(the-as symbol (-> self draw origin))
)
(sound-play "ogre-boulder" :position (the-as symbol (-> self draw origin)))
(activate! *camera-smush-control* (the-as float 819.2) 37 600 (the-as float 1.0) (the-as float 0.995))
(process-spawn
part-tracker
@@ -1297,15 +1281,7 @@
)
(set! (-> gp-0 dest) s5-0)
)
(sound-play-by-name
(static-sound-name "ogre-fires")
(new-sound-id)
1024
0
0
1
(the-as symbol (-> self root-override trans))
)
(sound-play "ogre-fires" :position (the-as symbol (-> self root-override trans)))
(process-spawn
part-tracker
:init part-tracker-init
@@ -1587,15 +1563,7 @@
)
(defbehavior ogreboss-roll-boulder ogreboss ()
(sound-play-by-name
(static-sound-name "ogre-fires")
(new-sound-id)
1024
0
0
1
(the-as symbol (-> self root-override trans))
)
(sound-play "ogre-fires" :position (the-as symbol (-> self root-override trans)))
(+! (-> self roll-boulder) (rand-vu-int-range 1 2))
(if (>= (-> self roll-boulder) 3)
(+! (-> self roll-boulder) -3)
@@ -1680,37 +1648,13 @@
(let ((v1-17 (rand-vu-int-range 0 2)))
(cond
((zero? v1-17)
(sound-play-by-name
(static-sound-name "ogre-grunt1")
(new-sound-id)
1024
0
0
1
(the-as symbol (-> self root-override trans))
)
(sound-play "ogre-grunt1" :position (the-as symbol (-> self root-override trans)))
)
((= v1-17 1)
(sound-play-by-name
(static-sound-name "ogre-grunt2")
(new-sound-id)
1024
0
0
1
(the-as symbol (-> self root-override trans))
)
(sound-play "ogre-grunt2" :position (the-as symbol (-> self root-override trans)))
)
(else
(sound-play-by-name
(static-sound-name "ogre-grunt3")
(new-sound-id)
1024
0
0
1
(the-as symbol (-> self root-override trans))
)
(sound-play "ogre-grunt3" :position (the-as symbol (-> self root-override trans)))
)
)
)
+14 -16
View File
@@ -55,10 +55,8 @@
)
)
(('boost)
(sound-play-by-name (static-sound-name "get-blue-eco") (new-sound-id) 1024 0 0 1 #t)
(set! (-> self racer boost-sound-id)
(sound-play-by-name (static-sound-name "zoom-boost") (new-sound-id) 1024 0 0 1 #t)
)
(sound-play "get-blue-eco")
(set! (-> self racer boost-sound-id) (sound-play "zoom-boost"))
(set! (-> self racer boost-time) (-> *display* base-frame-counter))
(let ((f0-12 (seek
(-> self racer boost-level)
@@ -464,8 +462,8 @@
)
(when (!= (-> self racer slide-shift-x) 0.0)
(if (rand-vu-percent? 0.5)
(sound-play-by-name (static-sound-name "zoomer-rev1") (new-sound-id) 819 0 0 1 #t)
(sound-play-by-name (static-sound-name "zoomer-rev2") (new-sound-id) 819 0 0 1 #t)
(sound-play "zoomer-rev1" :vol 80)
(sound-play "zoomer-rev2" :vol 80)
)
)
(set! (-> self racer bounce) 0)
@@ -519,7 +517,7 @@
:event (-> target-racing-start event)
:enter (behavior ((arg0 float) (arg1 float) (arg2 symbol))
(set! (-> self racer shock-offsetv) 0.0)
(sound-play-by-name (static-sound-name "zoomer-jump") (new-sound-id) 1024 0 0 1 #t)
(sound-play "zoomer-jump")
(set! (-> self state-time) (-> *display* base-frame-counter))
(when arg2
(when (>= (-> self racer hill-ground-value) 0.11)
@@ -642,7 +640,7 @@
:event (-> target-racing-start event)
:enter (behavior ((arg0 float) (arg1 float) (arg2 symbol))
(logior! (-> self control root-prim prim-core action) (collide-action ca-15))
(sound-play-by-name (static-sound-name "zoomer-jump") (new-sound-id) 1024 0 0 1 #t)
(sound-play "zoomer-jump")
(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))
@@ -713,7 +711,7 @@
(defstate target-racing-smack (target)
:event (-> target-racing-start event)
:enter (behavior ((arg0 float) (arg1 symbol))
(sound-play-by-name (static-sound-name "smack-surface") (new-sound-id) 1024 0 0 1 #t)
(sound-play "smack-surface")
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.5))
(set! (-> self racer heavy) arg1)
(vector-! (-> self control transv) (-> self control unknown-vector70) (-> self control trans))
@@ -741,7 +739,7 @@
(none)
)
:code (behavior ((arg0 float) (arg1 symbol))
(sound-play-by-name (static-sound-name "zoomer-crash-2") (new-sound-id) 1024 0 0 1 #t)
(sound-play "zoomer-crash-2")
(ja-channel-push! 2 (seconds 0.05))
(ja-no-eval :group! (-> self draw art-group data 136) :num! (seek!))
(ja :chan 1
@@ -828,7 +826,7 @@
(when (!= (-> self attack-info mode) 'endlessfall)
(dummy-10 (-> self skel effect) 'group-target-hit -1.0 -1)
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 (seconds 0.3))
(sound-play-by-name (static-sound-name "oof") (new-sound-id) 1024 0 0 1 #t)
(sound-play "oof")
)
(set! (-> self game hit-time) (-> *display* base-frame-counter))
(logior! (-> self state-flags) (state-flags being-attacked))
@@ -910,7 +908,7 @@
((-> target-racing-start exit))
(send-event (ppointer->process (-> self manipy)) 'anim-mode 'loop)
(send-event (ppointer->process (-> self manipy)) 'draw #f)
(sound-play-by-name (static-sound-name "zoomer-explode") (new-sound-id) 1024 0 0 1 #t)
(sound-play "zoomer-explode")
(process-spawn
part-tracker
:init part-tracker-init
@@ -1002,7 +1000,7 @@
)
)
(('melt)
(sound-play-by-name (static-sound-name "zoomer-melt") (new-sound-id) 1024 0 0 1 #t)
(sound-play "zoomer-melt")
(process-spawn
part-tracker
:init part-tracker-init
@@ -1025,7 +1023,7 @@
)
)
(('endlessfall)
(sound-play-by-name (static-sound-name "death-fall") (new-sound-id) 1024 0 0 1 #t)
(sound-play "death-fall")
(camera-change-to (the-as string cam-endlessfall) 30 #f)
(set! (-> self control pat-ignore-mask unknown-bit) 1)
(let ((f30-0 (fmin -4096.0 (- (-> self control ground-impact-vel)))))
@@ -1139,7 +1137,7 @@
(set! (-> self control transv quad) (the-as uint128 0))
(when (< 50.0 (ja-aframe-num 0))
(when (not gp-1)
(sound-play-by-name (static-sound-name "zoomer-start") (new-sound-id) 1024 0 0 1 #t)
(sound-play "zoomer-start")
(set! gp-1 #t)
)
(set! (-> self racer front-rotv) 65536.0)
@@ -1279,7 +1277,7 @@
:event target-generic-event-handler
:exit (-> target-racing-start exit)
:code (behavior ((arg0 handle))
(sound-play-by-name (static-sound-name "zoomer-stop") (new-sound-id) 1024 0 0 1 #t)
(sound-play "zoomer-stop")
(set! (-> self state-time) (-> *display* base-frame-counter))
(set! (-> self control transv quad) (the-as uint128 0))
(let ((gp-1 (new 'stack-no-clear 'vector)))
+9 -11
View File
@@ -588,14 +588,12 @@
)
)
(let ((f0-11 (lerp-scale 100.0 60.0 (-> self racer engine-sound-pitch) 0.8 2.0)))
(sound-play-by-name
(static-sound-name "zoomer-loop")
(-> self racer engine-sound-id)
(the int (* 10.24 f0-11))
(the int (* 1524.0 (-> self racer engine-sound-pitch)))
0
1
(the-as symbol (-> self control trans))
(sound-play
"zoomer-loop"
:id (-> self racer engine-sound-id)
:vol f0-11
:pitch (-> self racer engine-sound-pitch)
:position (the-as symbol (-> self control trans))
)
)
(cond
@@ -617,7 +615,7 @@
(>= (- (-> *display* base-frame-counter) (-> self racer heat-sound-time)) (seconds 1))
)
(set! (-> self racer heat-sound-time) (-> *display* base-frame-counter))
(sound-play-by-name (static-sound-name "warning") (new-sound-id) 1024 0 0 1 #t)
(sound-play "warning")
)
)
)
@@ -966,7 +964,7 @@
1024
0
0
1
(sound-group sfx)
#t
)
)
@@ -978,7 +976,7 @@
)
)
(set! (-> self racer heat-sound-time) (-> *display* base-frame-counter))
(sound-play-by-name (static-sound-name "warning") (new-sound-id) 1024 0 0 1 #t)
(sound-play "warning")
)
(when (rand-vu-percent? (/ (-> self racer heat) (-> *RACER-bank* heat-max)))
(let ((a2-28
@@ -1175,7 +1175,7 @@
(let ((gp-0 (new 'stack-no-clear 'vector)))
(sp-kill-particle arg0 arg1)
(if (< (rand-float-gen) 0.05)
(sound-play-by-name (static-sound-name "land-grass") (new-sound-id) 1024 0 0 1 #t)
(sound-play "land-grass")
)
(set-vector! gp-0 (-> arg2 x) (-> arg1 user-float) (-> arg2 z) 1.0)
(sp-launch-particles-var
+4 -4
View File
@@ -273,7 +273,7 @@
:code (behavior ()
(dark-plant-randomize self)
(logclear! (-> self draw status) (draw-status hidden))
(sound-play-by-name (static-sound-name "darkvine-grow") (new-sound-id) 1024 0 0 1 #t)
(sound-play "darkvine-grow")
(ja-no-eval :group! (-> self draw art-group data 4) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
@@ -324,7 +324,7 @@
:code (behavior ()
(spawn (-> self part) (-> self root trans))
(ja-channel-push! 1 (seconds 0.2))
(sound-play-by-name (static-sound-name "darkvine-kill") (new-sound-id) 1024 0 0 1 #t)
(sound-play "darkvine-kill")
(ja-no-eval :group! (-> self draw art-group data 3) :num! (seek!) :frame-num 0.0)
(until (ja-done? 0)
(suspend)
@@ -345,7 +345,7 @@
(>= 81920.0 (vector-vector-distance (-> self root trans) (-> *target* control trans)))
)
(if (rand-vu-percent? 0.3)
(sound-play-by-name (static-sound-name "darkvine-move") (new-sound-id) 1024 0 0 1 #t)
(sound-play "darkvine-move")
)
(when (task-closed? (game-task rolling-plants) (task-status need-hint))
(level-hint-spawn
@@ -829,7 +829,7 @@
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('break)
(sound-play-by-name (static-sound-name "cool-rolling-st") (new-sound-id) 1024 0 0 1 #t)
(sound-play "cool-rolling-st")
(go rolling-start-break #f)
)
(('break-and-die)
+1 -1
View File
@@ -655,7 +655,7 @@
(none)
)
:exit (behavior ()
(sound-play-by-name (static-sound-name "close-racering") (new-sound-id) 1024 0 0 1 #t)
(sound-play "close-racering")
(let ((a0-3 (handle->process (-> self part-track))))
(if a0-3
(deactivate a0-3)
+11 -13
View File
@@ -911,7 +911,9 @@
(dummy-57 self)
(logclear! (-> self mask) (process-mask actor-pause))
(if (or (not *target*)
(logtest? (-> *target* state-flags) (state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying))
(logtest? (-> *target* state-flags)
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
)
(not (nav-enemy-test-point-near-nav-mesh? (-> *target* control shadow-pos)))
)
(go-virtual nav-enemy-patrol)
@@ -1046,7 +1048,9 @@
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
(dummy-58 self)
(if (or (not *target*)
(logtest? (-> *target* state-flags) (state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying))
(logtest? (-> *target* state-flags)
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
)
(not (nav-enemy-test-point-near-nav-mesh? (-> *target* control shadow-pos)))
)
(go ice-cube-retract-spikes)
@@ -1136,7 +1140,9 @@
(logior! (-> self nav-enemy-flags) (nav-enemy-flags navenmf2))
(set! (-> self next-skid-sound-time) (-> *display* base-frame-counter))
(if (or (not *target*)
(logtest? (-> *target* state-flags) (state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying))
(logtest? (-> *target* state-flags)
(state-flags being-attacked invulnerable timed-invulnerable invuln-powerup do-not-notice dying)
)
(not (nav-enemy-test-point-near-nav-mesh? (-> *target* control shadow-pos)))
)
(go ice-cube-retract-spikes)
@@ -1235,15 +1241,7 @@
)
(when (>= (-> *display* base-frame-counter) (-> self next-skid-sound-time))
(set! (-> self next-skid-sound-time) (+ (-> *display* base-frame-counter) (nav-enemy-rnd-int-range 60 120)))
(sound-play-by-name
(static-sound-name "ice-stop")
(new-sound-id)
(the int (* 10.24 (the float (the int (* 0.0012207031 (-> self speed))))))
0
0
1
#t
)
(sound-play "ice-stop" :vol (the float (the int (* 0.0012207031 (-> self speed)))))
)
)
(let ((f30-1 (* (vector-xz-length (-> self nav travel)) (-> *display* frames-per-second))))
@@ -1421,7 +1419,7 @@
:to self
)
)
(sound-play-by-name (static-sound-name "ice-explode") (new-sound-id) 1024 0 0 1 #t)
(sound-play "ice-explode")
(suspend)
(ja-channel-set! 0)
(ja-post)

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