test game actors and fix up/disable broken ones (#1103)

* test village1, beach, jungle actors

* fix jungle actors

* more anims and fixes

* Update launch.vs.json

* fix bad `robotboss` decomp

* fix `robotboss`

* Update robotboss.gc

* fix `mother-spider-proj`

* fix detach (windows)

* update refs

* village2 spools

* type fixes + a few more spols + add append/not-append to goos

* fix beach, misty, village1, village3, lavatube

* fix snow entities

* fix `target-flut`

* update refs

* forgot one

* fail

* sound fixes

* fix test

* complain if `heap-base` is bad

* correct `add-spheres!` decomp errors

* fix citadel

* fix target `change-state` handler

* fix `final-door` state

* fix `target-flut-falling`

* fix deftypes

* oopsie

* move heap memory display behind a toggle and make it fancy

* Update gstate.gc
This commit is contained in:
ManDude
2022-01-28 00:33:34 +00:00
committed by GitHub
parent 35bdc9b1d3
commit eb53f410e5
75 changed files with 2001 additions and 2084 deletions
+2 -2
View File
@@ -60,8 +60,8 @@
"type" : "default",
"project" : "CMakeLists.txt",
"projectTarget" : "gk.exe (bin\\gk.exe)",
"name" : "Run - Runtime (with kernel + display)",
"args" : [ "-fakeiso", "-debug", "-v" ]
"name" : "Run - Runtime (boot)",
"args" : [ "-boot", "-fakeiso", "-debug", "-v" ]
},
{
"type" : "default",
+4 -5
View File
@@ -327,7 +327,7 @@ StructureDefResult parse_structure_def(StructureType* type,
} else if (opt_name == ":method-count-assert") {
method_count_assert = get_int(car(rest));
if (method_count_assert == -1) {
throw std::runtime_error("Cannot use -1 as method_count_assert");
throw std::runtime_error("Cannot use -1 as method-count-assert");
}
rest = cdr(rest);
} else if (opt_name == ":flag-assert") {
@@ -342,6 +342,9 @@ StructureDefResult parse_structure_def(StructureType* type,
result.pack_me = true;
} else if (opt_name == ":heap-base") {
u16 hb = get_int(car(rest));
if ((hb % 0x10) != 0) {
throw std::runtime_error("heap-base is not 16-byte aligned");
}
rest = cdr(rest);
flags.heap_base = hb;
} else if (opt_name == ":allow-misaligned") {
@@ -448,10 +451,6 @@ BitFieldTypeDefResult parse_bitfield_type_def(BitFieldType* type,
result.generate_runtime_type = false;
} else if (opt_name == ":no-inspect") {
type->set_gen_inspect(false);
} else if (opt_name == ":heap-base") {
u16 hb = get_int(car(rest));
rest = cdr(rest);
flags.heap_base = hb;
} else {
throw std::runtime_error("Invalid option in field specification: " + opt_name);
}
+36 -35
View File
@@ -2212,12 +2212,12 @@
:size-assert #x20
:flag-assert #x1000000020
(:methods
(add-spheres! (_type_ (pointer sphere) int) int 9)
(add-spheres! (_type_ (inline-array sphere) int) int 9)
(add-point! (_type_ vector3s) int 10)
(set-from-point-offset! (_type_ vector3s vector3s) int 11)
(set-from-point-offset-pad! (_type_ vector3s vector3s float) int 12)
(set-from-sphere! (_type_ sphere) int 13)
(set-from-spheres! (_type_ (pointer sphere) int) int 14)
(set-from-spheres! (_type_ (inline-array sphere) int) int 14)
(add-box! (_type_ bounding-box) int 15)
)
)
@@ -11963,8 +11963,8 @@
(new (symbol type process-drawable) _type_)
(TODO-RENAME-9 (_type_) none 9)
(dummy-10 (_type_ symbol float int) object 10)
(dummy-11 (_type_ symbol basic int basic int) none 11)
(dummy-12 (_type_ symbol basic int basic sound-name) int 12)
(dummy-11 (_type_ symbol float int basic pat-surface) none 11)
(dummy-12 (_type_ symbol float int basic sound-name) int 12)
(set-channel-offset! (_type_ int) none 13)
(TODO-RENAME-14 (_type_ float float float) none 14)
)
@@ -12233,7 +12233,7 @@
target-flut-hit-ground
target-flut-air-attack-hit-ground
(target-flut-jump float float)
target-flut-falling
(target-flut-falling symbol)
(target-flut-hit symbol attack-info)
target-flut-walk
(target-flut-air-attack float)
@@ -12517,7 +12517,7 @@
;; - Types
(deftype collide-using-spheres-params (structure)
((spheres (pointer sphere) :offset-assert 0)
((spheres (inline-array sphere) :offset-assert 0)
(num-spheres uint32 :offset-assert 4)
(collide-with collide-kind :offset-assert 8)
(proc process-drawable :offset-assert 16)
@@ -17427,8 +17427,9 @@
:method-count-assert 12
:size-assert #x10
:flag-assert #xc00000010
:pack-me
(:methods
(dummy-9 (_type_ vector int float process-drawable) none 9)
(dummy-9 (_type_) none 9)
(TODO-RENAME-10 (_type_ vector int float process-drawable) vector 10)
(play-ambient (_type_ string symbol vector) symbol 11)
)
@@ -19848,7 +19849,7 @@
(define-extern clone-anim (function handle int symbol string none :behavior process-drawable))
(define-extern merc-eye-anim (function process-drawable none))
(define-extern ja-anim-done? (function process symbol))
(define-extern command-get-camera (function object state object)) ;; ret - (state camera)
(define-extern command-get-camera (function object state state))
(define-extern camera-anim (function symbol basic entity (pointer process) :behavior camera-tracker)) ;; unused
(define-extern camera-tracker-init (function object object :behavior camera-tracker)) ;; TODO - nested SC
(define-extern cam-launcher-joystick (function vector :behavior camera-slave))
@@ -20487,14 +20488,14 @@
(define-extern main-debug-hook (function none))
(define-extern main-draw-hook (function none))
(define-extern swap-display (function display none))
(define-extern marks-cam-restore (function symbol))
(define-extern eddie-cam-restore (function vector))
(define-extern gregs-jungle-cam-restore (function string))
(define-extern gregs-village1-cam-restore (function string))
(define-extern gregs-texture-cam-restore (function string))
(define-extern gregs-texture2-cam-restore (function string))
(define-extern cave-cam-restore (function vector))
(define-extern paals-cam-restore (function vector))
(define-extern marks-cam-restore (function none))
(define-extern eddie-cam-restore (function none))
(define-extern gregs-jungle-cam-restore (function none))
(define-extern gregs-village1-cam-restore (function none))
(define-extern gregs-texture-cam-restore (function none))
(define-extern gregs-texture2-cam-restore (function none))
(define-extern cave-cam-restore (function none))
(define-extern paals-cam-restore (function none))
;; - Symbols
@@ -20823,7 +20824,7 @@
;; - Functions
(define-extern sound-name-with-material (function symbol int string sound-name))
(define-extern sound-name-with-material (function symbol pat-surface string sound-name))
;; - Unknowns
@@ -21165,7 +21166,7 @@
;; - Functions
(define-extern othercam-calc (function float float))
(define-extern othercam-calc (function float none))
(define-extern vector-for-ambient (function process-drawable vector vector))
(define-extern hide-hud (function none))
(define-extern hud-hidden? (function symbol))
@@ -23196,7 +23197,7 @@
(can-activate? (_type_) symbol 26)
(TODO-RENAME-27 (_type_) none 27)
(TODO-RENAME-28 (_type_) collide-shape-moving 28)
(can-target-move? (_type_) symbol 29) ;; NOTE - ive seen two different return types, float and symbol...symbol seems more compelling
(can-target-move? (_type_) none 29)
(should-teleport? (_type_) symbol 30)
(TODO-RENAME-31 (_type_) none 31) ;; TODO - need to know super::14
(TODO-RENAME-32 (_type_) none 32)
@@ -25305,19 +25306,19 @@
(des-cam-entity string :offset-assert 392)
(use-interesting symbol :offset-assert 396)
(ignore-camera symbol :offset-assert 400)
(ambient ambient-control :offset 408)
(yellow-gun joint-mod :offset 424)
(palette-val float :offset 428)
(looping-sound ambient-sound 4 :offset 432)
(dda robotboss-dda :offset 448)
(valid-frames int32 :offset 452)
(skip-cut symbol :offset 456)
(keep-charging symbol :offset 460)
(ambient ambient-control :inline :offset-assert 408)
(yellow-gun joint-mod :offset-assert 424)
(palette-val float :offset-assert 428)
(looping-sound ambient-sound 4 :offset-assert 432)
(dda robotboss-dda :offset-assert 448)
(valid-frames int32 :offset-assert 452)
(skip-cut symbol :offset-assert 456)
(keep-charging symbol :offset-assert 460)
)
:heap-base #x16
:heap-base #x160
:method-count-assert 21
:size-assert #x1d0
:flag-assert #x15001601d0
:flag-assert #x15016001d0
(:methods
(ease-loc-t (_type_) float 20)
)
@@ -25547,7 +25548,7 @@
(define-extern arcing-shot-draw (function symbol :behavior arcing-shot))
(define-extern darkecobomb-handler (function process int symbol event-message-block object :behavior darkecobomb))
(define-extern darkecobomb-init-by-other (function vector vector float int float none :behavior darkecobomb))
(define-extern greenshot-init-by-other (function vector vector float uint float none :behavior greenshot))
(define-extern greenshot-init-by-other (function vector vector float int none :behavior greenshot))
(define-extern redshot-handler (function process int symbol event-message-block object :behavior redshot))
(define-extern redshot-init-by-other (function vector vector float uint uint uint none :behavior redshot))
(define-extern yellowshot-init-by-other (function vector vector float uint none :behavior yellowshot))
@@ -25705,7 +25706,7 @@
;; - Functions
(define-extern robotboss-always-trans (function state none :behavior robotboss)) ;; CFG problems TODO
(define-extern robotboss-always-trans (function (state robotboss) none :behavior robotboss)) ;; CFG problems TODO
(define-extern robotboss-shooting-trans (function int none :behavior robotboss))
(define-extern robotboss-blue-done (function object :behavior robotboss))
(define-extern robotboss-blue-beam (function int symbol none :behavior robotboss))
@@ -25716,7 +25717,7 @@
(define-extern robotboss-setup-for-hits (function int int object :behavior robotboss))
(define-extern robotboss-yellow-eco-on (function entity-perm-status :behavior robotboss))
(define-extern robotboss-yellow-eco-off (function entity-perm-status :behavior robotboss))
(define-extern robotboss-greenshot (function vector basic basic symbol none :behavior robotboss))
(define-extern robotboss-greenshot (function vector float int symbol none :behavior robotboss))
(define-extern robotboss-handler (function process int symbol event-message-block object :behavior robotboss))
(define-extern robotboss-darkecobomb (function vector float (pointer process) :behavior robotboss))
(define-extern robotboss-is-red-hit (function symbol :behavior robotboss))
@@ -25760,7 +25761,7 @@
(:methods
(idle () _type_ :state 20) ;; state
(dummy-21 (_type_) none 21)
(open () _type_ :state 22)
(open (symbol) _type_ :state 22)
)
)
@@ -26589,7 +26590,7 @@
;; - Functions
(define-extern peri-beamcam-init-by-other (function string (pointer process)))
(define-extern peri-beamcam-init-by-other (function string (pointer process) :behavior process))
(define-extern draw-power-beam (function vector vector none))
(define-extern reflector-origin-update (function entity-actor none :behavior reflector-origin))
(define-extern reflector-init-by-other (function vector none :behavior reflector))
@@ -27704,7 +27705,7 @@
(define-extern fishermans-boat-play-sounds (function none :behavior fishermans-boat))
(define-extern fishermans-boat-reset-physics (function none :behavior fishermans-boat))
(define-extern fishermans-boat-set-dock-point (function int none :behavior fishermans-boat))
(define-extern fishermans-boat-set-path-point (function vector none :behavior fishermans-boat))
(define-extern fishermans-boat-set-path-point (function int none :behavior fishermans-boat))
(define-extern fishermans-boat-next-path-point (function none :behavior fishermans-boat))
(define-extern fishermans-boat-set-throttle-by-speed (function float none :behavior fishermans-boat))
(define-extern fishermans-boat-enter-dock? (function symbol :behavior fishermans-boat))
@@ -287,7 +287,7 @@
// all unchecked and in level DGO code
"(anon-function 21 plant-boss)", // CFG
"target-flut-falling-anim-trans", // CFG failure
//"target-flut-falling-anim-trans", // CFG failure
"(anon-function 5 orbit-plat)" // CFG
],
@@ -499,7 +499,9 @@
"(method 27 nav-mesh)" : [8],
"(method 32 nav-control)": [12, 21, 32],
"start-collect-nav": [0],
"end-collect-nav": [0]
"end-collect-nav": [0],
"robotboss-always-trans": [9, 10, 11, 12, 13, 14, 15, 18, 29, 36, 45, 48],
"target-flut-falling-anim-trans" : [5, 6]
},
// Sometimes the game might use format strings that are fetched dynamically,
@@ -2746,7 +2746,7 @@
[16, "vector"],
[32, "vector"],
[48, "vector"],
[64, "vector"]
[64, "matrix"]
],
"(method 28 mother-spider-proj)": [[16, "vector"]],
@@ -5600,7 +5600,7 @@
"draw-power-beam": [
[16, "vector"],
[32, "collide-mesh-cache-tri"],
[32, "collide-tri-result"],
[128, "event-message-block"]
],
@@ -6353,5 +6353,13 @@
[16, "nav-control-cfs-work"]
],
"robotboss-always-trans": [
[16, "vector"],
[32, "vector"],
[48, "vector"],
[144, "vector"],
[64, "event-message-block"]
],
"placeholder-do-not-add-below!": []
}
@@ -370,8 +370,8 @@ void DirectRenderer::update_gl_blend() {
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
} else {
// unsupported blend: a 0 b 2 c 2 d 1
lg::error("unsupported blend: a {} b {} c {} d {}\n", (int)state.a, (int)state.b,
(int)state.c, (int)state.d);
lg::error("unsupported blend: a {} b {} c {} d {}", (int)state.a, (int)state.b, (int)state.c,
(int)state.d);
assert(false);
}
}
@@ -548,8 +548,8 @@ void SpriteRenderer::update_gl_blend(AdGifState& state) {
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
} else {
// unsupported blend: a 0 b 2 c 2 d 1
lg::error("unsupported blend: a {} b {} c {} d {}\n", (int)state.a, (int)state.b,
(int)state.c, (int)state.d);
lg::error("unsupported blend: a {} b {} c {} d {}", (int)state.a, (int)state.b, (int)state.c,
(int)state.d);
// assert(false);
}
}
+1 -1
View File
@@ -61,7 +61,7 @@
(y-rat (-> math-cam y-ratio))
(cull-info (-> math-cam cull-info))
)
(let ((unused-x-thing (/ (+ 1.0 (* (* 4.0 x-rat) x-rat)) (+ 1.0 (* x-rat x-rat))))))
(let ((unused-x-thing (/ (+ 1.0 (* 4.0 x-rat x-rat)) (+ 1.0 (* x-rat x-rat))))))
(let ((y-thing (/ (+ 1.0 (* (* 4.0 y-rat) y-rat)) (+ 1.0 (* y-rat y-rat)))))
(set! (-> cull-info x-fact) (/ (+ 1.0 (* 4.0 x-rat x-rat)) (* x-rat (sqrtf (+ 1.0 (* 16.0 x-rat x-rat))))))
(set! (-> cull-info y-fact) (/ (+ 1.0 (* 4.0 y-rat y-rat)) (* y-rat (sqrtf (+ 1.0 (* 16.0 y-rat y-rat))))))
+1 -1
View File
@@ -16,7 +16,7 @@
;;;;;;;;;;;;;;;;;;;;;;;
(deftype collide-using-spheres-params (structure)
((spheres (pointer sphere) :offset-assert 0)
((spheres (inline-array sphere) :offset-assert 0)
(num-spheres uint32 :offset-assert 4)
(collide-with collide-kind :offset-assert 8)
(proc process-drawable :offset-assert 16)
+2 -2
View File
@@ -2442,7 +2442,7 @@
)
(b! (zero? a2-0) cfg-5 :delay (.lvf vf1 a1-1))
(let ((a2-1 (+ a2-0 -1))
(a1-2 (&-> a1-1 4))
(a1-2 (the-as (inline-array sphere) (-> a1-1 1)))
)
(.sub.w.vf vf2 vf1 vf1 :mask #b111)
(.svf (&-> v1-0 0 bsphere quad) vf1)
@@ -2459,7 +2459,7 @@
(label cfg-3)
(b! (zero? a2-1) cfg-5 :delay (.lvf vf1 a1-2))
(+! a2-1 -1)
(set! a1-2 (&-> a1-2 4))
(set! a1-2 (the-as (inline-array sphere) (-> a1-2 1)))
(.sub.w.vf vf4 vf1 vf1 :mask #b111)
(.svf (&-> v1-1 bsphere quad) vf1)
(.add.w.vf vf5 vf1 vf1 :mask #b111)
+3 -3
View File
@@ -191,7 +191,7 @@
(set! (-> arg1 hanging-matrix vector 3 quad) (-> arg1 center-hold quad))
(transform-vectors! (-> arg1 hanging-matrix) (-> obj world-player-spheres) (-> obj local-player-spheres) 12)
(let ((a1-13 (new 'stack-no-clear 'collide-using-spheres-params)))
(set! (-> a1-13 spheres) (the-as (pointer sphere) (-> obj world-player-spheres)))
(set! (-> a1-13 spheres) (-> obj world-player-spheres))
(set! (-> a1-13 num-spheres) (the-as uint 12))
(set! (-> a1-13 collide-with) (-> obj cshape root-prim collide-with))
(set! (-> a1-13 proc) #f)
@@ -327,7 +327,7 @@
(let ((a0-24 'target-edge-grab-jump))
(b! (!= (-> *target* next-state name) a0-24) cfg-20 :delay (nop!))
)
(set! (-> a1-14 spheres) (the-as (pointer sphere) (-> v1-22 world-player-leap-up-spheres)))
(set! (-> a1-14 spheres) (-> v1-22 world-player-leap-up-spheres))
(set! (-> a1-14 num-spheres) (the-as uint 6))
(set! (-> a1-14 collide-with) (-> v1-22 cshape root-prim collide-with))
(set! (-> a1-14 proc) #f)
@@ -335,7 +335,7 @@
(set! (-> a1-14 solid-only) #t)
(b! #t cfg-21 :delay (nop!))
(label cfg-20)
(set! (-> a1-14 spheres) (the-as (pointer sphere) (-> v1-22 world-player-spheres)))
(set! (-> a1-14 spheres) (-> v1-22 world-player-spheres))
(set! (-> a1-14 num-spheres) (the-as uint 6))
(set! (-> a1-14 collide-with) (-> v1-22 cshape root-prim collide-with))
(set! (-> a1-14 proc) #f)
+3 -7
View File
@@ -204,10 +204,8 @@ This is updated from the entity system used in Crash 2, which had most of these
(cond
((zero? diff)
;; perfect match! we are done, set the tag-idx and get out of here.
(begin
(set! tag-idx check-idx)
(goto cfg-32)
)
(set! tag-idx check-idx)
(goto cfg-32)
)
(else
;; didn't match. pick the appropriate half of the remaining tags
@@ -485,7 +483,6 @@ This is updated from the entity system used in Crash 2, which had most of these
(let ((tag-pair (lookup-tag-idx obj name mode time)))
(cond
((< (the-as int tag-pair) 0)
(empty)
)
(else
(let* ((tag (-> obj tag (-> tag-pair lo)))
@@ -518,8 +515,7 @@ This is updated from the entity system used in Crash 2, which had most of these
(set! default (the-as uint128 (deref float data)))
)
(else
(empty)
)
)
)
)
)
+4 -2
View File
@@ -4302,8 +4302,6 @@
(int-var "LOD Actor" 3 dm-lod-int 0 1 #t 0 3)
)
;(flag "Alt load boundaries" #f ,(dm-lambda-boolean-flag (-> *pc-settings* new-lb?)))
(flag "Display actor bank" #f ,(dm-lambda-boolean-flag (-> *pc-settings* display-actor-bank)))
(flag "Pad display" #f ,(dm-lambda-boolean-flag (-> *pc-settings* debug-pad-display)))
(function "Reset" #f (lambda () (reset *pc-settings*)))
(function "Save" #f (lambda () (write-to-file *pc-settings* PC_SETTINGS_FILE_NAME)))
(function "Load" #f (lambda () (read-from-file *pc-settings* PC_SETTINGS_FILE_NAME)))
@@ -4318,8 +4316,12 @@
(flag "DECI Count" *display-deci-count* dm-boolean-toggle-pick-func)
(flag "Actor graph" *display-actor-graph* dm-boolean-toggle-pick-func)
(flag "Update vis outside bsp" *update-leaf-when-outside-bsp* dm-boolean-toggle-pick-func)
(flag "Pad display" #f ,(dm-lambda-boolean-flag (-> *pc-settings* debug-pad-display)))
(flag "Display actor bank" #f ,(dm-lambda-boolean-flag (-> *pc-settings* display-actor-bank)))
(float-var "Actor birth dist" #f ,(dm-lambda-meters-var (-> *ACTOR-bank* birth-dist)) 20 1 #t 0 10000 1)
(float-var "Actor pause dist" #f ,(dm-lambda-meters-var (-> *ACTOR-bank* pause-dist)) 20 1 #t 0 10000 1)
(flag "Heap status" #f ,(dm-lambda-boolean-flag (-> *pc-settings* display-heap-status)))
(flag "Bug report" #f ,(dm-lambda-boolean-flag (-> *pc-settings* display-bug-report)))
(flag "Force progress" #f ,(dm-lambda-boolean-flag (-> *pc-settings* progress-force?)))
)
))
+47 -20
View File
@@ -37,6 +37,44 @@
)
)
(defun line-in-view-frustum? ((arg0 vector) (arg1 vector))
(local-vars (v1-1 uint128) (v1-2 uint128) (v1-3 uint128) (a0-1 uint128) (a0-2 uint128) (a0-3 uint128))
(rlet ((acc :class vf)
(vf0 :class vf)
(vf10 :class vf)
(vf16 :class vf)
(vf17 :class vf)
(vf18 :class vf)
(vf19 :class vf)
(vf9 :class vf)
)
(init-vf0-vector)
(let ((v1-0 *math-camera*))
(.lvf vf9 (&-> arg0 quad))
(.lvf vf10 (&-> arg1 quad))
(.lvf vf16 (&-> v1-0 plane 0 quad))
(.lvf vf17 (&-> v1-0 plane 1 quad))
(.lvf vf18 (&-> v1-0 plane 2 quad))
(.lvf vf19 (&-> v1-0 plane 3 quad))
)
(.mul.x.vf acc vf16 vf9)
(.add.mul.y.vf acc vf17 vf9 acc)
(.add.mul.z.vf acc vf18 vf9 acc)
(.sub.mul.w.vf vf9 vf19 vf0 acc)
(.mul.x.vf acc vf16 vf10)
(.add.mul.y.vf acc vf17 vf10 acc)
(.add.mul.z.vf acc vf18 vf10 acc)
(.sub.mul.w.vf vf10 vf19 vf0 acc)
(.mov v1-1 vf9)
(.pcgtw v1-2 0 v1-1)
(.ppach v1-3 (the-as uint128 0) v1-2)
(.mov a0-1 vf10)
(.pcgtw a0-2 0 a0-1)
(.ppach a0-3 (the-as uint128 0) a0-2)
(zero? (logand (the-as int v1-3) (the-as int a0-3)))
)
)
(defmethod unpack-vis drawable ((obj drawable) (arg0 (pointer int8)) (arg1 (pointer int8)))
arg1
)
@@ -1175,8 +1213,6 @@
(none)
)
;; definition (debug) for function marks-cam-restore
;; Used lq/sq
(defun-debug marks-cam-restore ()
(let ((a0-0 (new-stack-vector0))
(a1-0 (new-stack-matrix0))
@@ -1212,14 +1248,10 @@
(clear *camera-old-stat-string-tfrag*)
(clear *camera-old-stat-string-tfrag-near*)
(clear *camera-old-stat-string-total*)
(let ((v0-7 #t))
(set! *display-camera-old-stats* v0-7)
v0-7
)
(set! *display-camera-old-stats* #t)
(none)
)
;; definition (debug) for function eddie-cam-restore
;; Used lq/sq
(defun-debug eddie-cam-restore ()
(let ((a0-0 (new-stack-vector0))
(a1-0 (new-stack-matrix0))
@@ -1246,10 +1278,9 @@
(set! (-> a1-0 vector 3 w) 1.0)
(debug-set-camera-pos-rot! a0-0 a1-0)
)
(none)
)
;; definition (debug) for function gregs-jungle-cam-restore
;; Used lq/sq
(defun-debug gregs-jungle-cam-restore ()
(let ((a0-0 (new-stack-vector0))
(a1-0 (new-stack-matrix0))
@@ -1285,10 +1316,9 @@
(clear *camera-old-stat-string-tfrag*)
(clear *camera-old-stat-string-tfrag-near*)
(clear *camera-old-stat-string-total*)
(none)
)
;; definition (debug) for function gregs-village1-cam-restore
;; Used lq/sq
(defun-debug gregs-village1-cam-restore ()
(let ((a0-0 (new-stack-vector0))
(a1-0 (new-stack-matrix0))
@@ -1324,10 +1354,9 @@
(clear *camera-old-stat-string-tfrag*)
(clear *camera-old-stat-string-tfrag-near*)
(clear *camera-old-stat-string-total*)
(none)
)
;; definition (debug) for function gregs-texture-cam-restore
;; Used lq/sq
(defun-debug gregs-texture-cam-restore ()
(let ((a0-0 (new-stack-vector0))
(a1-0 (new-stack-matrix0))
@@ -1363,10 +1392,9 @@
(clear *camera-old-stat-string-tfrag*)
(clear *camera-old-stat-string-tfrag-near*)
(clear *camera-old-stat-string-total*)
(none)
)
;; definition (debug) for function gregs-texture2-cam-restore
;; Used lq/sq
(defun-debug gregs-texture2-cam-restore ()
(let ((a0-0 (new-stack-vector0))
(a1-0 (new-stack-matrix0))
@@ -1402,10 +1430,9 @@
(clear *camera-old-stat-string-tfrag*)
(clear *camera-old-stat-string-tfrag-near*)
(clear *camera-old-stat-string-total*)
(none)
)
;; definition (debug) for function cave-cam-restore
;; Used lq/sq
(defun-debug cave-cam-restore ()
(let ((a0-0 (new-stack-vector0))
(a1-0 (new-stack-matrix0))
@@ -1432,10 +1459,9 @@
(set! (-> a1-0 vector 3 w) 1.0)
(debug-set-camera-pos-rot! a0-0 a1-0)
)
(none)
)
;; definition (debug) for function paals-cam-restore
;; Used lq/sq
(defun-debug paals-cam-restore ()
(let ((a0-0 (new-stack-vector0))
(a1-0 (new-stack-matrix0))
@@ -1462,6 +1488,7 @@
(set! (-> a1-0 vector 3 w) 1.0)
(debug-set-camera-pos-rot! a0-0 a1-0)
)
(none)
)
+24 -29
View File
@@ -1250,19 +1250,9 @@
;; TODO
(define-extern birth-viewer (function process entity object))
(define-extern collectable type)
(define-extern ecovalve type)
(define-extern crate type)
(define-extern water-vol type)
(define-extern slide-control type)
(define-extern racer type)
(define-extern launcher type)
(define-extern warp-gate-switch type)
(define-extern lurkercrab type)
(define-extern ecoventrock type)
(define-extern harvester type)
(define-extern yakow type)
(defmacro obj-etype? (&rest types)
`(or ,@(apply (lambda (x) `(begin (define-extern ,x type) (type-type? (-> obj etype) ,x))) types))
)
(defmacro heap-size-hack (info entity-type)
#x8000
@@ -1283,22 +1273,27 @@
"Create a process for this entity and start it."
;; temp
(unless (or (type-type? (-> obj etype) part-spawner)
(type-type? (-> obj etype) collectable)
(type-type? (-> obj etype) vent)
(type-type? (-> obj etype) ecovalve)
(type-type? (-> obj etype) water-vol)
(type-type? (-> obj etype) slide-control)
(type-type? (-> obj etype) racer)
(type-type? (-> obj etype) launcher)
(type-type? (-> obj etype) warp-gate-switch)
(type-type? (-> obj etype) lurkercrab)
(type-type? (-> obj etype) crate)
(type-type? (-> obj etype) ecoventrock)
(type-type? (-> obj etype) harvester)
(type-type? (-> obj etype) yakow)
)
;; (birth-log "rejecting ~A birth because yes (was ~A)~%" obj (-> obj etype))
(when (or (not (obj-etype? part-spawner process
collectable
vent
ecovalve
water-vol
slide-control
racer
launcher
warp-gate-switch
nav-enemy
orb-cache-top
process-taskable
crate
process-hidden
med-res-level))
;; disallowed types
(obj-etype? plat-eco boatpaddle cavecrystal snow-bunny ram citb-battlecontroller)
(zero? (-> obj etype)))
(when (nonzero? (-> obj etype))
(birth-log "rejecting etype ~A birth~%" (-> obj etype))
)
(logior! (-> obj extra perm status) (entity-perm-status bit-0))
(return obj)
)
+2 -2
View File
@@ -26,8 +26,8 @@
(new (symbol type process-drawable) _type_ 0)
(TODO-RENAME-9 (_type_) none 9)
(dummy-10 (_type_ symbol float int) object 10)
(dummy-11 (_type_ symbol basic int basic int) none 11)
(dummy-12 (_type_ symbol basic int basic sound-name) int 12)
(dummy-11 (_type_ symbol float int basic pat-surface) none 11)
(dummy-12 (_type_ symbol float int basic sound-name) int 12)
(set-channel-offset! (_type_ int) none 13)
(TODO-RENAME-14 (_type_ float float float) none 14)
)
+153 -168
View File
@@ -11,63 +11,63 @@
(define *debug-effect-control* #f)
(defun sound-name-with-material ((arg0 symbol) (arg1 int) (arg2 string))
(defun sound-name-with-material ((arg0 symbol) (arg1 pat-surface) (arg2 string))
(let ((gp-0 format)
(a0-2 (clear *temp-string*))
(a1-1 "~S-~S~S")
(v1-1 (shr (shl arg1 52) 58))
(v1-1 (-> arg1 material))
)
(gp-0
a0-2
a1-1
arg0
(cond
((= v1-1 5)
((= v1-1 (pat-material sand))
"sand"
)
((= v1-1 6)
((= v1-1 (pat-material wood))
"wood"
)
((= v1-1 13)
((= v1-1 (pat-material crwood))
"crwood"
)
((or (= v1-1 18) (= v1-1 8))
((or (= v1-1 (pat-material tube)) (= v1-1 (pat-material pcmetal)))
"pcmetal"
)
((or (= v1-1 16) (= v1-1 21))
((or (= v1-1 (pat-material metal)) (= v1-1 (pat-material rotate)))
"metal"
)
((= v1-1 9)
((= v1-1 (pat-material snow))
"snow"
)
((= v1-1 10)
((= v1-1 (pat-material deepsnow))
"dpsnow"
)
((= v1-1 14)
((= v1-1 (pat-material gravel))
"gravel"
)
((= v1-1 15)
((= v1-1 (pat-material dirt))
"dirt"
)
((zero? v1-1)
((= v1-1 (pat-material stone))
"stone"
)
((= v1-1 3)
((= v1-1 (pat-material waterbottom))
"water"
)
((= v1-1 4)
((= v1-1 (pat-material tar))
"tar"
)
((= v1-1 17)
((= v1-1 (pat-material straw))
"straw"
)
((= v1-1 1)
((= v1-1 (pat-material ice))
"ice"
)
((= v1-1 19)
((= v1-1 (pat-material swamp))
"swamp"
)
((= v1-1 22)
((= v1-1 (pat-material neutral))
"neutral"
)
(else
@@ -284,15 +284,7 @@
(let ((s3-0 (-> arg0 value))
(s5-0 (cond
((< arg2 0)
(let ((v0-0 (get-property-value
(-> obj res)
'effect-joint
'exact
arg1
(the-as uint128 0)
(the-as (pointer res-tag) #f)
*res-static-buf*
)
(let ((v0-0 (get-property-value (-> obj res) 'effect-joint 'exact arg1 (the-as uint128 0) (the-as (pointer res-tag) #f) *res-static-buf*)
)
)
(if (zero? v0-0)
@@ -342,7 +334,7 @@
)
)
)
(dummy-11 obj arg0 (the-as basic arg1) s5-0 (-> obj res) t1-1)
(dummy-11 obj arg0 arg1 s5-0 (-> obj res) (the-as pat-surface t1-1))
)
)
((let ((v1-18 (symbol->string arg0)))
@@ -416,7 +408,7 @@
(activate! *camera-smush-control* 819.2 37 600 1.0 0.995)
)
((zero? s3-0)
(dummy-12 obj arg0 (the-as basic arg1) s5-0 (-> obj res) (string->sound-name (symbol->string arg0)))
(dummy-12 obj arg0 arg1 s5-0 (-> obj res) (string->sound-name (symbol->string arg0)))
)
((= (-> (the-as basic s3-0) type) sparticle-launcher)
(if *debug-effect-control*
@@ -541,14 +533,14 @@
)
)
)
(s1-3 s2-5 (the-as symbol s0-3) (the-as basic arg1) s5-0 sv-288 t1-11)
(s1-3 s2-5 (the-as symbol s0-3) arg1 s5-0 sv-288 t1-11)
)
)
)
(send-event (-> obj process) 'death-start (the-as death-info s3-0))
)
(else
(dummy-12 obj arg0 (the-as basic arg1) s5-0 (-> obj res) (string->sound-name (symbol->string arg0)))
(dummy-12 obj arg0 arg1 s5-0 (-> obj res) (string->sound-name (symbol->string arg0)))
)
)
)
@@ -557,7 +549,7 @@
)
)
(defmethod dummy-11 effect-control ((obj effect-control) (arg0 symbol) (arg1 basic) (arg2 int) (arg3 basic) (arg4 int))
(defmethod dummy-11 effect-control ((obj effect-control) (arg0 symbol) (arg1 float) (arg2 int) (arg3 basic) (arg4 pat-surface))
(local-vars
(sv-48
(function sparticle-system sparticle-launcher vector sparticle-launch-state sparticle-launch-control float none)
@@ -599,64 +591,64 @@
(when (< (the-as int a0-4) 9000)
(let* ((a0-13 obj)
(t9-8 (method-of-object a0-13 dummy-10))
(v1-15 (shr (shl arg4 52) 58))
(v1-15 (-> arg4 material))
)
(t9-8
a0-13
(cond
((= v1-15 5)
((= v1-15 (pat-material sand))
'group-land-poof-sand
)
((= v1-15 6)
((= v1-15 (pat-material wood))
'group-land-poof-wood
)
((= v1-15 13)
((= v1-15 (pat-material crwood))
'group-land-poof-crwood
)
((or (= v1-15 18) (= v1-15 8))
((or (= v1-15 (pat-material tube)) (= v1-15 (pat-material pcmetal)))
'group-land-poof-pcmetal
)
((or (= v1-15 16) (= v1-15 21))
((or (= v1-15 (pat-material metal)) (= v1-15 (pat-material rotate)))
'group-land-poof-metal
)
((= v1-15 1)
((= v1-15 (pat-material ice))
'group-land-poof-ice
)
((= v1-15 9)
((= v1-15 (pat-material snow))
'group-land-poof-snow
)
((= v1-15 10)
((= v1-15 (pat-material deepsnow))
'group-land-poof-dpsnow
)
((= v1-15 14)
((= v1-15 (pat-material gravel))
'group-land-poof-gravel
)
((= v1-15 15)
((= v1-15 (pat-material dirt))
'group-land-poof-dirt
)
((zero? v1-15)
((= v1-15 (pat-material stone))
'group-land-poof-stone
)
((= v1-15 3)
((= v1-15 (pat-material waterbottom))
'group-land-poof-water
)
((= v1-15 4)
((= v1-15 (pat-material tar))
'group-land-poof-tar
)
((= v1-15 17)
((= v1-15 (pat-material straw))
'group-land-poof-straw
)
((= v1-15 19)
((= v1-15 (pat-material swamp))
'group-land-poof-swamp
)
((= v1-15 22)
((= v1-15 (pat-material neutral))
'group-land-poof-neutral
)
(else
'group-land-poof-grass
)
)
(the-as float arg1)
arg1
-1
)
)
@@ -666,64 +658,64 @@
(when (< (the-as int a0-4) 9000)
(let* ((a0-14 obj)
(t9-9 (method-of-object a0-14 dummy-10))
(v1-20 (shr (shl arg4 52) 58))
(v1-20 (-> arg4 material))
)
(t9-9
a0-14
(cond
((= v1-20 5)
((= v1-20 (pat-material sand))
'group-run-poof-sand
)
((= v1-20 6)
((= v1-20 (pat-material wood))
'group-run-poof-wood
)
((= v1-20 13)
((= v1-20 (pat-material crwood))
'group-run-poof-crwood
)
((or (= v1-20 18) (= v1-20 8))
((or (= v1-20 (pat-material tube)) (= v1-20 (pat-material pcmetal)))
'group-run-poof-pcmetal
)
((or (= v1-20 16) (= v1-20 21))
((or (= v1-20 (pat-material metal)) (= v1-20 (pat-material rotate)))
'group-run-poof-metal
)
((= v1-20 1)
((= v1-20 (pat-material ice))
'group-run-poof-ice
)
((= v1-20 9)
((= v1-20 (pat-material snow))
'group-run-poof-snow
)
((= v1-20 10)
((= v1-20 (pat-material deepsnow))
'group-run-poof-dpsnow
)
((= v1-20 14)
((= v1-20 (pat-material gravel))
'group-run-poof-gravel
)
((= v1-20 15)
((= v1-20 (pat-material dirt))
'group-run-poof-dirt
)
((zero? v1-20)
((= v1-20 (pat-material stone))
'group-run-poof-stone
)
((= v1-20 3)
((= v1-20 (pat-material waterbottom))
'group-run-poof-water
)
((= v1-20 4)
((= v1-20 (pat-material tar))
'group-run-poof-tar
)
((= v1-20 17)
((= v1-20 (pat-material straw))
'group-run-poof-straw
)
((= v1-20 19)
((= v1-20 (pat-material swamp))
'group-run-poof-swamp
)
((= v1-20 22)
((= v1-20 (pat-material neutral))
'group-run-poof-neutral
)
(else
'group-run-poof-grass
)
)
(the-as float arg1)
arg1
-1
)
)
@@ -732,64 +724,64 @@
(('effect-just-footprint)
(let* ((a0-15 obj)
(t9-10 (method-of-object a0-15 dummy-10))
(v1-24 (shr (shl arg4 52) 58))
(v1-24 (-> arg4 material))
)
(t9-10
a0-15
(cond
((= v1-24 5)
((= v1-24 (pat-material sand))
'group-just-footprint-sand
)
((= v1-24 6)
((= v1-24 (pat-material wood))
'group-just-footprint-wood
)
((= v1-24 13)
((= v1-24 (pat-material crwood))
'group-just-footprint-crwood
)
((or (= v1-24 18) (= v1-24 8))
((or (= v1-24 (pat-material tube)) (= v1-24 (pat-material pcmetal)))
'group-just-footprint-pcmetal
)
((or (= v1-24 16) (= v1-24 21))
((or (= v1-24 (pat-material metal)) (= v1-24 (pat-material rotate)))
'group-just-footprint-metal
)
((= v1-24 1)
((= v1-24 (pat-material ice))
'group-just-footprint-ice
)
((= v1-24 9)
((= v1-24 (pat-material snow))
'group-just-footprint-snow
)
((= v1-24 10)
((= v1-24 (pat-material deepsnow))
'group-just-footprint-dpsnow
)
((= v1-24 14)
((= v1-24 (pat-material gravel))
'group-just-footprint-gravel
)
((= v1-24 15)
((= v1-24 (pat-material dirt))
'group-just-footprint-dirt
)
((zero? v1-24)
((= v1-24 (pat-material stone))
'group-just-footprint-stone
)
((= v1-24 3)
((= v1-24 (pat-material waterbottom))
'group-just-footprint-water
)
((= v1-24 4)
((= v1-24 (pat-material tar))
'group-just-footprint-tar
)
((= v1-24 17)
((= v1-24 (pat-material straw))
'group-just-footprint-straw
)
((= v1-24 19)
((= v1-24 (pat-material swamp))
'group-just-footprint-swamp
)
((= v1-24 22)
((= v1-24 (pat-material neutral))
'group-just-footprint-neutral
)
(else
'group-just-footprint-grass
)
)
(the-as float arg1)
arg1
-1
)
)
@@ -798,64 +790,64 @@
(when (< (the-as int a0-4) 9000)
(let* ((a0-16 obj)
(t9-11 (method-of-object a0-16 dummy-10))
(v1-29 (shr (shl arg4 52) 58))
(v1-29 (-> arg4 material))
)
(t9-11
a0-16
(cond
((= v1-29 5)
((= v1-29 (pat-material sand))
'group-just-poof-sand
)
((= v1-29 6)
((= v1-29 (pat-material wood))
'group-just-poof-wood
)
((= v1-29 13)
((= v1-29 (pat-material crwood))
'group-just-poof-crwood
)
((or (= v1-29 18) (= v1-29 8))
((or (= v1-29 (pat-material tube)) (= v1-29 (pat-material pcmetal)))
'group-just-poof-pcmetal
)
((or (= v1-29 16) (= v1-29 21))
((or (= v1-29 (pat-material metal)) (= v1-29 (pat-material rotate)))
'group-just-poof-metal
)
((= v1-29 1)
((= v1-29 (pat-material ice))
'group-just-poof-ice
)
((= v1-29 9)
((= v1-29 (pat-material snow))
'group-just-poof-snow
)
((= v1-29 10)
((= v1-29 (pat-material deepsnow))
'group-just-poof-dpsnow
)
((= v1-29 14)
((= v1-29 (pat-material gravel))
'group-just-poof-gravel
)
((= v1-29 15)
((= v1-29 (pat-material dirt))
'group-just-poof-dirt
)
((zero? v1-29)
((= v1-29 (pat-material stone))
'group-just-poof-stone
)
((= v1-29 3)
((= v1-29 (pat-material waterbottom))
'group-just-poof-water
)
((= v1-29 4)
((= v1-29 (pat-material tar))
'group-just-poof-tar
)
((= v1-29 17)
((= v1-29 (pat-material straw))
'group-just-poof-straw
)
((= v1-29 19)
((= v1-29 (pat-material swamp))
'group-just-poof-swamp
)
((= v1-29 22)
((= v1-29 (pat-material neutral))
'group-just-poof-neutral
)
(else
'group-just-poof-grass
)
)
(the-as float arg1)
arg1
-1
)
)
@@ -864,117 +856,117 @@
(('effect-slide-poof)
(let* ((a0-19 obj)
(t9-12 (method-of-object a0-19 dummy-10))
(v1-33 (shr (shl arg4 52) 58))
(v1-33 (-> arg4 material))
)
(t9-12
a0-19
(cond
((= v1-33 5)
((= v1-33 (pat-material sand))
'group-slide-poof-sand
)
((= v1-33 6)
((= v1-33 (pat-material wood))
'group-slide-poof-wood
)
((= v1-33 13)
((= v1-33 (pat-material crwood))
'group-slide-poof-crwood
)
((or (= v1-33 18) (= v1-33 8))
((or (= v1-33 (pat-material tube)) (= v1-33 (pat-material pcmetal)))
'group-slide-poof-pcmetal
)
((or (= v1-33 16) (= v1-33 21))
((or (= v1-33 (pat-material metal)) (= v1-33 (pat-material rotate)))
'group-slide-poof-metal
)
((= v1-33 1)
((= v1-33 (pat-material ice))
'group-slide-poof-ice
)
((= v1-33 9)
((= v1-33 (pat-material snow))
'group-slide-poof-snow
)
((= v1-33 10)
((= v1-33 (pat-material deepsnow))
'group-slide-poof-dpsnow
)
((= v1-33 14)
((= v1-33 (pat-material gravel))
'group-slide-poof-gravel
)
((= v1-33 15)
((= v1-33 (pat-material dirt))
'group-slide-poof-dirt
)
((zero? v1-33)
((= v1-33 (pat-material stone))
'group-slide-poof-stone
)
((= v1-33 3)
((= v1-33 (pat-material waterbottom))
'group-slide-poof-water
)
((= v1-33 4)
((= v1-33 (pat-material tar))
'group-slide-poof-tar
)
((= v1-33 17)
((= v1-33 (pat-material straw))
'group-slide-poof-straw
)
((= v1-33 19)
((= v1-33 (pat-material swamp))
'group-slide-poof-swamp
)
((= v1-33 22)
((= v1-33 (pat-material neutral))
'group-slide-poof-neutral
)
(else
'group-slide-poof-grass
)
)
(the-as float arg1)
arg1
-1
)
)
)
(('effect-droppings)
(let* ((v1-36 (shr (shl arg4 52) 58))
(let* ((v1-36 (-> arg4 material))
(s0-0 (cond
((= v1-36 5)
((= v1-36 (pat-material sand))
(-> *part-id-table* 95)
)
((= v1-36 6)
((= v1-36 (pat-material wood))
(-> *part-id-table* 97)
)
((= v1-36 13)
((= v1-36 (pat-material crwood))
(-> *part-id-table* 99)
)
((or (= v1-36 18) (= v1-36 8))
((or (= v1-36 (pat-material tube)) (= v1-36 (pat-material pcmetal)))
(-> *part-id-table* 2248)
)
((or (= v1-36 16) (= v1-36 21))
((or (= v1-36 (pat-material metal)) (= v1-36 (pat-material rotate)))
(-> *part-id-table* 2334)
)
((= v1-36 1)
((= v1-36 (pat-material ice))
(-> *part-id-table* 2249)
)
((= v1-36 9)
((= v1-36 (pat-material snow))
(-> *part-id-table* 2250)
)
((= v1-36 10)
((= v1-36 (pat-material deepsnow))
(-> *part-id-table* 2251)
)
((= v1-36 14)
((= v1-36 (pat-material gravel))
(-> *part-id-table* 2252)
)
((= v1-36 15)
((= v1-36 (pat-material dirt))
(-> *part-id-table* 2253)
)
((zero? v1-36)
((= v1-36 (pat-material stone))
(-> *part-id-table* 98)
)
((= v1-36 3)
((= v1-36 (pat-material waterbottom))
(-> *part-id-table* 2254)
)
((= v1-36 4)
((= v1-36 (pat-material tar))
(-> *part-id-table* 2255)
)
((= v1-36 17)
((= v1-36 (pat-material straw))
(-> *part-id-table* 2256)
)
((= v1-36 19)
((= v1-36 (pat-material swamp))
(-> *part-id-table* 2257)
)
((= v1-36 22)
((= v1-36 (pat-material neutral))
(-> *part-id-table* 2773)
)
(else
@@ -997,54 +989,54 @@
)
)
(('effect-jump-droppings)
(let* ((v1-61 (shr (shl arg4 52) 58))
(let* ((v1-61 (-> arg4 material))
(s0-1 (cond
((= v1-61 5)
((= v1-61 (pat-material sand))
(-> *part-id-table* 106)
)
((= v1-61 6)
((= v1-61 (pat-material wood))
(-> *part-id-table* 2258)
)
((= v1-61 13)
((= v1-61 (pat-material crwood))
(-> *part-id-table* 2259)
)
((or (= v1-61 18) (= v1-61 8))
((or (= v1-61 (pat-material tube)) (= v1-61 (pat-material pcmetal)))
(-> *part-id-table* 2260)
)
((or (= v1-61 16) (= v1-61 21))
((or (= v1-61 (pat-material metal)) (= v1-61 (pat-material rotate)))
(-> *part-id-table* 2335)
)
((= v1-61 1)
((= v1-61 (pat-material ice))
(-> *part-id-table* 2261)
)
((= v1-61 9)
((= v1-61 (pat-material snow))
(-> *part-id-table* 2262)
)
((= v1-61 10)
((= v1-61 (pat-material deepsnow))
(-> *part-id-table* 2263)
)
((= v1-61 14)
((= v1-61 (pat-material gravel))
(-> *part-id-table* 2264)
)
((= v1-61 15)
((= v1-61 (pat-material dirt))
(-> *part-id-table* 2265)
)
((zero? v1-61)
((= v1-61 (pat-material stone))
(-> *part-id-table* 2266)
)
((= v1-61 3)
((= v1-61 (pat-material waterbottom))
(-> *part-id-table* 2267)
)
((= v1-61 4)
((= v1-61 (pat-material tar))
(-> *part-id-table* 2268)
)
((= v1-61 17)
((= v1-61 (pat-material straw))
(-> *part-id-table* 2269)
)
((= v1-61 19)
((= v1-61 (pat-material swamp))
(-> *part-id-table* 2270)
)
((= v1-61 22)
((= v1-61 (pat-material neutral))
(-> *part-id-table* 2774)
)
(else
@@ -1076,7 +1068,7 @@
(none)
)
(defmethod dummy-12 effect-control ((obj effect-control) (arg0 symbol) (arg1 basic) (arg2 int) (arg3 basic) (arg4 sound-name))
(defmethod dummy-12 effect-control ((obj effect-control) (arg0 symbol) (arg1 float) (arg2 int) (arg3 basic) (arg4 sound-name))
(local-vars
(r0-0 uint128)
(v1-10 uint128)
@@ -1107,16 +1099,9 @@
(t0-1 #f)
(t1-1 (the-as (pointer int) (& sv-112)))
(t2-0 *res-static-buf*)
(a1-7 (t9-3
(the-as res-lump sv-144)
a1-6
a2-1
(the-as float a3-1)
(the-as pointer t0-1)
(the-as (pointer res-tag) t1-1)
t2-0
)
)
(a1-7
(t9-3 (the-as res-lump sv-144) a1-6 a2-1 a3-1 (the-as pointer t0-1) (the-as (pointer res-tag) t1-1) t2-0)
)
)
(when a1-7
(let ((t9-4 effect-param->sound-spec)
@@ -1173,7 +1158,7 @@
)
((logtest? (-> self control root-prim prim-core action) (collide-action ca-9))
(sound-play-by-name
(sound-name-with-material 'zoom-land (the-as int (-> self control ground-pat)) "")
(sound-name-with-material 'zoom-land (-> self control ground-pat) "")
(new-sound-id)
(the int
(* 10.24 (* 100.0 (the float (the int (* 10.24 (* 0.000016276043 (-> self control ground-impact-vel)))))))
+1 -1
View File
@@ -240,7 +240,7 @@
"demo-start"
)
(*debug-segment*
"village1-hut"
(#if (user? dass) "snow-start" "village1-hut")
)
(else
"title-start"
+2 -19
View File
@@ -5,24 +5,13 @@
;; name in dgo: generic-obs
;; dgos: GAME, ENGINE
(declare-type swingpole process)
(define-extern convert-to-hud-object (function process-drawable hud none :behavior hud))
;; TODO - temporary
(define-extern process-drawable-from-entity! (function process-drawable entity-actor none))
;; TODO - for citb-plat
(define-extern *particle-quat* quaternion)
;; TODO - for jungle-mirrors
(define-extern line-in-view-frustum? (function vector vector symbol))
(declare-type beach-part part-spawner)
(declare-type launcher process-drawable)
(define-extern command-get-camera (function object state object)) ;; ret - (state camera) | string | symbol
(define-extern beach-part-grotto-1 (state beach-part))
@@ -709,7 +698,6 @@
(defbehavior command-get-process camera-tracker ((arg0 object) (arg1 process))
(the-as process (cond
((null? arg0)
(empty)
arg1
)
((type-type? (rtype-of arg0) process)
@@ -759,14 +747,12 @@
(handle->process (-> v1-13 anim-process))
)
(else
(empty)
arg1
)
)
)
)
(else
(empty)
arg1
)
)
@@ -776,7 +762,6 @@
(defun command-get-camera ((arg0 object) (arg1 state))
(cond
((null? arg0)
(empty)
arg1
)
((= arg0 'base)
@@ -798,7 +783,6 @@
(the-as state arg0)
)
(else
(empty)
arg1
)
)
@@ -807,7 +791,6 @@
(defun command-get-trans ((arg0 object) (arg1 vector))
(cond
((null? arg0)
(empty)
arg1
)
((= arg0 'null)
@@ -825,14 +808,12 @@
(-> (the-as target s4-0) node-list data v1-4 bone transform vector 3)
)
(else
(empty)
arg1
)
)
)
)
(else
(empty)
arg1
)
)
@@ -2059,6 +2040,7 @@
)
:exit
(behavior ()
(#when PC_DEBUG_SOUND_ENABLE
(let ((v1-0 (the-as sound-rpc-set-param (get-sound-buffer-entry))))
(set! (-> v1-0 command) (sound-command set-param))
(set! (-> v1-0 id) (-> self sound-id))
@@ -2068,6 +2050,7 @@
(set! (-> v1-0 parms mask) (the-as uint 17))
(-> v1-0 id)
)
)
(none)
)
:trans
+56 -19
View File
@@ -717,30 +717,67 @@
(when (-> *pc-settings* display-actor-bank)
(draw-string-xy (string-format "Actor Bank: ~,,1m/~,,1m (~D)" (-> *ACTOR-bank* pause-dist) (-> *ACTOR-bank* birth-dist) (-> *ACTOR-bank* birth-max)) debug-buf 512 (- 224 8) (font-color default) (font-flags shadow kerning right))
)
(when (-> *pc-settings* display-bug-report)
(format *stdcon* "bug-report ~A~%" *user*)
(format *stdcon* "nick ~A continue ~S~%" (-> *load-state* vis-nick) (-> *game-info* current-continue name))
(dotimes (i LEVEL_COUNT)
(format *stdcon* "level ~D ~8A ~A~%" i (-> *level* level i name) (-> *level* level i display?))
)
(format *stdcon* "music ~A (f: ~D) sound ~A ~A~%"
(-> *setting-control* current music) (-> *setting-control* current sound-flava)
*sound-bank-1* *sound-bank-2*)
(let ((pos (target-pos 0)))
(format *stdcon* "target ~m ~m ~m~%" (-> pos x) (-> pos y) (-> pos z))
)
(let ((pos (camera-pos)))
(format *stdcon* "cam-trans ~m ~m ~m~%" (-> pos x) (-> pos y) (-> pos z))
)
(let ((rot (new 'stack 'quaternion)))
(matrix->quaternion rot (-> *math-camera* camera-rot))
(format *stdcon* "cam-rot ~f ~f ~f~%" (-> rot x) (-> rot y) (-> rot z))
)
)
(when (-> *pc-settings* display-heap-status)
(mlet* ((BAR_WIDTH 160)
(BAR_HEIGHT 8)
(BAR_NUM 2)
(BAR_BG_COL (static-rgba 64 64 64 64))
(BAR_X (- 480 BAR_WIDTH))
(BAR_Y (- 224 4 (* BAR_HEIGHT BAR_NUM)))
)
(let* (
(remain (the float (&- (-> global top) (-> global current))))
(total (the float (&- (-> global top) (-> global base))))
(used-p (/ (- total remain) total))
(used-x (the int (* used-p BAR_WIDTH)))
(used-y BAR_Y)
)
(draw-sprite2d-xy debug-buf BAR_X used-y used-x BAR_HEIGHT (static-rgba 32 32 255 64))
(draw-sprite2d-xy debug-buf (+ BAR_X used-x) used-y (- BAR_WIDTH used-x) BAR_HEIGHT BAR_BG_COL)
(draw-string-xy "global" debug-buf BAR_X used-y (font-color red) (font-flags shadow kerning right))
(draw-string-xy (string-format "~,,2f% (~,,1fM)" (* used-p 100) (/ total (* 1024 1024))) debug-buf (+ BAR_X used-x) used-y (font-color red) (font-flags shadow kerning middle))
)
(let* (
(remain (the float (&- (-> debug top) (-> debug current))))
(total (the float (&- (-> debug top) (-> debug base))))
(used-p (/ (- total remain) total))
(used-x (the int (* used-p BAR_WIDTH)))
(used-y (+ BAR_Y BAR_HEIGHT))
)
(draw-sprite2d-xy debug-buf BAR_X used-y used-x BAR_HEIGHT (static-rgba 255 32 32 64))
(draw-sprite2d-xy debug-buf (+ BAR_X used-x) used-y (- BAR_WIDTH used-x) BAR_HEIGHT BAR_BG_COL)
(draw-string-xy "debug" debug-buf BAR_X used-y (font-color red) (font-flags shadow kerning right))
(draw-string-xy (string-format "~,,2f% (~,,1fM)" (* used-p 100) (/ total (* 1024 1024))) debug-buf (+ BAR_X used-x) used-y (font-color red) (font-flags shadow kerning middle))
)
)
)
)
(let (
(remain (&- (-> global top) (-> global current)))
(total (&- (-> global top) (-> global base)))
)
(format *stdcon* "~3Lglobal heap ~,,2fK/~,,2fK (~,,2f%) remain~0L~%"
(* (1/ 1024) remain) (* (1/ 1024) total)
(* 100.0 (/ (the float remain) (the float total)))
)
)
(let (
(remain (&- (-> debug top) (-> debug current)))
(total (&- (-> debug top) (-> debug base)))
)
(format *stdcon* "~3Ldebug heap ~,,2fK/~,,2fK (~,,2f%) remain~0L~%"
(* (1/ 1024) remain) (* (1/ 1024) total)
(* 100.0 (/ (the float remain) (the float total)))
)
)
#|
(format *stdcon* "~3Lfree DMA global: ~d debug: ~d~0L~%"
(dma-buffer-free (-> disp frames (-> disp on-screen) frame global-buf))
(dma-buffer-free (-> disp frames (-> disp on-screen) frame debug-buf))
)
#|
;; added, prints some level status.
(dotimes (i 2)
(let ((level-heap (-> *level* level i heap)))
+30 -50
View File
@@ -1154,51 +1154,33 @@
)
(defmethod dummy-40 process-taskable ((obj process-taskable) (arg0 object) (arg1 skeleton-group) (arg2 int) (arg3 int) (arg4 vector) (arg5 int))
(let ((s3-0 arg2)
(s4-0 arg3)
(s0-0 arg4)
(s5-0 arg5)
)
(stack-size-set! (-> obj main-thread) 768) ;; increased from 512
(initialize-collision obj s3-0 s0-0)
(process-drawable-from-entity! obj (the-as entity-actor arg0))
(let* ((a0-4 obj)
(t9-3 (method-of-object a0-4 initialize-skeleton))
(a2-2 '())
(a1-4 arg1)
)
(t9-3 a0-4 a1-4 a2-2)
(set! (-> obj shadow-backup) (-> obj draw shadow))
(logior! (-> obj skel status) 256)
(set! (-> obj root-override pause-adjust-distance) -122880.0)
(set! (-> obj fuel-cell-anim) (fuel-cell-pick-anim obj))
(set! (-> obj draw origin-joint-index) (the-as uint s3-0))
(set! (-> obj draw shadow-joint-index) (the-as uint s3-0))
(set! (-> obj center-joint-index) s3-0)
(set! (-> obj draw-bounds-y-offset) (-> obj draw bounds y))
(set! (-> obj have-flava) #f)
(set! (-> obj music) #f)
(set! (-> obj have-music) #f)
(set! (-> obj cam-joint-index) s4-0)
(set! (-> obj cell-x) (the-as handle #f))
(set! (-> obj cell-for-task) (game-task none))
(set! (-> obj camera) (the-as handle #f))
(set! (-> obj will-talk) #t)
(set! (-> obj talk-message) (the-as uint 260))
(set! (-> obj last-talk) (the-as uint 0))
(set! (-> obj bounce-away) #t)
(set! (-> obj been-kicked) #f)
(set! (-> obj neck-joint-index) s5-0)
(set! (-> obj cur-trans-hook) nothing)
(dummy-9
(-> obj ambient)
(the-as vector a1-4)
(the-as int a2-2)
(the-as float arg2)
(the-as process-drawable arg3)
)
)
)
(stack-size-set! (-> obj main-thread) 512)
(initialize-collision obj arg2 arg4)
(process-drawable-from-entity! obj (the-as entity-actor arg0))
(initialize-skeleton obj arg1 '())
(set! (-> obj shadow-backup) (-> obj draw shadow))
(logior! (-> obj skel status) 256)
(set! (-> obj root-override pause-adjust-distance) -122880.0)
(set! (-> obj fuel-cell-anim) (fuel-cell-pick-anim obj))
(set! (-> obj draw origin-joint-index) (the-as uint arg2))
(set! (-> obj draw shadow-joint-index) (the-as uint arg2))
(set! (-> obj center-joint-index) arg2)
(set! (-> obj draw-bounds-y-offset) (-> obj draw bounds y))
(set! (-> obj have-flava) #f)
(set! (-> obj music) #f)
(set! (-> obj have-music) #f)
(set! (-> obj cam-joint-index) arg3)
(set! (-> obj cell-x) (the-as handle #f))
(set! (-> obj cell-for-task) (game-task none))
(set! (-> obj camera) (the-as handle #f))
(set! (-> obj will-talk) #t)
(set! (-> obj talk-message) (the-as uint 260))
(set! (-> obj last-talk) (the-as uint 0))
(set! (-> obj bounce-away) #t)
(set! (-> obj been-kicked) #f)
(set! (-> obj neck-joint-index) arg5)
(set! (-> obj cur-trans-hook) nothing)
(dummy-9 (-> obj ambient))
(set! (-> obj event-hook) (-> (method-of-object obj idle) event))
(set! (-> obj draw shadow-ctrl) (new 'process 'shadow-control 0.0 0.0 614400.0 (the-as float 60) 245760.0))
(dummy-52 obj)
@@ -1225,7 +1207,7 @@
(the-as symbol 0)
)
(defmethod dummy-9 ambient-control ((obj ambient-control) (arg0 vector) (arg1 int) (arg2 float) (arg3 process-drawable))
(defmethod dummy-9 ambient-control ((obj ambient-control))
(set! (-> obj last-ambient-time) (-> *display* game-frame-counter))
0
(none)
@@ -1267,10 +1249,8 @@
)
(defun othercam-calc ((arg0 float))
(let ((f0-3 (* 2.0 (atan (/ 14.941477 (* 20.3 arg0)) 1.0))))
(set! (-> *camera-other-fov* data) f0-3)
f0-3
)
(set! (-> *camera-other-fov* data) (* 2.0 (atan (/ 14.941477 (* 20.3 arg0)) 1.0)))
(none)
)
(defstate othercam-running (othercam)
+2 -1
View File
@@ -97,11 +97,12 @@
(last-ambient string :offset-assert 8)
(last-ambient-id sound-id :offset-assert 12)
)
:pack-me
:method-count-assert 12
:size-assert #x10
:flag-assert #xc00000010
(:methods
(dummy-9 (_type_ vector int float process-drawable) none 9)
(dummy-9 (_type_) none 9)
(TODO-RENAME-10 (_type_ vector int float process-drawable) vector 10)
(play-ambient (_type_ string symbol vector) symbol 11)
)
+2 -2
View File
@@ -19,12 +19,12 @@
:size-assert #x20
:flag-assert #x1000000020
(:methods
(add-spheres! (_type_ (pointer sphere) int) int 9)
(add-spheres! (_type_ (inline-array sphere) int) int 9)
(add-point! (_type_ vector3s) int 10)
(set-from-point-offset! (_type_ vector3s vector3s) int 11)
(set-from-point-offset-pad! (_type_ vector3s vector3s float) int 12)
(set-from-sphere! (_type_ sphere) int 13)
(set-from-spheres! (_type_ (pointer sphere) int) int 14)
(set-from-spheres! (_type_ (inline-array sphere) int) int 14)
(add-box! (_type_ bounding-box) int 15)
)
)
+2 -5
View File
@@ -141,7 +141,7 @@
)
)
(defmethod add-spheres! bounding-box ((obj bounding-box) (spheres (pointer sphere)) (count int))
(defmethod add-spheres! bounding-box ((obj bounding-box) (spheres (inline-array sphere)) (count int))
"Add count spheres."
;; the PS2 implementation is very optimized
;; It is unrolled and 'software pipelined' to do 4 at a time.
@@ -172,7 +172,7 @@
0
)
(defmethod set-from-spheres! bounding-box ((obj bounding-box) (spheres-bad (pointer sphere)) (count int))
(defmethod set-from-spheres! bounding-box ((obj bounding-box) (spheres (inline-array sphere)) (count int))
"Reset box to hold the given spheres. Note: this implementation could be optimized."
;; This is also unrolled, but does 7 at a time.
(rlet ((vf0 :class vf)
@@ -186,8 +186,6 @@
;; init min/max. in the case we don't have any spheres, we should return (0,0,0,1) for min/max.
(set! current-min vf0)
(set! current-max vf0)
(let ((spheres (the (inline-array sphere) spheres-bad)))
(dotimes (i count)
(.lvf sph (-> spheres i))
@@ -204,7 +202,6 @@
)
)
)
)
(.svf (-> obj min) current-min)
(.svf (-> obj max) current-max)
+1 -1
View File
@@ -1494,7 +1494,7 @@
(let ((startup-level (case *kernel-boot-message*
(('play)
(if *debug-segment*
'village1
(#if (user? dass) 'snow 'village1)
'title
)
)
+4
View File
@@ -199,6 +199,8 @@
(aspect-custom-y int)
(debug-pad-display symbol)
(progress-force? symbol)
(display-bug-report symbol)
(display-heap-status symbol)
(device-audio pc-device-info :inline) ;; used audio device
(device-screen pc-device-info :inline) ;; used display device
@@ -303,6 +305,8 @@
(set! (-> obj display-actor-bank) #f)
(set! (-> obj debug-pad-display) #f)
(set! (-> obj progress-force?) #f)
(set! (-> obj display-bug-report) #f)
(set! (-> obj display-heap-status) #f)
(set! (-> obj font-scale) 1.0)
(set! (-> obj aspect-custom-x) 1)
(set! (-> obj aspect-custom-y) 1)
-1
View File
@@ -323,7 +323,6 @@
(file-stream-seek-past-whitespace ,fs)
(set! c (file-stream-getc ,fs))
(when (!= #x29 c)
(break!)
(pc-settings-read-throw-error ,fs (string-format "invalid char, ) not found, got #x~X ~A" c *pc-temp-string*))
)
)
+1 -1
View File
@@ -112,7 +112,7 @@
(target-flut-clone-anim handle)
(target-flut-death symbol)
(target-flut-double-jump float float)
target-flut-falling
(target-flut-falling symbol)
(target-flut-get-off handle)
(target-flut-get-off-hit-ground symbol)
(target-flut-get-off-jump handle)
+11 -41
View File
@@ -7,8 +7,8 @@
(define-extern target-powerup-effect (function symbol none :behavior target))
;; definition for function target-generic-event-handler
;; INFO: Return type mismatch none vs object.
;; DECOMP BEGINS
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 37]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 39]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 60]
@@ -33,11 +33,9 @@
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 524]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 552]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 563]
;; Used lq/sq
(defbehavior target-generic-event-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(local-vars (v0-0 object))
(let ((v1-0 arg2))
;;(format 0 "target-generic-event-handler: ~A~%" v1-0)
(the-as
object
(cond
@@ -298,19 +296,13 @@
)
)
((= v1-0 'change-state)
enter-state
(-> arg3 param 1)
(-> arg3 param 2)
(-> arg3 param 3)
(-> arg3 param 4)
(go (the-as (state target) (-> arg3 param 0)))
(go (the-as (state object object object object target) (-> arg3 param 0)) (-> arg3 param 1) (-> arg3 param 2) (-> arg3 param 3) (-> arg3 param 4))
)
)
)
)
)
;; definition for function target-shoved
(defbehavior target-shoved target ((arg0 meters) (arg1 meters) (arg2 process) (arg3 (state object object target)))
(let ((s5-0 (new 'static 'attack-info)))
(set! (-> s5-0 attacker) (process->handle arg2))
@@ -327,9 +319,6 @@
)
)
;; definition for function get-intersect-point
;; Used lq/sq
(defun get-intersect-point ((arg0 vector) (arg1 touching-prims-entry) (arg2 control-info) (arg3 process))
(let ((a0-2 (get-touched-tri arg1 arg2 (the-as touching-shapes-entry arg3))))
(if a0-2
@@ -340,7 +329,6 @@
arg0
)
;; definition for function target-attacked
(defbehavior target-attacked target ((arg0 symbol) (arg1 attack-info) (arg2 process) (arg3 process) (arg4 (state handle attack-info target)))
(when (zero? (logand (-> self state-flags) 8))
(cond
@@ -447,9 +435,6 @@
)
)
;; definition for function target-send-attack
;; INFO: Return type mismatch object vs symbol.
;; Used lq/sq
(defbehavior target-send-attack target ((arg0 process) (arg1 uint) (arg2 uint) (arg3 int) (arg4 int))
(local-vars
(sv-96 touching-prims-entry)
@@ -536,7 +521,7 @@
(dummy-12
(-> self skel effect)
(-> self control unknown-symbol30)
(the-as basic -1.0)
(the-as float -1.0)
74
#f
(static-sound-name "spin-hit")
@@ -630,7 +615,7 @@
(dummy-12
(-> self skel effect)
(-> self control unknown-symbol30)
(the-as basic -1.0)
(the-as float -1.0)
23
#f
(static-sound-name "punch-hit")
@@ -641,7 +626,7 @@
(dummy-12
(-> self skel effect)
(-> self control unknown-symbol30)
(the-as basic -1.0)
(the-as float -1.0)
74
#f
(static-sound-name "punch-hit")
@@ -736,7 +721,7 @@
(dummy-12
(-> self skel effect)
(-> self control unknown-symbol30)
(the-as basic -1.0)
(the-as float -1.0)
23
#f
(static-sound-name "uppercut-hit")
@@ -749,7 +734,7 @@
(dummy-12
(-> self skel effect)
(-> self control unknown-symbol30)
(the-as basic -1.0)
(the-as float -1.0)
23
#f
(static-sound-name "flop-hit")
@@ -760,7 +745,7 @@
(dummy-12
(-> self skel effect)
(-> self control unknown-symbol30)
(the-as basic -1.0)
(the-as float -1.0)
23
#f
(static-sound-name "punch-hit")
@@ -775,7 +760,6 @@
)
)
;; definition for function target-apply-tongue
(defbehavior target-apply-tongue target ((arg0 vector))
(when (zero? (logand (-> self state-flags) 8))
(logior! (-> self state-flags) #x7000)
@@ -801,9 +785,7 @@
)
)
;; definition for function target-standard-event-handler
(defbehavior target-standard-event-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
;; (format 0 "target-standard-event-handler: ~A~%" arg2)
(case arg2
(('attack 'attack-or-shove 'attack-invinc)
(target-attacked
@@ -937,7 +919,6 @@
)
)
;; definition for function target-dangerous-event-handler
(defbehavior target-dangerous-event-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('touched)
@@ -971,8 +952,6 @@
)
)
;; definition for function target-bonk-event-handler
;; Used lq/sq
(defbehavior target-bonk-event-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((s4-0 (new 'stack-no-clear 'vector)))
(cond
@@ -1048,7 +1027,6 @@
)
)
;; definition for function target-jump-event-handler
(defbehavior target-jump-event-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(if (and (= arg2 'swim) (< 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv))))
(return #f)
@@ -1066,7 +1044,6 @@
)
)
;; definition for function target-walk-event-handler
(defbehavior target-walk-event-handler target ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(let ((v0-0 (target-bonk-event-handler arg0 arg1 arg2 arg3)))
(cond
@@ -1081,15 +1058,10 @@
)
)
;; failed to figure out what this is:
target-post
;; failed to figure out what this is:
target-standard-event-handler
;; definition for function target-exit
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defbehavior target-exit target ()
(set! (-> self control unknown-surface00) *walk-mods*)
(set! (-> self control unknown-vector13 quad) (the-as uint128 0))
@@ -1112,15 +1084,11 @@ target-standard-event-handler
(none)
)
;; definition for function target-state-hook-exit
;; INFO: Return type mismatch (function none) vs none.
(defbehavior target-state-hook-exit target ()
(set! (-> self state-hook) (the-as (function none :behavior target) nothing))
(none)
)
;; definition for function target-effect-exit
;; INFO: Return type mismatch int vs none.
(defbehavior target-effect-exit target ()
(let ((v1-1 (-> self skel effect)))
(set! (-> v1-1 channel-offset) 0)
@@ -1130,3 +1098,5 @@ target-standard-event-handler
)
+1 -1
View File
@@ -855,7 +855,7 @@
(set! (-> s5-0 1 quad) (-> self control trans quad))
(set! (-> s5-0 1 y) (+ 2867.2 (-> *TARGET-bank* body-radius) (-> s5-0 1 y)))
(set! (-> s5-0 1 w) (-> *TARGET-bank* body-radius))
(set! (-> gp-0 spheres) (the-as (pointer sphere) s5-0))
(set! (-> gp-0 spheres) s5-0)
)
(set! (-> gp-0 num-spheres) (the-as uint 2))
(set! (-> gp-0 collide-with) (-> self control root-prim collide-with))
+1 -1
View File
@@ -1517,7 +1517,7 @@
(= (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) stick0-speed) 0.0)
)
(let ((a1-2 (new 'stack-no-clear 'collide-using-spheres-params)))
(set! (-> a1-2 spheres) (the-as (pointer sphere) (-> *collide-edge-work* world-player-leap-up-spheres)))
(set! (-> a1-2 spheres) (-> *collide-edge-work* world-player-leap-up-spheres))
(set! (-> a1-2 num-spheres) (the-as uint 6))
(set! (-> a1-2 collide-with) (-> self control root-prim collide-with))
(set! (-> a1-2 proc) #f)
-14
View File
@@ -894,20 +894,6 @@
(or (not *progress-process*) (= (-> *progress-process* 0 in-out-position) 4096))
)
(defmacro test-make-target ()
`(begin
(set! *target* (-> (make-function-process target (lambda () (loop (suspend))) :from *target-dead-pool* :to *target-pool*)))
(run-now-in-process *target*
(lambda :behavior target ()
(set! (-> self control) (new 'process 'control-info self (collide-list-enum player)))
(set! (-> self fact-info-target) (new 'process 'fact-info-target self (pickup-type eco-pill-random)
(-> *FACT-bank* default-pill-inc)))
(set! (-> self current-level) #f)
(set! (-> self game) *game-info*)
))
)
)
(defstate progress-waiting (progress)
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
+118 -28
View File
@@ -94,7 +94,7 @@
:tool 'dgo
:out `(,out-name)
)
(set! *all-cgos* (cons out-name *all-cgos*))
(append!! *all-cgos* out-name)
)
)
@@ -141,7 +141,7 @@
(defstep :in path
:tool 'copy
:out `(,out-file))
(set! *all-str* (cons out-file *all-str*))))
(append!! *all-str* out-file)))
(define *all-vis* '())
(defmacro copy-vis-files (&rest files)
@@ -154,7 +154,7 @@
(defstep :in path
:tool 'copy
:out `(,out-name))
(set! *all-vis* (cons out-name *all-vis*))))
(append!! *all-vis* out-name)))
(defmacro group (name &rest stuff)
@@ -258,11 +258,33 @@
"FUCV6"
"FUCV7"
"FUCV8"
"FUCRV1"
"FUCFV1"
;; jak's ambient
"EIA1"
"EIA2"
"EIA3"
"EIA4"
;; jak death
"DE0181"
"DE0182"
"DE0184"
"DE0186"
"DE0187"
"DE0191"
"DE0193"
"DE0195"
"DE0197"
"DE0199"
"DE0202"
;; jak other
"EIFISH"
"EIICE"
"EIFLUT"
"EIPOLE"
"EIRACER"
"EITUBE"
;; intro camera
"NDINTRO"
"LOINTRO"
@@ -445,17 +467,18 @@
"beach-vis"
)
(copy-strs
"BECANNON" ;; beachcam-cannon
"LRFALLIN" ;; lrocklrg-falling
"PESEXT" ;; pelican-spit-ext
)
(copy-strs
"FAINTROD" ;; farmer-introduction
"SCINTROD" ;; sculptor-introduction
"BILINTRO" ;; bird-lady-introduction
"MAINTROD" ;; mayor-introduction
)
;; pelican
(copy-strs "PESEXT")
;; beachcam
(copy-strs "BECANNON")
;; sculptor
(copy-strs "SCINTROD" "SCR1" "SCRESOLU")
;; lrocklrg
(copy-strs "LRFALLIN")
;; mayor
(copy-strs "MAINTROD" "MARBEAMS" "MARDONAT" "MAZBEAMS" "MAZDONAT")
;; bird-lady
(copy-strs "BILINTRO" "BILR1" "BILR2" "BILBRESO")
;;;;;;;;;;;;;;;;;;;;;
@@ -519,6 +542,10 @@
"jungle-vis"
)
;; fisher
(copy-strs "FIINTROD" "FIR1" "FIACCEPT" "FIREJECT" "FIRESOLU")
;;;;;;;;;;;;;;;;;;;;;
;; Village 1
;;;;;;;;;;;;;;;;;;;;;
@@ -588,18 +615,18 @@
"village1-vis"
)
(copy-strs
"ASIBESWI" ;; assistant-introduction-blue-eco-switch
"SAISD1" ;; sage-intro-sequence-d1
"SAISD2" ;; sage-intro-sequence-d2
"EXINTROD" ;; explorer-introduction
"FIBRTMIS" ;; fishermans-boat-ride-to-misty
"ASR1BESW" ;; assistant-reminder-1-blue-eco-switch
"ORI1" ;; oracle-intro-1
"ORRE1" ;; oracle-right-eye-1
"ORR1" ;; oracle-reminder-1
"FAR1" ;; farmer-reminder-1
)
;; farmer
(copy-strs "FAINTROD" "FAR1" "FAR2" "FARESOLU")
;; explorer
(copy-strs "EXINTROD" "EXR1" "EXR2" "EXRESOLU")
;; oracle
(copy-strs "ORI1" "ORLE1" "ORRE1" "ORR1")
;; assistant
(copy-strs "ASIBESWI" "ASR1BESW")
;; sage
(copy-strs "SAISD1" "SAISD2" "SAISE" "SAR1ECOR" "SAIMCANN" "SAR1MCAN" "SAR1GENE" "SAR2GENE")
;; fishermans-boat
(copy-strs "FIBRTMIS")
;;;;;;;;;;;;;;;;;;;;;
;; Jungle temple
@@ -633,7 +660,6 @@
"jungleb-vis"
)
;;;;;;;;;;;;;;;;;;;;;
;; misty island
;;;;;;;;;;;;;;;;;;;;;
@@ -691,6 +717,14 @@
"misty-vis"
)
;; fishermans-boat
(copy-strs "FIBRTVIL" "FIBRT1AL")
;; muse
(copy-strs "MUVICTOR")
;; sidekick-human
(copy-strs "SIHISA" "SIHISB" "SIHISC")
;; mistycam
(copy-strs "MICANNON")
;;;;;;;;;;;;;;;;;;;;;
;; swamp
@@ -731,6 +765,8 @@
"swamp-vis"
)
;; billy
(copy-strs "BIINTROD" "BIR1" "BIACCEPT" "BIREJECT" "BIRESOLU")
;;;;;;;;;;;;;;;;;;;;;
;; LPC
@@ -909,6 +945,8 @@
"spike-ag"
"firecanyon-vis")
;; assistant firecanyon
(copy-strs "ASFRESOL")
;;;;;;;;;;;;;;;;;;;;;
;; ogre boss
@@ -945,6 +983,9 @@
"ogre-vis"
)
;; flying-lurker
(copy-strs "FLLINTRO" "PLLBLOWU")
;;;;;;;;;;;;;;;;;;;;;
;; Village 2
@@ -1001,6 +1042,19 @@
"village2-vis"
)
;; assistant village2
(copy-strs "AS2INTRO" "AS2IROOM" "AS2R1ROO" "AS2IROBB" "AS2R1ROB" "AS2IFLUT" "AS2R1FLU" "AS2RESOL")
;; sage bluehut
(copy-strs "SABICDUS" "SABR1CDU" "SABIPARM" "SABR1PAR")
;; geologist
(copy-strs "GEINTROD" "GERMOLES" "GEZMOLES" "GERMONEY" "GEZMONEY")
;; gambler
(copy-strs "GAI1" "GARRACE" "GARMONEY" "GAZRACE" "GAZMONEY")
;; warrior
(copy-strs "WAINTROD" "WAR1" "WARESOLU")
;; oracle
(copy-strs "ORI2" "ORLE2" "ORRE2" "ORR2")
;;;;;;;;;;;;;;;;;;;;;
;; rolling hills
;;;;;;;;;;;;;;;;;;;;;
@@ -1033,6 +1087,10 @@
"rolling-vis"
)
;; happy-plant
(copy-strs "HAPOPEN")
;; race-ring
(copy-strs "RARANIM" "RARSANIM")
;;;;;;;;;;;;;;;;;;;;;
;; Village 3
@@ -1080,6 +1138,16 @@
"village3-vis"
)
;; sage-villagec
(copy-strs "SA3INTRO" "SA3IDECO" "SA3R1DEC" "SA3IRAMS" "SA3R1RAM")
;; assistant-villagec
(copy-strs "AS3REMIN")
;; oracle
(copy-strs "ORI3" "ORLE3" "ORRE3" "ORR3")
;; gondola
(copy-strs "GORUP" "GORDOWN")
;; minershort
(copy-strs "MIIORBS" "MIR1ORBS" "MIR2ORBS" "MIZ1ORBS" "MIZ2ORBS" "MIIGNAWE" "MIR1GNAW" "MIISWITC" "MIR1SWIT")
;;;;;;;;;;;;;;;;;;;;;
;; Training
@@ -1157,6 +1225,7 @@
"maincave-vis"
)
(copy-strs "MAGFCELL")
;;;;;;;;;;;;;;;;;;;;;
;; dark cave
@@ -1241,6 +1310,9 @@
"lavatube-vis"
)
;; assistant-lavatube
(copy-strs "ASLSRESO" "ASLERESO")
;;;;;;;;;;;;;;;;;;;;;
;; citadel
;;;;;;;;;;;;;;;;;;;;;
@@ -1298,6 +1370,11 @@
"citadel-vis"
)
;; green-sagecage
(copy-strs "GRSINTRO" "GRSRESOL" "GRSOPREB")
;; sage-cage
(copy-strs "YERESOLU" "RERESOLU" "BLRESOLU")
;;;;;;;;;;;;;;;;;;;;;
;; Final Boss
;;;;;;;;;;;;;;;;;;;;;
@@ -1347,6 +1424,11 @@
"finalboss-vis"
)
;; finalboss
(copy-strs "FIWECO")
;; green-sagecage
(copy-strs "GRSDSACR" "GRSOBBA" "GRSOBBB" "GRSOBBEC" "GRSOBBNC" "GRSOBFIN")
;;;;;;;;;;;;;;;;;;;;;
;; intro only
;;;;;;;;;;;;;;;;;;;;;
@@ -1371,6 +1453,10 @@
"intro-vis"
)
(copy-strs "SAISA")
;; evilbro
(copy-strs "EVMEND")
;;;;;;;;;;;;;;;;;;;;;
;; demo
;;;;;;;;;;;;;;;;;;;;;
@@ -1766,7 +1852,11 @@
(group-list "iso"
`("out/iso/0COMMON.TXT"
,@(reverse *all-cgos*)
,@*all-cgos*
,@*all-vis*
,@*all-str*)
)
(group-list "spools"
`(,@*all-str*)
)
+26
View File
@@ -229,6 +229,17 @@
)
)
;; mlet, but recursive, allowing you to define variables in terms of others.
(defmacro mlet* (bindings &rest body)
(if (null? bindings)
`(begin ,@body)
`((lambda :inline-only #t (,(caar bindings))
(mlet* ,(cdr bindings) ,@body))
,(car (cdar bindings))
)
)
)
;; Define a new function
(defmacro defun (name bindings &rest body)
(if (and
@@ -859,3 +870,18 @@
;; load the default project
(load-project "goal_src/game.gp")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; user stuf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defmacro __get-user ()
`(quote ,*user*)
)
(defconstant *user* (__get-user))
+47
View File
@@ -219,6 +219,53 @@
)
)
(defsmacro dolist (bindings &rest body)
`(let ((,(car bindings) ,(cadr bindings)))
(while (not (null? ,(car bindings)))
,@body
(set! ,(car bindings) (cdr ,(car bindings)))
)
)
)
(desfun append! (lst obj)
"adds obj to the end of lst. only edits inplace if lst is not null."
(let ((pended #f))
(if (null? lst)
(set! lst (cons obj '()))
(dolist (it lst)
(when (and (not pended) (null? (cdr it)))
(set-cdr! it (cons obj '()))
(set! pended #t)
)
)
)
)
lst
)
(desfun delete-last! (lst)
"removes last item in lst. only edits inplace if lst is not null."
(let ((prev '()))
(dolist (it lst)
(when (null? (cdr it))
(if (null? prev)
(set! lst '())
(set-cdr! prev '())
)
)
(set! prev it)
)
)
lst
)
(defsmacro append!! (lst obj) `(set! ,lst (append! ,lst ,obj)))
(defsmacro delete-last!! (lst) `(set! ,lst (delete-last! ,lst)))
(defsmacro 1+ (x) `(+ ,x 1))
(defsmacro 1- (x) `(- ,x 1))
(defsmacro inc! (x) `(set! ,x (1+ ,x)))
+7 -4
View File
@@ -34,19 +34,22 @@
;; -memory-
;; the size of the execution stack (~14 kB) shared by all threads
;; the size of the execution stack (14 kB) shared by all threads
;; OpenGOAL NOTE: increased to 32kB
(defconstant DPROCESS_STACK_SIZE #x8000)
;; another stack size used as a maximum for temporary threads
;; OpenGOAL NOTE: increased to 16kB
(defconstant PROCESS_STACK_SIZE #x6000)
;; OpenGOAL NOTE: 7kB -> 24kB
(defconstant PROCESS_STACK_SIZE (#if PC_PORT #x6000 #x1c00))
;; default size of stack to backup for a process
(defconstant PROCESS_STACK_SAVE_SIZE 256)
;; the size of the shared heap used by dynamically sized processes
(defconstant PROCESS_HEAP_SIZE (* 3 984 1024)) ;; increased by factor of 3 for PC
(#if PC_BIG_MEMORY
(defconstant PROCESS_HEAP_SIZE (* 984 1024 4)) ;; 4x 984kB = 3936kB
(defconstant PROCESS_HEAP_SIZE (* 984 1024))
)
;; -system-
+11 -4
View File
@@ -164,7 +164,7 @@ It type checks the arguments for the entry function.
(when (not (null? default-handlers))
;;(fmt #t "found default-handlers for {}: {}\n" defstate-type default-handlers)
;; event
(set! default-handlers (cdr default-handlers))
(set! default-handlers (cadr default-handlers))
(when (and (eq? event '*no-state*) (car default-handlers))
(set! event (car default-handlers)))
;; enter
@@ -239,9 +239,16 @@ It type checks the arguments for the entry function.
&key (exit #f)
&key (code #f)
&key (post #f))
(if (null? (assoc proc *default-state-handlers*))
(push! *default-state-handlers* (cons proc (list event enter trans exit code post)))
(fmt #t "default state handlers for {} already defined, ignoring duplicate.\n" proc (cadr (assoc proc *default-state-handlers*)))
(let ((old (assoc proc *default-state-handlers*))
(new (list proc (list event enter trans exit code post))))
(if (null? old)
(append!! *default-state-handlers* new) ;; add new set of default handlers
(dolist (hnd *default-state-handlers*) ;; replace old handlers with new ones
(when (eq? (car hnd) old)
(set-car! hnd new)
)
)
)
)
`(none)
)
-37
View File
@@ -5,43 +5,6 @@
;; name in dgo: citadel-obs
;; dgos: CIT, L1
(define-extern *citadelcam-sg* skeleton-group)
(define-extern *citb-generator-sg* skeleton-group)
(define-extern *citb-generator-broken-sg* skeleton-group)
(define-extern *citb-hose-sg* skeleton-group)
(define-extern *citb-coil-sg* skeleton-group)
(define-extern *citb-robotboss-sg* skeleton-group)
(define-extern *citb-robotboss-nose-sg* skeleton-group)
(define-extern *citb-robotboss-head-sg* skeleton-group)
(define-extern *citb-robotboss-gun-sg* skeleton-group)
(define-extern *citb-robotboss-leftshoulder-sg* skeleton-group)
(define-extern *citb-robotboss-rightshoulder-sg* skeleton-group)
(define-extern *citb-robotboss-leftarm-sg* skeleton-group)
(define-extern *citb-robotboss-rightarm-sg* skeleton-group)
(define-extern *citb-robotboss-belly-sg* skeleton-group)
(define-extern *citb-launcher-sg* skeleton-group)
(define-extern *citb-button-sg* skeleton-group)
(define-extern *citb-iris-door-sg* skeleton-group)
(define-extern *citb-disc-d-sg* skeleton-group)
(define-extern *citb-disc-c-sg* skeleton-group)
(define-extern *citb-disc-b-sg* skeleton-group)
(define-extern *citb-disc-a-sg* skeleton-group)
(define-extern *citb-arm-shoulder-b-sg* skeleton-group)
(define-extern *citb-arm-shoulder-a-sg* skeleton-group)
(define-extern *citb-arm-d-sg* skeleton-group)
(define-extern *citb-arm-c-sg* skeleton-group)
(define-extern *citb-arm-b-sg* skeleton-group)
(define-extern *citb-arm-a-sg* skeleton-group)
(declare-type citadelcam process-drawable)
(declare-type citb-generator process-drawable)
(declare-type citb-disc process-drawable)
(declare-type citb-robotboss process-drawable)
(declare-type citb-coil process-drawable)
(declare-type citb-hose process-drawable)
(declare-type citb-generator process-drawable)
;; DECOMP BEGINS
(deftype citb-arm-section (process-drawable)
+1 -1
View File
@@ -1394,7 +1394,7 @@
)
(set! (-> obj allow-auto-kill) #f)
(process-entity-status! obj (entity-perm-status bit-3) #t)
(the-as symbol 0)
(none)
)
+6 -2
View File
@@ -33,7 +33,7 @@
(can-activate? (_type_) symbol 26)
(TODO-RENAME-27 (_type_) none 27)
(TODO-RENAME-28 (_type_) collide-shape-moving 28)
(can-target-move? (_type_) symbol 29)
(can-target-move? (_type_) none 29)
(should-teleport? (_type_) symbol 30)
(TODO-RENAME-31 (_type_) none 31)
(TODO-RENAME-32 (_type_) none 32)
@@ -271,6 +271,7 @@
)
)
(sound-play-by-name (static-sound-name "elev-loop") (-> self sound-id) 1024 0 0 1 #t)
(#when PC_DEBUG_SOUND_ENABLE
(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))
@@ -288,6 +289,7 @@
(set! (-> gp-1 parms mask) (the-as uint 32))
(-> gp-1 id)
)
)
(if (and (-> self grab-player?) (< 0.2 (-> self path-pos)))
(set! (-> self grab-player?) (not (process-release? *target*)))
)
@@ -350,6 +352,7 @@
)
)
(sound-play-by-name (static-sound-name "elev-loop") (-> self sound-id) 1024 0 0 1 #t)
(#when PC_DEBUG_SOUND_ENABLE
(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))
@@ -367,6 +370,7 @@
(set! (-> gp-1 parms mask) (the-as uint 32))
(-> gp-1 id)
)
)
(if (and (-> self grab-player?) (< (-> self path-pos) 0.8))
(set! (-> self grab-player?) (not (process-release? *target*)))
)
@@ -441,7 +445,7 @@
)
(defmethod can-target-move? plat-button ((obj plat-button))
(the-as symbol 0)
(none)
)
(defmethod TODO-RENAME-27 plat-button ((obj plat-button))
+4 -6
View File
@@ -5,8 +5,7 @@
;; name in dgo: final-door
;; dgos: FIN, L1
(declare-type final-door process-drawable)
(declare-type power-left final-door)
(define-extern power-left type)
;; DECOMP BEGINS
@@ -27,7 +26,7 @@
(:methods
(idle () _type_ :state 20)
(dummy-21 (_type_) none 21)
(open () _type_ :state 22)
(open (symbol) _type_ :state 22)
)
)
@@ -62,8 +61,7 @@
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('open)
enter-state
(go-virtual open)
(go-virtual open #f)
)
)
)
@@ -100,7 +98,7 @@
)
)
:code
(behavior ()
(behavior ((arg0 symbol))
(case (-> self type)
((power-left)
(let ((a0-1 (-> self skel root-channel 0)))
+10 -10
View File
@@ -50,19 +50,19 @@
(des-cam-entity string :offset-assert 392)
(use-interesting symbol :offset-assert 396)
(ignore-camera symbol :offset-assert 400)
(ambient ambient-control :offset 408)
(yellow-gun joint-mod :offset 424)
(palette-val float :offset 428)
(looping-sound ambient-sound 4 :offset 432)
(dda robotboss-dda :offset 448)
(valid-frames int32 :offset 452)
(skip-cut symbol :offset 456)
(keep-charging symbol :offset 460)
(ambient ambient-control :inline :offset-assert 408)
(yellow-gun joint-mod :offset-assert 424)
(palette-val float :offset-assert 428)
(looping-sound ambient-sound 4 :offset-assert 432)
(dda robotboss-dda :offset-assert 448)
(valid-frames int32 :offset-assert 452)
(skip-cut symbol :offset-assert 456)
(keep-charging symbol :offset-assert 460)
)
:heap-base #x16
:heap-base #x160
:method-count-assert 21
:size-assert #x1d0
:flag-assert #x15001601d0
:flag-assert #x15016001d0
(:methods
(ease-loc-t (_type_) float 20)
)
@@ -688,7 +688,7 @@
(the-as (function none :behavior greenshot) transform-post)
)
(defbehavior greenshot-init-by-other greenshot ((arg0 vector) (arg1 vector) (arg2 float) (arg3 uint) (arg4 float))
(defbehavior greenshot-init-by-other greenshot ((arg0 vector) (arg1 vector) (arg2 float) (arg3 int))
(let ((s2-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player))))
(set! (-> s2-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s2-0 reaction) default-collision-reaction)
@@ -710,7 +710,7 @@
(initialize-skeleton self *greenshot-sg* '())
(logclear! (-> self mask) (process-mask actor-pause))
(arcing-shot-setup arg0 arg1 arg2)
(set! (-> self flight-time) (the-as int arg3))
(set! (-> self flight-time) arg3)
(set! (-> self part) (create-launch-control (-> *part-group-id-table* 664) self))
(logior! (-> self draw status) (draw-status drwf01))
(go greenshot-idle)
File diff suppressed because it is too large Load Diff
+152 -104
View File
@@ -5,9 +5,6 @@
;; name in dgo: target-flut
;; dgos: L1, SNO, SWA
(define-extern target-flut-falling-anim-trans (function none :behavior target))
;; DECOMP BEGINS
(deftype flut-info (basic)
@@ -44,7 +41,7 @@
:double-jump-height-min (meters 1.0)
:double-jump-height-max (meters 2.0)
:air-attack-speed (meters 20.0)
:ground-timeout #x96
:ground-timeout (seconds 1.5)
)
)
@@ -201,7 +198,64 @@
(none)
)
;; ERROR: function was not converted to expressions. Cannot decompile.
(defbehavior target-flut-falling-anim-trans target ()
(let ((v1-2 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(b!
(or (= v1-2 (-> self draw art-group data 144)) (= v1-2 (-> self draw art-group data 145)))
cfg-7
:delay
(empty)
)
)
(ja-channel-push! 1 99)
(let ((v1-8 (-> self skel root-channel 0)))
(set! (-> v1-8 frame-group) (the-as art-joint-anim (-> self draw art-group data 144)))
)
(b! #t cfg-23 :delay (nop!))
(label cfg-7)
(cond
((and (logtest? (-> self control status) 1) (not (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 145)
)
)
)
(ja-channel-push! 1 6)
(let ((v1-21 (-> self skel root-channel 0)))
(set! (-> v1-21 frame-group) (the-as art-joint-anim (-> self draw art-group data 145)))
)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 144)
)
(let ((a0-23 (-> self skel root-channel 0)))
(set! (-> a0-23 param 0) 1.0)
(joint-control-channel-group-eval! a0-23 (the-as art-joint-anim #f) num-func-loop!)
)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 145)
)
(let ((a0-28 (-> self skel root-channel 0)))
(set! (-> a0-28 param 0) (the float (+ (-> a0-28 frame-group data 0 length) -1)))
(set! (-> a0-28 param 1) 1.0)
(joint-control-channel-group-eval! a0-28 (the-as art-joint-anim #f) num-func-seek!)
)
)
)
(label cfg-23)
0
(none)
)
(defbehavior target-flut-hit-ground-anim target ()
(cond
@@ -340,10 +394,9 @@
)
)
(('falling)
(when #t
enter-state
(go target-flut-falling)
)
(if #t
(go target-flut-falling #f)
)
)
(('swim)
(let* ((gp-1 (-> self control last-known-safe-ground))
@@ -359,12 +412,12 @@
(let ((s4-0 (new 'static 'attack-info :mask #x882)))
(set! (-> s4-0 vector quad) (-> s3-1 quad))
(set! (-> s4-0 shove-up) (+ (lerp-scale
(the-as float 4096.0)
(-> (new 'static 'array float 1 16384.0) 0)
f30-1
(the-as float 4096.0)
(the-as float 40960.0)
)
(the-as float 4096.0)
(-> (new 'static 'array float 1 16384.0) 0)
f30-1
(the-as float 4096.0)
(the-as float 40960.0)
)
(fmax 0.0 (- (-> gp-1 y) (-> self control trans y)))
)
)
@@ -605,27 +658,26 @@
(if (can-hands? #t)
(go target-flut-running-attack)
)
(when (and (zero? (logand (-> self control status) 1))
(and (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
(let ((v1-37 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(or (not (or (= v1-37 (-> self draw art-group data 59))
(= v1-37 (-> self draw art-group data 60))
(= v1-37 (-> self draw art-group data 61))
(if (and (zero? (logand (-> self control status) 1))
(and (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
(let ((v1-37 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(< 4096.0 (target-height-above-ground))
)
)
)
(or (not (or (= v1-37 (-> self draw art-group data 59))
(= v1-37 (-> self draw art-group data 60))
(= v1-37 (-> self draw art-group data 61))
)
)
(< 4096.0 (target-height-above-ground))
)
)
)
enter-state
(go target-flut-falling)
)
)
)
(go target-flut-falling #f)
)
(none)
)
:code
@@ -765,27 +817,26 @@
(if (can-hands? #t)
(go target-flut-running-attack)
)
(when (and (zero? (logand (-> self control status) 1))
(and (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
(let ((v1-37 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(or (not (or (= v1-37 (-> self draw art-group data 59))
(= v1-37 (-> self draw art-group data 60))
(= v1-37 (-> self draw art-group data 61))
(if (and (zero? (logand (-> self control status) 1))
(and (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
(let ((v1-37 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(< 4096.0 (target-height-above-ground))
)
)
)
(or (not (or (= v1-37 (-> self draw art-group data 59))
(= v1-37 (-> self draw art-group data 60))
(= v1-37 (-> self draw art-group data 61))
)
)
(< 4096.0 (target-height-above-ground))
)
)
)
enter-state
(go target-flut-falling)
)
)
)
(go target-flut-falling #f)
)
(let ((f30-1 (fabs (deg-diff (quaternion-y-angle (-> self control dir-targ)) (y-angle (-> self control))))))
(set! (-> self control unknown-surface00 turnv) (lerp-scale
(the-as float (-> self control unknown-uint20))
@@ -1388,27 +1439,26 @@
(if (move-legs?)
(go target-flut-walk)
)
(when (and (zero? (logand (-> self control status) 1))
(and (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
(let ((v1-34 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(or (not (or (= v1-34 (-> self draw art-group data 59))
(= v1-34 (-> self draw art-group data 60))
(= v1-34 (-> self draw art-group data 61))
(if (and (zero? (logand (-> self control status) 1))
(and (>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
(let ((v1-34 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
(< 4096.0 (target-height-above-ground))
)
)
)
(or (not (or (= v1-34 (-> self draw art-group data 59))
(= v1-34 (-> self draw art-group data 60))
(= v1-34 (-> self draw art-group data 61))
)
)
(< 4096.0 (target-height-above-ground))
)
)
)
enter-state
(go target-flut-falling)
)
)
)
(go target-flut-falling #f)
)
(none)
)
:code
@@ -1427,7 +1477,7 @@
:event
(-> target-flut-jump event)
:enter
(behavior ()
(behavior ((arg0 symbol))
(set! (-> self control unknown-surface00) *flut-jump-mods*)
(set! (-> self state-time) (-> *display* base-frame-counter))
(none)
@@ -1464,7 +1514,7 @@
(none)
)
:code
(behavior ()
(behavior ((arg0 symbol))
(cond
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
@@ -1483,11 +1533,11 @@
(ja-channel-push! 2 150)
)
)
(let ((a0-10 (-> self skel root-channel 0)))
(set! (-> a0-10 frame-group) (the-as art-joint-anim (-> self draw art-group data 144)))
(set! (-> a0-10 param 0) 1.0)
(set! (-> a0-10 frame-num) 0.0)
(joint-control-channel-group! a0-10 (the-as art-joint-anim (-> self draw art-group data 144)) num-func-loop!)
(let ((a0-11 (-> self skel root-channel 0)))
(set! (-> a0-11 frame-group) (the-as art-joint-anim (-> self draw art-group data 144)))
(set! (-> a0-11 param 0) 1.0)
(set! (-> a0-11 frame-num) 0.0)
(joint-control-channel-group! a0-11 (the-as art-joint-anim (-> self draw art-group data 144)) num-func-loop!)
)
(let ((gp-0 (-> self skel root-channel 1)))
(set! (-> gp-0 frame-interp) (-> self control unknown-float122))
@@ -1500,14 +1550,14 @@
)
(while #t
(suspend)
(let ((a0-12 (-> self skel root-channel 0)))
(set! (-> a0-12 param 0) (the float (+ (-> a0-12 frame-group data 0 length) -1)))
(joint-control-channel-group-eval! a0-12 (the-as art-joint-anim #f) num-func-loop!)
(let ((a0-13 (-> self skel root-channel 0)))
(set! (-> a0-13 param 0) (the float (+ (-> a0-13 frame-group data 0 length) -1)))
(joint-control-channel-group-eval! a0-13 (the-as art-joint-anim #f) num-func-loop!)
)
(let ((a0-13 (-> self skel root-channel 1)))
(set! (-> a0-13 frame-interp) (-> self control unknown-float122))
(set! (-> a0-13 param 0) 0.0)
(joint-control-channel-group-eval! a0-13 (the-as art-joint-anim #f) num-func-chan)
(let ((a0-14 (-> self skel root-channel 1)))
(set! (-> a0-14 frame-interp) (-> self control unknown-float122))
(set! (-> a0-14 param 0) 0.0)
(joint-control-channel-group-eval! a0-14 (the-as art-joint-anim #f) num-func-chan)
)
)
(none)
@@ -1739,8 +1789,7 @@
)
)
)
enter-state
(go target-flut-falling)
(go target-flut-falling #f)
)
((and (nonzero? (-> self control unknown-uint30))
(>= (the-as uint (- (-> *display* base-frame-counter) (the-as int (-> self control unknown-uint30))))
@@ -1779,26 +1828,25 @@
(set! f30-0 (* f30-0 (the-as float (fmin 1.0 (the-as float (-> self control unknown-float140))))))
)
)
(when (and (zero? (logand (-> self control status) 1))
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
(let ((v1-105 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(or (not (or (= v1-105 (-> self draw art-group data 59))
(= v1-105 (-> self draw art-group data 60))
(= v1-105 (-> self draw art-group data 61))
)
)
(< 4096.0 (target-height-above-ground))
)
)
(if (and (zero? (logand (-> self control status) 1))
(>= (- (-> *display* base-frame-counter) (-> self control unknown-dword11)) (-> *FLUT-bank* ground-timeout))
(>= 0.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
(let ((v1-105 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(or (not (or (= v1-105 (-> self draw art-group data 59))
(= v1-105 (-> self draw art-group data 60))
(= v1-105 (-> self draw art-group data 61))
)
)
(< 4096.0 (target-height-above-ground))
)
)
enter-state
(go target-flut-falling)
)
)
(go target-flut-falling #f)
)
(when (!= f30-0 0.0)
(set! (-> self trans-hook) (-> target-flut-hit-ground trans))
(if (not (ja-done? 0))
+1 -1
View File
@@ -27,7 +27,7 @@
:shadow 4
)
nav-enemy-default-event-handler
(defstatehandler hopper :event nav-enemy-default-event-handler)
(defmethod common-post hopper ((obj hopper))
(let ((v1-1 (-> obj draw shadow-ctrl)))
+2 -4
View File
@@ -169,10 +169,8 @@
)
(set! (-> obj draw light-index) (the-as uint 255))
(set! (-> obj bidirectional?) #f)
(let ((v0-2 #t))
(set! (-> obj should-grab-player?) v0-2)
v0-2
)
(set! (-> obj should-grab-player?) #t)
(none)
)
+120 -122
View File
@@ -1116,146 +1116,144 @@
sv-16
)
(defun peri-beamcam-init-by-other ((arg0 string))
(with-pp
(let ((gp-0 (entity-by-name "junglecam-1")))
(the-as
(pointer process)
(cond
(gp-0
(cond
((name= arg0 "reflector-mirror-2")
(let ((s5-1 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-1
(let ((t9-3 (method-of-type pov-camera activate)))
(t9-3 (the-as pov-camera s5-1) pp 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-1
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"tower1"
0
#f
'((0 ambient camera "gamcam14"))
)
(-> s5-1 ppointer)
(defbehavior peri-beamcam-init-by-other process ((arg0 string))
(let ((gp-0 (entity-by-name "junglecam-1")))
(the-as
(pointer process)
(cond
(gp-0
(cond
((name= arg0 "reflector-mirror-2")
(let ((s5-1 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-1
(let ((t9-3 (method-of-type pov-camera activate)))
(t9-3 (the-as pov-camera s5-1) self 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-1
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"tower1"
0
#f
'((0 ambient camera "gamcam14"))
)
(-> s5-1 ppointer)
)
)
((name= arg0 "periscope-11")
(let ((s5-2 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-2
(let ((t9-7 (method-of-type pov-camera activate)))
(t9-7 (the-as pov-camera s5-2) pp 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-2
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"tower2"
0
#f
'((0 ambient camera "gamcam15") (0 want-force-vis jungle #t) (0 want-force-vis village1 #t))
)
(-> s5-2 ppointer)
)
((name= arg0 "periscope-11")
(let ((s5-2 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-2
(let ((t9-7 (method-of-type pov-camera activate)))
(t9-7 (the-as pov-camera s5-2) self 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-2
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"tower2"
0
#f
'((0 ambient camera "gamcam15") (0 want-force-vis jungle #t) (0 want-force-vis village1 #t))
)
(-> s5-2 ppointer)
)
)
((name= arg0 "periscope-12")
(let ((s5-3 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-3
(let ((t9-11 (method-of-type pov-camera activate)))
(t9-11 (the-as pov-camera s5-3) pp 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-3
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"tower3"
0
#f
'((0 ambient camera "gamcam16"))
)
(-> s5-3 ppointer)
)
((name= arg0 "periscope-12")
(let ((s5-3 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-3
(let ((t9-11 (method-of-type pov-camera activate)))
(t9-11 (the-as pov-camera s5-3) self 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-3
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"tower3"
0
#f
'((0 ambient camera "gamcam16"))
)
(-> s5-3 ppointer)
)
)
((name= arg0 "periscope-13")
(let ((s5-4 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-4
(let ((t9-15 (method-of-type pov-camera activate)))
(t9-15 (the-as pov-camera s5-4) pp 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-4
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"tower4"
0
#f
'((0 ambient camera "gamcam17"))
)
(-> s5-4 ppointer)
)
((name= arg0 "periscope-13")
(let ((s5-4 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-4
(let ((t9-15 (method-of-type pov-camera activate)))
(t9-15 (the-as pov-camera s5-4) self 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-4
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"tower4"
0
#f
'((0 ambient camera "gamcam17"))
)
(-> s5-4 ppointer)
)
)
((name= arg0 "periscope-14")
(let ((s5-5 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-5
(let ((t9-19 (method-of-type pov-camera activate)))
(t9-19 (the-as pov-camera s5-5) pp 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-5
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"tower5"
0
#f
'((0 ambient camera "gamcam18") (0 want-force-vis jungle #t) (0 want-force-vis village1 #t))
)
(-> s5-5 ppointer)
)
((name= arg0 "periscope-14")
(let ((s5-5 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-5
(let ((t9-19 (method-of-type pov-camera activate)))
(t9-19 (the-as pov-camera s5-5) self 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-5
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"tower5"
0
#f
'((0 ambient camera "gamcam18") (0 want-force-vis jungle #t) (0 want-force-vis village1 #t))
)
(-> s5-5 ppointer)
)
)
((name= arg0 "periscope-15")
(let ((s5-6 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-6
(let ((t9-23 (method-of-type pov-camera activate)))
(t9-23 (the-as pov-camera s5-6) pp 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-6
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"beamcam"
0
#f
'((0 ambient camera "gamcam19")
(0 want-force-vis jungle #t)
(0 want-force-vis village1 #t)
(0 display-level village1 movie)
)
)
(-> s5-6 ppointer)
)
((name= arg0 "periscope-15")
(let ((s5-6 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-6
(let ((t9-23 (method-of-type pov-camera activate)))
(t9-23 (the-as pov-camera s5-6) self 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-6
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"beamcam"
0
#f
'((0 ambient camera "gamcam19")
(0 want-force-vis jungle #t)
(0 want-force-vis village1 #t)
(0 display-level village1 movie)
)
)
(-> s5-6 ppointer)
)
)
(else
(format #t "ERROR<GMJ>: don't know which peri-beamcam to play for ~S~%" arg0)
)
)
(else
(format #t "ERROR<GMJ>: don't know which peri-beamcam to play for ~S~%" arg0)
)
)
(else
(format #t "ERROR<GMJ>: couldn't find junglecam-1 to initialize peri-beamcam~%")
)
)
(else
(format #t "ERROR<GMJ>: couldn't find junglecam-1 to initialize peri-beamcam~%")
)
)
)
@@ -2215,7 +2213,7 @@
(when (line-in-view-frustum? arg0 arg1)
(let ((s4-1 (vector-! (new 'stack-no-clear 'vector) arg1 arg0)))
(vector-length s4-1)
(let ((t2-0 (new 'stack-no-clear 'collide-mesh-cache-tri)))
(let ((t2-0 (new 'stack-no-clear 'collide-tri-result)))
0.0
(if (>= (fill-and-probe-using-line-sphere
*collide-cache*
@@ -2224,7 +2222,7 @@
6144.0
(collide-kind target)
(the-as process #f)
(the-as collide-tri-result t2-0)
t2-0
1
)
0.0
@@ -238,6 +238,7 @@
(defmethod dummy-24 mother-spider-proj ((obj mother-spider-proj))
(with-pp
(spawn (-> obj part) (the-as vector (-> obj root-override root-prim prim-core)))
(#when PC_DEBUG_SOUND_ENABLE
(let ((s5-0 (the-as sound-rpc-set-param (get-sound-buffer-entry))))
(set! (-> s5-0 command) (sound-command set-param))
(set! (-> s5-0 id) (-> obj sound-id))
@@ -255,6 +256,7 @@
(set! (-> s5-0 parms mask) (the-as uint 32))
(-> s5-0 id)
)
)
(let ((f0-5 (* 5120.0 (+ 0.9 (* 0.1 (cos (* 873.81335 (the float (mod (-> *display* base-frame-counter) 75)))))))))
(find-ground-and-draw-shadow
(-> obj root-override trans)
@@ -282,15 +284,15 @@
(vector-flatten! s3-1 s3-1 (-> arg0 root-override local-normal))
)
(vector-normalize-copy! s4-0 s3-1 1.0)
(let ((s3-2 (new 'stack-no-clear 'vector)))
(let ((s3-2 (new 'stack-no-clear 'matrix)))
(matrix-from-two-vectors-max-angle-partial!
(the-as matrix s3-2)
s3-2
s5-0
s4-0
(* (-> arg0 max-turn) (-> *display* seconds-per-frame))
(-> arg0 tween)
)
(vector-matrix*! s5-0 s5-0 (the-as matrix s3-2))
(vector-matrix*! s5-0 s5-0 s3-2)
)
(vector-normalize! s5-0 1.0)
(vector-float*! (-> arg0 root-override transv) s5-0 (-> arg0 max-speed))
+1 -1
View File
@@ -474,7 +474,7 @@
(vector+float! (-> s2-2 min) s1-1 -18432.0)
(vector+float! (-> s2-2 max) s1-1 18432.0)
)
(add-spheres! s2-2 (the-as (pointer sphere) (-> s3-1 intersect)) 1)
(add-spheres! s2-2 (the-as (inline-array sphere) (-> s3-1 intersect)) 1)
(let ((f0-17 (* 0.5 (vector-vector-distance (-> s2-2 min) (-> s2-2 max)))))
(set-vector!
(-> obj draw bounds)
@@ -1010,7 +1010,7 @@
)
(cpad-set-buzz! (-> *cpad-list* cpads 0) 0 51 15)
(sound-play-by-name
(sound-name-with-material 'zoom-hit (the-as int (-> self control unknown-int60)) "")
(sound-name-with-material 'zoom-hit (the-as pat-surface (-> self control unknown-int60)) "")
(-> self racer scrape-sound-id)
1024
0
+9 -9
View File
@@ -646,8 +646,8 @@
(none)
)
(defbehavior fishermans-boat-set-path-point fishermans-boat ((arg0 vector))
(TODO-RENAME-12 (-> self controller) (the-as int arg0) (-> self root-overlay trans))
(defbehavior fishermans-boat-set-path-point fishermans-boat ((arg0 int))
(TODO-RENAME-12 (-> self controller) arg0 (-> self root-overlay trans))
(vector-normalize-copy! (-> self dest-dir) (-> self controller path-dest-velocity) 1.0)
0
(none)
@@ -964,7 +964,7 @@
)
)
(fishermans-boat-set-dock-point 0)
(fishermans-boat-set-path-point (the-as vector 0))
(fishermans-boat-set-path-point 0)
(anim-loop)
(none)
)
@@ -1015,7 +1015,7 @@
)
(send-event (handle->process (-> self cam-tracker)) 'border #t)
(send-event (handle->process (-> self cam-tracker)) 'mask #x20800)
(fishermans-boat-set-path-point (the-as vector 0))
(fishermans-boat-set-path-point 0)
(fishermans-boat-next-path-point)
(while #t
(suspend)
@@ -1048,7 +1048,7 @@
(load-state-want-levels 'village1 'beach)
(load-state-want-vis 'vi1)
(fishermans-boat-set-dock-point 0)
(fishermans-boat-set-path-point (the-as vector 5))
(fishermans-boat-set-path-point 5)
(anim-loop)
(none)
)
@@ -1127,7 +1127,7 @@
)
(load-state-want-force-vis 'misty #f)
(fishermans-boat-set-dock-point 4)
(fishermans-boat-set-path-point (the-as vector 4))
(fishermans-boat-set-path-point 4)
(anim-loop)
(none)
)
@@ -1177,7 +1177,7 @@
)
(send-event (handle->process (-> self cam-tracker)) 'border #t)
(send-event (handle->process (-> self cam-tracker)) 'mask #x20800)
(fishermans-boat-set-path-point (the-as vector 4))
(fishermans-boat-set-path-point 4)
(fishermans-boat-next-path-point)
(while #t
(suspend)
@@ -1213,7 +1213,7 @@
(behavior ()
(set-continue! *game-info* "misty-start")
(fishermans-boat-set-dock-point 4)
(fishermans-boat-set-path-point (the-as vector 2))
(fishermans-boat-set-path-point 2)
(while #t
(suspend)
)
@@ -1413,7 +1413,7 @@
(fishermans-boat-set-dock-point 4)
(fishermans-boat-set-dock-point 0)
)
(fishermans-boat-set-path-point (the-as vector (-> obj dock-point-index)))
(fishermans-boat-set-path-point (-> obj dock-point-index))
(fishermans-boat-next-path-point)
(set! (-> obj root-overlay trans quad) (-> obj dock-point quad))
(set! (-> obj root-overlay trans y) 0.0)
+2 -4
View File
@@ -191,11 +191,9 @@
(eval-path-curve! (-> obj path) s5-0 0.4 'interp)
(set! (-> obj teleport-if-above-y) (-> s5-0 y))
(eval-path-curve! (-> obj path) s5-0 0.6 'interp)
(let ((f0-1 (-> s5-0 y)))
(set! (-> obj teleport-if-below-y) f0-1)
(the-as symbol f0-1)
)
(set! (-> obj teleport-if-below-y) (-> s5-0 y))
)
(none)
)
(defmethod TODO-RENAME-27 sunken-elevator ((obj sunken-elevator))
-21
View File
@@ -5,27 +5,6 @@
;; name in dgo: village2-obs
;; dgos: L1, VI2
(define-extern *ogreboss-village2-sg* skeleton-group)
(define-extern *fireboulder-sg* skeleton-group)
(define-extern *exit-chamber-dummy-sg* skeleton-group)
(define-extern *ceilingflag-sg* skeleton-group)
(define-extern *allpontoons-sg* skeleton-group)
(define-extern *pontoonten-sg* skeleton-group)
(define-extern *pontoonten-constants* rigid-body-platform-constants) ;; unknown type
(define-extern *pontoonfive-sg* skeleton-group)
(define-extern *pontoonfive-constants* rigid-body-platform-constants) ;; unknown type
(define-extern *village2cam-sg* skeleton-group)
(define-extern *med-res-rolling-sg* skeleton-group)
(define-extern *med-res-rolling1-sg* skeleton-group)
(define-extern *med-res-village2-sg* skeleton-group)
(declare-type pontoon rigid-body-platform)
(declare-type allpontoons process-drawable)
(declare-type ceilingflag process-drawable)
(declare-type fireboulder process-drawable)
(declare-type exit-chamber-dummy process-drawable)
(declare-type ogreboss-village2 process-drawable)
;; DECOMP BEGINS
+4 -1
View File
@@ -72,7 +72,10 @@ bool Debugger::detach() {
{
std::unique_lock<std::mutex> lk(m_watcher_mutex);
m_attach_return = false;
stop_watcher();
}
stop_watcher();
{
std::unique_lock<std::mutex> lk(m_watcher_mutex);
m_attach_cv.wait(lk, [&]() { return m_attach_return; });
}
xdbg::close_memory(m_debug_context.tid, &m_memory_handle);
+1 -1
View File
@@ -1,4 +1,4 @@
@echo off
cd ..\..
out\build\Release\bin\gk -fakeiso -debug -v
out\build\Release\bin\gk -boot -fakeiso -debug -v
pause
+12 -5
View File
@@ -432,7 +432,7 @@
(when (not (null? default-handlers))
;;(fmt #t "found default-handlers for {}: {}\n" defstate-type default-handlers)
;; event
(set! default-handlers (cdr default-handlers))
(set! default-handlers (cadr default-handlers))
(when (and (eq? event '*no-state*) (car default-handlers))
(set! event (car default-handlers)))
;; enter
@@ -491,7 +491,7 @@
(defmacro behavior (bindings &rest body)
"Define an anonymous behavior for a process state. This may only be used inside a defstate!"
(let ((behavior-type (first *defstate-type-stack*)))
(pop! *defstate-type-stack*)
`(lambda :behavior ,behavior-type ,bindings ,@body)
@@ -507,9 +507,16 @@
&key (exit #f)
&key (code #f)
&key (post #f))
(if (null? (assoc proc *default-state-handlers*))
(push! *default-state-handlers* (cons proc (list event enter trans exit code post)))
(fmt #t "default state handlers for {} already defined, ignoring duplicate.\n" proc (cadr (assoc proc *default-state-handlers*)))
(let ((old (assoc proc *default-state-handlers*))
(new (list proc (list event enter trans exit code post))))
(if (null? old)
(append!! *default-state-handlers* new) ;; add new set of default handlers
(dolist (hnd *default-state-handlers*) ;; replace old handlers with new ones
(if (eq? (car hnd) old)
(set-car! hnd new)
)
)
)
)
`(none)
)
+17 -4
View File
@@ -1909,6 +1909,7 @@
)
;; definition (debug) for function marks-cam-restore
;; INFO: Return type mismatch symbol vs none.
;; Used lq/sq
(defun-debug marks-cam-restore ()
(let ((a0-0 (new-stack-vector0))
@@ -1945,13 +1946,12 @@
(clear *camera-old-stat-string-tfrag*)
(clear *camera-old-stat-string-tfrag-near*)
(clear *camera-old-stat-string-total*)
(let ((v0-7 #t))
(set! *display-camera-old-stats* v0-7)
v0-7
)
(set! *display-camera-old-stats* #t)
(none)
)
;; definition (debug) for function eddie-cam-restore
;; INFO: Return type mismatch vector vs none.
;; Used lq/sq
(defun-debug eddie-cam-restore ()
(let ((a0-0 (new-stack-vector0))
@@ -1979,9 +1979,11 @@
(set! (-> a1-0 vector 3 w) 1.0)
(debug-set-camera-pos-rot! a0-0 a1-0)
)
(none)
)
;; definition (debug) for function gregs-jungle-cam-restore
;; INFO: Return type mismatch string vs none.
;; Used lq/sq
(defun-debug gregs-jungle-cam-restore ()
(let ((a0-0 (new-stack-vector0))
@@ -2018,9 +2020,11 @@
(clear *camera-old-stat-string-tfrag*)
(clear *camera-old-stat-string-tfrag-near*)
(clear *camera-old-stat-string-total*)
(none)
)
;; definition (debug) for function gregs-village1-cam-restore
;; INFO: Return type mismatch string vs none.
;; Used lq/sq
(defun-debug gregs-village1-cam-restore ()
(let ((a0-0 (new-stack-vector0))
@@ -2057,9 +2061,11 @@
(clear *camera-old-stat-string-tfrag*)
(clear *camera-old-stat-string-tfrag-near*)
(clear *camera-old-stat-string-total*)
(none)
)
;; definition (debug) for function gregs-texture-cam-restore
;; INFO: Return type mismatch string vs none.
;; Used lq/sq
(defun-debug gregs-texture-cam-restore ()
(let ((a0-0 (new-stack-vector0))
@@ -2096,9 +2102,11 @@
(clear *camera-old-stat-string-tfrag*)
(clear *camera-old-stat-string-tfrag-near*)
(clear *camera-old-stat-string-total*)
(none)
)
;; definition (debug) for function gregs-texture2-cam-restore
;; INFO: Return type mismatch string vs none.
;; Used lq/sq
(defun-debug gregs-texture2-cam-restore ()
(let ((a0-0 (new-stack-vector0))
@@ -2135,9 +2143,11 @@
(clear *camera-old-stat-string-tfrag*)
(clear *camera-old-stat-string-tfrag-near*)
(clear *camera-old-stat-string-total*)
(none)
)
;; definition (debug) for function cave-cam-restore
;; INFO: Return type mismatch vector vs none.
;; Used lq/sq
(defun-debug cave-cam-restore ()
(let ((a0-0 (new-stack-vector0))
@@ -2165,9 +2175,11 @@
(set! (-> a1-0 vector 3 w) 1.0)
(debug-set-camera-pos-rot! a0-0 a1-0)
)
(none)
)
;; definition (debug) for function paals-cam-restore
;; INFO: Return type mismatch vector vs none.
;; Used lq/sq
(defun-debug paals-cam-restore ()
(let ((a0-0 (new-stack-vector0))
@@ -2195,4 +2207,5 @@
(set! (-> a1-0 vector 3 w) 1.0)
(debug-set-camera-pos-rot! a0-0 a1-0)
)
(none)
)
+2 -2
View File
@@ -19,8 +19,8 @@
(new (symbol type process-drawable) _type_ 0)
(TODO-RENAME-9 (_type_) none 9)
(dummy-10 (_type_ symbol float int) object 10)
(dummy-11 (_type_ symbol basic int basic int) none 11)
(dummy-12 (_type_ symbol basic int basic sound-name) int 12)
(dummy-11 (_type_ symbol float int basic pat-surface) none 11)
(dummy-12 (_type_ symbol float int basic sound-name) int 12)
(set-channel-offset! (_type_ int) none 13)
(TODO-RENAME-14 (_type_ float float float) none 14)
)
+152 -159
View File
@@ -8,63 +8,63 @@
(define *debug-effect-control* #f)
;; definition for function sound-name-with-material
(defun sound-name-with-material ((arg0 symbol) (arg1 int) (arg2 string))
(defun sound-name-with-material ((arg0 symbol) (arg1 pat-surface) (arg2 string))
(let ((gp-0 format)
(a0-2 (clear *temp-string*))
(a1-1 "~S-~S~S")
(v1-1 (shr (shl arg1 52) 58))
(v1-1 (-> arg1 material))
)
(gp-0
a0-2
a1-1
arg0
(cond
((= v1-1 5)
((= v1-1 (pat-material sand))
"sand"
)
((= v1-1 6)
((= v1-1 (pat-material wood))
"wood"
)
((= v1-1 13)
((= v1-1 (pat-material crwood))
"crwood"
)
((or (= v1-1 18) (= v1-1 8))
((or (= v1-1 (pat-material tube)) (= v1-1 (pat-material pcmetal)))
"pcmetal"
)
((or (= v1-1 16) (= v1-1 21))
((or (= v1-1 (pat-material metal)) (= v1-1 (pat-material rotate)))
"metal"
)
((= v1-1 9)
((= v1-1 (pat-material snow))
"snow"
)
((= v1-1 10)
((= v1-1 (pat-material deepsnow))
"dpsnow"
)
((= v1-1 14)
((= v1-1 (pat-material gravel))
"gravel"
)
((= v1-1 15)
((= v1-1 (pat-material dirt))
"dirt"
)
((zero? v1-1)
((= v1-1 (pat-material stone))
"stone"
)
((= v1-1 3)
((= v1-1 (pat-material waterbottom))
"water"
)
((= v1-1 4)
((= v1-1 (pat-material tar))
"tar"
)
((= v1-1 17)
((= v1-1 (pat-material straw))
"straw"
)
((= v1-1 1)
((= v1-1 (pat-material ice))
"ice"
)
((= v1-1 19)
((= v1-1 (pat-material swamp))
"swamp"
)
((= v1-1 22)
((= v1-1 (pat-material neutral))
"neutral"
)
(else
@@ -344,7 +344,7 @@
)
)
)
(dummy-11 obj arg0 (the-as basic arg1) s5-0 (-> obj res) t1-1)
(dummy-11 obj arg0 arg1 s5-0 (-> obj res) (the-as pat-surface t1-1))
)
)
((let ((v1-18 (symbol->string arg0)))
@@ -418,7 +418,7 @@
(activate! *camera-smush-control* 819.2 37 600 1.0 0.995)
)
((zero? s3-0)
(dummy-12 obj arg0 (the-as basic arg1) s5-0 (-> obj res) (string->sound-name (symbol->string arg0)))
(dummy-12 obj arg0 arg1 s5-0 (-> obj res) (string->sound-name (symbol->string arg0)))
)
((= (-> (the-as basic s3-0) type) sparticle-launcher)
(if *debug-effect-control*
@@ -543,14 +543,14 @@
)
)
)
(s1-3 s2-5 (the-as symbol s0-3) (the-as basic arg1) s5-0 sv-288 t1-11)
(s1-3 s2-5 (the-as symbol s0-3) arg1 s5-0 sv-288 t1-11)
)
)
)
(send-event (-> obj process) 'death-start (the-as death-info s3-0))
)
(else
(dummy-12 obj arg0 (the-as basic arg1) s5-0 (-> obj res) (string->sound-name (symbol->string arg0)))
(dummy-12 obj arg0 arg1 s5-0 (-> obj res) (string->sound-name (symbol->string arg0)))
)
)
)
@@ -562,7 +562,7 @@
;; definition for method 11 of type effect-control
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defmethod dummy-11 effect-control ((obj effect-control) (arg0 symbol) (arg1 basic) (arg2 int) (arg3 basic) (arg4 int))
(defmethod dummy-11 effect-control ((obj effect-control) (arg0 symbol) (arg1 float) (arg2 int) (arg3 basic) (arg4 pat-surface))
(local-vars
(sv-48
(function sparticle-system sparticle-launcher vector sparticle-launch-state sparticle-launch-control float none)
@@ -604,64 +604,64 @@
(when (< (the-as int a0-4) 9000)
(let* ((a0-13 obj)
(t9-8 (method-of-object a0-13 dummy-10))
(v1-15 (shr (shl arg4 52) 58))
(v1-15 (-> arg4 material))
)
(t9-8
a0-13
(cond
((= v1-15 5)
((= v1-15 (pat-material sand))
'group-land-poof-sand
)
((= v1-15 6)
((= v1-15 (pat-material wood))
'group-land-poof-wood
)
((= v1-15 13)
((= v1-15 (pat-material crwood))
'group-land-poof-crwood
)
((or (= v1-15 18) (= v1-15 8))
((or (= v1-15 (pat-material tube)) (= v1-15 (pat-material pcmetal)))
'group-land-poof-pcmetal
)
((or (= v1-15 16) (= v1-15 21))
((or (= v1-15 (pat-material metal)) (= v1-15 (pat-material rotate)))
'group-land-poof-metal
)
((= v1-15 1)
((= v1-15 (pat-material ice))
'group-land-poof-ice
)
((= v1-15 9)
((= v1-15 (pat-material snow))
'group-land-poof-snow
)
((= v1-15 10)
((= v1-15 (pat-material deepsnow))
'group-land-poof-dpsnow
)
((= v1-15 14)
((= v1-15 (pat-material gravel))
'group-land-poof-gravel
)
((= v1-15 15)
((= v1-15 (pat-material dirt))
'group-land-poof-dirt
)
((zero? v1-15)
((= v1-15 (pat-material stone))
'group-land-poof-stone
)
((= v1-15 3)
((= v1-15 (pat-material waterbottom))
'group-land-poof-water
)
((= v1-15 4)
((= v1-15 (pat-material tar))
'group-land-poof-tar
)
((= v1-15 17)
((= v1-15 (pat-material straw))
'group-land-poof-straw
)
((= v1-15 19)
((= v1-15 (pat-material swamp))
'group-land-poof-swamp
)
((= v1-15 22)
((= v1-15 (pat-material neutral))
'group-land-poof-neutral
)
(else
'group-land-poof-grass
)
)
(the-as float arg1)
arg1
-1
)
)
@@ -671,64 +671,64 @@
(when (< (the-as int a0-4) 9000)
(let* ((a0-14 obj)
(t9-9 (method-of-object a0-14 dummy-10))
(v1-20 (shr (shl arg4 52) 58))
(v1-20 (-> arg4 material))
)
(t9-9
a0-14
(cond
((= v1-20 5)
((= v1-20 (pat-material sand))
'group-run-poof-sand
)
((= v1-20 6)
((= v1-20 (pat-material wood))
'group-run-poof-wood
)
((= v1-20 13)
((= v1-20 (pat-material crwood))
'group-run-poof-crwood
)
((or (= v1-20 18) (= v1-20 8))
((or (= v1-20 (pat-material tube)) (= v1-20 (pat-material pcmetal)))
'group-run-poof-pcmetal
)
((or (= v1-20 16) (= v1-20 21))
((or (= v1-20 (pat-material metal)) (= v1-20 (pat-material rotate)))
'group-run-poof-metal
)
((= v1-20 1)
((= v1-20 (pat-material ice))
'group-run-poof-ice
)
((= v1-20 9)
((= v1-20 (pat-material snow))
'group-run-poof-snow
)
((= v1-20 10)
((= v1-20 (pat-material deepsnow))
'group-run-poof-dpsnow
)
((= v1-20 14)
((= v1-20 (pat-material gravel))
'group-run-poof-gravel
)
((= v1-20 15)
((= v1-20 (pat-material dirt))
'group-run-poof-dirt
)
((zero? v1-20)
((= v1-20 (pat-material stone))
'group-run-poof-stone
)
((= v1-20 3)
((= v1-20 (pat-material waterbottom))
'group-run-poof-water
)
((= v1-20 4)
((= v1-20 (pat-material tar))
'group-run-poof-tar
)
((= v1-20 17)
((= v1-20 (pat-material straw))
'group-run-poof-straw
)
((= v1-20 19)
((= v1-20 (pat-material swamp))
'group-run-poof-swamp
)
((= v1-20 22)
((= v1-20 (pat-material neutral))
'group-run-poof-neutral
)
(else
'group-run-poof-grass
)
)
(the-as float arg1)
arg1
-1
)
)
@@ -737,64 +737,64 @@
(('effect-just-footprint)
(let* ((a0-15 obj)
(t9-10 (method-of-object a0-15 dummy-10))
(v1-24 (shr (shl arg4 52) 58))
(v1-24 (-> arg4 material))
)
(t9-10
a0-15
(cond
((= v1-24 5)
((= v1-24 (pat-material sand))
'group-just-footprint-sand
)
((= v1-24 6)
((= v1-24 (pat-material wood))
'group-just-footprint-wood
)
((= v1-24 13)
((= v1-24 (pat-material crwood))
'group-just-footprint-crwood
)
((or (= v1-24 18) (= v1-24 8))
((or (= v1-24 (pat-material tube)) (= v1-24 (pat-material pcmetal)))
'group-just-footprint-pcmetal
)
((or (= v1-24 16) (= v1-24 21))
((or (= v1-24 (pat-material metal)) (= v1-24 (pat-material rotate)))
'group-just-footprint-metal
)
((= v1-24 1)
((= v1-24 (pat-material ice))
'group-just-footprint-ice
)
((= v1-24 9)
((= v1-24 (pat-material snow))
'group-just-footprint-snow
)
((= v1-24 10)
((= v1-24 (pat-material deepsnow))
'group-just-footprint-dpsnow
)
((= v1-24 14)
((= v1-24 (pat-material gravel))
'group-just-footprint-gravel
)
((= v1-24 15)
((= v1-24 (pat-material dirt))
'group-just-footprint-dirt
)
((zero? v1-24)
((= v1-24 (pat-material stone))
'group-just-footprint-stone
)
((= v1-24 3)
((= v1-24 (pat-material waterbottom))
'group-just-footprint-water
)
((= v1-24 4)
((= v1-24 (pat-material tar))
'group-just-footprint-tar
)
((= v1-24 17)
((= v1-24 (pat-material straw))
'group-just-footprint-straw
)
((= v1-24 19)
((= v1-24 (pat-material swamp))
'group-just-footprint-swamp
)
((= v1-24 22)
((= v1-24 (pat-material neutral))
'group-just-footprint-neutral
)
(else
'group-just-footprint-grass
)
)
(the-as float arg1)
arg1
-1
)
)
@@ -803,64 +803,64 @@
(when (< (the-as int a0-4) 9000)
(let* ((a0-16 obj)
(t9-11 (method-of-object a0-16 dummy-10))
(v1-29 (shr (shl arg4 52) 58))
(v1-29 (-> arg4 material))
)
(t9-11
a0-16
(cond
((= v1-29 5)
((= v1-29 (pat-material sand))
'group-just-poof-sand
)
((= v1-29 6)
((= v1-29 (pat-material wood))
'group-just-poof-wood
)
((= v1-29 13)
((= v1-29 (pat-material crwood))
'group-just-poof-crwood
)
((or (= v1-29 18) (= v1-29 8))
((or (= v1-29 (pat-material tube)) (= v1-29 (pat-material pcmetal)))
'group-just-poof-pcmetal
)
((or (= v1-29 16) (= v1-29 21))
((or (= v1-29 (pat-material metal)) (= v1-29 (pat-material rotate)))
'group-just-poof-metal
)
((= v1-29 1)
((= v1-29 (pat-material ice))
'group-just-poof-ice
)
((= v1-29 9)
((= v1-29 (pat-material snow))
'group-just-poof-snow
)
((= v1-29 10)
((= v1-29 (pat-material deepsnow))
'group-just-poof-dpsnow
)
((= v1-29 14)
((= v1-29 (pat-material gravel))
'group-just-poof-gravel
)
((= v1-29 15)
((= v1-29 (pat-material dirt))
'group-just-poof-dirt
)
((zero? v1-29)
((= v1-29 (pat-material stone))
'group-just-poof-stone
)
((= v1-29 3)
((= v1-29 (pat-material waterbottom))
'group-just-poof-water
)
((= v1-29 4)
((= v1-29 (pat-material tar))
'group-just-poof-tar
)
((= v1-29 17)
((= v1-29 (pat-material straw))
'group-just-poof-straw
)
((= v1-29 19)
((= v1-29 (pat-material swamp))
'group-just-poof-swamp
)
((= v1-29 22)
((= v1-29 (pat-material neutral))
'group-just-poof-neutral
)
(else
'group-just-poof-grass
)
)
(the-as float arg1)
arg1
-1
)
)
@@ -869,117 +869,117 @@
(('effect-slide-poof)
(let* ((a0-19 obj)
(t9-12 (method-of-object a0-19 dummy-10))
(v1-33 (shr (shl arg4 52) 58))
(v1-33 (-> arg4 material))
)
(t9-12
a0-19
(cond
((= v1-33 5)
((= v1-33 (pat-material sand))
'group-slide-poof-sand
)
((= v1-33 6)
((= v1-33 (pat-material wood))
'group-slide-poof-wood
)
((= v1-33 13)
((= v1-33 (pat-material crwood))
'group-slide-poof-crwood
)
((or (= v1-33 18) (= v1-33 8))
((or (= v1-33 (pat-material tube)) (= v1-33 (pat-material pcmetal)))
'group-slide-poof-pcmetal
)
((or (= v1-33 16) (= v1-33 21))
((or (= v1-33 (pat-material metal)) (= v1-33 (pat-material rotate)))
'group-slide-poof-metal
)
((= v1-33 1)
((= v1-33 (pat-material ice))
'group-slide-poof-ice
)
((= v1-33 9)
((= v1-33 (pat-material snow))
'group-slide-poof-snow
)
((= v1-33 10)
((= v1-33 (pat-material deepsnow))
'group-slide-poof-dpsnow
)
((= v1-33 14)
((= v1-33 (pat-material gravel))
'group-slide-poof-gravel
)
((= v1-33 15)
((= v1-33 (pat-material dirt))
'group-slide-poof-dirt
)
((zero? v1-33)
((= v1-33 (pat-material stone))
'group-slide-poof-stone
)
((= v1-33 3)
((= v1-33 (pat-material waterbottom))
'group-slide-poof-water
)
((= v1-33 4)
((= v1-33 (pat-material tar))
'group-slide-poof-tar
)
((= v1-33 17)
((= v1-33 (pat-material straw))
'group-slide-poof-straw
)
((= v1-33 19)
((= v1-33 (pat-material swamp))
'group-slide-poof-swamp
)
((= v1-33 22)
((= v1-33 (pat-material neutral))
'group-slide-poof-neutral
)
(else
'group-slide-poof-grass
)
)
(the-as float arg1)
arg1
-1
)
)
)
(('effect-droppings)
(let* ((v1-36 (shr (shl arg4 52) 58))
(let* ((v1-36 (-> arg4 material))
(s0-0 (cond
((= v1-36 5)
((= v1-36 (pat-material sand))
(-> *part-id-table* 95)
)
((= v1-36 6)
((= v1-36 (pat-material wood))
(-> *part-id-table* 97)
)
((= v1-36 13)
((= v1-36 (pat-material crwood))
(-> *part-id-table* 99)
)
((or (= v1-36 18) (= v1-36 8))
((or (= v1-36 (pat-material tube)) (= v1-36 (pat-material pcmetal)))
(-> *part-id-table* 2248)
)
((or (= v1-36 16) (= v1-36 21))
((or (= v1-36 (pat-material metal)) (= v1-36 (pat-material rotate)))
(-> *part-id-table* 2334)
)
((= v1-36 1)
((= v1-36 (pat-material ice))
(-> *part-id-table* 2249)
)
((= v1-36 9)
((= v1-36 (pat-material snow))
(-> *part-id-table* 2250)
)
((= v1-36 10)
((= v1-36 (pat-material deepsnow))
(-> *part-id-table* 2251)
)
((= v1-36 14)
((= v1-36 (pat-material gravel))
(-> *part-id-table* 2252)
)
((= v1-36 15)
((= v1-36 (pat-material dirt))
(-> *part-id-table* 2253)
)
((zero? v1-36)
((= v1-36 (pat-material stone))
(-> *part-id-table* 98)
)
((= v1-36 3)
((= v1-36 (pat-material waterbottom))
(-> *part-id-table* 2254)
)
((= v1-36 4)
((= v1-36 (pat-material tar))
(-> *part-id-table* 2255)
)
((= v1-36 17)
((= v1-36 (pat-material straw))
(-> *part-id-table* 2256)
)
((= v1-36 19)
((= v1-36 (pat-material swamp))
(-> *part-id-table* 2257)
)
((= v1-36 22)
((= v1-36 (pat-material neutral))
(-> *part-id-table* 2773)
)
(else
@@ -1002,54 +1002,54 @@
)
)
(('effect-jump-droppings)
(let* ((v1-61 (shr (shl arg4 52) 58))
(let* ((v1-61 (-> arg4 material))
(s0-1 (cond
((= v1-61 5)
((= v1-61 (pat-material sand))
(-> *part-id-table* 106)
)
((= v1-61 6)
((= v1-61 (pat-material wood))
(-> *part-id-table* 2258)
)
((= v1-61 13)
((= v1-61 (pat-material crwood))
(-> *part-id-table* 2259)
)
((or (= v1-61 18) (= v1-61 8))
((or (= v1-61 (pat-material tube)) (= v1-61 (pat-material pcmetal)))
(-> *part-id-table* 2260)
)
((or (= v1-61 16) (= v1-61 21))
((or (= v1-61 (pat-material metal)) (= v1-61 (pat-material rotate)))
(-> *part-id-table* 2335)
)
((= v1-61 1)
((= v1-61 (pat-material ice))
(-> *part-id-table* 2261)
)
((= v1-61 9)
((= v1-61 (pat-material snow))
(-> *part-id-table* 2262)
)
((= v1-61 10)
((= v1-61 (pat-material deepsnow))
(-> *part-id-table* 2263)
)
((= v1-61 14)
((= v1-61 (pat-material gravel))
(-> *part-id-table* 2264)
)
((= v1-61 15)
((= v1-61 (pat-material dirt))
(-> *part-id-table* 2265)
)
((zero? v1-61)
((= v1-61 (pat-material stone))
(-> *part-id-table* 2266)
)
((= v1-61 3)
((= v1-61 (pat-material waterbottom))
(-> *part-id-table* 2267)
)
((= v1-61 4)
((= v1-61 (pat-material tar))
(-> *part-id-table* 2268)
)
((= v1-61 17)
((= v1-61 (pat-material straw))
(-> *part-id-table* 2269)
)
((= v1-61 19)
((= v1-61 (pat-material swamp))
(-> *part-id-table* 2270)
)
((= v1-61 22)
((= v1-61 (pat-material neutral))
(-> *part-id-table* 2774)
)
(else
@@ -1083,7 +1083,7 @@
;; definition for method 12 of type effect-control
;; Used lq/sq
(defmethod dummy-12 effect-control ((obj effect-control) (arg0 symbol) (arg1 basic) (arg2 int) (arg3 basic) (arg4 sound-name))
(defmethod dummy-12 effect-control ((obj effect-control) (arg0 symbol) (arg1 float) (arg2 int) (arg3 basic) (arg4 sound-name))
(local-vars
(r0-0 uint128)
(v1-10 uint128)
@@ -1114,16 +1114,9 @@
(t0-1 #f)
(t1-1 (the-as (pointer int) (& sv-112)))
(t2-0 *res-static-buf*)
(a1-7 (t9-3
(the-as res-lump sv-144)
a1-6
a2-1
(the-as float a3-1)
(the-as pointer t0-1)
(the-as (pointer res-tag) t1-1)
t2-0
)
)
(a1-7
(t9-3 (the-as res-lump sv-144) a1-6 a2-1 a3-1 (the-as pointer t0-1) (the-as (pointer res-tag) t1-1) t2-0)
)
)
(when a1-7
(let ((t9-4 effect-param->sound-spec)
@@ -1182,7 +1175,7 @@
)
((logtest? (-> self control root-prim prim-core action) (collide-action ca-9))
(sound-play-by-name
(sound-name-with-material 'zoom-land (the-as int (-> self control ground-pat)) "")
(sound-name-with-material 'zoom-land (-> self control ground-pat) "")
(new-sound-id)
(the int
(* 10.24 (* 100.0 (the float (the int (* 10.24 (* 0.000016276043 (-> self control ground-impact-vel)))))))
+31 -50
View File
@@ -1205,51 +1205,33 @@
;; definition for method 40 of type process-taskable
;; INFO: Return type mismatch int vs none.
(defmethod dummy-40 process-taskable ((obj process-taskable) (arg0 object) (arg1 skeleton-group) (arg2 int) (arg3 int) (arg4 vector) (arg5 int))
(let ((s3-0 arg2)
(s4-0 arg3)
(s0-0 arg4)
(s5-0 arg5)
)
(stack-size-set! (-> obj main-thread) 512)
(initialize-collision obj s3-0 s0-0)
(process-drawable-from-entity! obj (the-as entity-actor arg0))
(let* ((a0-4 obj)
(t9-3 (method-of-object a0-4 initialize-skeleton))
(a2-2 '())
(a1-4 arg1)
)
(t9-3 a0-4 a1-4 a2-2)
(set! (-> obj shadow-backup) (-> obj draw shadow))
(logior! (-> obj skel status) 256)
(set! (-> obj root-override pause-adjust-distance) -122880.0)
(set! (-> obj fuel-cell-anim) (fuel-cell-pick-anim obj))
(set! (-> obj draw origin-joint-index) (the-as uint s3-0))
(set! (-> obj draw shadow-joint-index) (the-as uint s3-0))
(set! (-> obj center-joint-index) s3-0)
(set! (-> obj draw-bounds-y-offset) (-> obj draw bounds y))
(set! (-> obj have-flava) #f)
(set! (-> obj music) #f)
(set! (-> obj have-music) #f)
(set! (-> obj cam-joint-index) s4-0)
(set! (-> obj cell-x) (the-as handle #f))
(set! (-> obj cell-for-task) (game-task none))
(set! (-> obj camera) (the-as handle #f))
(set! (-> obj will-talk) #t)
(set! (-> obj talk-message) (the-as uint 260))
(set! (-> obj last-talk) (the-as uint 0))
(set! (-> obj bounce-away) #t)
(set! (-> obj been-kicked) #f)
(set! (-> obj neck-joint-index) s5-0)
(set! (-> obj cur-trans-hook) nothing)
(dummy-9
(-> obj ambient)
(the-as vector a1-4)
(the-as int a2-2)
(the-as float arg2)
(the-as process-drawable arg3)
)
)
)
(stack-size-set! (-> obj main-thread) 512)
(initialize-collision obj arg2 arg4)
(process-drawable-from-entity! obj (the-as entity-actor arg0))
(initialize-skeleton obj arg1 '())
(set! (-> obj shadow-backup) (-> obj draw shadow))
(logior! (-> obj skel status) 256)
(set! (-> obj root-override pause-adjust-distance) -122880.0)
(set! (-> obj fuel-cell-anim) (fuel-cell-pick-anim obj))
(set! (-> obj draw origin-joint-index) (the-as uint arg2))
(set! (-> obj draw shadow-joint-index) (the-as uint arg2))
(set! (-> obj center-joint-index) arg2)
(set! (-> obj draw-bounds-y-offset) (-> obj draw bounds y))
(set! (-> obj have-flava) #f)
(set! (-> obj music) #f)
(set! (-> obj have-music) #f)
(set! (-> obj cam-joint-index) arg3)
(set! (-> obj cell-x) (the-as handle #f))
(set! (-> obj cell-for-task) (game-task none))
(set! (-> obj camera) (the-as handle #f))
(set! (-> obj will-talk) #t)
(set! (-> obj talk-message) (the-as uint 260))
(set! (-> obj last-talk) (the-as uint 0))
(set! (-> obj bounce-away) #t)
(set! (-> obj been-kicked) #f)
(set! (-> obj neck-joint-index) arg5)
(set! (-> obj cur-trans-hook) nothing)
(dummy-9 (-> obj ambient))
(set! (-> obj event-hook) (-> (method-of-object obj idle) event))
(set! (-> obj draw shadow-ctrl) (new 'process 'shadow-control 0.0 0.0 614400.0 (the-as float 60) 245760.0))
(dummy-52 obj)
@@ -1282,7 +1264,7 @@
;; definition for method 9 of type ambient-control
;; INFO: Return type mismatch int vs none.
(defmethod dummy-9 ambient-control ((obj ambient-control) (arg0 vector) (arg1 int) (arg2 float) (arg3 process-drawable))
(defmethod dummy-9 ambient-control ((obj ambient-control))
(set! (-> obj last-ambient-time) (-> *display* game-frame-counter))
0
(none)
@@ -1327,11 +1309,10 @@
)
;; definition for function othercam-calc
;; INFO: Return type mismatch float vs none.
(defun othercam-calc ((arg0 float))
(let ((f0-3 (* 2.0 (atan (/ 14.941477 (* 20.3 arg0)) 1.0))))
(set! (-> *camera-other-fov* data) f0-3)
f0-3
)
(set! (-> *camera-other-fov* data) (* 2.0 (atan (/ 14.941477 (* 20.3 arg0)) 1.0)))
(none)
)
;; failed to figure out what this is:
+2 -1
View File
@@ -68,11 +68,12 @@
(last-ambient string :offset-assert 8)
(last-ambient-id sound-id :offset-assert 12)
)
:pack-me
:method-count-assert 12
:size-assert #x10
:flag-assert #xc00000010
(:methods
(dummy-9 (_type_ vector int float process-drawable) none 9)
(dummy-9 (_type_) none 9)
(TODO-RENAME-10 (_type_ vector int float process-drawable) vector 10)
(play-ambient (_type_ string symbol vector) symbol 11)
)
+6 -10
View File
@@ -528,7 +528,7 @@
(dummy-12
(-> self skel effect)
(-> self control unknown-symbol30)
(the-as basic -1.0)
(the-as float -1.0)
74
#f
(static-sound-name "spin-hit")
@@ -622,7 +622,7 @@
(dummy-12
(-> self skel effect)
(-> self control unknown-symbol30)
(the-as basic -1.0)
(the-as float -1.0)
23
#f
(static-sound-name "punch-hit")
@@ -633,7 +633,7 @@
(dummy-12
(-> self skel effect)
(-> self control unknown-symbol30)
(the-as basic -1.0)
(the-as float -1.0)
74
#f
(static-sound-name "punch-hit")
@@ -728,7 +728,7 @@
(dummy-12
(-> self skel effect)
(-> self control unknown-symbol30)
(the-as basic -1.0)
(the-as float -1.0)
23
#f
(static-sound-name "uppercut-hit")
@@ -741,7 +741,7 @@
(dummy-12
(-> self skel effect)
(-> self control unknown-symbol30)
(the-as basic -1.0)
(the-as float -1.0)
23
#f
(static-sound-name "flop-hit")
@@ -752,7 +752,7 @@
(dummy-12
(-> self skel effect)
(-> self control unknown-symbol30)
(the-as basic -1.0)
(the-as float -1.0)
23
#f
(static-sound-name "punch-hit")
@@ -1119,7 +1119,3 @@ target-standard-event-handler
0
(none)
)
+3 -2
View File
@@ -1524,7 +1524,7 @@
)
;; definition for method 29 of type citb-exit-plat
;; INFO: Return type mismatch int vs symbol.
;; INFO: Return type mismatch int vs none.
(defmethod can-target-move? citb-exit-plat ((obj citb-exit-plat))
(process-entity-status! obj (entity-perm-status bit-7) #t)
(logclear! (-> obj mask) (process-mask actor-pause))
@@ -1557,5 +1557,6 @@
)
(set! (-> obj allow-auto-kill) #f)
(process-entity-status! obj (entity-perm-status bit-3) #t)
(the-as symbol 0)
0
(none)
)
+4 -3
View File
@@ -28,7 +28,7 @@
(can-activate? (_type_) symbol 26)
(TODO-RENAME-27 (_type_) none 27)
(TODO-RENAME-28 (_type_) collide-shape-moving 28)
(can-target-move? (_type_) symbol 29)
(can-target-move? (_type_) none 29)
(should-teleport? (_type_) symbol 30)
(TODO-RENAME-31 (_type_) none 31)
(TODO-RENAME-32 (_type_) none 32)
@@ -466,9 +466,10 @@
)
;; definition for method 29 of type plat-button
;; INFO: Return type mismatch int vs symbol.
;; INFO: Return type mismatch int vs none.
(defmethod can-target-move? plat-button ((obj plat-button))
(the-as symbol 0)
0
(none)
)
;; definition for method 27 of type plat-button
+11 -11
View File
@@ -63,19 +63,19 @@
(des-cam-entity string :offset-assert 392)
(use-interesting symbol :offset-assert 396)
(ignore-camera symbol :offset-assert 400)
(ambient ambient-control :offset 408)
(yellow-gun joint-mod :offset 424)
(palette-val float :offset 428)
(looping-sound ambient-sound 4 :offset 432)
(dda robotboss-dda :offset 448)
(valid-frames int32 :offset 452)
(skip-cut symbol :offset 456)
(keep-charging symbol :offset 460)
(ambient ambient-control :inline :offset-assert 408)
(yellow-gun joint-mod :offset-assert 424)
(palette-val float :offset-assert 428)
(looping-sound ambient-sound 4 :offset-assert 432)
(dda robotboss-dda :offset-assert 448)
(valid-frames int32 :offset-assert 452)
(skip-cut symbol :offset-assert 456)
(keep-charging symbol :offset-assert 460)
)
:heap-base #x16
:heap-base #x160
:method-count-assert 21
:size-assert #x1d0
:flag-assert #x15001601d0
:flag-assert #x15016001d0
(:methods
(ease-loc-t (_type_) float 20)
)
@@ -126,7 +126,7 @@
(format #t "~T~Tdes-cam-entity: ~A~%" (-> obj des-cam-entity))
(format #t "~T~Tuse-interesting: ~A~%" (-> obj use-interesting))
(format #t "~T~Tignore-camera: ~A~%" (-> obj ignore-camera))
(format #t "~T~Tambient: #<ambient-control @ #x~X>~%" (&-> obj ambient))
(format #t "~T~Tambient: #<ambient-control @ #x~X>~%" (-> obj ambient))
(format #t "~T~Tyellow-gun: ~A~%" (-> obj yellow-gun))
(format #t "~T~Tpalette-val: ~f~%" (-> obj palette-val))
(format #t "~T~Tlooping-sound[4] @ #x~X~%" (-> obj looping-sound))
+2 -2
View File
@@ -760,7 +760,7 @@
;; definition for function greenshot-init-by-other
;; INFO: Return type mismatch object vs none.
;; Used lq/sq
(defbehavior greenshot-init-by-other greenshot ((arg0 vector) (arg1 vector) (arg2 float) (arg3 uint) (arg4 float))
(defbehavior greenshot-init-by-other greenshot ((arg0 vector) (arg1 vector) (arg2 float) (arg3 int))
(let ((s2-0 (new 'process 'collide-shape-moving self (collide-list-enum usually-hit-by-player))))
(set! (-> s2-0 dynam) (copy *standard-dynamics* 'process))
(set! (-> s2-0 reaction) default-collision-reaction)
@@ -782,7 +782,7 @@
(initialize-skeleton self *greenshot-sg* '())
(logclear! (-> self mask) (process-mask actor-pause))
(arcing-shot-setup arg0 arg1 arg2)
(set! (-> self flight-time) (the-as int arg3))
(set! (-> self flight-time) arg3)
(set! (-> self part) (create-launch-control (-> *part-group-id-table* 664) self))
(logior! (-> self draw status) (draw-status drwf01))
(go greenshot-idle)
+309 -440
View File
@@ -105,7 +105,162 @@
)
;; definition for function robotboss-always-trans
;; ERROR: function was not converted to expressions. Cannot decompile.
;; INFO: Return type mismatch object vs none.
(defbehavior robotboss-always-trans robotboss ((arg0 (state robotboss)))
(when (-> self blue-smoke)
(let ((s5-0 (new 'stack-no-clear 'vector)))
(vector<-cspace! s5-0 (-> self node-list data 7))
(spawn (-> self particle 2) s5-0)
)
)
(when (-> self red-smoke)
(let ((s5-1 (new 'stack-no-clear 'vector)))
(vector<-cspace! s5-1 (-> self node-list data 47))
(spawn (-> self particle 3) s5-1)
(vector<-cspace! s5-1 (-> self node-list data 51))
(spawn (-> self particle 3) s5-1)
)
)
(when (-> self yellow-smoke)
(let ((s5-2 (new 'stack-no-clear 'vector)))
(vector<-cspace! s5-2 (-> self node-list data 27))
(spawn (-> self particle 4) s5-2)
)
)
(let* ((f0-1 (- 0.0 (-> self palette-val)))
(f0-2 (if (< 0.0 f0-1)
(fmin 0.1 f0-1)
(fmax -0.1 f0-1)
)
)
)
(+! (-> self palette-val) f0-2)
)
(set! (-> *palette-fade-controls* control 2 fade) (-> self palette-val))
(b! (not (-> self ignore-camera)) cfg-11 :delay (empty-form))
(b! #t cfg-66 :delay (nop!))
(label cfg-11)
(b! *target* cfg-13 :delay (empty-form))
(b! #t cfg-66 :delay (nop!))
(label cfg-13)
(let ((a1-8 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-8 from) self)
(set! (-> a1-8 num-params) 1)
(set! (-> a1-8 message) 'query-state)
(set! (-> a1-8 param 0) (the-as uint cam-eye))
(b! (not (send-event-function *camera* a1-8)) cfg-15 :delay (empty-form))
)
(b! #t cfg-66 :delay (nop!))
(label cfg-15)
(let ((a1-9 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-9 from) self)
(set! (-> a1-9 num-params) 1)
(set! (-> a1-9 message) 'query-state)
(set! (-> a1-9 param 0) (the-as uint cam-launcher-longfall))
(b! (not (send-event-function *camera* a1-9)) cfg-19 :delay (empty-form))
)
(when (-> *camera* cam-entity)
(let ((s5-4 *camera-base-mode*))
(set! *camera-base-mode* cam-launcher-longfall)
(send-event *camera* 'clear-entity)
(set! *camera-base-mode* s5-4)
)
)
(b! #t cfg-66 :delay (nop!))
(label cfg-19)
(b!
(not
(and (-> self des-cam-entity)
(or (< (vector-vector-xz-distance (-> self entity extra trans) (target-pos 0)) 188416.0)
(and *target*
(>= 290816.0 (vector-vector-xz-distance (-> self root-override trans) (-> *target* control trans)))
)
)
)
)
cfg-37
:delay
(empty-form)
)
(if (or (not (-> *camera* cam-entity))
(not (string=
(-> self des-cam-entity)
(res-lump-struct (-> *camera* cam-entity) 'name string :time (the-as float -1000000000.0))
)
)
)
(send-event *camera* 'change-to-entity-by-name (-> self des-cam-entity))
)
(b! #t cfg-66 :delay (nop!))
(label cfg-37)
(b!
(not
(or (< (vector-vector-xz-distance (-> self entity extra trans) (target-pos 0)) 73728.0)
(and *target*
(>= 290816.0 (vector-vector-xz-distance (-> self root-override trans) (-> *target* control trans)))
)
)
)
cfg-49
:delay
(empty-form)
)
(let ((a1-18 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-18 from) self)
(set! (-> a1-18 num-params) 1)
(set! (-> a1-18 message) 'query-state)
(set! (-> a1-18 param 0) (the-as uint cam-robotboss))
(when (not (send-event-function *camera* a1-18))
(send-event *camera* 'change-state cam-robotboss 300)
(send-event *camera* 'clear-entity)
)
)
(b! #t cfg-66 :delay (nop!))
(label cfg-49)
(when (and (< 196608.0 (vector-vector-xz-distance (-> self entity extra trans) (target-pos 0)))
(< (vector-vector-xz-distance (-> self entity extra trans) (target-pos 0)) 614400.0)
(not (and *target*
(>= 299008.0 (vector-vector-xz-distance (-> self root-override trans) (-> *target* control trans)))
)
)
)
(let ((a1-24 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-24 from) self)
(set! (-> a1-24 num-params) 1)
(set! (-> a1-24 message) 'query-state)
(set! (-> a1-24 param 0) (the-as uint cam-string))
(when (not (send-event-function *camera* a1-24))
(send-event *camera* 'point-of-interest #f)
(send-event *camera* 'force-blend 300)
(send-event *camera* 'clear-entity)
(send-event *camera* 'change-state cam-string 300)
)
)
)
(label cfg-66)
(let ((a1-29 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-29 from) self)
(set! (-> a1-29 num-params) 1)
(set! (-> a1-29 message) 'query-state)
(set! (-> a1-29 param 0) (the-as uint cam-string))
(cond
((send-event-function *camera* a1-29)
)
((-> self use-interesting)
(let ((s5-10 (new 'stack-no-clear 'vector)))
(vector<-cspace! s5-10 (-> self node-list data 87))
(send-event *camera* 'point-of-interest s5-10)
)
)
)
)
(when (and arg0 *debug-segment* (cpad-pressed? 1 x))
(logclear! (-> *cpad-list* cpads 1 button0-abs 0) (pad-buttons x))
(logclear! (-> *cpad-list* cpads 1 button0-rel 0) (pad-buttons x))
(go arg0)
)
(none)
)
;; definition for function robotboss-shooting-trans
;; INFO: Return type mismatch object vs none.
@@ -466,7 +621,7 @@
)
:trans
(behavior ()
(robotboss-always-trans (the-as state #f))
(robotboss-always-trans (the-as (state robotboss) #f))
(spool-push *art-control* "green-sagecage-outro-beat-boss-a" 0 self (the-as float -1.0))
(robotboss-position)
(none)
@@ -515,12 +670,7 @@
(until (ja-done? 0)
(when (and (>= (ja-frame-num 0) 15.0) (< (-> self children-spawned) 1))
(robotboss-darkecobomb (new 'static 'vector :y 40960.0 :z 81920.0) (-> self dda yellow-bomb-time))
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM20"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM20" #t (the-as vector #f))
)
(suspend)
(let ((a0-10 (-> self skel root-channel 0)))
@@ -644,12 +794,7 @@
(until (ja-done? 0)
(when (and (>= (ja-frame-num 0) 15.0) (< (-> self children-spawned) 4))
(robotboss-darkecobomb (new 'static 'vector :x -81920.0 :y 40960.0) (+ -450.0 (-> self dda yellow-bomb-time)))
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"MAI-AM03"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "MAI-AM03" #t (the-as vector #f))
(set! (-> self des-cam-entity) "camera-365")
)
(suspend)
@@ -965,17 +1110,12 @@
(set! (-> self loc-t-start) (-> *display* game-frame-counter))
(set! (-> self loc-t-duration) 1200)
(set! (-> self desired-pool-y) -16384.0)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM01"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM01" #t (the-as vector #f))
(none)
)
:trans
(behavior ()
(robotboss-always-trans (the-as state #f))
(robotboss-always-trans (the-as (state robotboss) #f))
(spool-push *art-control* "finalbosscam-white-eco" 0 self (the-as float -1.0))
(if (>= (-> self loc-t) 1.0)
(go robotboss-white-eco-movie)
@@ -1150,36 +1290,16 @@
)
(cond
((< 0.75 f0-2)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM10"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM10" #t (the-as vector #f))
)
((< 0.5 f0-2)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM12"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM12" #t (the-as vector #f))
)
((< 0.25 f0-2)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM15"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM15" #t (the-as vector #f))
)
(else
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"MAI-AM03"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "MAI-AM03" #t (the-as vector #f))
)
)
)
@@ -1190,18 +1310,8 @@
(f0-5 (+ -1.0 (the-as float v1-14)))
)
(if (< 0.5 f0-5)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM14"
#t
(the-as vector #f)
)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"MAI-AM02"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM14" #t (the-as vector #f))
(play-ambient (-> self ambient) "MAI-AM02" #t (the-as vector #f))
)
)
)
@@ -1326,20 +1436,8 @@
)
)
((and (> (-> self hits-to-go) 0) (-> self took-hit))
(if (not
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM17"
#t
(the-as vector #f)
)
)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"MAI-AM06"
#t
(the-as vector #f)
)
(if (not (play-ambient (-> self ambient) "GOL-AM17" #t (the-as vector #f)))
(play-ambient (-> self ambient) "MAI-AM06" #t (the-as vector #f))
)
(set! (-> self took-hit) #f)
(ja-channel-push! 1 30)
@@ -1541,52 +1639,22 @@
)
(cond
((< 0.8333333 f0-29)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM04"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM04" #t (the-as vector #f))
)
((< 0.6666667 f0-29)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM09"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM09" #t (the-as vector #f))
)
((< 0.5 f0-29)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM08"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM08" #t (the-as vector #f))
)
((< 0.33333334 f0-29)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM10"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM10" #t (the-as vector #f))
)
((< 0.16666667 f0-29)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"MAI-AM03"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "MAI-AM03" #t (the-as vector #f))
)
(else
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"MAI-AM02"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "MAI-AM02" #t (the-as vector #f))
)
)
)
@@ -2252,36 +2320,16 @@
)
(cond
((< 0.75 f0-2)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM10"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM10" #t (the-as vector #f))
)
((< 0.5 f0-2)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM12"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM12" #t (the-as vector #f))
)
((< 0.25 f0-2)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM15"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM15" #t (the-as vector #f))
)
(else
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"MAI-AM03"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "MAI-AM03" #t (the-as vector #f))
)
)
)
@@ -2292,18 +2340,8 @@
(f0-5 (+ -1.0 (the-as float v1-14)))
)
(if (< 0.5 f0-5)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM14"
#t
(the-as vector #f)
)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"MAI-AM01"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM14" #t (the-as vector #f))
(play-ambient (-> self ambient) "MAI-AM01" #t (the-as vector #f))
)
)
)
@@ -2446,20 +2484,8 @@
)
)
((and (> (-> self hits-to-go) 0) (-> self took-hit))
(if (not
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM17"
#t
(the-as vector #f)
)
)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"MAI-AM06"
#t
(the-as vector #f)
)
(if (not (play-ambient (-> self ambient) "GOL-AM17" #t (the-as vector #f)))
(play-ambient (-> self ambient) "MAI-AM06" #t (the-as vector #f))
)
(set! (-> self took-hit) #f)
(ja-channel-push! 1 30)
@@ -2629,52 +2655,22 @@
)
(cond
((< 0.8333333 f0-33)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM04"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM04" #t (the-as vector #f))
)
((< 0.6666667 f0-33)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM05"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM05" #t (the-as vector #f))
)
((< 0.5 f0-33)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM08"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM08" #t (the-as vector #f))
)
((< 0.33333334 f0-33)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM10"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM10" #t (the-as vector #f))
)
((< 0.16666667 f0-33)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"MAI-AM03"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "MAI-AM03" #t (the-as vector #f))
)
(else
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"MAI-AM02"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "MAI-AM02" #t (the-as vector #f))
)
)
)
@@ -2945,12 +2941,7 @@
(when (and (>= (ja-frame-num 0) 15.0) (< (-> self children-spawned) 1))
(robotboss-darkecobomb (new 'static 'vector :y 32768.0) (-> self dda green-bomb-time))
(set! (-> self des-cam-entity) "camera-365")
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM11"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM11" #t (the-as vector #f))
)
(suspend)
(let ((a0-10 (-> self skel root-channel 0)))
@@ -3022,12 +3013,7 @@
(set! (-> self loc-t-start) (-> *display* game-frame-counter))
(set! (-> self loc-t-duration) 900)
(set! (-> self desired-pool-y) -24576.0)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"MAI-AM01"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "MAI-AM01" #t (the-as vector #f))
(none)
)
:trans
@@ -3134,10 +3120,8 @@
;; definition for function robotboss-greenshot
;; INFO: Return type mismatch sound-id vs none.
;; WARN: Function may read a register that is not set: t2
;; Used lq/sq
(defbehavior robotboss-greenshot robotboss ((arg0 vector) (arg1 basic) (arg2 basic) (arg3 symbol))
(local-vars (t2-0 none))
(defbehavior robotboss-greenshot robotboss ((arg0 vector) (arg1 float) (arg2 int) (arg3 symbol))
(+! (-> self children-spawned) 1)
(let ((gp-0 (new 'stack-no-clear 'vector)))
(let ((s2-0 (new 'stack-no-clear 'vector)))
@@ -3150,7 +3134,7 @@
(let ((t9-2 (method-of-type greenshot activate)))
(t9-2 (the-as greenshot s1-1) self 'greenshot (the-as pointer #x70004000))
)
(run-now-in-process s1-1 greenshot-init-by-other gp-0 s2-0 arg1 arg2 t2-0)
(run-now-in-process s1-1 greenshot-init-by-other gp-0 s2-0 arg1 arg2)
(-> s1-1 ppointer)
)
)
@@ -3205,36 +3189,16 @@
)
(cond
((< 0.75 f0-2)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM10"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM10" #t (the-as vector #f))
)
((< 0.5 f0-2)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM12"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM12" #t (the-as vector #f))
)
((< 0.25 f0-2)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM15"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM15" #t (the-as vector #f))
)
(else
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"MAI-AM03"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "MAI-AM03" #t (the-as vector #f))
)
)
)
@@ -3246,36 +3210,16 @@
)
(cond
((< 0.75 f0-5)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"MAI-AM02"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "MAI-AM02" #t (the-as vector #f))
)
((< 0.5 f0-5)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM03"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM03" #t (the-as vector #f))
)
((< 0.25 f0-5)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM14"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM14" #t (the-as vector #f))
)
(else
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM02"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM02" #t (the-as vector #f))
)
)
)
@@ -3362,39 +3306,39 @@
(robotboss-always-trans robotboss-green-dark-bomb)
(cond
((and (>= (- (-> *display* game-frame-counter) (-> self state-time)) 120) (< (-> self children-spawned) 1))
(robotboss-greenshot (new 'static 'vector) (the-as basic 24576.0) (the-as basic 600) #t)
(robotboss-greenshot (new 'static 'vector) (the-as float 24576.0) 600 #t)
(ja-channel-push! 1 60)
(let ((v1-9 (-> self skel root-channel 0)))
(set! (-> v1-9 frame-group) (the-as art-joint-anim (-> self draw art-group data 11)))
)
)
((and (>= (- (-> *display* game-frame-counter) (-> self state-time)) 360) (< (-> self children-spawned) 3))
(robotboss-greenshot (new 'static 'vector :x 8192.0) (the-as basic 16384.0) (the-as basic 600) #t)
(robotboss-greenshot (new 'static 'vector :z 8192.0) (the-as basic 32768.0) (the-as basic 660) #f)
(robotboss-greenshot (new 'static 'vector :x 8192.0) (the-as float 16384.0) 600 #t)
(robotboss-greenshot (new 'static 'vector :z 8192.0) (the-as float 32768.0) 660 #f)
(ja-channel-push! 1 60)
(let ((v1-20 (-> self skel root-channel 0)))
(set! (-> v1-20 frame-group) (the-as art-joint-anim (-> self draw art-group data 11)))
)
)
((and (>= (- (-> *display* game-frame-counter) (-> self state-time)) 780) (< (-> self children-spawned) 6))
(robotboss-greenshot (new 'static 'vector :z 12288.0) (the-as basic 20480.0) (the-as basic 600) #t)
(robotboss-greenshot (new 'static 'vector :x 8192.0) (the-as basic 8192.0) (the-as basic 660) #f)
(robotboss-greenshot (new 'static 'vector) (the-as basic 36864.0) (the-as basic 720) #f)
(robotboss-greenshot (new 'static 'vector :z 12288.0) (the-as float 20480.0) 600 #t)
(robotboss-greenshot (new 'static 'vector :x 8192.0) (the-as float 8192.0) 660 #f)
(robotboss-greenshot (new 'static 'vector) (the-as float 36864.0) 720 #f)
(ja-channel-push! 1 60)
(let ((v1-32 (-> self skel root-channel 0)))
(set! (-> v1-32 frame-group) (the-as art-joint-anim (-> self draw art-group data 11)))
)
)
((and (>= (- (-> *display* game-frame-counter) (-> self state-time)) 1200) (< (-> self children-spawned) 7))
(robotboss-greenshot (new 'static 'vector) (the-as basic 24576.0) (the-as basic 600) #t)
(robotboss-greenshot (new 'static 'vector) (the-as float 24576.0) 600 #t)
(ja-channel-push! 1 60)
(let ((v1-42 (-> self skel root-channel 0)))
(set! (-> v1-42 frame-group) (the-as art-joint-anim (-> self draw art-group data 11)))
)
)
((and (>= (- (-> *display* game-frame-counter) (-> self state-time)) 1650) (< (-> self children-spawned) 9))
(robotboss-greenshot (new 'static 'vector) (the-as basic 12288.0) (the-as basic 600) #t)
(robotboss-greenshot (new 'static 'vector :x 4096.0 :z 12288.0) (the-as basic 32768.0) (the-as basic 600) #f)
(robotboss-greenshot (new 'static 'vector) (the-as float 12288.0) 600 #t)
(robotboss-greenshot (new 'static 'vector :x 4096.0 :z 12288.0) (the-as float 32768.0) 600 #f)
(ja-channel-push! 1 60)
(let ((v1-53 (-> self skel root-channel 0)))
(set! (-> v1-53 frame-group) (the-as art-joint-anim (-> self draw art-group data 11)))
@@ -3517,12 +3461,7 @@
(set! (-> self loc-t-start) (-> *display* game-frame-counter))
(set! (-> self loc-t-duration) 900)
(set! (-> self desired-pool-y) -26624.0)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM01"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM01" #t (the-as vector #f))
(set-setting! *setting-control* self 'sound-flava #f (the-as float 40.0) 47)
(none)
)
@@ -3709,12 +3648,7 @@
(when (and (>= (ja-frame-num 0) 15.0) (< (-> self children-spawned) 1))
(robotboss-darkecobomb (new 'static 'vector :y 32768.0) (the-as float 3600.0))
(set! (-> self des-cam-entity) "camera-365")
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"MAI-AM04"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "MAI-AM04" #t (the-as vector #f))
)
(suspend)
(let ((a0-10 (-> self skel root-channel 0)))
@@ -4199,12 +4133,7 @@
(robotboss-shooting-trans 9)
(cond
((zero? (-> self hits-to-go))
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM06"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM06" #t (the-as vector #f))
(robotboss-blue-done)
(set! (-> self took-hit) #f)
(+! (-> self hits-to-go) -1)
@@ -4244,20 +4173,8 @@
)
)
((-> self took-hit)
(if (not
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM17"
#t
(the-as vector #f)
)
)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"MAI-AM06"
#t
(the-as vector #f)
)
(if (not (play-ambient (-> self ambient) "GOL-AM17" #t (the-as vector #f)))
(play-ambient (-> self ambient) "MAI-AM06" #t (the-as vector #f))
)
(set! (-> self took-hit) #f)
(ja-channel-push! 1 30)
@@ -4281,57 +4198,26 @@
)
(robotboss-blue-beam 8 #t)
(robotboss-blue-beam 9 #f)
(when ((method-of-type ambient-control TODO-RENAME-10)
(the-as ambient-control (&-> self ambient))
(new 'stack-no-clear 'vector)
3000
(the-as float 327680.0)
self
)
(when (TODO-RENAME-10 (-> self ambient) (new 'stack-no-clear 'vector) 3000 (the-as float 327680.0) self)
(let* ((v1-73 (/ (the-as int (rand-uint31-gen *random-generator*)) 256))
(v1-74 (the-as number (logior #x3f800000 v1-73)))
(f0-2 (+ -1.0 (the-as float v1-74)))
)
(cond
((< 0.8 f0-2)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM02"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM02" #t (the-as vector #f))
)
((< 0.6 f0-2)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM10"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM10" #t (the-as vector #f))
)
((< 0.4 f0-2)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"MAI-AM08"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "MAI-AM08" #t (the-as vector #f))
)
((< 0.2 f0-2)
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"MAI-AM03"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "MAI-AM03" #t (the-as vector #f))
)
(else
((method-of-type ambient-control play-ambient)
(the-as ambient-control (&-> self ambient))
"GOL-AM07"
#t
(the-as vector #f)
)
(play-ambient (-> self ambient) "GOL-AM07" #t (the-as vector #f))
)
)
)
@@ -4670,113 +4556,96 @@
(set! (-> obj nav) (new 'process 'nav-control (-> obj root-override) 16 (the-as float 40960.0)))
(logior! (-> obj nav flags) (nav-control-flags display-marks bit3 bit5 bit6 bit7))
(set! (-> obj root-override nav-flags) (logand -2 (-> obj root-override nav-flags)))
(let ((t9-48 (method-of-type path-control new))
(a0-87 'process)
(a1-47 path-control)
(a2-23 obj)
(a3-22 'path)
(t0-21 0.0)
)
(set! (-> obj path) (t9-48 a0-87 a1-47 a2-23 a3-22 (the-as float t0-21)))
(logior! (-> obj path flags) (path-control-flag display draw-line draw-point draw-text))
(logclear! (-> obj mask) (process-mask actor-pause))
(set! (-> obj root-override pause-adjust-distance) 1228800.0)
(set-vector! (-> obj old-loc) 8192.0 0.0 245760.0 1.0)
(set! (-> obj desired-loc quad) (-> obj old-loc quad))
(set! (-> obj loc-t) 1.0)
(set! (-> obj loc-t-duration) 1)
(set! (-> obj loc-t-start) 0)
(set! (-> obj shot-attractor) (the-as handle #f))
(set! (-> obj white-eco) (the-as handle #f))
(set! (-> obj desired-pool-y) -30720.0)
(set! (-> obj des-cam-entity) #f)
(set! (-> obj use-interesting) #f)
(set! (-> obj ignore-camera) #f)
(dotimes (v1-211 13)
(set! (-> obj alts v1-211) #f)
)
(let ((s5-1 (entity-actor-count (-> obj entity) 'alt-actor)))
(dotimes (s4-1 (min 13 s5-1))
(set! (-> obj alts s4-1) (entity-actor-lookup (-> obj entity) 'alt-actor s4-1))
)
)
(set! (-> obj particle 0) (create-launch-control (-> *part-group-id-table* 636) obj))
(set! (-> obj particle 1) (create-launch-control (-> *part-group-id-table* 637) obj))
(set! (-> obj particle 2) (create-launch-control (-> *part-group-id-table* 645) obj))
(set! (-> obj particle 3) (create-launch-control (-> *part-group-id-table* 650) obj))
(set! (-> obj particle 4) (create-launch-control (-> *part-group-id-table* 654) obj))
(set! (-> obj particle 5) (create-launch-control (-> *part-group-id-table* 646) obj))
(set! (-> obj particle 6) (create-launch-control (-> *part-group-id-table* 651) obj))
(set! (-> obj looping-sound 0) (new
'process
'ambient-sound
(new 'static 'sound-spec
:mask #x80
:num 1.0
:group #x1
:sound-name (static-sound-name "robo-blue-lp")
:volume #x400
:fo-max 80
)
(-> obj root-override trans)
)
)
(set! (-> obj looping-sound 1) (new
'process
'ambient-sound
(new 'static 'sound-spec
:mask #x80
:num 1.0
:group #x1
:sound-name (static-sound-name "eco-torch")
:volume #x400
:fo-max 80
)
(-> obj root-override trans)
)
)
(set! (-> obj looping-sound 2) (new
'process
'ambient-sound
(new 'static 'sound-spec
:mask #x80
:num 1.0
:group #x1
:sound-name (static-sound-name "red-buzz")
:volume #x400
:fo-max 80
)
(-> obj root-override trans)
)
)
(let ((t9-61 (method-of-type ambient-sound new))
(a0-110 'process)
(a1-60 ambient-sound)
(a2-28
(new 'static 'sound-spec
:mask #x80
:num 1.0
:group #x1
:sound-name (static-sound-name "bfg-buzz")
:volume #x400
:fo-max 80
)
)
(a3-26 (-> obj root-override trans))
)
(set! (-> obj looping-sound 3) (t9-61 a0-110 a1-60 a2-28 a3-26))
(set! (-> obj blue-smoke) #f)
(set! (-> obj red-smoke) #f)
(set! (-> obj yellow-smoke) #f)
((method-of-type ambient-control dummy-9)
(the-as ambient-control (&-> obj ambient))
(the-as vector a1-60)
(the-as int a2-28)
(the-as float a3-26)
(the-as process-drawable t0-21)
)
(set! (-> obj path) (new 'process 'path-control obj 'path (the-as float 0.0)))
(logior! (-> obj path flags) (path-control-flag display draw-line draw-point draw-text))
(logclear! (-> obj mask) (process-mask actor-pause))
(set! (-> obj root-override pause-adjust-distance) 1228800.0)
(set-vector! (-> obj old-loc) 8192.0 0.0 245760.0 1.0)
(set! (-> obj desired-loc quad) (-> obj old-loc quad))
(set! (-> obj loc-t) 1.0)
(set! (-> obj loc-t-duration) 1)
(set! (-> obj loc-t-start) 0)
(set! (-> obj shot-attractor) (the-as handle #f))
(set! (-> obj white-eco) (the-as handle #f))
(set! (-> obj desired-pool-y) -30720.0)
(set! (-> obj des-cam-entity) #f)
(set! (-> obj use-interesting) #f)
(set! (-> obj ignore-camera) #f)
(dotimes (v1-211 13)
(set! (-> obj alts v1-211) #f)
)
(let ((s5-1 (entity-actor-count (-> obj entity) 'alt-actor)))
(dotimes (s4-1 (min 13 s5-1))
(set! (-> obj alts s4-1) (entity-actor-lookup (-> obj entity) 'alt-actor s4-1))
)
)
(set! (-> obj particle 0) (create-launch-control (-> *part-group-id-table* 636) obj))
(set! (-> obj particle 1) (create-launch-control (-> *part-group-id-table* 637) obj))
(set! (-> obj particle 2) (create-launch-control (-> *part-group-id-table* 645) obj))
(set! (-> obj particle 3) (create-launch-control (-> *part-group-id-table* 650) obj))
(set! (-> obj particle 4) (create-launch-control (-> *part-group-id-table* 654) obj))
(set! (-> obj particle 5) (create-launch-control (-> *part-group-id-table* 646) obj))
(set! (-> obj particle 6) (create-launch-control (-> *part-group-id-table* 651) obj))
(set! (-> obj looping-sound 0) (new
'process
'ambient-sound
(new 'static 'sound-spec
:mask #x80
:num 1.0
:group #x1
:sound-name (static-sound-name "robo-blue-lp")
:volume #x400
:fo-max 80
)
(-> obj root-override trans)
)
)
(set! (-> obj looping-sound 1) (new
'process
'ambient-sound
(new 'static 'sound-spec
:mask #x80
:num 1.0
:group #x1
:sound-name (static-sound-name "eco-torch")
:volume #x400
:fo-max 80
)
(-> obj root-override trans)
)
)
(set! (-> obj looping-sound 2) (new
'process
'ambient-sound
(new 'static 'sound-spec
:mask #x80
:num 1.0
:group #x1
:sound-name (static-sound-name "red-buzz")
:volume #x400
:fo-max 80
)
(-> obj root-override trans)
)
)
(set! (-> obj looping-sound 3) (new
'process
'ambient-sound
(new 'static 'sound-spec
:mask #x80
:num 1.0
:group #x1
:sound-name (static-sound-name "bfg-buzz")
:volume #x400
:fo-max 80
)
(-> obj root-override trans)
)
)
(set! (-> obj blue-smoke) #f)
(set! (-> obj red-smoke) #f)
(set! (-> obj yellow-smoke) #f)
(dummy-9 (-> obj ambient))
(set! (-> obj yellow-gun) (new 'process 'joint-mod (joint-mod-handler-mode flex-blend) obj 16))
(set-vector! (-> obj yellow-gun twist-max) 8192.0 8192.0 0.0 1.0)
(set! (-> obj yellow-gun up) (the-as uint 1))
+59 -1
View File
@@ -228,7 +228,65 @@
)
;; definition for function target-flut-falling-anim-trans
;; ERROR: function was not converted to expressions. Cannot decompile.
;; INFO: Return type mismatch int vs none.
(defbehavior target-flut-falling-anim-trans target ()
(let ((v1-2 (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
)
)
(b!
(or (= v1-2 (-> self draw art-group data 144)) (= v1-2 (-> self draw art-group data 145)))
cfg-7
:delay
(empty-form)
)
)
(ja-channel-push! 1 99)
(let ((v1-8 (-> self skel root-channel 0)))
(set! (-> v1-8 frame-group) (the-as art-joint-anim (-> self draw art-group data 144)))
)
(b! #t cfg-23 :delay (nop!))
(label cfg-7)
(cond
((and (logtest? (-> self control status) 1) (not (= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 145)
)
)
)
(ja-channel-push! 1 6)
(let ((v1-21 (-> self skel root-channel 0)))
(set! (-> v1-21 frame-group) (the-as art-joint-anim (-> self draw art-group data 145)))
)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 144)
)
(let ((a0-23 (-> self skel root-channel 0)))
(set! (-> a0-23 param 0) 1.0)
(joint-control-channel-group-eval! a0-23 (the-as art-joint-anim #f) num-func-loop!)
)
)
((= (if (> (-> self skel active-channels) 0)
(-> self skel root-channel 0 frame-group)
)
(-> self draw art-group data 145)
)
(let ((a0-28 (-> self skel root-channel 0)))
(set! (-> a0-28 param 0) (the float (+ (-> a0-28 frame-group data 0 length) -1)))
(set! (-> a0-28 param 1) 1.0)
(joint-control-channel-group-eval! a0-28 (the-as art-joint-anim #f) num-func-seek!)
)
)
)
(label cfg-23)
0
(none)
)
;; definition for function target-flut-hit-ground-anim
(defbehavior target-flut-hit-ground-anim target ()
+3 -4
View File
@@ -171,6 +171,7 @@
)
;; definition for method 29 of type jungle-elevator
;; INFO: Return type mismatch symbol vs none.
(defmethod can-target-move? jungle-elevator ((obj jungle-elevator))
(let ((s5-0 (new 'stack-no-clear 'vector)))
(eval-path-curve! (-> obj path) s5-0 0.4 'interp)
@@ -180,8 +181,6 @@
)
(set! (-> obj draw light-index) (the-as uint 255))
(set! (-> obj bidirectional?) #f)
(let ((v0-2 #t))
(set! (-> obj should-grab-player?) v0-2)
v0-2
)
(set! (-> obj should-grab-player?) #t)
(none)
)
+120 -122
View File
@@ -1230,146 +1230,144 @@
;; definition for function peri-beamcam-init-by-other
;; INFO: Return type mismatch object vs (pointer process).
(defun peri-beamcam-init-by-other ((arg0 string))
(with-pp
(let ((gp-0 (entity-by-name "junglecam-1")))
(the-as
(pointer process)
(cond
(gp-0
(cond
((name= arg0 "reflector-mirror-2")
(let ((s5-1 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-1
(let ((t9-3 (method-of-type pov-camera activate)))
(t9-3 (the-as pov-camera s5-1) pp 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-1
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"tower1"
0
#f
'((0 ambient camera "gamcam14"))
)
(-> s5-1 ppointer)
(defbehavior peri-beamcam-init-by-other process ((arg0 string))
(let ((gp-0 (entity-by-name "junglecam-1")))
(the-as
(pointer process)
(cond
(gp-0
(cond
((name= arg0 "reflector-mirror-2")
(let ((s5-1 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-1
(let ((t9-3 (method-of-type pov-camera activate)))
(t9-3 (the-as pov-camera s5-1) self 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-1
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"tower1"
0
#f
'((0 ambient camera "gamcam14"))
)
(-> s5-1 ppointer)
)
)
((name= arg0 "periscope-11")
(let ((s5-2 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-2
(let ((t9-7 (method-of-type pov-camera activate)))
(t9-7 (the-as pov-camera s5-2) pp 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-2
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"tower2"
0
#f
'((0 ambient camera "gamcam15") (0 want-force-vis jungle #t) (0 want-force-vis village1 #t))
)
(-> s5-2 ppointer)
)
((name= arg0 "periscope-11")
(let ((s5-2 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-2
(let ((t9-7 (method-of-type pov-camera activate)))
(t9-7 (the-as pov-camera s5-2) self 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-2
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"tower2"
0
#f
'((0 ambient camera "gamcam15") (0 want-force-vis jungle #t) (0 want-force-vis village1 #t))
)
(-> s5-2 ppointer)
)
)
((name= arg0 "periscope-12")
(let ((s5-3 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-3
(let ((t9-11 (method-of-type pov-camera activate)))
(t9-11 (the-as pov-camera s5-3) pp 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-3
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"tower3"
0
#f
'((0 ambient camera "gamcam16"))
)
(-> s5-3 ppointer)
)
((name= arg0 "periscope-12")
(let ((s5-3 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-3
(let ((t9-11 (method-of-type pov-camera activate)))
(t9-11 (the-as pov-camera s5-3) self 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-3
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"tower3"
0
#f
'((0 ambient camera "gamcam16"))
)
(-> s5-3 ppointer)
)
)
((name= arg0 "periscope-13")
(let ((s5-4 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-4
(let ((t9-15 (method-of-type pov-camera activate)))
(t9-15 (the-as pov-camera s5-4) pp 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-4
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"tower4"
0
#f
'((0 ambient camera "gamcam17"))
)
(-> s5-4 ppointer)
)
((name= arg0 "periscope-13")
(let ((s5-4 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-4
(let ((t9-15 (method-of-type pov-camera activate)))
(t9-15 (the-as pov-camera s5-4) self 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-4
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"tower4"
0
#f
'((0 ambient camera "gamcam17"))
)
(-> s5-4 ppointer)
)
)
((name= arg0 "periscope-14")
(let ((s5-5 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-5
(let ((t9-19 (method-of-type pov-camera activate)))
(t9-19 (the-as pov-camera s5-5) pp 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-5
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"tower5"
0
#f
'((0 ambient camera "gamcam18") (0 want-force-vis jungle #t) (0 want-force-vis village1 #t))
)
(-> s5-5 ppointer)
)
((name= arg0 "periscope-14")
(let ((s5-5 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-5
(let ((t9-19 (method-of-type pov-camera activate)))
(t9-19 (the-as pov-camera s5-5) self 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-5
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"tower5"
0
#f
'((0 ambient camera "gamcam18") (0 want-force-vis jungle #t) (0 want-force-vis village1 #t))
)
(-> s5-5 ppointer)
)
)
((name= arg0 "periscope-15")
(let ((s5-6 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-6
(let ((t9-23 (method-of-type pov-camera activate)))
(t9-23 (the-as pov-camera s5-6) pp 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-6
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"beamcam"
0
#f
'((0 ambient camera "gamcam19")
(0 want-force-vis jungle #t)
(0 want-force-vis village1 #t)
(0 display-level village1 movie)
)
)
(-> s5-6 ppointer)
)
((name= arg0 "periscope-15")
(let ((s5-6 (get-process *default-dead-pool* pov-camera #x4000)))
(when s5-6
(let ((t9-23 (method-of-type pov-camera activate)))
(t9-23 (the-as pov-camera s5-6) self 'pov-camera (the-as pointer #x70004000))
)
(run-now-in-process
s5-6
pov-camera-init-by-other
(-> gp-0 extra trans)
*junglecam-sg*
"beamcam"
0
#f
'((0 ambient camera "gamcam19")
(0 want-force-vis jungle #t)
(0 want-force-vis village1 #t)
(0 display-level village1 movie)
)
)
(-> s5-6 ppointer)
)
)
(else
(format #t "ERROR<GMJ>: don't know which peri-beamcam to play for ~S~%" arg0)
)
)
(else
(format #t "ERROR<GMJ>: don't know which peri-beamcam to play for ~S~%" arg0)
)
)
(else
(format #t "ERROR<GMJ>: couldn't find junglecam-1 to initialize peri-beamcam~%")
)
)
(else
(format #t "ERROR<GMJ>: couldn't find junglecam-1 to initialize peri-beamcam~%")
)
)
)
@@ -2355,7 +2353,7 @@
(when (line-in-view-frustum? arg0 arg1)
(let ((s4-1 (vector-! (new 'stack-no-clear 'vector) arg1 arg0)))
(vector-length s4-1)
(let ((t2-0 (new 'stack-no-clear 'collide-mesh-cache-tri)))
(let ((t2-0 (new 'stack-no-clear 'collide-tri-result)))
0.0
(if (>= (fill-and-probe-using-line-sphere
*collide-cache*
@@ -2364,7 +2362,7 @@
6144.0
(collide-kind target)
(the-as process #f)
(the-as collide-tri-result t2-0)
t2-0
1
)
0.0
+3 -3
View File
@@ -298,15 +298,15 @@
(vector-flatten! s3-1 s3-1 (-> arg0 root-override local-normal))
)
(vector-normalize-copy! s4-0 s3-1 1.0)
(let ((s3-2 (new 'stack-no-clear 'vector)))
(let ((s3-2 (new 'stack-no-clear 'matrix)))
(matrix-from-two-vectors-max-angle-partial!
(the-as matrix s3-2)
s3-2
s5-0
s4-0
(* (-> arg0 max-turn) (-> *display* seconds-per-frame))
(-> arg0 tween)
)
(vector-matrix*! s5-0 s5-0 (the-as matrix s3-2))
(vector-matrix*! s5-0 s5-0 s3-2)
)
(vector-normalize! s5-0 1.0)
(vector-float*! (-> arg0 root-override transv) s5-0 (-> arg0 max-speed))
@@ -1033,7 +1033,7 @@
)
(cpad-set-buzz! (-> *cpad-list* cpads 0) 0 51 15)
(sound-play-by-name
(sound-name-with-material 'zoom-hit (the-as int (-> self control unknown-int60)) "")
(sound-name-with-material 'zoom-hit (the-as pat-surface (-> self control unknown-int60)) "")
(-> self racer scrape-sound-id)
1024
0
+9 -9
View File
@@ -755,8 +755,8 @@
;; definition for function fishermans-boat-set-path-point
;; INFO: Return type mismatch int vs none.
(defbehavior fishermans-boat-set-path-point fishermans-boat ((arg0 vector))
(TODO-RENAME-12 (-> self controller) (the-as int arg0) (-> self root-overlay trans))
(defbehavior fishermans-boat-set-path-point fishermans-boat ((arg0 int))
(TODO-RENAME-12 (-> self controller) arg0 (-> self root-overlay trans))
(vector-normalize-copy! (-> self dest-dir) (-> self controller path-dest-velocity) 1.0)
0
(none)
@@ -1088,7 +1088,7 @@
)
)
(fishermans-boat-set-dock-point 0)
(fishermans-boat-set-path-point (the-as vector 0))
(fishermans-boat-set-path-point 0)
(anim-loop)
(none)
)
@@ -1140,7 +1140,7 @@
)
(send-event (handle->process (-> self cam-tracker)) 'border #t)
(send-event (handle->process (-> self cam-tracker)) 'mask #x20800)
(fishermans-boat-set-path-point (the-as vector 0))
(fishermans-boat-set-path-point 0)
(fishermans-boat-next-path-point)
(while #t
(suspend)
@@ -1174,7 +1174,7 @@
(load-state-want-levels 'village1 'beach)
(load-state-want-vis 'vi1)
(fishermans-boat-set-dock-point 0)
(fishermans-boat-set-path-point (the-as vector 5))
(fishermans-boat-set-path-point 5)
(anim-loop)
(none)
)
@@ -1254,7 +1254,7 @@
)
(load-state-want-force-vis 'misty #f)
(fishermans-boat-set-dock-point 4)
(fishermans-boat-set-path-point (the-as vector 4))
(fishermans-boat-set-path-point 4)
(anim-loop)
(none)
)
@@ -1305,7 +1305,7 @@
)
(send-event (handle->process (-> self cam-tracker)) 'border #t)
(send-event (handle->process (-> self cam-tracker)) 'mask #x20800)
(fishermans-boat-set-path-point (the-as vector 4))
(fishermans-boat-set-path-point 4)
(fishermans-boat-next-path-point)
(while #t
(suspend)
@@ -1342,7 +1342,7 @@
(behavior ()
(set-continue! *game-info* "misty-start")
(fishermans-boat-set-dock-point 4)
(fishermans-boat-set-path-point (the-as vector 2))
(fishermans-boat-set-path-point 2)
(while #t
(suspend)
)
@@ -1553,7 +1553,7 @@
(fishermans-boat-set-dock-point 4)
(fishermans-boat-set-dock-point 0)
)
(fishermans-boat-set-path-point (the-as vector (-> obj dock-point-index)))
(fishermans-boat-set-path-point (-> obj dock-point-index))
(fishermans-boat-next-path-point)
(set! (-> obj root-overlay trans quad) (-> obj dock-point quad))
(set! (-> obj root-overlay trans y) 0.0)
+3 -5
View File
@@ -196,18 +196,16 @@
)
;; definition for method 29 of type sunken-elevator
;; INFO: Return type mismatch float vs symbol.
;; INFO: Return type mismatch float vs none.
(defmethod can-target-move? sunken-elevator ((obj sunken-elevator))
(set! (-> obj play-at-top-going-up-camera?) #f)
(let ((s5-0 (new 'stack-no-clear 'vector)))
(eval-path-curve! (-> obj path) s5-0 0.4 'interp)
(set! (-> obj teleport-if-above-y) (-> s5-0 y))
(eval-path-curve! (-> obj path) s5-0 0.6 'interp)
(let ((f0-1 (-> s5-0 y)))
(set! (-> obj teleport-if-below-y) f0-1)
(the-as symbol f0-1)
)
(set! (-> obj teleport-if-below-y) (-> s5-0 y))
)
(none)
)
;; definition for method 27 of type sunken-elevator