decomp: finish demo-obs | sequence-a-village1 | misty-obs (#1022)

* decomp: finish `demo-obs`

* decomp: finish `sequence-a-village1`

* decomp: finish `misty-obs`

* fix some mistakes
This commit is contained in:
Tyler Wilding
2021-12-29 20:02:50 -05:00
committed by GitHub
parent 3f85b68671
commit 3a5b4d664b
12 changed files with 6252 additions and 130 deletions
+46 -88
View File
@@ -1493,24 +1493,24 @@
(declare-type entity res-lump)
(define-extern process type) ; deftype provided by C Kernel
(deftype process (process-tree)
((pool dead-pool :offset-assert #x20)
(status basic :offset-assert #x24) ; a symbol
(pid int32 :offset-assert #x28)
(main-thread cpu-thread :offset-assert #x2c)
(top-thread thread :offset-assert #x30)
(entity entity :offset-assert #x34) ;; likely a res-lump
(state state :offset-assert #x38)
(trans-hook function :offset-assert #x3c)
(post-hook function :offset-assert #x40)
(event-hook (function process int symbol event-message-block object) :offset-assert #x44)
(allocated-length int32 :offset-assert #x48)
(next-state state :offset-assert #x4c)
(heap-base pointer :offset-assert #x50)
(heap-top pointer :offset-assert #x54)
(heap-cur pointer :offset-assert #x58)
(stack-frame-top stack-frame :offset-assert #x5c)
(connection-list connectable :inline :offset-assert #x60) ;; can be a connection
(stack uint8 :dynamic :offset-assert #x70)
((pool dead-pool :offset-assert 32)
(status basic :offset-assert 36)
(pid int32 :offset-assert 40)
(main-thread cpu-thread :offset-assert 44)
(top-thread thread :offset-assert 48)
(entity entity :offset-assert 52) ;; likely a res-lump
(state state :offset-assert 56)
(trans-hook function :offset-assert 60)
(post-hook function :offset-assert 64)
(event-hook (function process int symbol event-message-block object) :offset-assert 68)
(allocated-length int32 :offset-assert 72)
(next-state state :offset-assert 76)
(heap-base pointer :offset-assert 80)
(heap-top pointer :offset-assert 84)
(heap-cur pointer :offset-assert 88)
(stack-frame-top stack-frame :offset-assert 92)
(connection-list connectable :inline :offset-assert 96) ;; can be a connection
(stack uint8 :dynamic :offset-assert 112)
)
(:methods
(new (symbol type basic int) _type_ 0)
@@ -29983,67 +29983,20 @@
;; - Types
; (deftype sequenceA-village1 (process-taskable)
; ((boat uint64 :offset-assert 384)
; (side uint64 :offset-assert 392)
; )
; :method-count-assert 53
; :size-assert #x190
; :heap-base #x120
; :flag-assert #x3501200190
; ;; inherited inspect of process-taskable
; (:methods
; (dummy-9 () none 9)
; (dummy-10 () none 10)
; (dummy-11 () none 11)
; (dummy-12 () none 12)
; (dummy-13 () none 13)
; (dummy-14 () none 14)
; (dummy-15 () none 15)
; (dummy-16 () none 16)
; (dummy-17 () none 17)
; (dummy-18 () none 18)
; (dummy-19 () none 19)
; (dummy-20 () none 20)
; (dummy-21 () none 21)
; (dummy-22 () none 22)
; (dummy-23 () none 23)
; (dummy-24 () none 24)
; (dummy-25 () none 25)
; (dummy-26 () none 26)
; (dummy-27 () none 27)
; (dummy-28 () none 28)
; (dummy-29 () none 29)
; (dummy-30 () none 30)
; (dummy-31 () none 31)
; (dummy-32 () none 32)
; (dummy-33 () none 33)
; (dummy-34 () none 34)
; (dummy-35 () none 35)
; (dummy-36 () none 36)
; (dummy-37 () none 37)
; (dummy-38 () none 38)
; (dummy-39 () none 39)
; (dummy-40 () none 40)
; (dummy-41 () none 41)
; (dummy-42 () none 42)
; (dummy-43 () none 43)
; (dummy-44 () none 44)
; (dummy-45 () none 45)
; (dummy-46 () none 46)
; (dummy-47 () none 47)
; (dummy-48 () none 48)
; (dummy-49 () none 49)
; (dummy-50 () none 50)
; (dummy-51 () none 51)
; (dummy-52 () none 52)
; )
; )
(deftype sequenceA-village1 (process-taskable)
((boat handle :offset-assert 384)
(side handle :offset-assert 392)
)
:method-count-assert 53
:size-assert #x190
:heap-base #x120
:flag-assert #x3501200190
)
;; - Functions
(define-extern sequenceA-village1-init-by-other function)
(define-extern sequenceA-village1-trans-hook function)
(define-extern sequenceA-village1-init-by-other (function entity none :behavior sequenceA-village1))
(define-extern sequenceA-village1-trans-hook (function none :behavior sequenceA-village1))
;; - Unknowns
@@ -30179,6 +30132,8 @@
:size-assert #xb0
:heap-base #x40
:flag-assert #x14004000b0
(:states
boatpaddle-idle)
)
(deftype windturbine (process-drawable)
@@ -30189,6 +30144,8 @@
:size-assert #xb8
:heap-base #x50
:flag-assert #x14005000b8
(:states
windturbine-idle)
)
(deftype mis-bone-bridge (process-drawable)
@@ -30202,6 +30159,11 @@
:size-assert #xbd
:heap-base #x50
:flag-assert #x14005000bd
(:states
(mis-bone-bridge-fall symbol)
mis-bone-bridge-idle
mis-bone-bridge-hit
mis-bone-bridge-bump)
)
(deftype breakaway (process-drawable)
@@ -30214,6 +30176,10 @@
(init! (_type_ res-lump int) none 20)
(go-idle (_type_) none 21)
)
(:states
breakaway-idle
breakaway-fall
breakaway-about-to-fall)
)
(deftype breakaway-right (breakaway)
@@ -30271,6 +30237,10 @@
:size-assert #xb4
:heap-base #x50
:flag-assert #x14005000b4
(:states
boat-fuelcell-spawn
boat-fuelcell-idle
boat-fuelcell-die)
)
;; - Functions
@@ -30281,27 +30251,15 @@
;; - Unknowns
(define-extern boat-fuelcell-spawn (state boat-fuelcell)) ;; unknown type
(define-extern boat-fuelcell-idle (state boat-fuelcell)) ;; unknown type
(define-extern *mistycam-sg* skeleton-group)
(define-extern boat-fuelcell-die (state boat-fuelcell)) ;; unknown type
(define-extern *mis-bone-platform-sg* skeleton-group)
(define-extern *bone-platform-constants* rigid-body-platform-constants) ;; unknown type
(define-extern *breakaway-left-sg* skeleton-group)
(define-extern *breakaway-mid-sg* skeleton-group)
(define-extern *breakaway-right-sg* skeleton-group)
(define-extern breakaway-idle (state breakaway)) ;; unknown type
(define-extern breakaway-fall (state breakaway)) ;; unknown type
(define-extern breakaway-about-to-fall (state breakaway)) ;; unknown type
(define-extern *mis-bone-bridge-sg* skeleton-group)
(define-extern mis-bone-bridge-fall (state symbol mis-bone-bridge)) ;; unknown type
(define-extern mis-bone-bridge-idle (state mis-bone-bridge)) ;; unknown type
(define-extern mis-bone-bridge-hit (state mis-bone-bridge)) ;; unknown type
(define-extern mis-bone-bridge-bump (state mis-bone-bridge)) ;; unknown type
(define-extern *windturbine-sg* skeleton-group)
(define-extern windturbine-idle (state windturbine)) ;; unknown type
(define-extern *boatpaddle-sg* skeleton-group)
(define-extern boatpaddle-idle (state boatpaddle)) ;; unknown type
;; ----------------------
@@ -1980,6 +1980,11 @@
"tie-near": [
["L91", "vu-function"]
],
"sequence-a-village1": [
["L38", "vector"]
],
// please do not add things after this entry! git is dumb.
"object-file-that-doesnt-actually-exist-and-i-just-put-this-here-to-prevent-merge-conflicts-with-this-file": []
}
@@ -6000,5 +6000,17 @@
[96, "vector"]
],
"(method 32 sequenceA-village1)": [
[16, "event-message-block"]
],
"(event play-anim sequenceA-village1)": [
[16, "event-message-block"]
],
"(exit play-anim sequenceA-village1)": [
[16, "event-message-block"]
],
"placeholder-do-not-add-below!": []
}
@@ -2566,42 +2566,23 @@
],
"(code target-demo)": [
[66, "v1", "handle"],
[69, "v1", "handle"],
[96, "v1", "handle"],
[99, "v1", "handle"],
[126, "v1", "handle"],
[163, "v1", "handle"],
[196, "v1", "handle"],
[229, "v1", "handle"],
[262, "v1", "handle"],
[293, "v1", "handle"],
[323, "v1", "handle"],
[357, "v1", "handle"],
[390, "v1", "handle"],
[423, "v1", "handle"],
[456, "v1", "handle"],
[487, "v1", "handle"],
[518, "v1", "handle"],
[548, "v1", "handle"],
[578, "v1", "handle"],
[129, "v1", "handle"],
[166, "v1", "handle"],
[199, "v1", "handle"],
[232, "v1", "handle"],
[261, "v1", "handle"],
[265, "v1", "handle"],
[296, "v1", "handle"],
[298, "v1", "handle"],
[326, "v1", "handle"],
[360, "v1", "handle"],
[393, "v1", "handle"],
[426, "v1", "handle"],
[459, "v1", "handle"],
[490, "v1", "handle"],
[521, "v1", "handle"],
[551, "v1", "handle"],
[581, "v1", "handle"]
[[65, 73], "v1", "handle"],
[[95, 103], "v1", "handle"],
[[125, 133], "v1", "handle"],
[[162, 170], "v1", "handle"],
[[195, 203], "v1", "handle"],
[[228, 236], "v1", "handle"],
[[261, 269], "v1", "handle"],
[[292, 300], "v1", "handle"],
[[322, 330], "v1", "handle"],
[[356, 364], "v1", "handle"],
[[389, 397], "v1", "handle"],
[[422, 430], "v1", "handle"],
[[455, 463], "v1", "handle"],
[[486, 494], "v1", "handle"],
[[517, 525], "v1", "handle"],
[[548, 555], "v1", "handle"],
[[577, 585], "v1", "handle"]
],
"target-has-all-the-cells?": [[17, "v1", "float"]],
@@ -4536,12 +4517,10 @@
],
"mistycam-spawn": [
[69, "v1", "handle"],
[72, "v1", "handle"],
[85, "v1", "handle"],
[88, "v1", "handle"],
[103, "s5", "handle"],
[106, "s5", "handle"]
[[68, 76], "v1", "handle"],
[80, "v1", "pov-camera"],
[[84, 92], "v1", "handle"],
[[102, 110], "s5", "handle"]
],
"(code battlecontroller-play-intro-camera misty-battlecontroller)": [
@@ -7375,5 +7354,21 @@
[53, "v1", "snowcam"]
],
"(method 32 sequenceA-village1)": [
[[103, 111], "v1", "handle"],
[[125, 133], "v1", "handle"]
],
"(exit play-anim sequenceA-village1)": [
[[12, 20], "v1", "handle"],
[[28, 36], "v1", "handle"]
],
"(event play-anim sequenceA-village1)": [
[[64, 72], "v1", "handle"],
[[86, 94], "v1", "handle"],
[[108, 116], "v1", "handle"]
],
"placeholder-do-not-add-below": []
}
@@ -3863,5 +3863,57 @@
}
},
"(code target-demo)": {
"vars": {
"v1-12": ["v1-12", "handle"],
"v1-24": ["v1-24", "handle"],
"v1-32": ["v1-32", "handle"],
"v1-38": ["v1-38", "handle"],
"v1-44": ["v1-44", "handle"],
"v1-50": ["v1-50", "handle"],
"v1-56": ["v1-56", "handle"],
"v1-62": ["v1-62", "handle"],
"v1-70": ["v1-70", "handle"],
"v1-76": ["v1-76", "handle"],
"v1-82": ["v1-82", "handle"],
"v1-88": ["v1-88", "handle"],
"v1-94": ["v1-94", "handle"],
"v1-100": ["v1-100", "handle"],
"v1-106": ["v1-106", "handle"],
"v1-112": ["v1-112", "handle"],
"v1-18": ["v1-18", "handle"]
}
},
"(method 32 sequenceA-village1)": {
"vars": {
"v1-27": ["v1-27", "handle"],
"v1-34": ["v1-34", "handle"]
}
},
"(exit play-anim sequenceA-village1)": {
"vars": {
"v1-4": ["v1-4", "handle"],
"v1-10": ["v1-10", "handle"]
}
},
"(event play-anim sequenceA-village1)": {
"vars": {
"v1-12": ["v1-12", "handle"],
"v1-19": ["v1-19", "handle"],
"v1-26": ["v1-26", "handle"]
}
},
"mistycam-spawn": {
"vars": {
"v1-12": ["v1-12", "handle"],
"v1-15": ["v1-15", "handle"],
"s5-2": ["s5-2", "handle"]
}
},
"aaaaaaaaaaaaaaaaaaaaaaa": {}
}
+8
View File
@@ -5,6 +5,14 @@
;; name in dgo: cam-debug-h
;; dgos: GAME, ENGINE
;; TODO - for misty-obs
(define-extern *camera-old-level* string) ;; unknown type
(define-extern *camera-old-cpu* int) ;; unknown type
(define-extern *camera-old-vu* int) ;; unknown type
(define-extern *camera-old-tfrag-bytes* int) ;; unknown type
(define-extern *camera-old-stat-string-tfrag* string) ;; unknown type
(define-extern *camera-old-stat-string-tfrag-near* string) ;; unknown type
(define-extern *camera-old-stat-string-total* string) ;; unknown type
;; TODO - for cam-layout
(define-extern camera-line-setup (function vector4w none))
(define-extern camera-line-draw (function vector vector symbol))
+161
View File
@@ -5,3 +5,164 @@
;; name in dgo: demo-obs
;; dgos: DEM, L1
(define-extern static-screen-spawn (function int int int int int symbol target (pointer process))) ;; target may differ
;; DECOMP BEGINS
(defstate target-demo (target)
:event
target-generic-event-handler
:code
(behavior ()
(if *time-of-day-proc*
(set! (-> *time-of-day-proc* 0 hour) 12)
)
(set-setting! *setting-control* self 'allow-pause #f 0.0 0)
(set-setting! *setting-control* self 'allow-progress #f 0.0 0)
(copy-settings-from-target! *setting-control*)
(ja-channel-set! 0)
(ja-post)
(load-state-want-levels 'demo 'village1)
(load-state-want-vis 'vi1)
(case (scf-get-territory)
((2)
(let ((gp-0 (ppointer->handle (static-screen-spawn 6 #x27c00000 #x27c00100 #x27c00200 1500 #f self))))
(while (handle->process gp-0)
(suspend)
)
)
(let ((gp-1 (ppointer->handle (static-screen-spawn 7 #x27d00000 #x27d00100 #x27d00200 1500 #f self))))
(while (handle->process gp-1)
(suspend)
)
)
(let ((gp-2 (ppointer->handle (static-screen-spawn 8 #x2f000000 #x2f000100 #x2f000200 #x4650 #t self))))
(while (handle->process gp-2)
(suspend)
)
)
)
((1)
(case (-> *setting-control* current language)
(((language-enum french))
(let ((gp-3 (ppointer->handle (static-screen-spawn 10 #x63f00000 #x63f00100 #x63f00200 1500 #f self))))
(while (handle->process gp-3)
(suspend)
)
)
)
(((language-enum german))
(let ((gp-4 (ppointer->handle (static-screen-spawn 11 #x64000000 #x64000100 #x64000200 1500 #f self))))
(while (handle->process gp-4)
(suspend)
)
)
)
(((language-enum italian))
(let ((gp-5 (ppointer->handle (static-screen-spawn 12 #x64100000 #x64100100 #x64100200 1500 #f self))))
(while (handle->process gp-5)
(suspend)
)
)
)
(((language-enum spanish))
(let ((gp-6 (ppointer->handle (static-screen-spawn 13 #x64200000 #x64200100 #x64200200 1500 #f self))))
(while (handle->process gp-6)
(suspend)
)
)
)
(else
(let ((gp-7 (ppointer->handle (static-screen-spawn 2 #x5cd00000 #x5cd00100 #x5cd00200 1500 #f self))))
(while (handle->process gp-7)
(suspend)
)
)
)
)
(let ((gp-8 (ppointer->handle (static-screen-spawn 3 #x5ce00000 #x5ce00100 #x5ce00200 1500 #f self))))
(while (handle->process gp-8)
(suspend)
)
)
(case (-> *setting-control* current language)
(((language-enum french))
(let ((gp-9 (ppointer->handle (static-screen-spawn 15 #x64400000 #x64400100 #x64400200 #x4650 #t self))))
(while (handle->process gp-9)
(suspend)
)
)
)
(((language-enum german))
(let ((gp-10 (ppointer->handle (static-screen-spawn 16 #x64500000 #x64500100 #x64500200 #x4650 #t self))))
(while (handle->process gp-10)
(suspend)
)
)
)
(((language-enum italian))
(let ((gp-11 (ppointer->handle (static-screen-spawn 17 #x64600000 #x64600100 #x64600200 #x4650 #t self))))
(while (handle->process gp-11)
(suspend)
)
)
)
(((language-enum spanish))
(let ((gp-12 (ppointer->handle (static-screen-spawn 18 #x64700000 #x64700100 #x64700200 #x4650 #t self))))
(while (handle->process gp-12)
(suspend)
)
)
)
(else
(let ((gp-13 (ppointer->handle (static-screen-spawn 14 #x64300000 #x64300100 #x64300200 #x4650 #t self))))
(while (handle->process gp-13)
(suspend)
)
)
)
)
)
(else
(let ((gp-14 (ppointer->handle (static-screen-spawn 2 #x5cd00000 #x5cd00100 #x5cd00200 1500 #f self))))
(while (handle->process gp-14)
(suspend)
)
)
(let ((gp-15 (ppointer->handle (static-screen-spawn 3 #x5ce00000 #x5ce00100 #x5ce00200 1500 #f self))))
(while (handle->process gp-15)
(suspend)
)
)
(let ((gp-16 (ppointer->handle (static-screen-spawn 4 #x5cf00000 #x5cf00100 #x5cf00200 #x4650 #t self))))
(while (handle->process gp-16)
(suspend)
)
)
)
)
(let ((gp-17 (get-process *default-dead-pool* process #x4000)))
(when gp-17
(let ((t9-26 (method-of-type process activate)))
(t9-26 gp-17 *default-pool* 'process (the-as pointer #x70004000))
)
(run-next-time-in-process gp-17 (lambda ()
(set! (-> *setting-control* default bg-a) 0.0)
(start 'play (get-continue-by-name *game-info* "village1-demo-convo"))
)
)
(-> gp-17 ppointer)
)
)
(while #t
(suspend)
)
(none)
)
:post
target-no-move-post
)
File diff suppressed because it is too large Load Diff
@@ -5,3 +5,454 @@
;; name in dgo: sequence-a-village1
;; dgos: L1, VI1
(define-extern *sidekick-human-sg* skeleton-group)
;; DECOMP BEGINS
(set! (-> *part-group-id-table* 686)
(new 'static 'sparticle-launch-group
:length 1
:duration #x384
:linger-duration #x5dc
:flags (sp-group-flag use-local-clock)
:name "group-sequenceAV-splash"
:launcher
(new 'static 'inline-array sparticle-group-item 1 (sp-item 2854 :period 900 :length 600))
:bounds (new 'static 'sphere :w 262144.0)
)
)
(set! (-> *part-id-table* 2854) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 20
(sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
(sp-flt spt-num 128.0)
(sp-rnd-flt spt-x (meters -1.0) (meters 2.0) 1.0)
(sp-rnd-flt spt-z -4096.0 8192.0 1.0)
(sp-rnd-flt spt-scale-x (meters 0.025) (meters 0.125) 1.0)
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 128.0 32.0 1.0)
(sp-rnd-flt spt-g 96.0 64.0 1.0)
(sp-rnd-flt spt-b 64.0 32.0 1.0)
(sp-rnd-flt spt-a 32.0 32.0 1.0)
(sp-rnd-flt spt-vel-y (meters 0.026666667) (meters 0.053333335) 1.0)
(sp-rnd-flt spt-rotvel-z (degrees -1.2) (degrees 2.4) 1.0)
(sp-rnd-flt spt-accel-y -2.7306666 -6.826667 1.0)
(sp-int spt-timer 900)
(sp-cpuinfo-flags bit2 bit3)
(sp-rnd-flt spt-conerot-x (degrees -30.0) (degrees 60.0) 1.0)
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 5000.0) 1.0)
(sp-rnd-flt spt-conerot-radius (meters 0.3) (meters -0.5) 1.0)
(sp-end)
)
)
)
(set! (-> *part-group-id-table* 687) (new 'static 'sparticle-launch-group
:length 1
:duration #x5
:linger-duration #x384
:flags (sp-group-flag use-local-clock)
:name "group-sequenceAV-spit"
:launcher
(new 'static 'inline-array sparticle-group-item 1 (sp-item 2855))
:bounds (new 'static 'sphere :w 262144.0)
)
)
(set! (-> *part-id-table* 2855) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 22
(sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
(sp-flt spt-num 5.0)
(sp-rnd-flt spt-scale-x (meters 0.025) (meters 0.025) 1.0)
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 128.0 32.0 1.0)
(sp-rnd-flt spt-g 128.0 32.0 1.0)
(sp-rnd-flt spt-b 128.0 32.0 1.0)
(sp-rnd-flt spt-a 32.0 32.0 1.0)
(sp-rnd-flt spt-vel-y (meters 0.016666668) (meters 0.0033333334) 1.0)
(sp-flt spt-scalevel-x (meters 0.00033333333))
(sp-rnd-flt spt-rotvel-z (degrees -1.2) (degrees 2.4) 1.0)
(sp-copy-from-other spt-scalevel-y -4)
(sp-flt spt-fade-a -0.21333334)
(sp-rnd-flt spt-accel-y -1.3653333 -1.3653333 1.0)
(sp-flt spt-friction 0.95)
(sp-int spt-timer 300)
(sp-cpuinfo-flags bit2 bit3)
(sp-rnd-flt spt-conerot-x (degrees 106.0) (degrees 2.0) 1.0)
(sp-rnd-flt spt-conerot-y (degrees 90.0) (degrees 2.0) 1.0)
(sp-rnd-flt spt-conerot-radius (meters 0.0) (meters -0.15) 1.0)
(sp-end)
)
)
)
(set! (-> *part-group-id-table* 688) (new 'static 'sparticle-launch-group
:length 8
:duration #xbb8
:linger-duration #x5dc
:flags (sp-group-flag screen-space)
:name "group-sequenceAV-2d-intro-mist"
:launcher
(new 'static 'inline-array sparticle-group-item 8
(sp-item 2858 :period 300 :length 5 :binding 2856)
(sp-item 2856 :flags (start-dead launch-asap) :binding 2857)
(sp-item 2856 :flags (start-dead launch-asap) :binding 2857)
(sp-item 2857 :flags (start-dead))
(sp-item 2857 :flags (start-dead))
(sp-item 2857 :flags (start-dead))
(sp-item 2859)
(sp-item 2860)
)
:bounds (new 'static 'sphere :w 8192.0)
)
)
(set! (-> *part-id-table* 2858) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 13
(sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
(sp-flt spt-num 1.0)
(sp-rnd-flt spt-x (meters -2.5) (meters 5.0) 1.0)
(sp-rnd-flt spt-y (meters -1.5) (meters 3.0) 1.0)
(sp-flt spt-scale-x (meters 0.1))
(sp-copy-from-other spt-scale-y -4)
(sp-flt spt-g 128.0)
(sp-flt spt-a 0.0)
(sp-rnd-flt spt-vel-y (meters 0.0033333334) (meters 0.0033333334) 1.0)
(sp-int spt-timer 600)
(sp-cpuinfo-flags bit3)
(sp-rnd-flt spt-conerot-z (degrees 0.0) (degrees 360.0) 1.0)
(sp-end)
)
)
)
(set! (-> *part-id-table* 2856) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 20
(sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
(sp-flt spt-num 1.0)
(sp-rnd-flt spt-x (meters 0.0) (meters 16.0) 1.0)
(sp-rnd-flt spt-y (meters 0.0) (meters 16.0) 1.0)
(sp-rnd-flt spt-z 2048.0 819.2 1.0)
(sp-rnd-flt spt-scale-x (meters 0.5) (meters 0.5) 1.0)
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 0.0 96.0 1.0)
(sp-rnd-flt spt-g 0.0 32.0 1.0)
(sp-rnd-flt spt-b 64.0 32.0 1.0)
(sp-flt spt-a 128.0)
(sp-rnd-flt spt-omega 0.0 65536.0 1.0)
(sp-rnd-int-flt spt-vel-x (meters -0.053333335) 1 436.90668)
(sp-flt spt-scalevel-x (meters -0.0012121212))
(sp-rnd-int-flt spt-rotvel-z (degrees -0.3) 1 109.22667)
(sp-copy-from-other spt-scalevel-y -4)
(sp-int spt-timer 600)
(sp-cpuinfo-flags bit2 bit3 bit7)
(sp-end)
)
)
)
(set! (-> *part-id-table* 2857) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 16
(sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
(sp-flt spt-num 1.0)
(sp-rnd-flt spt-scale-x (meters 0.5) (meters 0.3) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 32.0 96.0 1.0)
(sp-rnd-flt spt-g 0.0 32.0 1.0)
(sp-rnd-flt spt-b 64.0 32.0 1.0)
(sp-rnd-flt spt-a 64.0 64.0 1.0)
(sp-flt spt-scalevel-x (meters -0.0010952381))
(sp-copy-from-other spt-scalevel-y -4)
(sp-rnd-flt spt-accel-y 0.0 -0.13653333 1.0)
(sp-int-plain-rnd spt-timer 30 299 1)
(sp-cpuinfo-flags bit2 bit3)
(sp-int spt-next-time 240)
(sp-launcher-by-id spt-next-launcher 198)
(sp-end)
)
)
)
(set! (-> *part-id-table* 2860) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 12
(sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2))
(sp-flt spt-num 1.0)
(sp-flt spt-z -16000.0)
(sp-flt spt-scale-x (meters 15.0))
(sp-flt spt-scale-y (meters 12.0))
(sp-flt spt-r 0.0)
(sp-flt spt-g 0.0)
(sp-flt spt-b 0.0)
(sp-flt spt-a 128.0)
(sp-int spt-timer 5)
(sp-cpuinfo-flags bit2 bit13 bit14)
(sp-end)
)
)
)
(set! (-> *part-id-table* 2859)
(new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 21
(sp-tex spt-texture (new 'static 'texture-id :page #x2))
(sp-flt spt-num 0.3)
(sp-rnd-flt spt-x (meters -4.0) (meters 8.0) 1.0)
(sp-rnd-flt spt-y (meters -3.0) (meters 6.0) 1.0)
(sp-rnd-flt spt-z 0.0 14000.0 1.0)
(sp-rnd-flt spt-scale-x (meters 6.0) (meters 8.0) 1.0)
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
(sp-rnd-flt spt-scale-y (meters 6.0) (meters 8.0) 1.0)
(sp-rnd-flt spt-r 16.0 80.0 1.0)
(sp-rnd-flt spt-g 0.0 16.0 1.0)
(sp-rnd-flt spt-b 16.0 150.0 1.0)
(sp-flt spt-a 0.0)
(sp-rnd-flt spt-scalevel-x (meters -0.0016666667) (meters 0.0033333334) 1.0)
(sp-rnd-flt spt-rotvel-z (degrees -0.075) (degrees 0.15) 1.0)
(sp-copy-from-other spt-scalevel-y -4)
(sp-flt spt-fade-a 0.21333334)
(sp-int spt-timer 1500)
(sp-cpuinfo-flags bit2 bit14)
(sp-int-plain-rnd spt-next-time 150 149 1)
(sp-launcher-by-id spt-next-launcher 2861)
(sp-end)
)
)
)
(set! (-> *part-id-table* 2861)
(new 'static 'sparticle-launcher :init-specs (new 'static 'inline-array sp-field-init-spec 4
(sp-flt spt-fade-a 0.0)
(sp-int-plain-rnd spt-next-time 300 299 1)
(sp-launcher-by-id spt-next-launcher 2862)
(sp-end)
)
)
)
(set! (-> *part-id-table* 2862)
(new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 2 (sp-flt spt-fade-a -0.21333334) (sp-end))
)
)
(deftype sequenceA-village1 (process-taskable)
((boat handle :offset-assert 384)
(side handle :offset-assert 392)
)
:heap-base #x120
:method-count-assert 53
:size-assert #x190
:flag-assert #x3501200190
)
(defmethod play-anim! sequenceA-village1 ((obj sequenceA-village1) (arg0 symbol))
(when arg0
(set! (-> *time-of-day-proc* 0 time-ratio) 0.0)
(set! (-> *time-of-day-proc* 0 hour) 23)
(send-event *camera* 'no-intro)
(send-event *camera* 'clear-entity)
(send-event *camera* 'force-blend 0)
(send-event *camera* 'change-state cam-fixed 0)
(send-event *target* 'sidekick #f)
(let ((s5-0 (get-process *default-dead-pool* manipy #x4000)))
(set! (-> obj boat)
(ppointer->handle
(when s5-0
(let ((t9-6 (method-of-type manipy activate)))
(t9-6 (the-as manipy s5-0) obj 'manipy (the-as pointer #x70004000))
)
(run-now-in-process s5-0 manipy-init (-> obj root-override trans) (-> obj entity) *fishermans-boat-sg* #f)
(-> s5-0 ppointer)
)
)
)
)
(send-event (handle->process (-> obj boat)) 'anim-mode 'clone-anim)
(send-event (handle->process (-> obj boat)) 'origin-joint-index 3)
)
(the-as basic (new 'static 'spool-anim
:name "sage-intro-sequence-a"
:index 17
:parts 22
:command-list
'((0 blackout 0)
(0 want-levels village1 misty)
(1210 display-level misty display)
(1210 want-vis mis)
(1210 want-force-vis misty #t)
(1230 send-event self sidekick-human)
(1239 joint "cameraB")
(1480 joint "camera")
(1480 setting-reset ocean-off near)
(1613 joint "cameraB")
(1796 joint "camera")
(1843 joint "cameraB")
(2145 joint "camera")
(2274 joint "cameraB")
(2439 joint "camera")
(2450 want-force-vis misty #f)
(2490 joint "cameraB")
(2570 alive "sequenceB-1")
(2569 save)
(2569 setting-unset ocean-off)
)
)
)
)
(defmethod get-art-elem sequenceA-village1 ((obj sequenceA-village1))
(-> obj draw art-group data 3)
)
(defstate play-anim (sequenceA-village1)
:virtual #t
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('sidekick-human)
(format 0 "got sidekick-human~%")
(when (= (level-status *level* 'misty) 'active)
(let ((gp-1 (entity-by-name "sequenceA-1")))
(when gp-1
(format 0 "found entity for sidekick-human~%")
(let ((s5-0 (get-process *default-dead-pool* manipy #x4000)))
(set! (-> self side)
(ppointer->handle
(when s5-0
(let ((t9-5 (method-of-type manipy activate)))
(t9-5 (the-as manipy s5-0) self 'manipy (the-as pointer #x70004000))
)
(run-now-in-process s5-0 manipy-init (-> self root-override trans) gp-1 *sidekick-human-sg* #f)
(-> s5-0 ppointer)
)
)
)
)
(send-event (handle->process (-> self side)) 'anim-mode 'clone-anim)
(send-event (handle->process (-> self side)) 'center-joint 3)
(send-event (handle->process (-> self side)) 'blend-shape #t)
)
)
)
)
)
)
:exit
(behavior ()
(send-event *target* 'sidekick #t)
(let ((a0-2 (handle->process (-> self boat))))
(if a0-2
(deactivate a0-2)
)
)
(let ((a0-6 (handle->process (-> self side))))
(if a0-6
(deactivate a0-6)
)
)
((-> (method-of-type process-taskable play-anim) exit))
(let ((gp-0 (entity-by-name "sequenceB-1")))
(set-blackout-frames 6000)
(send-event *camera* 'clear-entity)
(entity-birth-no-kill gp-0)
(send-event
(if gp-0
(-> gp-0 extra process)
)
'play-anim
)
)
(none)
)
:trans
(behavior ()
(spool-push *art-control* "sage-intro-sequence-b" 0 self -1.0)
((-> (method-of-type process-taskable play-anim) trans))
(none)
)
)
(defmethod should-display? sequenceA-village1 ((obj sequenceA-village1))
#f
)
(defbehavior sequenceA-village1-trans-hook sequenceA-village1 ()
(when (>= 1000.0 (ja-aframe-num 0))
(hide-hud-quick)
(if (> (-> self part matrix) 0)
(set-vector!
(sprite-get-user-hvdf (-> self part matrix))
2048.0
2048.0
(+ -1024.0 (-> *math-camera* hvdf-off z))
(-> *math-camera* hvdf-off w)
)
)
(let ((f0-9 (fmin 1.0 (* 0.008333334 (- 1000.0 (ja-aframe-num 0))))))
(set! (-> *part-id-table* 2860 init-specs 8 initial-valuef) (* 128.0 f0-9))
(cond
((< f0-9 1.0)
(set! (-> *part-id-table* 2858 init-specs 1 initial-valuef) 0.0)
(set! (-> *part-id-table* 2859 init-specs 1 initial-valuef) 0.0)
)
(else
(set! (-> *part-id-table* 2858 init-specs 1 initial-valuef) 1.0)
(set! (-> *part-id-table* 2859 init-specs 1 initial-valuef) 0.3)
)
)
)
(spawn (-> self part) *zero-vector*)
(draw-title-credits (* 0.001 (ja-aframe-num 0)))
)
0
(none)
)
(defbehavior sequenceA-village1-init-by-other sequenceA-village1 ((arg0 entity))
(set! (-> self entity) arg0)
(dummy-40 self arg0 *sage-sg* 3 40 (new 'static 'vector :w 4096.0) 5)
(set! (-> self tasks) (get-task-control (game-task intro)))
(set! (-> self boat) (the-as handle #f))
(set! (-> self side) (the-as handle #f))
(set! (-> self part) (create-launch-control (-> *part-group-id-table* 688) self))
(set! (-> self part matrix) (sprite-allocate-user-hvdf))
(set! (-> self cur-trans-hook) sequenceA-village1-trans-hook)
(logclear! (-> self mask) (process-mask pause actor-pause))
(set! (-> self been-kicked) #t)
(set-setting! *setting-control* self 'music-volume-movie 'abs 0.0 0)
(set-setting! *setting-control* self 'sfx-volume-movie 'abs 0.0 0)
(set-setting! *setting-control* self 'ambient-volume-movie 'abs 0.0 0)
(go-virtual hidden)
(none)
)
(defun start-sequence-a ()
(set-blackout-frames #x7530)
(let ((gp-0 (get-process *default-dead-pool* sequenceA-village1 #x4000)))
(when gp-0
(let ((t9-2 (method-of-type sequenceA-village1 activate)))
(t9-2 (the-as sequenceA-village1 gp-0) *entity-pool* 'sequenceA-village1 (the-as pointer #x70004000))
)
(run-now-in-process gp-0 sequenceA-village1-init-by-other (entity-by-name "sage-23"))
(-> gp-0 ppointer)
)
)
0
(none)
)
+161
View File
@@ -0,0 +1,161 @@
;;-*-Lisp-*-
(in-package goal)
;; failed to figure out what this is:
(defstate target-demo (target)
:event
target-generic-event-handler
:code
(behavior ()
(if *time-of-day-proc*
(set! (-> *time-of-day-proc* 0 hour) 12)
)
(set-setting! *setting-control* self 'allow-pause #f 0.0 0)
(set-setting! *setting-control* self 'allow-progress #f 0.0 0)
(copy-settings-from-target! *setting-control*)
(ja-channel-set! 0)
(ja-post)
(load-state-want-levels 'demo 'village1)
(load-state-want-vis 'vi1)
(case (scf-get-territory)
((2)
(let ((gp-0 (ppointer->handle (static-screen-spawn 6 #x27c00000 #x27c00100 #x27c00200 1500 #f self))))
(while (handle->process gp-0)
(suspend)
)
)
(let ((gp-1 (ppointer->handle (static-screen-spawn 7 #x27d00000 #x27d00100 #x27d00200 1500 #f self))))
(while (handle->process gp-1)
(suspend)
)
)
(let ((gp-2 (ppointer->handle (static-screen-spawn 8 #x2f000000 #x2f000100 #x2f000200 #x4650 #t self))))
(while (handle->process gp-2)
(suspend)
)
)
)
((1)
(case (-> *setting-control* current language)
(((language-enum french))
(let ((gp-3 (ppointer->handle (static-screen-spawn 10 #x63f00000 #x63f00100 #x63f00200 1500 #f self))))
(while (handle->process gp-3)
(suspend)
)
)
)
(((language-enum german))
(let ((gp-4 (ppointer->handle (static-screen-spawn 11 #x64000000 #x64000100 #x64000200 1500 #f self))))
(while (handle->process gp-4)
(suspend)
)
)
)
(((language-enum italian))
(let ((gp-5 (ppointer->handle (static-screen-spawn 12 #x64100000 #x64100100 #x64100200 1500 #f self))))
(while (handle->process gp-5)
(suspend)
)
)
)
(((language-enum spanish))
(let ((gp-6 (ppointer->handle (static-screen-spawn 13 #x64200000 #x64200100 #x64200200 1500 #f self))))
(while (handle->process gp-6)
(suspend)
)
)
)
(else
(let ((gp-7 (ppointer->handle (static-screen-spawn 2 #x5cd00000 #x5cd00100 #x5cd00200 1500 #f self))))
(while (handle->process gp-7)
(suspend)
)
)
)
)
(let ((gp-8 (ppointer->handle (static-screen-spawn 3 #x5ce00000 #x5ce00100 #x5ce00200 1500 #f self))))
(while (handle->process gp-8)
(suspend)
)
)
(case (-> *setting-control* current language)
(((language-enum french))
(let ((gp-9 (ppointer->handle (static-screen-spawn 15 #x64400000 #x64400100 #x64400200 #x4650 #t self))))
(while (handle->process gp-9)
(suspend)
)
)
)
(((language-enum german))
(let ((gp-10 (ppointer->handle (static-screen-spawn 16 #x64500000 #x64500100 #x64500200 #x4650 #t self))))
(while (handle->process gp-10)
(suspend)
)
)
)
(((language-enum italian))
(let ((gp-11 (ppointer->handle (static-screen-spawn 17 #x64600000 #x64600100 #x64600200 #x4650 #t self))))
(while (handle->process gp-11)
(suspend)
)
)
)
(((language-enum spanish))
(let ((gp-12 (ppointer->handle (static-screen-spawn 18 #x64700000 #x64700100 #x64700200 #x4650 #t self))))
(while (handle->process gp-12)
(suspend)
)
)
)
(else
(let ((gp-13 (ppointer->handle (static-screen-spawn 14 #x64300000 #x64300100 #x64300200 #x4650 #t self))))
(while (handle->process gp-13)
(suspend)
)
)
)
)
)
(else
(let ((gp-14 (ppointer->handle (static-screen-spawn 2 #x5cd00000 #x5cd00100 #x5cd00200 1500 #f self))))
(while (handle->process gp-14)
(suspend)
)
)
(let ((gp-15 (ppointer->handle (static-screen-spawn 3 #x5ce00000 #x5ce00100 #x5ce00200 1500 #f self))))
(while (handle->process gp-15)
(suspend)
)
)
(let ((gp-16 (ppointer->handle (static-screen-spawn 4 #x5cf00000 #x5cf00100 #x5cf00200 #x4650 #t self))))
(while (handle->process gp-16)
(suspend)
)
)
)
)
(let ((gp-17 (get-process *default-dead-pool* process #x4000)))
(when gp-17
(let ((t9-26 (method-of-type process activate)))
(t9-26 gp-17 *default-pool* 'process (the-as pointer #x70004000))
)
(run-next-time-in-process gp-17 (lambda ()
(set! (-> *setting-control* default bg-a) 0.0)
(start 'play (get-continue-by-name *game-info* "village1-demo-convo"))
)
)
(-> gp-17 ppointer)
)
)
(while #t
(suspend)
)
(none)
)
:post
target-no-move-post
)
File diff suppressed because it is too large Load Diff
+479
View File
@@ -0,0 +1,479 @@
;;-*-Lisp-*-
(in-package goal)
;; failed to figure out what this is:
(set! (-> *part-group-id-table* 686)
(new 'static 'sparticle-launch-group
:length 1
:duration #x384
:linger-duration #x5dc
:flags (sp-group-flag use-local-clock)
:name "group-sequenceAV-splash"
:launcher
(new 'static 'inline-array sparticle-group-item 1 (sp-item 2854 :period 900 :length 600))
:bounds (new 'static 'sphere :w 262144.0)
)
)
;; failed to figure out what this is:
(set! (-> *part-id-table* 2854) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 20
(sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
(sp-flt spt-num 128.0)
(sp-rnd-flt spt-x (meters -1.0) (meters 2.0) 1.0)
(sp-rnd-flt spt-z -4096.0 8192.0 1.0)
(sp-rnd-flt spt-scale-x (meters 0.025) (meters 0.125) 1.0)
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 128.0 32.0 1.0)
(sp-rnd-flt spt-g 96.0 64.0 1.0)
(sp-rnd-flt spt-b 64.0 32.0 1.0)
(sp-rnd-flt spt-a 32.0 32.0 1.0)
(sp-rnd-flt spt-vel-y (meters 0.026666667) (meters 0.053333335) 1.0)
(sp-rnd-flt spt-rotvel-z (degrees -1.2) (degrees 2.4) 1.0)
(sp-rnd-flt spt-accel-y -2.7306666 -6.826667 1.0)
(sp-int spt-timer 900)
(sp-cpuinfo-flags bit2 bit3)
(sp-rnd-flt spt-conerot-x (degrees -30.0) (degrees 60.0) 1.0)
(sp-rnd-flt spt-conerot-y (degrees 0.0) (degrees 5000.0) 1.0)
(sp-rnd-flt spt-conerot-radius (meters 0.3) (meters -0.5) 1.0)
(sp-end)
)
)
)
;; failed to figure out what this is:
(set! (-> *part-group-id-table* 687) (new 'static 'sparticle-launch-group
:length 1
:duration #x5
:linger-duration #x384
:flags (sp-group-flag use-local-clock)
:name "group-sequenceAV-spit"
:launcher
(new 'static 'inline-array sparticle-group-item 1 (sp-item 2855))
:bounds (new 'static 'sphere :w 262144.0)
)
)
;; failed to figure out what this is:
(set! (-> *part-id-table* 2855) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 22
(sp-tex spt-texture (new 'static 'texture-id :index #x9 :page #x2))
(sp-flt spt-num 5.0)
(sp-rnd-flt spt-scale-x (meters 0.025) (meters 0.025) 1.0)
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 128.0 32.0 1.0)
(sp-rnd-flt spt-g 128.0 32.0 1.0)
(sp-rnd-flt spt-b 128.0 32.0 1.0)
(sp-rnd-flt spt-a 32.0 32.0 1.0)
(sp-rnd-flt spt-vel-y (meters 0.016666668) (meters 0.0033333334) 1.0)
(sp-flt spt-scalevel-x (meters 0.00033333333))
(sp-rnd-flt spt-rotvel-z (degrees -1.2) (degrees 2.4) 1.0)
(sp-copy-from-other spt-scalevel-y -4)
(sp-flt spt-fade-a -0.21333334)
(sp-rnd-flt spt-accel-y -1.3653333 -1.3653333 1.0)
(sp-flt spt-friction 0.95)
(sp-int spt-timer 300)
(sp-cpuinfo-flags bit2 bit3)
(sp-rnd-flt spt-conerot-x (degrees 106.0) (degrees 2.0) 1.0)
(sp-rnd-flt spt-conerot-y (degrees 90.0) (degrees 2.0) 1.0)
(sp-rnd-flt spt-conerot-radius (meters 0.0) (meters -0.15) 1.0)
(sp-end)
)
)
)
;; failed to figure out what this is:
(set! (-> *part-group-id-table* 688) (new 'static 'sparticle-launch-group
:length 8
:duration #xbb8
:linger-duration #x5dc
:flags (sp-group-flag screen-space)
:name "group-sequenceAV-2d-intro-mist"
:launcher
(new 'static 'inline-array sparticle-group-item 8
(sp-item 2858 :period 300 :length 5 :binding 2856)
(sp-item 2856 :flags (start-dead launch-asap) :binding 2857)
(sp-item 2856 :flags (start-dead launch-asap) :binding 2857)
(sp-item 2857 :flags (start-dead))
(sp-item 2857 :flags (start-dead))
(sp-item 2857 :flags (start-dead))
(sp-item 2859)
(sp-item 2860)
)
:bounds (new 'static 'sphere :w 8192.0)
)
)
;; failed to figure out what this is:
(set! (-> *part-id-table* 2858) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 13
(sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2))
(sp-flt spt-num 1.0)
(sp-rnd-flt spt-x (meters -2.5) (meters 5.0) 1.0)
(sp-rnd-flt spt-y (meters -1.5) (meters 3.0) 1.0)
(sp-flt spt-scale-x (meters 0.1))
(sp-copy-from-other spt-scale-y -4)
(sp-flt spt-g 128.0)
(sp-flt spt-a 0.0)
(sp-rnd-flt spt-vel-y (meters 0.0033333334) (meters 0.0033333334) 1.0)
(sp-int spt-timer 600)
(sp-cpuinfo-flags bit3)
(sp-rnd-flt spt-conerot-z (degrees 0.0) (degrees 360.0) 1.0)
(sp-end)
)
)
)
;; failed to figure out what this is:
(set! (-> *part-id-table* 2856) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 20
(sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
(sp-flt spt-num 1.0)
(sp-rnd-flt spt-x (meters 0.0) (meters 16.0) 1.0)
(sp-rnd-flt spt-y (meters 0.0) (meters 16.0) 1.0)
(sp-rnd-flt spt-z 2048.0 819.2 1.0)
(sp-rnd-flt spt-scale-x (meters 0.5) (meters 0.5) 1.0)
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 0.0 96.0 1.0)
(sp-rnd-flt spt-g 0.0 32.0 1.0)
(sp-rnd-flt spt-b 64.0 32.0 1.0)
(sp-flt spt-a 128.0)
(sp-rnd-flt spt-omega 0.0 65536.0 1.0)
(sp-rnd-int-flt spt-vel-x (meters -0.053333335) 1 436.90668)
(sp-flt spt-scalevel-x (meters -0.0012121212))
(sp-rnd-int-flt spt-rotvel-z (degrees -0.3) 1 109.22667)
(sp-copy-from-other spt-scalevel-y -4)
(sp-int spt-timer 600)
(sp-cpuinfo-flags bit2 bit3 bit7)
(sp-end)
)
)
)
;; failed to figure out what this is:
(set! (-> *part-id-table* 2857) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 16
(sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2))
(sp-flt spt-num 1.0)
(sp-rnd-flt spt-scale-x (meters 0.5) (meters 0.3) 1.0)
(sp-copy-from-other spt-scale-y -4)
(sp-rnd-flt spt-r 32.0 96.0 1.0)
(sp-rnd-flt spt-g 0.0 32.0 1.0)
(sp-rnd-flt spt-b 64.0 32.0 1.0)
(sp-rnd-flt spt-a 64.0 64.0 1.0)
(sp-flt spt-scalevel-x (meters -0.0010952381))
(sp-copy-from-other spt-scalevel-y -4)
(sp-rnd-flt spt-accel-y 0.0 -0.13653333 1.0)
(sp-int-plain-rnd spt-timer 30 299 1)
(sp-cpuinfo-flags bit2 bit3)
(sp-int spt-next-time 240)
(sp-launcher-by-id spt-next-launcher 198)
(sp-end)
)
)
)
;; failed to figure out what this is:
(set! (-> *part-id-table* 2860) (new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 12
(sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2))
(sp-flt spt-num 1.0)
(sp-flt spt-z -16000.0)
(sp-flt spt-scale-x (meters 15.0))
(sp-flt spt-scale-y (meters 12.0))
(sp-flt spt-r 0.0)
(sp-flt spt-g 0.0)
(sp-flt spt-b 0.0)
(sp-flt spt-a 128.0)
(sp-int spt-timer 5)
(sp-cpuinfo-flags bit2 bit13 bit14)
(sp-end)
)
)
)
;; failed to figure out what this is:
(set! (-> *part-id-table* 2859)
(new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 21
(sp-tex spt-texture (new 'static 'texture-id :page #x2))
(sp-flt spt-num 0.3)
(sp-rnd-flt spt-x (meters -4.0) (meters 8.0) 1.0)
(sp-rnd-flt spt-y (meters -3.0) (meters 6.0) 1.0)
(sp-rnd-flt spt-z 0.0 14000.0 1.0)
(sp-rnd-flt spt-scale-x (meters 6.0) (meters 8.0) 1.0)
(sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0)
(sp-rnd-flt spt-scale-y (meters 6.0) (meters 8.0) 1.0)
(sp-rnd-flt spt-r 16.0 80.0 1.0)
(sp-rnd-flt spt-g 0.0 16.0 1.0)
(sp-rnd-flt spt-b 16.0 150.0 1.0)
(sp-flt spt-a 0.0)
(sp-rnd-flt spt-scalevel-x (meters -0.0016666667) (meters 0.0033333334) 1.0)
(sp-rnd-flt spt-rotvel-z (degrees -0.075) (degrees 0.15) 1.0)
(sp-copy-from-other spt-scalevel-y -4)
(sp-flt spt-fade-a 0.21333334)
(sp-int spt-timer 1500)
(sp-cpuinfo-flags bit2 bit14)
(sp-int-plain-rnd spt-next-time 150 149 1)
(sp-launcher-by-id spt-next-launcher 2861)
(sp-end)
)
)
)
;; failed to figure out what this is:
(set! (-> *part-id-table* 2861)
(new 'static 'sparticle-launcher :init-specs (new 'static 'inline-array sp-field-init-spec 4
(sp-flt spt-fade-a 0.0)
(sp-int-plain-rnd spt-next-time 300 299 1)
(sp-launcher-by-id spt-next-launcher 2862)
(sp-end)
)
)
)
;; failed to figure out what this is:
(set! (-> *part-id-table* 2862)
(new 'static 'sparticle-launcher
:init-specs
(new 'static 'inline-array sp-field-init-spec 2 (sp-flt spt-fade-a -0.21333334) (sp-end))
)
)
;; definition of type sequenceA-village1
(deftype sequenceA-village1 (process-taskable)
((boat handle :offset-assert 384)
(side handle :offset-assert 392)
)
:heap-base #x120
:method-count-assert 53
:size-assert #x190
:flag-assert #x3501200190
)
;; definition for method 3 of type sequenceA-village1
(defmethod inspect sequenceA-village1 ((obj sequenceA-village1))
(let ((t9-0 (method-of-type process-taskable inspect)))
(t9-0 obj)
)
(format #t "~T~Tboat: ~D~%" (-> obj boat))
(format #t "~T~Tside: ~D~%" (-> obj side))
obj
)
;; definition for method 32 of type sequenceA-village1
;; INFO: Return type mismatch spool-anim vs basic.
(defmethod play-anim! sequenceA-village1 ((obj sequenceA-village1) (arg0 symbol))
(when arg0
(set! (-> *time-of-day-proc* 0 time-ratio) 0.0)
(set! (-> *time-of-day-proc* 0 hour) 23)
(send-event *camera* 'no-intro)
(send-event *camera* 'clear-entity)
(send-event *camera* 'force-blend 0)
(send-event *camera* 'change-state cam-fixed 0)
(send-event *target* 'sidekick #f)
(let ((s5-0 (get-process *default-dead-pool* manipy #x4000)))
(set! (-> obj boat)
(ppointer->handle
(when s5-0
(let ((t9-6 (method-of-type manipy activate)))
(t9-6 (the-as manipy s5-0) obj 'manipy (the-as pointer #x70004000))
)
(run-now-in-process s5-0 manipy-init (-> obj root-override trans) (-> obj entity) *fishermans-boat-sg* #f)
(-> s5-0 ppointer)
)
)
)
)
(send-event (handle->process (-> obj boat)) 'anim-mode 'clone-anim)
(send-event (handle->process (-> obj boat)) 'origin-joint-index 3)
)
(the-as basic (new 'static 'spool-anim
:name "sage-intro-sequence-a"
:index 17
:parts 22
:command-list
'((0 blackout 0)
(0 want-levels village1 misty)
(1210 display-level misty display)
(1210 want-vis mis)
(1210 want-force-vis misty #t)
(1230 send-event self sidekick-human)
(1239 joint "cameraB")
(1480 joint "camera")
(1480 setting-reset ocean-off near)
(1613 joint "cameraB")
(1796 joint "camera")
(1843 joint "cameraB")
(2145 joint "camera")
(2274 joint "cameraB")
(2439 joint "camera")
(2450 want-force-vis misty #f)
(2490 joint "cameraB")
(2570 alive "sequenceB-1")
(2569 save)
(2569 setting-unset ocean-off)
)
)
)
)
;; definition for method 31 of type sequenceA-village1
(defmethod get-art-elem sequenceA-village1 ((obj sequenceA-village1))
(-> obj draw art-group data 3)
)
;; failed to figure out what this is:
(defstate play-anim (sequenceA-village1)
:virtual #t
:event
(behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
(('sidekick-human)
(format 0 "got sidekick-human~%")
(when (= (level-status *level* 'misty) 'active)
(let ((gp-1 (entity-by-name "sequenceA-1")))
(when gp-1
(format 0 "found entity for sidekick-human~%")
(let ((s5-0 (get-process *default-dead-pool* manipy #x4000)))
(set! (-> self side)
(ppointer->handle
(when s5-0
(let ((t9-5 (method-of-type manipy activate)))
(t9-5 (the-as manipy s5-0) self 'manipy (the-as pointer #x70004000))
)
(run-now-in-process s5-0 manipy-init (-> self root-override trans) gp-1 *sidekick-human-sg* #f)
(-> s5-0 ppointer)
)
)
)
)
(send-event (handle->process (-> self side)) 'anim-mode 'clone-anim)
(send-event (handle->process (-> self side)) 'center-joint 3)
(send-event (handle->process (-> self side)) 'blend-shape #t)
)
)
)
)
)
)
:exit
(behavior ()
(send-event *target* 'sidekick #t)
(let ((a0-2 (handle->process (-> self boat))))
(if a0-2
(deactivate a0-2)
)
)
(let ((a0-6 (handle->process (-> self side))))
(if a0-6
(deactivate a0-6)
)
)
((-> (method-of-type process-taskable play-anim) exit))
(let ((gp-0 (entity-by-name "sequenceB-1")))
(set-blackout-frames 6000)
(send-event *camera* 'clear-entity)
(entity-birth-no-kill gp-0)
(send-event
(if gp-0
(-> gp-0 extra process)
)
'play-anim
)
)
(none)
)
:trans
(behavior ()
(spool-push *art-control* "sage-intro-sequence-b" 0 self -1.0)
((-> (method-of-type process-taskable play-anim) trans))
(none)
)
)
;; definition for method 39 of type sequenceA-village1
(defmethod should-display? sequenceA-village1 ((obj sequenceA-village1))
#f
)
;; definition for function sequenceA-village1-trans-hook
;; INFO: Return type mismatch int vs none.
(defbehavior sequenceA-village1-trans-hook sequenceA-village1 ()
(when (>= 1000.0 (ja-aframe-num 0))
(hide-hud-quick)
(if (> (-> self part matrix) 0)
(set-vector!
(sprite-get-user-hvdf (-> self part matrix))
2048.0
2048.0
(+ -1024.0 (-> *math-camera* hvdf-off z))
(-> *math-camera* hvdf-off w)
)
)
(let ((f0-9 (fmin 1.0 (* 0.008333334 (- 1000.0 (ja-aframe-num 0))))))
(set! (-> *part-id-table* 2860 init-specs 8 initial-valuef) (* 128.0 f0-9))
(cond
((< f0-9 1.0)
(set! (-> *part-id-table* 2858 init-specs 1 initial-valuef) 0.0)
(set! (-> *part-id-table* 2859 init-specs 1 initial-valuef) 0.0)
)
(else
(set! (-> *part-id-table* 2858 init-specs 1 initial-valuef) 1.0)
(set! (-> *part-id-table* 2859 init-specs 1 initial-valuef) 0.3)
)
)
)
(spawn (-> self part) *zero-vector*)
(draw-title-credits (* 0.001 (ja-aframe-num 0)))
)
0
(none)
)
;; definition for function sequenceA-village1-init-by-other
;; INFO: Return type mismatch object vs none.
(defbehavior sequenceA-village1-init-by-other sequenceA-village1 ((arg0 entity))
(set! (-> self entity) arg0)
(dummy-40 self arg0 *sage-sg* 3 40 (new 'static 'vector :w 4096.0) 5)
(set! (-> self tasks) (get-task-control (game-task intro)))
(set! (-> self boat) (the-as handle #f))
(set! (-> self side) (the-as handle #f))
(set! (-> self part) (create-launch-control (-> *part-group-id-table* 688) self))
(set! (-> self part matrix) (sprite-allocate-user-hvdf))
(set! (-> self cur-trans-hook) sequenceA-village1-trans-hook)
(logclear! (-> self mask) (process-mask pause actor-pause))
(set! (-> self been-kicked) #t)
(set-setting! *setting-control* self 'music-volume-movie 'abs 0.0 0)
(set-setting! *setting-control* self 'sfx-volume-movie 'abs 0.0 0)
(set-setting! *setting-control* self 'ambient-volume-movie 'abs 0.0 0)
(go-virtual hidden)
(none)
)
;; definition for function start-sequence-a
;; INFO: Return type mismatch int vs none.
(defun start-sequence-a ()
(set-blackout-frames #x7530)
(let ((gp-0 (get-process *default-dead-pool* sequenceA-village1 #x4000)))
(when gp-0
(let ((t9-2 (method-of-type sequenceA-village1 activate)))
(t9-2 (the-as sequenceA-village1 gp-0) *entity-pool* 'sequenceA-village1 (the-as pointer #x70004000))
)
(run-now-in-process gp-0 sequenceA-village1-init-by-other (entity-by-name "sage-23"))
(-> gp-0 ppointer)
)
)
0
(none)
)