mirror of
https://github.com/open-goal/jak-project
synced 2026-09-10 12:25:21 -04:00
d/jak2: address almost all feedback, blocked on progress-static issue for now
This commit is contained in:
@@ -1127,7 +1127,7 @@
|
||||
(deftype vector4w-4 (structure)
|
||||
((data int32 16 :offset-assert 0)
|
||||
(quad uint128 4 :offset 0)
|
||||
(vector vector4w 4 :inline :offset 0)
|
||||
(vector vector4w 4 :inline :offset 0 :score 999)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x40
|
||||
@@ -5057,7 +5057,7 @@
|
||||
|
||||
(deftype texture-page-translate-item (structure)
|
||||
((bucket bucket-id :offset-assert 0)
|
||||
(level-index uint32 :offset-assert 4) ;; TODO - this is an enum
|
||||
(level-index uint32 :offset-assert 4)
|
||||
(level-texture-page tpage-category-u32 :offset-assert 8)
|
||||
(texture-user texture-enable-mask-u32 :offset-assert 12)
|
||||
)
|
||||
@@ -12594,7 +12594,7 @@
|
||||
(debug-features game-feature :offset-assert 136)
|
||||
(secrets game-secrets :offset-assert 144)
|
||||
(unknown-pad1 uint32)
|
||||
(purchase-secrets uint32 :offset-assert 152)
|
||||
(purchase-secrets game-secrets :offset-assert 152)
|
||||
(unknown-pad2 uint32 :offset-assert 156)
|
||||
(gun-type int32 :offset-assert 160)
|
||||
(gun-ammo float 4 :offset-assert 164)
|
||||
@@ -17023,7 +17023,7 @@
|
||||
(get-trans
|
||||
"@returns the `trans` [[vector]] from the process's `root` (typically either a [[trsqv]] or a [[collide-shape]]"
|
||||
(_type_ int) vector 20)
|
||||
(get-quat (_type_) quaternion 21)
|
||||
(get-quat (_type_ int) quaternion 21)
|
||||
(get-transv (_type_) vector 22)
|
||||
(process-focusable-method-23 (_type_) none 23)
|
||||
(process-focusable-method-24 (_type_) float 24)
|
||||
@@ -20337,7 +20337,7 @@
|
||||
:size-assert #x34
|
||||
:flag-assert #xb00000034
|
||||
(:methods
|
||||
(hud-sprite-method-9 () none 9)
|
||||
(hud-sprite-method-9 (_type_ dma-buffer level) none 9)
|
||||
(hud-sprite-method-10 () none 10)
|
||||
)
|
||||
)
|
||||
@@ -20351,7 +20351,7 @@
|
||||
:size-assert #x20
|
||||
:flag-assert #x1000000020
|
||||
(:methods
|
||||
(hud-box-method-9 () none 9)
|
||||
(hud-box-method-9 (_type_ dma-buffer) none 9)
|
||||
(hud-box-method-10 () none 10)
|
||||
(hud-box-method-11 () none 11)
|
||||
(hud-box-method-12 () none 12)
|
||||
@@ -21040,8 +21040,7 @@
|
||||
)
|
||||
|
||||
(deftype menu-memcard-slot-option (menu-option)
|
||||
((sprites hud-sprite 5 :inline :offset-assert 48) ;; total guess
|
||||
(something-hud-related basic :offset 112)
|
||||
((sprites hud-sprite 5 :inline :offset-assert 48 :score 999) ;; total guess
|
||||
(pad uint8 32)
|
||||
)
|
||||
:method-count-assert 12
|
||||
@@ -23042,7 +23041,7 @@
|
||||
(define-extern debug-reset-buffers (function symbol))
|
||||
(define-extern debug-draw-buffers (function symbol))
|
||||
(define-extern add-debug-line (function symbol bucket-id vector vector rgba symbol rgba symbol))
|
||||
(define-extern add-debug-line2d (function symbol bucket-id vector vector vector symbol))
|
||||
(define-extern add-debug-line2d (function symbol bucket-id vector4w vector4w vector4w symbol))
|
||||
(define-extern add-debug-box (function symbol bucket-id vector vector rgba symbol))
|
||||
(define-extern add-debug-box-with-transform (function symbol bucket-id bounding-box matrix rgba symbol)) ;; unsure if arg2 is bounding-box
|
||||
(define-extern add-debug-x (function symbol bucket-id vector rgba symbol))
|
||||
@@ -25896,8 +25895,8 @@
|
||||
(define-extern *expanded-text-line1* string)
|
||||
(define-extern *level-text-file-load-flag* symbol)
|
||||
(define-extern convert-korean-text
|
||||
"Converts the provided [[game-text]] into korean. Returns a [[string]]"
|
||||
(function game-text string))
|
||||
"Converts the provided [[string]] of [[game-text]] into korean. Returns a [[string]]"
|
||||
(function string string))
|
||||
(define-extern text-is-loading symbol)
|
||||
(define-extern load-game-text-info
|
||||
"Load text, if needed. txt-name is the group name, curr-text is the _symbol_ for
|
||||
@@ -29884,7 +29883,7 @@
|
||||
(define-extern hide-hud-quick (function symbol none))
|
||||
(define-extern show-hud (function object none))
|
||||
(define-extern hud-hidden? (function symbol))
|
||||
(define-extern set-hud-piece-position! (function basic int int none))
|
||||
(define-extern set-hud-piece-position! (function hud-sprite int int none))
|
||||
;; (define-extern set-as-offset-from! function)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@@ -29958,9 +29957,9 @@
|
||||
(define-extern *hud-ring-graphic-remap* (array uint64)) ;; these are probably bitfields of some kind
|
||||
(define-extern *hud-ring-kiosk-graphic-remap* (array uint64))
|
||||
(define-extern *hud-ring-demo-graphic-remap* (array uint64))
|
||||
(define-extern *hud-select-scene-act1* menu-option-list)
|
||||
(define-extern *hud-select-scene-act2* menu-option-list)
|
||||
(define-extern *hud-select-scene-act3* menu-option-list)
|
||||
(define-extern *hud-select-scene-act1* (array hud-scene-info))
|
||||
(define-extern *hud-select-scene-act2* (array hud-scene-info))
|
||||
(define-extern *hud-select-scene-act3* (array hud-scene-info))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; progress ;;
|
||||
@@ -30085,21 +30084,20 @@
|
||||
(define-extern draw-scene-up-down (function font-context none))
|
||||
(define-extern begin-scissor (function hud-box progress none))
|
||||
(define-extern end-scissor (function hud-box float none))
|
||||
(define-extern begin-scissor-secret (function hud-box none))
|
||||
(define-extern begin-scissor-secret (function hud-box progress none))
|
||||
(define-extern end-scissor-secret (function hud-box float none))
|
||||
(define-extern begin-scissor-missions (function hud-box float none))
|
||||
(define-extern end-scissor-missions (function hud-box none))
|
||||
(define-extern end-scissor-missions (function hud-box float none))
|
||||
(define-extern begin-scissor-scene (function hud-box none))
|
||||
(define-extern end-scissor-scene (function hud-box float none))
|
||||
(define-extern begin-scissor-level (function hud-box none))
|
||||
(define-extern end-scissor-level (function hud-box none))
|
||||
(define-extern end-scissor-level (function hud-box float none))
|
||||
(define-extern print-language-name (function game-text-id font-context int symbol none))
|
||||
(define-extern unlocked-secret-menu? (function int symbol))
|
||||
(define-extern memcard-unlocked-secrets? "TODO - returns a bitfield" (function symbol int))
|
||||
(define-extern unlocked-secret-menu? (function game-secrets symbol))
|
||||
(define-extern memcard-unlocked-secrets? (function symbol game-secrets))
|
||||
(define-extern num-unlocked-secret?
|
||||
"TODO - bitfield
|
||||
@returns The number of secrets currently unlocked"
|
||||
(function int int))
|
||||
"@returns The number of secrets currently unlocked"
|
||||
(function game-secrets int))
|
||||
(define-extern print-menu-text (function string float font-context progress none))
|
||||
(define-extern draw-yes-no (function progress font-context pointer))
|
||||
(define-extern draw-continue-retry (function progress font-context pointer))
|
||||
@@ -30131,7 +30129,7 @@
|
||||
(define-extern get-next-highscore (function int int))
|
||||
(define-extern get-prev-highscore (function int int))
|
||||
(define-extern get-highscore-icon-scale "TODO - takes an enum?" (function int float))
|
||||
(define-extern get-highscore-icon-xoffset (function int))
|
||||
(define-extern get-highscore-icon-xoffset (function int int))
|
||||
(define-extern get-highscore-icon-yoffset "TODO - takes an enum?" (function int int))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@@ -32917,7 +32915,7 @@
|
||||
;; elevator ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;; +++elevator-flags
|
||||
;; +++elevator:elevator-flags
|
||||
(defenum elevator-flags
|
||||
:type uint64
|
||||
:bitfield #t
|
||||
@@ -32930,7 +32928,7 @@
|
||||
(elevator-flags-6)
|
||||
(elevator-flags-7)
|
||||
)
|
||||
;; ---elevator-flags
|
||||
;; ---elevator:elevator-flags
|
||||
|
||||
(deftype elevator-params (structure)
|
||||
((xz-threshold float :offset-assert 0)
|
||||
|
||||
@@ -344,7 +344,9 @@
|
||||
],
|
||||
"(method 27 conveyor)": [5, 14, 22],
|
||||
"(method 44 nav-graph)": [1, 3, 6, 13, 17],
|
||||
"(method 11 sparticle-launch-control)": [18, 24, 25, 28, 29, 32, 33, 34, 36, 41, 55, 58, 93, 95]
|
||||
"(method 11 sparticle-launch-control)": [
|
||||
18, 24, 25, 28, 29, 32, 33, 34, 36, 41, 55, 58, 93, 95
|
||||
]
|
||||
},
|
||||
|
||||
// Sometimes the game might use format strings that are fetched dynamically,
|
||||
|
||||
@@ -184,5 +184,11 @@
|
||||
|
||||
"streamed_audio_file_names": [],
|
||||
|
||||
"levels_to_extract": ["PRI.DGO", "CTA.DGO", "CWI.DGO", "LWIDEA.DGO", "VI1.DGO"]
|
||||
"levels_to_extract": [
|
||||
"PRI.DGO",
|
||||
"CTA.DGO",
|
||||
"CWI.DGO",
|
||||
"LWIDEA.DGO",
|
||||
"VI1.DGO"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
],
|
||||
"text": [
|
||||
["L96", "vector4"],
|
||||
["L95", "matrix"],
|
||||
["L95", "vector4w-4"],
|
||||
["L96", "vector4w"]
|
||||
],
|
||||
"joint-mod": [["L189", "(inline-array quaternion)", 3]],
|
||||
|
||||
@@ -928,7 +928,6 @@
|
||||
[16, "vector"],
|
||||
[32, "vector"]
|
||||
],
|
||||
"target-board-pre-move": [[112, "vector"]],
|
||||
"progress-post": [[112, "hud-box"]],
|
||||
"(method 10 menu-missions-option)": [[224, "hud-box"]],
|
||||
"(method 10 menu-secret-option)": [[64, "hud-box"]],
|
||||
|
||||
@@ -965,7 +965,10 @@
|
||||
[5, "s5", "glst-named-node"],
|
||||
[6, "v1", "glst-named-node"]
|
||||
],
|
||||
"(event time-of-day-tick)": [[10, "v1", "float"], [148, "v1", "float"]],
|
||||
"(event time-of-day-tick)": [
|
||||
[10, "v1", "float"],
|
||||
[148, "v1", "float"]
|
||||
],
|
||||
"cam-slave-get-vector-with-offset": [[[52, 61], "s3", "vector"]],
|
||||
"cam-slave-get-interp-time": [[43, "f0", "float"]],
|
||||
"cam-standard-event-handler": [
|
||||
@@ -994,7 +997,7 @@
|
||||
[606, "v1", "float"]
|
||||
],
|
||||
"master-track-target": [[[53, 526], "gp", "target"]],
|
||||
"reset-target-tracking": [[[14, 152], "gp", "process-focusable"]],
|
||||
"reset-target-tracking": [[[14, 138], "gp", "process-focusable"]],
|
||||
"reset-follow": [[[12, 18], "a0", "process-focusable"]],
|
||||
"(code cam-pov)": [
|
||||
[15, "a1", "pov-camera"],
|
||||
@@ -2766,12 +2769,8 @@
|
||||
[[171, 193], "s2", "(pointer uint8)"],
|
||||
[227, "v1", "(pointer uint8)"]
|
||||
],
|
||||
"set-fog-height!": [
|
||||
[2, "v1", "(array texture-anim)"]
|
||||
],
|
||||
"unpack-comp-huf": [
|
||||
[[21,23], "t3", "(pointer uint16)"]
|
||||
],
|
||||
"set-fog-height!": [[2, "v1", "(array texture-anim)"]],
|
||||
"unpack-comp-huf": [[[21, 23], "t3", "(pointer uint16)"]],
|
||||
"(method 10 elec-gate)": [[13, "t9", "(function process-drawable none)"]],
|
||||
"(method 11 elec-gate)": [
|
||||
[180, "a0", "vector"],
|
||||
@@ -3045,5 +3044,8 @@
|
||||
"(method 10 progress)": [[45, "t9", "(function progress none)"]],
|
||||
"load-game-text-info": [[4, "v1", "game-text-info"]],
|
||||
"(method 16 camera-master)": [[[11, 15], "a2", "target"]],
|
||||
"master-choose-entity": [[[87, 247], "s3", "(pointer camera-slave)"]]
|
||||
"master-choose-entity": [
|
||||
["_stack_", 96, "res-tag"],
|
||||
[[87, 247], "s3", "(pointer camera-slave)"]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -978,7 +978,12 @@ goos::Object decompile_structure(const TypeSpec& type,
|
||||
}
|
||||
|
||||
if (all_zero) {
|
||||
// field has nothing in it, just skip it.
|
||||
// special case for dynamic arrays at the end of a type
|
||||
// TODO - this causes an assert in Type.hL240
|
||||
// if (!(field_start == field_end && field.is_dynamic())) {
|
||||
// // field has nothing in it, just skip it.
|
||||
// continue;
|
||||
//}
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,6 +71,8 @@ u32 STRThread() {
|
||||
} else if (g_game_version == GameVersion::Jak2) {
|
||||
sceSifRegisterRpc(&serve, STR_RPC_ID[g_game_version], RPC_STR_jak2, &sSTRBufJak2, nullptr,
|
||||
nullptr, &dq);
|
||||
} else {
|
||||
ASSERT_MSG(false, "unsupported game version in STRThread initialization!");
|
||||
}
|
||||
|
||||
CpuEnableIntr();
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
;; name in dgo: cam-master
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
;; TODO - waiting for particle code for cam-master-effect and such, two instances of commented out code here
|
||||
|
||||
;;og:ignore-form:camera-master-method-16
|
||||
|
||||
;; DECOMP BEGINS
|
||||
@@ -34,22 +36,8 @@
|
||||
(set! (-> self tpos-old-adj quad) (-> self tpos-old quad))
|
||||
(set! (-> self tpos-curr-adj quad) (-> self tpos-old quad))
|
||||
(set! (-> self tpos-tgt quad) (-> self tpos-old quad))
|
||||
(let* ((s5-1 quaternion->matrix)
|
||||
(s4-0 (-> self tgt-rot-mat))
|
||||
(a0-12 (the-as process-focusable gp-0))
|
||||
(t9-1 (method-of-object a0-12 get-quat))
|
||||
)
|
||||
2
|
||||
(s5-1 s4-0 (t9-1 a0-12))
|
||||
)
|
||||
(let* ((s5-2 quaternion->matrix)
|
||||
(s4-1 (-> self tgt-face-mat))
|
||||
(a0-14 (the-as process-focusable gp-0))
|
||||
(t9-3 (method-of-object a0-14 get-quat))
|
||||
)
|
||||
1
|
||||
(s5-2 s4-1 (t9-3 a0-14))
|
||||
)
|
||||
(quaternion->matrix (-> self tgt-rot-mat) (get-quat (the-as process-focusable gp-0) 2))
|
||||
(quaternion->matrix (-> self tgt-face-mat) (get-quat (the-as process-focusable gp-0) 1))
|
||||
(vector-reset! (-> self pitch-off))
|
||||
(set! (-> self upspeed) 0.0)
|
||||
(set! (-> self on-ground)
|
||||
@@ -85,14 +73,9 @@
|
||||
0
|
||||
)
|
||||
)
|
||||
(let ((gp-1 (the-as process-focusable (new 'stack-no-clear 'vector))))
|
||||
(vector--float*!
|
||||
(the-as vector gp-1)
|
||||
(-> self tpos-curr-adj)
|
||||
(-> self local-down)
|
||||
(-> self settings target-height)
|
||||
)
|
||||
(tracking-spline-method-10 (-> self target-spline) (the-as vector gp-1))
|
||||
(let ((gp-1 (new 'stack-no-clear 'vector)))
|
||||
(vector--float*! gp-1 (-> self tpos-curr-adj) (-> self local-down) (-> self settings target-height))
|
||||
(tracking-spline-method-10 (-> self target-spline) gp-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -149,22 +132,8 @@
|
||||
)
|
||||
(set! (-> self tpos-old quad) (-> self tpos-curr quad))
|
||||
(set! (-> self tpos-old-adj quad) (-> self tpos-curr-adj quad))
|
||||
(let* ((s5-1 quaternion->matrix)
|
||||
(s4-0 (-> self tgt-rot-mat))
|
||||
(a0-12 (the-as target gp-0))
|
||||
(t9-4 (method-of-object a0-12 get-quat))
|
||||
)
|
||||
2
|
||||
(s5-1 s4-0 (t9-4 a0-12))
|
||||
)
|
||||
(let* ((s5-2 quaternion->matrix)
|
||||
(s4-1 (-> self tgt-face-mat))
|
||||
(a0-14 (the-as target gp-0))
|
||||
(t9-6 (method-of-object a0-14 get-quat))
|
||||
)
|
||||
1
|
||||
(s5-2 s4-1 (t9-6 a0-14))
|
||||
)
|
||||
(quaternion->matrix (-> self tgt-rot-mat) (get-quat (the-as target gp-0) 2))
|
||||
(quaternion->matrix (-> self tgt-face-mat) (get-quat (the-as target gp-0) 1))
|
||||
(cond
|
||||
((< (-> self ease-t) 1.0)
|
||||
(new 'stack-no-clear 'vector)
|
||||
@@ -304,7 +273,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (zero? (logand (-> self settings slave-options) (cam-slave-options JUMP_PITCHES)))
|
||||
(if (not (logtest? (-> self settings slave-options) (cam-slave-options JUMP_PITCHES)))
|
||||
(reset-follow)
|
||||
)
|
||||
(when (and (logtest? (-> (the-as target gp-0) focus-status) (focus-status on-water under-water))
|
||||
@@ -367,10 +336,8 @@
|
||||
|
||||
(defbehavior master-choose-entity camera-master ((arg0 cam-setting-data))
|
||||
(local-vars
|
||||
(r0-0 uint128)
|
||||
(v1-22 symbol)
|
||||
(v1-52 uint128)
|
||||
(sv-96 int)
|
||||
(sv-96 res-tag)
|
||||
(sv-112 process)
|
||||
(sv-128 (pointer process))
|
||||
(sv-144 int)
|
||||
@@ -394,8 +361,8 @@
|
||||
(format 0 "ERROR <GMJ>: camera entity '~S' didn't produce a state~%" (res-lump-struct s5-0 'name structure))
|
||||
)
|
||||
)
|
||||
(set! sv-96 0)
|
||||
(let ((s4-1 (res-lump-data s5-0 'alternates pointer :tag-ptr (the-as (pointer res-tag) (& sv-96)))))
|
||||
(set! sv-96 (new 'static 'res-tag))
|
||||
(let ((s4-1 (res-lump-data s5-0 'alternates pointer :tag-ptr (& sv-96))))
|
||||
(when s4-1
|
||||
(let* ((s1-1 (get-process *camera-dead-pool* camera-slave #x4000))
|
||||
(s3-1 (when s1-1
|
||||
@@ -416,86 +383,78 @@
|
||||
(setup-slave-for-hopefull (the-as camera-slave (ppointer->process s3-1)))
|
||||
(format 0 "ERROR <GMJ>: primary region activate failed~%")
|
||||
)
|
||||
(let ((s2-1 0))
|
||||
(while (begin
|
||||
(let ((v1-51 (the-as uint128 sv-96)))
|
||||
(.pcpyud v1-52 v1-51 r0-0)
|
||||
)
|
||||
(< s2-1 (shr (* (the-as int v1-52) 2) 49))
|
||||
)
|
||||
(let ((s0-0 (entity-by-name (the-as string (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4))))))))
|
||||
(cond
|
||||
(s0-0
|
||||
(let ((s1-2 (cam-state-from-entity s0-0)))
|
||||
(cond
|
||||
(s1-2
|
||||
(set! sv-112 (get-process *camera-dead-pool* camera-slave #x4000))
|
||||
(set! v1-22 (when sv-112
|
||||
(set! sv-128 (the-as (pointer process) v1-22))
|
||||
(let ((t9-14 (method-of-type camera-slave activate)))
|
||||
(t9-14
|
||||
(the-as camera-slave sv-112)
|
||||
*camera*
|
||||
(symbol->string (-> camera-slave symbol))
|
||||
(the-as pointer #x70004000)
|
||||
)
|
||||
(dotimes (s2-1 (the-as int (-> sv-96 elt-count)))
|
||||
(let ((s0-0 (entity-by-name (the-as string (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4))))))))
|
||||
(cond
|
||||
(s0-0
|
||||
(let ((s1-2 (cam-state-from-entity s0-0)))
|
||||
(cond
|
||||
(s1-2
|
||||
(set! sv-112 (get-process *camera-dead-pool* camera-slave #x4000))
|
||||
(set! v1-22 (when sv-112
|
||||
(set! sv-128 (the-as (pointer process) v1-22))
|
||||
(let ((t9-14 (method-of-type camera-slave activate)))
|
||||
(t9-14
|
||||
(the-as camera-slave sv-112)
|
||||
*camera*
|
||||
(symbol->string (-> camera-slave symbol))
|
||||
(the-as pointer #x70004000)
|
||||
)
|
||||
(run-now-in-process sv-112 cam-slave-init s1-2 s0-0)
|
||||
(set! sv-128 (-> sv-112 ppointer))
|
||||
v1-22
|
||||
)
|
||||
)
|
||||
(cond
|
||||
(sv-128
|
||||
(setup-slave-for-hopefull (the-as camera-slave (ppointer->process sv-128)))
|
||||
(cond
|
||||
((master-is-hopeful-better?
|
||||
(the-as camera-slave (ppointer->process s3-1))
|
||||
(the-as camera-slave (ppointer->process sv-128))
|
||||
)
|
||||
(if s3-1
|
||||
(deactivate (-> s3-1 0))
|
||||
)
|
||||
(set! s3-1 (the-as (pointer camera-slave) sv-128))
|
||||
(set! (-> arg0 real-entity-name) (the-as string (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4))))))
|
||||
(set! (-> arg0 cam-mode) (the-as symbol s1-2))
|
||||
)
|
||||
(else
|
||||
(deactivate (-> sv-128 0))
|
||||
)
|
||||
)
|
||||
(run-now-in-process sv-112 cam-slave-init s1-2 s0-0)
|
||||
(set! sv-128 (-> sv-112 ppointer))
|
||||
v1-22
|
||||
)
|
||||
)
|
||||
(else
|
||||
(format 0 "ERROR <GMJ>: alternate region activate failed~%")
|
||||
(cond
|
||||
(sv-128
|
||||
(setup-slave-for-hopefull (the-as camera-slave (ppointer->process sv-128)))
|
||||
(cond
|
||||
((master-is-hopeful-better?
|
||||
(the-as camera-slave (ppointer->process s3-1))
|
||||
(the-as camera-slave (ppointer->process sv-128))
|
||||
)
|
||||
(if s3-1
|
||||
(deactivate (-> s3-1 0))
|
||||
)
|
||||
(set! s3-1 (the-as (pointer camera-slave) sv-128))
|
||||
(set! (-> arg0 real-entity-name) (the-as string (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4))))))
|
||||
(set! (-> arg0 cam-mode) (the-as symbol s1-2))
|
||||
)
|
||||
(else
|
||||
(deactivate (-> sv-128 0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((s1-5 format))
|
||||
(set! sv-144 0)
|
||||
(set! sv-160 "ERROR <GMJ>: alternate camera region '~S' didn't produce a state~%")
|
||||
(let ((a2-14 (res-lump-struct s0-0 'name structure)))
|
||||
(s1-5 sv-144 sv-160 a2-14)
|
||||
)
|
||||
(else
|
||||
(format 0 "ERROR <GMJ>: alternate region activate failed~%")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((s1-7 format)
|
||||
(s0-1 0)
|
||||
(else
|
||||
(let ((s1-5 format))
|
||||
(set! sv-144 0)
|
||||
(set! sv-160 "ERROR <GMJ>: alternate camera region '~S' didn't produce a state~%")
|
||||
(let ((a2-14 (res-lump-struct s0-0 'name structure)))
|
||||
(s1-5 sv-144 sv-160 a2-14)
|
||||
)
|
||||
)
|
||||
(set! sv-176 "ERROR <GMJ>: alternate '~S' not found for '~S'~%")
|
||||
(set! sv-192 (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4)))))
|
||||
(let ((a3-8 (res-lump-struct s5-0 'name structure)))
|
||||
(s1-7 s0-1 sv-176 sv-192 a3-8)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((s1-7 format)
|
||||
(s0-1 0)
|
||||
)
|
||||
(set! sv-176 "ERROR <GMJ>: alternate '~S' not found for '~S'~%")
|
||||
(set! sv-192 (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4)))))
|
||||
(let ((a3-8 (res-lump-struct s5-0 'name structure)))
|
||||
(s1-7 s0-1 sv-176 sv-192 a3-8)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! s2-1 1)
|
||||
)
|
||||
)
|
||||
(if s3-1
|
||||
@@ -625,11 +584,11 @@
|
||||
)
|
||||
|
||||
(defstate cam-master-active (camera-master)
|
||||
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
|
||||
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
|
||||
(local-vars (v0-0 none) (v1-125 uint))
|
||||
(rlet ((vf0 :class vf))
|
||||
(init-vf0-vector)
|
||||
(let ((v1-0 arg2))
|
||||
(let ((v1-0 event-type))
|
||||
(the-as
|
||||
object
|
||||
(cond
|
||||
@@ -666,14 +625,14 @@
|
||||
(format 0 "ERROR <GMJ>: *camera* clear-entity event not supported anymore~%")
|
||||
)
|
||||
((= v1-0 'no-intro)
|
||||
(format 0 "ERROR <GMJ>: *camera* no-intro event not supported anymore '~S'~%" (-> arg3 param 0))
|
||||
(format 0 "ERROR <GMJ>: *camera* no-intro event not supported anymore '~S'~%" (-> event param 0))
|
||||
)
|
||||
((= v1-0 'force-blend)
|
||||
(format 0 "ERROR <GMJ>: *camera* force-blend event not supported anymore '~S'~%" (-> arg3 param 0))
|
||||
(format 0 "ERROR <GMJ>: *camera* force-blend event not supported anymore '~S'~%" (-> event param 0))
|
||||
)
|
||||
((= v1-0 'teleport-to-transformq)
|
||||
(when (> arg1 0)
|
||||
(let ((gp-1 (the-as object (-> arg3 param 0))))
|
||||
(let ((gp-1 (the-as object (-> event param 0))))
|
||||
(when (-> self slave)
|
||||
(deactivate (-> self slave 0))
|
||||
(set! (-> self slave) (the-as (pointer camera-slave) #f))
|
||||
@@ -702,7 +661,7 @@
|
||||
)
|
||||
((= v1-0 'teleport-to-vector-start-string)
|
||||
(when (> arg1 0)
|
||||
(let ((s5-0 (the-as object (-> arg3 param 0)))
|
||||
(let ((s5-0 (the-as object (-> event param 0)))
|
||||
(gp-3 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(when (-> self slave)
|
||||
@@ -719,7 +678,7 @@
|
||||
)
|
||||
)
|
||||
((= v1-0 'change-target)
|
||||
(let ((a1-15 (-> arg3 param 0)))
|
||||
(let ((a1-15 (-> event param 0)))
|
||||
(cond
|
||||
((not a1-15)
|
||||
(clear-focused (-> self focus))
|
||||
@@ -739,20 +698,20 @@
|
||||
(or (not (-> self slave)) (>= (-> self slave 0 intro-t) 1.0))
|
||||
)
|
||||
((= v1-0 'query-state)
|
||||
(and (-> self slave) (= (-> self slave 0 next-state) (-> arg3 param 0)))
|
||||
(and (-> self slave) (= (-> self slave 0 next-state) (-> event param 0)))
|
||||
)
|
||||
((= v1-0 'change-to-entity-by-name)
|
||||
(format
|
||||
0
|
||||
"ERROR <GMJ>: *camera* change-to-entity-by-name event not supported anymore '~S'~%"
|
||||
(-> arg3 param 0)
|
||||
(-> event param 0)
|
||||
)
|
||||
)
|
||||
((= v1-0 'change-state)
|
||||
(format 0 "ERROR <GMJ>: *camera* change-state event not supported anymore ~A~%" (-> arg3 param 0))
|
||||
(format 0 "ERROR <GMJ>: *camera* change-state event not supported anymore ~A~%" (-> event param 0))
|
||||
)
|
||||
((= v1-0 'set-slave)
|
||||
(let ((s5-1 (process->ppointer (the-as process (-> arg3 param 0))))
|
||||
(let ((s5-1 (process->ppointer (the-as process (-> event param 0))))
|
||||
(s4-0 (-> self settings interp-time))
|
||||
(gp-4 (-> self slave))
|
||||
)
|
||||
@@ -861,16 +820,16 @@
|
||||
(set! (-> self master-options) (logand -9 (-> self master-options)))
|
||||
)
|
||||
((< arg1 2)
|
||||
(if (< (the-as float (-> arg3 param 0)) (-> self ease-t))
|
||||
(set! (-> self ease-t) (the-as float (-> arg3 param 0)))
|
||||
(if (< (the-as float (-> event param 0)) (-> self ease-t))
|
||||
(set! (-> self ease-t) (the-as float (-> event param 0)))
|
||||
)
|
||||
(set! (-> self master-options) (logand -9 (-> self master-options)))
|
||||
)
|
||||
(else
|
||||
(if (< (the-as float (-> arg3 param 0)) (-> self ease-t))
|
||||
(set! (-> self ease-t) (the-as float (-> arg3 param 0)))
|
||||
(if (< (the-as float (-> event param 0)) (-> self ease-t))
|
||||
(set! (-> self ease-t) (the-as float (-> event param 0)))
|
||||
)
|
||||
(set! (-> self ease-to quad) (-> (the-as vector (-> arg3 param 1)) quad))
|
||||
(set! (-> self ease-to quad) (-> (the-as vector (-> event param 1)) quad))
|
||||
(logior! (-> self master-options) 8)
|
||||
)
|
||||
)
|
||||
@@ -888,34 +847,34 @@
|
||||
((= v1-0 'teleport)
|
||||
(reset-target-tracking)
|
||||
(if (-> self slave)
|
||||
(send-event (ppointer->process (-> self slave)) arg2)
|
||||
(send-event (ppointer->process (-> self slave)) event-type)
|
||||
)
|
||||
(send-event *camera-combiner* arg2)
|
||||
(send-event *camera-combiner* event-type)
|
||||
)
|
||||
((= v1-0 'toggle-slave-option)
|
||||
(logxor! (-> self slave-options) (-> arg3 param 0))
|
||||
(logxor! (-> self slave-options) (-> event param 0))
|
||||
(if (-> self slave)
|
||||
(logxor! (-> self slave 0 options) (-> arg3 param 0))
|
||||
(logxor! (-> self slave 0 options) (-> event param 0))
|
||||
)
|
||||
(when (-> self decel)
|
||||
(set! v0-0 (the-as none (logxor (-> self decel 0 options) (-> arg3 param 0))))
|
||||
(set! v0-0 (the-as none (logxor (-> self decel 0 options) (-> event param 0))))
|
||||
(set! (-> self decel 0 options) (the-as uint v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
((= v1-0 'slave-option?)
|
||||
(and (-> self slave) (logtest? (-> self slave 0 options) (-> arg3 param 0)))
|
||||
(and (-> self slave) (logtest? (-> self slave 0 options) (-> event param 0)))
|
||||
)
|
||||
((= v1-0 'set-slave-option)
|
||||
(when (-> self slave)
|
||||
(set! v0-0 (the-as none (logior (-> self slave 0 options) (-> arg3 param 0))))
|
||||
(set! v0-0 (the-as none (logior (-> self slave 0 options) (-> event param 0))))
|
||||
(set! (-> self slave 0 options) (the-as uint v0-0))
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
((= v1-0 'clear-slave-option)
|
||||
(when (-> self slave)
|
||||
(set! v0-0 (the-as none (logclear (-> self slave 0 options) (-> arg3 param 0))))
|
||||
(set! v0-0 (the-as none (logclear (-> self slave 0 options) (-> event param 0))))
|
||||
(set! (-> self slave 0 options) (the-as uint v0-0))
|
||||
v0-0
|
||||
)
|
||||
@@ -942,7 +901,7 @@
|
||||
(a0-101 0)
|
||||
(a1-35 "ERROR <GMJ>: *camera* blend-from-as-fixed event not supported anymore~%")
|
||||
)
|
||||
(-> arg3 param 0)
|
||||
(-> event param 0)
|
||||
(t9-42 a0-101 a1-35)
|
||||
)
|
||||
)
|
||||
@@ -951,26 +910,26 @@
|
||||
(a0-102 0)
|
||||
(a1-36 "ERROR <GMJ>: *camera* point-of-interest event not supported anymore~%")
|
||||
)
|
||||
(-> arg3 param 0)
|
||||
(-> event param 0)
|
||||
(t9-43 a0-102 a1-36)
|
||||
)
|
||||
)
|
||||
((= v1-0 'part-water-drip)
|
||||
(set! (-> self water-drip-time) (-> self clock frame-counter))
|
||||
(set! (-> self water-drip-mult) (the-as float (-> arg3 param 0)))
|
||||
(set! (-> self water-drip-speed) (the-as float (-> arg3 param 1)))
|
||||
(set! (-> self water-drip-mult) (the-as float (-> event param 0)))
|
||||
(set! (-> self water-drip-speed) (the-as float (-> event param 1)))
|
||||
)
|
||||
(else
|
||||
(and (-> self slave) (let ((v1-237 (new 'stack-no-clear 'event-message-block)))
|
||||
(set! (-> v1-237 from) (process->ppointer arg0))
|
||||
(set! (-> v1-237 from) (process->ppointer proc))
|
||||
(set! (-> v1-237 num-params) arg1)
|
||||
(set! (-> v1-237 message) arg2)
|
||||
(set! (-> v1-237 param 0) (-> arg3 param 0))
|
||||
(set! (-> v1-237 param 1) (-> arg3 param 1))
|
||||
(set! (-> v1-237 param 2) (-> arg3 param 2))
|
||||
(set! (-> v1-237 param 3) (-> arg3 param 3))
|
||||
(set! (-> v1-237 param 4) (-> arg3 param 4))
|
||||
(set! (-> v1-237 param 5) (-> arg3 param 5))
|
||||
(set! (-> v1-237 message) event-type)
|
||||
(set! (-> v1-237 param 0) (-> event param 0))
|
||||
(set! (-> v1-237 param 1) (-> event param 1))
|
||||
(set! (-> v1-237 param 2) (-> event param 2))
|
||||
(set! (-> v1-237 param 3) (-> event param 3))
|
||||
(set! (-> v1-237 param 4) (-> event param 4))
|
||||
(set! (-> v1-237 param 5) (-> event param 5))
|
||||
(send-event-function (ppointer->process (-> self slave)) v1-237)
|
||||
)
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+68
-111
@@ -46,22 +46,8 @@
|
||||
(set! (-> self tpos-old-adj quad) (-> self tpos-old quad))
|
||||
(set! (-> self tpos-curr-adj quad) (-> self tpos-old quad))
|
||||
(set! (-> self tpos-tgt quad) (-> self tpos-old quad))
|
||||
(let* ((s5-1 quaternion->matrix)
|
||||
(s4-0 (-> self tgt-rot-mat))
|
||||
(a0-12 (the-as process-focusable gp-0))
|
||||
(t9-1 (method-of-object a0-12 get-quat))
|
||||
)
|
||||
2
|
||||
(s5-1 s4-0 (t9-1 a0-12))
|
||||
)
|
||||
(let* ((s5-2 quaternion->matrix)
|
||||
(s4-1 (-> self tgt-face-mat))
|
||||
(a0-14 (the-as process-focusable gp-0))
|
||||
(t9-3 (method-of-object a0-14 get-quat))
|
||||
)
|
||||
1
|
||||
(s5-2 s4-1 (t9-3 a0-14))
|
||||
)
|
||||
(quaternion->matrix (-> self tgt-rot-mat) (get-quat (the-as process-focusable gp-0) 2))
|
||||
(quaternion->matrix (-> self tgt-face-mat) (get-quat (the-as process-focusable gp-0) 1))
|
||||
(vector-reset! (-> self pitch-off))
|
||||
(set! (-> self upspeed) 0.0)
|
||||
(set! (-> self on-ground)
|
||||
@@ -97,14 +83,9 @@
|
||||
0
|
||||
)
|
||||
)
|
||||
(let ((gp-1 (the-as process-focusable (new 'stack-no-clear 'vector))))
|
||||
(vector--float*!
|
||||
(the-as vector gp-1)
|
||||
(-> self tpos-curr-adj)
|
||||
(-> self local-down)
|
||||
(-> self settings target-height)
|
||||
)
|
||||
(tracking-spline-method-10 (-> self target-spline) (the-as vector gp-1))
|
||||
(let ((gp-1 (new 'stack-no-clear 'vector)))
|
||||
(vector--float*! gp-1 (-> self tpos-curr-adj) (-> self local-down) (-> self settings target-height))
|
||||
(tracking-spline-method-10 (-> self target-spline) gp-1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -163,22 +144,8 @@
|
||||
)
|
||||
(set! (-> self tpos-old quad) (-> self tpos-curr quad))
|
||||
(set! (-> self tpos-old-adj quad) (-> self tpos-curr-adj quad))
|
||||
(let* ((s5-1 quaternion->matrix)
|
||||
(s4-0 (-> self tgt-rot-mat))
|
||||
(a0-12 (the-as target gp-0))
|
||||
(t9-4 (method-of-object a0-12 get-quat))
|
||||
)
|
||||
2
|
||||
(s5-1 s4-0 (t9-4 a0-12))
|
||||
)
|
||||
(let* ((s5-2 quaternion->matrix)
|
||||
(s4-1 (-> self tgt-face-mat))
|
||||
(a0-14 (the-as target gp-0))
|
||||
(t9-6 (method-of-object a0-14 get-quat))
|
||||
)
|
||||
1
|
||||
(s5-2 s4-1 (t9-6 a0-14))
|
||||
)
|
||||
(quaternion->matrix (-> self tgt-rot-mat) (get-quat (the-as target gp-0) 2))
|
||||
(quaternion->matrix (-> self tgt-face-mat) (get-quat (the-as target gp-0) 1))
|
||||
(cond
|
||||
((< (-> self ease-t) 1.0)
|
||||
(new 'stack-no-clear 'vector)
|
||||
@@ -385,10 +352,8 @@
|
||||
;; INFO: Used lq/sq
|
||||
(defbehavior master-choose-entity camera-master ((arg0 cam-setting-data))
|
||||
(local-vars
|
||||
(r0-0 uint128)
|
||||
(v1-22 symbol)
|
||||
(v1-52 uint128)
|
||||
(sv-96 int)
|
||||
(sv-96 res-tag)
|
||||
(sv-112 process)
|
||||
(sv-128 (pointer process))
|
||||
(sv-144 int)
|
||||
@@ -412,8 +377,8 @@
|
||||
(format 0 "ERROR <GMJ>: camera entity '~S' didn't produce a state~%" (res-lump-struct s5-0 'name structure))
|
||||
)
|
||||
)
|
||||
(set! sv-96 0)
|
||||
(let ((s4-1 (res-lump-data s5-0 'alternates pointer :tag-ptr (the-as (pointer res-tag) (& sv-96)))))
|
||||
(set! sv-96 (new 'static 'res-tag))
|
||||
(let ((s4-1 (res-lump-data s5-0 'alternates pointer :tag-ptr (& sv-96))))
|
||||
(when s4-1
|
||||
(let* ((s1-1 (get-process *camera-dead-pool* camera-slave #x4000))
|
||||
(s3-1 (when s1-1
|
||||
@@ -434,86 +399,78 @@
|
||||
(setup-slave-for-hopefull (the-as camera-slave (ppointer->process s3-1)))
|
||||
(format 0 "ERROR <GMJ>: primary region activate failed~%")
|
||||
)
|
||||
(let ((s2-1 0))
|
||||
(while (begin
|
||||
(let ((v1-51 (the-as uint128 sv-96)))
|
||||
(.pcpyud v1-52 v1-51 r0-0)
|
||||
)
|
||||
(< s2-1 (shr (* (the-as int v1-52) 2) 49))
|
||||
)
|
||||
(let ((s0-0 (entity-by-name (the-as string (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4))))))))
|
||||
(cond
|
||||
(s0-0
|
||||
(let ((s1-2 (cam-state-from-entity s0-0)))
|
||||
(cond
|
||||
(s1-2
|
||||
(set! sv-112 (get-process *camera-dead-pool* camera-slave #x4000))
|
||||
(set! v1-22 (when sv-112
|
||||
(set! sv-128 (the-as (pointer process) v1-22))
|
||||
(let ((t9-14 (method-of-type camera-slave activate)))
|
||||
(t9-14
|
||||
(the-as camera-slave sv-112)
|
||||
*camera*
|
||||
(symbol->string (-> camera-slave symbol))
|
||||
(the-as pointer #x70004000)
|
||||
)
|
||||
(dotimes (s2-1 (the-as int (-> sv-96 elt-count)))
|
||||
(let ((s0-0 (entity-by-name (the-as string (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4))))))))
|
||||
(cond
|
||||
(s0-0
|
||||
(let ((s1-2 (cam-state-from-entity s0-0)))
|
||||
(cond
|
||||
(s1-2
|
||||
(set! sv-112 (get-process *camera-dead-pool* camera-slave #x4000))
|
||||
(set! v1-22 (when sv-112
|
||||
(set! sv-128 (the-as (pointer process) v1-22))
|
||||
(let ((t9-14 (method-of-type camera-slave activate)))
|
||||
(t9-14
|
||||
(the-as camera-slave sv-112)
|
||||
*camera*
|
||||
(symbol->string (-> camera-slave symbol))
|
||||
(the-as pointer #x70004000)
|
||||
)
|
||||
(run-now-in-process sv-112 cam-slave-init s1-2 s0-0)
|
||||
(set! sv-128 (-> sv-112 ppointer))
|
||||
v1-22
|
||||
)
|
||||
)
|
||||
(cond
|
||||
(sv-128
|
||||
(setup-slave-for-hopefull (the-as camera-slave (ppointer->process sv-128)))
|
||||
(cond
|
||||
((master-is-hopeful-better?
|
||||
(the-as camera-slave (ppointer->process s3-1))
|
||||
(the-as camera-slave (ppointer->process sv-128))
|
||||
)
|
||||
(if s3-1
|
||||
(deactivate (-> s3-1 0))
|
||||
)
|
||||
(set! s3-1 (the-as (pointer camera-slave) sv-128))
|
||||
(set! (-> arg0 real-entity-name) (the-as string (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4))))))
|
||||
(set! (-> arg0 cam-mode) (the-as symbol s1-2))
|
||||
)
|
||||
(else
|
||||
(deactivate (-> sv-128 0))
|
||||
)
|
||||
)
|
||||
(run-now-in-process sv-112 cam-slave-init s1-2 s0-0)
|
||||
(set! sv-128 (-> sv-112 ppointer))
|
||||
v1-22
|
||||
)
|
||||
)
|
||||
(else
|
||||
(format 0 "ERROR <GMJ>: alternate region activate failed~%")
|
||||
(cond
|
||||
(sv-128
|
||||
(setup-slave-for-hopefull (the-as camera-slave (ppointer->process sv-128)))
|
||||
(cond
|
||||
((master-is-hopeful-better?
|
||||
(the-as camera-slave (ppointer->process s3-1))
|
||||
(the-as camera-slave (ppointer->process sv-128))
|
||||
)
|
||||
(if s3-1
|
||||
(deactivate (-> s3-1 0))
|
||||
)
|
||||
(set! s3-1 (the-as (pointer camera-slave) sv-128))
|
||||
(set! (-> arg0 real-entity-name) (the-as string (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4))))))
|
||||
(set! (-> arg0 cam-mode) (the-as symbol s1-2))
|
||||
)
|
||||
(else
|
||||
(deactivate (-> sv-128 0))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((s1-5 format))
|
||||
(set! sv-144 0)
|
||||
(set! sv-160 "ERROR <GMJ>: alternate camera region '~S' didn't produce a state~%")
|
||||
(let ((a2-14 (res-lump-struct s0-0 'name structure)))
|
||||
(s1-5 sv-144 sv-160 a2-14)
|
||||
)
|
||||
(else
|
||||
(format 0 "ERROR <GMJ>: alternate region activate failed~%")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((s1-7 format)
|
||||
(s0-1 0)
|
||||
(else
|
||||
(let ((s1-5 format))
|
||||
(set! sv-144 0)
|
||||
(set! sv-160 "ERROR <GMJ>: alternate camera region '~S' didn't produce a state~%")
|
||||
(let ((a2-14 (res-lump-struct s0-0 'name structure)))
|
||||
(s1-5 sv-144 sv-160 a2-14)
|
||||
)
|
||||
)
|
||||
(set! sv-176 "ERROR <GMJ>: alternate '~S' not found for '~S'~%")
|
||||
(set! sv-192 (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4)))))
|
||||
(let ((a3-8 (res-lump-struct s5-0 'name structure)))
|
||||
(s1-7 s0-1 sv-176 sv-192 a3-8)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((s1-7 format)
|
||||
(s0-1 0)
|
||||
)
|
||||
(set! sv-176 "ERROR <GMJ>: alternate '~S' not found for '~S'~%")
|
||||
(set! sv-192 (-> (the-as (pointer uint32) (&+ s4-1 (* s2-1 4)))))
|
||||
(let ((a3-8 (res-lump-struct s5-0 'name structure)))
|
||||
(s1-7 s0-1 sv-176 sv-192 a3-8)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! s2-1 1)
|
||||
)
|
||||
)
|
||||
(if s3-1
|
||||
|
||||
+1
-1
@@ -708,7 +708,7 @@
|
||||
|
||||
;; definition (debug) for function add-debug-line2d
|
||||
;; INFO: Used lq/sq
|
||||
(defun-debug add-debug-line2d ((enable symbol) (bucket bucket-id) (start vector) (end vector) (color vector))
|
||||
(defun-debug add-debug-line2d ((enable symbol) (bucket bucket-id) (start vector4w) (end vector4w) (color vector4w))
|
||||
(if (not enable)
|
||||
(return #f)
|
||||
)
|
||||
|
||||
+1
-1
@@ -243,7 +243,7 @@
|
||||
(debug-features game-feature :offset-assert 136)
|
||||
(secrets game-secrets :offset-assert 144)
|
||||
(unknown-pad1 uint32 :offset-assert 148)
|
||||
(purchase-secrets uint32 :offset-assert 152)
|
||||
(purchase-secrets game-secrets :offset-assert 152)
|
||||
(unknown-pad2 uint32 :offset-assert 156)
|
||||
(gun-type int32 :offset-assert 160)
|
||||
(gun-ammo float 4 :offset-assert 164)
|
||||
|
||||
+3
-3
@@ -580,9 +580,9 @@
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj 'vector4w-4)
|
||||
(format #t "~1Tdata[16] @ #x~X~%" (-> obj data))
|
||||
(format #t "~1Tquad[4] @ #x~X~%" (-> obj data))
|
||||
(format #t "~1Tvector[4] @ #x~X~%" (-> obj data))
|
||||
(format #t "~1Tdata[16] @ #x~X~%" (-> obj vector))
|
||||
(format #t "~1Tquad[4] @ #x~X~%" (-> obj vector))
|
||||
(format #t "~1Tvector[4] @ #x~X~%" (-> obj vector))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@
|
||||
:flag-assert #x1b005000cc
|
||||
(:methods
|
||||
(get-trans (_type_ int) vector 20)
|
||||
(get-quat (_type_) quaternion 21)
|
||||
(get-quat (_type_ int) quaternion 21)
|
||||
(get-transv (_type_) vector 22)
|
||||
(process-focusable-method-23 (_type_) none 23)
|
||||
(process-focusable-method-24 (_type_) float 24)
|
||||
@@ -63,7 +63,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 21 of type process-focusable
|
||||
(defmethod get-quat process-focusable ((obj process-focusable))
|
||||
(defmethod get-quat process-focusable ((obj process-focusable) (arg0 int))
|
||||
(-> obj root quat)
|
||||
)
|
||||
|
||||
|
||||
+1
-7
@@ -2817,13 +2817,7 @@
|
||||
(when s4-1
|
||||
(set! (-> self control unknown-vector38 quad) (-> (get-trans (the-as process-focusable s4-1) 0) quad))
|
||||
(set! (-> self control unknown-vector38 y) (+ 4096.0 (-> self control unknown-vector38 y)))
|
||||
(let* ((s3-2 (-> self control unknown-vector40))
|
||||
(a0-15 (the-as process-focusable s4-1))
|
||||
(t9-4 (method-of-object a0-15 get-quat))
|
||||
)
|
||||
0
|
||||
(set! (-> s3-2 quad) (-> (t9-4 a0-15) vec quad))
|
||||
)
|
||||
(set! (-> self control unknown-vector40 quad) (-> (get-quat (the-as process-focusable s4-1) 0) vec quad))
|
||||
)
|
||||
(let ((f28-0 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 0.0 30.0))))
|
||||
(let ((f26-0 f28-0))
|
||||
|
||||
+2
-2
@@ -44,7 +44,7 @@
|
||||
:size-assert #x34
|
||||
:flag-assert #xb00000034
|
||||
(:methods
|
||||
(hud-sprite-method-9 () none 9)
|
||||
(hud-sprite-method-9 (_type_ dma-buffer level) none 9)
|
||||
(hud-sprite-method-10 () none 10)
|
||||
)
|
||||
)
|
||||
@@ -77,7 +77,7 @@
|
||||
:size-assert #x20
|
||||
:flag-assert #x1000000020
|
||||
(:methods
|
||||
(hud-box-method-9 () none 9)
|
||||
(hud-box-method-9 (_type_ dma-buffer) none 9)
|
||||
(hud-box-method-10 () none 10)
|
||||
(hud-box-method-11 () none 11)
|
||||
(hud-box-method-12 () none 12)
|
||||
|
||||
+185
-258
@@ -347,7 +347,7 @@
|
||||
|
||||
;; definition for function begin-scissor-secret
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun begin-scissor-secret ((arg0 hud-box))
|
||||
(defun begin-scissor-secret ((arg0 hud-box) (arg1 progress))
|
||||
(cond
|
||||
((= (get-aspect-ratio) 'aspect16x9)
|
||||
(set! (-> arg0 min x) 79.0)
|
||||
@@ -453,7 +453,7 @@
|
||||
|
||||
;; definition for function end-scissor-missions
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun end-scissor-missions ((arg0 hud-box))
|
||||
(defun end-scissor-missions ((arg0 hud-box) (arg1 float))
|
||||
(let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(gp-0 (-> s5-0 base))
|
||||
)
|
||||
@@ -585,7 +585,7 @@
|
||||
|
||||
;; definition for function end-scissor-level
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defun end-scissor-level ((arg0 hud-box))
|
||||
(defun end-scissor-level ((arg0 hud-box) (arg1 float))
|
||||
(let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(gp-0 (-> s5-0 base))
|
||||
)
|
||||
@@ -631,21 +631,21 @@
|
||||
)
|
||||
|
||||
;; definition for function unlocked-secret-menu?
|
||||
(defun unlocked-secret-menu? ((arg0 int))
|
||||
(or (logtest? arg0 32)
|
||||
(logtest? arg0 64)
|
||||
(logtest? arg0 128)
|
||||
(logtest? arg0 256)
|
||||
(logtest? arg0 512)
|
||||
(logtest? arg0 1024)
|
||||
(logtest? arg0 2048)
|
||||
(logtest? arg0 #x8000)
|
||||
(defun unlocked-secret-menu? ((arg0 game-secrets))
|
||||
(or (logtest? arg0 (game-secrets scene-player-1))
|
||||
(logtest? arg0 (game-secrets scene-player-2))
|
||||
(logtest? arg0 (game-secrets scene-player-3))
|
||||
(logtest? arg0 (game-secrets level-select))
|
||||
(logtest? arg0 (game-secrets scrap-book-1))
|
||||
(logtest? arg0 (game-secrets scrap-book-2))
|
||||
(logtest? arg0 (game-secrets scrap-book-3))
|
||||
(logtest? arg0 (game-secrets hero-mode))
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function memcard-unlocked-secrets?
|
||||
;; WARN: Return type mismatch int vs game-secrets.
|
||||
(defun memcard-unlocked-secrets? ((arg0 symbol))
|
||||
"TODO - returns a bitfield"
|
||||
(let ((v1-0 *progress-save-info*)
|
||||
(s5-0 0)
|
||||
)
|
||||
@@ -656,7 +656,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (unlocked-secret-menu? s5-0)
|
||||
(if (unlocked-secret-menu? (the-as game-secrets s5-0))
|
||||
(set! (-> *progress-state* secrets-unlocked) #t)
|
||||
(set! (-> *progress-state* secrets-unlocked) #f)
|
||||
)
|
||||
@@ -664,45 +664,45 @@
|
||||
(set! (-> *progress-state* secrets-unlocked) #t)
|
||||
(set! s5-0 (logior s5-0 #x8fe0))
|
||||
)
|
||||
(cond
|
||||
(arg0
|
||||
(empty)
|
||||
s5-0
|
||||
)
|
||||
(else
|
||||
(the-as int (unlocked-secret-menu? s5-0))
|
||||
)
|
||||
)
|
||||
(the-as game-secrets (cond
|
||||
(arg0
|
||||
(empty)
|
||||
s5-0
|
||||
)
|
||||
(else
|
||||
(the-as int (unlocked-secret-menu? (the-as game-secrets s5-0)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function num-unlocked-secret?
|
||||
(defun num-unlocked-secret? ((arg0 int))
|
||||
"TODO - bitfield
|
||||
@returns The number of secrets currently unlocked"
|
||||
(defun num-unlocked-secret? ((arg0 game-secrets))
|
||||
"@returns The number of secrets currently unlocked"
|
||||
(let ((v0-0 0))
|
||||
(if (logtest? arg0 32)
|
||||
(if (logtest? arg0 (game-secrets scene-player-1))
|
||||
(+! v0-0 1)
|
||||
)
|
||||
(if (logtest? arg0 64)
|
||||
(if (logtest? arg0 (game-secrets scene-player-2))
|
||||
(+! v0-0 1)
|
||||
)
|
||||
(if (logtest? arg0 128)
|
||||
(if (logtest? arg0 (game-secrets scene-player-3))
|
||||
(+! v0-0 1)
|
||||
)
|
||||
(if (logtest? arg0 256)
|
||||
(if (logtest? arg0 (game-secrets level-select))
|
||||
(+! v0-0 1)
|
||||
)
|
||||
(if (logtest? arg0 512)
|
||||
(if (logtest? arg0 (game-secrets scrap-book-1))
|
||||
(+! v0-0 1)
|
||||
)
|
||||
(if (logtest? arg0 1024)
|
||||
(if (logtest? arg0 (game-secrets scrap-book-2))
|
||||
(+! v0-0 1)
|
||||
)
|
||||
(if (logtest? arg0 2048)
|
||||
(if (logtest? arg0 (game-secrets scrap-book-3))
|
||||
(+! v0-0 1)
|
||||
)
|
||||
(if (logtest? arg0 #x8000)
|
||||
(if (logtest? arg0 (game-secrets hero-mode))
|
||||
(+! v0-0 1)
|
||||
)
|
||||
v0-0
|
||||
@@ -1039,7 +1039,7 @@
|
||||
(cond
|
||||
((= (-> obj name) (game-text-id progress-main-secrets-scrapbook))
|
||||
(cond
|
||||
((logtest? s5-0 512)
|
||||
((logtest? s5-0 (game-secrets scrap-book-1))
|
||||
(print-game-text
|
||||
(lookup-text! *common-text* (game-text-id progress-main-secrets-scrapbook) #f)
|
||||
arg1
|
||||
@@ -1058,7 +1058,7 @@
|
||||
)
|
||||
((= (-> obj name) (game-text-id progress-main-secrets-mega-scrapbook))
|
||||
(cond
|
||||
((logtest? s5-0 1024)
|
||||
((logtest? s5-0 (game-secrets scrap-book-2))
|
||||
(print-game-text
|
||||
(lookup-text! *common-text* (game-text-id progress-main-secrets-mega-scrapbook) #f)
|
||||
arg1
|
||||
@@ -1077,7 +1077,7 @@
|
||||
)
|
||||
((= (-> obj name) (game-text-id progress-main-secrets-scrapbook-3))
|
||||
(cond
|
||||
((logtest? s5-0 2048)
|
||||
((logtest? s5-0 (game-secrets scrap-book-3))
|
||||
(print-game-text
|
||||
(lookup-text! *common-text* (game-text-id progress-main-secrets-scrapbook-3) #f)
|
||||
arg1
|
||||
@@ -1096,7 +1096,7 @@
|
||||
)
|
||||
((= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-1))
|
||||
(cond
|
||||
((logtest? s5-0 32)
|
||||
((logtest? s5-0 (game-secrets scene-player-1))
|
||||
(print-game-text
|
||||
(lookup-text! *common-text* (game-text-id progress-main-secrets-sceneplayer-1) #f)
|
||||
arg1
|
||||
@@ -1115,7 +1115,7 @@
|
||||
)
|
||||
((= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-2))
|
||||
(cond
|
||||
((logtest? s5-0 64)
|
||||
((logtest? s5-0 (game-secrets scene-player-2))
|
||||
(print-game-text
|
||||
(lookup-text! *common-text* (game-text-id progress-main-secrets-sceneplayer-2) #f)
|
||||
arg1
|
||||
@@ -1134,7 +1134,7 @@
|
||||
)
|
||||
((= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-3))
|
||||
(cond
|
||||
((logtest? s5-0 128)
|
||||
((logtest? s5-0 (game-secrets scene-player-3))
|
||||
(print-game-text
|
||||
(lookup-text! *common-text* (game-text-id progress-main-secrets-sceneplayer-3) #f)
|
||||
arg1
|
||||
@@ -1153,7 +1153,7 @@
|
||||
)
|
||||
((= (-> obj name) (game-text-id progress-main-secrets-hero-mode))
|
||||
(cond
|
||||
((logtest? s5-0 #x8000)
|
||||
((logtest? s5-0 (game-secrets hero-mode))
|
||||
(print-game-text
|
||||
(lookup-text! *common-text* (game-text-id progress-main-secrets-hero-mode) #f)
|
||||
arg1
|
||||
@@ -1172,7 +1172,7 @@
|
||||
)
|
||||
((= (-> obj name) (game-text-id progress-main-secrets-levelselect))
|
||||
(cond
|
||||
((logtest? s5-0 256)
|
||||
((logtest? s5-0 (game-secrets level-select))
|
||||
(print-game-text
|
||||
(lookup-text! *common-text* (game-text-id progress-main-secrets-levelselect) #f)
|
||||
arg1
|
||||
@@ -1369,8 +1369,7 @@
|
||||
(let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(gp-0 (-> s5-0 base))
|
||||
)
|
||||
(-> arg0 box)
|
||||
((method-of-type hud-box hud-box-method-9))
|
||||
((method-of-type hud-box hud-box-method-9) (the-as hud-box (-> arg0 box)) s5-0)
|
||||
(let ((a3-1 (-> s5-0 base)))
|
||||
(let ((v1-7 (the-as object (-> s5-0 base))))
|
||||
(set! (-> (the-as dma-packet v1-7) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
||||
@@ -2543,51 +2542,35 @@
|
||||
(set! (-> obj sprites 1 tex) (lookup-texture-by-id (get-level-icon-id-01 (the-as int s2-8))))
|
||||
(set! (-> obj sprites 1 scale-x) 1.0)
|
||||
(set! (-> obj sprites 1 scale-y) 1.0)
|
||||
(set-hud-piece-position! (the-as basic (&-> obj something-hud-related)) sv-40 sv-48)
|
||||
(set-hud-piece-position! (-> obj sprites 1) sv-40 sv-48)
|
||||
(set-vector! (-> obj sprites 2 color) 128 128 128 (the int (* 128.0 sv-16)))
|
||||
(set! (-> obj sprites 2 pos z) #xffffff)
|
||||
(set! (-> obj sprites 2 pos w) 1)
|
||||
(set! (-> obj sprites 2 tex) (lookup-texture-by-id (get-level-icon-id-02 (the-as int s2-8))))
|
||||
(set! (-> obj sprites 2 scale-x) 1.0)
|
||||
(set! (-> obj sprites 2 scale-y) 1.0)
|
||||
(set-hud-piece-position! (the-as basic (-> obj sprites 2)) (+ sv-40 sv-56) sv-48)
|
||||
(set-hud-piece-position! (-> obj sprites 2) (+ sv-40 sv-56) sv-48)
|
||||
(set-vector! (-> obj sprites 3 color) 128 128 128 (the int (* 128.0 sv-16)))
|
||||
(set! (-> obj sprites 3 pos z) #xffffff)
|
||||
(set! (-> obj sprites 3 pos w) 1)
|
||||
(set! (-> obj sprites 3 tex) (lookup-texture-by-id (get-level-icon-id-03 (the-as int s2-8))))
|
||||
(set! (-> obj sprites 3 scale-x) 1.0)
|
||||
(set! (-> obj sprites 3 scale-y) 1.0)
|
||||
(set-hud-piece-position! (the-as basic (-> obj sprites 3)) sv-40 (+ sv-48 64))
|
||||
(set-hud-piece-position! (-> obj sprites 3) sv-40 (+ sv-48 64))
|
||||
(set-vector! (-> obj sprites 4 color) 128 128 128 (the int (* 128.0 sv-16)))
|
||||
(set! (-> obj sprites 4 pos z) #xffffff)
|
||||
(set! (-> obj sprites 4 pos w) 1)
|
||||
(set! (-> obj sprites 4 tex) (lookup-texture-by-id (get-level-icon-id-04 (the-as int s2-8))))
|
||||
(set! (-> obj sprites 4 scale-x) 1.0)
|
||||
(set! (-> obj sprites 4 scale-y) 1.0)
|
||||
(set-hud-piece-position! (the-as basic (-> obj sprites 4)) (+ sv-40 sv-56) (+ sv-48 64))
|
||||
(set-hud-piece-position! (-> obj sprites 4) (+ sv-40 sv-56) (+ sv-48 64))
|
||||
(let* ((s1-7 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(s2-9 (-> s1-7 base))
|
||||
)
|
||||
(&-> obj something-hud-related)
|
||||
(let ((t9-38 (method-of-type hud-sprite hud-sprite-method-9)))
|
||||
(-> *level* default-level)
|
||||
(t9-38)
|
||||
)
|
||||
(-> obj sprites 2)
|
||||
(let ((t9-39 (method-of-type hud-sprite hud-sprite-method-9)))
|
||||
(-> *level* default-level)
|
||||
(t9-39)
|
||||
)
|
||||
(-> obj sprites 3)
|
||||
(let ((t9-40 (method-of-type hud-sprite hud-sprite-method-9)))
|
||||
(-> *level* default-level)
|
||||
(t9-40)
|
||||
)
|
||||
(-> obj sprites 4)
|
||||
(let ((t9-41 (method-of-type hud-sprite hud-sprite-method-9)))
|
||||
(-> *level* default-level)
|
||||
(t9-41)
|
||||
)
|
||||
(hud-sprite-method-9 (-> obj sprites 1) s1-7 (-> *level* default-level))
|
||||
(hud-sprite-method-9 (-> obj sprites 2) s1-7 (-> *level* default-level))
|
||||
(hud-sprite-method-9 (-> obj sprites 3) s1-7 (-> *level* default-level))
|
||||
(hud-sprite-method-9 (-> obj sprites 4) s1-7 (-> *level* default-level))
|
||||
(let ((a3-35 (-> s1-7 base)))
|
||||
(let ((v1-237 (the-as object (-> s1-7 base))))
|
||||
(set! (-> (the-as dma-packet v1-237) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
||||
@@ -2613,15 +2596,15 @@
|
||||
(set! (-> obj sprites 0 scale-x) 0.7)
|
||||
(set! (-> obj sprites 0 scale-y) 0.7)
|
||||
(set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x4 :page #xc93)))
|
||||
(set-hud-piece-position! (the-as basic (-> obj sprites)) 265 263)
|
||||
(set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) 265 263)
|
||||
(let* ((s1-8 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(s2-10 (-> s1-8 base))
|
||||
)
|
||||
(-> obj sprites)
|
||||
(let ((t9-45 (method-of-type hud-sprite hud-sprite-method-9)))
|
||||
(-> *level* default-level)
|
||||
(t9-45)
|
||||
)
|
||||
((method-of-type hud-sprite hud-sprite-method-9)
|
||||
(the-as hud-sprite (-> obj sprites))
|
||||
s1-8
|
||||
(-> *level* default-level)
|
||||
)
|
||||
(let ((a3-36 (-> s1-8 base)))
|
||||
(let ((v1-260 (the-as object (-> s1-8 base))))
|
||||
(set! (-> (the-as dma-packet v1-260) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
||||
@@ -2650,15 +2633,15 @@
|
||||
)
|
||||
)
|
||||
(set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x6 :page #xc93)))
|
||||
(set-hud-piece-position! (the-as basic (-> obj sprites)) 368 263)
|
||||
(set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) 368 263)
|
||||
(let* ((s1-10 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(s2-12 (-> s1-10 base))
|
||||
)
|
||||
(-> obj sprites)
|
||||
(let ((t9-52 (method-of-type hud-sprite hud-sprite-method-9)))
|
||||
(-> *level* default-level)
|
||||
(t9-52)
|
||||
)
|
||||
((method-of-type hud-sprite hud-sprite-method-9)
|
||||
(the-as hud-sprite (-> obj sprites))
|
||||
s1-10
|
||||
(-> *level* default-level)
|
||||
)
|
||||
(let ((a3-39 (-> s1-10 base)))
|
||||
(let ((v1-285 (the-as object (-> s1-10 base))))
|
||||
(set! (-> (the-as dma-packet v1-285) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
||||
@@ -2680,15 +2663,15 @@
|
||||
(s2-13 *temp-string* arg1 #f 44 320)
|
||||
)
|
||||
(set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x5 :page #xc93)))
|
||||
(set-hud-piece-position! (the-as basic (-> obj sprites)) 368 289)
|
||||
(set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) 368 289)
|
||||
(let* ((s1-12 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(s2-14 (-> s1-12 base))
|
||||
)
|
||||
(-> obj sprites)
|
||||
(let ((t9-59 (method-of-type hud-sprite hud-sprite-method-9)))
|
||||
(-> *level* default-level)
|
||||
(t9-59)
|
||||
)
|
||||
((method-of-type hud-sprite hud-sprite-method-9)
|
||||
(the-as hud-sprite (-> obj sprites))
|
||||
s1-12
|
||||
(-> *level* default-level)
|
||||
)
|
||||
(let ((a3-41 (-> s1-12 base)))
|
||||
(let ((v1-304 (the-as object (-> s1-12 base))))
|
||||
(set! (-> (the-as dma-packet v1-304) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
||||
@@ -2712,15 +2695,15 @@
|
||||
(set! (-> obj sprites 0 scale-x) 0.6)
|
||||
(set! (-> obj sprites 0 scale-y) 0.6)
|
||||
(set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x82 :page #xc93)))
|
||||
(set-hud-piece-position! (the-as basic (-> obj sprites)) 253 290)
|
||||
(set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) 253 290)
|
||||
(let* ((s1-14 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(s2-16 (-> s1-14 base))
|
||||
)
|
||||
(-> obj sprites)
|
||||
(let ((t9-66 (method-of-type hud-sprite hud-sprite-method-9)))
|
||||
(-> *level* default-level)
|
||||
(t9-66)
|
||||
)
|
||||
((method-of-type hud-sprite hud-sprite-method-9)
|
||||
(the-as hud-sprite (-> obj sprites))
|
||||
s1-14
|
||||
(-> *level* default-level)
|
||||
)
|
||||
(let ((a3-43 (-> s1-14 base)))
|
||||
(let ((v1-325 (the-as object (-> s1-14 base))))
|
||||
(set! (-> (the-as dma-packet v1-325) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
||||
@@ -3304,15 +3287,15 @@
|
||||
(set-vector! (-> obj sprites 0 color) 128 128 128 (the int (* 128.0 (- 1.0 (-> arg0 menu-transition)))))
|
||||
(set! (-> obj sprites 0 pos z) #xffffff)
|
||||
(set! (-> obj sprites 0 pos w) 0)
|
||||
(set-hud-piece-position! (the-as basic (-> obj sprites)) 240 160)
|
||||
(set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) 240 160)
|
||||
(let* ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(s4-1 (-> s3-0 base))
|
||||
)
|
||||
(-> obj sprites)
|
||||
(let ((t9-2 (method-of-type hud-sprite hud-sprite-method-9)))
|
||||
(-> *level* default-level)
|
||||
(t9-2)
|
||||
)
|
||||
((method-of-type hud-sprite hud-sprite-method-9)
|
||||
(the-as hud-sprite (-> obj sprites))
|
||||
s3-0
|
||||
(-> *level* default-level)
|
||||
)
|
||||
(let ((a3-1 (-> s3-0 base)))
|
||||
(let ((v1-16 (the-as object (-> s3-0 base))))
|
||||
(set! (-> (the-as dma-packet v1-16) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
||||
@@ -3888,9 +3871,10 @@
|
||||
(+! s2-0 1)
|
||||
)
|
||||
)
|
||||
(let ((t9-10 end-scissor-level))
|
||||
#x3f800000
|
||||
(t9-10 sv-128)
|
||||
(let ((t9-10 end-scissor-level)
|
||||
(a1-13 1.0)
|
||||
)
|
||||
(t9-10 sv-128 a1-13)
|
||||
)
|
||||
(draw-scene-up-down arg1)
|
||||
0
|
||||
@@ -3970,7 +3954,7 @@
|
||||
(set! sv-48 0)
|
||||
(while (< sv-48 s4-0)
|
||||
(set! sv-64 print-game-text)
|
||||
(let ((a0-4 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 options sv-48 box 0 min x)) #f))
|
||||
(let ((a0-4 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 sv-48 text)) #f))
|
||||
(a1-16 arg1)
|
||||
(a2-4 #t)
|
||||
(a3-3 44)
|
||||
@@ -3981,55 +3965,54 @@
|
||||
(set! sv-48 (+ sv-48 1))
|
||||
)
|
||||
(let ((s0-1 (- s0-0 (the int f28-0)))
|
||||
(f28-1
|
||||
(cond
|
||||
((< (-> arg0 sliding-height) 0.0)
|
||||
(set! sv-112 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 options s4-0 box 0 min x)) #f))
|
||||
0.0
|
||||
(set! sv-80 print-game-text)
|
||||
(set! sv-96 format)
|
||||
(let ((a0-7 (clear *temp-string*))
|
||||
(a1-18 "~S")
|
||||
)
|
||||
(sv-96 a0-7 a1-18 sv-112)
|
||||
)
|
||||
(let* ((a0-8 *temp-string*)
|
||||
(a1-19 arg1)
|
||||
(a2-7 #t)
|
||||
(a3-4 44)
|
||||
(t0-4 320)
|
||||
(f0-16 (sv-80 a0-8 a1-19 a2-7 a3-4 t0-4))
|
||||
(f28-1 (cond
|
||||
((< (-> arg0 sliding-height) 0.0)
|
||||
(set! sv-112 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 s4-0 text)) #f))
|
||||
0.0
|
||||
(set! sv-80 print-game-text)
|
||||
(set! sv-96 format)
|
||||
(let ((a0-7 (clear *temp-string*))
|
||||
(a1-18 "~S")
|
||||
)
|
||||
(sv-96 a0-7 a1-18 sv-112)
|
||||
)
|
||||
(* (-> arg0 sliding-height) f0-16)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! sv-160 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 options (+ s4-0 -1) box 0 min x)) #f))
|
||||
0.0
|
||||
(set! sv-128 print-game-text)
|
||||
(set! sv-144 format)
|
||||
(let ((a0-11 (clear *temp-string*))
|
||||
(a1-21 "~S")
|
||||
(let* ((a0-8 *temp-string*)
|
||||
(a1-19 arg1)
|
||||
(a2-7 #t)
|
||||
(a3-4 44)
|
||||
(t0-4 320)
|
||||
(f0-16 (sv-80 a0-8 a1-19 a2-7 a3-4 t0-4))
|
||||
)
|
||||
(* (-> arg0 sliding-height) f0-16)
|
||||
)
|
||||
(sv-144 a0-11 a1-21 sv-160)
|
||||
)
|
||||
(let* ((a0-12 *temp-string*)
|
||||
(a1-22 arg1)
|
||||
(a2-10 #t)
|
||||
(a3-5 44)
|
||||
(t0-5 320)
|
||||
(f0-18 (sv-128 a0-12 a1-22 a2-10 a3-5 t0-5))
|
||||
)
|
||||
(else
|
||||
(set! sv-160 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 (+ s4-0 -1) text)) #f))
|
||||
0.0
|
||||
(set! sv-128 print-game-text)
|
||||
(set! sv-144 format)
|
||||
(let ((a0-11 (clear *temp-string*))
|
||||
(a1-21 "~S")
|
||||
)
|
||||
(sv-144 a0-11 a1-21 sv-160)
|
||||
)
|
||||
(* (-> arg0 sliding-height) f0-18)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let* ((a0-12 *temp-string*)
|
||||
(a1-22 arg1)
|
||||
(a2-10 #t)
|
||||
(a3-5 44)
|
||||
(t0-5 320)
|
||||
(f0-18 (sv-128 a0-12 a1-22 a2-10 a3-5 t0-5))
|
||||
)
|
||||
(* (-> arg0 sliding-height) f0-18)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> arg1 origin y) (the float (+ s0-1 (the int f28-1))))
|
||||
(while (< s3-0 (length s2-0))
|
||||
(set! sv-176 print-game-text)
|
||||
(let* ((a0-14 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 options s3-0 box 0 min x)) #f))
|
||||
(let* ((a0-14 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 s3-0 text)) #f))
|
||||
(a1-24 arg1)
|
||||
(a2-12 #t)
|
||||
(a3-6 44)
|
||||
@@ -4056,7 +4039,7 @@
|
||||
)
|
||||
)
|
||||
(set! sv-224 print-game-text)
|
||||
(let ((a0-23 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 options s3-0 box 0 min x)) #f))
|
||||
(let ((a0-23 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 s3-0 text)) #f))
|
||||
(a1-28 arg1)
|
||||
(a2-16 #f)
|
||||
(a3-7 44)
|
||||
@@ -4534,12 +4517,7 @@
|
||||
(print-game-text (lookup-text! *common-text* (game-text-id progress-missions-none) #f) arg1 #f 44 320)
|
||||
)
|
||||
)
|
||||
(let ((t9-39 end-scissor-missions)
|
||||
(a0-93 sv-276)
|
||||
)
|
||||
#x3f800000
|
||||
(t9-39 a0-93)
|
||||
)
|
||||
(end-scissor-missions sv-276 1.0)
|
||||
(draw-missions-up-down arg1)
|
||||
0
|
||||
(none)
|
||||
@@ -5054,15 +5032,15 @@
|
||||
(set-vector! (-> obj sprites 0 color) 128 128 128 (the int (* 128.0 sv-16)))
|
||||
(set! (-> obj sprites 0 pos z) #xffffff)
|
||||
(set! (-> obj sprites 0 pos w) 0)
|
||||
(set-hud-piece-position! (the-as basic (-> obj sprites)) 100 128)
|
||||
(set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) 100 128)
|
||||
(let* ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(s4-0 (-> s3-0 base))
|
||||
)
|
||||
(-> obj sprites)
|
||||
(let ((t9-3 (method-of-type hud-sprite hud-sprite-method-9)))
|
||||
(-> *level* default-level)
|
||||
(t9-3)
|
||||
)
|
||||
((method-of-type hud-sprite hud-sprite-method-9)
|
||||
(the-as hud-sprite (-> obj sprites))
|
||||
s3-0
|
||||
(-> *level* default-level)
|
||||
)
|
||||
(let ((a3-1 (-> s3-0 base)))
|
||||
(let ((v1-42 (the-as object (-> s3-0 base))))
|
||||
(set! (-> (the-as dma-packet v1-42) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
||||
@@ -5142,12 +5120,7 @@
|
||||
(s4-1 *temp-string* arg1 #f 44 320)
|
||||
)
|
||||
(set! (-> arg1 origin x) 100.0)
|
||||
(let ((t9-11 begin-scissor-secret)
|
||||
(a0-39 sv-120)
|
||||
)
|
||||
sv-48
|
||||
(t9-11 a0-39)
|
||||
)
|
||||
(begin-scissor-secret sv-120 sv-48)
|
||||
(case (get-aspect-ratio)
|
||||
(('aspect16x9)
|
||||
(set! sv-128 195)
|
||||
@@ -5268,15 +5241,15 @@
|
||||
(set! (-> arg0 sprites 0 tex) (lookup-texture-by-id (the-as texture-id arg1)))
|
||||
(set! (-> arg0 sprites 0 scale-x) arg4)
|
||||
(set! (-> arg0 sprites 0 scale-y) arg4)
|
||||
(set-hud-piece-position! (the-as basic (-> arg0 sprites)) arg2 arg3)
|
||||
(set-hud-piece-position! (the-as hud-sprite (-> arg0 sprites)) arg2 arg3)
|
||||
(let* ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(gp-1 (-> s4-1 base))
|
||||
)
|
||||
(-> arg0 sprites)
|
||||
(let ((t9-2 (method-of-type hud-sprite hud-sprite-method-9)))
|
||||
(-> *level* default-level)
|
||||
(t9-2)
|
||||
)
|
||||
((method-of-type hud-sprite hud-sprite-method-9)
|
||||
(the-as hud-sprite (-> arg0 sprites))
|
||||
s4-1
|
||||
(-> *level* default-level)
|
||||
)
|
||||
(let ((a3-1 (-> s4-1 base)))
|
||||
(let ((v1-8 (the-as object (-> s4-1 base))))
|
||||
(set! (-> (the-as dma-packet v1-8) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
||||
@@ -5322,15 +5295,15 @@
|
||||
(set! (-> arg0 data 0) (lookup-texture-by-id (the-as texture-id a0-1)))
|
||||
(set! (-> arg0 pad 12) (the-as uint arg4))
|
||||
(set! (-> arg0 pad 13) (the-as uint arg4))
|
||||
(set-hud-piece-position! (the-as basic (&-> arg0 pad 3)) arg2 arg3)
|
||||
(set-hud-piece-position! (the-as hud-sprite (&-> arg0 pad 3)) arg2 arg3)
|
||||
(let* ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(s5-1 (-> s4-1 base))
|
||||
)
|
||||
(&-> arg0 pad 3)
|
||||
(let ((t9-2 (method-of-type hud-sprite hud-sprite-method-9)))
|
||||
(-> *level* default-level)
|
||||
(t9-2)
|
||||
)
|
||||
((method-of-type hud-sprite hud-sprite-method-9)
|
||||
(the-as hud-sprite (&-> arg0 pad 3))
|
||||
s4-1
|
||||
(-> *level* default-level)
|
||||
)
|
||||
(let ((a3-1 (-> s4-1 base)))
|
||||
(let ((v1-20 (the-as object (-> s4-1 base))))
|
||||
(set! (-> (the-as dma-packet v1-20) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
||||
@@ -6050,7 +6023,7 @@
|
||||
)
|
||||
|
||||
;; definition for function get-highscore-icon-xoffset
|
||||
(defun get-highscore-icon-xoffset ()
|
||||
(defun get-highscore-icon-xoffset ((arg0 int))
|
||||
(if (= (get-aspect-ratio) 'aspect4x3)
|
||||
435
|
||||
410
|
||||
@@ -6332,19 +6305,12 @@
|
||||
)
|
||||
(set! (-> sv-140 origin x) (- (-> sv-140 origin x) (+ 20.0 sv-120)))
|
||||
(set! (-> sv-140 origin y) (+ 25.0 (-> sv-140 origin y)))
|
||||
(let ((gp-3 draw-highscore-icon)
|
||||
(s5-3 sv-144)
|
||||
(s4-3 (get-highscore-icon (-> sv-144 page-index)))
|
||||
(t9-17 get-highscore-icon-xoffset)
|
||||
)
|
||||
(-> sv-144 page-index)
|
||||
(gp-3
|
||||
s5-3
|
||||
s4-3
|
||||
(the int (+ (the float (t9-17)) sv-120))
|
||||
(get-highscore-icon-yoffset (-> sv-144 page-index))
|
||||
(get-highscore-icon-scale (-> sv-144 page-index))
|
||||
)
|
||||
(draw-highscore-icon
|
||||
sv-144
|
||||
(get-highscore-icon (-> sv-144 page-index))
|
||||
(the int (+ (the float (get-highscore-icon-xoffset (-> sv-144 page-index))) sv-120))
|
||||
(get-highscore-icon-yoffset (-> sv-144 page-index))
|
||||
(get-highscore-icon-scale (-> sv-144 page-index))
|
||||
)
|
||||
(set! sv-108 (-> sv-140 origin x))
|
||||
(let ((a0-54 sv-140))
|
||||
@@ -6453,19 +6419,12 @@
|
||||
)
|
||||
(set! (-> sv-140 origin x) (- (-> sv-140 origin x) (+ 20.0 sv-124)))
|
||||
(set! (-> sv-140 origin y) (+ 25.0 (-> sv-140 origin y)))
|
||||
(let ((gp-8 draw-highscore-icon)
|
||||
(s5-8 sv-144)
|
||||
(s4-6 (get-highscore-icon (-> sv-144 prev-page-index)))
|
||||
(t9-36 get-highscore-icon-xoffset)
|
||||
)
|
||||
(-> sv-144 page-index)
|
||||
(gp-8
|
||||
s5-8
|
||||
s4-6
|
||||
(the int (+ (the float (t9-36)) sv-124))
|
||||
(get-highscore-icon-yoffset (-> sv-144 page-index))
|
||||
(get-highscore-icon-scale (-> sv-144 page-index))
|
||||
)
|
||||
(draw-highscore-icon
|
||||
sv-144
|
||||
(get-highscore-icon (-> sv-144 prev-page-index))
|
||||
(the int (+ (the float (get-highscore-icon-xoffset (-> sv-144 page-index))) sv-124))
|
||||
(get-highscore-icon-yoffset (-> sv-144 page-index))
|
||||
(get-highscore-icon-scale (-> sv-144 page-index))
|
||||
)
|
||||
(set! sv-108 (-> sv-140 origin x))
|
||||
(let ((a0-105 sv-140))
|
||||
@@ -7593,22 +7552,21 @@
|
||||
(set-vector! (-> obj sprites 3 color) sv-80 sv-96 sv-112 (the int (* 128.0 f30-0)))
|
||||
(set! (-> obj sprites 3 pos z) #xffffff)
|
||||
(set! (-> obj sprites 3 pos w) 0)
|
||||
(set-hud-piece-position! (the-as basic (-> obj sprites)) s1-0 s2-0)
|
||||
(set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) s1-0 s2-0)
|
||||
(set-hud-piece-position!
|
||||
(the-as basic (-> obj sprites 1))
|
||||
(-> obj sprites 1)
|
||||
(+ s1-0 (the int (* 230.0 (-> (the-as (pointer float) sv-128)))))
|
||||
(+ s2-0 -4)
|
||||
)
|
||||
(set-hud-piece-position! (the-as basic (-> obj sprites 2)) (- s1-0 sv-64) (+ s2-0 -4))
|
||||
(set-hud-piece-position! (the-as basic (-> obj sprites 3)) (+ sv-64 242 s1-0) (+ s2-0 -4))
|
||||
(set-hud-piece-position! (-> obj sprites 2) (- s1-0 sv-64) (+ s2-0 -4))
|
||||
(set-hud-piece-position! (-> obj sprites 3) (+ sv-64 242 s1-0) (+ s2-0 -4))
|
||||
(set! sv-176 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(set! sv-192 (-> sv-176 base))
|
||||
(-> obj sprites)
|
||||
(let ((t9-13 (method-of-type hud-sprite hud-sprite-method-9)))
|
||||
sv-176
|
||||
(-> *level* default-level)
|
||||
(t9-13)
|
||||
)
|
||||
((method-of-type hud-sprite hud-sprite-method-9)
|
||||
(the-as hud-sprite (-> obj sprites))
|
||||
sv-176
|
||||
(-> *level* default-level)
|
||||
)
|
||||
(draw-sprite2d-xy
|
||||
sv-176
|
||||
(+ s1-0 s0-0 (the int (* 230.0 (-> (the-as (pointer float) sv-128)))))
|
||||
@@ -7617,24 +7575,9 @@
|
||||
9
|
||||
(the-as rgba sv-160)
|
||||
)
|
||||
(-> obj sprites 1)
|
||||
(let ((t9-15 (method-of-type hud-sprite hud-sprite-method-9)))
|
||||
sv-176
|
||||
(-> *level* default-level)
|
||||
(t9-15)
|
||||
)
|
||||
(-> obj sprites 2)
|
||||
(let ((t9-16 (method-of-type hud-sprite hud-sprite-method-9)))
|
||||
sv-176
|
||||
(-> *level* default-level)
|
||||
(t9-16)
|
||||
)
|
||||
(-> obj sprites 3)
|
||||
(let ((t9-17 (method-of-type hud-sprite hud-sprite-method-9)))
|
||||
sv-176
|
||||
(-> *level* default-level)
|
||||
(t9-17)
|
||||
)
|
||||
(hud-sprite-method-9 (-> obj sprites 1) sv-176 (-> *level* default-level))
|
||||
(hud-sprite-method-9 (-> obj sprites 2) sv-176 (-> *level* default-level))
|
||||
(hud-sprite-method-9 (-> obj sprites 3) sv-176 (-> *level* default-level))
|
||||
(let ((a3-6 (-> sv-176 base)))
|
||||
(let ((v1-100 (the-as object (-> sv-176 base))))
|
||||
(set! (-> (the-as dma-packet v1-100) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
||||
@@ -7724,22 +7667,21 @@
|
||||
(set-vector! (-> obj sprites 3 color) sv-80 sv-96 sv-112 (the int (* 128.0 f30-0)))
|
||||
(set! (-> obj sprites 3 pos z) #xffffff)
|
||||
(set! (-> obj sprites 3 pos w) 0)
|
||||
(set-hud-piece-position! (the-as basic (-> obj sprites)) s1-0 s2-0)
|
||||
(set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) s1-0 s2-0)
|
||||
(set-hud-piece-position!
|
||||
(the-as basic (-> obj sprites 1))
|
||||
(-> obj sprites 1)
|
||||
(+ s1-0 (the int (* 230.0 (-> (the-as (pointer float) sv-208)))))
|
||||
(+ s2-0 -4)
|
||||
)
|
||||
(set-hud-piece-position! (the-as basic (-> obj sprites 2)) (- s1-0 sv-64) (+ s2-0 -4))
|
||||
(set-hud-piece-position! (the-as basic (-> obj sprites 3)) (+ sv-64 242 s1-0) (+ s2-0 -4))
|
||||
(set-hud-piece-position! (-> obj sprites 2) (- s1-0 sv-64) (+ s2-0 -4))
|
||||
(set-hud-piece-position! (-> obj sprites 3) (+ sv-64 242 s1-0) (+ s2-0 -4))
|
||||
(set! sv-256 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(set! sv-272 (-> sv-256 base))
|
||||
(-> obj sprites)
|
||||
(let ((t9-33 (method-of-type hud-sprite hud-sprite-method-9)))
|
||||
sv-256
|
||||
(-> *level* default-level)
|
||||
(t9-33)
|
||||
)
|
||||
((method-of-type hud-sprite hud-sprite-method-9)
|
||||
(the-as hud-sprite (-> obj sprites))
|
||||
sv-256
|
||||
(-> *level* default-level)
|
||||
)
|
||||
(draw-sprite2d-xy
|
||||
sv-256
|
||||
(+ s1-0 s0-0 (the int (* 230.0 (-> (the-as (pointer float) sv-208)))))
|
||||
@@ -7748,24 +7690,9 @@
|
||||
9
|
||||
(the-as rgba sv-240)
|
||||
)
|
||||
(-> obj sprites 1)
|
||||
(let ((t9-35 (method-of-type hud-sprite hud-sprite-method-9)))
|
||||
sv-256
|
||||
(-> *level* default-level)
|
||||
(t9-35)
|
||||
)
|
||||
(-> obj sprites 2)
|
||||
(let ((t9-36 (method-of-type hud-sprite hud-sprite-method-9)))
|
||||
sv-256
|
||||
(-> *level* default-level)
|
||||
(t9-36)
|
||||
)
|
||||
(-> obj sprites 3)
|
||||
(let ((t9-37 (method-of-type hud-sprite hud-sprite-method-9)))
|
||||
sv-256
|
||||
(-> *level* default-level)
|
||||
(t9-37)
|
||||
)
|
||||
(hud-sprite-method-9 (-> obj sprites 1) sv-256 (-> *level* default-level))
|
||||
(hud-sprite-method-9 (-> obj sprites 2) sv-256 (-> *level* default-level))
|
||||
(hud-sprite-method-9 (-> obj sprites 3) sv-256 (-> *level* default-level))
|
||||
(let ((a3-13 (-> sv-256 base)))
|
||||
(let ((v1-183 (the-as object (-> sv-256 base))))
|
||||
(set! (-> (the-as dma-packet v1-183) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
||||
|
||||
+2
-3
@@ -392,9 +392,8 @@
|
||||
|
||||
;; definition of type menu-memcard-slot-option
|
||||
(deftype menu-memcard-slot-option (menu-option)
|
||||
((sprites hud-sprite 5 :inline :offset-assert 48)
|
||||
(something-hud-related basic :offset 112)
|
||||
(pad uint8 32 :offset-assert 368)
|
||||
((sprites hud-sprite 5 :inline :offset-assert 48)
|
||||
(pad uint8 32 :offset-assert 368)
|
||||
)
|
||||
:method-count-assert 12
|
||||
:size-assert #x190
|
||||
|
||||
+750
-756
File diff suppressed because it is too large
Load Diff
+37
-19
@@ -949,7 +949,7 @@
|
||||
(set! (-> obj current-options) *save-options-title*)
|
||||
)
|
||||
(('select-save-title-hero)
|
||||
(logior! (-> *game-info* purchase-secrets) #x8000)
|
||||
(logior! (-> *game-info* purchase-secrets) (game-secrets hero-mode))
|
||||
(logior! (-> *game-info* secrets) (game-secrets hero-mode))
|
||||
(set! (-> obj current-options) *save-options-title*)
|
||||
)
|
||||
@@ -1694,7 +1694,7 @@
|
||||
((= (-> self state-stack 0) 'title)
|
||||
(let ((gp-1 (-> *setting-control* user-default auto-save)))
|
||||
(sound-volume-off)
|
||||
(let ((v0-0 (progress-intro-start (logtest? (-> *game-info* purchase-secrets) #x8000))))
|
||||
(let ((v0-0 (progress-intro-start (logtest? (-> *game-info* purchase-secrets) (game-secrets hero-mode)))))
|
||||
(set! (-> *setting-control* user-default auto-save) gp-1)
|
||||
v0-0
|
||||
)
|
||||
@@ -2256,7 +2256,7 @@
|
||||
)
|
||||
)
|
||||
((= (-> obj name) (game-text-id progress-continue-without-saving))
|
||||
(progress-intro-start (logtest? (-> *game-info* purchase-secrets) #x8000))
|
||||
(progress-intro-start (logtest? (-> *game-info* purchase-secrets) (game-secrets hero-mode)))
|
||||
)
|
||||
((= (-> obj next-state) 'back)
|
||||
(progress-method-30 arg0)
|
||||
@@ -2275,7 +2275,7 @@
|
||||
(defmethod respond-progress menu-unlocked-menu-option ((obj menu-unlocked-menu-option) (arg0 progress) (arg1 object))
|
||||
"Handle progress menu navigation logic."
|
||||
(let ((s4-0 (memcard-unlocked-secrets? #t)))
|
||||
(set! (-> *game-info* purchase-secrets) (logand -32769 (-> *game-info* purchase-secrets)))
|
||||
(logclear! (-> *game-info* purchase-secrets) (game-secrets hero-mode))
|
||||
(logclear! (-> *game-info* secrets) (game-secrets hero-mode))
|
||||
(when (not (-> *progress-state* secrets-unlocked))
|
||||
(set! (-> *progress-state* secrets-unlocked) #f)
|
||||
@@ -2287,7 +2287,9 @@
|
||||
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm))
|
||||
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm))
|
||||
(cond
|
||||
((and (= (-> obj name) (game-text-id progress-main-secrets-scrapbook)) (logtest? s4-0 512))
|
||||
((and (= (-> obj name) (game-text-id progress-main-secrets-scrapbook))
|
||||
(logtest? s4-0 (game-secrets scrap-book-1))
|
||||
)
|
||||
(sound-play "generic-beep")
|
||||
(cond
|
||||
((send-event (handle->process (-> *game-info* controller 0)) 'scrap-book 1)
|
||||
@@ -2301,7 +2303,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
((and (= (-> obj name) (game-text-id progress-main-secrets-mega-scrapbook)) (logtest? s4-0 1024))
|
||||
((and (= (-> obj name) (game-text-id progress-main-secrets-mega-scrapbook))
|
||||
(logtest? s4-0 (game-secrets scrap-book-2))
|
||||
)
|
||||
(sound-play "generic-beep")
|
||||
(cond
|
||||
((send-event (handle->process (-> *game-info* controller 0)) 'scrap-book 2)
|
||||
@@ -2315,7 +2319,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
((and (= (-> obj name) (game-text-id progress-main-secrets-scrapbook-3)) (logtest? s4-0 2048))
|
||||
((and (= (-> obj name) (game-text-id progress-main-secrets-scrapbook-3))
|
||||
(logtest? s4-0 (game-secrets scrap-book-3))
|
||||
)
|
||||
(sound-play "generic-beep")
|
||||
(cond
|
||||
((send-event (handle->process (-> *game-info* controller 0)) 'scrap-book 3)
|
||||
@@ -2329,30 +2335,40 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
((and (= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-1)) (logtest? s4-0 32))
|
||||
((and (= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-1))
|
||||
(logtest? s4-0 (game-secrets scene-player-1))
|
||||
)
|
||||
(set! (-> *progress-state* scene-player-act) 1)
|
||||
(sound-play "generic-beep")
|
||||
(progress-method-29 arg0)
|
||||
(set-next-state arg0 'select-scene 0)
|
||||
)
|
||||
((and (= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-2)) (logtest? s4-0 64))
|
||||
((and (= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-2))
|
||||
(logtest? s4-0 (game-secrets scene-player-2))
|
||||
)
|
||||
(set! (-> *progress-state* scene-player-act) 2)
|
||||
(sound-play "generic-beep")
|
||||
(progress-method-29 arg0)
|
||||
(set-next-state arg0 'select-scene 0)
|
||||
)
|
||||
((and (= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-3)) (logtest? s4-0 128))
|
||||
((and (= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-3))
|
||||
(logtest? s4-0 (game-secrets scene-player-3))
|
||||
)
|
||||
(set! (-> *progress-state* scene-player-act) 3)
|
||||
(sound-play "generic-beep")
|
||||
(progress-method-29 arg0)
|
||||
(set-next-state arg0 'select-scene 0)
|
||||
)
|
||||
((and (= (-> obj name) (game-text-id progress-main-secrets-hero-mode)) (logtest? s4-0 #x8000))
|
||||
((and (= (-> obj name) (game-text-id progress-main-secrets-hero-mode))
|
||||
(logtest? s4-0 (game-secrets hero-mode))
|
||||
)
|
||||
(sound-play "generic-beep")
|
||||
(progress-method-29 arg0)
|
||||
(set-next-state arg0 'select-save-title-hero 0)
|
||||
)
|
||||
((and (= (-> obj name) (game-text-id progress-main-secrets-levelselect)) (logtest? s4-0 256))
|
||||
((and (= (-> obj name) (game-text-id progress-main-secrets-levelselect))
|
||||
(logtest? s4-0 (game-secrets level-select))
|
||||
)
|
||||
(sound-play "generic-beep")
|
||||
(progress-method-29 arg0)
|
||||
(set-next-state arg0 'select-start 0)
|
||||
@@ -2516,7 +2532,7 @@
|
||||
((= (-> arg0 state-stack 0) 'title)
|
||||
(sound-play "generic-beep")
|
||||
(sound-volume-off)
|
||||
(progress-intro-start (logtest? (-> *game-info* purchase-secrets) #x8000))
|
||||
(progress-intro-start (logtest? (-> *game-info* purchase-secrets) (game-secrets hero-mode)))
|
||||
)
|
||||
(else
|
||||
(sound-play "generic-beep")
|
||||
@@ -2584,11 +2600,13 @@
|
||||
(let ((a1-9 'select-save-title-hero))
|
||||
'select-save
|
||||
(cond
|
||||
((and (= (-> *progress-state* starting-state) 'main) (zero? (logand (-> *game-info* purchase-secrets) #x8000)))
|
||||
((and (= (-> *progress-state* starting-state) 'main)
|
||||
(zero? (logand (-> *game-info* purchase-secrets) (game-secrets hero-mode)))
|
||||
)
|
||||
(set! a1-9 'select-save)
|
||||
)
|
||||
((and (= (-> *progress-state* starting-state) 'title)
|
||||
(zero? (logand (-> *game-info* purchase-secrets) #x8000))
|
||||
(zero? (logand (-> *game-info* purchase-secrets) (game-secrets hero-mode)))
|
||||
)
|
||||
(set! a1-9 'select-save-title)
|
||||
)
|
||||
@@ -2611,7 +2629,7 @@
|
||||
((= (-> arg0 state-stack 0) 'title)
|
||||
(sound-play "generic-beep")
|
||||
(sound-volume-off)
|
||||
(progress-intro-start (logtest? (-> *game-info* purchase-secrets) #x8000))
|
||||
(progress-intro-start (logtest? (-> *game-info* purchase-secrets) (game-secrets hero-mode)))
|
||||
)
|
||||
(else
|
||||
(sound-play "generic-beep")
|
||||
@@ -2992,7 +3010,7 @@
|
||||
((= (-> arg0 state-stack 0) 'title)
|
||||
(sound-play "generic-beep")
|
||||
(sound-volume-off)
|
||||
(progress-intro-start (logtest? (-> *game-info* purchase-secrets) #x8000))
|
||||
(progress-intro-start (logtest? (-> *game-info* purchase-secrets) (game-secrets hero-mode)))
|
||||
)
|
||||
(else
|
||||
(sound-play "generic-beep")
|
||||
@@ -3173,10 +3191,10 @@
|
||||
(set! *display-profile* s3-2)
|
||||
)
|
||||
(set! (-> *game-info* mode) 'play)
|
||||
(let ((s5-1 (-> s4-0 options (-> obj task-index))))
|
||||
(let ((s5-1 (-> s4-0 (-> obj task-index))))
|
||||
(set! (-> *game-info* demo-state) (the-as uint 100))
|
||||
(logior! (-> *game-info* secrets) (game-secrets scene-player-1))
|
||||
(process-spawn scene-player :init scene-player-init (-> s5-1 unknown) #t (-> s5-1 scale))
|
||||
(process-spawn scene-player :init scene-player-init (-> s5-1 info) #t (-> s5-1 continue))
|
||||
)
|
||||
(set-master-mode 'game)
|
||||
)
|
||||
|
||||
+34
-53
@@ -93,15 +93,15 @@
|
||||
)
|
||||
|
||||
;; definition for function convert-korean-text
|
||||
(defun convert-korean-text ((arg0 game-text))
|
||||
"Converts the provided [[game-text]] into korean. Returns a [[string]]"
|
||||
(defun convert-korean-text ((arg0 string))
|
||||
"Converts the provided [[string]] of [[game-text]] into korean. Returns a [[string]]"
|
||||
(local-vars (v1-21 int))
|
||||
(let ((gp-0 (&-> arg0 text)))
|
||||
(let ((gp-0 (-> arg0 data)))
|
||||
*expanded-text-line0*
|
||||
(let ((s4-0 0))
|
||||
0
|
||||
(let ((s1-0 0)
|
||||
(s5-0 ((method-of-type string length) (the-as string arg0)))
|
||||
(s5-0 (length arg0))
|
||||
)
|
||||
(set! *expand-buf-number* (logxor *expand-buf-number* 1))
|
||||
(let ((s3-0 (if (zero? *expand-buf-number*)
|
||||
@@ -114,33 +114,26 @@
|
||||
(clear s3-0)
|
||||
(while (< s4-0 s5-0)
|
||||
(cond
|
||||
((= (-> (the-as (pointer uint8) (&+ gp-0 s4-0))) 3)
|
||||
((= (-> gp-0 s4-0) 3)
|
||||
(+! s4-0 1)
|
||||
(while (and (< s4-0 s5-0)
|
||||
(!= (-> (the-as (pointer uint8) (&+ gp-0 s4-0))) 3)
|
||||
(!= (-> (the-as (pointer uint8) (&+ gp-0 s4-0))) 4)
|
||||
)
|
||||
(set! (-> s3-0 data s1-0) (-> (the-as (pointer uint8) (&+ gp-0 s4-0))))
|
||||
(while (and (< s4-0 s5-0) (!= (-> gp-0 s4-0) 3) (!= (-> gp-0 s4-0) 4))
|
||||
(set! (-> s3-0 data s1-0) (-> gp-0 s4-0))
|
||||
(+! s4-0 1)
|
||||
(+! s1-0 1)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((v1-17 (+ s4-0 1)))
|
||||
(-> (the-as (pointer uint8) (&+ gp-0 v1-17)))
|
||||
(-> gp-0 v1-17)
|
||||
(set! s4-0 (+ v1-17 1))
|
||||
)
|
||||
(set! (-> s3-0 data s1-0) (the-as uint 126))
|
||||
(let ((v1-19 (+ s1-0 1)))
|
||||
(set! (-> s3-0 data v1-19) (the-as uint 89))
|
||||
(let ((v1-20 (+ v1-19 1)))
|
||||
(while (and (< s4-0 s5-0)
|
||||
(< v1-20 s2-0)
|
||||
(!= (-> (the-as (pointer uint8) (&+ gp-0 s4-0))) 3)
|
||||
(!= (-> (the-as (pointer uint8) (&+ gp-0 s4-0))) 4)
|
||||
)
|
||||
(while (and (< s4-0 s5-0) (< v1-20 s2-0) (!= (-> gp-0 s4-0) 3) (!= (-> gp-0 s4-0) 4))
|
||||
(cond
|
||||
((= (-> (the-as (pointer uint8) (&+ gp-0 s4-0))) 5)
|
||||
((= (-> gp-0 s4-0) 5)
|
||||
(set! (-> s3-0 data v1-20) (the-as uint 1))
|
||||
(+! s4-0 1)
|
||||
(set! v1-21 (+ v1-20 1))
|
||||
@@ -150,7 +143,7 @@
|
||||
(set! v1-21 (+ v1-20 1))
|
||||
)
|
||||
)
|
||||
(set! (-> s3-0 data v1-21) (-> (the-as (pointer uint8) (&+ gp-0 s4-0))))
|
||||
(set! (-> s3-0 data v1-21) (-> gp-0 s4-0))
|
||||
(+! s4-0 1)
|
||||
(let ((v1-22 (+ v1-21 1)))
|
||||
(set! (-> s3-0 data v1-22) (the-as uint 126))
|
||||
@@ -230,7 +223,7 @@
|
||||
)
|
||||
)
|
||||
((= (-> obj language-id) 6)
|
||||
(convert-korean-text (the-as game-text (-> obj data v1-2 text)))
|
||||
(convert-korean-text (-> obj data v1-2 text))
|
||||
)
|
||||
(else
|
||||
(-> obj data v1-2 text)
|
||||
@@ -532,53 +525,41 @@
|
||||
"Draws some lines"
|
||||
(when *cheat-mode*
|
||||
(let ((s5-0 (new 'static 'vector4w))
|
||||
(gp-0 (new 'static 'matrix))
|
||||
(gp-0 (new 'static 'vector4w-4))
|
||||
)
|
||||
(set-vector!
|
||||
(-> gp-0 vector 0)
|
||||
(the-as float (the int (+ -256.0 (-> arg0 origin x))))
|
||||
(the-as float (the int (+ -208.0 (-> arg0 origin y))))
|
||||
0.0
|
||||
(the-as float #x1)
|
||||
(the int (+ -256.0 (-> arg0 origin x)))
|
||||
(the int (+ -208.0 (-> arg0 origin y)))
|
||||
0
|
||||
1
|
||||
)
|
||||
(set-vector!
|
||||
(-> gp-0 vector 1)
|
||||
(the-as float (the int (+ -256.0 (-> arg0 width) (-> arg0 origin x))))
|
||||
(the-as float (the int (+ -208.0 (-> arg0 origin y))))
|
||||
0.0
|
||||
(the-as float #x1)
|
||||
(the int (+ -256.0 (-> arg0 width) (-> arg0 origin x)))
|
||||
(the int (+ -208.0 (-> arg0 origin y)))
|
||||
0
|
||||
1
|
||||
)
|
||||
(set-vector!
|
||||
(-> gp-0 vector 2)
|
||||
(the-as float (the int (+ -256.0 (-> arg0 width) (-> arg0 origin x))))
|
||||
(the-as float (the int (+ -208.0 (-> arg0 height) (-> arg0 origin y))))
|
||||
0.0
|
||||
(the-as float #x1)
|
||||
(the int (+ -256.0 (-> arg0 width) (-> arg0 origin x)))
|
||||
(the int (+ -208.0 (-> arg0 height) (-> arg0 origin y)))
|
||||
0
|
||||
1
|
||||
)
|
||||
(set-vector!
|
||||
(-> gp-0 trans)
|
||||
(the-as float (the int (+ -256.0 (-> arg0 origin x))))
|
||||
(the-as float (the int (+ -208.0 (-> arg0 height) (-> arg0 origin y))))
|
||||
0.0
|
||||
(the-as float #x1)
|
||||
(-> gp-0 vector 3)
|
||||
(the int (+ -256.0 (-> arg0 origin x)))
|
||||
(the int (+ -208.0 (-> arg0 height) (-> arg0 origin y)))
|
||||
0
|
||||
1
|
||||
)
|
||||
(set-vector! s5-0 128 128 128 128)
|
||||
(add-debug-line2d
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(the-as vector (-> gp-0 vector))
|
||||
(-> gp-0 vector 1)
|
||||
(the-as vector s5-0)
|
||||
)
|
||||
(add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 1) (-> gp-0 vector 2) (the-as vector s5-0))
|
||||
(add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 2) (-> gp-0 trans) (the-as vector s5-0))
|
||||
(add-debug-line2d
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> gp-0 trans)
|
||||
(the-as vector (-> gp-0 vector))
|
||||
(the-as vector s5-0)
|
||||
)
|
||||
(add-debug-line2d #t (bucket-id debug-no-zbuf1) (the-as vector4w (-> gp-0 vector)) (-> gp-0 vector 1) s5-0)
|
||||
(add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 1) (-> gp-0 vector 2) s5-0)
|
||||
(add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 2) (-> gp-0 vector 3) s5-0)
|
||||
(add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 3) (the-as vector4w (-> gp-0 vector)) s5-0)
|
||||
)
|
||||
)
|
||||
0
|
||||
|
||||
Reference in New Issue
Block a user