Merge remote-tracking branch 'open-goal/master' into j2/enemy

This commit is contained in:
Tyler Wilding
2022-10-23 18:21:49 -04:00
56 changed files with 3015 additions and 565 deletions
+3 -2
View File
@@ -125,16 +125,17 @@ tasks:
offline-test-file:
cmds:
- '{{.OFFLINETEST_BIN_RELEASE_DIR}}/offline-test --iso_data_path "./iso_data/{{.GAME}}" --game {{.GAME}} --file {{.FILE}}'
# TODO - amalgamate offline-tests and this task, run twice if the previous step fails
update-ref-tests:
cmds:
- cmd: python ./scripts/tasks/default-file-or-folder.py --path failures
- cmd: python ./scripts/tasks/delete-file-or-folder.py --path failures
- cmd: '{{.OFFLINETEST_BIN_RELEASE_DIR}}/offline-test --iso_data_path "./iso_data/{{.GAME}}" --game {{.GAME}} --num_threads 32 --dump_current_output --fail-on-cmp'
ignore_error: true
- python ./scripts/update_decomp_reference.py ./failures ./test/decompiler/reference/ --game {{.GAME}}
- task: offline-tests-fast
update-ref-file:
cmds:
- cmd: python ./scripts/tasks/default-file-or-folder.py --path failures
- cmd: python ./scripts/tasks/delete-file-or-folder.py --path failures
- cmd: '{{.OFFLINETEST_BIN_RELEASE_DIR}}/offline-test --iso_data_path "./iso_data/{{.GAME}}" --file {{.FILE}} --game {{.GAME}} --dump_current_output --fail-on-cmp'
ignore_error: true
- python ./scripts/update_decomp_reference.py ./failures ./test/decompiler/reference/ --game {{.GAME}}
+69 -87
View File
@@ -5179,7 +5179,7 @@
:size-assert #x10
:flag-assert #xb00000010
(:methods
(texture-anim-array-method-9 () none 9)
(texture-anim-array-method-9 (_type_) none 9)
(texture-anim-array-method-10 () none 10)
)
)
@@ -12215,7 +12215,7 @@
(set-offset-bit (shadow-control) int 10)
(set-top-plane-offset (shadow-control float) int 11)
(set-bottom-plane-offset (shadow-control float) int 12)
(shadow-control-method-13 () none 13) ;; (unused-13 (_type_) none 13)
(shadow-control-method-13 (_type_ vector float float float) none 13) ;; (unused-13 (_type_) none 13)
(shadow-control-method-14 () none 14) ;; (update-direction-from-time-of-day (_type_) none 14)
)
)
@@ -16060,7 +16060,7 @@
(deftype collide-shape-prim-group (collide-shape-prim)
((num-children uint8 :offset 64)
(num-alloc-children uint8 :offset 65)
(child (inline-array collide-shape) :offset 68) ;; total guess..
(child (inline-array collide-shape-prim) :offset 68) ;; total guess..
)
:method-count-assert 20
:size-assert #x50
@@ -16136,7 +16136,7 @@
(collide-shape-method-47 () none 47) ;; (update-transforms! (_type_) symbol 47)
(collide-shape-method-48 () none 48) ;; (clear-collide-with-as (_type_) none 48)
(collide-shape-method-49 (_type_ int int int) none 49) ;; (restore-collide-with-as (_type_) none 49)
(collide-shape-method-50 () none 50) ;; (backup-collide-with-as (_type_) none 50)
(collide-shape-method-50 (_type_ process object float float float) none 50) ;; (backup-collide-with-as (_type_) none 50)
(collide-shape-method-51 (_type_) none 51) ;; (set-root-prim-collide-with! (_type_ collide-kind) none 51)
(water-info-init!
"Initialize a [[water-info]] with the currently loaded regions."
@@ -17149,7 +17149,8 @@
)
(deftype process-focusable (process-drawable)
((focus-status focus-status :offset-assert 200)
((root-override collide-shape :offset 128 :score 100)
(focus-status focus-status :offset-assert 200)
)
:method-count-assert 27
:size-assert #xcc
@@ -17173,7 +17174,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(deftype process-taskable (process-focusable)
((task basic :offset-assert 204)
((task game-task-control :offset-assert 204)
(ambient ambient-control :inline :offset-assert 208)
(neck-joint-index int32 :offset-assert 224)
(talk-message game-text-id :offset-assert 228) ;; guessed by decompiler
@@ -17184,7 +17185,7 @@
(talk-distance meters :offset-assert 248)
(talk-height meters :offset-assert 252)
(last-talk time-frame :offset-assert 256) ;; time-frame
(want-to-say uint64 :offset-assert 264)
(want-to-say time-frame :offset-assert 264)
(birth-time time-frame :offset-assert 272)
(slave handle :offset-assert 280)
)
@@ -17192,17 +17193,17 @@
:size-assert #x120
:flag-assert #x2600a00120
(:methods
(process-taskable-method-27 () none 27) ;; (play-anim () _type_ :state 27)
(process-taskable-method-28 () none 28) ;; (hidden () _type_ :state 28)
(process-taskable-method-29 () none 29) ;; (be-clone (handle) _type_ :state 29)
(process-taskable-method-30 () none 30) ;; (idle () _type_ :state 30)
(process-taskable-method-31 () none 31) ;; (get-art-elem (_type_) art-element 31)
(process-taskable-method-32 () none 32) ;; (play-anim! (_type_ symbol) basic 32)
(process-taskable-method-33 () none 33) ;; (dummy-33 (_type_) none 33)
(process-taskable-method-34 () none 34) ;; (get-accept-anim (_type_ symbol) spool-anim 34)
(process-taskable-method-35 () none 35) ;; (push-accept-anim (_type_) none 35)
(process-taskable-method-36 () none 36) ;; (get-reject-anim (_type_ symbol) spool-anim 36)
(process-taskable-method-37 () none 37) ;; (push-reject-anim (_type_) none 37)
(hide () _type_ :state 27) ;; (play-anim () _type_ :state 27)
(idle () _type_ :state 28) ;; (hidden () _type_ :state 28)
(active (game-task-event) _type_ :state 29) ;; (be-clone (handle) _type_ :state 29)
(play-game (game-task-event) _type_ :state 30) ;; (idle () _type_ :state 30)
(process-taskable-method-31 (_type_) none 31) ;; (get-art-elem (_type_) art-element 31)
(process-taskable-method-32 (_type_) none 32) ;; (play-anim! (_type_ symbol) basic 32)
(process-taskable-method-33 (_type_) none 33) ;; (dummy-33 (_type_) none 33)
(process-taskable-method-34 (_type_) symbol 34) ;; (get-accept-anim (_type_ symbol) spool-anim 34)
(process-taskable-method-35 (_type_) art-joint-anim 35) ;; (push-accept-anim (_type_) none 35)
(process-taskable-method-36 (_type_) none 36) ;; (get-reject-anim (_type_ symbol) spool-anim 36)
(process-taskable-method-37 (_type_) none 37) ;; (push-reject-anim (_type_) none 37)
)
)
@@ -17648,7 +17649,7 @@
(declare-type darkjak-info basic)
(deftype target (process-focusable)
((control control-info :score 1 :offset 128) ;; guessed by decompiler
((control control-info :offset 128 :score 200) ;; guessed by decompiler
(skel2 joint-control :offset-assert 204)
(shadow-backup shadow-geo :offset-assert 208)
(target-flags uint32 :offset 188)
@@ -26283,22 +26284,20 @@
;; actor-hash ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype actor-cshape-ptr (structure)
((cshape basic :offset-assert 0)
((cshape collide-shape :offset-assert 0)
)
:method-count-assert 9
:size-assert #x4
:flag-assert #x900000004
)
|#
#|
(deftype actor-hash-bucket (structure)
((length int16 :offset-assert 0)
(max-length int16 :offset-assert 2)
(data uint32 :offset-assert 4)
(data (pointer uint32) :offset-assert 4) ;;an array of....something TODO
)
:allow-misaligned
:method-count-assert 10
:size-assert #x8
:flag-assert #xa00000008
@@ -26306,13 +26305,11 @@
(actor-hash-bucket-method-9 () none 9)
)
)
|#
#|
(deftype actor-hash-buckets (structure)
((hash basic :offset-assert 0)
(list basic :offset-assert 4)
(data UNKNOWN 4 :offset-assert 8)
(data actor-hash-bucket 4 :inline :offset-assert 8)
(tpos vector :inline :offset-assert 80)
)
:method-count-assert 10
@@ -26322,10 +26319,9 @@
(actor-hash-buckets-method-9 () none 9)
)
)
|#
(define-extern *actor-hash* spatial-hash)
;; (define-extern *actor-hash-buckets* object)
(define-extern *actor-hash-buckets* actor-hash-buckets)
(define-extern update-actor-hash (function none))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -29191,9 +29187,9 @@
;; main-collide ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (define-extern drawable-sphere-box-intersect? function) ;; (function drawable bounding-box4w symbol)
;; (define-extern instance-sphere-box-intersect? function) ;; (function drawable instance-tie bounding-box4w symbol)
;; (define-extern instance-tfragment-add-debug-sphere function) ;; (function drawable instance-tie symbol)
(define-extern drawable-sphere-box-intersect? (function drawable bounding-box4w symbol)) ;;
(define-extern instance-sphere-box-intersect? (function drawable instance-tie bounding-box4w symbol)) ;;
(define-extern instance-tfragment-add-debug-sphere (function drawable instance-tie symbol)) ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; video ;;
@@ -29370,7 +29366,7 @@
(define-extern *pid-string* string)
(define-extern debug-actor (function string none))
(define-extern draw-actor-marks (function process none))
(define-extern init-entity (function process entity-actor none))
(define-extern init-entity (function process entity-actor process none))
;; (define-extern entity-deactivate-handler function) ;; (function process entity-actor none)
(define-extern check-for-rougue-process (function process int int level none))
(define-extern process-drawable-scale-from-entity! (function process-drawable entity none))
@@ -30683,9 +30679,8 @@
;; viewer ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype viewer (process-drawable)
((janim art-joint-anim :offset-assert 196) ;; guessed by decompiler
((janim art-joint-anim :offset-assert 200) ;; guessed by decompiler
)
:method-count-assert 20
:size-assert #xcc
@@ -30693,18 +30688,18 @@
(:methods
)
)
|#
;; (define-extern *viewer-sg* skeleton-group) ;; skeleton-group
;; (define-extern viewer-process state) ;; (state viewer)
;; (define-extern viewer-string object) ;; string
;; (define-extern viewer-ja-name object) ;; string
;; (define-extern viewer-geo-name object) ;; string
;; (define-extern actor-get-arg! function) ;; (function string string string symbol)
;; (define-extern art-part-name function) ;; (function string string)
;; (define-extern init-viewer function) ;; (function string object :behavior viewer)
;; (define-extern init-viewer-for-other function) ;; (function string vector none :behavior viewer)
;; (define-extern add-a-bunch function) ;; (function string int int float symbol)
(define-extern *viewer* viewer)
(define-extern *viewer-sg* skeleton-group) ;; skeleton-group
(define-extern viewer-process (state viewer)) ;;
(define-extern viewer-string string) ;;
(define-extern viewer-ja-name string) ;; string
(define-extern viewer-geo-name string) ;; string
(define-extern actor-get-arg! (function string string string symbol)) ;;
(define-extern art-part-name (function string string)) ;;
(define-extern init-viewer (function string string none :behavior viewer)) ;;
(define-extern init-viewer-for-other (function string vector entity-actor none :behavior viewer)) ;;
(define-extern add-a-bunch (function string int int float process-tree entity-actor symbol)) ;;
(define-extern birth-viewer (function process entity-actor object))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -31617,24 +31612,24 @@
(deftype los-control (structure)
((src-proc uint64 :offset-assert 0)
(dst-proc uint64 :offset-assert 8)
(have-los uint64 :offset-assert 16)
(have-no-los uint64 :offset-assert 24)
(check-interval uint64 :offset-assert 32)
((src-proc handle :offset-assert 0)
(dst-proc handle :offset-assert 8)
(have-los time-frame :offset-assert 16)
(have-no-los time-frame :offset-assert 24)
(check-interval time-frame :offset-assert 32)
(last-check-time time-frame :offset-assert 40)
(last-collide-result collide-tri-result :inline :offset-assert 48)
(collide-with uint32 :offset 144) ;; collide-tri-result is 88 so tries to place at 136
(collide-with collide-spec :offset 144) ;; collide-tri-result is 88 so tries to place at 136
)
:method-count-assert 14
:size-assert #x94
:flag-assert #xe00000094
(:methods
(los-control-method-9 () none 9)
(los-control-method-10 () none 10)
(los-control-method-11 () none 11)
(los-control-method-12 () none 12)
(los-control-method-13 () none 13)
(los-control-method-9 (_type_ process-focusable vector float) none :behavior process 9)
(check-los? (_type_ time-frame) symbol :behavior process 10)
(skip-check-los? (_type_ int) symbol :behavior process 11)
(set-dst-proc! (_type_ handle) none 12)
(new-source! (_type_ process time-frame collide-spec) none 13)
)
)
@@ -32160,8 +32155,7 @@
)
(deftype enemy (process-focusable)
((root-override collide-shape-moving :offset 128 :score 100)
(fact-info-override fact-info-enemy :offset 160 :score 100)
((fact-info-override fact-info-enemy :offset 160 :score 100)
(enemy-flags enemy-flag :offset-assert 208)
(enemy-info enemy-info :offset-assert 216)
(hit-points int32 :offset-assert 220)
@@ -32701,7 +32695,7 @@
;; ---rigid-body-h:rigid-body-object-flag
(deftype rigid-body-object (process-focusable)
((root-override collide-shape-moving :offset 128 :score 999)
((root-override-2 collide-shape-moving :offset 128 :score 999)
(info rigid-body-object-constants :offset-assert 204)
(flags rigid-body-object-flag :offset-assert 208)
(max-time-step float :offset-assert 216)
@@ -32804,7 +32798,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(deftype base-plat (process-focusable)
((root-override collide-shape-moving :offset 128 :score 100)
((root-override-2 collide-shape-moving :offset 128 :score 100)
(smush smush-control :inline :offset-assert 208)
(basetrans vector :inline :offset-assert 240)
(bounce-time time-frame :offset-assert 256)
@@ -33512,7 +33506,7 @@
;; process-taskable ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (define-extern process-taskable-anim-loop function) ;; (function none :behavior process-taskable)
(define-extern process-taskable-anim-loop (function (function symbol) none :behavior process-taskable)) ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; scene-actor ;;
@@ -33747,10 +33741,9 @@
;; guard-projectile ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype guard-shot (projectile)
((hit-actor? basic :offset-assert 468)
(tail-pos vector :inline :offset-assert 476)
((hit-actor? symbol :offset-assert 472)
(tail-pos vector :inline :offset-assert 480)
)
:method-count-assert 40
:size-assert #x1f0
@@ -33758,11 +33751,9 @@
(:methods
)
)
|#
#|
(deftype vehicle-grenade (projectile-bounce)
((blast-radius float :offset-assert 492)
((blast-radius float :offset-assert 496)
)
:method-count-assert 42
:size-assert #x1f4
@@ -33770,9 +33761,7 @@
(:methods
)
)
|#
#|
(deftype guard-lazer-shot (projectile)
()
:method-count-assert 40
@@ -33781,7 +33770,6 @@
(:methods
)
)
|#
;; (define-extern guard-shot-move function)
;; (define-extern guard-lazer-shot-move function)
@@ -33825,7 +33813,7 @@
;; los-control ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; (define-extern *los-time-offset* object)
(define-extern *los-time-offset* time-frame)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; grunt ;;
@@ -39243,7 +39231,6 @@
;; sig-h ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#|
(deftype sig-plasma (structure)
((flags uint8 :offset-assert 0)
(level float :offset-assert 4)
@@ -39264,29 +39251,25 @@
(sig-plasma-method-14 () none 14)
)
)
|#
#|
(deftype sig-path-sample (structure)
((bytes UNKNOWN 32 :offset-assert 0)
((bytes uint8 32 :offset-assert 0)
(pos vector :inline :offset-assert 32)
(quat quaternion :inline :offset-assert 48)
(flags uint8 :offset-assert 12)
(pos-x float :offset-assert 32)
(pos-y float :offset-assert 36)
(pos-z float :offset-assert 40)
(quat-x float :offset-assert 48)
(quat-y float :offset-assert 52)
(quat-z float :offset-assert 56)
(quat-w float :offset-assert 60)
(flags uint8 :offset 12)
(pos-x float :offset 32)
(pos-y float :offset 36)
(pos-z float :offset 40)
(quat-x float :offset 48)
(quat-y float :offset 52)
(quat-z float :offset 56)
(quat-w float :offset 60)
)
:method-count-assert 9
:size-assert #x40
:flag-assert #x900000040
)
|#
#|
(deftype sig-path (basic)
((sample-count int32 :offset-assert 4)
(samples uint32 :offset-assert 8)
@@ -39295,7 +39278,6 @@
:size-assert #xc
:flag-assert #x90000000c
)
|#
#|
(deftype sig (bot)
+2 -2
View File
@@ -75,7 +75,7 @@
// "DGO/LRACEDF.DGO",
// "DGO/LERLCHAL.DGO",
// "DGO/LHIPOUT.DGO",
// "DGO/OUTROCST.DGO",
"DGO/OUTROCST.DGO",
// "DGO/NES.DGO",
// "DGO/PAR.DGO",
// "DGO/LERBRNGD.DGO",
@@ -145,7 +145,7 @@
// "DGO/CPA.DGO",
// "DGO/LCITYLOW.DGO",
// "DGO/LTENTOUT.DGO",
// "DGO/UNB.DGO",
"DGO/UNB.DGO",
// "DGO/CPO.DGO",
// "DGO/CAP.DGO",
"DGO/CWI.DGO",
+1
View File
@@ -439,6 +439,7 @@
["L123", "uint64", true]
],
"fma-sphere": [["L43", "attack-info"]],
"process-taskable": [["L105", "attack-info"]],
"neon-baron-part": [
["L604", "uint64", true],
["L605", "uint64", true]
@@ -1004,6 +1004,7 @@
[48, "vector"],
[64, "vector"]
],
"add-a-bunch": [[16, "vector"]],
"(method 52 nav-state)": [
[16, "nav-avoid-spheres-params"],
[112, "nav-ray"]
+12
View File
@@ -3714,6 +3714,18 @@
[40, "s1", "dma-buffer"],
[[88, 91], "v1", "dma-packet"]
],
"(code active process-taskable)": [
[40, "gp", "handle"],
[71, "gp", "handle"]
],
"(method 32 process-taskable)": [
[63, "v0", "joint"],
[[70, 80], "v1", "collide-shape-prim-group"]
],
"(method 9 los-control)": [
[54, "s1", "process-focusable"],
[35, "s1", "process-focusable"]
],
"(method 10 idle-control)": [[64, "v1", "art-joint-anim"]],
"(method 136 enemy)": [[34, "a1", "process-focusable"]],
"(method 107 enemy)": [[17, "v0", "process-focusable"]],
+69
View File
@@ -1974,6 +1974,75 @@
"add-debug-bound": {
"args": ["buf", "pts", "c0", "c1", "flash"]
},
"(method 9 prototype-inline-array-shrub)": {
"vars": {
"s5-0": "bsp-header",
"s4-0": "shrub-idx",
"s3-0": "shrub",
"v1-9": "shrub-i",
"s2-0": "geo-i",
"a0-15": "geo"
}
},
"(method 8 prototype-array-tie)": {
"args": ["obj", "usage", "arg2"],
"vars": {
"s3-0": "tie-idx",
"v1-8": "size-of-tie"
}
},
"(method 8 prototype-bucket-tie)": {
"args": ["obj", "usage", "arg2"],
"vars": {
"v1-13": "name-size",
"v1-25": "color-size",
"s3-0": "idx",
"a0-1": "tie-geom"
}
},
"(method 8 prototype-inline-array-shrub)": {
"args": ["obj", "usage", "arg2"],
"vars": {
"v1-8": "shrub-size",
"s3-0": "idx"
}
},
"(method 8 prototype-bucket-shrub)": {
"args": ["obj", "usage", "arg2"],
"vars": {
"s3-0": "idx",
"v1-22": "name-size",
"a0-5": "geo",
"v1-5": "proto-shrub-size"
}
},
"drawable-sphere-box-intersect?": {
"args": ["drawable", "bbox"]
},
"instance-sphere-box-intersect?": {
"args": ["drawable", "tie", "bbox"]
},
"instance-tfragment-add-debug-sphere": {
"args": ["drawable", "tie"]
},
"(method 9 los-control)": {
"args": ["obj", "process", "trans-vec", "radius"],
"vars": {
"s2-0": "process-focus",
"s1-0": "process-source",
"s1-1": "process-dest",
"s1-2": "start-pos",
"v1-20": "distance",
"s3-1": "cquery",
"v1-22": "query"
}
},
"(method 12 los-control)": {
"args": ["obj", "dst"]
},
"(method 13 los-control)": {
"args": ["obj", "proc", "check-interval", "c-spec"]
},
"(method 9 enemy-info)": {
"args": ["obj", "obj-to-copy"]
},
+4
View File
@@ -725,6 +725,10 @@ const std::unordered_map<
{{"turbo-pad-array", ArrayFieldDecompMeta(TypeSpec("race-turbo-pad"), 32)},
{"racer-array", ArrayFieldDecompMeta(TypeSpec("race-racer-info"), 16)},
{"decision-point-array", ArrayFieldDecompMeta(TypeSpec("race-decision-point"), 16)}}},
{"actor-hash-bucket",
{{"data", ArrayFieldDecompMeta(TypeSpec("uint32"),
4,
ArrayFieldDecompMeta::Kind::REF_TO_INTEGER_ARR)}}},
{"xz-height-map",
{{"data", ArrayFieldDecompMeta(TypeSpec("int8"),
1,
+1
View File
@@ -11,6 +11,7 @@
(file "game/assets/jak1/text/game_text_de.gs")
(file "game/assets/jak1/text/game_text_ja.gs")
(file "game/assets/jak1/text/game_text_ptbr.gs")
(file "game/assets/jak1/text/game_text_es.gs")
)
+198
View File
@@ -0,0 +1,198 @@
(group-name "common")
(language-id 3)
(text-version jak1-v2)
;; -----------------
;; memcard overrides lol
(#x0138 "POR FAVOR NO QUITES/INSERTES NINGÚN PERIFÉRICO, APAGUES EL SISTEMA NI CIERRES EL JUEGO")
(#x0161 "MIENTRAS ESTE ICONO ESTÉ EN PANTALLA, NO QUITES/INSERTES NINGÚN PERIFÉRICO, APAGUES EL SISTEMA NI CIERRES EL JUEGO")
;; -----------------
;; progress menu (insanity)
(#x1000 "OPCIONES DE CÁMARA")
(#x1001 "NORMAL")
(#x1002 "INVERTIDA")
(#x1003 "CÁMARA EN 1º PERSONA HORIZONTAL")
(#x1004 "CÁMARA EN 1º PERSONA VERTICAL")
(#x1005 "CÁMARA EN 3º PERSONA HORIZONTAL")
(#x1006 "CÁMARA EN 3º PERSONA VERTICAL")
(#x1007 "RESTAURAR VALORES POR DEFECTO")
(#x100c "AUTOGUARDADO DESACTIVADO")
(#x100d "¿QUIERES DESACTIVAR EL AUTOGUARDADO?")
(#x100e "DESACTIVAR AUTOGUARDADO")
(#x100f "OTROS")
(#x1010 "ACCESIBILIDAD")
(#x1011 "BRILLO DE LAS ESFERAS")
(#x1020 "OPCIONES DE PS2")
(#x1021 "VELOCIDAD DE CARGA DE PS2")
(#x1022 "CULLING DE PARTÍCULAS")
(#x1023 "FADE-OUT EN LA MÚSICA")
(#x1024 "FADE-IN EN LA MÚSICA")
(#x1025 "CULLING DE ACTORES")
(#x1026 "CULLING DE FONDO")
(#x1027 "FORZAR ENVIRONMENT MAPPING")
(#x1030 "DISCORD RICH-PRESENCE")
(#x1031 "MODO DE PANTALLA")
(#x1032 "VENTANA")
(#x1033 "SIN BORDES")
(#x1034 "COMPLETA")
(#x1035 "RESOLUCIÓN DEL JUEGO")
(#x1036 "~D X ~D")
(#x1037 "RATIO DE ASPECTO DE PS2")
(#x1038 "SI EL RATIO DE ASPECTO DE PS2 ESTÁ HABILITADO, SOLO SE PUEDE ELEGIR 4X3 Y 16X9. ¿CONTINUAR?")
(#x1039 "RATIO DE ASPECTO (PS2)")
(#x103a "ESTIRAR")
(#x103b "V-SYNC")
(#x103c "4X3 (PS2)")
(#x103d "16X9 (PS2)")
(#x103e "~DX~D")
(#x103f "PULSA <PAD_SQUARE> PARA ACTIVAR/DESACTIVAR LOS SUBTÍTULOS")
(#x1040 "SUBTÍTULOS ACTIVADOS")
(#x1041 "SUBTÍTULOS DESACTIVADOS")
(#x1042 "IDIOMA DEL TEXTO")
(#x1043 "PANTALLA")
(#x1044 "PANTALLA ~D")
(#x1050 "MSAA")
(#x1051 "~DX")
(#x1052 "2X")
(#x1053 "4X")
(#x1054 "8X")
(#x1055 "16X")
(#x1060 "FRAME RATE (EXPERIMENTAL)")
(#x1061 "60")
(#x1062 "100")
(#x1063 "150")
(#x1070 "NIVEL DE DETALLE (LEJOS)")
(#x1071 "NIVEL DE DETALLE (CERCA)")
(#x1072 "MÁXIMO")
(#x1073 "ALTO")
(#x1074 "MEDIO")
(#x1075 "BAJO")
(#x1076 "MÍNIMO")
(#x1077 "PS2")
(#x1078 "SUBTÍTULOS")
(#x1079 "SUBTÍTULOS DE CONSEJOS")
(#x107a "IDIOMA DE SUBTÍTULOS")
(#x107b "PERSONAJE EN SUBTÍTULOS")
(#x107c "SIEMPRE")
(#x107d "NUNCA")
(#x107e "FUERA DE PANTALLA")
(#x107f "LOG DE CONSEJOS")
(#x1080 "TRUCOS")
(#x1081 "SECRETOS")
(#x1082 "SELECCIONAR CANCIÓN")
(#x1083 "SELECCIONAR VARIEDAD")
(#x1084 "JEFE FINAL")
(#x1085 "CRÉDITOS")
(#x1086 "?????")
(#x1087 "KLAWW")
(#x1088 "MINI-JUEGO DE PESCA")
(#x1089 "TEMA DE DESAFÍO")
(#x1090 "ECO AZUL INFINITO")
(#x1091 "ECO ROJO INFINITO")
(#x1092 "ECO VERDE INFINITO")
(#x1093 "ECO AMARILLO INFINITO")
(#x1094 "DAXTER ALTERNATIVO")
(#x1095 "INVENCIBILIDAD")
(#x1096 "TODAS LAS CANCIONES")
(#x1097 "HORA DEL DIA REAL")
(#x1098 "CONSIGUE EL 100%")
(#x1099 "TERMINA EL JUEGO")
(#x109a "JAK CABEZÓN")
(#x109b "JAK CABEZA PEQUEÑA")
(#x109c "JAK PUÑOS GRANDES")
(#x109d "PERSONAJES CABEZONES")
(#x109e "MODO SIN TEXTURAS")
(#x109f "MUNDO ESPEJO")
(#x10a0 "JAK CABEZA GIGANTE")
(#x10c0 "REPRODUCTOR DE MÚSICA")
(#x10c1 "REPRODUCTOR DE ESCENAS")
(#x10c2 "REPRODUCIR CRÉDITOS")
(#x10c3 "LIBRO DE RECORTES")
(#x10d0 "POR DEFECTO")
(#x10d1 "SIN USAR")
(#x10d2 "SABIO")
(#x10d3 "CABAÑA DEL SABIO")
(#x10d4 "MUJER PÁJARO")
(#x10d5 "GRANJERO")
(#x10d6 "KEIRA")
(#x10d7 "ALCALDE")
(#x10d8 "ESCULTOR")
(#x10d9 "TÍO DE JAK")
(#x10da "PUERTO")
(#x10db "SALIDA DEL TEMPLO PROHIBIDO")
(#x10dc "MÁQUINA LURKER")
(#x10dd "ALTO DE LA TORRE")
(#x10de "INTERRUPTOR DEL RESPIRADERO AZUL")
(#x10df "SIN USAR")
(#x10e0 "CENTINELAS")
(#x10e1 "CAÑÓN LURKER")
(#x10e2 "GRUTA")
(#x10e3 "SIN USAR 1")
(#x10e4 "BARCO LURKER")
(#x10e5 "SIN USAR 2")
(#x10e6 "ZOOMER")
(#x10e7 "FLUT FLUT")
(#x10e8 "SIN USAR")
(#x10e9 "GUERRERO")
(#x10ea "GEÓLOGA")
(#x10eb "JUGADOR")
(#x10ec "MÁQUINA LEVITADORA")
(#x10ed "SIN USAR 1")
(#x10ee "LAUNCHER TRAPS")
(#x10ef "SIN USAR 2")
(#x10f0 "DESFILADERO DEL MUERTO")
(#x10f1 "MITAD DEL PASO")
(#x10f2 "FINAL DEL PASO")
(#x10f3 "HACIA CUEVA DE LAS ARAÑAS")
(#x10f4 "HACIA LA MONTAÑA NEVADA")
(#x10f5 "MINEROS")
(#x10f6 "ANDAMIO DE LA CUEVA DEL ROBOT")
(#x10f7 "CIMA DEL ROBOT PRECURSOR")
(#x10f8 "CUEVA PRINCIPAL")
(#x10f9 "CUEVA OSCURA")
(#x10fa "SIN USAR")
(#x10fb "CUEVA OCULTA")
(#x10fc "FUERTE LURKER")
(#x10fd "BOLAS DE NIEVE")
(#x10fe "MITAD DEL TUBO")
(#x10ff "FINAL DEL TUBO")
(#x1100 "SABIO AMARILLO")
(#x1101 "SABIO ROJO")
(#x1102 "SABIO AZUL")
(#x1103 "CENTRO DE LA CIUDADELA")
(#x1104 "MITAD DEL JEFE")
(#x1105 "FINAL DEL JEFE")
(#x1106 "VARIEDAD 1")
(#x1107 "VARIEDAD 2")
(#x1110 "ENGLISH (UK)")
(#x1111 "PORTUGUÊS")
(#x1112 "PORTUGUÊS (BRASIL)")
(#x1113 "SUOMI")
(#x1114 "SVENSKA")
(#x1115 "DANSK")
(#x1116 "NORSK")
(#x1500 "MODO DE SPEEDRUNNER")
(#x1501 "SALTAR CINEMÁTICAS")
;; -----------------
;; test (DO NOT TRANSLATE)
+7 -2
View File
@@ -2243,7 +2243,6 @@
(progress-screen settings-title)
(progress-screen title)
(progress-screen sound-settings)
(progress-screen settings)
(progress-screen accessibility-options)
(progress-screen game-ps2-options)
(progress-screen resolution)
@@ -2255,6 +2254,12 @@
(hide-progress-icons)
(draw-options self 115 25 0.82)
)
(((progress-screen settings)
(progress-screen settings-title)
)
(hide-progress-icons)
(draw-options self 115 25 0.78)
)
(((progress-screen misc-options))
(hide-progress-icons)
(draw-options self 115 25 0.79)
@@ -2278,7 +2283,7 @@
)
(((progress-screen game-settings))
(hide-progress-icons)
(draw-options self 115 25 0.76)
(draw-options self 115 25 0.70)
)
(((progress-screen memcard-removed) (progress-screen memcard-auto-save-error))
(draw-notice-screen self)
+36 -37
View File
@@ -260,43 +260,42 @@
(deftype enemy (process-focusable)
((root-override collide-shape-moving :offset 128)
(fact-info-override fact-info-enemy :offset 160)
(enemy-flags enemy-flag :offset-assert 208)
(enemy-info enemy-info :offset-assert 216)
(hit-points int32 :offset-assert 220)
(gnd-collide uint32 :offset-assert 224)
(attack-id uint32 :offset-assert 228)
(persistent-attack-id uint32 :offset-assert 232)
(water-max-height meters :offset-assert 236)
(water-surface-height meters :offset-assert 240)
(desired-angle degrees :offset-assert 244)
(jump-why uint64 :offset-assert 248)
(penetrated-by-all penetrate :offset-assert 256)
(penetrated-flinch penetrate :offset-assert 264)
(penetrated-knocked penetrate :offset-assert 272)
(reaction-time uint64 :offset-assert 280)
(notice-time uint64 :offset-assert 288)
(state-timeout uint64 :offset-assert 296)
(auto-reset-penetrate-time uint64 :offset-assert 304)
(hit-focus-time uint64 :offset-assert 312)
(last-draw-time uint64 :offset-assert 320)
(starting-time uint64 :offset-assert 328)
(fated-time uint64 :offset-assert 336)
(focus-pos vector :inline :offset-assert 352)
(event-param-point vector :inline :offset-assert 368)
(jump-dest vector :inline :offset 368)
(focus enemy-focus :inline :offset-assert 384)
(incoming enemy-attack-info :inline :offset-assert 416)
(actor-group actor-group :offset-assert 480)
(actor-group-count int32 :offset-assert 484)
(neck joint-mod :offset-assert 488)
(on-notice symbol :offset-assert 492)
(on-active symbol :offset-assert 496)
(on-hostile symbol :offset-assert 500)
(on-death symbol :offset-assert 504)
(idle-anim-player idle-control :inline :offset-assert 512)
(rand-gen symbol :offset-assert 528)
((fact-info-override fact-info-enemy :offset 160)
(enemy-flags enemy-flag :offset-assert 208)
(enemy-info enemy-info :offset-assert 216)
(hit-points int32 :offset-assert 220)
(gnd-collide uint32 :offset-assert 224)
(attack-id uint32 :offset-assert 228)
(persistent-attack-id uint32 :offset-assert 232)
(water-max-height meters :offset-assert 236)
(water-surface-height meters :offset-assert 240)
(desired-angle degrees :offset-assert 244)
(jump-why uint64 :offset-assert 248)
(penetrated-by-all penetrate :offset-assert 256)
(penetrated-flinch penetrate :offset-assert 264)
(penetrated-knocked penetrate :offset-assert 272)
(reaction-time uint64 :offset-assert 280)
(notice-time uint64 :offset-assert 288)
(state-timeout uint64 :offset-assert 296)
(auto-reset-penetrate-time uint64 :offset-assert 304)
(hit-focus-time uint64 :offset-assert 312)
(last-draw-time uint64 :offset-assert 320)
(starting-time uint64 :offset-assert 328)
(fated-time uint64 :offset-assert 336)
(focus-pos vector :inline :offset-assert 352)
(event-param-point vector :inline :offset-assert 368)
(jump-dest vector :inline :offset 368)
(focus enemy-focus :inline :offset-assert 384)
(incoming enemy-attack-info :inline :offset-assert 416)
(actor-group actor-group :offset-assert 480)
(actor-group-count int32 :offset-assert 484)
(neck joint-mod :offset-assert 488)
(on-notice symbol :offset-assert 492)
(on-active symbol :offset-assert 496)
(on-hostile symbol :offset-assert 500)
(on-death symbol :offset-assert 504)
(idle-anim-player idle-control :inline :offset-assert 512)
(rand-gen symbol :offset-assert 528)
)
:heap-base #x1a0
:method-count-assert 137
+4 -1
View File
@@ -12,8 +12,11 @@
(define-extern talker-init (function talker-speech-class vector region none :behavior talker))
(define-extern voicebox-spawn (function process-drawable vector (pointer process)))
;; NOTE - for scene
;; NOTE - for process-taskable and scene
(declare-type process-taskable process-focusable)
(define-extern talker-displayed? (function symbol))
(define-extern kill-current-talker (function symbol pair symbol none))
(define-extern can-display-query? (function process string float symbol))
;; DECOMP BEGINS
@@ -421,9 +421,9 @@
(deftype collide-shape-prim-group (collide-shape-prim)
((num-children uint8 :offset 64)
(num-alloc-children uint8 :offset 65)
(child (inline-array collide-shape) :offset 68)
((num-children uint8 :offset 64)
(num-alloc-children uint8 :offset 65)
(child (inline-array collide-shape-prim) :offset 68)
)
:method-count-assert 20
:size-assert #x50
@@ -480,7 +480,7 @@
(collide-shape-method-47 () none 47)
(collide-shape-method-48 () none 48)
(collide-shape-method-49 (_type_ int int int) none 49)
(collide-shape-method-50 () none 50)
(collide-shape-method-50 (_type_ process object float float float) none 50)
(collide-shape-method-51 (_type_) none 51)
(water-info-init! (_type_ water-info collide-action) water-info 52)
(collide-shape-method-53 (_type_) none 53)
@@ -583,7 +583,7 @@
(set! (-> (the-as collide-shape-prim-group v0-0) num-alloc-children) arg1)
(set! (-> (the-as collide-shape-prim-group v0-0) prim-core prim-type) (prim-type group))
(set! (-> (the-as collide-shape-prim-group v0-0) child)
(the-as (inline-array collide-shape) (&+ (the-as collide-shape-prim-group v0-0) 80))
(the-as (inline-array collide-shape-prim) (&+ (the-as collide-shape-prim-group v0-0) 80))
)
(the-as collide-shape-prim-group v0-0)
)
+13 -12
View File
@@ -5,25 +5,26 @@
;; name in dgo: los-control-h
;; dgos: GAME, COMMON
;; definition of type los-control
;; decomp begins
(deftype los-control (structure)
((src-proc uint64 :offset-assert 0)
(dst-proc uint64 :offset-assert 8)
(have-los uint64 :offset-assert 16)
(have-no-los uint64 :offset-assert 24)
(check-interval uint64 :offset-assert 32)
((src-proc handle :offset-assert 0)
(dst-proc handle :offset-assert 8)
(have-los time-frame :offset-assert 16)
(have-no-los time-frame :offset-assert 24)
(check-interval time-frame :offset-assert 32)
(last-check-time time-frame :offset-assert 40)
(last-collide-result collide-tri-result :inline :offset-assert 48)
(collide-with uint32 :offset 144)
(collide-with collide-spec :offset 144)
)
:method-count-assert 14
:size-assert #x94
:flag-assert #xe00000094
(:methods
(los-control-method-9 () none 9)
(los-control-method-10 () none 10)
(los-control-method-11 () none 11)
(los-control-method-12 () none 12)
(los-control-method-13 () none 13)
(los-control-method-9 (_type_ process-focusable vector float) none :behavior process 9)
(check-los? (_type_ time-frame) symbol :behavior process 10)
(skip-check-los? (_type_ int) symbol :behavior process 11)
(set-dst-proc! (_type_ handle) none 12)
(new-source! (_type_ process time-frame collide-spec) none 13)
)
)
@@ -7,3 +7,93 @@
;; DECOMP BEGINS
(define *los-time-offset* (the-as time-frame 0))
;; WARN: Return type mismatch time-frame vs none.
(defmethod los-control-method-9 los-control ((obj los-control) (process process-focusable) (trans-vec vector) (radius float))
(when (and (>= (- (-> self clock frame-counter) (-> obj last-check-time)) (-> obj check-interval))
(-> obj src-proc)
(or process (-> obj dst-proc))
)
(let* ((process-source (handle->process (-> obj src-proc)))
(process-focus (if (type? process-source process-focusable)
(the-as process-focusable process-source)
)
)
)
(when process-focus
(when (not process)
(let ((process-dest (handle->process (-> obj dst-proc))))
(set! process (if (type? process-dest process-focusable)
(the-as process-focusable process-dest)
)
)
)
)
(when process
(let ((start-pos (new 'stack-no-clear 'vector)))
(set! (-> start-pos quad) (-> (get-trans process-focus 3) quad))
(if (not trans-vec)
(set! trans-vec (get-trans process 3))
)
(let ((distance (vector-! (new 'stack-no-clear 'vector) trans-vec start-pos))
(cquery (new 'stack-no-clear 'collide-query))
)
(set! (-> cquery start-pos quad) (-> start-pos quad))
(set! (-> cquery move-dist quad) (-> distance quad))
(let ((query cquery))
(set! (-> query radius) radius)
(set! (-> query collide-with) (-> obj collide-with))
(set! (-> query ignore-process0) process-focus)
(set! (-> query ignore-process1) process)
(set! (-> query ignore-pat) (-> process-focus root-override pat-ignore-mask))
(set! (-> query action-mask) (collide-action solid))
)
(fill-using-line-sphere *collide-cache* cquery)
(let ((f30-0 (collide-cache-method-16 *collide-cache* cquery)))
(quad-copy! (the-as pointer (-> obj last-collide-result)) (the-as pointer (-> cquery best-other-tri)) 6)
(if (>= 0.0 f30-0)
(set! (-> obj have-no-los) (-> self clock frame-counter))
(set! (-> obj have-los) (-> self clock frame-counter))
)
)
)
)
(set! (-> obj last-check-time) (-> self clock frame-counter))
)
)
)
)
(none)
)
(defmethod check-los? los-control ((obj los-control) (arg0 time-frame))
(and (>= (- (-> self clock frame-counter) (-> obj have-los)) (+ (-> obj check-interval) arg0))
(< (- (-> self clock frame-counter) (-> obj have-no-los)) (-> obj check-interval))
)
)
(defmethod skip-check-los? los-control ((obj los-control) (arg0 int))
(and (>= (- (-> self clock frame-counter) (-> obj have-no-los)) (+ (-> obj check-interval) arg0))
(< (- (-> self clock frame-counter) (-> obj have-los)) (-> obj check-interval))
)
)
(defmethod set-dst-proc! los-control ((obj los-control) (dst handle))
(set! (-> obj dst-proc) dst)
0
(none)
)
(defmethod new-source! los-control ((obj los-control) (proc process) (check-interval time-frame) (c-spec collide-spec))
(set! (-> obj src-proc) (process->handle proc))
(set! (-> obj dst-proc) (the-as handle #f))
(set! (-> obj have-los) 0)
(set! (-> obj have-no-los) 0)
(set! (-> obj last-check-time) *los-time-offset*)
(set! (-> obj check-interval) check-interval)
(set! (-> obj collide-with) c-spec)
(set! *los-time-offset* (+ *los-time-offset* 1))
0
(none)
)
@@ -7,3 +7,191 @@
;; DECOMP BEGINS
(defun drawable-sphere-box-intersect? ((drawable drawable) (bbox bounding-box4w))
(local-vars (v1-1 uint128) (v1-2 uint128) (v1-3 uint128) (a0-1 uint128) (a1-2 uint128) (a2-0 uint128))
(rlet ((vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
(vf4 :class vf)
)
(nop!)
(nop!)
(.lvf vf1 (&-> drawable bsphere quad))
(.add.w.vf vf2 vf1 vf1 :mask #b111)
(let ((v1-0 (-> bbox min quad)))
(.sub.w.vf vf1 vf1 vf1 :mask #b111)
(let ((a1-1 (-> bbox max quad)))
(.ftoi.vf vf4 vf2)
(nop!)
(.ftoi.vf vf3 vf1)
(nop!)
(.mov a0-1 vf4)
(nop!)
(.mov a2-0 vf3)
(nop!)
(.pcgtw a1-2 a2-0 a1-1)
)
(nop!)
(.pcgtw v1-1 v1-0 a0-1)
)
(nop!)
(.por v1-2 a1-2 v1-1)
(nop!)
(.ppach v1-3 (the-as uint128 0) v1-2)
(nop!)
(let ((v1-4 (shl (the-as int v1-3) 16)))
(nop!)
(zero? v1-4)
)
)
)
(defun instance-sphere-box-intersect? ((drawable drawable) (tie instance-tie) (bbox bounding-box4w))
(local-vars
(v1-3 uint128)
(v1-4 uint128)
(v1-5 uint128)
(a0-2 uint128)
(a1-2 uint128)
(a2-1 uint128)
(a3-1 uint128)
(a3-3 uint128)
(a3-4 uint128)
(t0-1 uint128)
(t0-2 uint128)
(t1-0 uint128)
(t2-1 uint128)
(t2-2 uint128)
)
(rlet ((acc :class vf)
(vf0 :class vf)
(vf1 :class vf)
(vf10 :class vf)
(vf2 :class vf)
(vf3 :class vf)
(vf4 :class vf)
(vf5 :class vf)
(vf6 :class vf)
(vf7 :class vf)
(vf8 :class vf)
(vf9 :class vf)
)
(init-vf0-vector)
(nop!)
(let ((v1-0 (-> tie max-scale)))
(nop!)
(let ((a3-0 (the-as uint128 (-> tie origin vector4h 3 long))))
(nop!)
(let ((t2-0 (the-as uint128 (-> tie origin vector4h 0 long))))
(.pextlh a3-1 a3-0 0)
(let ((t0-0 (the-as uint128 (-> tie origin vector4h 1 long))))
(.pw.sra t1-0 a3-1 10)
(let ((a3-2 (the-as uint128 (-> tie origin vector4h 2 long))))
(.pextlh t2-1 t2-0 0)
(nop!)
(.pw.sra t2-2 t2-1 16)
(nop!)
(.pextlh t0-1 t0-0 0)
(.mov vf8 t1-0)
(.pw.sra t0-2 t0-1 16)
(.mov vf5 t2-2)
(.pextlh a3-3 a3-2 0)
)
)
)
)
(.mov vf6 t0-2)
(.pw.sra a3-4 a3-3 16)
(.lvf vf9 (&-> tie bsphere quad))
(nop!)
(.mov vf7 a3-4)
(nop!)
(.mov vf10 v1-0)
)
(.itof.vf vf8 vf8)
(nop!)
(vitof12.xyzw vf5 vf5)
(nop!)
(vitof12.xyzw vf6 vf6)
(nop!)
(vitof12.xyzw vf7 vf7)
(nop!)
(.add.vf vf8 vf8 vf9 :mask #b111)
(nop!)
(nop!)
(.lvf vf9 (&-> drawable bsphere quad))
(vitof12.xyzw vf10 vf10)
(nop!)
(.mul.w.vf vf10 vf10 vf9 :mask #b1)
(nop!)
(.mul.x.vf acc vf5 vf9)
(nop!)
(.add.mul.y.vf acc vf6 vf9 acc)
(let ((v1-2 (-> bbox min quad)))
(.add.mul.z.vf acc vf7 vf9 acc)
(let ((a1-1 (-> bbox max quad)))
(.add.mul.w.vf vf1 vf8 vf0 acc)
(nop!)
(.add.x.vf vf2 vf1 vf10 :mask #b111)
(nop!)
(.sub.x.vf vf1 vf1 vf10 :mask #b111)
(nop!)
(.ftoi.vf vf4 vf2)
(nop!)
(.ftoi.vf vf3 vf1)
(nop!)
(.mov a0-2 vf4)
(nop!)
(.mov a2-1 vf3)
(nop!)
(.pcgtw a1-2 a2-1 a1-1)
)
(nop!)
(.pcgtw v1-3 v1-2 a0-2)
)
(nop!)
(.por v1-4 a1-2 v1-3)
(nop!)
(.ppach v1-5 (the-as uint128 0) v1-4)
(nop!)
(let ((v1-6 (shl (the-as int v1-5) 16)))
(nop!)
(zero? v1-6)
)
)
)
(defun instance-tfragment-add-debug-sphere ((drawable drawable) (tie instance-tie))
(local-vars (v1-1 uint128) (v1-2 uint128) (a3-0 float))
(rlet ((vf0 :class vf)
(vf10 :class vf)
(vf11 :class vf)
(vf12 :class vf)
(vf9 :class vf)
)
(init-vf0-vector)
(nop!)
(let ((v1-0 (the-as uint128 (-> tie origin vector4h 3 long))))
(.pextlh v1-1 v1-0 0)
)
(.lvf vf9 (&-> drawable bsphere quad))
(.pw.sra v1-2 v1-1 10)
(.lvf vf10 (&-> tie bsphere quad))
(nop!)
(.mov vf12 v1-2)
(.itof.vf vf12 vf12)
(nop!)
(.add.vf vf10 vf10 vf12 :mask #b111)
(nop!)
(.add.vf vf9 vf9 vf10 :mask #b111)
(nop!)
(.add.w.vf vf11 vf0 vf9 :mask #b1)
(nop!)
(.mov a3-0 vf11)
(nop!)
(let ((a2-0 (new-stack-vector0)))
(.svf (&-> a2-0 quad) vf9)
(add-debug-sphere #t (bucket-id debug2) a2-0 a3-0 (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80))
)
)
)
@@ -20,12 +20,12 @@
;; DECOMP BEGINS
(deftype base-plat (process-focusable)
((root-override collide-shape-moving :offset 128)
(smush smush-control :inline :offset-assert 208)
(basetrans vector :inline :offset-assert 240)
(bounce-time time-frame :offset-assert 256)
(bouncing symbol :offset-assert 264)
(bounce-scale meters :offset-assert 268)
((root-override-2 collide-shape-moving :offset 128)
(smush smush-control :inline :offset-assert 208)
(basetrans vector :inline :offset-assert 240)
(bounce-time time-frame :offset-assert 256)
(bouncing symbol :offset-assert 264)
(bounce-scale meters :offset-assert 268)
)
:heap-base #x90
:method-count-assert 34
+257
View File
@@ -5,5 +5,262 @@
;; name in dgo: viewer
;; dgos: ENGINE, GAME
(declare-type viewer process-drawable)
(define-extern *viewer* viewer)
;; DECOMP BEGINS
(define *viewer-sg* (new 'static 'skeleton-group
:bounds (new 'static 'vector :w 16384.0)
:lod-dist (new 'static 'array float 6 4095996000.0 0.0 0.0 0.0 0.0 0.0)
)
)
(deftype viewer (process-drawable)
((janim art-joint-anim :offset-assert 200)
)
:heap-base #x50
:method-count-assert 20
:size-assert #xcc
:flag-assert #x14005000cc
)
(defstate viewer-process (viewer)
:code (behavior ()
(until #f
(ja-no-eval :group! (-> self janim)
:num! (seek! (the float (+ (-> self janim frames num-frames) -1)))
:frame-num 0.0
)
(until (ja-done? 0)
(compute-alignment! (-> self align))
(align!
(-> self align)
(align-opts adjust-x-vel adjust-y-vel adjust-xz-vel keep-other-velocities adjust-quat)
1.0
1.0
1.0
)
(suspend)
(ja :num! (seek!))
)
)
#f
(none)
)
:post (the-as (function none :behavior viewer) ja-post)
)
(define viewer-string (new 'global 'string 64 (the-as string #f)))
(define viewer-ja-name (new 'global 'string 64 (the-as string #f)))
(define viewer-geo-name (new 'global 'string 64 (the-as string #f)))
(defun actor-get-arg! ((arg0 string) (arg1 string) (arg2 string))
(let ((s5-0 (-> arg2 data))
(gp-0 (-> arg0 data))
)
(set! (-> gp-0 0) (the-as uint 0))
(dotimes (s2-0 (- (length arg2) (+ (length arg1) 2)))
(when (= (-> s5-0 0) 45)
(let ((s1-0 #f))
(dotimes (s0-0 (length arg1))
(if (!= (-> s5-0 (+ s0-0 1)) (-> arg1 data s0-0))
(goto cfg-10)
)
)
(if (= (-> s5-0 (+ (length arg1) 1)) 45)
(set! s1-0 #t)
)
(label cfg-10)
(when s1-0
(let ((v1-22 (&+ s5-0 (+ (length arg1) 2))))
(while (and (!= (-> v1-22 0) 45) (nonzero? (-> v1-22 0)))
(set! (-> gp-0 0) (-> v1-22 0))
(set! v1-22 (&-> v1-22 1))
(set! gp-0 (&-> gp-0 1))
)
)
(set! (-> gp-0 0) (the-as uint 0))
(return #t)
)
)
)
(set! s5-0 (&-> s5-0 1))
)
)
#f
)
(defun art-part-name ((arg0 string))
(let ((gp-0 (-> arg0 data)))
(while (nonzero? (-> gp-0 0))
(when (= (-> gp-0 0) 45)
(copyn-string<-charp
viewer-string
(&-> gp-0 1)
(- (length arg0) (the-as int (+ (- -1 (the-as int (-> arg0 data))) (the-as int gp-0))))
)
(return viewer-string)
)
(set! gp-0 (&-> gp-0 1))
)
)
(clear viewer-string)
)
;; WARN: Return type mismatch object vs none.
(defbehavior init-viewer viewer ((arg0 string) (arg1 string))
(let* ((s5-0 *level*)
(s3-0 (method-of-object s5-0 art-group-get-by-name))
)
(format (clear *temp-string*) "skel-~S" arg0)
(let ((a1-3 (s3-0 s5-0 *temp-string* (the-as (pointer uint32) #f))))
(cond
(a1-3
(initialize-skeleton self (the-as skeleton-group a1-3) (the-as pair 0))
(cond
((>= (-> self skel active-channels) (the-as uint 1))
(set! (-> self janim) (-> self skel channel 0 frame-group))
)
(else
(let ((v1-8 (-> self draw art-group)))
(dotimes (a0-5 (-> v1-8 length))
(when (= (-> v1-8 data a0-5 type) art-joint-anim)
(set! (-> self janim) (the-as art-joint-anim (-> v1-8 data a0-5)))
(ja-channel-set! 1)
(goto cfg-10)
)
)
)
(go process-drawable-art-error "anim")
)
)
(label cfg-10)
(set! (-> self align) (new 'process 'align-control self))
(logior! (-> self skel status) (joint-control-status blend-shape eye-anim))
(go viewer-process)
)
(else
(actor-get-arg! viewer-ja-name "ja" arg1)
(actor-get-arg! viewer-geo-name "geo" arg1)
(let ((s2-1 (load-to-heap-by-name (-> self level art-group) arg0 #f global 0))
(s5-1 (the-as int #f))
(s4-1 (the-as int #f))
(s3-1 (the-as int #f))
)
(when s2-1
(dotimes (s1-0 (-> s2-1 length))
(cond
((not (-> s2-1 data s1-0))
)
((and (not s4-1)
(= (-> s2-1 data s1-0 type) merc-ctrl)
(or (zero? (length viewer-geo-name)) (string= (art-part-name (-> s2-1 data s1-0 name)) viewer-geo-name))
)
(set! s4-1 s1-0)
)
((= (-> s2-1 data s1-0 type) art-joint-geo)
(set! s3-1 s1-0)
)
((and (= (-> s2-1 data s1-0 type) art-joint-anim)
(or (zero? (length viewer-ja-name)) (string= (art-part-name (-> s2-1 data s1-0 name)) viewer-ja-name))
)
(set! s5-1 s1-0)
)
)
(if (and s4-1 s3-1 s5-1)
(goto cfg-44)
)
)
)
(label cfg-44)
(cond
((and s4-1 s3-1 s5-1)
(set! (-> self janim) (the-as art-joint-anim (-> s2-1 data s5-1)))
(let ((a1-13 *viewer-sg*))
(set! (-> a1-13 art-group-name) arg0)
(set! (-> a1-13 jgeo) s3-1)
(set! (-> a1-13 janim) s5-1)
(set! (-> a1-13 mgeo 0) s4-1)
(initialize-skeleton self a1-13 (the-as pair 0))
)
(set! (-> self align) (new 'process 'align-control self))
(logior! (-> self skel status) (joint-control-status blend-shape eye-anim))
(go viewer-process)
)
(else
(go process-drawable-art-error arg0)
)
)
)
)
)
)
)
(none)
)
(defmethod init-from-entity! viewer ((obj viewer) (arg0 entity-actor))
(set! *viewer* obj)
(set! (-> obj root) (new 'process 'trsqv))
(process-drawable-from-entity! obj arg0)
(let ((s4-0 (-> arg0 etype)))
(if (valid? s4-0 type #f #f 0)
(init-viewer (symbol->string (-> s4-0 symbol)) (res-lump-struct arg0 'name string))
(go process-drawable-art-error "unknown")
)
)
(none)
)
(defbehavior init-viewer-for-other viewer ((arg0 string) (arg1 vector) (arg2 entity-actor))
(set! *viewer* self)
(process-entity-set! self arg2)
(set! (-> self root) (new 'process 'trsqv))
(set! (-> self root trans quad) (-> arg1 quad))
(quaternion-identity! (-> self root quat))
(set-vector! (-> self root scale) 1.0 1.0 1.0 1.0)
(init-viewer arg0 arg0)
(none)
)
(defun add-a-bunch ((arg0 string) (arg1 int) (arg2 int) (arg3 float) (arg4 process-tree) (arg5 entity-actor))
(local-vars (sv-32 int) (sv-48 process) (sv-64 vector))
(dotimes (s0-0 arg1)
(set! sv-32 0)
(while (< sv-32 arg2)
(set! sv-64 (new 'stack-no-clear 'vector))
(set! (-> sv-64 quad) (the-as uint128 0))
(position-in-front-of-camera! sv-64 40960.0 4096.0)
(+! (-> sv-64 x) (the float (* (- s0-0 (/ arg1 2)) (the int arg3))))
(+! (-> sv-64 z) (the float (* (- sv-32 (/ arg2 2)) (the int arg3))))
(set! sv-48 (get-process *default-dead-pool* viewer #x4000))
(when sv-48
(let ((t9-2 (method-of-type viewer activate)))
(t9-2 (the-as viewer sv-48) arg4 (symbol->string (-> viewer symbol)) (the-as pointer #x70004000))
)
(let ((t9-3 run-function-in-process)
(a0-7 sv-48)
(a1-4 init-viewer-for-other)
(a2-6 arg0)
(t0-1 arg5)
)
((the-as (function object object object object object none) t9-3) a0-7 a1-4 a2-6 sv-64 t0-1)
)
(-> sv-48 ppointer)
)
(set! sv-32 (+ sv-32 1))
)
)
#f
)
;; WARN: Return type mismatch symbol vs object.
(defun birth-viewer ((arg0 process) (arg1 entity-actor))
(set! (-> arg0 type) viewer)
(init-entity arg0 arg1 (the-as process viewer))
(the-as object #t)
)
+2 -45
View File
@@ -810,42 +810,6 @@
(none)
)
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 28 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
;; WARN: Stack slot offset 32 signed mismatch
(defmethod update-vis-volumes-from-nav-mesh level-group ((obj level-group))
(local-vars
(sv-16 pointer)
@@ -943,12 +907,6 @@
(none)
)
;; WARN: Stack slot offset 20 signed mismatch
;; WARN: Stack slot offset 20 signed mismatch
;; WARN: Stack slot offset 20 signed mismatch
;; WARN: Stack slot offset 20 signed mismatch
;; WARN: Stack slot offset 20 signed mismatch
;; WARN: Stack slot offset 20 signed mismatch
(defmethod print-volume-sizes level-group ((obj level-group))
(local-vars
(sv-16 pointer)
@@ -1622,7 +1580,7 @@
)
;; WARN: Return type mismatch process vs none.
(defun init-entity ((arg0 process) (arg1 entity-actor))
(defun init-entity ((arg0 process) (arg1 entity-actor) (arg2 process))
(activate arg0 *entity-pool* (res-lump-struct arg1 'name basic) (the-as pointer #x70004000))
(set! (-> arg0 entity) arg1)
(set! (-> arg0 level) (-> arg1 extra level))
@@ -1648,7 +1606,7 @@
(set! (-> s4-0 type) s5-0)
(and s5-0 (valid? s5-0 type #f #f 0) (valid? (method-of-object s4-0 init-from-entity!) function #f #f 0))
)
(init-entity s4-0 obj)
(init-entity s4-0 obj (the-as process s5-0))
)
(else
(when (not (birth-viewer s4-0 obj))
@@ -2428,7 +2386,6 @@
)
)
;; WARN: Return type mismatch entity vs none.
;; ERROR: Unsupported inline assembly instruction kind - [mtc0 Count, r0]
;; ERROR: Unsupported inline assembly instruction kind - [sync.p]
;; ERROR: Unsupported inline assembly instruction kind - [mfc0 s4, Count]
+1 -1
View File
@@ -181,7 +181,7 @@
(defmethod relocate collide-shape-prim-group ((obj collide-shape-prim-group) (arg0 int))
(&+! (-> obj cshape) arg0)
(set! (-> obj child) (the-as (inline-array collide-shape) (&+ (the-as pointer (-> obj child)) arg0)))
(set! (-> obj child) (the-as (inline-array collide-shape-prim) (&+ (the-as pointer (-> obj child)) arg0)))
obj
)
@@ -7,3 +7,109 @@
;; DECOMP BEGINS
(defmethod login prototype-inline-array-shrub ((obj prototype-inline-array-shrub))
(let ((bsp-header (-> *level* level *level-index* bsp)))
(dotimes (shrub-idx (-> obj length))
(let ((shrub (-> obj data shrub-idx)))
(when (and *debug-segment* (-> *screen-shot-work* highres-enable))
(dotimes (shrub-i 4)
(set! (-> shrub dists data shrub-i) (+ 40960000.0 (-> shrub dists data shrub-i)))
(set! (-> shrub rdists data shrub-i) (/ 1.0 (-> shrub dists data shrub-i)))
)
)
(set! *texture-masks* (-> bsp-header shrub-masks data (-> shrub texture-masks-index)))
(dotimes (geo-i 4)
(let ((geo (-> shrub geometry geo-i)))
(if (nonzero? geo)
(login geo)
)
)
)
)
)
)
obj
)
(defmethod mem-usage prototype-array-tie ((obj prototype-array-tie) (usage memory-usage-block) (arg2 int))
(set! (-> usage length) (max 1 (-> usage length)))
(set! (-> usage data 0 name) (symbol->string 'drawable-group))
(+! (-> usage data 0 count) 1)
(let ((size-of-tie (asize-of obj)))
(+! (-> usage data 0 used) size-of-tie)
(+! (-> usage data 0 total) (logand -16 (+ size-of-tie 15)))
)
(dotimes (tie-idx (-> obj length))
(mem-usage (-> obj array-data tie-idx) usage arg2)
)
obj
)
(defmethod mem-usage prototype-bucket-tie ((obj prototype-bucket-tie) (usage memory-usage-block) (arg2 int))
(dotimes (idx 4)
(let ((tie-geom (-> obj tie-geom idx)))
(if (nonzero? tie-geom)
(mem-usage tie-geom usage (logior arg2 1))
)
)
)
(set! (-> usage length) (max 84 (-> usage length)))
(set! (-> usage data 83 name) "string")
(+! (-> usage data 83 count) 1)
(let ((name-size (asize-of (-> obj name))))
(+! (-> usage data 83 used) name-size)
(+! (-> usage data 83 total) (logand -16 (+ name-size 15)))
)
(when (nonzero? (-> obj tie-colors))
(set! (-> usage length) (max 17 (-> usage length)))
(set! (-> usage data 16 name) "tie-pal")
(+! (-> usage data 16 count) 1)
(let ((color-size (asize-of (-> obj tie-colors))))
(+! (-> usage data 16 used) color-size)
(+! (-> usage data 16 total) (logand -16 (+ color-size 15)))
)
)
(if (nonzero? (-> obj collide-hash-fragment-array))
(mem-usage (-> obj collide-hash-fragment-array) usage (logior arg2 1))
)
obj
)
(defmethod mem-usage prototype-inline-array-shrub ((obj prototype-inline-array-shrub) (usage memory-usage-block) (arg2 int))
(set! (-> usage length) (max 1 (-> usage length)))
(set! (-> usage data 0 name) (symbol->string 'drawable-group))
(+! (-> usage data 0 count) 1)
(let ((shrub-size (asize-of obj)))
(+! (-> usage data 0 used) shrub-size)
(+! (-> usage data 0 total) (logand -16 (+ shrub-size 15)))
)
(dotimes (idx (-> obj length))
(mem-usage (-> obj data idx) usage arg2)
)
obj
)
(defmethod mem-usage prototype-bucket-shrub ((obj prototype-bucket-shrub) (usage memory-usage-block) (arg2 int))
(set! (-> usage length) (max 25 (-> usage length)))
(set! (-> usage data 24 name) "prototype-bucket-shrub")
(+! (-> usage data 24 count) 1)
(let ((proto-shrub-size 112))
(+! (-> usage data 24 used) proto-shrub-size)
(+! (-> usage data 24 total) (logand -16 (+ proto-shrub-size 15)))
)
(dotimes (idx 4)
(let ((geo (-> obj geometry idx)))
(if (nonzero? geo)
(mem-usage geo usage (logior arg2 1))
)
)
)
(set! (-> usage length) (max 84 (-> usage length)))
(set! (-> usage data 83 name) "string")
(+! (-> usage data 83 count) 1)
(let ((name-size (asize-of (-> obj name))))
(+! (-> usage data 83 used) name-size)
(+! (-> usage data 83 total) (logand -16 (+ name-size 15)))
)
obj
)
@@ -36,6 +36,7 @@
:flag-assert #x900000050
)
(deftype shadow-control (basic)
((settings shadow-settings :inline :offset-assert 16)
)
@@ -48,11 +49,12 @@
(set-offset-bit (shadow-control) int 10)
(set-top-plane-offset (shadow-control float) int 11)
(set-bottom-plane-offset (shadow-control float) int 12)
(shadow-control-method-13 () none 13)
(shadow-control-method-13 (_type_ vector float float float) none 13)
(shadow-control-method-14 () none 14)
)
)
(defmethod clear-offset-bit shadow-control ((obj shadow-control))
(logclear! (-> obj settings flags) (shadow-flags disable-draw))
0
@@ -88,6 +90,7 @@
:flag-assert #x900000030
)
(deftype shadow-work (structure)
((shadow-data shadow-data :inline :offset-assert 0)
(inbuf uint128 600 :offset-assert 48)
@@ -97,6 +100,7 @@
:flag-assert #x9000025b0
)
(deftype shadow-bucket (structure)
((first uint32 :offset-assert 0)
(next uint32 :offset-assert 4)
@@ -110,6 +114,7 @@
:flag-assert #x900000014
)
(deftype shadow-globals (structure)
((num-buckets uint32 :offset-assert 0)
(cur-bucket uint32 :offset-assert 4)
@@ -120,6 +125,7 @@
:flag-assert #x900000048
)
(define *shadow-globals* (new 'global 'shadow-globals))
(deftype shadow-vertex (structure)
@@ -133,6 +139,7 @@
:flag-assert #x900000010
)
(deftype shadow-matrix-ref (structure)
((joint-0 uint8 :offset-assert 0)
(joint-1 uint8 :offset-assert 1)
@@ -164,6 +171,7 @@
:flag-assert #x900000004
)
(deftype shadow-edge (structure)
((ind-0 uint8 :offset-assert 0)
(ind-1 uint8 :offset-assert 1)
@@ -175,6 +183,7 @@
:flag-assert #x900000004
)
(deftype shadow-frag-header (structure)
((qwc-data uint32 :offset-assert 0)
(num-joints uint32 :offset-assert 4)
@@ -196,6 +205,7 @@
:flag-assert #x90000002c
)
(deftype shadow-frag-ref (structure)
((header shadow-frag-header :offset-assert 0)
(qwc uint32 :offset-assert 4)
@@ -206,6 +216,7 @@
:flag-assert #x900000008
)
(deftype shadow-geo-old (art-element)
((version uint32 :offset 20)
(header shadow-frag-header :inline :offset-assert 32)
@@ -217,6 +228,7 @@
:flag-assert #xd00000050
)
(deftype shadow-geo (art-element)
((version uint32 :offset 20)
(total-qwc uint32 :offset-assert 32)
@@ -243,6 +255,9 @@
)
(define *shadow* (the-as object #f))
(define *shadow-object* (the-as object #f))
(define *shadow-debug* (the-as object #f))
(define *shadow-dma-buf* (new 'global 'dma-buffer 512))
@@ -48,6 +48,7 @@
)
)
(deftype texture-anim (structure)
((num-layers uint32 :offset-assert 0)
(func basic :offset-assert 4)
@@ -75,6 +76,7 @@
)
)
(deftype texture-anim-array (array)
((array-data texture-anim :dynamic :offset-assert 16)
)
@@ -82,11 +84,12 @@
:size-assert #x10
:flag-assert #xb00000010
(:methods
(texture-anim-array-method-9 () none 9)
(texture-anim-array-method-9 (_type_) none 9)
(texture-anim-array-method-10 () none 10)
)
)
(deftype texture-anim-work (structure)
((erase-tmpl dma-gif-packet :inline :offset-assert 0)
(draw-tmpl dma-gif-packet :inline :offset-assert 32)
@@ -106,6 +109,7 @@
:flag-assert #x900000171
)
(deftype clut16x16 (structure)
((clut rgba 256 :offset-assert 0)
)
@@ -114,6 +118,7 @@
:flag-assert #x900000400
)
(deftype noise8x8 (structure)
((image uint8 64 :offset-assert 0)
)
@@ -122,6 +127,7 @@
:flag-assert #x900000040
)
(deftype noise16x16 (structure)
((image uint8 256 :offset-assert 0)
)
@@ -130,6 +136,7 @@
:flag-assert #x900000100
)
(deftype noise32x32 (structure)
((image uint8 1024 :offset-assert 0)
)
@@ -138,6 +145,7 @@
:flag-assert #x900000400
)
(deftype noise64x64 (structure)
((image uint8 4096 :offset-assert 0)
)
@@ -146,6 +154,7 @@
:flag-assert #x900001000
)
(deftype noise128x128 (structure)
((image uint8 16384 :offset-assert 0)
)
@@ -154,6 +163,7 @@
:flag-assert #x900004000
)
(deftype fog8x256 (structure)
((image uint8 256 :offset-assert 0)
)
@@ -162,6 +172,7 @@
:flag-assert #x900000100
)
(deftype fog-texture-work (structure)
((corner vector 4 :inline :offset-assert 0)
(const vector :inline :offset-assert 64)
@@ -180,6 +191,7 @@
:flag-assert #x90000008c
)
(define *clut-translate* (new 'static 'array uint32 64
#x3020100
#x7060504
@@ -5,39 +5,26 @@
;; name in dgo: texture-finish
;; dgos: ART, GAME
;; TODO - needs `texture-anim`
;; DECOMP BEGINS
;; failed to figure out what this is:
(setup-font-texture *texture-pool*)
(format 0 "SKIP: texture-finish anim stuff~%")
(format #t "SKIP: texture-finish anim stuff~%")
;; (let ((v1-2 (lookup-texture-by-id (new 'static 'texture-id :index #x4 :page #x70c))))
;; (when v1-2
;; (set! (-> v1-2 w) 32)
;; (set! (-> v1-2 h) 32)
;; (set! (-> v1-2 dest 0) (-> *skull-gem-texture-base* vram-block))
;; )
;; )
; ;; failed to figure out what this is:
; (let ((v1-2 (lookup-texture-by-id (new 'static 'texture-id :index #x4 :page #x70c))))
; (when v1-2
; (set! (-> v1-2 w) 32)
; (set! (-> v1-2 h) 32)
; (set! (-> v1-2 dest 0) (-> *skull-gem-texture-base* vram-block))
; )
; )
;; (texture-anim-array-method-9 *sky-texture-anim-array*)
; ;; failed to figure out what this is:
; ((method-of-object *sky-texture-anim-array* texture-anim-array-method-9))
;; (texture-anim-array-method-9 *darkjak-texture-anim-array*)
; ;; failed to figure out what this is:
; ((method-of-object *darkjak-texture-anim-array* texture-anim-array-method-9))
;; (texture-anim-array-method-9 *skull-gem-texture-anim-array*)
; ;; failed to figure out what this is:
; ((method-of-object *skull-gem-texture-anim-array* texture-anim-array-method-9))
;; (texture-anim-array-method-9 *bomb-texture-anim-array*)
; ;; failed to figure out what this is:
; ((method-of-object *bomb-texture-anim-array* texture-anim-array-method-9))
;; failed to figure out what this is:
(kmemclose)
+1 -1
View File
@@ -335,7 +335,7 @@
)
(deftype rigid-body-object (process-focusable)
((root-override collide-shape-moving :offset 128)
((root-override-2 collide-shape-moving :offset 128)
(info rigid-body-object-constants :offset-assert 204)
(flags rigid-body-object-flag :offset-assert 208)
(max-time-step float :offset-assert 216)
+30 -29
View File
@@ -332,10 +332,10 @@
(vf5 :class vf)
)
(init-vf0-vector)
(let ((v1-0 (the-as basic arg0))
(let ((v1-0 arg0)
(a0-1 1)
)
(when (= (-> (the-as collide-shape-prim v1-0) prim-core prim-type) (prim-type group))
(when (= (-> v1-0 prim-core prim-type) (prim-type group))
(let ((a0-2 (the-as collide-shape-prim-group v1-0)))
(set! v1-0 (-> a0-2 child 0))
(set! a0-1 (the-as int (-> a0-2 num-children)))
@@ -343,7 +343,7 @@
)
(while (nonzero? a0-1)
(+! a0-1 -1)
(.lvf vf5 (&-> (the-as collide-shape-prim v1-0) local-sphere quad))
(.lvf vf5 (&-> v1-0 local-sphere quad))
(.lvf vf1 (&-> arg1 vector 0 quad))
(.lvf vf2 (&-> arg1 vector 1 quad))
(.lvf vf3 (&-> arg1 vector 2 quad))
@@ -352,8 +352,8 @@
(.add.mul.y.vf acc vf2 vf5 acc)
(.add.mul.z.vf acc vf3 vf5 acc)
(.add.mul.w.vf vf5 vf4 vf0 acc :mask #b111)
(.svf (&-> (the-as collide-shape-prim v1-0) prim-core world-sphere quad) vf5)
(set! v1-0 (&+ (the-as collide-shape-prim v1-0) 80))
(.svf (&-> v1-0 prim-core world-sphere quad) vf5)
(&+! v1-0 80)
)
)
#f
@@ -475,7 +475,7 @@
(+! s4-1 -1)
(s3-0 arg0 f30-0)
(let ((v1-2 obj)
(a1-2 (-> arg0 root-override))
(a1-2 (-> arg0 root-override-2))
(f0-4 f30-0)
)
(rigid-body-method-9 (-> v1-2 state) a1-2 f0-4)
@@ -569,17 +569,17 @@
(defmethod rigid-body-object-method-31 rigid-body-object ((obj rigid-body-object) (arg0 rigid-body-object-constants))
(set! (-> obj info) arg0)
(set! (-> obj rbody) (new 'process 'rigid-body-control obj))
(collide-shape-method-46 (-> obj root-override))
(collide-shape-method-46 (-> obj root-override-2))
(rigid-body-method-25
(-> obj rbody state)
(the-as rigid-body-info (&-> (-> obj info) mass))
(-> obj root-override trans)
(-> obj root-override quat)
(-> obj root-override-2 trans)
(-> obj root-override-2 quat)
(method-of-object obj rigid-body-object-method-29)
)
(rigid-body-object-method-35 obj)
(set! (-> obj max-time-step) (-> arg0 max-time-step))
(set! (-> obj root-override max-iteration-count) (the-as uint 4))
(set! (-> obj root-override-2 max-iteration-count) (the-as uint 4))
(let ((v1-15 (-> obj skel root-channel 0)))
(set! (-> v1-15 num-func) num-func-identity)
(set! (-> v1-15 frame-num) 0.0)
@@ -608,7 +608,7 @@
(set! (-> s5-0 backup-collide-as) (-> v1-16 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-16 prim-core collide-with))
)
(set! (-> obj root-override) s5-0)
(set! (-> obj root-override-2) s5-0)
)
0
(none)
@@ -657,7 +657,7 @@
(rigid-body-object-method-30 obj)
((method-of-object obj rigid-body-object-method-36))
(let ((v1-4 (-> obj rbody))
(a1-0 (-> obj root-override))
(a1-0 (-> obj root-override-2))
)
(rigid-body-method-11 (-> v1-4 state) a1-0)
)
@@ -668,9 +668,9 @@
(defmethod rigid-body-object-method-40 rigid-body-object ((obj rigid-body-object))
(logior! (-> obj flags) (rigid-body-object-flag enable-collision))
(let ((v1-3 (-> obj root-override root-prim)))
(set! (-> v1-3 prim-core collide-as) (-> obj root-override backup-collide-as))
(set! (-> v1-3 prim-core collide-with) (-> obj root-override backup-collide-with))
(let ((v1-3 (-> obj root-override-2 root-prim)))
(set! (-> v1-3 prim-core collide-as) (-> obj root-override-2 backup-collide-as))
(set! (-> v1-3 prim-core collide-with) (-> obj root-override-2 backup-collide-with))
)
0
(none)
@@ -678,7 +678,7 @@
(defmethod rigid-body-object-method-41 rigid-body-object ((obj rigid-body-object))
(logclear! (-> obj flags) (rigid-body-object-flag enable-collision))
(let ((v1-3 (-> obj root-override root-prim)))
(let ((v1-3 (-> obj root-override-2 root-prim)))
(set! (-> v1-3 prim-core collide-as) (collide-spec))
(set! (-> v1-3 prim-core collide-with) (collide-spec))
)
@@ -690,8 +690,8 @@
(defmethod rigid-body-object-method-38 rigid-body-object ((obj rigid-body-object))
(when (not (logtest? (-> obj rbody state flags) (rigid-body-flag enable-physics)))
(logior! (-> obj rbody state flags) (rigid-body-flag enable-physics))
(rigid-body-method-26 (-> obj rbody state) (-> obj root-override trans) (-> obj root-override quat))
(vector-float*! (-> obj rbody state lin-momentum) (-> obj root-override transv) (-> obj info mass))
(rigid-body-method-26 (-> obj rbody state) (-> obj root-override-2 trans) (-> obj root-override-2 quat))
(vector-float*! (-> obj rbody state lin-momentum) (-> obj root-override-2 transv) (-> obj info mass))
(vector-reset! (-> obj rbody state ang-momentum))
)
0
@@ -735,12 +735,12 @@
(set! (-> arg0 trans w) 0.0)
(vector-reset! (-> arg0 vector 1))
(vector-reset! (-> arg0 vector 2))
(set! (-> arg0 vector 0 quad) (-> obj root-override trans quad))
(set! (-> arg0 vector 0 quad) (-> obj root-override-2 trans quad))
(when arg1
(let ((s3-0 (-> arg1 head)))
(when s3-0
(get-intersect-point (the-as vector (-> arg0 vector)) s3-0 (-> obj root-override) arg1)
(let ((s5-1 (touching-prims-entry-method-10 s3-0 (-> obj root-override) arg1)))
(get-intersect-point (the-as vector (-> arg0 vector)) s3-0 (-> obj root-override-2) arg1)
(let ((s5-1 (touching-prims-entry-method-10 s3-0 (-> obj root-override-2) arg1)))
(when s5-1
(set! (-> arg0 trans w) (the-as float (-> s5-1 prim-id)))
(vector-! (-> arg0 vector 1) (the-as vector (-> arg0 vector)) (the-as vector (-> s5-1 prim-core)))
@@ -927,7 +927,7 @@
)
(when (not (logtest? (-> obj flags) (rigid-body-object-flag player-impulse-force)))
(logior! (-> obj flags) (rigid-body-object-flag player-touching player-standing-on player-contact-force))
(set! (-> obj player-force-position quad) (-> a0-34 root trans quad))
(set! (-> obj player-force-position quad) (-> a0-34 root-override trans quad))
(vector-reset! (-> obj player-force))
(let ((f0-4 (/ 163840.0 (process-focusable-method-26 a0-34)))
(f1-1 1.0)
@@ -949,7 +949,7 @@
)
(when a0-38
(logior! (-> obj flags) (rigid-body-object-flag player-touching player-impulse-force))
(set! (-> obj player-force-position quad) (-> a0-38 root trans quad))
(set! (-> obj player-force-position quad) (-> a0-38 root-override trans quad))
(let ((f30-2 (* 0.00012207031 (the-as float (-> arg3 param 1))))
(f0-9 (/ 163840.0 (process-focusable-method-26 a0-38)))
)
@@ -976,7 +976,7 @@
:virtual #t
:trans (behavior ()
(if (and *target* (and (>= (-> self info idle-distance)
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
(vector-vector-distance (-> self root-override-2 trans) (-> *target* control trans))
)
(zero? (logand (focus-status teleporting) (-> *target* focus-status)))
)
@@ -996,11 +996,12 @@
rigid-body-object-event-handler
)
:trans (behavior ()
(if (or (not *target*) (or (< (+ 4096.0 (-> self info idle-distance))
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
)
(logtest? (focus-status teleporting) (-> *target* focus-status))
)
(if (or (not *target*)
(or (< (+ 4096.0 (-> self info idle-distance))
(vector-vector-distance (-> self root-override-2 trans) (-> *target* control trans))
)
(logtest? (focus-status teleporting) (-> *target* focus-status))
)
)
(go-virtual idle)
)
@@ -45,7 +45,8 @@
;; DECOMP BEGINS
(deftype process-focusable (process-drawable)
((focus-status focus-status :offset-assert 200)
((root-override collide-shape :offset 128)
(focus-status focus-status :offset-assert 200)
)
:heap-base #x50
:method-count-assert 27
@@ -66,7 +67,7 @@
;; WARN: Return type mismatch structure vs vector.
(defmethod get-trans process-focusable ((obj process-focusable) (arg0 int))
"@returns the `trans` [[vector]] from the process's `root` (typically either a [[trsqv]] or a [[collide-shape]]"
(let ((gp-0 (-> obj root)))
(let ((gp-0 (-> obj root-override)))
(the-as vector (cond
((zero? arg0)
(-> gp-0 trans)
@@ -75,7 +76,7 @@
(-> (the-as collide-shape-moving gp-0) gspot-pos)
)
((and (or (= arg0 2) (= arg0 3)) (type? gp-0 collide-shape))
(-> (the-as collide-shape gp-0) root-prim prim-core)
(-> gp-0 root-prim prim-core)
)
(else
(-> gp-0 trans)
@@ -86,11 +87,11 @@
)
(defmethod get-transv process-focusable ((obj process-focusable))
(-> obj root transv)
(-> obj root-override transv)
)
(defmethod get-quat process-focusable ((obj process-focusable) (arg0 int))
(-> obj root quat)
(-> obj root-override quat)
)
(defmethod process-focusable-method-23 process-focusable ((obj process-focusable) (arg0 int))
@@ -8,36 +8,36 @@
;; DECOMP BEGINS
(deftype process-taskable (process-focusable)
((task basic :offset-assert 204)
(ambient ambient-control :inline :offset-assert 208)
(neck-joint-index int32 :offset-assert 224)
(talk-message game-text-id :offset-assert 228)
(bounce-away symbol :offset-assert 232)
(will-talk symbol :offset-assert 236)
(look-at-me symbol :offset-assert 240)
(hide-during-movie symbol :offset-assert 244)
(talk-distance meters :offset-assert 248)
(talk-height meters :offset-assert 252)
(last-talk time-frame :offset-assert 256)
(want-to-say uint64 :offset-assert 264)
(birth-time time-frame :offset-assert 272)
(slave handle :offset-assert 280)
((task game-task-control :offset-assert 204)
(ambient ambient-control :inline :offset-assert 208)
(neck-joint-index int32 :offset-assert 224)
(talk-message game-text-id :offset-assert 228)
(bounce-away symbol :offset-assert 232)
(will-talk symbol :offset-assert 236)
(look-at-me symbol :offset-assert 240)
(hide-during-movie symbol :offset-assert 244)
(talk-distance meters :offset-assert 248)
(talk-height meters :offset-assert 252)
(last-talk time-frame :offset-assert 256)
(want-to-say time-frame :offset-assert 264)
(birth-time time-frame :offset-assert 272)
(slave handle :offset-assert 280)
)
:heap-base #xa0
:method-count-assert 38
:size-assert #x120
:flag-assert #x2600a00120
(:methods
(process-taskable-method-27 () none 27)
(process-taskable-method-28 () none 28)
(process-taskable-method-29 () none 29)
(process-taskable-method-30 () none 30)
(process-taskable-method-31 () none 31)
(process-taskable-method-32 () none 32)
(process-taskable-method-33 () none 33)
(process-taskable-method-34 () none 34)
(process-taskable-method-35 () none 35)
(process-taskable-method-36 () none 36)
(process-taskable-method-37 () none 37)
(hide () _type_ :state 27)
(idle () _type_ :state 28)
(active (game-task-event) _type_ :state 29)
(play-game (game-task-event) _type_ :state 30)
(process-taskable-method-31 (_type_) none 31)
(process-taskable-method-32 (_type_) none 32)
(process-taskable-method-33 (_type_) none 33)
(process-taskable-method-34 (_type_) symbol 34)
(process-taskable-method-35 (_type_) art-joint-anim 35)
(process-taskable-method-36 (_type_) none 36)
(process-taskable-method-37 (_type_) none 37)
)
)
@@ -7,3 +7,487 @@
;; DECOMP BEGINS
;; WARN: Return type mismatch process-focusable vs process-taskable.
(defmethod relocate process-taskable ((obj process-taskable) (arg0 int))
(if (nonzero? (-> obj task))
(&+! (-> obj task) arg0)
)
(the-as process-taskable ((method-of-type process-focusable relocate) obj arg0))
)
(defbehavior process-taskable-anim-loop process-taskable ((arg0 (function symbol)))
(while (begin self (arg0))
(let ((s5-0 (process-taskable-method-35 self)))
(when (!= (ja-group) s5-0)
(ja-channel-push! 1 0)
(set! (-> self skel root-channel 0 frame-group) s5-0)
)
)
(suspend)
(if (ja-group)
(ja :num! (loop!))
)
(process-taskable-method-36 self)
)
0
(none)
)
(defmethod process-taskable-method-34 process-taskable ((obj process-taskable))
#t
)
(defmethod process-taskable-method-35 process-taskable ((obj process-taskable))
(if (> (-> obj skel active-channels) 0)
(-> obj skel root-channel 0 frame-group)
)
)
(defmethod process-taskable-method-36 process-taskable ((obj process-taskable))
0
(none)
)
(defmethod process-taskable-method-37 process-taskable ((obj process-taskable))
(let ((v1-1 (-> obj draw shadow-ctrl)))
(cond
((and (-> obj draw shadow)
(zero? (-> obj draw cur-lod))
(logtest? (-> obj draw status) (draw-control-status on-screen))
)
(shadow-control-method-13 v1-1 (-> obj draw origin) -4096.0 4096.0 32768.0)
)
(else
(logior! (-> v1-1 settings flags) (shadow-flags disable-draw))
0
)
)
)
(none)
)
(defstate hide (process-taskable)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(let ((v1-0 event-type))
(the-as object (when (= v1-0 'say)
(let ((v0-0 (-> self clock frame-counter)))
(set! (-> self want-to-say) v0-0)
v0-0
)
)
)
)
)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(logior! (-> self draw status) (draw-control-status no-draw-bounds))
(let ((v1-6 (-> self root-override root-prim)))
(set! (-> v1-6 prim-core collide-as) (collide-spec))
(set! (-> v1-6 prim-core collide-with) (collide-spec))
)
0
(none)
)
:exit (behavior ()
(logclear! (-> self draw status) (draw-control-status no-draw-bounds))
(let ((v1-3 (-> self root-override root-prim)))
(set! (-> v1-3 prim-core collide-as) (-> self root-override backup-collide-as))
(set! (-> v1-3 prim-core collide-with) (-> self root-override backup-collide-with))
)
(none)
)
:trans (behavior ()
(let ((v1-1 (game-task-control-method-9 (-> self task))))
(if (and (nonzero? (-> v1-1 action)) (or (not (logtest? (-> self draw status) (draw-control-status on-screen)))
(logtest? (-> v1-1 flags) (game-task-flags gatflag-01))
(< (- (-> self clock frame-counter) (-> self birth-time)) (seconds 0.1))
)
)
(go-virtual idle)
)
)
(none)
)
:code (the-as (function none :behavior process-taskable) sleep-code)
)
(defstate idle (process-taskable)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(let ((v1-0 event-type))
(the-as
object
(cond
((= v1-0 'attack)
(when (-> self bounce-away)
(let ((a1-3 (new 'stack-no-clear 'event-message-block)))
(set! (-> a1-3 from) (process->ppointer self))
(set! (-> a1-3 num-params) 2)
(set! (-> a1-3 message) 'shove)
(set! (-> a1-3 param 0) (the-as uint #f))
(let ((v1-5 (new 'static 'attack-info :mask (attack-info-mask shove-back shove-up id))))
(let* ((a2-2 *game-info*)
(a3-2 (+ (-> a2-2 attack-id) 1))
)
(set! (-> a2-2 attack-id) a3-2)
(set! (-> v1-5 id) a3-2)
)
(set! (-> v1-5 shove-back) 12288.0)
(set! (-> v1-5 shove-up) 4096.0)
(set! (-> a1-3 param 1) (the-as uint v1-5))
)
(send-event-function proc a1-3)
)
)
)
((= v1-0 'touch)
(collide-shape-method-50 (-> self root-override) proc (-> event param 0) 0.7 6144.0 16384.0)
)
;; TODO - manually fixed!
((= v1-0 'say)
(set! (-> self want-to-say) (-> self clock frame-counter))
)
)
)
)
)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(none)
)
:exit (behavior ()
(logclear! (-> self draw status) (draw-control-status no-draw))
(none)
)
:trans (behavior ()
(let ((gp-0 (game-task-control-method-9 (-> self task))))
(cond
((= (-> gp-0 action) (game-task-action hide))
(if (or (not (logtest? (-> self draw status) (draw-control-status on-screen)))
(logtest? (-> gp-0 flags) (game-task-flags gatflag-01))
)
(go-virtual hide)
)
)
((or (not *target*) *scene-player*)
)
((not (-> self will-talk))
(if (>= (- (-> *display* game-clock frame-counter) (-> self last-talk)) (seconds 5))
(set! (-> self will-talk) #t)
)
)
((and (-> gp-0 scene)
(begin
(if (not (or (demo?)
(= (-> gp-0 action) (game-task-action play))
(-> *setting-control* user-current movie-name)
(name= (-> gp-0 scene) (-> *setting-control* user-current movie-name))
)
)
(gui-control-method-12
*gui-control*
self
(gui-channel art-load)
(gui-action queue)
(the-as string (-> gp-0 scene))
0
-99.0
(new 'static 'sound-id)
)
)
(and (zero? (logand (focus-status dead in-air in-head pole flut tube pilot mech dark) (-> *target* focus-status)))
(and (or (and (< (-> (target-pos 0) y) (+ (-> self root-override root-prim prim-core world-sphere y) (-> self talk-height)))
(let ((s5-0 (get-trans self 2))
(f30-0 (if (= (-> gp-0 distance) 0.0)
(-> self talk-distance)
(-> gp-0 distance)
)
)
)
(< (vector-vector-distance (target-pos 0) s5-0) f30-0)
)
)
(< (- (-> self clock frame-counter) (-> self want-to-say)) (seconds 4))
)
(or (not (load-in-progress? *level*)) (= (-> gp-0 action) (game-task-action say)))
(and (not (movie?))
(not (talker-displayed?))
(none-reserved? *art-control*)
(not *progress-process*)
(not (-> *setting-control* user-current movie))
)
)
)
)
)
(when (and (or (= (-> gp-0 action) (game-task-action say))
(= (-> gp-0 action) (game-task-action talk))
(= (-> gp-0 action) (game-task-action shade))
(= (-> gp-0 action) (game-task-action play))
)
(process-taskable-method-34 self)
)
(when (or (= (-> gp-0 action) (game-task-action say))
(< (- (-> self clock frame-counter) (-> self want-to-say)) (seconds 4))
)
(case (-> gp-0 action)
(((game-task-action play))
(go-virtual play-game gp-0)
)
(else
(go-virtual active gp-0)
)
)
)
(kill-current-talker (the-as symbol '()) '(daxter voicebox ambient) 'exit)
(talker-surpress!)
(when (can-display-query? self (the-as string #f) -99.0)
(let ((s5-1 (new
'stack
'font-context
*font-default-matrix*
32
280
0.0
(font-color default-#cddbcd)
(font-flags shadow kerning)
)
)
)
(let ((v1-84 s5-1))
(set! (-> v1-84 width) (the float (the-as float #x154)))
)
(let ((v1-85 s5-1))
(set! (-> v1-85 height) (the float (the-as float #x50)))
)
(let ((v1-86 s5-1))
(set! (-> v1-86 scale) 0.9)
)
(set! (-> s5-1 flags) (font-flags shadow kerning left large))
(print-game-text (lookup-text! *common-text* (-> self talk-message) #f) s5-1 #f 44 320)
)
(when (cpad-pressed? 0 triangle)
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle))
(case (-> gp-0 action)
(((game-task-action play))
(go-virtual play-game gp-0)
)
(else
(go-virtual active gp-0)
)
)
)
)
)
)
)
)
(process-taskable-method-37 self)
(none)
)
:code (behavior ()
(process-taskable-anim-loop true-func)
(none)
)
:post (behavior ()
(if (and (-> self hide-during-movie) (movie?))
(logior! (-> self draw status) (draw-control-status no-draw))
(logclear! (-> self draw status) (draw-control-status no-draw))
)
(when (-> self look-at-me)
(if *target*
(look-at! (-> *target* neck) (get-trans self 2) 'nothing-special self)
)
)
(transform-post)
(none)
)
)
(defstate active (process-taskable)
:virtual #t
:event (-> (method-of-type process-taskable hide) event)
:enter (behavior ((arg0 game-task-event))
(set! (-> self want-to-say) 0)
(process-entity-status! self (entity-perm-status no-kill) #t)
(logclear! (-> self mask) (process-mask actor-pause))
(none)
)
:exit (behavior ()
(set! (-> self last-talk) (-> *display* game-clock frame-counter))
(if (< (- (-> self clock frame-counter) (-> self want-to-say)) (seconds 4))
(set! (-> self will-talk) #t)
(set! (-> self will-talk) #f)
)
(process-entity-status! self (entity-perm-status no-kill) #f)
(logior! (-> self mask) (process-mask actor-pause))
(logclear! (-> self draw status) (draw-control-status no-draw))
(let ((v1-13 (-> self root-override root-prim)))
(set! (-> v1-13 prim-core collide-as) (-> self root-override backup-collide-as))
(set! (-> v1-13 prim-core collide-with) (-> self root-override backup-collide-with))
)
(none)
)
:code (behavior ((arg0 game-task-event))
(when (-> arg0 scene)
(let ((gp-1 (ppointer->handle (process-spawn scene-player :init scene-player-init (-> arg0 scene) #t #f))))
(while (and (handle->process (the-as handle gp-1)) (not (movie?)))
(suspend)
)
(logior! (-> self draw status) (draw-control-status no-draw))
(let ((v1-17 (-> self root-override root-prim)))
(set! (-> v1-17 prim-core collide-as) (collide-spec))
(set! (-> v1-17 prim-core collide-with) (collide-spec))
)
0
(while (handle->process (the-as handle gp-1))
(suspend)
)
)
)
(go-virtual hide)
(none)
)
)
(defstate play-game (process-taskable)
:virtual #t
:enter (-> (method-of-type process-taskable active) enter)
:exit (-> (method-of-type process-taskable active) exit)
:code (behavior ((arg0 game-task-event))
(let ((gp-0 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-0) (seconds 0.5))
(suspend)
)
)
(go-virtual hide)
(none)
)
:post (-> (method-of-type process-taskable idle) post)
)
(defmethod process-taskable-method-31 process-taskable ((obj process-taskable))
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 3) 0)))
(set! (-> s5-0 total-prims) (the-as uint 4))
(set! (-> s4-0 prim-core collide-as) (collide-spec civilian))
(set! (-> s4-0 prim-core action) (collide-action solid no-standon))
(set! (-> s4-0 transform-index) 0)
(set-vector! (-> s4-0 local-sphere) 0.0 -1024.0 0.0 7372.8)
(set! (-> s5-0 root-prim) s4-0)
)
(let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-7 prim-core collide-as) (collide-spec civilian))
(set! (-> v1-7 prim-core action) (collide-action solid))
(set! (-> v1-7 transform-index) 0)
(set-vector! (-> v1-7 local-sphere) 0.0 -4096.0 0.0 4096.0)
)
(let ((v1-9 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-9 prim-core collide-as) (collide-spec civilian))
(set! (-> v1-9 prim-core action) (collide-action solid))
(set! (-> v1-9 transform-index) 0)
(set-vector! (-> v1-9 local-sphere) 0.0 -1024.0 0.0 4096.0)
)
(let ((v1-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-11 prim-core collide-as) (collide-spec civilian))
(set! (-> v1-11 prim-core action) (collide-action solid no-standon))
(set! (-> v1-11 transform-index) 0)
(set-vector! (-> v1-11 local-sphere) 0.0 2048.0 0.0 4096.0)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-14 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-14 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-14 prim-core collide-with))
)
(set! (-> obj root-override) s5-0)
)
0
(none)
)
(defmethod process-taskable-method-32 process-taskable ((obj process-taskable))
(logior! (-> obj skel status) (joint-control-status eye-anim))
(set! (-> obj talk-message) (game-text-id text-x181))
(set! (-> obj bounce-away) #t)
(set! (-> obj will-talk) #t)
(set! (-> obj look-at-me) #t)
(set! (-> obj hide-during-movie) #t)
(set! (-> obj neck-joint-index) -1)
(set! (-> obj talk-distance) (res-lump-float (-> obj entity) 'distance :default 32768.0))
(set! (-> obj talk-height) (res-lump-float (-> obj entity) 'height :default 8192.0))
(set! (-> obj slave) (the-as handle #f))
(set! (-> obj draw shadow-ctrl)
(new 'process 'shadow-control 0.0 0.0 614400.0 0.000000000000000000000000000000000000000000084 245760.0)
)
(let ((s5-0 0))
(let ((v1-15 (the-as joint (get-art-by-name-method (-> obj draw jgeo) "main" (the-as type #f)))))
(if v1-15
(set! s5-0 (+ (-> v1-15 number) 1))
)
)
(let ((v1-19 (the-as collide-shape-prim-group (-> obj root-override root-prim))))
(set! (-> v1-19 transform-index) s5-0)
(dotimes (a0-7 (the-as int (-> v1-19 num-children)))
(set! (-> v1-19 child a0-7 transform-index) s5-0)
)
)
)
0
(none)
)
(defmethod process-taskable-method-33 process-taskable ((obj process-taskable))
0
(none)
)
;; WARN: Return type mismatch object vs none.
(defmethod init-from-entity! process-taskable ((obj process-taskable) (arg0 entity-actor))
(stack-size-set! (-> obj main-thread) 512)
(process-taskable-method-31 obj)
(process-drawable-from-entity! obj arg0)
(set! (-> obj task)
(new 'process 'game-task-control (res-lump-value arg0 'task-actor game-task-actor :time -1000000000.0))
)
(process-taskable-method-33 obj)
(process-taskable-method-32 obj)
(when (logtest? #x1000000 (res-lump-value arg0 'options uint128 :time -1000000000.0))
(let* ((s5-1 *level*)
(s4-2 (method-of-object s5-1 art-group-get-by-name))
)
(format (clear *temp-string*) "skel-~S" (-> obj draw art-group name))
(let ((s4-3 (s4-2 s5-1 *temp-string* (the-as (pointer uint32) #f))))
(when s4-3
(let* ((s3-2 (get-process *default-dead-pool* manipy #x4000))
(s5-2
(when s3-2
(let ((t9-12 (method-of-type manipy activate)))
(t9-12 (the-as manipy s3-2) obj (symbol->string (-> manipy symbol)) (the-as pointer #x70004000))
)
(let ((t9-13 run-function-in-process)
(a0-14 s3-2)
(a1-10 manipy-init)
(a2-9 (-> obj root-override trans))
(a3-3 (-> obj entity))
(t1-2 #f)
)
0
((the-as (function object object object object object object none) t9-13) a0-14 a1-10 a2-9 a3-3 s4-3 t1-2)
)
(-> s3-2 ppointer)
)
)
)
(send-event (ppointer->process s5-2) 'anim-mode 'mirror)
(send-event (ppointer->process s5-2) 'mirror #t)
)
)
)
)
)
(set! (-> obj event-hook) (-> (method-of-object obj idle) event))
(go (method-of-object obj hide))
(none)
)
+1 -1
View File
@@ -11,7 +11,7 @@ args = parser.parse_args()
throw_error = False
# TODO - if more code is added here overtime, be smarter about this / group errors
method_split_pattern = re.compile('method-of-type')
method_split_pattern = re.compile('method-of-(?:type|object)')
function_split_pattern = re.compile('\(t9-\d+(?:\s+[^\s]+\s*)?\)')
missing_res_tag_pattern = re.compile('.pcpyud')
decompiler_error_pattern = re.compile(';; ERROR')
+5 -5
View File
@@ -993,9 +993,9 @@
)
(deftype collide-shape-prim-group (collide-shape-prim)
((num-children uint8 :offset 64)
(num-alloc-children uint8 :offset 65)
(child (inline-array collide-shape) :offset 68)
((num-children uint8 :offset 64)
(num-alloc-children uint8 :offset 65)
(child (inline-array collide-shape-prim) :offset 68)
)
:method-count-assert 20
:size-assert #x50
@@ -1299,7 +1299,7 @@
(collide-shape-method-47 () none 47)
(collide-shape-method-48 () none 48)
(collide-shape-method-49 (_type_ int int int) none 49)
(collide-shape-method-50 () none 50)
(collide-shape-method-50 (_type_ process object float float float) none 50)
(collide-shape-method-51 (_type_) none 51)
(water-info-init! (_type_ water-info collide-action) water-info 52)
(collide-shape-method-53 (_type_) none 53)
@@ -1909,7 +1909,7 @@
(set! (-> (the-as collide-shape-prim-group v0-0) num-alloc-children) arg1)
(set! (-> (the-as collide-shape-prim-group v0-0) prim-core prim-type) (prim-type group))
(set! (-> (the-as collide-shape-prim-group v0-0) child)
(the-as (inline-array collide-shape) (&+ (the-as collide-shape-prim-group v0-0) 80))
(the-as (inline-array collide-shape-prim) (&+ (the-as collide-shape-prim-group v0-0) 80))
)
(the-as collide-shape-prim-group v0-0)
)
+11 -11
View File
@@ -3,24 +3,24 @@
;; definition of type los-control
(deftype los-control (structure)
((src-proc uint64 :offset-assert 0)
(dst-proc uint64 :offset-assert 8)
(have-los uint64 :offset-assert 16)
(have-no-los uint64 :offset-assert 24)
(check-interval uint64 :offset-assert 32)
((src-proc handle :offset-assert 0)
(dst-proc handle :offset-assert 8)
(have-los time-frame :offset-assert 16)
(have-no-los time-frame :offset-assert 24)
(check-interval time-frame :offset-assert 32)
(last-check-time time-frame :offset-assert 40)
(last-collide-result collide-tri-result :inline :offset-assert 48)
(collide-with uint32 :offset 144)
(collide-with collide-spec :offset 144)
)
:method-count-assert 14
:size-assert #x94
:flag-assert #xe00000094
(:methods
(los-control-method-9 () none 9)
(los-control-method-10 () none 10)
(los-control-method-11 () none 11)
(los-control-method-12 () none 12)
(los-control-method-13 () none 13)
(los-control-method-9 (_type_ process-focusable vector float) none :behavior process 9)
(check-los? (_type_ time-frame) symbol :behavior process 10)
(skip-check-los? (_type_ int) symbol :behavior process 11)
(set-dst-proc! (_type_ handle) none 12)
(new-source! (_type_ process time-frame collide-spec) none 13)
)
)
+102
View File
@@ -0,0 +1,102 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for symbol *los-time-offset*, type time-frame
(define *los-time-offset* (the-as time-frame 0))
;; definition for method 9 of type los-control
;; INFO: Used lq/sq
;; WARN: Return type mismatch time-frame vs none.
(defmethod los-control-method-9 los-control ((obj los-control) (process process-focusable) (trans-vec vector) (radius float))
(when (and (>= (- (-> self clock frame-counter) (-> obj last-check-time)) (-> obj check-interval))
(-> obj src-proc)
(or process (-> obj dst-proc))
)
(let* ((process-source (handle->process (-> obj src-proc)))
(process-focus (if (type? process-source process-focusable)
(the-as process-focusable process-source)
)
)
)
(when process-focus
(when (not process)
(let ((process-dest (handle->process (-> obj dst-proc))))
(set! process (if (type? process-dest process-focusable)
(the-as process-focusable process-dest)
)
)
)
)
(when process
(let ((start-pos (new 'stack-no-clear 'vector)))
(set! (-> start-pos quad) (-> (get-trans process-focus 3) quad))
(if (not trans-vec)
(set! trans-vec (get-trans process 3))
)
(let ((distance (vector-! (new 'stack-no-clear 'vector) trans-vec start-pos))
(cquery (new 'stack-no-clear 'collide-query))
)
(set! (-> cquery start-pos quad) (-> start-pos quad))
(set! (-> cquery move-dist quad) (-> distance quad))
(let ((query cquery))
(set! (-> query radius) radius)
(set! (-> query collide-with) (-> obj collide-with))
(set! (-> query ignore-process0) process-focus)
(set! (-> query ignore-process1) process)
(set! (-> query ignore-pat) (-> process-focus root-override pat-ignore-mask))
(set! (-> query action-mask) (collide-action solid))
)
(fill-using-line-sphere *collide-cache* cquery)
(let ((f30-0 (collide-cache-method-16 *collide-cache* cquery)))
(quad-copy! (the-as pointer (-> obj last-collide-result)) (the-as pointer (-> cquery best-other-tri)) 6)
(if (>= 0.0 f30-0)
(set! (-> obj have-no-los) (-> self clock frame-counter))
(set! (-> obj have-los) (-> self clock frame-counter))
)
)
)
)
(set! (-> obj last-check-time) (-> self clock frame-counter))
)
)
)
)
(none)
)
;; definition for method 10 of type los-control
(defmethod check-los? los-control ((obj los-control) (arg0 time-frame))
(and (>= (- (-> self clock frame-counter) (-> obj have-los)) (+ (-> obj check-interval) arg0))
(< (- (-> self clock frame-counter) (-> obj have-no-los)) (-> obj check-interval))
)
)
;; definition for method 11 of type los-control
(defmethod skip-check-los? los-control ((obj los-control) (arg0 int))
(and (>= (- (-> self clock frame-counter) (-> obj have-no-los)) (+ (-> obj check-interval) arg0))
(< (- (-> self clock frame-counter) (-> obj have-los)) (-> obj check-interval))
)
)
;; definition for method 12 of type los-control
;; WARN: Return type mismatch int vs none.
(defmethod set-dst-proc! los-control ((obj los-control) (dst handle))
(set! (-> obj dst-proc) dst)
0
(none)
)
;; definition for method 13 of type los-control
;; WARN: Return type mismatch int vs none.
(defmethod new-source! los-control ((obj los-control) (proc process) (check-interval time-frame) (c-spec collide-spec))
(set! (-> obj src-proc) (process->handle proc))
(set! (-> obj dst-proc) (the-as handle #f))
(set! (-> obj have-los) 0)
(set! (-> obj have-no-los) 0)
(set! (-> obj last-check-time) *los-time-offset*)
(set! (-> obj check-interval) check-interval)
(set! (-> obj collide-with) c-spec)
(set! *los-time-offset* (+ *los-time-offset* 1))
0
(none)
)
+201
View File
@@ -0,0 +1,201 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for function drawable-sphere-box-intersect?
;; INFO: Used lq/sq
(defun drawable-sphere-box-intersect? ((drawable drawable) (bbox bounding-box4w))
(local-vars (v1-1 uint128) (v1-2 uint128) (v1-3 uint128) (a0-1 uint128) (a1-2 uint128) (a2-0 uint128))
(rlet ((vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
(vf4 :class vf)
)
(nop!)
(nop!)
(.lvf vf1 (&-> drawable bsphere quad))
(.add.w.vf vf2 vf1 vf1 :mask #b111)
(let ((v1-0 (-> bbox min quad)))
(.sub.w.vf vf1 vf1 vf1 :mask #b111)
(let ((a1-1 (-> bbox max quad)))
(.ftoi.vf vf4 vf2)
(nop!)
(.ftoi.vf vf3 vf1)
(nop!)
(.mov a0-1 vf4)
(nop!)
(.mov a2-0 vf3)
(nop!)
(.pcgtw a1-2 a2-0 a1-1)
)
(nop!)
(.pcgtw v1-1 v1-0 a0-1)
)
(nop!)
(.por v1-2 a1-2 v1-1)
(nop!)
(.ppach v1-3 (the-as uint128 0) v1-2)
(nop!)
(let ((v1-4 (shl (the-as int v1-3) 16)))
(nop!)
(zero? v1-4)
)
)
)
;; definition for function instance-sphere-box-intersect?
;; INFO: Used lq/sq
(defun instance-sphere-box-intersect? ((drawable drawable) (tie instance-tie) (bbox bounding-box4w))
(local-vars
(v1-3 uint128)
(v1-4 uint128)
(v1-5 uint128)
(a0-2 uint128)
(a1-2 uint128)
(a2-1 uint128)
(a3-1 uint128)
(a3-3 uint128)
(a3-4 uint128)
(t0-1 uint128)
(t0-2 uint128)
(t1-0 uint128)
(t2-1 uint128)
(t2-2 uint128)
)
(rlet ((acc :class vf)
(vf0 :class vf)
(vf1 :class vf)
(vf10 :class vf)
(vf2 :class vf)
(vf3 :class vf)
(vf4 :class vf)
(vf5 :class vf)
(vf6 :class vf)
(vf7 :class vf)
(vf8 :class vf)
(vf9 :class vf)
)
(init-vf0-vector)
(nop!)
(let ((v1-0 (-> tie max-scale)))
(nop!)
(let ((a3-0 (the-as uint128 (-> tie origin vector4h 3 long))))
(nop!)
(let ((t2-0 (the-as uint128 (-> tie origin vector4h 0 long))))
(.pextlh a3-1 a3-0 0)
(let ((t0-0 (the-as uint128 (-> tie origin vector4h 1 long))))
(.pw.sra t1-0 a3-1 10)
(let ((a3-2 (the-as uint128 (-> tie origin vector4h 2 long))))
(.pextlh t2-1 t2-0 0)
(nop!)
(.pw.sra t2-2 t2-1 16)
(nop!)
(.pextlh t0-1 t0-0 0)
(.mov vf8 t1-0)
(.pw.sra t0-2 t0-1 16)
(.mov vf5 t2-2)
(.pextlh a3-3 a3-2 0)
)
)
)
)
(.mov vf6 t0-2)
(.pw.sra a3-4 a3-3 16)
(.lvf vf9 (&-> tie bsphere quad))
(nop!)
(.mov vf7 a3-4)
(nop!)
(.mov vf10 v1-0)
)
(.itof.vf vf8 vf8)
(nop!)
(vitof12.xyzw vf5 vf5)
(nop!)
(vitof12.xyzw vf6 vf6)
(nop!)
(vitof12.xyzw vf7 vf7)
(nop!)
(.add.vf vf8 vf8 vf9 :mask #b111)
(nop!)
(nop!)
(.lvf vf9 (&-> drawable bsphere quad))
(vitof12.xyzw vf10 vf10)
(nop!)
(.mul.w.vf vf10 vf10 vf9 :mask #b1)
(nop!)
(.mul.x.vf acc vf5 vf9)
(nop!)
(.add.mul.y.vf acc vf6 vf9 acc)
(let ((v1-2 (-> bbox min quad)))
(.add.mul.z.vf acc vf7 vf9 acc)
(let ((a1-1 (-> bbox max quad)))
(.add.mul.w.vf vf1 vf8 vf0 acc)
(nop!)
(.add.x.vf vf2 vf1 vf10 :mask #b111)
(nop!)
(.sub.x.vf vf1 vf1 vf10 :mask #b111)
(nop!)
(.ftoi.vf vf4 vf2)
(nop!)
(.ftoi.vf vf3 vf1)
(nop!)
(.mov a0-2 vf4)
(nop!)
(.mov a2-1 vf3)
(nop!)
(.pcgtw a1-2 a2-1 a1-1)
)
(nop!)
(.pcgtw v1-3 v1-2 a0-2)
)
(nop!)
(.por v1-4 a1-2 v1-3)
(nop!)
(.ppach v1-5 (the-as uint128 0) v1-4)
(nop!)
(let ((v1-6 (shl (the-as int v1-5) 16)))
(nop!)
(zero? v1-6)
)
)
)
;; definition for function instance-tfragment-add-debug-sphere
;; INFO: Used lq/sq
(defun instance-tfragment-add-debug-sphere ((drawable drawable) (tie instance-tie))
(local-vars (v1-1 uint128) (v1-2 uint128) (a3-0 float))
(rlet ((vf0 :class vf)
(vf10 :class vf)
(vf11 :class vf)
(vf12 :class vf)
(vf9 :class vf)
)
(init-vf0-vector)
(nop!)
(let ((v1-0 (the-as uint128 (-> tie origin vector4h 3 long))))
(.pextlh v1-1 v1-0 0)
)
(.lvf vf9 (&-> drawable bsphere quad))
(.pw.sra v1-2 v1-1 10)
(.lvf vf10 (&-> tie bsphere quad))
(nop!)
(.mov vf12 v1-2)
(.itof.vf vf12 vf12)
(nop!)
(.add.vf vf10 vf10 vf12 :mask #b111)
(nop!)
(.add.vf vf9 vf9 vf10 :mask #b111)
(nop!)
(.add.w.vf vf11 vf0 vf9 :mask #b1)
(nop!)
(.mov a3-0 vf11)
(nop!)
(let ((a2-0 (new-stack-vector0)))
(.svf (&-> a2-0 quad) vf9)
(add-debug-sphere #t (bucket-id debug2) a2-0 a3-0 (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80))
)
)
)
+6 -6
View File
@@ -3,12 +3,12 @@
;; definition of type base-plat
(deftype base-plat (process-focusable)
((root-override collide-shape-moving :offset 128)
(smush smush-control :inline :offset-assert 208)
(basetrans vector :inline :offset-assert 240)
(bounce-time time-frame :offset-assert 256)
(bouncing symbol :offset-assert 264)
(bounce-scale meters :offset-assert 268)
((root-override-2 collide-shape-moving :offset 128)
(smush smush-control :inline :offset-assert 208)
(basetrans vector :inline :offset-assert 240)
(bounce-time time-frame :offset-assert 256)
(bouncing symbol :offset-assert 264)
(bounce-scale meters :offset-assert 268)
)
:heap-base #x90
:method-count-assert 34
+14 -14
View File
@@ -76,11 +76,11 @@
(logclear! (-> obj button-status) (button-status button-status-2))
(if vec
(set! (-> obj move-to-pos quad) (-> vec quad))
(set! (-> obj move-to-pos quad) (-> obj root trans quad))
(set! (-> obj move-to-pos quad) (-> obj root-override trans quad))
)
(if quat
(quaternion-copy! (-> obj move-to-quat) quat)
(quaternion-copy! (-> obj move-to-quat) (-> obj root quat))
(quaternion-copy! (-> obj move-to-quat) (-> obj root-override quat))
)
0
(none)
@@ -146,8 +146,8 @@
:post (behavior ()
(when (logtest? (-> self button-status) (button-status button-status-2))
(logclear! (-> self button-status) (button-status button-status-2))
(set! (-> self root trans quad) (-> self move-to-pos quad))
(quaternion-copy! (-> self root quat) (-> self move-to-quat))
(set! (-> self root-override trans quad) (-> self move-to-pos quad))
(quaternion-copy! (-> self root-override quat) (-> self move-to-quat))
(rider-post)
)
(none)
@@ -196,8 +196,8 @@
:post (behavior ()
(when (logtest? (-> self button-status) (button-status button-status-2))
(logclear! (-> self button-status) (button-status button-status-2))
(set! (-> self root trans quad) (-> self move-to-pos quad))
(quaternion-copy! (-> self root quat) (-> self move-to-quat))
(set! (-> self root-override trans quad) (-> self move-to-pos quad))
(quaternion-copy! (-> self root-override quat) (-> self move-to-quat))
)
(rider-post)
(none)
@@ -250,8 +250,8 @@
:post (behavior ()
(when (logtest? (-> self button-status) (button-status button-status-2))
(logclear! (-> self button-status) (button-status button-status-2))
(set! (-> self root trans quad) (-> self move-to-pos quad))
(quaternion-copy! (-> self root quat) (-> self move-to-quat))
(set! (-> self root-override trans quad) (-> self move-to-pos quad))
(quaternion-copy! (-> self root-override quat) (-> self move-to-quat))
(rider-post)
)
(none)
@@ -292,8 +292,8 @@
:post (behavior ()
(when (logtest? (-> self button-status) (button-status button-status-2))
(logclear! (-> self button-status) (button-status button-status-2))
(set! (-> self root trans quad) (-> self move-to-pos quad))
(quaternion-copy! (-> self root quat) (-> self move-to-quat))
(set! (-> self root-override trans quad) (-> self move-to-pos quad))
(quaternion-copy! (-> self root-override quat) (-> self move-to-quat))
)
(rider-post)
(none)
@@ -443,7 +443,7 @@
(set! (-> collision-shape backup-collide-as) (-> prim prim-core collide-as))
(set! (-> collision-shape backup-collide-with) (-> prim prim-core collide-with))
)
(set! (-> obj root) collision-shape)
(set! (-> obj root-override) collision-shape)
)
0
(none)
@@ -516,9 +516,9 @@
(set! (-> self actor-group) (the-as (pointer actor-group) #f))
(set! (-> self actor-group-count) 0)
(basebutton-method-34 self)
(set! (-> self root trans quad) (-> vec quad))
(quaternion-copy! (-> self root quat) quat)
(set-vector! (-> self root scale) 1.0 1.0 1.0 1.0)
(set! (-> self root-override trans quad) (-> vec quad))
(quaternion-copy! (-> self root-override quat) quat)
(set-vector! (-> self root-override scale) 1.0 1.0 1.0 1.0)
(prepare-trigger-event! self)
(basebutton-method-33 self)
(idle-state-transition self)
+70 -51
View File
@@ -533,7 +533,7 @@
(go-virtual die #f (the-as int s5-0))
)
(else
(when (and (!= s4-0 (-> self incoming-attack-id)) (= (-> self root trans y) (-> self base y)))
(when (and (!= s4-0 (-> self incoming-attack-id)) (= (-> self root-override trans y) (-> self base y)))
(if (not (and (demo?) (= (-> *setting-control* user-current language) (language-enum japanese))))
(talker-spawn-func (-> *talker-speech* 313) *entity-pool* (target-pos 0) (the-as region #f))
)
@@ -562,7 +562,7 @@
(go-virtual die #f (the-as int s5-0))
)
(else
(when (and (!= s4-0 (-> self incoming-attack-id)) (= (-> self root trans y) (-> self base y)))
(when (and (!= s4-0 (-> self incoming-attack-id)) (= (-> self root-override trans y) (-> self base y)))
(talker-spawn-func (-> *talker-speech* 318) *entity-pool* (target-pos 0) (the-as region #f))
(set! (-> self incoming-attack-id) s4-0)
(if (not (!= (-> self smush amp) 0.0))
@@ -638,7 +638,7 @@
)
)
(('bonk)
(when (= (-> self root trans y) (-> self base y))
(when (= (-> self root-override trans y) (-> self base y))
(activate! (-> self smush) -0.1 75 150 1.0 1.0 (-> self clock))
(go-virtual bounce-on)
)
@@ -658,7 +658,7 @@
(or (= v1-131 'notice-blue) (= v1-131 'die))
)
)
(!= (-> self root trans y) (-> self base y))
(!= (-> self root-override trans y) (-> self base y))
)
)
(go-virtual notice-blue (process->handle arg0))
@@ -666,7 +666,7 @@
)
(('fall)
(when (not (and (-> self next-state) (= (-> self next-state name) 'fall)))
(set! (-> self root transv quad) (-> (the-as vector (-> arg3 param 0)) quad))
(set! (-> self root-override transv quad) (-> (the-as vector (-> arg3 param 0)) quad))
(go-virtual fall)
)
)
@@ -679,10 +679,10 @@
:code (behavior ()
(process-entity-status! self (entity-perm-status dead) #f)
(process-entity-status! self (entity-perm-status subtask-complete) #f)
(vector+! (-> self draw origin) (-> self root trans) (-> self draw bounds))
(vector+! (-> self draw origin) (-> self root-override trans) (-> self draw bounds))
(set! (-> self draw origin w) (-> self draw bounds w))
(logior! (-> self draw status) (draw-control-status no-draw))
(let ((v1-9 (-> (the-as collide-shape-moving (-> self root)) root-prim)))
(let ((v1-9 (-> (the-as collide-shape-moving (-> self root-override)) root-prim)))
(set! (-> v1-9 prim-core collide-as) (collide-spec))
(set! (-> v1-9 prim-core collide-with) (collide-spec))
)
@@ -690,19 +690,24 @@
(ja-post)
(while (or (crate-method-40 self)
(and (sphere-in-view-frustum? (the-as sphere (-> self draw origin)))
(< (vector-vector-distance (camera-pos) (-> self root trans)) 327680.0)
(< (vector-vector-distance (camera-pos) (-> self root-override trans)) 327680.0)
)
(and *target* (and (>= 40960.0 (vector-vector-distance (-> self root trans) (-> *target* control trans)))
(zero? (logand (focus-status teleporting) (-> *target* focus-status)))
)
(and *target*
(and (>= 40960.0 (vector-vector-distance (-> self root-override trans) (-> *target* control trans)))
(zero? (logand (focus-status teleporting) (-> *target* focus-status)))
)
)
)
(suspend)
)
(logclear! (-> self draw status) (draw-control-status no-draw))
(let ((v1-29 (-> (the-as collide-shape-moving (-> self root)) root-prim)))
(set! (-> v1-29 prim-core collide-as) (-> (the-as collide-shape-moving (-> self root)) backup-collide-as))
(set! (-> v1-29 prim-core collide-with) (-> (the-as collide-shape-moving (-> self root)) backup-collide-with))
(let ((v1-29 (-> (the-as collide-shape-moving (-> self root-override)) root-prim)))
(set! (-> v1-29 prim-core collide-as)
(-> (the-as collide-shape-moving (-> self root-override)) backup-collide-as)
)
(set! (-> v1-29 prim-core collide-with)
(-> (the-as collide-shape-moving (-> self root-override)) backup-collide-with)
)
)
(go-virtual idle)
(none)
@@ -715,7 +720,7 @@
:event crate-standard-event-handler
:code (behavior ()
(suspend)
(collide-shape-method-46 (the-as collide-shape-moving (-> self root)))
(collide-shape-method-46 (the-as collide-shape-moving (-> self root-override)))
(carry-info-method-9 (-> self carry))
(logior! (-> self mask) (process-mask sleep))
(until #f
@@ -736,7 +741,7 @@
(-> self carry)
)
(('drop)
(set! (-> self root transv quad) (-> (the-as vector (-> event param 1)) quad))
(set! (-> self root-override transv quad) (-> (the-as vector (-> event param 1)) quad))
(go-virtual fall)
)
)
@@ -746,7 +751,7 @@
(ja-post)
(carry-info-method-9 (-> self carry))
(carry-info-method-13 (-> self carry))
(collide-shape-method-46 (the-as collide-shape-moving (-> self root)))
(collide-shape-method-46 (the-as collide-shape-moving (-> self root-override)))
(none)
)
)
@@ -781,28 +786,34 @@
)
)
)
(set! (-> (the-as collide-shape-moving (-> self root)) status) (cshape-moving-flags))
(set! (-> (the-as collide-shape-moving (-> self root)) root-prim local-sphere w) (-> self carry carry-radius))
(set! (-> (the-as collide-shape-moving (-> self root)) root-prim prim-core collide-with)
(set! (-> (the-as collide-shape-moving (-> self root-override)) status) (cshape-moving-flags))
(set! (-> (the-as collide-shape-moving (-> self root-override)) root-prim local-sphere w)
(-> self carry carry-radius)
)
(set! (-> (the-as collide-shape-moving (-> self root-override)) root-prim prim-core collide-with)
(logior (collide-spec backgnd crate obstacle hit-by-others-list pusher)
(-> (the-as collide-shape-moving (-> self root)) root-prim prim-core collide-with)
(-> (the-as collide-shape-moving (-> self root-override)) root-prim prim-core collide-with)
)
)
(none)
)
:trans (behavior ()
(when (and (logtest? (-> (the-as collide-shape-moving (-> self root)) status) (cshape-moving-flags on-surface))
(< 0.8 (-> (the-as collide-shape-moving (-> self root)) surface-angle))
(when (and (logtest? (-> (the-as collide-shape-moving (-> self root-override)) status) (cshape-moving-flags on-surface))
(< 0.8 (-> (the-as collide-shape-moving (-> self root-override)) surface-angle))
)
(vector-reset! (-> self root transv))
(when (= (vector-length (-> self root transv)) 0.0)
(set! (-> (the-as collide-shape-moving (-> self root)) root-prim local-sphere w)
(vector-reset! (-> self root-override transv))
(when (= (vector-length (-> self root-override transv)) 0.0)
(set! (-> (the-as collide-shape-moving (-> self root-override)) root-prim local-sphere w)
(-> self carry backup-radius)
)
(set! (-> self base quad) (-> self root trans quad))
(let ((v1-16 (-> (the-as collide-shape-moving (-> self root)) root-prim)))
(set! (-> v1-16 prim-core collide-as) (-> (the-as collide-shape-moving (-> self root)) backup-collide-as))
(set! (-> v1-16 prim-core collide-with) (-> (the-as collide-shape-moving (-> self root)) backup-collide-with))
(set! (-> self base quad) (-> self root-override trans quad))
(let ((v1-16 (-> (the-as collide-shape-moving (-> self root-override)) root-prim)))
(set! (-> v1-16 prim-core collide-as)
(-> (the-as collide-shape-moving (-> self root-override)) backup-collide-as)
)
(set! (-> v1-16 prim-core collide-with)
(-> (the-as collide-shape-moving (-> self root-override)) backup-collide-with)
)
)
(go-virtual idle)
)
@@ -812,18 +823,23 @@
:code (the-as (function none :behavior crate) sleep-code)
:post (behavior ()
(let* ((gp-0 vector-v++!)
(s5-0 (-> self root transv))
(a0-0 (-> self root))
(s5-0 (-> self root-override transv))
(a0-0 (-> self root-override))
(t9-0 (method-of-object (the-as collide-shape-moving a0-0) collide-shape-moving-method-62))
)
(set! (-> (new 'stack-no-clear 'vector) quad) (the-as uint128 0))
0
(gp-0 s5-0 (the-as vector (t9-0 (the-as collide-shape-moving a0-0))))
)
(if (< (-> (the-as collide-shape-moving (-> self root)) dynam gravity-max) (vector-length (-> self root transv)))
(vector-normalize! (-> self root transv) (-> (the-as collide-shape-moving (-> self root)) dynam gravity-max))
(if (< (-> (the-as collide-shape-moving (-> self root-override)) dynam gravity-max)
(vector-length (-> self root-override transv))
)
(vector-normalize!
(-> self root-override transv)
(-> (the-as collide-shape-moving (-> self root-override)) dynam gravity-max)
)
)
(let ((gp-1 (-> self root)))
(let ((gp-1 (-> self root-override)))
(let ((a2-1 (new 'stack-no-clear 'collide-query)))
(set! (-> (the-as collide-shape-moving gp-1) root-prim type) collide-shape-prim-sphere)
(set! (-> a2-1 collide-with) (collide-spec backgnd crate obstacle pusher))
@@ -894,7 +910,7 @@
)
)
(when v1-4
(let* ((gp-2 (-> (the-as collide-shape-moving (-> self root)) root-prim prim-core))
(let* ((gp-2 (-> (the-as collide-shape-moving (-> self root-override)) root-prim prim-core))
(a1-3 (-> (the-as collide-shape-moving v1-4) root-prim prim-core))
(f30-0 (vector-vector-distance (the-as vector gp-2) (the-as vector a1-3)))
)
@@ -972,7 +988,7 @@
)
:code (behavior ((arg0 symbol) (arg1 int))
(logior! (-> self focus-status) (focus-status dead))
(let ((v1-3 (-> (the-as collide-shape (-> self root)) root-prim)))
(let ((v1-3 (-> (the-as collide-shape (-> self root-override)) root-prim)))
(set! (-> v1-3 prim-core collide-as) (collide-spec))
(set! (-> v1-3 prim-core collide-with) (collide-spec))
)
@@ -1013,13 +1029,16 @@
)
(case (-> self defense)
(('darkeco)
(let ((f0-0 (lerp-scale 1.0 0.0 (vector-vector-distance (-> self root trans) (target-pos 0)) 8192.0 40960.0)))
(let ((f0-0
(lerp-scale 1.0 0.0 (vector-vector-distance (-> self root-override trans) (target-pos 0)) 8192.0 40960.0)
)
)
(cpad-set-buzz! (-> *cpad-list* cpads 0) 1 (the int (* 255.0 f0-0)) (seconds 0.3))
)
(process-spawn
touch-tracker
:init touch-tracker-init
(-> self root trans)
(-> self root-override trans)
(-> *CRATE-bank* DARKECO_EXPLODE_RADIUS)
30
:to self
@@ -1043,7 +1062,7 @@
(t2-4 #f)
(t3-0 *launch-matrix*)
)
(set! (-> t3-0 trans quad) (-> self root trans quad))
(set! (-> t3-0 trans quad) (-> self root-override trans quad))
((the-as (function object object object object object object object object none) t9-18)
a0-34
a1-21
@@ -1075,7 +1094,7 @@
(t2-5 #f)
(t3-1 *launch-matrix*)
)
(set! (-> t3-1 trans quad) (-> self root trans quad))
(set! (-> t3-1 trans quad) (-> self root-override trans quad))
((the-as (function object object object object object object object object none) t9-21)
a0-39
a1-27
@@ -1107,7 +1126,7 @@
(t2-6 #f)
(t3-2 *launch-matrix*)
)
(set! (-> t3-2 trans quad) (-> self root trans quad))
(set! (-> t3-2 trans quad) (-> self root-override trans quad))
((the-as (function object object object object object object object object none) t9-24)
a0-42
a1-32
@@ -1219,7 +1238,7 @@
)
)
)
(let ((v1-20 (-> (the-as collide-shape-moving (-> self root)) root-prim)))
(let ((v1-20 (-> (the-as collide-shape-moving (-> self root-override)) root-prim)))
(set! (-> v1-20 prim-core collide-as) (collide-spec))
(set! (-> v1-20 prim-core collide-with) (collide-spec))
)
@@ -1254,7 +1273,7 @@
;; INFO: Used lq/sq
(defbehavior crate-init-by-other crate ((arg0 entity) (arg1 vector) (arg2 symbol) (arg3 fact-info-crate))
(crate-init! self (the-as entity-actor arg0))
(set! (-> self root trans quad) (-> arg1 quad))
(set! (-> self root-override trans quad) (-> arg1 quad))
(set! (-> self look) arg2)
(set! (-> self defense) arg2)
(skel-init! self)
@@ -1321,7 +1340,7 @@
knocked
)
)
(set! (-> obj root) s4-0)
(set! (-> obj root-override) s4-0)
)
(set! (-> obj fact)
(new 'process 'fact-info-crate obj (pickup-type eco-pill-random) (-> *FACT-bank* default-eco-pill-green-inc))
@@ -1372,7 +1391,7 @@
"Initialize the [[crate]]'s skeleton and other parameters based on the crate type."
(case (-> obj look)
(('iron)
(set! (-> (the-as collide-shape-moving (-> obj root)) penetrated-by)
(set! (-> (the-as collide-shape-moving (-> obj root-override)) penetrated-by)
(penetrate flop uppercut tube vehicle flut-attack board dark-skin explode)
)
(initialize-skeleton
@@ -1382,7 +1401,7 @@
)
)
(('steel)
(set! (-> (the-as collide-shape-moving (-> obj root)) penetrated-by)
(set! (-> (the-as collide-shape-moving (-> obj root-override)) penetrated-by)
(penetrate tube vehicle flut-attack board dark-skin explode)
)
(initialize-skeleton
@@ -1420,7 +1439,7 @@
)
)
)
(set! (-> obj base quad) (-> obj root trans quad))
(set! (-> obj base quad) (-> obj root-override trans quad))
(crate-post)
(nav-mesh-connect-from-ent (the-as entity-nav-mesh obj))
(none)
@@ -1466,9 +1485,9 @@
;; WARN: Return type mismatch int vs none.
(defmethod smush-update! crate ((obj crate))
(let ((f0-0 (update! (-> obj smush))))
(set! (-> obj root scale x) (+ 1.0 (* -0.5 f0-0)))
(set! (-> obj root scale y) (+ 1.0 f0-0))
(set! (-> obj root scale z) (+ 1.0 (* -0.5 f0-0)))
(set! (-> obj root-override scale x) (+ 1.0 (* -0.5 f0-0)))
(set! (-> obj root-override scale y) (+ 1.0 f0-0))
(set! (-> obj root-override scale z) (+ 1.0 (* -0.5 f0-0)))
)
0
(none)
+1 -1
View File
@@ -66,7 +66,7 @@
(set! (-> collision-shape backup-collide-as) (-> prim prim-core collide-as))
(set! (-> collision-shape backup-collide-with) (-> prim prim-core collide-with))
)
(set! (-> obj root-override) (the-as collide-shape-moving collision-shape))
(set! (-> obj root-override) collision-shape)
)
0
(none)
+285
View File
@@ -0,0 +1,285 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for symbol *viewer-sg*, type skeleton-group
(define *viewer-sg* (new 'static 'skeleton-group
:bounds (new 'static 'vector :w 16384.0)
:lod-dist (new 'static 'array float 6 4095996000.0 0.0 0.0 0.0 0.0 0.0)
)
)
;; definition of type viewer
(deftype viewer (process-drawable)
((janim art-joint-anim :offset-assert 200)
)
:heap-base #x50
:method-count-assert 20
:size-assert #xcc
:flag-assert #x14005000cc
)
;; definition for method 3 of type viewer
(defmethod inspect viewer ((obj viewer))
(when (not obj)
(set! obj obj)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 obj)
)
(format #t "~2Tjanim: ~A~%" (-> obj janim))
(label cfg-4)
obj
)
;; failed to figure out what this is:
(defstate viewer-process (viewer)
:code (behavior ()
(until #f
(ja-no-eval :group! (-> self janim)
:num! (seek! (the float (+ (-> self janim frames num-frames) -1)))
:frame-num 0.0
)
(until (ja-done? 0)
(compute-alignment! (-> self align))
(align!
(-> self align)
(align-opts adjust-x-vel adjust-y-vel adjust-xz-vel keep-other-velocities adjust-quat)
1.0
1.0
1.0
)
(suspend)
(ja :num! (seek!))
)
)
#f
(none)
)
:post (the-as (function none :behavior viewer) ja-post)
)
;; definition for symbol viewer-string, type string
(define viewer-string (new 'global 'string 64 (the-as string #f)))
;; definition for symbol viewer-ja-name, type string
(define viewer-ja-name (new 'global 'string 64 (the-as string #f)))
;; definition for symbol viewer-geo-name, type string
(define viewer-geo-name (new 'global 'string 64 (the-as string #f)))
;; definition for function actor-get-arg!
(defun actor-get-arg! ((arg0 string) (arg1 string) (arg2 string))
(let ((s5-0 (-> arg2 data))
(gp-0 (-> arg0 data))
)
(set! (-> gp-0 0) (the-as uint 0))
(dotimes (s2-0 (- (length arg2) (+ (length arg1) 2)))
(when (= (-> s5-0 0) 45)
(let ((s1-0 #f))
(dotimes (s0-0 (length arg1))
(if (!= (-> s5-0 (+ s0-0 1)) (-> arg1 data s0-0))
(goto cfg-10)
)
)
(if (= (-> s5-0 (+ (length arg1) 1)) 45)
(set! s1-0 #t)
)
(label cfg-10)
(when s1-0
(let ((v1-22 (&+ s5-0 (+ (length arg1) 2))))
(while (and (!= (-> v1-22 0) 45) (nonzero? (-> v1-22 0)))
(set! (-> gp-0 0) (-> v1-22 0))
(set! v1-22 (&-> v1-22 1))
(set! gp-0 (&-> gp-0 1))
)
)
(set! (-> gp-0 0) (the-as uint 0))
(return #t)
)
)
)
(set! s5-0 (&-> s5-0 1))
)
)
#f
)
;; definition for function art-part-name
(defun art-part-name ((arg0 string))
(let ((gp-0 (-> arg0 data)))
(while (nonzero? (-> gp-0 0))
(when (= (-> gp-0 0) 45)
(copyn-string<-charp
viewer-string
(&-> gp-0 1)
(- (length arg0) (the-as int (+ (- -1 (the-as int (-> arg0 data))) (the-as int gp-0))))
)
(return viewer-string)
)
(set! gp-0 (&-> gp-0 1))
)
)
(clear viewer-string)
)
;; definition for function init-viewer
;; WARN: Return type mismatch object vs none.
(defbehavior init-viewer viewer ((arg0 string) (arg1 string))
(let* ((s5-0 *level*)
(s3-0 (method-of-object s5-0 art-group-get-by-name))
)
(format (clear *temp-string*) "skel-~S" arg0)
(let ((a1-3 (s3-0 s5-0 *temp-string* (the-as (pointer uint32) #f))))
(cond
(a1-3
(initialize-skeleton self (the-as skeleton-group a1-3) (the-as pair 0))
(cond
((>= (-> self skel active-channels) (the-as uint 1))
(set! (-> self janim) (-> self skel channel 0 frame-group))
)
(else
(let ((v1-8 (-> self draw art-group)))
(dotimes (a0-5 (-> v1-8 length))
(when (= (-> v1-8 data a0-5 type) art-joint-anim)
(set! (-> self janim) (the-as art-joint-anim (-> v1-8 data a0-5)))
(ja-channel-set! 1)
(goto cfg-10)
)
)
)
(go process-drawable-art-error "anim")
)
)
(label cfg-10)
(set! (-> self align) (new 'process 'align-control self))
(logior! (-> self skel status) (joint-control-status blend-shape eye-anim))
(go viewer-process)
)
(else
(actor-get-arg! viewer-ja-name "ja" arg1)
(actor-get-arg! viewer-geo-name "geo" arg1)
(let ((s2-1 (load-to-heap-by-name (-> self level art-group) arg0 #f global 0))
(s5-1 (the-as int #f))
(s4-1 (the-as int #f))
(s3-1 (the-as int #f))
)
(when s2-1
(dotimes (s1-0 (-> s2-1 length))
(cond
((not (-> s2-1 data s1-0))
)
((and (not s4-1)
(= (-> s2-1 data s1-0 type) merc-ctrl)
(or (zero? (length viewer-geo-name)) (string= (art-part-name (-> s2-1 data s1-0 name)) viewer-geo-name))
)
(set! s4-1 s1-0)
)
((= (-> s2-1 data s1-0 type) art-joint-geo)
(set! s3-1 s1-0)
)
((and (= (-> s2-1 data s1-0 type) art-joint-anim)
(or (zero? (length viewer-ja-name)) (string= (art-part-name (-> s2-1 data s1-0 name)) viewer-ja-name))
)
(set! s5-1 s1-0)
)
)
(if (and s4-1 s3-1 s5-1)
(goto cfg-44)
)
)
)
(label cfg-44)
(cond
((and s4-1 s3-1 s5-1)
(set! (-> self janim) (the-as art-joint-anim (-> s2-1 data s5-1)))
(let ((a1-13 *viewer-sg*))
(set! (-> a1-13 art-group-name) arg0)
(set! (-> a1-13 jgeo) s3-1)
(set! (-> a1-13 janim) s5-1)
(set! (-> a1-13 mgeo 0) s4-1)
(initialize-skeleton self a1-13 (the-as pair 0))
)
(set! (-> self align) (new 'process 'align-control self))
(logior! (-> self skel status) (joint-control-status blend-shape eye-anim))
(go viewer-process)
)
(else
(go process-drawable-art-error arg0)
)
)
)
)
)
)
)
(none)
)
;; definition for method 11 of type viewer
(defmethod init-from-entity! viewer ((obj viewer) (arg0 entity-actor))
(set! *viewer* obj)
(set! (-> obj root) (new 'process 'trsqv))
(process-drawable-from-entity! obj arg0)
(let ((s4-0 (-> arg0 etype)))
(if (valid? s4-0 type #f #f 0)
(init-viewer (symbol->string (-> s4-0 symbol)) (res-lump-struct arg0 'name string))
(go process-drawable-art-error "unknown")
)
)
(none)
)
;; definition for function init-viewer-for-other
;; INFO: Used lq/sq
(defbehavior init-viewer-for-other viewer ((arg0 string) (arg1 vector) (arg2 entity-actor))
(set! *viewer* self)
(process-entity-set! self arg2)
(set! (-> self root) (new 'process 'trsqv))
(set! (-> self root trans quad) (-> arg1 quad))
(quaternion-identity! (-> self root quat))
(set-vector! (-> self root scale) 1.0 1.0 1.0 1.0)
(init-viewer arg0 arg0)
(none)
)
;; definition for function add-a-bunch
;; INFO: Used lq/sq
(defun add-a-bunch ((arg0 string) (arg1 int) (arg2 int) (arg3 float) (arg4 process-tree) (arg5 entity-actor))
(local-vars (sv-32 int) (sv-48 process) (sv-64 vector))
(dotimes (s0-0 arg1)
(set! sv-32 0)
(while (< sv-32 arg2)
(set! sv-64 (new 'stack-no-clear 'vector))
(set! (-> sv-64 quad) (the-as uint128 0))
(position-in-front-of-camera! sv-64 40960.0 4096.0)
(+! (-> sv-64 x) (the float (* (- s0-0 (/ arg1 2)) (the int arg3))))
(+! (-> sv-64 z) (the float (* (- sv-32 (/ arg2 2)) (the int arg3))))
(set! sv-48 (get-process *default-dead-pool* viewer #x4000))
(when sv-48
(let ((t9-2 (method-of-type viewer activate)))
(t9-2 (the-as viewer sv-48) arg4 (symbol->string (-> viewer symbol)) (the-as pointer #x70004000))
)
(let ((t9-3 run-function-in-process)
(a0-7 sv-48)
(a1-4 init-viewer-for-other)
(a2-6 arg0)
(t0-1 arg5)
)
((the-as (function object object object object object none) t9-3) a0-7 a1-4 a2-6 sv-64 t0-1)
)
(-> sv-48 ppointer)
)
(set! sv-32 (+ sv-32 1))
)
)
#f
)
;; definition for function birth-viewer
;; WARN: Return type mismatch symbol vs object.
(defun birth-viewer ((arg0 process) (arg1 entity-actor))
(set! (-> arg0 type) viewer)
(init-entity arg0 arg1 (the-as process viewer))
(the-as object #t)
)
+2 -2
View File
@@ -1669,7 +1669,7 @@
obj
)
(defun init-entity ((arg0 process) (arg1 entity-actor))
(defun init-entity ((arg0 process) (arg1 entity-actor) (arg2 process))
(activate arg0 *entity-pool* (res-lump-struct arg1 'name basic) (the-as pointer #x70004000))
(set! (-> arg0 entity) arg1)
(set! (-> arg0 level) (-> arg1 extra level))
@@ -1695,7 +1695,7 @@
(set! (-> s4-0 type) s5-0)
(and s5-0 (valid? s5-0 type #f #f 0) (valid? (method-of-object s4-0 init-from-entity!) function #f #f 0))
)
(init-entity s4-0 obj)
(init-entity s4-0 obj (the-as process s5-0))
)
(else
(when (not (birth-viewer s4-0 obj))
+1 -1
View File
@@ -182,7 +182,7 @@
;; definition for method 7 of type collide-shape-prim-group
(defmethod relocate collide-shape-prim-group ((obj collide-shape-prim-group) (arg0 int))
(&+! (-> obj cshape) arg0)
(set! (-> obj child) (the-as (inline-array collide-shape) (&+ (the-as pointer (-> obj child)) arg0)))
(set! (-> obj child) (the-as (inline-array collide-shape-prim) (&+ (the-as pointer (-> obj child)) arg0)))
obj
)
+114
View File
@@ -0,0 +1,114 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for method 9 of type prototype-inline-array-shrub
(defmethod login prototype-inline-array-shrub ((obj prototype-inline-array-shrub))
(let ((bsp-header (-> *level* level *level-index* bsp)))
(dotimes (shrub-idx (-> obj length))
(let ((shrub (-> obj data shrub-idx)))
(when (and *debug-segment* (-> *screen-shot-work* highres-enable))
(dotimes (shrub-i 4)
(set! (-> shrub dists data shrub-i) (+ 40960000.0 (-> shrub dists data shrub-i)))
(set! (-> shrub rdists data shrub-i) (/ 1.0 (-> shrub dists data shrub-i)))
)
)
(set! *texture-masks* (-> bsp-header shrub-masks data (-> shrub texture-masks-index)))
(dotimes (geo-i 4)
(let ((geo (-> shrub geometry geo-i)))
(if (nonzero? geo)
(login geo)
)
)
)
)
)
)
obj
)
;; definition for method 8 of type prototype-array-tie
(defmethod mem-usage prototype-array-tie ((obj prototype-array-tie) (usage memory-usage-block) (arg2 int))
(set! (-> usage length) (max 1 (-> usage length)))
(set! (-> usage data 0 name) (symbol->string 'drawable-group))
(+! (-> usage data 0 count) 1)
(let ((size-of-tie (asize-of obj)))
(+! (-> usage data 0 used) size-of-tie)
(+! (-> usage data 0 total) (logand -16 (+ size-of-tie 15)))
)
(dotimes (tie-idx (-> obj length))
(mem-usage (-> obj array-data tie-idx) usage arg2)
)
obj
)
;; definition for method 8 of type prototype-bucket-tie
(defmethod mem-usage prototype-bucket-tie ((obj prototype-bucket-tie) (usage memory-usage-block) (arg2 int))
(dotimes (idx 4)
(let ((tie-geom (-> obj tie-geom idx)))
(if (nonzero? tie-geom)
(mem-usage tie-geom usage (logior arg2 1))
)
)
)
(set! (-> usage length) (max 84 (-> usage length)))
(set! (-> usage data 83 name) "string")
(+! (-> usage data 83 count) 1)
(let ((name-size (asize-of (-> obj name))))
(+! (-> usage data 83 used) name-size)
(+! (-> usage data 83 total) (logand -16 (+ name-size 15)))
)
(when (nonzero? (-> obj tie-colors))
(set! (-> usage length) (max 17 (-> usage length)))
(set! (-> usage data 16 name) "tie-pal")
(+! (-> usage data 16 count) 1)
(let ((color-size (asize-of (-> obj tie-colors))))
(+! (-> usage data 16 used) color-size)
(+! (-> usage data 16 total) (logand -16 (+ color-size 15)))
)
)
(if (nonzero? (-> obj collide-hash-fragment-array))
(mem-usage (-> obj collide-hash-fragment-array) usage (logior arg2 1))
)
obj
)
;; definition for method 8 of type prototype-inline-array-shrub
(defmethod mem-usage prototype-inline-array-shrub ((obj prototype-inline-array-shrub) (usage memory-usage-block) (arg2 int))
(set! (-> usage length) (max 1 (-> usage length)))
(set! (-> usage data 0 name) (symbol->string 'drawable-group))
(+! (-> usage data 0 count) 1)
(let ((shrub-size (asize-of obj)))
(+! (-> usage data 0 used) shrub-size)
(+! (-> usage data 0 total) (logand -16 (+ shrub-size 15)))
)
(dotimes (idx (-> obj length))
(mem-usage (-> obj data idx) usage arg2)
)
obj
)
;; definition for method 8 of type prototype-bucket-shrub
(defmethod mem-usage prototype-bucket-shrub ((obj prototype-bucket-shrub) (usage memory-usage-block) (arg2 int))
(set! (-> usage length) (max 25 (-> usage length)))
(set! (-> usage data 24 name) "prototype-bucket-shrub")
(+! (-> usage data 24 count) 1)
(let ((proto-shrub-size 112))
(+! (-> usage data 24 used) proto-shrub-size)
(+! (-> usage data 24 total) (logand -16 (+ proto-shrub-size 15)))
)
(dotimes (idx 4)
(let ((geo (-> obj geometry idx)))
(if (nonzero? geo)
(mem-usage geo usage (logior arg2 1))
)
)
)
(set! (-> usage length) (max 84 (-> usage length)))
(set! (-> usage data 83 name) "string")
(+! (-> usage data 83 count) 1)
(let ((name-size (asize-of (-> obj name))))
(+! (-> usage data 83 used) name-size)
(+! (-> usage data 83 total) (logand -16 (+ name-size 15)))
)
obj
)
+1 -28
View File
@@ -1,7 +1,5 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type texture-anim-layer
(deftype texture-anim-layer (structure)
((extra vector :inline :offset 240)
(func basic :offset 256)
@@ -41,7 +39,6 @@
)
)
;; definition for method 3 of type texture-anim-layer
(defmethod inspect texture-anim-layer ((obj texture-anim-layer))
(when (not obj)
(set! obj obj)
@@ -80,7 +77,6 @@
obj
)
;; definition of type texture-anim
(deftype texture-anim (structure)
((num-layers uint32 :offset-assert 0)
(func basic :offset-assert 4)
@@ -108,7 +104,6 @@
)
)
;; definition for method 3 of type texture-anim
(defmethod inspect texture-anim ((obj texture-anim))
(when (not obj)
(set! obj obj)
@@ -135,7 +130,6 @@
obj
)
;; definition of type texture-anim-array
(deftype texture-anim-array (array)
((array-data texture-anim :dynamic :offset-assert 16)
)
@@ -143,12 +137,11 @@
:size-assert #x10
:flag-assert #xb00000010
(:methods
(texture-anim-array-method-9 () none 9)
(texture-anim-array-method-9 (_type_) none 9)
(texture-anim-array-method-10 () none 10)
)
)
;; definition for method 3 of type texture-anim-array
(defmethod inspect texture-anim-array ((obj texture-anim-array))
(when (not obj)
(set! obj obj)
@@ -163,7 +156,6 @@
obj
)
;; definition of type texture-anim-work
(deftype texture-anim-work (structure)
((erase-tmpl dma-gif-packet :inline :offset-assert 0)
(draw-tmpl dma-gif-packet :inline :offset-assert 32)
@@ -183,7 +175,6 @@
:flag-assert #x900000171
)
;; definition for method 3 of type texture-anim-work
(defmethod inspect texture-anim-work ((obj texture-anim-work))
(when (not obj)
(set! obj obj)
@@ -206,7 +197,6 @@
obj
)
;; definition of type clut16x16
(deftype clut16x16 (structure)
((clut rgba 256 :offset-assert 0)
)
@@ -215,7 +205,6 @@
:flag-assert #x900000400
)
;; definition for method 3 of type clut16x16
(defmethod inspect clut16x16 ((obj clut16x16))
(when (not obj)
(set! obj obj)
@@ -227,7 +216,6 @@
obj
)
;; definition of type noise8x8
(deftype noise8x8 (structure)
((image uint8 64 :offset-assert 0)
)
@@ -236,7 +224,6 @@
:flag-assert #x900000040
)
;; definition for method 3 of type noise8x8
(defmethod inspect noise8x8 ((obj noise8x8))
(when (not obj)
(set! obj obj)
@@ -248,7 +235,6 @@
obj
)
;; definition of type noise16x16
(deftype noise16x16 (structure)
((image uint8 256 :offset-assert 0)
)
@@ -257,7 +243,6 @@
:flag-assert #x900000100
)
;; definition for method 3 of type noise16x16
(defmethod inspect noise16x16 ((obj noise16x16))
(when (not obj)
(set! obj obj)
@@ -269,7 +254,6 @@
obj
)
;; definition of type noise32x32
(deftype noise32x32 (structure)
((image uint8 1024 :offset-assert 0)
)
@@ -278,7 +262,6 @@
:flag-assert #x900000400
)
;; definition for method 3 of type noise32x32
(defmethod inspect noise32x32 ((obj noise32x32))
(when (not obj)
(set! obj obj)
@@ -290,7 +273,6 @@
obj
)
;; definition of type noise64x64
(deftype noise64x64 (structure)
((image uint8 4096 :offset-assert 0)
)
@@ -299,7 +281,6 @@
:flag-assert #x900001000
)
;; definition for method 3 of type noise64x64
(defmethod inspect noise64x64 ((obj noise64x64))
(when (not obj)
(set! obj obj)
@@ -311,7 +292,6 @@
obj
)
;; definition of type noise128x128
(deftype noise128x128 (structure)
((image uint8 16384 :offset-assert 0)
)
@@ -320,7 +300,6 @@
:flag-assert #x900004000
)
;; definition for method 3 of type noise128x128
(defmethod inspect noise128x128 ((obj noise128x128))
(when (not obj)
(set! obj obj)
@@ -332,7 +311,6 @@
obj
)
;; definition of type fog8x256
(deftype fog8x256 (structure)
((image uint8 256 :offset-assert 0)
)
@@ -341,7 +319,6 @@
:flag-assert #x900000100
)
;; definition for method 3 of type fog8x256
(defmethod inspect fog8x256 ((obj fog8x256))
(when (not obj)
(set! obj obj)
@@ -353,7 +330,6 @@
obj
)
;; definition of type fog-texture-work
(deftype fog-texture-work (structure)
((corner vector 4 :inline :offset-assert 0)
(const vector :inline :offset-assert 64)
@@ -372,7 +348,6 @@
:flag-assert #x90000008c
)
;; definition for method 3 of type fog-texture-work
(defmethod inspect fog-texture-work ((obj fog-texture-work))
(when (not obj)
(set! obj obj)
@@ -394,7 +369,6 @@
obj
)
;; definition for symbol *clut-translate*, type (pointer uint32)
(define *clut-translate* (new 'static 'array uint32 64
#x3020100
#x7060504
@@ -463,5 +437,4 @@
)
)
;; failed to figure out what this is:
0
@@ -0,0 +1,21 @@
(in-package goal)
(setup-font-texture *texture-pool*)
(let ((v1-2 (lookup-texture-by-id (new 'static 'texture-id :index #x4 :page #x70c))))
(when v1-2
(set! (-> v1-2 w) 32)
(set! (-> v1-2 h) 32)
(set! (-> v1-2 dest 0) (-> *skull-gem-texture-base* vram-block))
)
)
(texture-anim-array-method-9 *sky-texture-anim-array*)
(texture-anim-array-method-9 *darkjak-texture-anim-array*)
(texture-anim-array-method-9 *skull-gem-texture-anim-array*)
(texture-anim-array-method-9 *bomb-texture-anim-array*)
(kmemclose)
+1 -80
View File
@@ -1,7 +1,5 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for function lookup-level-info
(defun lookup-level-info ((arg0 symbol))
(let* ((v1-0 *level-load-list*)
(a1-0 (car v1-0))
@@ -19,8 +17,6 @@
default-level
)
;; definition for method 24 of type level-group
;; WARN: Return type mismatch object vs pair.
(defmethod alt-load-command-get-index level-group ((obj level-group) (arg0 symbol) (arg1 int))
(let ((v1-1 (-> (lookup-level-info arg0) alt-load-commands)))
(while (nonzero? arg1)
@@ -34,12 +30,10 @@
)
)
;; definition for method 29 of type level-group
(defmethod load-in-progress? level-group ((obj level-group))
(!= (-> *level* loading-level) (-> *level* default-level))
)
;; definition for method 11 of type level-group
(defmethod get-level-by-heap-ptr-and-status level-group ((obj level-group) (arg0 pointer) (arg1 symbol))
(case arg1
(('active)
@@ -72,7 +66,6 @@
(the-as level #f)
)
;; definition for function remap-level-name
(defun remap-level-name ((arg0 level-load-info))
(if (-> *level* vis?)
(-> arg0 visname)
@@ -80,7 +73,6 @@
)
)
;; definition for method 21 of type level
(defmethod get-art-group-by-name level ((obj level) (arg0 string))
(countdown (s4-0 (-> obj art-group art-group-array length))
(if (name= (-> obj art-group art-group-array s4-0 name) arg0)
@@ -90,7 +82,6 @@
(the-as art-group #f)
)
;; definition for method 13 of type level
(defmethod bsp-name level ((obj level))
(if (and (!= (-> obj status) 'inactive) (-> obj bsp) (nonzero? (-> obj bsp name)))
(-> obj bsp name)
@@ -98,7 +89,6 @@
)
)
;; definition for function add-bsp-drawable
(defun add-bsp-drawable ((arg0 bsp-header) (arg1 level) (arg2 symbol) (arg3 display-frame))
(draw arg0 arg0 arg3)
(if (nonzero? *display-strip-lines*)
@@ -107,13 +97,11 @@
(none)
)
;; definition for method 2 of type level
(defmethod print level ((obj level))
(format #t "#<~A ~A ~S @ #x~X>" (-> obj type) (-> obj status) (-> obj name) obj)
obj
)
;; definition for method 7 of type bsp-header
(defmethod relocate bsp-header ((obj bsp-header) (arg0 int))
(let ((s5-0 (-> *level* loading-level)))
(when s5-0
@@ -152,7 +140,6 @@
)
)
;; definition for method 27 of type level
(defmethod load-required-packages level ((obj level))
(when (not (or (not (-> obj bsp)) (= *kernel-boot-mode* 'debug-boot)))
(if (not (null? (-> obj info packages)))
@@ -162,9 +149,6 @@
obj
)
;; definition for method 29 of type level
;; INFO: Used lq/sq
;; WARN: Return type mismatch int vs none.
(defmethod vis-clear level ((obj level))
(countdown (v1-0 8)
(nop!)
@@ -178,8 +162,6 @@
(none)
)
;; definition for method 28 of type level
;; WARN: Return type mismatch int vs none.
(defmethod init-vis-from-bsp level ((obj level))
(when (not (or (= (-> obj status) 'inactive) (not (-> obj bsp))))
(set! (-> obj all-visible?) 'loading)
@@ -210,7 +192,6 @@
(none)
)
;; definition for method 12 of type level-group
(defmethod level-get-for-use level-group ((obj level-group) (arg0 symbol) (arg1 symbol))
(local-vars (s5-1 level))
(alloc-levels-if-needed obj #f)
@@ -258,7 +239,6 @@
s5-1
)
;; definition for method 28 of type level-group
(defmethod level-status level-group ((obj level-group) (arg0 symbol))
(let ((v1-1 (level-get *level* arg0)))
(if v1-1
@@ -267,8 +247,6 @@
)
)
;; definition for method 26 of type level
;; INFO: Used lq/sq
(defmethod level-status-update! level ((obj level) (arg0 symbol))
(case arg0
(('inactive)
@@ -337,14 +315,10 @@
obj
)
;; definition for symbol *login-state*, type login-state
(define *login-state* (new 'global 'login-state))
;; definition for symbol *print-login*, type symbol
(define *print-login* #t)
;; definition for function load-buffer-resize
;; WARN: Return type mismatch int vs none.
(defun load-buffer-resize ((arg0 level) (arg1 dgo-header))
(case (-> arg0 load-buffer-mode)
(((load-buffer-mode small-center))
@@ -367,7 +341,6 @@
(none)
)
;; definition for method 17 of type level
(defmethod load-continue level ((obj level))
(local-vars (sv-16 symbol))
(when (-> obj linking)
@@ -487,7 +460,6 @@
obj
)
;; definition for method 18 of type level
(defmethod load-begin level ((obj level))
(local-vars (bits-to-use int) (borrow-from-lev level) (found-borrow symbol))
(dotimes (v1-0 2)
@@ -766,7 +738,6 @@
obj
)
;; definition for method 19 of type level
(defmethod login-begin level ((obj level))
(set! (-> *texture-pool* allocate-func) texture-page-default-allocate)
(cond
@@ -793,10 +764,7 @@
(let ((a0-8 (-> obj info texture-anim s4-0)))
(if a0-8
(set! (-> obj texture-anim-array s4-0)
(the-as
texture-anim-array
((method-of-object (the-as texture-anim-array (-> a0-8 value)) texture-anim-array-method-9))
)
(the-as texture-anim-array (texture-anim-array-method-9 (the-as texture-anim-array (-> a0-8 value))))
)
)
)
@@ -819,12 +787,6 @@
obj
)
;; definition for function level-update-after-load
;; WARN: Found some very strange gotos. Check result carefully, this is not well tested.
;; INFO: Used lq/sq
;; ERROR: Unsupported inline assembly instruction kind - [mfc0 s5, Count]
;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count]
;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count]
(defun level-update-after-load ((lev level) (lstate login-state))
(local-vars
(current-time int)
@@ -1096,8 +1058,6 @@
lev
)
;; definition for method 25 of type level
;; INFO: Used lq/sq
(defmethod birth level ((obj level))
(local-vars (sv-96 int))
(case (-> obj status)
@@ -1170,8 +1130,6 @@
obj
)
;; definition for method 9 of type level
;; INFO: Used lq/sq
(defmethod deactivate level ((obj level))
(case (-> obj status)
(('active 'alive)
@@ -1216,8 +1174,6 @@
obj
)
;; definition for method 12 of type level
;; WARN: Using new Jak 2 rtype-of
(defmethod unload! level ((obj level))
(deactivate obj)
(when (!= (-> obj status) 'inactive)
@@ -1379,8 +1335,6 @@
obj
)
;; definition for method 10 of type level
;; ERROR: Unsupported inline assembly instruction kind - [addiu a0, a0, 56]
(defmethod is-object-visible? level ((obj level) (arg0 int))
(local-vars (a0-1 int) (a0-3 int))
(let ((v1-0 (-> obj vis-bits)))
@@ -1394,7 +1348,6 @@
)
)
;; definition for method 15 of type level
(defmethod inside-boxes-check level ((obj level) (arg0 vector))
(cond
((not (-> obj bsp))
@@ -1409,8 +1362,6 @@
)
)
;; definition for method 20 of type level
;; WARN: Return type mismatch int vs none.
(defmethod debug-print-region-splitbox level ((obj level) (arg0 vector) (arg1 object))
(cond
((or (not (-> obj bsp)) (zero? (-> obj bsp region-tree)))
@@ -1423,7 +1374,6 @@
(none)
)
;; definition for method 8 of type level
(defmethod mem-usage level ((obj level) (arg0 memory-usage-block) (arg1 int))
(when (= (-> obj status) 'active)
(set! (-> arg0 length) (max 67 (-> arg0 length)))
@@ -1478,8 +1428,6 @@
obj
)
;; definition for method 21 of type level-group
;; WARN: Return type mismatch int vs none.
(defmethod alloc-levels-if-needed level-group ((obj level-group) (arg0 symbol))
(when (zero? (-> *level* heap base))
(kmemopen global "level-heaps")
@@ -1509,7 +1457,6 @@
(none)
)
;; definition for method 10 of type level-group
(defmethod level-get-with-status level-group ((obj level-group) (arg0 symbol))
(dotimes (v1-0 (-> obj length))
(if (= (-> obj level v1-0 status) arg0)
@@ -1519,7 +1466,6 @@
(the-as level #f)
)
;; definition for method 30 of type level-group
(defmethod level-get-most-disposable level-group ((obj level-group))
(dotimes (v1-0 (-> obj length))
(case (-> obj level v1-0 status)
@@ -1558,7 +1504,6 @@
)
)
;; definition for method 9 of type level-group
(defmethod level-get level-group ((obj level-group) (arg0 symbol))
(dotimes (v1-0 (-> obj length))
(if (and (!= (-> obj level v1-0 status) 'inactive)
@@ -1570,7 +1515,6 @@
(the-as level #f)
)
;; definition for method 23 of type level-group
(defmethod art-group-get-by-name level-group ((obj level-group) (arg0 string) (arg1 (pointer uint32)))
(countdown (s4-0 7)
(let ((s3-0 (-> *level* level s4-0)))
@@ -1589,7 +1533,6 @@
(the-as art-group #f)
)
;; definition for method 13 of type level-group
(defmethod activate-levels! level-group ((obj level-group))
(dotimes (s5-0 (-> obj length))
(level-status-update! (-> obj level s5-0) 'active)
@@ -1597,7 +1540,6 @@
0
)
;; definition for method 20 of type level-group
(defmethod level-get-target-inside level-group ((obj level-group))
(let ((s5-0 (target-pos 0)))
(let ((v1-1 (-> *load-state* vis-nick)))
@@ -1667,15 +1609,12 @@
)
)
;; definition for method 22 of type level-group
;; WARN: Return type mismatch int vs none.
(defmethod load-commands-set! level-group ((obj level-group) (arg0 pair))
(set! (-> obj load-commands) arg0)
0
(none)
)
;; definition for method 8 of type level-group
(defmethod mem-usage level-group ((obj level-group) (arg0 memory-usage-block) (arg1 int))
(dotimes (s3-0 (-> obj length))
(mem-usage (-> obj level s3-0) arg0 arg1)
@@ -1683,9 +1622,6 @@
obj
)
;; definition for function bg
;; WARN: Return type mismatch int vs none.
;; WARN: Using new Jak 2 rtype-of
(defun bg ((arg0 symbol))
(set! *cheat-mode* (if *debug-segment*
'debug
@@ -1752,7 +1688,6 @@
(none)
)
;; definition for function play
(defun play ((arg0 symbol) (arg1 symbol))
(kmemopen global "level-boot")
(when *kernel-boot-level*
@@ -1837,8 +1772,6 @@
0
)
;; definition for function play-boot
;; WARN: Return type mismatch int vs none.
(defun play-boot ()
(process-spawn-function
process
@@ -1850,7 +1783,6 @@
(none)
)
;; definition for function update-sound-banks
(defun update-sound-banks ()
(local-vars (v1-21 level-load-info) (v1-28 level-load-info) (a0-24 symbol))
(if (or (nonzero? (rpc-busy? 1))
@@ -1974,7 +1906,6 @@
0
)
;; definition for method 10 of type load-state
(defmethod update! load-state ((obj load-state))
(local-vars (all-levels-inactive symbol))
(let ((discarded-level #f))
@@ -2158,8 +2089,6 @@
0
)
;; definition for method 16 of type level-group
;; WARN: Return type mismatch int vs none.
(defmethod assign-draw-indices level-group ((obj level-group))
(local-vars (t0-3 symbol))
(set! (-> obj draw-level-count) 0)
@@ -2213,8 +2142,6 @@
(none)
)
;; definition for method 19 of type level-group
;; WARN: Return type mismatch int vs none.
(defmethod level-update level-group ((obj level-group))
(local-vars (v1-101 symbol))
(camera-pos)
@@ -2494,7 +2421,6 @@
(none)
)
;; definition (debug) for function show-level
(defun-debug show-level ((arg0 symbol))
(set! (-> *setting-control* user-default border-mode) #t)
(let ((s5-0 (new 'stack-no-clear 'array 'symbol 10)))
@@ -2510,7 +2436,6 @@
0
)
;; failed to figure out what this is:
(when (zero? (-> *level* level0 art-group))
(kmemopen global "level")
(let ((gp-0 *level*))
@@ -2547,7 +2472,3 @@
)
(kmemclose)
)
+1 -1
View File
@@ -468,7 +468,7 @@
;; definition of type rigid-body-object
(deftype rigid-body-object (process-focusable)
((root-override collide-shape-moving :offset 128)
((root-override-2 collide-shape-moving :offset 128)
(info rigid-body-object-constants :offset-assert 204)
(flags rigid-body-object-flag :offset-assert 208)
(max-time-step float :offset-assert 216)
+30 -29
View File
@@ -368,10 +368,10 @@
(vf5 :class vf)
)
(init-vf0-vector)
(let ((v1-0 (the-as basic arg0))
(let ((v1-0 arg0)
(a0-1 1)
)
(when (= (-> (the-as collide-shape-prim v1-0) prim-core prim-type) (prim-type group))
(when (= (-> v1-0 prim-core prim-type) (prim-type group))
(let ((a0-2 (the-as collide-shape-prim-group v1-0)))
(set! v1-0 (-> a0-2 child 0))
(set! a0-1 (the-as int (-> a0-2 num-children)))
@@ -379,7 +379,7 @@
)
(while (nonzero? a0-1)
(+! a0-1 -1)
(.lvf vf5 (&-> (the-as collide-shape-prim v1-0) local-sphere quad))
(.lvf vf5 (&-> v1-0 local-sphere quad))
(.lvf vf1 (&-> arg1 vector 0 quad))
(.lvf vf2 (&-> arg1 vector 1 quad))
(.lvf vf3 (&-> arg1 vector 2 quad))
@@ -388,8 +388,8 @@
(.add.mul.y.vf acc vf2 vf5 acc)
(.add.mul.z.vf acc vf3 vf5 acc)
(.add.mul.w.vf vf5 vf4 vf0 acc :mask #b111)
(.svf (&-> (the-as collide-shape-prim v1-0) prim-core world-sphere quad) vf5)
(set! v1-0 (&+ (the-as collide-shape-prim v1-0) 80))
(.svf (&-> v1-0 prim-core world-sphere quad) vf5)
(&+! v1-0 80)
)
)
#f
@@ -534,7 +534,7 @@
(+! s4-1 -1)
(s3-0 arg0 f30-0)
(let ((v1-2 obj)
(a1-2 (-> arg0 root-override))
(a1-2 (-> arg0 root-override-2))
(f0-4 f30-0)
)
(rigid-body-method-9 (-> v1-2 state) a1-2 f0-4)
@@ -648,17 +648,17 @@
(defmethod rigid-body-object-method-31 rigid-body-object ((obj rigid-body-object) (arg0 rigid-body-object-constants))
(set! (-> obj info) arg0)
(set! (-> obj rbody) (new 'process 'rigid-body-control obj))
(collide-shape-method-46 (-> obj root-override))
(collide-shape-method-46 (-> obj root-override-2))
(rigid-body-method-25
(-> obj rbody state)
(the-as rigid-body-info (&-> (-> obj info) mass))
(-> obj root-override trans)
(-> obj root-override quat)
(-> obj root-override-2 trans)
(-> obj root-override-2 quat)
(method-of-object obj rigid-body-object-method-29)
)
(rigid-body-object-method-35 obj)
(set! (-> obj max-time-step) (-> arg0 max-time-step))
(set! (-> obj root-override max-iteration-count) (the-as uint 4))
(set! (-> obj root-override-2 max-iteration-count) (the-as uint 4))
(let ((v1-15 (-> obj skel root-channel 0)))
(set! (-> v1-15 num-func) num-func-identity)
(set! (-> v1-15 frame-num) 0.0)
@@ -689,7 +689,7 @@
(set! (-> s5-0 backup-collide-as) (-> v1-16 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-16 prim-core collide-with))
)
(set! (-> obj root-override) s5-0)
(set! (-> obj root-override-2) s5-0)
)
0
(none)
@@ -747,7 +747,7 @@
(rigid-body-object-method-30 obj)
((method-of-object obj rigid-body-object-method-36))
(let ((v1-4 (-> obj rbody))
(a1-0 (-> obj root-override))
(a1-0 (-> obj root-override-2))
)
(rigid-body-method-11 (-> v1-4 state) a1-0)
)
@@ -760,9 +760,9 @@
;; WARN: Return type mismatch int vs none.
(defmethod rigid-body-object-method-40 rigid-body-object ((obj rigid-body-object))
(logior! (-> obj flags) (rigid-body-object-flag enable-collision))
(let ((v1-3 (-> obj root-override root-prim)))
(set! (-> v1-3 prim-core collide-as) (-> obj root-override backup-collide-as))
(set! (-> v1-3 prim-core collide-with) (-> obj root-override backup-collide-with))
(let ((v1-3 (-> obj root-override-2 root-prim)))
(set! (-> v1-3 prim-core collide-as) (-> obj root-override-2 backup-collide-as))
(set! (-> v1-3 prim-core collide-with) (-> obj root-override-2 backup-collide-with))
)
0
(none)
@@ -772,7 +772,7 @@
;; WARN: Return type mismatch int vs none.
(defmethod rigid-body-object-method-41 rigid-body-object ((obj rigid-body-object))
(logclear! (-> obj flags) (rigid-body-object-flag enable-collision))
(let ((v1-3 (-> obj root-override root-prim)))
(let ((v1-3 (-> obj root-override-2 root-prim)))
(set! (-> v1-3 prim-core collide-as) (collide-spec))
(set! (-> v1-3 prim-core collide-with) (collide-spec))
)
@@ -786,8 +786,8 @@
(defmethod rigid-body-object-method-38 rigid-body-object ((obj rigid-body-object))
(when (not (logtest? (-> obj rbody state flags) (rigid-body-flag enable-physics)))
(logior! (-> obj rbody state flags) (rigid-body-flag enable-physics))
(rigid-body-method-26 (-> obj rbody state) (-> obj root-override trans) (-> obj root-override quat))
(vector-float*! (-> obj rbody state lin-momentum) (-> obj root-override transv) (-> obj info mass))
(rigid-body-method-26 (-> obj rbody state) (-> obj root-override-2 trans) (-> obj root-override-2 quat))
(vector-float*! (-> obj rbody state lin-momentum) (-> obj root-override-2 transv) (-> obj info mass))
(vector-reset! (-> obj rbody state ang-momentum))
)
0
@@ -844,12 +844,12 @@
(set! (-> arg0 trans w) 0.0)
(vector-reset! (-> arg0 vector 1))
(vector-reset! (-> arg0 vector 2))
(set! (-> arg0 vector 0 quad) (-> obj root-override trans quad))
(set! (-> arg0 vector 0 quad) (-> obj root-override-2 trans quad))
(when arg1
(let ((s3-0 (-> arg1 head)))
(when s3-0
(get-intersect-point (the-as vector (-> arg0 vector)) s3-0 (-> obj root-override) arg1)
(let ((s5-1 (touching-prims-entry-method-10 s3-0 (-> obj root-override) arg1)))
(get-intersect-point (the-as vector (-> arg0 vector)) s3-0 (-> obj root-override-2) arg1)
(let ((s5-1 (touching-prims-entry-method-10 s3-0 (-> obj root-override-2) arg1)))
(when s5-1
(set! (-> arg0 trans w) (the-as float (-> s5-1 prim-id)))
(vector-! (-> arg0 vector 1) (the-as vector (-> arg0 vector)) (the-as vector (-> s5-1 prim-core)))
@@ -1041,7 +1041,7 @@
)
(when (not (logtest? (-> obj flags) (rigid-body-object-flag player-impulse-force)))
(logior! (-> obj flags) (rigid-body-object-flag player-touching player-standing-on player-contact-force))
(set! (-> obj player-force-position quad) (-> a0-34 root trans quad))
(set! (-> obj player-force-position quad) (-> a0-34 root-override trans quad))
(vector-reset! (-> obj player-force))
(let ((f0-4 (/ 163840.0 (process-focusable-method-26 a0-34)))
(f1-1 1.0)
@@ -1063,7 +1063,7 @@
)
(when a0-38
(logior! (-> obj flags) (rigid-body-object-flag player-touching player-impulse-force))
(set! (-> obj player-force-position quad) (-> a0-38 root trans quad))
(set! (-> obj player-force-position quad) (-> a0-38 root-override trans quad))
(let ((f30-2 (* 0.00012207031 (the-as float (-> arg3 param 1))))
(f0-9 (/ 163840.0 (process-focusable-method-26 a0-38)))
)
@@ -1092,7 +1092,7 @@
:virtual #t
:trans (behavior ()
(if (and *target* (and (>= (-> self info idle-distance)
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
(vector-vector-distance (-> self root-override-2 trans) (-> *target* control trans))
)
(zero? (logand (focus-status teleporting) (-> *target* focus-status)))
)
@@ -1113,11 +1113,12 @@
rigid-body-object-event-handler
)
:trans (behavior ()
(if (or (not *target*) (or (< (+ 4096.0 (-> self info idle-distance))
(vector-vector-distance (-> self root-override trans) (-> *target* control trans))
)
(logtest? (focus-status teleporting) (-> *target* focus-status))
)
(if (or (not *target*)
(or (< (+ 4096.0 (-> self info idle-distance))
(vector-vector-distance (-> self root-override-2 trans) (-> *target* control trans))
)
(logtest? (focus-status teleporting) (-> *target* focus-status))
)
)
(go-virtual idle)
)
+2 -6
View File
@@ -42,13 +42,13 @@
;; definition for method 10 of type focus
(defmethod collide-check? focus ((obj focus) (arg0 process-focusable))
(when (and arg0 (zero? (logand (-> arg0 focus-status) (focus-status disable dead))))
(let* ((s5-0 (-> arg0 root))
(let* ((s5-0 (-> arg0 root-override))
(v1-2 (if (type? s5-0 collide-shape)
s5-0
)
)
)
(and v1-2 (logtest? (-> obj collide-with) (-> (the-as collide-shape v1-2) root-prim prim-core collide-as)))
(and v1-2 (logtest? (-> obj collide-with) (-> v1-2 root-prim prim-core collide-as)))
)
)
)
@@ -68,7 +68,3 @@
0
(none)
)
@@ -1,7 +1,8 @@
(in-package goal)
(deftype process-focusable (process-drawable)
((focus-status focus-status :offset-assert 200)
((root-override collide-shape :offset 128)
(focus-status focus-status :offset-assert 200)
)
:heap-base #x50
:method-count-assert 27
@@ -33,7 +34,7 @@
(defmethod get-trans process-focusable ((obj process-focusable) (arg0 int))
"@returns the `trans` [[vector]] from the process's `root` (typically either a [[trsqv]] or a [[collide-shape]])"
(let ((gp-0 (-> obj root)))
(let ((gp-0 (-> obj root-override)))
(the-as vector (cond
((zero? arg0)
(-> gp-0 trans)
@@ -42,7 +43,7 @@
(-> (the-as collide-shape-moving gp-0) gspot-pos)
)
((and (or (= arg0 2) (= arg0 3)) (type? gp-0 collide-shape))
(-> (the-as collide-shape gp-0) root-prim prim-core)
(-> gp-0 root-prim prim-core)
)
(else
(-> gp-0 trans)
@@ -53,11 +54,11 @@
)
(defmethod get-transv process-focusable ((obj process-focusable))
(-> obj root transv)
(-> obj root-override transv)
)
(defmethod get-quat process-focusable ((obj process-focusable) (arg0 int))
(-> obj root quat)
(-> obj root-override quat)
)
(defmethod process-focusable-method-23 process-focusable ((obj process-focusable) (arg0 int))
@@ -3,37 +3,37 @@
;; definition of type process-taskable
(deftype process-taskable (process-focusable)
((task basic :offset-assert 204)
(ambient ambient-control :inline :offset-assert 208)
(neck-joint-index int32 :offset-assert 224)
(talk-message game-text-id :offset-assert 228)
(bounce-away symbol :offset-assert 232)
(will-talk symbol :offset-assert 236)
(look-at-me symbol :offset-assert 240)
(hide-during-movie symbol :offset-assert 244)
(talk-distance meters :offset-assert 248)
(talk-height meters :offset-assert 252)
(last-talk time-frame :offset-assert 256)
(want-to-say uint64 :offset-assert 264)
(birth-time time-frame :offset-assert 272)
(slave handle :offset-assert 280)
((task game-task-control :offset-assert 204)
(ambient ambient-control :inline :offset-assert 208)
(neck-joint-index int32 :offset-assert 224)
(talk-message game-text-id :offset-assert 228)
(bounce-away symbol :offset-assert 232)
(will-talk symbol :offset-assert 236)
(look-at-me symbol :offset-assert 240)
(hide-during-movie symbol :offset-assert 244)
(talk-distance meters :offset-assert 248)
(talk-height meters :offset-assert 252)
(last-talk time-frame :offset-assert 256)
(want-to-say time-frame :offset-assert 264)
(birth-time time-frame :offset-assert 272)
(slave handle :offset-assert 280)
)
:heap-base #xa0
:method-count-assert 38
:size-assert #x120
:flag-assert #x2600a00120
(:methods
(process-taskable-method-27 () none 27)
(process-taskable-method-28 () none 28)
(process-taskable-method-29 () none 29)
(process-taskable-method-30 () none 30)
(process-taskable-method-31 () none 31)
(process-taskable-method-32 () none 32)
(process-taskable-method-33 () none 33)
(process-taskable-method-34 () none 34)
(process-taskable-method-35 () none 35)
(process-taskable-method-36 () none 36)
(process-taskable-method-37 () none 37)
(hide () _type_ :state 27)
(idle () _type_ :state 28)
(active (game-task-event) _type_ :state 29)
(play-game (game-task-event) _type_ :state 30)
(process-taskable-method-31 (_type_) none 31)
(process-taskable-method-32 (_type_) none 32)
(process-taskable-method-33 (_type_) none 33)
(process-taskable-method-34 (_type_) symbol 34)
(process-taskable-method-35 (_type_) art-joint-anim 35)
(process-taskable-method-36 (_type_) none 36)
(process-taskable-method-37 (_type_) none 37)
)
)
@@ -66,7 +66,3 @@
;; failed to figure out what this is:
0
@@ -0,0 +1,446 @@
(in-package goal)
(defmethod relocate process-taskable ((obj process-taskable) (arg0 int))
(if (nonzero? (-> obj task))
(&+! (-> obj task) arg0)
)
(the-as process-taskable ((method-of-type process-focusable relocate) obj arg0))
)
(defbehavior process-taskable-anim-loop process-taskable ((arg0 (function symbol)))
(while (begin self (arg0))
(let ((s5-0 (process-taskable-method-35 self)))
(when (!= (ja-group) s5-0)
(ja-channel-push! 1 0)
(set! (-> self skel root-channel 0 frame-group) s5-0)
)
)
(suspend)
(if (ja-group)
(ja :num! (loop!))
)
(process-taskable-method-36 self)
)
0
(none)
)
(defmethod process-taskable-method-34 process-taskable ((obj process-taskable))
#t
)
(defmethod process-taskable-method-35 process-taskable ((obj process-taskable))
(if (> (-> obj skel active-channels) 0)
(-> obj skel root-channel 0 frame-group)
)
)
(defmethod process-taskable-method-36 process-taskable ((obj process-taskable))
0
(none)
)
(defmethod process-taskable-method-37 process-taskable ((obj process-taskable))
(let ((v1-1 (-> obj draw shadow-ctrl)))
(cond
((and (-> obj draw shadow)
(zero? (-> obj draw cur-lod))
(logtest? (-> obj draw status) (draw-control-status on-screen))
)
(shadow-control-method-13 v1-1 (-> obj draw origin) -4096.0 4096.0 32768.0)
)
(else
(logior! (-> v1-1 settings flags) (shadow-flags disable-draw))
0
)
)
)
(none)
)
(defstate hide (process-taskable)
:virtual #t
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(let ((v1-0 event-type))
(the-as object (when (= v1-0 'say)
(let ((v0-0 (-> self clock frame-counter)))
(set! (-> self want-to-say) v0-0)
v0-0
)
)
)
)
)
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(logior! (-> self draw status) (draw-control-status no-draw-bounds))
(let ((v1-6 (-> self root-override root-prim)))
(set! (-> v1-6 prim-core collide-as) (collide-spec))
(set! (-> v1-6 prim-core collide-with) (collide-spec))
)
0
(none)
)
:exit (behavior ()
(logclear! (-> self draw status) (draw-control-status no-draw-bounds))
(let ((v1-3 (-> self root-override root-prim)))
(set! (-> v1-3 prim-core collide-as) (-> self root-override backup-collide-as))
(set! (-> v1-3 prim-core collide-with) (-> self root-override backup-collide-with))
)
(none)
)
:trans (behavior ()
(let ((v1-1 (game-task-control-method-9 (-> self task))))
(if (and (nonzero? (-> v1-1 action)) (or (not (logtest? (-> self draw status) (draw-control-status on-screen)))
(logtest? (-> v1-1 flags) (game-task-flags gatflag-01))
(< (- (-> self clock frame-counter) (-> self birth-time)) (seconds 0.1))
)
)
(go-virtual idle)
)
)
(none)
)
:code (the-as (function none :behavior process-taskable) sleep-code)
)
(defstate idle (process-taskable)
:virtual #t
:enter (behavior ()
(set! (-> self state-time) (-> self clock frame-counter))
(none)
)
:exit (behavior ()
(logclear! (-> self draw status) (draw-control-status no-draw))
(none)
)
:trans (behavior ()
(let ((gp-0 (game-task-control-method-9 (-> self task))))
(cond
((= (-> gp-0 action) (game-task-action hide))
(if (or (not (logtest? (-> self draw status) (draw-control-status on-screen)))
(logtest? (-> gp-0 flags) (game-task-flags gatflag-01))
)
(go-virtual hide)
)
)
((or (not *target*) *scene-player*)
)
((not (-> self will-talk))
(if (>= (- (-> *display* game-clock frame-counter) (-> self last-talk)) (seconds 5))
(set! (-> self will-talk) #t)
)
)
((and (-> gp-0 scene)
(begin
(if (not (or (demo?)
(= (-> gp-0 action) (game-task-action play))
(-> *setting-control* user-current movie-name)
(name= (-> gp-0 scene) (-> *setting-control* user-current movie-name))
)
)
(gui-control-method-12
*gui-control*
self
(gui-channel art-load)
(gui-action queue)
(the-as string (-> gp-0 scene))
0
-99.0
(new 'static 'sound-id)
)
)
(and (zero? (logand (focus-status dead in-air in-head pole flut tube pilot mech dark) (-> *target* focus-status)))
(and (or (and (< (-> (target-pos 0) y) (+ (-> self root-override root-prim prim-core world-sphere y) (-> self talk-height)))
(let ((s5-0 (get-trans self 2))
(f30-0 (if (= (-> gp-0 distance) 0.0)
(-> self talk-distance)
(-> gp-0 distance)
)
)
)
(< (vector-vector-distance (target-pos 0) s5-0) f30-0)
)
)
(< (- (-> self clock frame-counter) (-> self want-to-say)) (seconds 4))
)
(or (not (load-in-progress? *level*)) (= (-> gp-0 action) (game-task-action say)))
(and (not (movie?))
(not (talker-displayed?))
(none-reserved? *art-control*)
(not *progress-process*)
(not (-> *setting-control* user-current movie))
)
)
)
)
)
(when (and (or (= (-> gp-0 action) (game-task-action say))
(= (-> gp-0 action) (game-task-action talk))
(= (-> gp-0 action) (game-task-action shade))
(= (-> gp-0 action) (game-task-action play))
)
(process-taskable-method-34 self)
)
(when (or (= (-> gp-0 action) (game-task-action say))
(< (- (-> self clock frame-counter) (-> self want-to-say)) (seconds 4))
)
(case (-> gp-0 action)
(((game-task-action play))
(go-virtual play-game gp-0)
)
(else
(go-virtual active gp-0)
)
)
)
(kill-current-talker (the-as symbol '()) '(daxter voicebox ambient) 'exit)
(talker-surpress!)
(when (can-display-query? self (the-as string #f) -99.0)
(let ((s5-1 (new
'stack
'font-context
*font-default-matrix*
32
280
0.0
(font-color default-#cddbcd)
(font-flags shadow kerning)
)
)
)
(let ((v1-84 s5-1))
(set! (-> v1-84 width) (the float (the-as float #x154)))
)
(let ((v1-85 s5-1))
(set! (-> v1-85 height) (the float (the-as float #x50)))
)
(let ((v1-86 s5-1))
(set! (-> v1-86 scale) 0.9)
)
(set! (-> s5-1 flags) (font-flags shadow kerning left large))
(print-game-text (lookup-text! *common-text* (-> self talk-message) #f) s5-1 #f 44 320)
)
(when (cpad-pressed? 0 triangle)
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle))
(case (-> gp-0 action)
(((game-task-action play))
(go-virtual play-game gp-0)
)
(else
(go-virtual active gp-0)
)
)
)
)
)
)
)
)
(process-taskable-method-37 self)
(none)
)
:code (behavior ()
(process-taskable-anim-loop true-func)
(none)
)
:post (behavior ()
(if (and (-> self hide-during-movie) (movie?))
(logior! (-> self draw status) (draw-control-status no-draw))
(logclear! (-> self draw status) (draw-control-status no-draw))
)
(when (-> self look-at-me)
(if *target*
(look-at! (-> *target* neck) (get-trans self 2) 'nothing-special self)
)
)
(transform-post)
(none)
)
)
(defstate active (process-taskable)
:virtual #t
:event (-> (method-of-type process-taskable hide) event)
:enter (behavior ((arg0 game-task-event))
(set! (-> self want-to-say) 0)
(process-entity-status! self (entity-perm-status no-kill) #t)
(logclear! (-> self mask) (process-mask actor-pause))
(none)
)
:exit (behavior ()
(set! (-> self last-talk) (-> *display* game-clock frame-counter))
(if (< (- (-> self clock frame-counter) (-> self want-to-say)) (seconds 4))
(set! (-> self will-talk) #t)
(set! (-> self will-talk) #f)
)
(process-entity-status! self (entity-perm-status no-kill) #f)
(logior! (-> self mask) (process-mask actor-pause))
(logclear! (-> self draw status) (draw-control-status no-draw))
(let ((v1-13 (-> self root-override root-prim)))
(set! (-> v1-13 prim-core collide-as) (-> self root-override backup-collide-as))
(set! (-> v1-13 prim-core collide-with) (-> self root-override backup-collide-with))
)
(none)
)
:code (behavior ((arg0 game-task-event))
(when (-> arg0 scene)
(let ((gp-1 (ppointer->handle (process-spawn scene-player :init scene-player-init (-> arg0 scene) #t #f))))
(while (and (handle->process (the-as handle gp-1)) (not (movie?)))
(suspend)
)
(logior! (-> self draw status) (draw-control-status no-draw))
(let ((v1-17 (-> self root-override root-prim)))
(set! (-> v1-17 prim-core collide-as) (collide-spec))
(set! (-> v1-17 prim-core collide-with) (collide-spec))
)
0
(while (handle->process (the-as handle gp-1))
(suspend)
)
)
)
(go-virtual hide)
(none)
)
)
(defstate play-game (process-taskable)
:virtual #t
:enter (-> (method-of-type process-taskable active) enter)
:exit (-> (method-of-type process-taskable active) exit)
:code (behavior ((arg0 game-task-event))
(let ((gp-0 (-> self clock frame-counter)))
(until (>= (- (-> self clock frame-counter) gp-0) (seconds 0.5))
(suspend)
)
)
(go-virtual hide)
(none)
)
:post (-> (method-of-type process-taskable idle) post)
)
(defmethod process-taskable-method-31 process-taskable ((obj process-taskable))
(let ((s5-0 (new 'process 'collide-shape obj (collide-list-enum usually-hit-by-player))))
(let ((s4-0 (new 'process 'collide-shape-prim-group s5-0 (the-as uint 3) 0)))
(set! (-> s5-0 total-prims) (the-as uint 4))
(set! (-> s4-0 prim-core collide-as) (collide-spec civilian))
(set! (-> s4-0 prim-core action) (collide-action solid no-standon))
(set! (-> s4-0 transform-index) 0)
(set-vector! (-> s4-0 local-sphere) 0.0 -1024.0 0.0 7372.8)
(set! (-> s5-0 root-prim) s4-0)
)
(let ((v1-7 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-7 prim-core collide-as) (collide-spec civilian))
(set! (-> v1-7 prim-core action) (collide-action solid))
(set! (-> v1-7 transform-index) 0)
(set-vector! (-> v1-7 local-sphere) 0.0 -4096.0 0.0 4096.0)
)
(let ((v1-9 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-9 prim-core collide-as) (collide-spec civilian))
(set! (-> v1-9 prim-core action) (collide-action solid))
(set! (-> v1-9 transform-index) 0)
(set-vector! (-> v1-9 local-sphere) 0.0 -1024.0 0.0 4096.0)
)
(let ((v1-11 (new 'process 'collide-shape-prim-sphere s5-0 (the-as uint 0))))
(set! (-> v1-11 prim-core collide-as) (collide-spec civilian))
(set! (-> v1-11 prim-core action) (collide-action solid no-standon))
(set! (-> v1-11 transform-index) 0)
(set-vector! (-> v1-11 local-sphere) 0.0 2048.0 0.0 4096.0)
)
(set! (-> s5-0 nav-radius) (* 0.75 (-> s5-0 root-prim local-sphere w)))
(let ((v1-14 (-> s5-0 root-prim)))
(set! (-> s5-0 backup-collide-as) (-> v1-14 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-14 prim-core collide-with))
)
(set! (-> obj root-override) s5-0)
)
0
(none)
)
(defmethod process-taskable-method-32 process-taskable ((obj process-taskable))
(logior! (-> obj skel status) (joint-control-status eye-anim))
(set! (-> obj talk-message) (game-text-id text-x181))
(set! (-> obj bounce-away) #t)
(set! (-> obj will-talk) #t)
(set! (-> obj look-at-me) #t)
(set! (-> obj hide-during-movie) #t)
(set! (-> obj neck-joint-index) -1)
(set! (-> obj talk-distance) (res-lump-float (-> obj entity) 'distance :default 32768.0))
(set! (-> obj talk-height) (res-lump-float (-> obj entity) 'height :default 8192.0))
(set! (-> obj slave) (the-as handle #f))
(set! (-> obj draw shadow-ctrl)
(new 'process 'shadow-control 0.0 0.0 614400.0 0.000000000000000000000000000000000000000000084 245760.0)
)
(let ((s5-0 0))
(let ((v1-15 (the-as joint (get-art-by-name-method (-> obj draw jgeo) "main" (the-as type #f)))))
(if v1-15
(set! s5-0 (+ (-> v1-15 number) 1))
)
)
(let ((v1-19 (the-as collide-shape-prim-group (-> obj root-override root-prim))))
(set! (-> v1-19 transform-index) s5-0)
(dotimes (a0-7 (the-as int (-> v1-19 num-children)))
(set! (-> v1-19 child a0-7 transform-index) s5-0)
)
)
)
0
(none)
)
(defmethod process-taskable-method-33 process-taskable ((obj process-taskable))
0
(none)
)
(defmethod init-from-entity! process-taskable ((obj process-taskable) (arg0 entity-actor))
(stack-size-set! (-> obj main-thread) 512)
(process-taskable-method-31 obj)
(process-drawable-from-entity! obj arg0)
(set! (-> obj task)
(new 'process 'game-task-control (res-lump-value arg0 'task-actor game-task-actor :time -1000000000.0))
)
(process-taskable-method-33 obj)
(process-taskable-method-32 obj)
(when (logtest? #x1000000 (res-lump-value arg0 'options uint128 :time -1000000000.0))
(let* ((s5-1 *level*)
(s4-2 (method-of-object s5-1 art-group-get-by-name))
)
(format (clear *temp-string*) "skel-~S" (-> obj draw art-group name))
(let ((s4-3 (s4-2 s5-1 *temp-string* (the-as (pointer uint32) #f))))
(when s4-3
(let* ((s3-2 (get-process *default-dead-pool* manipy #x4000))
(s5-2
(when s3-2
(let ((t9-12 (method-of-type manipy activate)))
(t9-12 (the-as manipy s3-2) obj (symbol->string (-> manipy symbol)) (the-as pointer #x70004000))
)
(let ((t9-13 run-function-in-process)
(a0-14 s3-2)
(a1-10 manipy-init)
(a2-9 (-> obj root-override trans))
(a3-3 (-> obj entity))
(t1-2 #f)
)
0
((the-as (function object object object object object object none) t9-13) a0-14 a1-10 a2-9 a3-3 s4-3 t1-2)
)
(-> s3-2 ppointer)
)
)
)
(send-event (ppointer->process s5-2) 'anim-mode 'mirror)
(send-event (ppointer->process s5-2) 'mirror #t)
)
)
)
)
)
(set! (-> obj event-hook) (-> (method-of-object obj idle) event))
(go (method-of-object obj hide))
(none)
)
@@ -27,7 +27,7 @@
(defmethod get-trans simple-focus ((obj simple-focus) (arg0 int))
"@returns the `trans` [[vector]] from the process's `root` (typically either a [[trsqv]] or a [[collide-shape]])"
(-> obj root trans)
(-> obj root-override trans)
)
(defmethod run-logic? simple-focus ((obj simple-focus))
@@ -42,7 +42,7 @@
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(let ((v1-0 event-type))
(the-as object (when (= v1-0 'move-trans)
(let ((v0-0 (-> self root trans)))
(let ((v0-0 (-> self root-override trans)))
(set! (-> v0-0 quad) (-> (the-as vector (-> event param 0)) quad))
v0-0
)
@@ -56,7 +56,7 @@
(defbehavior simple-focus-init-by-other simple-focus ()
"Initializes the new [[simple-focus]]. `first-time?` will be set to [[#t]]"
(let ((root (new 'process 'trsqv)))
(set! (-> self root) root)
(set! (-> self root-override) (the-as collide-shape root))
(vector-identity! (-> root scale))
(quaternion-identity! (-> root quat))
)
@@ -106,7 +106,7 @@
(set! (-> s5-0 backup-collide-as) (-> v1-15 prim-core collide-as))
(set! (-> s5-0 backup-collide-with) (-> v1-15 prim-core collide-with))
)
(set! (-> obj root) s5-0)
(set! (-> obj root-override) s5-0)
)
(none)
)
+2 -3
View File
@@ -167,11 +167,10 @@
"update-time-of-day",
"close-sky-buffer", // asm
"(method 29 level)", "(method 9 level)", "level-update-after-load", "(method 25 level)", "(method 9 level)",
"(method 12 level)", "(method 10 level)",
"i-hopefully-will-never-exist-dont-add-anything-after-me-please"
"(method 12 level)", "(method 10 level)"
],
"skip_compile_states": {
"(idle process-taskable)": ["event"]
}
}