From 701108a1b66470914cc98fb014517bc0a7da29f2 Mon Sep 17 00:00:00 2001 From: ManDude <7569514+ManDude@users.noreply.github.com> Date: Sat, 8 Jan 2022 18:39:17 +0000 Subject: [PATCH] [runtime] Fix progress menu aspect ratios (#1055) * update progress code and fix our frame "scissoring" * aspect ratio hacks * expand progress tint for widescreen * give up and comment things properly * properly undo hacks --- common/goos/PrettyPrinter2.cpp | 11 +- decompiler/config/all-types.gc | 2 +- .../config/jak1_ntsc_black_label/hacks.jsonc | 3 +- .../jak1_ntsc_black_label/type_casts.jsonc | 2 + .../jak1_ntsc_black_label/var_names.jsonc | 6 +- .../shaders/buffered_tcc0.vert | 8 +- .../shaders/buffered_tcc1.vert | 8 +- .../shaders/debug_buffered.vert | 4 +- .../opengl_renderer/shaders/debug_red.vert | 4 +- .../opengl_renderer/shaders/direct_basic.vert | 4 +- .../shaders/direct_basic_textured.vert | 2 + .../graphics/opengl_renderer/shaders/sky.vert | 4 +- .../opengl_renderer/shaders/sky_blend.vert | 4 +- .../opengl_renderer/shaders/sprite_cpu.vert | 2 + .../opengl_renderer/shaders/tfrag3.vert | 2 + .../shaders/tfrag3_no_tex.vert | 4 +- goal_src/engine/camera/math-camera.gc | 15 +- goal_src/engine/debug/default-menu.gc | 89 +- goal_src/engine/entity/entity.gc | 2108 +++----- goal_src/engine/game/main.gc | 2 +- goal_src/engine/game/video.gc | 14 +- goal_src/engine/gfx/sprite/sprite.gc | 9 + goal_src/engine/pc/pckernel-h.gc | 8 +- goal_src/engine/pc/pckernel.gc | 42 +- goal_src/engine/ui/progress-h.gc | 2 +- goal_src/engine/ui/progress/progress-draw.gc | 3806 ++++++------- goal_src/engine/ui/progress/progress-part.gc | 2735 ++++------ goal_src/engine/ui/progress/progress.gc | 4754 +++++++---------- goal_src/goos-lib.gs | 4 +- scripts/update-goal-src.py | 4 +- 30 files changed, 5692 insertions(+), 7970 deletions(-) diff --git a/common/goos/PrettyPrinter2.cpp b/common/goos/PrettyPrinter2.cpp index 0e27c22ec..36bf99bee 100644 --- a/common/goos/PrettyPrinter2.cpp +++ b/common/goos/PrettyPrinter2.cpp @@ -11,9 +11,6 @@ namespace v2 { // The previous issues we had with stack overflow only happened when there was a stack frame per // element in a list. -// TODO: there's a different style of splitting that we should do for forms like: -// set!, and, or, <, >, +... where we try leaving operator + one other. - // The main node type. // unlike v1, this nests lists. // these have pointers to parents, so generally not safe to copy. @@ -193,7 +190,7 @@ void break_list(Node* node) { node->top_line_count = 1; const std::unordered_set sameline_splitters = { - "if", "<", ">", "<=", ">=", "set!", "=", "!=", "+", "-", "*", "/", "the", "->"}; + "if", "<", ">", "<=", ">=", "set!", "=", "!=", "+", "-", "*", "/", "the", "->", "and", "or"}; if (node->child_nodes.at(0).kind == Node::Kind::LIST) { // ((foo @@ -253,9 +250,9 @@ void break_list(Node* node) { void insert_required_breaks(const std::vector& bfs_order) { const std::unordered_set always_break = { - "when", "defun-debug", "countdown", "case", "defun", "defmethod", - "let", "until", "while", "if", "dotimes", "cond", - "else", "defbehavior", "with-pp", "rlet", "defstate"}; + "when", "defun-debug", "countdown", "case", "defun", "defmethod", + "let", "until", "while", "if", "dotimes", "cond", + "else", "defbehavior", "with-pp", "rlet", "defstate", "behavior"}; for (auto node : bfs_order) { if (!node->break_list && node->kind == Node::Kind::LIST && node->child_nodes.at(0).kind == Node::Kind::ATOM) { diff --git a/decompiler/config/all-types.gc b/decompiler/config/all-types.gc index 6795526f0..679ae2f27 100644 --- a/decompiler/config/all-types.gc +++ b/decompiler/config/all-types.gc @@ -14903,7 +14903,7 @@ (total-nb-of-buzzers int32 :offset-assert 288) (card-info mc-slot-info :offset-assert 292) (last-option-index-change int64 :offset-assert 296) - (video-mode-timeout uint64 :offset-assert 304) + (video-mode-timeout int64 :offset-assert 304) (display-state-stack progress-screen 5 :offset-assert 312) (option-index-stack int32 5 :offset-assert 352) (display-state-pos int32 :offset-assert 372) diff --git a/decompiler/config/jak1_ntsc_black_label/hacks.jsonc b/decompiler/config/jak1_ntsc_black_label/hacks.jsonc index ebe14394e..700b9dbd1 100644 --- a/decompiler/config/jak1_ntsc_black_label/hacks.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/hacks.jsonc @@ -394,7 +394,8 @@ "ERROR: ~A in spool anim loop for ~A ~D, but not loaded.~": 3, "~0k~5d/~d ~6d/~d ~6d/~d ": 6, "~0k~s~%": 1, - "money ~A was killed in pickup~%": 0 + "money ~A was killed in pickup~%": 0, + " id address name aid tsk lev status x y z address name state heap flags~%": 3 }, "blocks_ending_in_asm_branch": { diff --git a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc index 546f8864a..de5aa84b9 100644 --- a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc @@ -2314,6 +2314,8 @@ "(method 14 level-group)": [ [[54, 164], "s1", "process-drawable"], + [[107, 127], "s0", "(pointer int32)"], + [[153, 162], "v0", "symbol"], [[319, 342], "s0", "process-drawable"], [368, "v1", "(pointer process-drawable)"], [[384, 494], "s5", "process-drawable"] diff --git a/decompiler/config/jak1_ntsc_black_label/var_names.jsonc b/decompiler/config/jak1_ntsc_black_label/var_names.jsonc index d67ef03b4..82421a488 100644 --- a/decompiler/config/jak1_ntsc_black_label/var_names.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/var_names.jsonc @@ -3355,7 +3355,7 @@ "(method 18 bsp-header)": { "vars": { - "a2-0": "existing-actor-count", + "a2-0": "actor-count", "s4-0": "birth-idx", "a0-4": "idx-to-birth", "v1-25": "actor-to-birth", @@ -3530,7 +3530,9 @@ "(method 14 level-group)": { "vars": { - "s1-1": ["s1-1", "process-drawable"] + "s0-1": ["s0-1", "(pointer int32)"], + "s1-1": ["s1-1", "process-drawable"], + "v0-10": ["v0-10", "symbol"] } }, diff --git a/game/graphics/opengl_renderer/shaders/buffered_tcc0.vert b/game/graphics/opengl_renderer/shaders/buffered_tcc0.vert index d42215913..5a93268f6 100644 --- a/game/graphics/opengl_renderer/shaders/buffered_tcc0.vert +++ b/game/graphics/opengl_renderer/shaders/buffered_tcc0.vert @@ -8,7 +8,9 @@ out vec4 fragment_color; out vec3 tex_coord; void main() { - gl_Position = vec4((position_in.x - 0.5) * 16. , -(position_in.y - 0.5) * 32, position_in.z * 2 - 1., 1.0); - fragment_color = vec4(rgba_in.x, rgba_in.y, rgba_in.z, rgba_in.a * 2); + gl_Position = vec4((position_in.x - 0.5) * 16, -(position_in.y - 0.5) * 32, position_in.z * 2 - 1, 1.0); + // scissoring area adjust + gl_Position.y *= 512.0/448.0; + fragment_color = vec4(rgba_in.rgb, rgba_in.a * 2); tex_coord = tex_coord_in; -} \ No newline at end of file +} diff --git a/game/graphics/opengl_renderer/shaders/buffered_tcc1.vert b/game/graphics/opengl_renderer/shaders/buffered_tcc1.vert index 65277500d..5a93268f6 100644 --- a/game/graphics/opengl_renderer/shaders/buffered_tcc1.vert +++ b/game/graphics/opengl_renderer/shaders/buffered_tcc1.vert @@ -8,7 +8,9 @@ out vec4 fragment_color; out vec3 tex_coord; void main() { - gl_Position = vec4((position_in.x - 0.5) * 16., -(position_in.y - 0.5) * 32, position_in.z * 2 - 1., 1.0); - fragment_color = vec4(rgba_in.x, rgba_in.y, rgba_in.z, rgba_in.w * 2.); + gl_Position = vec4((position_in.x - 0.5) * 16, -(position_in.y - 0.5) * 32, position_in.z * 2 - 1, 1.0); + // scissoring area adjust + gl_Position.y *= 512.0/448.0; + fragment_color = vec4(rgba_in.rgb, rgba_in.a * 2); tex_coord = tex_coord_in; -} \ No newline at end of file +} diff --git a/game/graphics/opengl_renderer/shaders/debug_buffered.vert b/game/graphics/opengl_renderer/shaders/debug_buffered.vert index f1384e25b..d307af799 100644 --- a/game/graphics/opengl_renderer/shaders/debug_buffered.vert +++ b/game/graphics/opengl_renderer/shaders/debug_buffered.vert @@ -12,6 +12,8 @@ out vec4 fragment_color; void main() { // Note: position.y is multiplied by 32 instead of 16 to undo the half-height for interlacing stuff. gl_Position = vec4((position_in.x - 0.5) * 16., -(position_in.y - 0.5) * 32, position_in.z * 2 - 1., 1.0); + // scissoring area adjust + gl_Position.y *= 512.0/448.0; fragment_color = vec4(rgba_in.x, rgba_in.y, rgba_in.z, rgba_in.w + 0.5); //fragment_color = vec4(1.0, 0, 0, 0.7); -} \ No newline at end of file +} diff --git a/game/graphics/opengl_renderer/shaders/debug_red.vert b/game/graphics/opengl_renderer/shaders/debug_red.vert index 0c4449d77..a91c45bea 100644 --- a/game/graphics/opengl_renderer/shaders/debug_red.vert +++ b/game/graphics/opengl_renderer/shaders/debug_red.vert @@ -8,5 +8,7 @@ out vec4 fragment_color; void main() { gl_Position = vec4((position_in.x - 0.5) * 16., -(position_in.y - 0.5) * 32, position_in.z * 2 - 1., 1.0); + // scissoring area adjust + gl_Position.y *= 512.0/448.0; fragment_color = vec4(1.0, 0, 0, 0.7); -} \ No newline at end of file +} diff --git a/game/graphics/opengl_renderer/shaders/direct_basic.vert b/game/graphics/opengl_renderer/shaders/direct_basic.vert index 8527ef6ff..f2b1d11b3 100644 --- a/game/graphics/opengl_renderer/shaders/direct_basic.vert +++ b/game/graphics/opengl_renderer/shaders/direct_basic.vert @@ -10,5 +10,7 @@ out vec4 fragment_color; void main() { // Note: position.y is multiplied by 32 instead of 16 to undo the half-height for interlacing stuff. gl_Position = vec4((position_in.x - 0.5) * 16., -(position_in.y - 0.5) * 32, position_in.z * 2 - 1., 1.0); + // scissoring area adjust + gl_Position.y *= 512.0/448.0; fragment_color = vec4(rgba_in.x, rgba_in.y, rgba_in.z, rgba_in.w + 0.5); -} \ No newline at end of file +} diff --git a/game/graphics/opengl_renderer/shaders/direct_basic_textured.vert b/game/graphics/opengl_renderer/shaders/direct_basic_textured.vert index 77dc94d04..42d6625cb 100644 --- a/game/graphics/opengl_renderer/shaders/direct_basic_textured.vert +++ b/game/graphics/opengl_renderer/shaders/direct_basic_textured.vert @@ -13,6 +13,8 @@ out flat uvec2 tex_info; void main() { gl_Position = vec4((position_in.x - 0.5) * 16., -(position_in.y - 0.5) * 32, position_in.z * 2 - 1., 1.0); + // scissoring area adjust + gl_Position.y *= 512.0/448.0; fragment_color = vec4(rgba_in.x, rgba_in.y, rgba_in.z, rgba_in.w * 2.); tex_coord = tex_coord_in; tex_info = tex_info_in; diff --git a/game/graphics/opengl_renderer/shaders/sky.vert b/game/graphics/opengl_renderer/shaders/sky.vert index c95906c83..279dd46bb 100644 --- a/game/graphics/opengl_renderer/shaders/sky.vert +++ b/game/graphics/opengl_renderer/shaders/sky.vert @@ -9,6 +9,8 @@ noperspective out vec3 tex_coord; void main() { gl_Position = vec4((position_in.x - 0.5) * 16. , -(position_in.y - 0.5) * 32, position_in.z * 2 - 1., 1.0); + // scissoring area adjust + gl_Position.y *= 512.0/448.0; fragment_color = vec4(rgba_in.x, rgba_in.y, rgba_in.z, rgba_in.a * 2); tex_coord = tex_coord_in; -} \ No newline at end of file +} diff --git a/game/graphics/opengl_renderer/shaders/sky_blend.vert b/game/graphics/opengl_renderer/shaders/sky_blend.vert index 870b21d6a..1868842f8 100644 --- a/game/graphics/opengl_renderer/shaders/sky_blend.vert +++ b/game/graphics/opengl_renderer/shaders/sky_blend.vert @@ -6,5 +6,7 @@ out vec3 tex_coord; void main() { gl_Position = vec4(position_in.x*2 -1, position_in.y*2-1, 0.0, 1.0); + // scissoring area adjust + gl_Position.y *= 512.0/448.0; tex_coord = position_in; -} \ No newline at end of file +} diff --git a/game/graphics/opengl_renderer/shaders/sprite_cpu.vert b/game/graphics/opengl_renderer/shaders/sprite_cpu.vert index cd90cfafa..b5d4de95c 100644 --- a/game/graphics/opengl_renderer/shaders/sprite_cpu.vert +++ b/game/graphics/opengl_renderer/shaders/sprite_cpu.vert @@ -13,6 +13,8 @@ out flat uvec2 tex_info; void main() { gl_Position = vec4((position_in.x - 0.5) * 16., -(position_in.y - 0.5) * 32, position_in.z * 2 - 1., 1.0); + // scissoring area adjust + gl_Position.y *= 512.0/448.0; fragment_color = vec4(rgba_in.x, rgba_in.y, rgba_in.z, rgba_in.w * 2.); tex_coord = tex_coord_in; tex_info = tex_info_in; diff --git a/game/graphics/opengl_renderer/shaders/tfrag3.vert b/game/graphics/opengl_renderer/shaders/tfrag3.vert index 1a6ffd61b..33c4e88dd 100644 --- a/game/graphics/opengl_renderer/shaders/tfrag3.vert +++ b/game/graphics/opengl_renderer/shaders/tfrag3.vert @@ -63,6 +63,8 @@ void main() { transformed.xyz *= transformed.w; gl_Position = transformed; + // scissoring area adjust + gl_Position.y *= 512.0/448.0; // time of day lookup fragment_color = texelFetch(tex_T1, time_of_day_index, 0); diff --git a/game/graphics/opengl_renderer/shaders/tfrag3_no_tex.vert b/game/graphics/opengl_renderer/shaders/tfrag3_no_tex.vert index ad7d8916a..809877d2b 100644 --- a/game/graphics/opengl_renderer/shaders/tfrag3_no_tex.vert +++ b/game/graphics/opengl_renderer/shaders/tfrag3_no_tex.vert @@ -44,7 +44,9 @@ void main() { transformed.xyz *= transformed.w; gl_Position = transformed; + // scissoring area adjust + gl_Position.y *= 512.0/448.0; // time of day lookup fragment_color = rgba_in; -} \ No newline at end of file +} diff --git a/goal_src/engine/camera/math-camera.gc b/goal_src/engine/camera/math-camera.gc index b4706f6cf..7f7352073 100644 --- a/goal_src/engine/camera/math-camera.gc +++ b/goal_src/engine/camera/math-camera.gc @@ -34,7 +34,6 @@ ;; the x/y ratio are frustum slopes (set! (-> math-cam x-ratio) (tan (* 0.5 (-> math-cam fov)))) - ;;(format #t "aspect is ~A~%" aspect) (if (= aspect 'aspect4x3) (set! (-> math-cam y-ratio) (* (1/ ASPECT_4X3) (-> math-cam x-ratio))) (set! (-> math-cam y-ratio) (* (1/ ASPECT_16X9) (-> math-cam x-ratio))) @@ -139,17 +138,11 @@ (let ((corrected-fog (/ fog-factor-2 (* (-> math-cam d) (- (-> math-cam f) (-> math-cam d))))) (cam-fov-mult (-> math-cam fov-correction-factor)) ) - (set! (-> math-cam perspective vector 0 x) - (* cam-fov-mult (- (/ (-> math-cam x-pix) (* (-> math-cam x-ratio) (-> math-cam d))))) - ) - (set! (-> math-cam perspective vector 1 y) - (* cam-fov-mult (- (/ (-> math-cam y-pix) (* (-> math-cam y-ratio) (-> math-cam d))))) - ) + (set! (-> math-cam perspective vector 0 x) (* cam-fov-mult (- (/ (-> math-cam x-pix) (* (-> math-cam x-ratio) (-> math-cam d)))))) + (set! (-> math-cam perspective vector 1 y) (* cam-fov-mult (- (/ (-> math-cam y-pix) (* (-> math-cam y-ratio) (-> math-cam d)))))) (set! (-> math-cam perspective vector 2 z) (* cam-fov-mult (+ (-> math-cam f) (-> math-cam d)) corrected-fog)) (set! (-> math-cam perspective vector 2 w) (* (/ cam-fov-mult (-> math-cam d)) fog-at-near-plane)) - (set! (-> math-cam perspective vector 3 z) - (* -2.0 corrected-fog (-> math-cam f) (-> math-cam d) cam-fov-mult) - ) + (set! (-> math-cam perspective vector 3 z) (* -2.0 corrected-fog (-> math-cam f) (-> math-cam d) cam-fov-mult)) ) ;; hvdf/hmge, no idea what these are @@ -191,7 +184,7 @@ ;; cheating this by 1 bit seems to fix it. (#when PC_PORT ;; #x4b002032 -> #x4b002031 - (-! (-> math-cam isometric vector 3 z) 1.) + (set! (-> math-cam isometric vector 3 z) (the-as float (- (the-as int (-> math-cam isometric vector 3 z)) 1))) ) ) diff --git a/goal_src/engine/debug/default-menu.gc b/goal_src/engine/debug/default-menu.gc index 75cbbf657..092887929 100644 --- a/goal_src/engine/debug/default-menu.gc +++ b/goal_src/engine/debug/default-menu.gc @@ -3973,7 +3973,7 @@ (#when PC_PORT -(defmacro new-dm-function (text var func) +(defmacro new-dm-func (text var func) `(new 'debug 'debug-menu-item-function ,text ,var (the-as (function int object) ,func)) ) (defmacro new-dm-flag (text var func) @@ -4060,7 +4060,7 @@ (let ((iter *level-load-list*)) (while (not (or (null? iter) (null? (cdr iter)) (null? (cddr iter)))) (debug-menu-append-item teleport-menu - (new-dm-function (symbol->string (the-as symbol (car iter))) + (new-dm-func (symbol->string (the-as symbol (car iter))) (-> (the-as symbol (car iter)) value) (lambda ((info level-load-info)) (let ((tf (new 'stack 'transformq))) @@ -4158,9 +4158,23 @@ ) ) +(defun dm-display-entities-pick-func ((arg0 symbol)) + (debug-print-entities *level* arg0 (the-as type #f)) + ) + (when (-> *debug-menu-context* root-menu) (debug-menu-append-item (-> *debug-menu-context* root-menu) (debug-menu-make-load-menu *debug-menu-context*)) - ;; Entity menu TODO + + (debug-menu-append-item (-> *debug-menu-context* root-menu) + (debug-menu-make-from-template *debug-menu-context* + '(menu "Entity" + (function "Print entity info" #t dm-display-entities-pick-func) + (function "Print entity info (art-group)" art-group dm-display-entities-pick-func) + (function "Print entity info (entity-meters)" entity-meters dm-display-entities-pick-func) + (function "Print entity info (entity-perm)" entity-perm dm-display-entities-pick-func) + ) + ) + ) ;; Music menu TODO ;; Secrets menu TODO ;; Scene menu TODO @@ -4217,6 +4231,8 @@ (function "2560 x 1440" #f (lambda () (set-size! *pc-settings* 2560 1440))) (function "2880 x 2160" #f (lambda () (set-size! *pc-settings* 2880 2160))) (function "3840 x 2160" #f (lambda () (set-size! *pc-settings* 3840 2160))) + (function "512 x 448" #f (lambda () (set-size! *pc-settings* 512 448))) + (function "512 x 512" #f (lambda () (set-size! *pc-settings* 512 512))) ) (flag "Letterbox" #f (dm-lambda-boolean-flag (-> *pc-settings* letterbox?))) (flag "Skip movies" #f (dm-lambda-boolean-flag (-> *pc-settings* skip-movies?))) @@ -4255,16 +4271,67 @@ ) ) ) - (debug-menu-append-item (-> *debug-menu-context* root-menu) - (debug-menu-make-from-template *debug-menu-context* - '(menu "Other" - (flag "DECI Count" *display-deci-count* dm-boolean-toggle-pick-func) - (flag "Actor graph" *display-actor-graph* dm-boolean-toggle-pick-func) - (flag "Update vis outside bsp" *update-leaf-when-outside-bsp* dm-boolean-toggle-pick-func) - (float-var "Actor birth dist" #f (dm-lambda-meters-var (-> *ACTOR-bank* birth-dist)) 20 1 #t 0 10000 1) - (float-var "Actor pause dist" #f (dm-lambda-meters-var (-> *ACTOR-bank* pause-dist)) 20 1 #t 0 10000 1) + (let* ((prog-menu (new 'debug 'debug-menu *debug-menu-context* "Progress menu")) + (prog-menu-node (new-dm-submenu "Progress" prog-menu)) + (other-menu-node + (debug-menu-make-from-template *debug-menu-context* + '(menu "Other" + (flag "DECI Count" *display-deci-count* dm-boolean-toggle-pick-func) + (flag "Actor graph" *display-actor-graph* dm-boolean-toggle-pick-func) + (flag "Update vis outside bsp" *update-leaf-when-outside-bsp* dm-boolean-toggle-pick-func) + (float-var "Actor birth dist" #f (dm-lambda-meters-var (-> *ACTOR-bank* birth-dist)) 20 1 #t 0 10000 1) + (float-var "Actor pause dist" #f (dm-lambda-meters-var (-> *ACTOR-bank* pause-dist)) 20 1 #t 0 10000 1) + (flag "Force progress" #f (dm-lambda-boolean-flag (-> *pc-settings* progress-force?))) + ) + )) + (other-menu (-> (the-as debug-menu-item-submenu other-menu-node) submenu)) ) + (dotimes (i 35) + (debug-menu-append-item prog-menu + (new-dm-func (new 'debug 'string 0 (enum->string progress-screen i)) i + (lambda ((val progress-screen)) + (cond + ((-> *pc-settings* progress-force?) + (cond + ((not *progress-process*) + (make-levels-with-tasks-available-to-progress) + (disable-level-text-file-loading) + (set! (-> *progress-state* starting-state) val) + (set! *progress-process* (make-init-process progress progress-init-by-other + :to *dproc* + :stack *progress-stack-top*)) + (let ((s5-1 *progress-process*)) + (set! (-> s5-1 0 completion-percentage) (calculate-completion (-> s5-1 0))) + (set! *master-mode* 'progress) + (set! (-> s5-1 0 display-level-index) 0) ;; geyser rock + (set! (-> s5-1 0 next-level-index) (-> s5-1 0 display-level-index)) + (set! (-> s5-1 0 display-state) (progress-screen invalid)) + (set-transition-progress! (-> s5-1 0) 512) + (set! (-> s5-1 0 task-index) (get-next-task-up -1 (-> s5-1 0 display-level-index))) + ) + (when *progress-process* + (enter! (-> *progress-process* 0) val 0) + (set! (-> *progress-process* 0 card-info) #f) + ) + ) + (else + (push! (-> *progress-process* 0)) + (set! (-> *progress-process* 0 next-display-state) val) + (set! (-> *progress-process* 0 card-info) #f) + ) + ) + ) + (else + (activate-progress *dproc* val) + ) + ) + (set-master-mode 'progress) + ) + )) ) + (debug-menu-append-item other-menu prog-menu-node) + + (debug-menu-append-item (-> *debug-menu-context* root-menu) other-menu-node) ) ) diff --git a/goal_src/engine/entity/entity.gc b/goal_src/engine/entity/entity.gc index a94d56a53..c0178ec8f 100644 --- a/goal_src/engine/entity/entity.gc +++ b/goal_src/engine/entity/entity.gc @@ -5,8 +5,7 @@ ;; name in dgo: entity ;; dgos: GAME, ENGINE -;; TODO - for jungleb-obs -(define-extern entity-task-complete-on (function entity none)) +;; DECOMP BEGINS ;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; global entity settings @@ -81,11 +80,7 @@ (defmethod print entity ((obj entity)) "print an entity, with its name from the res." - (format #t "#<~A :name ~S @ #x~X>" - (-> obj type) - (res-lump-struct obj 'name object) - obj - ) + (format #t "#<~A :name ~S @ #x~X>" (-> obj type) (res-lump-struct obj 'name structure) obj) obj ) @@ -191,38 +186,38 @@ "Get an entity by actor-id. This looks through the entity-links-array, so it will require that the level is somewhat loaded." (dotimes (v1-0 (-> *level* length)) - (let ((a1-3 (-> *level* level v1-0))) - (when (= (-> a1-3 status) 'active) - (let ((a1-4 (-> a1-3 entity))) - (when (nonzero? a1-4) - (let ((a2-4 0) - (a3-2 (+ (-> a1-4 length) -1)) - ) - 0 - (while (>= a3-2 a2-4) - (let* ((t0-3 (+ a2-4 (/ (- a3-2 a2-4) 2))) - (t1-2 (-> a1-4 data t0-3)) - (t2-0 (-> t1-2 perm aid)) + (let ((a1-3 (-> *level* level v1-0))) + (when (= (-> a1-3 status) 'active) + (let ((a1-4 (-> a1-3 entity))) + (when (nonzero? a1-4) + (let ((a2-4 0) + (a3-2 (+ (-> a1-4 length) -1)) + ) + 0 + (while (>= a3-2 a2-4) + (let* ((t0-3 (+ a2-4 (/ (- a3-2 a2-4) 2))) + (t1-2 (-> a1-4 data t0-3)) + (t2-0 (-> t1-2 perm aid)) + ) + (cond + ((= t2-0 arg0) + (return (-> t1-2 entity)) + ) + ((< (the-as uint t2-0) arg0) + (set! a2-4 (+ t0-3 1)) + ) + (else + (set! a3-2 (+ t0-3 -1)) + ) + ) + ) ) - (cond - ((= t2-0 arg0) - (return (-> t1-2 entity)) + ) ) - ((< (the-as uint t2-0) arg0) - (set! a2-4 (+ t0-3 1)) - ) - (else - (set! a3-2 (+ t0-3 -1)) - ) - ) ) - ) ) - ) ) - ) ) - ) (the-as entity #f) ) @@ -237,10 +232,11 @@ (let* ((t1-3 (-> a3-5 data t0-4 actor)) (t2-1 (-> t1-3 extra trans)) ) - (if (and (= (the float (the int (-> t2-1 x))) arg0) - (= (the float (the int (-> t2-1 y))) arg1) - (= (the float (the int (-> t2-1 z))) arg2) - ) + (if (and + (= (the float (the int (-> t2-1 x))) arg0) + (= (the float (the int (-> t2-1 y))) arg1) + (= (the float (the int (-> t2-1 z))) arg2) + ) (return t1-3) ) ) @@ -271,18 +267,18 @@ (let ((s2-0 (-> s3-0 bsp level entity))) (dotimes (s1-0 (-> s2-0 length)) (let ((v1-9 (-> s2-0 data s1-0 entity))) - (case arg0 - (('vis) - (if (is-object-visible? s3-0 (-> v1-9 extra vis-id)) - (+! gp-0 1) - ) + (case arg0 + (('vis) + (if (is-object-visible? s3-0 (-> v1-9 extra vis-id)) + (+! gp-0 1) ) - (else - (if (-> v1-9 extra process) - (+! gp-0 1) - ) + ) + (else + (if (-> v1-9 extra process) + (+! gp-0 1) ) - ) + ) + ) ) ) ) @@ -326,15 +322,11 @@ ) (if a0-2 ;; if we found an entity, modify its res. - (add-data! a0-2 - (new 'static 'res-tag - :name 'name - :key-frame -1000000000.0 - :elt-count #x1 - :elt-type string - ) - (the-as pointer (car s5-0)) - ) + (add-data! + a0-2 + (new 'static 'res-tag :name 'name :key-frame -1000000000.0 :elt-count #x1 :elt-type string) + (the-as pointer (car s5-0)) + ) ) ) (set! arg0 (cdr arg0)) @@ -402,68 +394,30 @@ (defmethod print process ((obj process)) "Fancier print for process that can also print status of process drawables." - (format #t "#<~A ~S ~A :state ~S :flags " - (-> obj type) - (-> obj name) - (-> obj status) - (if (-> obj state) - (-> obj state name) - ) + (format #t "#<~A ~S ~A :state ~S :flags " (-> obj type) (-> obj name) (-> obj status) (if (-> obj state) + (-> obj state name) + ) ) (process-status-bits obj #t) (format #t " :stack ~D/~D :heap ~D/~D @ #x~X>" (&- (-> obj top-thread stack-top) (the-as uint (-> obj top-thread sp))) (-> obj main-thread stack-size) - (- - (-> obj allocated-length) - (&- (-> obj heap-top) (the-as uint (-> obj heap-cur))) - ) + (- (-> obj allocated-length) (&- (-> obj heap-top) (the-as uint (-> obj heap-cur)))) (-> obj allocated-length) obj ) obj ) -(defmethod inspect entity ((obj entity)) - ((the-as (function entity entity) (find-parent-method entity 3)) obj) - (format #t "~Ttrans: ~`vector`P~%" (-> obj trans)) - (format #t "~Taid: ~A~%" (-> obj aid)) ;; probably a bad idea to print this with ~A... - obj - ) -(defmethod inspect entity-actor ((obj entity-actor)) - ((the-as (function entity-actor entity-actor) (find-parent-method entity-actor 3)) obj) - (format #t "~Tnav-mesh: ~A~%" (-> obj nav-mesh)) - (format #t "~Tetype: ~A~%" (-> obj etype)) - (format #t "~Ttask: ~d~%" (-> obj task)) - (format #t "~Tvis-id: ~d~%" (-> obj vis-id-signed)) - (format #t "~Tquat: ~`vector`P~%" (-> obj quat)) - obj - ) (defmethod debug-print entity-actor ((obj entity-actor) (mode symbol) (expected-type type)) "Debug print info about an entity-actor. This is designed to generate rows for the table printed by method debug-print-entities of level-group." (let ((s4-0 (-> obj etype))) - (when (or (not expected-type) - (and s4-0 (valid? s4-0 type #f #f 0) (type-type? s4-0 expected-type)) - ) - - ;; print vis id, addr, name. - (format #t "~5D #x~8X ~-21S" - (-> obj extra vis-id) - obj - (res-lump-struct obj 'name object) - ) - - ;; I have no idea what could have generated this. - (let ((t9-4 format) - (a0-5 #t) - (a1-5 "~8D ~3D ~-4S #x~4X") - (a2-4 (-> obj extra perm aid)) - (a3-3 (-> obj extra perm task)) - (t0-3 (-> obj extra level nickname)) - ) + (when (or (not expected-type) (and s4-0 (valid? s4-0 type #f #f 0) (type-type? s4-0 expected-type))) + (format #t "~5D #x~8X ~-21S" (-> obj extra vis-id) obj (res-lump-struct obj 'name structure)) + (let ((t0-3 (-> obj extra level nickname))) (set! t0-3 (cond (t0-3 t0-3 @@ -473,21 +427,13 @@ ) ) ) - (format a0-5 a1-5 a2-4 a3-3 t0-3 (-> obj extra perm status)) + (format #t "~8D ~3D ~-4S #x~4X" (-> obj extra perm aid) (-> obj extra perm task) t0-3 (-> obj extra perm status)) ) ;; location (if (= mode 'entity-meters) - (format #t " :trans ~14m ~14m ~14m " - (-> obj extra trans x) - (-> obj extra trans y) - (-> obj extra trans z) - ) - (format #t " :trans ~14f ~14f ~14f " - (-> obj extra trans x) - (-> obj extra trans y) - (-> obj extra trans z) - ) + (format #t " :trans ~14m ~14m ~14m " (-> obj extra trans x) (-> obj extra trans y) (-> obj extra trans z)) + (format #t " :trans ~14f ~14f ~14f " (-> obj extra trans x) (-> obj extra trans y) (-> obj extra trans z)) ) ;; if we have an associated process, print info. @@ -497,33 +443,32 @@ ) ) ) - (format #t ":pr #x~8X ~-12S ~-21S ~-5S/~-5S " (if (-> obj extra process) - (-> obj extra process) - 0 - ) - (if (-> obj extra process) - (-> obj extra process name) - "" - ) - (if (and (-> obj extra process) (-> obj extra process state)) - (-> obj extra process state name) - "" - ) - (if (-> obj extra process) - (* (- (-> obj extra process allocated-length) - (&- (-> obj extra process heap-top) - (the-as uint (-> obj extra process heap-cur)) - ) - ) - 8 - ) - "" - ) - (if (-> obj extra process) - (* (-> obj extra process allocated-length) 8) - "" - ) - ) + (format #t ":pr #x~8X ~-12S ~-21S ~-5S/~-5S " + (if (-> obj extra process) + (-> obj extra process) + 0 + ) + (if (-> obj extra process) + (-> obj extra process name) + "" + ) + (if (and (-> obj extra process) (-> obj extra process state)) + (-> obj extra process state name) + "" + ) + (if (-> obj extra process) + (* (- (-> obj extra process allocated-length) + (&- (-> obj extra process heap-top) (the-as uint (-> obj extra process heap-cur))) + ) + 8 + ) + "" + ) + (if (-> obj extra process) + (* (-> obj extra process allocated-length) 8) + "" + ) + ) (process-status-bits s4-2 #t) ) (format #t "~%") @@ -543,25 +488,25 @@ 'entity-perm: also print entity-perm values." ;; no way this fit on their screen back in ~2000. - (format #t " id address name aid tsk lev status x y z address name state heap flags~%") + (format #t " id address name aid tsk lev status x y z address name state heap flags~%" 0 0 0) (dotimes (s3-0 (-> obj length)) (let ((s2-0 (-> obj level s3-0))) (when (= (-> s2-0 status) 'active) - (case mode - (('art-group) - (format #t "level ~A~%" (-> s2-0 name)) - (dotimes (s1-0 (-> s2-0 art-group art-group-array length)) - (format #t "~T~2D ~S~%"s1-0 (-> s2-0 art-group art-group-array s1-0 name)) - ) - ) - (else - (let ((s2-1 (-> s2-0 bsp level entity))) - (dotimes (s1-1 (-> s2-1 length)) - (debug-print (the-as entity-actor (-> s2-1 data s1-1 entity)) mode expected-type) - ) - ) + (case mode + (('art-group) + (format #t "level ~A~%" (-> s2-0 name)) + (dotimes (s1-0 (-> s2-0 art-group art-group-array length)) + (format #t "~T~2D ~S~%" s1-0 (-> s2-0 art-group art-group-array s1-0 name)) + ) + ) + (else + (let ((s2-1 (-> s2-0 bsp level entity))) + (dotimes (s1-1 (-> s2-1 length)) + (debug-print (the-as entity-actor (-> s2-1 data s1-1 entity)) mode expected-type) ) ) + ) + ) ) ) ) @@ -616,12 +561,8 @@ (set! (-> obj extra level) lev) (cond ((= (-> obj type) entity-actor) - (set! (-> (the-as entity-actor obj) extra perm task) - (the-as game-task (-> (the-as entity-actor obj) task)) - ) - (set! (-> (the-as entity-actor obj) extra vis-id) - (-> (the-as entity-actor obj) vis-id-signed) - ) + (set! (-> (the-as entity-actor obj) extra perm task) (-> (the-as entity-actor obj) task)) + (set! (-> (the-as entity-actor obj) extra vis-id) (-> (the-as entity-actor obj) vis-id-signed)) ) (else (set! (-> obj extra perm task) (game-task none)) @@ -635,19 +576,19 @@ (defmethod remove-from-level! entity ((obj entity) (arg0 level-group)) "Remove us from the level." (let ((v1-0 (-> obj extra))) - (cond - ((= (-> v1-0 next-link) v1-0) - (set! (-> arg0 entity-link) #f) - ) - (else - (set! (-> v1-0 next-link prev-link) (-> v1-0 prev-link)) - (set! (-> v1-0 prev-link next-link) (-> v1-0 next-link)) - (if (= (-> arg0 entity-link) v1-0) - (set! (-> arg0 entity-link) (-> v1-0 prev-link)) + (cond + ((= (-> v1-0 next-link) v1-0) + (set! (-> arg0 entity-link) #f) + ) + (else + (set! (-> v1-0 next-link prev-link) (-> v1-0 prev-link)) + (set! (-> v1-0 prev-link next-link) (-> v1-0 next-link)) + (if (= (-> arg0 entity-link) v1-0) + (set! (-> arg0 entity-link) (-> v1-0 prev-link)) + ) + ) ) - ) ) - ) obj ) @@ -694,18 +635,7 @@ (let ((s4-0 (-> v1-3 bsp level entity))) (dotimes (s3-0 (-> s4-0 length)) (let* ((s0-0 (-> s4-0 data s3-0 entity)) - (v0-0 (the-as (inline-array vector) - ((method-of-type res-lump get-property-data) - s0-0 - 'visvol - 'interp - -1000000000.0 - (the-as pointer #f) - (the-as (pointer res-tag) #f) - *res-static-buf* - ) - ) - ) + (v0-0 (res-lump-data s0-0 'visvol (inline-array vector))) (s2-0 (-> v0-0 0)) (s1-0 (-> v0-0 1)) ) @@ -771,7 +701,6 @@ (s1-0 (-> v0-0 0)) (s2-0 (-> v0-0 1)) ) - ;; (let ((s0-0 (-> sv-32 extra trans))) ;; sometimes the nav-mesh may be in a different actor, I guess. @@ -784,15 +713,9 @@ ) (cond - ((and (type-type? (-> sv-16 type) entity-actor) - (nonzero? (-> (the-as entity-actor sv-16) nav-mesh)) - ) + ((and (type-type? (-> sv-16 type) entity-actor) (nonzero? (-> (the-as entity-actor sv-16) nav-mesh))) ;; we got a nav-mesh! compute the bounding box - (compute-bounding-box - (-> (the-as entity-actor sv-16) nav-mesh) - s1-0 - s2-0 - ) + (compute-bounding-box (-> (the-as entity-actor sv-16) nav-mesh) s1-0 s2-0) ) (else ;; no nav-mesh found, just use the default position @@ -823,23 +746,17 @@ (none) ) -(declare-type money basic) -(declare-type crate basic) -(declare-type springbox basic) -(declare-type fuel-cell basic) +(define-extern money type) +(define-extern crate type) +(define-extern springbox type) +(define-extern fuel-cell type) (defmethod print-volume-sizes level-group ((obj level-group)) "Loop through all entities and print their visibility. Excludes crate, fuel-cell and springbox." - (local-vars - (sv-16 type) - (sv-32 (function _varargs_ object)) - (sv-48 symbol) - (sv-64 string) - (sv-80 entity) - ) + (local-vars (sv-16 type) (sv-32 (function _varargs_ object)) (sv-48 symbol) (sv-64 string) (sv-80 entity)) (dotimes (s5-0 (-> obj length)) (let ((v1-3 (-> obj level s5-0))) (when (= (-> v1-3 status) 'active) @@ -913,493 +830,372 @@ (defmethod debug-draw-actors level-group ((obj level-group) (arg0 symbol)) (local-vars - (sv-48 (function symbol bucket-id string vector font-color vector2h symbol)) - (sv-64 symbol) - (sv-80 int) - (sv-96 (function symbol bucket-id string vector font-color vector2h symbol)) - (sv-112 symbol) - (sv-128 int) - (sv-144 (function _varargs_ object)) - (sv-160 string) - (sv-176 string) - (sv-192 (function symbol bucket-id string vector font-color vector2h symbol)) - (sv-208 symbol) - (sv-224 int) - (sv-240 (function symbol bucket-id vector vector rgba symbol)) - (sv-256 symbol) - (sv-272 int) - (sv-288 pointer) - (sv-304 pointer) - ) - (when - (and arg0 (not (or (= *master-mode* 'menu) (= *master-mode* 'progress)))) - (dotimes (s4-0 (-> obj length)) - (let ((v1-8 (-> obj level s4-0))) - (when (= (-> v1-8 status) 'active) - (let ((s3-0 (-> v1-8 bsp level entity))) - (dotimes (s2-0 (-> s3-0 length)) - (let* ((s0-0 (-> s3-0 data s2-0 entity)) - (s1-0 (-> s0-0 extra trans)) - ) - (cond - ((and - (= arg0 'process) - (-> s0-0 extra process) - (type-type? (-> s0-0 extra process type) process-drawable) - ) - (let ((s1-1 (the-as process-drawable (-> s0-0 extra process)))) - (add-debug-x - #t - (bucket-id debug-draw1) - (-> s1-1 root trans) - (new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80) - ) - (set! sv-48 add-debug-text-3d) - (set! sv-64 #t) - (set! sv-80 68) - (let ((a2-2 (res-lump-struct s0-0 'name structure)) - (a3-2 (-> s1-1 root trans)) - (t0-1 1) - (t1-1 (new 'static 'vector2h :y 8)) - ) - (sv-48 - sv-64 - (the-as bucket-id sv-80) - (the-as string a2-2) - a3-2 - (the-as font-color t0-1) - t1-1 - ) - ) - (add-debug-text-3d - #t - (bucket-id debug-draw1) - (symbol->string (-> s1-1 state name)) - (-> s1-1 root trans) - (font-color white) - (new 'static 'vector2h :y 16) - ) - (let - ((s0-1 - (res-lump-data - (-> s1-1 entity) - 'eco-info - (pointer int32) - :time - 0.0 - ) - ) - ) - (when s0-1 - (set! sv-96 add-debug-text-3d) - (set! sv-112 #t) - (set! sv-128 68) - (set! sv-144 format) - (set! sv-160 (clear *temp-string*)) - (set! sv-176 "~S ~D~%") - (let - ((a2-7 (pickup-type->string (the-as pickup-type (-> s0-1 0)))) - (a3-5 (-> s0-1 1)) - ) - (sv-144 sv-160 sv-176 a2-7 a3-5) - ) - (let ((a2-8 *temp-string*) - (a3-6 (-> s1-1 root trans)) - (t0-4 1) - (t1-4 (new 'static 'vector2h :y 24)) - ) - (sv-96 - sv-112 - (the-as bucket-id sv-128) - a2-8 - a3-6 - (the-as font-color t0-4) - t1-4 - ) - ) - ) - ) - (let ((v0-10 (res-lump-struct (-> s1-1 entity) 'art-name symbol))) - (if (and v0-10 (= (-> v0-10 type) symbol)) - (add-debug-text-3d - #t - (bucket-id debug-draw1) - (symbol->string v0-10) - (-> s1-1 root trans) - (font-color white) - (new 'static 'vector2h :y 24) - ) - ) - ) - ) - ) - ((or (= arg0 'full) (-> s0-0 extra process)) - (add-debug-x - #t - (bucket-id debug-draw1) - s1-0 - (the-as rgba (if (-> s0-0 extra process) - (the-as uint #x8080ff80) - (the-as uint #x800000ff) - ) - ) - ) - (set! sv-192 add-debug-text-3d) - (set! sv-208 #t) - (set! sv-224 68) - (let ((a2-13 (res-lump-struct s0-0 'name structure)) - (t0-8 - (if - (logtest? - (-> s0-0 extra perm status) - (entity-perm-status bit-0 bit-1) - ) - 1 - 5 - ) - ) - (t1-8 (new 'static 'vector2h :y 8)) - ) - (sv-192 - sv-208 - (the-as bucket-id sv-224) - (the-as string a2-13) - s1-0 - (the-as font-color t0-8) - t1-8 - ) - ) - ) - ) - ) - ) - ) - ) - ) + (sv-48 (function symbol bucket-id string vector font-color vector2h symbol)) + (sv-64 symbol) + (sv-80 int) + (sv-96 (function symbol bucket-id string vector font-color vector2h symbol)) + (sv-112 symbol) + (sv-128 int) + (sv-144 (function _varargs_ object)) + (sv-160 string) + (sv-176 string) + (sv-192 (function symbol bucket-id string vector font-color vector2h symbol)) + (sv-208 symbol) + (sv-224 int) + (sv-240 (function symbol bucket-id vector vector rgba symbol)) + (sv-256 symbol) + (sv-272 int) + (sv-288 pointer) + (sv-304 pointer) ) - ) - (when - (and - *display-actor-vis* - (not (or *display-actor-anim* *display-process-anim*)) - ) - (let ((s5-1 *display-actor-vis*)) - (dotimes (s4-1 (-> obj length)) - (let ((s3-1 (-> obj level s4-1))) - (when (= (-> s3-1 status) 'active) - (let ((s2-1 (-> s3-1 bsp level entity))) - (dotimes (s1-2 (-> s2-1 length)) - (let ((s0-2 (-> s2-1 data s1-2 entity))) - (let ((v0-15 (res-lump-data s0-2 'visvol pointer)) - (a1-16 (-> s0-2 extra vis-id)) - ) - (when (and v0-15 (or (= s5-1 #t) (= s5-1 'box))) - (set! sv-240 add-debug-box) - (set! sv-256 #t) - (set! sv-272 68) - (set! sv-288 (&+ v0-15 0)) - (set! sv-304 (&+ v0-15 16)) - (let ((t0-10 (if (is-object-visible? s3-1 a1-16) - (the-as uint #x80808000) - (the-as uint #x80800080) - ) - ) - ) - (sv-240 - sv-256 - (the-as bucket-id sv-272) - (the-as vector sv-288) - (the-as vector sv-304) - (the-as rgba t0-10) - ) - ) - ) - ) - (when (or (= s5-1 #t) (= s5-1 'sphere)) - (let ((s0-3 (-> s0-2 extra process))) - (when s0-3 - (when - (and - (type-type? (-> s0-3 type) process-drawable) - (nonzero? (-> (the-as process-drawable s0-3) draw)) - ) - (add-debug-x - #t - (bucket-id debug-draw1) - (-> (the-as process-drawable s0-3) root trans) - (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) - ) - (add-debug-sphere - #t - (bucket-id debug-draw0) - (vector+! - (new 'stack-no-clear 'vector) - (-> (the-as process-drawable s0-3) draw origin) - (-> (the-as process-drawable s0-3) draw bounds) - ) - (-> (the-as process-drawable s0-3) draw bounds w) - (new 'static 'rgba :r #x80 :a #x80) - ) - ) - ) - ) - ) - ) - ) - ) - ) - ) - ) - ) - ) - (if *generate-actor-vis* - (update-vis-volumes obj) - ) - (when (or *display-actor-anim* *display-process-anim*) - (let ((s5-2 (ppointer->process *display-process-anim*))) - (if (not s5-2) - (set! s5-2 (process-by-name *display-actor-anim* *active-pool*)) - ) - (when (and s5-2 (type-type? (-> s5-2 type) process-drawable)) - (let ((s3-2 (-> (the-as process-drawable s5-2) entity)) - (s4-2 (-> (the-as process-drawable s5-2) root trans)) - ) - (when s3-2 - (add-debug-x - #t - (bucket-id debug-draw1) - s4-2 - (the-as rgba (if (-> s3-2 extra process) - (the-as uint #x8080ff80) - (the-as uint #x800000ff) - ) - ) - ) - (add-debug-text-3d - #t - (bucket-id debug-draw1) - (res-lump-struct s3-2 'name string) - s4-2 - (the-as - font-color - (if - (logtest? - (-> s3-2 extra perm status) - (entity-perm-status bit-0 bit-1) - ) - 1 - 1 - ) - ) - (new 'static 'vector2h :y 8) - ) - (add-debug-text-3d - #t - (bucket-id debug-draw1) - (symbol->string (-> (the-as process-drawable s5-2) state name)) - s4-2 - (font-color white) - (new 'static 'vector2h :y 16) - ) - ) - ) - (if (nonzero? (-> (the-as process-drawable s5-2) skel)) - (dummy-10 - (-> (the-as process-drawable s5-2) skel) - (the-as symbol *stdcon*) - ) - ) - (if (nonzero? (-> (the-as process-drawable s5-2) nav)) - (dummy-9 (-> (the-as process-drawable s5-2) nav)) - ) - (if (nonzero? (-> (the-as process-drawable s5-2) path)) - (dummy-9 (-> (the-as process-drawable s5-2) path)) - ) - (if (nonzero? (-> (the-as process-drawable s5-2) vol)) - (dummy-9 (-> (the-as process-drawable s5-2) vol)) - ) - ) - (if - (and - (the-as process-drawable s5-2) - (type-type? (-> (the-as process-drawable s5-2) type) process-drawable) - (nonzero? (-> (the-as process-drawable s5-2) draw)) - *display-actor-vis* - ) - (add-debug-sphere - #t - (bucket-id debug-draw0) - (vector+! - (new 'stack-no-clear 'vector) - (-> (the-as process-drawable s5-2) draw origin) - (-> (the-as process-drawable s5-2) draw bounds) - ) - (-> (the-as process-drawable s5-2) draw bounds w) - (new 'static 'rgba :r #x80 :a #x80) - ) - ) - ) - (when (and *display-actor-vis* *display-actor-anim*) - (let ((s5-3 (entity-by-name (the-as string *display-actor-anim*)))) - (when s5-3 - (let ((v0-35 (res-lump-data s5-3 'visvol pointer)) - (a1-31 (-> s5-3 extra vis-id)) - ) - (if v0-35 - (add-debug-box - #t - (bucket-id debug-draw1) - (the-as vector (&+ v0-35 0)) - (the-as vector (&+ v0-35 16)) - (the-as rgba (if (is-object-visible? (-> s5-3 extra level) a1-31) - (the-as uint #x80808000) - (the-as uint #x80800080) + (when (and arg0 (not (or (= *master-mode* 'menu) (= *master-mode* 'progress)))) + (dotimes (s4-0 (-> obj length)) + (let ((v1-8 (-> obj level s4-0))) + (when (= (-> v1-8 status) 'active) + (let ((s3-0 (-> v1-8 bsp level entity))) + (dotimes (s2-0 (-> s3-0 length)) + (let* ((s0-0 (-> s3-0 data s2-0 entity)) + (s1-0 (-> s0-0 extra trans)) + ) + (cond + ((and (= arg0 'process) (-> s0-0 extra process) (type-type? (-> s0-0 extra process type) process-drawable)) + (let ((s1-1 (the-as process-drawable (-> s0-0 extra process)))) + (add-debug-x + #t + (bucket-id debug-draw1) + (-> s1-1 root trans) + (new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80) ) + (set! sv-48 add-debug-text-3d) + (set! sv-64 #t) + (set! sv-80 68) + (let ((a2-2 (res-lump-struct s0-0 'name structure)) + (a3-2 (-> s1-1 root trans)) + (t0-1 1) + (t1-1 (new 'static 'vector2h :y 8)) + ) + (sv-48 sv-64 (the-as bucket-id sv-80) (the-as string a2-2) a3-2 (the-as font-color t0-1) t1-1) + ) + (add-debug-text-3d + #t + (bucket-id debug-draw1) + (symbol->string (-> s1-1 state name)) + (-> s1-1 root trans) + (font-color white) + (new 'static 'vector2h :y 16) + ) + (let ((s0-1 (res-lump-data (-> s1-1 entity) 'eco-info (pointer int32) :time 0.0))) + (when s0-1 + (set! sv-96 add-debug-text-3d) + (set! sv-112 #t) + (set! sv-128 68) + (set! sv-144 format) + (set! sv-160 (clear *temp-string*)) + (set! sv-176 "~S ~D~%") + (let ((a2-7 (pickup-type->string (the-as pickup-type (-> s0-1 0)))) + (a3-5 (-> s0-1 1)) + ) + (sv-144 sv-160 sv-176 a2-7 a3-5) + ) + (let ((a2-8 *temp-string*) + (a3-6 (-> s1-1 root trans)) + (t0-4 1) + (t1-4 (new 'static 'vector2h :y 24)) + ) + (sv-96 sv-112 (the-as bucket-id sv-128) a2-8 a3-6 (the-as font-color t0-4) t1-4) + ) + ) + ) + (let ((v0-10 (res-lump-struct (-> s1-1 entity) 'art-name symbol))) + (if (and (the-as structure v0-10) (= (-> v0-10 type) symbol)) + (add-debug-text-3d + #t + (bucket-id debug-draw1) + (symbol->string v0-10) + (-> s1-1 root trans) + (font-color white) + (new 'static 'vector2h :y 24) + ) + ) + ) + ) + ) + ((or (= arg0 'full) (-> s0-0 extra process)) + (add-debug-x #t (bucket-id debug-draw1) s1-0 (the-as rgba (if (-> s0-0 extra process) + (the-as uint #x8080ff80) + (the-as uint #x800000ff) + ) + ) + ) + (set! sv-192 add-debug-text-3d) + (set! sv-208 #t) + (set! sv-224 68) + (let ((a2-13 (res-lump-struct s0-0 'name structure)) + (t0-8 (if (logtest? (-> s0-0 extra perm status) (entity-perm-status bit-0 bit-1)) + 1 + 5 + ) + ) + (t1-8 (new 'static 'vector2h :y 8)) + ) + (sv-192 sv-208 (the-as bucket-id sv-224) (the-as string a2-13) s1-0 (the-as font-color t0-8) t1-8) + ) + ) + ) + ) + ) + ) ) - ) ) - ) ) - ) ) - ) - (if - (and - (or *display-nav-marks* *display-path-marks* *display-vol-marks*) - (not (or *display-actor-anim* *display-process-anim*)) - ) - (iterate-process-tree - *active-pool* - (the-as (function object object) (lambda ((arg0 process-drawable)) - (when - (type-type? - (-> arg0 type) - process-drawable - ) - (if (nonzero? (-> arg0 nav)) - (dummy-9 (-> arg0 nav)) - ) - (if (nonzero? (-> arg0 path)) - (dummy-9 (-> arg0 path)) - ) - (if (nonzero? (-> arg0 vol)) - (dummy-9 (-> arg0 vol)) - ) - ) - (none) - ) - ) - *null-kernel-context* - ) - ) - (when - (and - *display-actor-graph* - (not (or (= *master-mode* 'menu) (= *master-mode* 'progress))) - ) - #| this doesnt really do anything - (if (not (paused?)) - (float-save-timeplot - (if - (< (the int (the float (mod (-> *display* base-frame-counter) 600))) 300) - 1.0 - 0.0 - ) - ) - ) - (camera-plot-float-func - 0.0 - 399.0 - -81920.0 - 81920.0 - float-lookup-redline - (new 'static 'vector4w :x #xff :w #x80) - ) - (camera-plot-float-func - 0.0 - 399.0 - -81920.0 - 81920.0 - float-lookup-blueline - (new 'static 'vector4w :z #xff :w #x80) - ) - (camera-plot-float-func - 0.0 - 399.0 - -81920.0 - 81920.0 - float-lookup-greenline - (new 'static 'vector4w :y #xff :w #x80) - ) - (camera-plot-float-func - 0.0 - 399.0 - 0.0 - 409600.0 - float-lookup-yellowline - (new 'static 'vector4w :x #xff :y #xff :w #x80) - ) - (camera-plot-float-func - 0.0 - 399.0 - 0.0 - 1.0 - float-lookup-timeplot - (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80) - ) - |# - ) - (when *display-split-boxes* - (dotimes (s5-4 (-> obj length)) - (let ((s4-4 (-> obj level s5-4))) - (when (= (-> s4-4 status) 'active) - (when (nonzero? (-> s4-4 bsp boxes)) - (let ((s3-4 (-> s4-4 bsp boxes))) - (countdown (s2-4 (-> s3-4 length)) - (add-debug-box - #t - (bucket-id debug-draw0) - (the-as vector (-> s3-4 data s2-4)) - (the-as vector (+ (the-as uint (-> s3-4 data 0 max)) (* s2-4 32))) - (the-as rgba (if (zero? (-> s4-4 index)) - (the-as uint #x80808000) - (the-as uint #x808080ff) + (when (and *display-actor-vis* (not (or *display-actor-anim* *display-process-anim*))) + (let ((s5-1 *display-actor-vis*)) + (dotimes (s4-1 (-> obj length)) + (let ((s3-1 (-> obj level s4-1))) + (when (= (-> s3-1 status) 'active) + (let ((s2-1 (-> s3-1 bsp level entity))) + (dotimes (s1-2 (-> s2-1 length)) + (let ((s0-2 (-> s2-1 data s1-2 entity))) + (let ((v0-15 (res-lump-data s0-2 'visvol pointer)) + (a1-16 (-> s0-2 extra vis-id)) ) - ) + (when (and v0-15 (or (= s5-1 #t) (= s5-1 'box))) + (set! sv-240 add-debug-box) + (set! sv-256 #t) + (set! sv-272 68) + (set! sv-288 (&+ v0-15 0)) + (set! sv-304 (&+ v0-15 16)) + (let ((t0-10 (if (is-object-visible? s3-1 a1-16) + (the-as uint #x80808000) + (the-as uint #x80800080) + ) + ) + ) + (sv-240 sv-256 (the-as bucket-id sv-272) (the-as vector sv-288) (the-as vector sv-304) (the-as rgba t0-10)) + ) + ) + ) + (when (or (= s5-1 #t) (= s5-1 'sphere)) + (let ((s0-3 (-> s0-2 extra process))) + (when s0-3 + (when (and (type-type? (-> s0-3 type) process-drawable) (nonzero? (-> (the-as process-drawable s0-3) draw))) + (add-debug-x + #t + (bucket-id debug-draw1) + (-> (the-as process-drawable s0-3) root trans) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + ) + (add-debug-sphere + #t + (bucket-id debug-draw0) + (vector+! + (new 'stack-no-clear 'vector) + (-> (the-as process-drawable s0-3) draw origin) + (-> (the-as process-drawable s0-3) draw bounds) + ) + (-> (the-as process-drawable s0-3) draw bounds w) + (new 'static 'rgba :r #x80 :a #x80) + ) + ) + ) + ) + ) + ) + ) + ) + ) ) - ) ) - ) ) - ) ) - ) - (when - (or - *display-ambient-hint-marks* - *display-ambient-sound-marks* - *display-ambient-poi-marks* - *display-ambient-light-marks* - *display-ambient-dark-marks* - *display-ambient-weather-off-marks* - *display-ambient-ocean-off-marks* - *display-ambient-ocean-near-off-marks* - *display-ambient-music-marks* - ) - (dotimes (s5-5 (-> obj length)) - (let ((v1-214 (-> obj level s5-5))) - (when (= (-> v1-214 status) 'active) - (let ((s4-5 (-> v1-214 bsp ambients))) - (when (nonzero? s4-5) - (dotimes (s3-5 (-> s4-5 length)) - (draw-debug (-> s4-5 data s3-5 ambient)) - ) + (if *generate-actor-vis* + (update-vis-volumes obj) + ) + (when (or *display-actor-anim* *display-process-anim*) + (let ((s5-2 (ppointer->process *display-process-anim*))) + (if (not s5-2) + (set! s5-2 (process-by-name *display-actor-anim* *active-pool*)) + ) + (when (and s5-2 (type-type? (-> s5-2 type) process-drawable)) + (let ((s3-2 (-> (the-as process-drawable s5-2) entity)) + (s4-2 (-> (the-as process-drawable s5-2) root trans)) + ) + (when s3-2 + (add-debug-x #t (bucket-id debug-draw1) s4-2 (the-as rgba (if (-> s3-2 extra process) + (the-as uint #x8080ff80) + (the-as uint #x800000ff) + ) + ) + ) + (add-debug-text-3d + #t + (bucket-id debug-draw1) + (res-lump-struct s3-2 'name string) + s4-2 + (the-as font-color (if (logtest? (-> s3-2 extra perm status) (entity-perm-status bit-0 bit-1)) + 1 + 1 + ) + ) + (new 'static 'vector2h :y 8) + ) + (add-debug-text-3d + #t + (bucket-id debug-draw1) + (symbol->string (-> (the-as process-drawable s5-2) state name)) + s4-2 + (font-color white) + (new 'static 'vector2h :y 16) + ) + ) + ) + (if (nonzero? (-> (the-as process-drawable s5-2) skel)) + (dummy-10 (-> (the-as process-drawable s5-2) skel) (the-as symbol *stdcon*)) + ) + (if (nonzero? (-> (the-as process-drawable s5-2) nav)) + (dummy-9 (-> (the-as process-drawable s5-2) nav)) + ) + (if (nonzero? (-> (the-as process-drawable s5-2) path)) + (dummy-9 (-> (the-as process-drawable s5-2) path)) + ) + (if (nonzero? (-> (the-as process-drawable s5-2) vol)) + (dummy-9 (-> (the-as process-drawable s5-2) vol)) + ) + ) + (if (and + (the-as process-drawable s5-2) + (type-type? (-> (the-as process-drawable s5-2) type) process-drawable) + (nonzero? (-> (the-as process-drawable s5-2) draw)) + *display-actor-vis* + ) + (add-debug-sphere + #t + (bucket-id debug-draw0) + (vector+! + (new 'stack-no-clear 'vector) + (-> (the-as process-drawable s5-2) draw origin) + (-> (the-as process-drawable s5-2) draw bounds) + ) + (-> (the-as process-drawable s5-2) draw bounds w) + (new 'static 'rgba :r #x80 :a #x80) + ) + ) + ) + (when (and *display-actor-vis* *display-actor-anim*) + (let ((s5-3 (entity-by-name (the-as string *display-actor-anim*)))) + (when s5-3 + (let ((v0-35 (res-lump-data s5-3 'visvol pointer)) + (a1-31 (-> s5-3 extra vis-id)) + ) + (if v0-35 + (add-debug-box + #t + (bucket-id debug-draw1) + (the-as vector (&+ v0-35 0)) + (the-as vector (&+ v0-35 16)) + (the-as rgba (if (is-object-visible? (-> s5-3 extra level) a1-31) + (the-as uint #x80808000) + (the-as uint #x80800080) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (if (and + (or *display-nav-marks* *display-path-marks* *display-vol-marks*) + (not (or *display-actor-anim* *display-process-anim*)) + ) + (iterate-process-tree + *active-pool* + (the-as (function object object) (lambda ((arg0 process-drawable)) + (when (type-type? (-> arg0 type) process-drawable) + (if (nonzero? (-> arg0 nav)) + (dummy-9 (-> arg0 nav)) + ) + (if (nonzero? (-> arg0 path)) + (dummy-9 (-> arg0 path)) + ) + (if (nonzero? (-> arg0 vol)) + (dummy-9 (-> arg0 vol)) + ) + ) + (none) + ) + ) + *null-kernel-context* + ) + ) + #| This is where the "actor graph" is drawn, but the plot functions don't do anything. + (when (and *display-actor-graph* (not (or (= *master-mode* 'menu) (= *master-mode* 'progress)))) + (if (not (paused?)) + (float-save-timeplot (if (< (the int (the float (mod (-> *display* base-frame-counter) 600))) 300) + 1.0 + 0.0 + ) + ) + ) + (camera-plot-float-func 0.0 399.0 -81920.0 81920.0 float-lookup-redline (new 'static 'vector4w :x #xff :w #x80)) + (camera-plot-float-func 0.0 399.0 -81920.0 81920.0 float-lookup-blueline (new 'static 'vector4w :z #xff :w #x80)) + (camera-plot-float-func 0.0 399.0 -81920.0 81920.0 float-lookup-greenline (new 'static 'vector4w :y #xff :w #x80)) + (camera-plot-float-func 0.0 399.0 0.0 409600.0 float-lookup-yellowline (new 'static 'vector4w :x #xff :y #xff :w #x80)) + (camera-plot-float-func 0.0 399.0 0.0 1.0 float-lookup-timeplot (new 'static 'vector4w :x #x80 :y #x80 :z #x80 :w #x80)) + ) + |# + (when *display-split-boxes* + (dotimes (s5-4 (-> obj length)) + (let ((s4-4 (-> obj level s5-4))) + (when (= (-> s4-4 status) 'active) + (when (nonzero? (-> s4-4 bsp boxes)) + (let ((s3-4 (-> s4-4 bsp boxes))) + (countdown (s2-4 (-> s3-4 length)) + (add-debug-box + #t + (bucket-id debug-draw0) + (the-as vector (-> s3-4 data s2-4)) + (the-as vector (+ (the-as uint (-> s3-4 data 0 max)) (* s2-4 32))) + (the-as rgba (if (zero? (-> s4-4 index)) + (the-as uint #x80808000) + (the-as uint #x808080ff) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (when (or + *display-ambient-hint-marks* + *display-ambient-sound-marks* + *display-ambient-poi-marks* + *display-ambient-light-marks* + *display-ambient-dark-marks* + *display-ambient-weather-off-marks* + *display-ambient-ocean-off-marks* + *display-ambient-ocean-near-off-marks* + *display-ambient-music-marks* + ) + (dotimes (s5-5 (-> obj length)) + (let ((v1-214 (-> obj level s5-5))) + (when (= (-> v1-214 status) 'active) + (let ((s4-5 (-> v1-214 bsp ambients))) + (when (nonzero? s4-5) + (dotimes (s3-5 (-> s4-5 length)) + (draw-debug (-> s4-5 data s3-5 ambient)) + ) + ) + ) + ) ) - ) ) - ) ) - ) 0 (none) ) @@ -1413,7 +1209,6 @@ obj ) -;; definition for method 23 of type entity-camera (defmethod kill! entity-camera ((obj entity-camera)) (remove-by-param1 *camera-engine* obj) obj @@ -1455,10 +1250,9 @@ ;; TODO (define-extern birth-viewer (function process entity object)) -(declare-type collectable process-drawable) -(declare-type ecovalve basic) -(declare-type eco-collectable process-drawable) -(declare-type eco eco-collectable) +(define-extern collectable type) +(define-extern ecovalve type) +(define-extern eco type) (defmethod birth! entity-actor ((obj entity-actor)) "Create a process for this entity and start it." @@ -1478,14 +1272,10 @@ (let* ((entity-type (-> obj etype)) (info (entity-info-lookup entity-type)) - (entity-process (get-process *default-dead-pool* entity-type - (if info - (-> - info - heap-size - ) - #x4000 - ) + (entity-process (get-process *default-dead-pool* entity-type (if info + (-> info heap-size) + #x4000 + ) ) ) ) @@ -1505,12 +1295,7 @@ (else (birth-log "could not birth ~A because there was an issue.~%" obj) (when (not (birth-viewer entity-process obj)) - (format - 0 - "ERROR: no proper process type named ~A exists in the code, could not start ~A~%" - entity-type - obj - ) + (format 0 "ERROR: no proper process type named ~A exists in the code, could not start ~A~%" entity-type obj) (logior! (-> obj extra perm status) (entity-perm-status bit-0)) ) ) @@ -1523,9 +1308,9 @@ "Handle a deactivation in the entity. The entity directly stores a process so it should remove that after deactivating." (when (= arg0 (-> arg1 extra process)) - (logclear! (-> arg1 extra perm status) (entity-perm-status bit-1 bit-3)) - (set! (-> arg1 extra process) #f) - ) + (logclear! (-> arg1 extra perm status) (entity-perm-status bit-1 bit-3)) + (set! (-> arg1 extra process) #f) + ) (none) ) @@ -1534,7 +1319,7 @@ (let ((a0-1 (-> obj extra process))) (if a0-1 (deactivate a0-1) - (entity-deactivate-handler a0-1 obj) + (entity-deactivate-handler a0-1 obj) ) ) obj @@ -1547,10 +1332,10 @@ ;; how many actors do we need? (let ((actor-count (if (nonzero? (-> obj actors)) - (-> obj actors length) - 0 - ) - ) + (-> obj actors length) + 0 + ) + ) ) (cond ((not (-> obj level entity)) @@ -1593,10 +1378,7 @@ ) (cond ((not (-> obj level ambient)) - (set! - (-> obj level ambient) - (new 'loading-level 'entity-ambient-data-array existing-amb-count) - ) + (set! (-> obj level ambient) (new 'loading-level 'entity-ambient-data-array existing-amb-count)) ) ((< (-> obj level ambient allocated-length) existing-amb-count) (format @@ -1618,10 +1400,7 @@ (when (nonzero? bsp-ambs) (dotimes (s2-0 (-> bsp-ambs length)) (let ((amb-to-birth (-> bsp-ambs data s2-0 ambient))) - (set! - (-> amb-to-birth extra) - (the-as entity-links (-> amb-array data (-> amb-array length))) - ) + (set! (-> amb-to-birth ambient-data) (-> amb-array data (-> amb-array length))) (birth-ambient! amb-to-birth) ) (+! (-> amb-array length) 1) @@ -1647,118 +1426,93 @@ (defmethod deactivate-entities bsp-header ((obj bsp-header)) (let ((s5-0 (-> obj actors))) - (when (nonzero? s5-0) - (dotimes (s4-0 (-> s5-0 length)) - (let ((s3-0 (-> s5-0 data s4-0 actor))) - (kill! s3-0) - (remove-from-level! s3-0 *level*) + (when (nonzero? s5-0) + (dotimes (s4-0 (-> s5-0 length)) + (let ((s3-0 (-> s5-0 data s4-0 actor))) + (kill! s3-0) + (remove-from-level! s3-0 *level*) + ) + ) ) - ) ) - ) (let ((s5-1 (-> obj cameras))) - (when (nonzero? s5-1) - (dotimes (s4-1 (-> s5-1 length)) - (kill! (-> s5-1 s4-1)) - ) + (when (nonzero? s5-1) + (dotimes (s4-1 (-> s5-1 length)) + (kill! (-> s5-1 s4-1)) + ) + ) ) - ) (let ((s5-2 (-> *entity-pool* child)) (s4-2 (-> obj level heap base)) (s3-1 (-> obj level heap top-base)) ) - (while s5-2 - (let ((s2-0 (ppointer->process s5-2))) - (set! s5-2 (-> s5-2 0 brother)) - (cond - ((-> (the-as process s2-0) entity) - (when (= (-> (the-as process s2-0) entity extra level) (-> obj level)) - (format #t "NOTICE: rogue level entity ~A~% still alive~%" s2-0) - (deactivate s2-0) - ) - ) - ((= (-> s2-0 type) part-tracker) - (let ((v1-28 (the-as part-tracker s2-0))) - (if - (and - (nonzero? (-> v1-28 part)) - (>= (the-as int (-> v1-28 part group)) (the-as int s4-2)) - (< (the-as int (-> v1-28 part group)) (the-as int s3-1)) - ) - (deactivate s2-0) - ) - ) - ) - (else - (let* ((s1-0 s2-0) - (v1-34 - (if - (and - (nonzero? s1-0) - (type-type? (-> s1-0 type) process-drawable) + (while s5-2 + (let ((s2-0 (ppointer->process s5-2))) + (set! s5-2 (-> s5-2 0 brother)) + (cond + ((-> (the-as process s2-0) entity) + (when (= (-> (the-as process s2-0) entity extra level) (-> obj level)) + (format #t "NOTICE: rogue level entity ~A~% still alive~%" s2-0) + (deactivate s2-0) + ) + ) + ((= (-> s2-0 type) part-tracker) + (let ((v1-28 (the-as part-tracker s2-0))) + (if (and + (nonzero? (-> v1-28 part)) + (>= (the-as int (-> v1-28 part group)) (the-as int s4-2)) + (< (the-as int (-> v1-28 part group)) (the-as int s3-1)) + ) + (deactivate s2-0) ) - s1-0 + ) + ) + (else + (let* ((s1-0 s2-0) + (v1-34 (if (and (nonzero? s1-0) (type-type? (-> s1-0 type) process-drawable)) + s1-0 + ) + ) + ) + (when v1-34 + (cond + ((and + (nonzero? (-> (the-as process-drawable v1-34) part)) + (>= (the-as int (-> (the-as process-drawable v1-34) part group)) (the-as int s4-2)) + (< (the-as int (-> (the-as process-drawable v1-34) part group)) (the-as int s3-1)) + ) + (format + #t + "NOTICE: rogue null level entity (using part ~A) ~A~% still alive~%" + (-> (the-as process-drawable (-> (the-as process-drawable v1-34) part)) brother) + s2-0 + ) + (deactivate s2-0) + ) + ((and + (nonzero? (-> (the-as process-drawable v1-34) draw)) + (>= (the-as int (-> (the-as process-drawable v1-34) draw art-group)) (the-as int s4-2)) + (< (the-as int (-> (the-as process-drawable v1-34) draw art-group)) (the-as int s3-1)) + ) + (format + #t + "NOTICE: rogue null level entity (using art ~A) ~A~% still alive~%" + (-> (the-as process-drawable (-> (the-as process-drawable v1-34) draw)) mask) + s2-0 + ) + (deactivate s2-0) + ) + ) ) - ) ) - (when v1-34 - (cond - ((and - (nonzero? (-> (the-as process-drawable v1-34) part)) - (>= - (the-as int (-> (the-as process-drawable v1-34) part group)) - (the-as int s4-2) - ) - (< - (the-as int (-> (the-as process-drawable v1-34) part group)) - (the-as int s3-1) - ) ) - (format - #t - "NOTICE: rogue null level entity (using part ~A) ~A~% still alive~%" - (-> - (the-as process-drawable (-> (the-as process-drawable v1-34) part)) - brother - ) - s2-0 - ) - (deactivate s2-0) - ) - ((and - (nonzero? (-> (the-as process-drawable v1-34) draw)) - (>= - (the-as int (-> (the-as process-drawable v1-34) draw art-group)) - (the-as int s4-2) - ) - (< - (the-as int (-> (the-as process-drawable v1-34) draw art-group)) - (the-as int s3-1) - ) - ) - (format - #t - "NOTICE: rogue null level entity (using art ~A) ~A~% still alive~%" - (-> - (the-as process-drawable (-> (the-as process-drawable v1-34) draw)) - mask - ) - s2-0 - ) - (deactivate s2-0) - ) ) - ) ) - ) ) - ) ) - ) (none) ) - (defun process-drawable-from-entity! ((arg0 process-drawable) (arg1 entity-actor)) (logior! (-> arg0 mask) (process-mask actor-pause)) (set! (-> arg0 root trans quad) (-> arg1 extra trans quad)) @@ -1767,106 +1521,91 @@ (none) ) -(defmethod - update-perm! - entity-perm - ((obj entity-perm) (arg0 symbol) (arg1 entity-perm-status)) +(defmethod update-perm! entity-perm ((obj entity-perm) (arg0 symbol) (arg1 entity-perm-status)) (cond - ((= arg0 'game) - (logclear! (-> obj status) arg1) - ) - ((nonzero? (-> obj task)) - (logclear! - (-> obj status) - (logior (if (logtest? (-> obj status) (entity-perm-status bit-4)) - 524 - 0 - ) - 515 - ) + ((= arg0 'game) + (logclear! (-> obj status) arg1) ) - ) - (else - (logclear! - (-> obj status) - (logior arg1 (if (logtest? (-> obj status) (entity-perm-status bit-4)) - 524 - 0 - ) - ) + ((nonzero? (-> obj task)) + (logclear! (-> obj status) (logior + (if (logtest? (-> obj status) (entity-perm-status bit-4)) + 524 + 0 + ) + 515 + ) + ) ) + (else + (logclear! (-> obj status) (logior arg1 (if (logtest? (-> obj status) (entity-perm-status bit-4)) + 524 + 0 + ) + ) + ) + ) + ) + (when (zero? (logand (-> obj status) (entity-perm-status user-set-from-cstage))) + (set! (-> obj user-uint64) (the-as uint 0)) + 0 ) - ) - (when - (zero? (logand (-> obj status) (entity-perm-status user-set-from-cstage))) - (set! (-> obj user-uint64) (the-as uint 0)) - 0 - ) obj ) (defun reset-actors ((arg0 symbol)) - (set! *display-process-anim* #f) + (set! *display-process-anim* (the-as (pointer process) #f)) (let* ((v1-0 arg0) (s5-0 (cond - ((or (= v1-0 'life) (= v1-0 'debug)) - 623 + ((or (= v1-0 'life) (= v1-0 'debug)) + 623 + ) + ((= v1-0 'try) + 623 + ) + ((= v1-0 'game) + 1919 + ) + (else + 1663 + ) ) - ((= v1-0 'try) - 623 - ) - ((= v1-0 'game) - 1919 - ) - (else - 1663 - ) - ) - ) + ) (s4-0 *game-info*) ) - (dotimes (s3-0 (-> *level* length)) - (let ((v1-4 (-> *level* level s3-0))) - (when (= (-> v1-4 status) 'active) - (let ((s2-0 (-> v1-4 bsp level entity))) - (dotimes (s1-0 (-> s2-0 length)) - (let ((s0-0 (-> s2-0 data s1-0 entity))) - (kill! s0-0) - (update-perm! - (-> s0-0 extra perm) - arg0 - (the-as entity-perm-status s5-0) + (dotimes (s3-0 (-> *level* length)) + (let ((v1-4 (-> *level* level s3-0))) + (when (= (-> v1-4 status) 'active) + (let ((s2-0 (-> v1-4 bsp level entity))) + (dotimes (s1-0 (-> s2-0 length)) + (let ((s0-0 (-> s2-0 data s1-0 entity))) + (kill! s0-0) + (update-perm! (-> s0-0 extra perm) arg0 (the-as entity-perm-status s5-0)) + ) + ) + ) ) - ) ) - ) ) - ) + (let ((s3-1 (-> s4-0 task-perm-list))) + (dotimes (s2-1 (-> s3-1 length)) + (update-perm! (-> s3-1 data s2-1) arg0 (the-as entity-perm-status s5-0)) + ) + (logior! (-> s3-1 data 1 status) (entity-perm-status real-complete)) + ) + (let ((s4-1 (-> s4-0 perm-list))) + (dotimes (s3-2 (-> s4-1 length)) + (update-perm! (-> s4-1 data s3-2) arg0 (the-as entity-perm-status s5-0)) + ) + ) ) - (let ((s3-1 (-> s4-0 task-perm-list))) - (dotimes (s2-1 (-> s3-1 length)) - (update-perm! (-> s3-1 data s2-1) arg0 (the-as entity-perm-status s5-0)) - ) - (logior! (-> s3-1 data 1 status) (entity-perm-status real-complete)) - ) - (let ((s4-1 (-> s4-0 perm-list))) - (dotimes (s3-2 (-> s4-1 length)) - (update-perm! (-> s4-1 data s3-2) arg0 (the-as entity-perm-status s5-0)) - ) - ) - ) (iterate-process-tree - *entity-pool* - (the-as (function object object) (lambda ((arg0 process-drawable)) - (deactivate arg0) - (none) - ) + *entity-pool* + (the-as (function object object) (lambda ((arg0 process-drawable)) (deactivate arg0) (none))) + *null-kernel-context* ) - *null-kernel-context* - ) (if (= arg0 'game) - (task-control-reset arg0) - ) + (task-control-reset arg0) + ) (set! (-> *ACTOR-bank* birth-max) 1000) 0 (none) @@ -1875,444 +1614,301 @@ (defun reset-cameras () (remove-all *camera-engine*) (dotimes (gp-0 (-> *level* length)) - (let ((v1-5 (-> *level* level gp-0))) - (when (= (-> v1-5 status) 'active) - (let ((s5-0 (-> v1-5 bsp cameras))) - (when (nonzero? s5-0) - (dotimes (s4-0 (-> s5-0 length)) - (birth! (-> s5-0 s4-0)) + (let ((v1-5 (-> *level* level gp-0))) + (when (= (-> v1-5 status) 'active) + (let ((s5-0 (-> v1-5 bsp cameras))) + (when (nonzero? s5-0) + (dotimes (s4-0 (-> s5-0 length)) + (birth! (-> s5-0 s4-0)) + ) + ) + ) ) - ) ) - ) ) - ) 0 (none) ) (defmethod run-logic? process-drawable ((obj process-drawable)) (or - (zero? (logand (-> obj mask) (process-mask actor-pause))) - (or - (>= - (+ (-> *ACTOR-bank* pause-dist) (-> obj root pause-adjust-distance)) - (vector-vector-distance (-> obj root trans) (math-camera-pos)) - ) - (and - (nonzero? (-> obj skel)) - (!= (-> obj skel root-channel 0) (-> obj skel channel)) - ) - (and (nonzero? (-> obj draw)) (logtest? (-> obj draw status) 16)) + (zero? (logand (-> obj mask) (process-mask actor-pause))) + (or + (>= (+ (-> *ACTOR-bank* pause-dist) (-> obj root pause-adjust-distance)) + (vector-vector-distance (-> obj root trans) (math-camera-pos)) + ) + (and (nonzero? (-> obj skel)) (!= (-> obj skel root-channel 0) (-> obj skel channel))) + (and (nonzero? (-> obj draw)) (logtest? (-> obj draw status) (draw-status drwf04))) + ) ) - ) ) - (defmethod birth? entity-links ((obj entity-links) (arg0 vector)) (and - (zero? (logand (-> obj perm status) (entity-perm-status bit-0 dead))) - (< (vector-vector-distance (-> obj trans) arg0) (-> *ACTOR-bank* birth-dist)) - ) + (zero? (logand (-> obj perm status) (entity-perm-status bit-0 dead))) + (< (vector-vector-distance (-> obj trans) arg0) (-> *ACTOR-bank* birth-dist)) + ) ) (defmethod actors-update level-group ((obj level-group)) - (local-vars - (sv-16 vector) - (sv-24 int) - (sv-32 entity-links) - (sv-48 int) - (sv-64 string) - (sv-80 int) - ) + (local-vars (sv-16 vector) (sv-24 int) (sv-32 entity-links) (sv-48 int) (sv-64 string) (sv-80 int)) (when *compact-actors* - (if - (and - (= *compact-actors* 'debug) - (= (-> *nk-dead-pool* alive-list prev) (-> *nk-dead-pool* first-gap)) - ) - (churn *nk-dead-pool* 1) - ) - (if (nonzero? *debug-dead-pool*) - (compact *debug-dead-pool* 10) - ) - (compact - *nk-dead-pool* - (the - int - (lerp-scale - 8.0 - 1.0 - (the - float - (-> *display* frames (-> *display* last-screen) frame run-time) - ) - 2000.0 - 8000.0 + (if (and (= *compact-actors* 'debug) (= (-> *nk-dead-pool* alive-list prev) (-> *nk-dead-pool* first-gap))) + (churn *nk-dead-pool* 1) + ) + (if (nonzero? *debug-dead-pool*) + (compact *debug-dead-pool* 10) + ) + (compact + *nk-dead-pool* + (the int + (lerp-scale 8.0 1.0 (the float (-> *display* frames (-> *display* last-screen) frame run-time)) 2000.0 8000.0) + ) ) - ) ) - ) (when (not (paused?)) - (let ((s5-1 (-> *display* frames (-> *display* last-screen) frame run-time))) - (let - ((f0-5 - (fmax - 327680.0 - (fmin - (+ 327680.0 (* 204.8 (the float (- 7000 (the-as int s5-1))))) - (-> *ACTOR-bank* birth-dist) - ) + (let ((s5-1 (-> *display* frames (-> *display* last-screen) frame run-time))) + (let ((f0-5 + (fmax + 327680.0 + (fmin (+ 327680.0 (* 204.8 (the float (- 7000 (the-as int s5-1))))) (-> *ACTOR-bank* birth-dist)) + ) + ) + ) + (set! (-> *ACTOR-bank* pause-dist) + (seek (-> *ACTOR-bank* pause-dist) f0-5 (* 81920.0 (-> *display* seconds-per-frame))) + ) ) - ) + (set! (-> *ACTOR-bank* birth-max) + (seekl (-> *ACTOR-bank* birth-max) (the int (lerp-scale 25.0 1.0 (the float s5-1) 2000.0 7000.0)) 10) + ) ) - (set! - (-> *ACTOR-bank* pause-dist) - (seek - (-> *ACTOR-bank* pause-dist) - f0-5 - (* 81920.0 (-> *display* seconds-per-frame)) - ) - ) - ) - (set! - (-> *ACTOR-bank* birth-max) - (seekl - (-> *ACTOR-bank* birth-max) - (the int (lerp-scale 25.0 1.0 (the float s5-1) 2000.0 7000.0)) - 10 - ) - ) + (if (movie?) + (set! (-> *ACTOR-bank* birth-max) 1000) + ) ) - (if (movie?) - (set! (-> *ACTOR-bank* birth-max) 1000) - ) - ) (when *spawn-actors* - (set! sv-16 (camera-pos)) - (set! sv-24 0) - (dotimes (s5-2 (-> obj length)) - (let ((s4-2 (-> obj level s5-2))) - (when (= (-> s4-2 status) 'active) - (cond - ((= (-> s4-2 display?) 'special) - (let* ((s4-3 (-> s4-2 entity)) - (s3-1 (-> s4-3 length)) - ) - (dotimes (s2-0 s3-1) - (let ((v1-44 (-> s4-3 data s2-0))) - (cond - ((logtest? (-> v1-44 perm status) (entity-perm-status bit-7)) - (when - (not - (or - (-> v1-44 process) - (logtest? - (-> v1-44 perm status) - (entity-perm-status bit-0 dead) + (set! sv-16 (camera-pos)) + (set! sv-24 0) + (dotimes (s5-2 (-> obj length)) + (let ((s4-2 (-> obj level s5-2))) + (when (= (-> s4-2 status) 'active) + (cond + ((= (-> s4-2 display?) 'special) + (let* ((s4-3 (-> s4-2 entity)) + (s3-1 (-> s4-3 length)) + ) + (dotimes (s2-0 s3-1) + (let ((v1-44 (-> s4-3 data s2-0))) + (cond + ((logtest? (-> v1-44 perm status) (entity-perm-status bit-7)) + (when (not (or (-> v1-44 process) (logtest? (-> v1-44 perm status) (entity-perm-status bit-0 dead)))) + (birth! (-> v1-44 entity)) + (set! sv-24 (+ sv-24 1)) + (if (>= sv-24 (-> *ACTOR-bank* birth-max)) + (return (the-as object #f)) + ) + ) + ) + (else + (if (and (-> v1-44 process) (zero? (logand (-> v1-44 perm status) (entity-perm-status bit-3)))) + (kill! (-> v1-44 entity)) + ) + ) + ) + ) ) - ) ) - (birth! (-> v1-44 entity)) - (set! sv-24 (+ sv-24 1)) - (if (>= sv-24 (-> *ACTOR-bank* birth-max)) - (return (the-as object #f)) - ) - ) ) - (else - (if - (and - (-> v1-44 process) - (zero? - (logand (-> v1-44 perm status) (entity-perm-status bit-3)) - ) + ((= (-> s4-2 display?) 'special-vis) + (let* ((s3-2 (-> s4-2 entity)) + (s2-1 (-> s3-2 length)) + ) + (dotimes (s1-0 s2-1) + (let ((s0-0 (-> s3-2 data s1-0))) + (cond + ((and (logtest? (-> s0-0 perm status) (entity-perm-status bit-7)) (is-object-visible? s4-2 (-> s0-0 vis-id))) + (when (not (or (-> s0-0 process) (logtest? (-> s0-0 perm status) (entity-perm-status bit-0 dead)))) + (birth! (-> s0-0 entity)) + (set! sv-24 (+ sv-24 1)) + ) + ) + (else + (when (and (-> s0-0 process) (zero? (logand (-> s0-0 perm status) (entity-perm-status bit-3)))) + (kill! (-> s0-0 entity)) + (set! sv-24 (+ sv-24 1)) + ) + ) + ) + ) + (if (>= sv-24 (-> *ACTOR-bank* birth-max)) + (return (the-as object #f)) + ) + ) ) - (kill! (-> v1-44 entity)) - ) ) + ((= (-> s4-2 display?) 'actor) + (let* ((s4-4 (-> s4-2 entity)) + (s3-3 (-> s4-4 length)) + ) + (dotimes (s2-2 s3-3) + (let ((v1-84 (-> s4-4 data s2-2))) + (cond + (#t + (when (not (or (-> v1-84 process) (logtest? (-> v1-84 perm status) (entity-perm-status bit-0 dead)))) + (birth! (-> v1-84 entity)) + (set! sv-24 (+ sv-24 1)) + (if (>= sv-24 (-> *ACTOR-bank* birth-max)) + (return (the-as object #f)) + ) + ) + ) + (else + (if (and (-> v1-84 process) (zero? (logand (-> v1-84 perm status) (entity-perm-status bit-3)))) + (kill! (-> v1-84 entity)) + ) + ) + ) + ) + ) + ) + ) + ((not *vis-actors*) + (let* ((s4-5 (-> s4-2 entity)) + (s3-4 (-> s4-5 length)) + ) + (dotimes (s2-3 s3-4) + (let ((s1-1 (-> s4-5 data s2-3))) + (cond + ((and + (< (vector-vector-distance (-> s1-1 trans) sv-16) (-> *ACTOR-bank* birth-dist)) + (zero? (logand (-> s1-1 perm status) (entity-perm-status bit-9 bit-10))) + ) + (when (not (or (-> s1-1 process) (logtest? (-> s1-1 perm status) (entity-perm-status bit-0 dead)))) + (birth! (-> s1-1 entity)) + (set! sv-24 (+ sv-24 1)) + (if (>= sv-24 (-> *ACTOR-bank* birth-max)) + (return (the-as object #f)) + ) + ) + ) + (else + (if (and (-> s1-1 process) (zero? (logand (-> s1-1 perm status) (entity-perm-status bit-3)))) + (kill! (-> s1-1 entity)) + ) + ) + ) + ) + ) + ) + ) + (*vis-actors* + (when (not (and (-> s4-2 vis-info 0) (-> s4-2 all-visible?))) + (let* ((s3-5 (-> s4-2 entity)) + (s2-4 (-> s3-5 length)) + (s0-1 #f) + ) + (dotimes (s1-2 s2-4) + (set! sv-32 (-> s3-5 data s1-2)) + (cond + ((and + (is-object-visible? s4-2 (-> sv-32 vis-id)) + (zero? (logand (-> sv-32 perm status) (entity-perm-status bit-9 bit-10))) + ) + (when (not (or (-> sv-32 process) (logtest? (-> sv-32 perm status) (entity-perm-status bit-0 dead)) s0-1)) + (birth! (-> sv-32 entity)) + (set! sv-24 (+ sv-24 1)) + (when (< (/ (the float (memory-free *nk-dead-pool*)) (the float (memory-total *nk-dead-pool*))) 0.1) + (let ((s0-2 format)) + (set! sv-48 0) + (set! sv-64 "WARNING: low actor memory, no birth triggered!!! ~D/~D~%") + (set! sv-80 (memory-free *nk-dead-pool*)) + (let ((a3-2 (memory-total *nk-dead-pool*))) + (s0-2 sv-48 sv-64 sv-80 a3-2) + ) + ) + (set! s0-1 #t) + ) + ) + ) + (else + (when (and (-> sv-32 process) (zero? (logand (-> sv-32 perm status) (entity-perm-status bit-3)))) + (kill! (-> sv-32 entity)) + (set! sv-24 (+ sv-24 1)) + ) + ) + ) + (if (>= sv-24 (-> *ACTOR-bank* birth-max)) + (return (the-as object #f)) + ) + ) + ) + ) + ) ) - ) ) - ) ) - ((= (-> s4-2 display?) 'special-vis) - (let* ((s3-2 (-> s4-2 entity)) - (s2-1 (-> s3-2 length)) - ) - (dotimes (s1-0 s2-1) - (let ((s0-0 (-> s3-2 data s1-0))) - (cond - ((and - (logtest? (-> s0-0 perm status) (entity-perm-status bit-7)) - (is-object-visible? s4-2 (-> s0-0 vis-id)) - ) - (when - (not - (or - (-> s0-0 process) - (logtest? (-> s0-0 perm status) (entity-perm-status bit-0 dead)) - ) - ) - (birth! (-> s0-0 entity)) - (set! sv-24 (+ sv-24 1)) - ) - ) - (else - (when - (and - (-> s0-0 process) - (zero? (logand (-> s0-0 perm status) (entity-perm-status bit-3))) - ) - (kill! (-> s0-0 entity)) - (set! sv-24 (+ sv-24 1)) - ) - ) - ) - ) - (if (>= sv-24 (-> *ACTOR-bank* birth-max)) - (return (the-as object #f)) - ) - ) - ) - ) - ((= (-> s4-2 display?) 'actor) - (let* ((s4-4 (-> s4-2 entity)) - (s3-3 (-> s4-4 length)) - ) - (dotimes (s2-2 s3-3) - (let ((v1-84 (-> s4-4 data s2-2))) - (cond - (#t - (when - (not - (or - (-> v1-84 process) - (logtest? - (-> v1-84 perm status) - (entity-perm-status bit-0 dead) - ) - ) - ) - (birth! (-> v1-84 entity)) - (set! sv-24 (+ sv-24 1)) - (if (>= sv-24 (-> *ACTOR-bank* birth-max)) - (return (the-as object #f)) - ) - ) - ) - (else - (if - (and - (-> v1-84 process) - (zero? - (logand (-> v1-84 perm status) (entity-perm-status bit-3)) - ) - ) - (kill! (-> v1-84 entity)) - ) - ) - ) - ) - ) - ) - ) - ((not *vis-actors*) - (let* ((s4-5 (-> s4-2 entity)) - (s3-4 (-> s4-5 length)) - ) - (dotimes (s2-3 s3-4) - (let ((s1-1 (-> s4-5 data s2-3))) - (cond - ((and - (< - (vector-vector-distance (-> s1-1 trans) sv-16) - (-> *ACTOR-bank* birth-dist) - ) - (zero? - (logand (-> s1-1 perm status) (entity-perm-status bit-9 bit-10)) - ) - ) - (when - (not - (or - (-> s1-1 process) - (logtest? (-> s1-1 perm status) (entity-perm-status bit-0 dead)) - ) - ) - (birth! (-> s1-1 entity)) - (set! sv-24 (+ sv-24 1)) - (if (>= sv-24 (-> *ACTOR-bank* birth-max)) - (return (the-as object #f)) - ) - ) - ) - (else - (if - (and - (-> s1-1 process) - (zero? (logand (-> s1-1 perm status) (entity-perm-status bit-3))) - ) - (kill! (-> s1-1 entity)) - ) - ) - ) - ) - ) - ) - ) - (*vis-actors* - (when (not (and (-> s4-2 vis-info 0) (-> s4-2 all-visible?))) - (let* ((s3-5 (-> s4-2 entity)) - (s2-4 (-> s3-5 length)) - (s0-1 #f) - ) - (dotimes (s1-2 s2-4) - (set! sv-32 (-> s3-5 data s1-2)) - (cond - ((and - (is-object-visible? s4-2 (-> sv-32 vis-id)) - (zero? - (logand (-> sv-32 perm status) (entity-perm-status bit-9 bit-10)) - ) - ) - (when - (not - (or - (-> sv-32 process) - (logtest? - (-> sv-32 perm status) - (entity-perm-status bit-0 dead) - ) - s0-1 - ) - ) - (birth! (-> sv-32 entity)) - (set! sv-24 (+ sv-24 1)) - (when - (< - (/ - (the float (memory-free *nk-dead-pool*)) - (the float (memory-total *nk-dead-pool*)) - ) - 0.1 - ) - (let ((s0-2 format)) - (set! sv-48 0) - (set! - sv-64 - "WARNING: low actor memory, no birth triggered!!! ~D/~D~%" - ) - (set! sv-80 (memory-free *nk-dead-pool*)) - (let ((a3-2 (memory-total *nk-dead-pool*))) - (s0-2 sv-48 sv-64 sv-80 a3-2) - ) - ) - (set! s0-1 #t) - ) - ) - ) - (else - (when - (and - (-> sv-32 process) - (zero? - (logand (-> sv-32 perm status) (entity-perm-status bit-3)) - ) - ) - (kill! (-> sv-32 entity)) - (set! sv-24 (+ sv-24 1)) - ) - ) - ) - (if (>= sv-24 (-> *ACTOR-bank* birth-max)) - (return (the-as object #f)) - ) - ) - ) - ) - ) - ) ) - ) ) - ) 0 ) (defun entity-birth-no-kill ((arg0 entity)) (let ((gp-0 (-> arg0 extra))) - (logior! (-> gp-0 perm status) (entity-perm-status bit-3)) - (if - (not - (or - (-> gp-0 process) - (logtest? (-> gp-0 perm status) (entity-perm-status bit-0 dead)) - ) - ) - (birth! (-> gp-0 entity)) + (logior! (-> gp-0 perm status) (entity-perm-status bit-3)) + (if (not (or (-> gp-0 process) (logtest? (-> gp-0 perm status) (entity-perm-status bit-0 dead)))) + (birth! (-> gp-0 entity)) + ) + (-> gp-0 process) ) - (-> gp-0 process) - ) (none) ) (defun entity-task-complete-on ((arg0 entity)) (let ((v1-0 (-> arg0 extra))) - (if (nonzero? (-> v1-0 perm task)) - (logior! - (-> *game-info* task-perm-list data (-> v1-0 perm task) status) - (entity-perm-status real-complete) - ) + (if (nonzero? (-> v1-0 perm task)) + (logior! (-> *game-info* task-perm-list data (-> v1-0 perm task) status) (entity-perm-status real-complete)) + ) ) - ) 0 (none) ) (defun entity-task-complete-off ((arg0 entity)) (let ((v1-0 (-> arg0 extra))) - (if (!= (-> v1-0 perm task) (game-task complete)) - (logclear! - (-> *game-info* task-perm-list data (-> v1-0 perm task) status) - (entity-perm-status real-complete) - ) + (if (!= (-> v1-0 perm task) (game-task complete)) + (logclear! (-> *game-info* task-perm-list data (-> v1-0 perm task) status) (entity-perm-status real-complete)) + ) ) - ) 0 (none) ) -(defmethod - dummy-30 - entity-actor - ((obj entity-actor) (arg0 entity-perm-status) (arg1 symbol)) +(defmethod dummy-30 entity-actor ((obj entity-actor) (arg0 entity-perm-status) (arg1 symbol)) (let ((v1-0 (-> obj extra))) - (if arg1 - (logior! (-> v1-0 perm status) arg0) - (logclear! (-> v1-0 perm status) arg0) + (if arg1 + (logior! (-> v1-0 perm status) arg0) + (logclear! (-> v1-0 perm status) arg0) + ) + (-> v1-0 perm status) ) - (-> v1-0 perm status) - ) (none) ) -(defun - process-entity-status! - ((arg0 process) (arg1 entity-perm-status) (arg2 symbol)) +(defun process-entity-status! ((arg0 process) (arg1 entity-perm-status) (arg2 symbol)) (cond - ((and (-> arg0 entity) (= arg0 (-> arg0 entity extra process))) - (let ((v1-6 (-> arg0 entity extra))) - (if arg2 - (logior! (-> v1-6 perm status) arg1) - (logclear! (-> v1-6 perm status) arg1) - ) - (the-as int (-> v1-6 perm status)) + ((and (-> arg0 entity) (= arg0 (-> arg0 entity extra process))) + (let ((v1-6 (-> arg0 entity extra))) + (if arg2 + (logior! (-> v1-6 perm status) arg1) + (logclear! (-> v1-6 perm status) arg1) + ) + (the-as int (-> v1-6 perm status)) + ) ) + (else + 0 + ) ) - (else - 0 - ) - ) ) diff --git a/goal_src/engine/game/main.gc b/goal_src/engine/game/main.gc index 53d435476..3c6b62108 100644 --- a/goal_src/engine/game/main.gc +++ b/goal_src/engine/game/main.gc @@ -668,7 +668,7 @@ (draw *pc-settings* debug-buf) ) (when (-> *pc-settings* display-actor-bank) - (draw-string-xy (string-format "Actor Bank: ~,,1m/~,,1m (~D)" (-> *ACTOR-bank* pause-dist) (-> *ACTOR-bank* birth-dist) (-> *ACTOR-bank* birth-max)) debug-buf 512 232 (font-color default) (font-flags shadow kerning right)) + (draw-string-xy (string-format "Actor Bank: ~,,1m/~,,1m (~D)" (-> *ACTOR-bank* pause-dist) (-> *ACTOR-bank* birth-dist) (-> *ACTOR-bank* birth-max)) debug-buf 512 (- 224 8) (font-color default) (font-flags shadow kerning right)) ) ) (let ( diff --git a/goal_src/engine/game/video.gc b/goal_src/engine/game/video.gc index d9b97c924..88ea7b743 100644 --- a/goal_src/engine/game/video.gc +++ b/goal_src/engine/game/video.gc @@ -17,18 +17,8 @@ (set! (-> *video-parms* relative-y-scale) 1.0) (set! *ticks-per-frame* 9765) ;; 585900 total? (set! (-> *math-camera* isometric vector 1 y) 0.5) - (#cond - (PC_PORT - ;; discard scissoring area - (set! (-> *math-camera* y-pix) 128.0) - (set! (-> *math-camera* y-clip) 512.0) - ;(set! (-> *video-parms* relative-y-scale) (/ 448.0 512.0)) - ) - (#t - (set! (-> *math-camera* y-pix) 112.0) - (set! (-> *math-camera* y-clip) 448.0) - ) - ) + (set! (-> *math-camera* y-pix) 112.0) + (set! (-> *math-camera* y-clip) 448.0) (set! (-> *shadow-data* texoffset y) 112.5) ) (('pal) diff --git a/goal_src/engine/gfx/sprite/sprite.gc b/goal_src/engine/gfx/sprite/sprite.gc index e7394e063..52bd95204 100644 --- a/goal_src/engine/gfx/sprite/sprite.gc +++ b/goal_src/engine/gfx/sprite/sprite.gc @@ -541,6 +541,15 @@ (f2-0 (-> *math-camera* perspective vector 1 y)) (f0-1 (* -1.9996 (-> *math-camera* perspective vector 0 x))) ) + (#when PC_PORT + (when (and *pc-settings* (not (-> *pc-settings* use-vis?))) + ;; these are the values used when the game is in 4x3 + ;; when the game is in widescreen, HUD sprites are generally enlarged, which looks terrible + (set! f1-0 (the-as float #xbeccdcf4)) + (set! f2-0 (the-as float #xbe6f01c8)) + (set! f0-1 (the-as float #x3f4cd277)) + ) + ) (set-vector! (-> mtx2 vector 0) f0-1 0.0 0.0 0.0) (set-vector! (-> mtx2 vector 1) 0.0 (- (* (/ f2-0 f1-0) f0-1)) 0.0 0.0) (set-vector! (-> mtx2 vector 2) 0.0 0.0 (- f0-1) 0.0) diff --git a/goal_src/engine/pc/pckernel-h.gc b/goal_src/engine/pc/pckernel-h.gc index 21e24d1e8..9c87251df 100644 --- a/goal_src/engine/pc/pckernel-h.gc +++ b/goal_src/engine/pc/pckernel-h.gc @@ -32,7 +32,7 @@ (defglobalconstant PC_KERNEL_VERSION_BUILD #x0000) -(defglobalconstant PC_KERNEL_VERSION_REVISION #x0000) +(defglobalconstant PC_KERNEL_VERSION_REVISION #x0001) (defglobalconstant PC_KERNEL_VERSION_MINOR #x0000) (defglobalconstant PC_KERNEL_VERSION_MAJOR #x0001) @@ -48,6 +48,7 @@ (defconstant ASPECT_4X3 (/ 4.0 3.0)) (defconstant ASPECT_16X9 (/ 16.0 9.0)) +(defconstant ASPECT_16X9_SCALE (/ ASPECT_16X9 ASPECT_4X3)) (defconstant PC_BASE_WIDTH 640) (defconstant PC_BASE_HEIGHT 480) @@ -181,6 +182,8 @@ (dpi-y float) ;; DPI height scale (aspect-ratio-auto? symbol) ;; if on, aspect ratio is calculated automatically. (aspect-ratio float) ;; the desired aspect ratio. set auto to off and then this to 4/3 to force 4x3 aspect. + (aspect-ratio-scale float) ;; aspect ratio compared to 4x3 + (aspect-ratio-reciprocal float) ;; aspect ratio compared to 3x4 (fullscreen? symbol) ;; fullscreen status. can be #f, #t or borderless (letterbox? symbol) ;; letterbox. #f = stretched (vsync? symbol) ;; vsync. @@ -194,6 +197,7 @@ (aspect-custom-x int) (aspect-custom-y int) (debug-pad-display symbol) + (progress-force? symbol) (device-audio pc-device-info :inline) ;; used audio device (device-screen pc-device-info :inline) ;; used display device @@ -258,6 +262,7 @@ (set-fullscreen! (_type_ symbol) int) (set-size! (_type_ int int) int) (set-aspect! (_type_ int int) int) + (set-aspect-ratio! (_type_ float) int) (read-from-file (_type_ string) symbol) (write-to-file (_type_ string) symbol) ) @@ -296,6 +301,7 @@ (set! (-> obj new-lb?) #f) (set! (-> obj display-actor-bank) #f) (set! (-> obj debug-pad-display) #f) + (set! (-> obj progress-force?) #f) (set! (-> obj font-scale) 1.0) (set! (-> obj aspect-custom-x) 1) (set! (-> obj aspect-custom-y) 1) diff --git a/goal_src/engine/pc/pckernel.gc b/goal_src/engine/pc/pckernel.gc index caa7615c5..dae789fe4 100644 --- a/goal_src/engine/pc/pckernel.gc +++ b/goal_src/engine/pc/pckernel.gc @@ -56,13 +56,20 @@ (defmethod set-aspect! pc-settings ((obj pc-settings) (aw int) (ah int)) (let ((aspect (/ (the float aw) (the float ah)))) - (set! (-> *pc-settings* aspect-ratio) aspect) - (set! (-> *pc-settings* aspect-ratio-auto?) #f) - (set! (-> *pc-settings* use-vis?) #f) + (set-aspect-ratio! obj aspect) + (set! (-> obj aspect-ratio-auto?) #f) + (set! (-> obj use-vis?) #f) ) 0) +(defmethod set-aspect-ratio! pc-settings ((obj pc-settings) (aspect float)) + (set! (-> obj aspect-ratio) aspect) + (set! (-> obj aspect-ratio-scale) (/ aspect ASPECT_4X3)) + (set! (-> obj aspect-ratio-reciprocal) (/ ASPECT_4X3 aspect)) + 0) + + (defmethod update-from-os pc-settings ((obj pc-settings)) "Update settings from the PC kernel to GOAL." @@ -73,8 +80,8 @@ (when (-> obj use-vis?) (if (= (-> *setting-control* default aspect-ratio) 'aspect4x3) - (set! (-> obj aspect-ratio) ASPECT_4X3) - (set! (-> obj aspect-ratio) ASPECT_16X9) + (set-aspect-ratio! obj ASPECT_4X3) + (set-aspect-ratio! obj ASPECT_16X9) ) ) @@ -82,7 +89,7 @@ (cond ((and (not (-> obj use-vis?)) (-> obj aspect-ratio-auto?)) ;; the window determines the resolution - (set! (-> obj aspect-ratio) win-aspect) + (set-aspect-ratio! obj win-aspect) (set! (-> obj width) (-> obj win-width)) (set! (-> obj height) (-> obj win-height)) ) @@ -128,11 +135,26 @@ (update-from-os obj) (update-to-os obj) - (when #t ;;(not (-> obj use-vis?)) - (set! (-> *video-parms* relative-x-scale) (/ ASPECT_4X3 (-> obj aspect-ratio))) - (set! (-> *video-parms* relative-x-scale-reciprical) (/ (-> obj aspect-ratio) ASPECT_4X3)) + (when (not (-> obj use-vis?)) + (set! (-> *video-parms* relative-x-scale) (-> obj aspect-ratio-reciprocal)) + (set! (-> *video-parms* relative-x-scale-reciprical) (-> obj aspect-ratio-scale)) (set! (-> *font-default-matrix* vector 0 x) (-> *video-parms* relative-x-scale)) ) + (when (not (-> obj use-vis?)) + (when *progress-process* + ;; adjust sizes for progress. + ;; video.gc sets the sizes in the normal game. + (let ((pr (-> *progress-process*)) + (wide-adjust (* 4.0 (- (/ (-> obj aspect-ratio-scale) ASPECT_16X9_SCALE) (1/ ASPECT_16X9_SCALE)))) + ) + (set! (-> pr sides-x-scale) 1.0) + (set! (-> pr sides-y-scale) 13.0) + ;(set! (-> pr left-x-offset) (+ 59 (the int (* (-> obj aspect-ratio-scale) -59)))) + ;(set! (-> pr right-x-offset) 26) + ;(set! (-> pr button-scale) (+ 1.0 (* wide-adjust 0.1))) + ) + ) + ) (if (and *debug-segment* (-> obj debug-pad-display)) (debug-pad-display (-> *cpad-list* cpads 0)) ) @@ -157,7 +179,7 @@ (format *pc-temp-string* "target aspect: ~,,3f/~,,3f A: ~A/~A L: ~A~%" (-> obj aspect-ratio) (/ (the float (-> obj win-width)) (the float (-> obj win-height))) (-> obj aspect-ratio-auto?) (-> obj use-vis?) (-> obj letterbox?)) (format *pc-temp-string* "fullscreen: ~A ~A~%" (-> obj fullscreen?) (-> obj vsync?)) - (draw-string-xy *pc-temp-string* buf 0 (- 240 (* 8 4)) (font-color default) (font-flags shadow kerning)) + (draw-string-xy *pc-temp-string* buf 0 (- 224 (* 8 4)) (font-color default) (font-flags shadow kerning)) (none)) diff --git a/goal_src/engine/ui/progress-h.gc b/goal_src/engine/ui/progress-h.gc index 8fb85cbe4..0b6c04d80 100644 --- a/goal_src/engine/ui/progress-h.gc +++ b/goal_src/engine/ui/progress-h.gc @@ -145,7 +145,7 @@ (total-nb-of-buzzers int32 :offset-assert 288) (card-info mc-slot-info :offset-assert 292) (last-option-index-change int64 :offset-assert 296) - (video-mode-timeout uint64 :offset-assert 304) + (video-mode-timeout int64 :offset-assert 304) (display-state-stack progress-screen 5 :offset-assert 312) (option-index-stack int32 5 :offset-assert 352) (display-state-pos int32 :offset-assert 372) diff --git a/goal_src/engine/ui/progress/progress-draw.gc b/goal_src/engine/ui/progress/progress-draw.gc index 412e111d6..07ef15a50 100644 --- a/goal_src/engine/ui/progress/progress-draw.gc +++ b/goal_src/engine/ui/progress/progress-draw.gc @@ -5,223 +5,187 @@ ;; name in dgo: progress-draw ;; dgos: GAME, ENGINE +;; DECOMP BEGINS (defun adjust-pos ((arg0 int) (arg1 int)) (if (< arg0 arg1) - 0 - (- arg0 arg1) - ) + 0 + (- arg0 arg1) + ) ) (defmethod draw-fuel-cell-screen progress ((obj progress) (arg0 int)) (local-vars - (sv-112 int) - (sv-128 int) - (sv-144 int) - (sv-160 (function trsqv float quaternion)) - (sv-176 trsqv) - (sv-192 int) - (sv-208 int) - (sv-224 (function string float font-context int none)) - ) + (sv-112 int) + (sv-128 int) + (sv-144 int) + (sv-160 (function trsqv float quaternion)) + (sv-176 trsqv) + (sv-192 int) + (sv-208 int) + (sv-224 (function string float font-context int none)) + ) (hide-progress-icons) (let ((s5-0 (-> *level-task-data* arg0))) - (if - (and - (= *cheat-mode* 'debug) - (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l3)) - ) - (format *stdcon* "fcd:~d~%" (-> *game-info* fuel-cell-deaths)) - ) - (set! (-> *progress-process* 0 particles 14 init-pos x) -320.0) - (set! (-> *progress-process* 0 particles 15 init-pos x) -320.0) - (set! (-> *progress-process* 0 icons 4 icon-x) -320) - (when (and (!= s5-0 #f) (= (-> *game-info* level-opened arg0) 1)) - (set! - sv-112 - (- (-> *task-egg-starting-x* (-> s5-0 nb-of-tasks)) (-> obj left-x-offset)) - ) - (set! sv-128 (the int (* 47.0 (-> obj transition-percentage-invert)))) - 0 - (let ((s0-0 6) - (s2-0 0) - (s4-1 (if (= (-> obj level-transition) 1) - (- (-> obj transition-offset)) - (-> obj transition-offset) - ) - ) - (f30-0 (-> obj transition-percentage-invert)) - (s1-0 0) - (s3-0 #f) - ) - (when (-> obj stat-transition) - (set! sv-128 47) - (set! s2-0 (if (!= (-> obj display-state) (-> obj next-display-state)) - (- (-> obj transition-offset)) - (-> obj transition-offset) + (if (and (= *cheat-mode* 'debug) (cpad-hold? 0 l3)) + (format *stdcon* "fcd:~d~%" (-> *game-info* fuel-cell-deaths)) + ) + (set! (-> *progress-process* 0 particles 14 init-pos x) -320.0) + (set! (-> *progress-process* 0 particles 15 init-pos x) -320.0) + (set! (-> *progress-process* 0 icons 4 icon-x) -320) + (when (and (!= s5-0 #f) (= (-> *game-info* level-opened arg0) 1)) + (set! sv-112 (- (-> *task-egg-starting-x* (-> s5-0 nb-of-tasks)) (-> obj left-x-offset))) + (set! sv-128 (the int (* 47.0 (-> obj transition-percentage-invert)))) + 0 + (let ((s0-0 6) + (s2-0 0) + (s4-1 (if (= (-> obj level-transition) 1) + (- (-> obj transition-offset)) + (-> obj transition-offset) + ) ) - ) - (set! s4-1 0) - (set! f30-0 1.0) - ) - (set! sv-144 0) - (while (< sv-144 4) - (let ((a0-18 (-> obj icons sv-144 icon 0 root))) - (set! sv-176 a0-18) - (set! sv-160 (method-of-object sv-176 set-yaw-angle-clear-roll-pitch!)) - (let - ((a1-2 - (+ - (y-angle a0-18) - (* 182.04445 (* 0.5 (-> *display* time-adjust-ratio))) - ) - ) - ) - (sv-160 sv-176 a1-2) - ) - ) - (set! sv-144 (+ sv-144 1)) - ) - (set! - sv-192 - (+ - sv-112 - (/ (- (* 47 (-> s5-0 nb-of-tasks)) (* sv-128 (-> s5-0 nb-of-tasks))) 2) - ) - ) - (set! sv-208 0) - (while (< sv-208 (-> s5-0 nb-of-tasks)) - (let ((v0-4 (get-task-status (-> s5-0 task-info sv-208 task-id))) - (v1-59 -1) - (a0-25 #f) + (f30-0 (-> obj transition-percentage-invert)) + (s1-0 0) + (s3-0 #f) ) - (set! (-> obj particle-state s0-0) 2) - (cond - ((or (= v0-4 (task-status need-hint)) (= v0-4 (task-status unknown))) - (if (= *kernel-boot-message* 'play) - (set! (-> obj particle-state s0-0) 1) + (when (-> obj stat-transition) + (set! sv-128 47) + (set! s2-0 (if (!= (-> obj display-state) (-> obj next-display-state)) + (- (-> obj transition-offset)) + (-> obj transition-offset) + ) + ) + (set! s4-1 0) + (set! f30-0 1.0) ) - ) - ((= v0-4 (task-status invalid)) - (set! v1-59 (-> s5-0 task-info sv-208 text-index-when-resolved)) - (set! (-> obj particle-state s0-0) 3) - (set! a0-25 #t) - ) - ((= v0-4 (task-status need-introduction)) - (set! v1-59 0) - ) - ((= v0-4 (task-status need-reminder-a)) - (set! v1-59 0) - ) - ((= v0-4 (task-status need-reminder)) - (set! v1-59 1) - ) - ((= v0-4 (task-status need-reward-speech)) - (set! v1-59 2) - ) - ((= v0-4 (task-status need-resolution)) - (set! v1-59 2) - ) - ) - (if (and (!= *kernel-boot-message* 'play) (= v1-59 -1)) - (set! v1-59 0) - ) - (set! (-> obj particles s0-0 init-pos x) (the float (+ sv-192 s2-0))) - (set! (-> obj particles s0-0 init-pos y) (the float (+ s4-1 204))) - (+! s0-0 1) - (when (= sv-208 (-> obj task-index)) - (set! s1-0 v1-59) - (set! s3-0 a0-25) - (set! (-> obj particles 5 init-pos x) (the float (+ sv-192 s2-0))) - (set! (-> obj particles 5 init-pos y) (the float (+ s4-1 204))) - ) - ) - (set! sv-192 (+ sv-192 sv-128)) - (set! sv-208 (+ sv-208 1)) - ) - (dotimes (v1-77 (- 8 (-> s5-0 nb-of-tasks))) - (set! - (-> *progress-process* 0 particles s0-0 init-pos x) - (the float (+ s2-0 -320)) - ) - (set! (-> obj particles s0-0 init-pos y) (the float (+ s4-1 194))) - (+! s0-0 1) - ) - (when *common-text* - (when - (and - (!= s1-0 -1) - (> (-> s5-0 nb-of-tasks) 0) - (>= (-> obj task-index) 0) - (< (-> obj task-index) (-> s5-0 nb-of-tasks)) - ) - (let - ((s0-1 - (new - 'stack - 'font-context - *font-default-matrix* - (- (+ s2-0 32) (-> obj left-x-offset)) - (+ (/ s4-1 2) 125) - 8325000.0 - (font-color yellow-orange) - (font-flags shadow kerning) - ) - ) - ) - (let ((v1-91 s0-1)) - (set! (-> v1-91 width) (the float 328)) - ) - (let ((v1-92 s0-1)) - (set! (-> v1-92 height) (the float 50)) - ) - (let ((v1-93 s0-1)) - (set! (-> v1-93 scale) 0.7) - ) - (set! (-> s0-1 flags) (font-flags shadow kerning middle left large)) - (set! sv-224 print-game-text-scaled) - (let - ((a0-47 - (lookup-text! - *common-text* - (-> s5-0 task-info (-> obj task-index) task-name s1-0) - #f + (set! sv-144 0) + (while (< sv-144 4) + (let ((a0-18 (-> obj icons sv-144 icon 0 root))) + (set! sv-176 a0-18) + (set! sv-160 (method-of-object sv-176 set-yaw-angle-clear-roll-pitch!)) + (let ((a1-2 (+ (y-angle a0-18) (* 182.04445 (* 0.5 (-> *display* time-adjust-ratio)))))) + (sv-160 sv-176 a1-2) + ) ) - ) - (a1-57 f30-0) - (a2-15 s0-1) - (a3-2 (the int (* 128.0 f30-0))) + (set! sv-144 (+ sv-144 1)) ) - (sv-224 a0-47 a1-57 a2-15 a3-2) - ) - (when s3-0 - (set! - (-> s0-1 origin x) - (the float (- (+ s2-0 32) (-> obj left-x-offset))) + (set! sv-192 (+ sv-112 (/ (- (* 47 (-> s5-0 nb-of-tasks)) (* sv-128 (-> s5-0 nb-of-tasks))) 2))) + (set! sv-208 0) + (while (< sv-208 (-> s5-0 nb-of-tasks)) + (let ((v0-4 (get-task-status (-> s5-0 task-info sv-208 task-id))) + (v1-59 -1) + (a0-25 #f) + ) + (set! (-> obj particle-state s0-0) 2) + (cond + ((or (= v0-4 (task-status need-hint)) (= v0-4 (task-status unknown))) + (if (= *kernel-boot-message* 'play) + (set! (-> obj particle-state s0-0) 1) + ) + ) + ((= v0-4 (task-status invalid)) + (set! v1-59 (-> s5-0 task-info sv-208 text-index-when-resolved)) + (set! (-> obj particle-state s0-0) 3) + (set! a0-25 #t) + ) + ((= v0-4 (task-status need-introduction)) + (set! v1-59 0) + ) + ((= v0-4 (task-status need-reminder-a)) + (set! v1-59 0) + ) + ((= v0-4 (task-status need-reminder)) + (set! v1-59 1) + ) + ((= v0-4 (task-status need-reward-speech)) + (set! v1-59 2) + ) + ((= v0-4 (task-status need-resolution)) + (set! v1-59 2) + ) + ) + (if (and (!= *kernel-boot-message* 'play) (= v1-59 -1)) + (set! v1-59 0) + ) + (set! (-> obj particles s0-0 init-pos x) (the float (+ sv-192 s2-0))) + (set! (-> obj particles s0-0 init-pos y) (the float (+ s4-1 204))) + (+! s0-0 1) + (when (= sv-208 (-> obj task-index)) + (set! s1-0 v1-59) + (set! s3-0 a0-25) + (set! (-> obj particles 5 init-pos x) (the float (+ sv-192 s2-0))) + (set! (-> obj particles 5 init-pos y) (the float (+ s4-1 204))) + ) + ) + (set! sv-192 (+ sv-192 sv-128)) + (set! sv-208 (+ sv-208 1)) ) - (set! (-> s0-1 origin y) (the float (+ (/ s4-1 2) 175))) - (let ((a0-49 s0-1)) - (set! (-> a0-49 color) (font-color lighter-lighter-blue)) + (dotimes (v1-77 (- 8 (-> s5-0 nb-of-tasks))) + (set! (-> *progress-process* 0 particles s0-0 init-pos x) (the float (+ s2-0 -320))) + (set! (-> obj particles s0-0 init-pos y) (the float (+ s4-1 194))) + (+! s0-0 1) ) - (let ((v1-104 s0-1)) - (set! (-> v1-104 height) (the float 15)) + (when *common-text* + (when (and (!= s1-0 -1) + (> (-> s5-0 nb-of-tasks) 0) + (>= (-> obj task-index) 0) + (< (-> obj task-index) (-> s5-0 nb-of-tasks)) + ) + (let ((s0-1 (new + 'stack + 'font-context + *font-default-matrix* + (- (+ s2-0 32) (-> obj left-x-offset)) + (+ (/ s4-1 2) 125) + 8325000.0 + (font-color yellow-orange) + (font-flags shadow kerning) + ) + ) + ) + (let ((v1-91 s0-1)) + (set! (-> v1-91 width) (the float 328)) + ) + (let ((v1-92 s0-1)) + (set! (-> v1-92 height) (the float 50)) + ) + (let ((v1-93 s0-1)) + (set! (-> v1-93 scale) 0.7) + ) + (set! (-> s0-1 flags) (font-flags shadow kerning middle left large)) + (set! sv-224 print-game-text-scaled) + (let ((a0-47 (lookup-text! *common-text* (-> s5-0 task-info (-> obj task-index) task-name s1-0) #f)) + (a1-57 f30-0) + (a2-15 s0-1) + (a3-2 (the int (* 128.0 f30-0))) + ) + (sv-224 a0-47 a1-57 a2-15 a3-2) + ) + (when s3-0 + (set! (-> s0-1 origin x) (the float (- (+ s2-0 32) (-> obj left-x-offset)))) + (set! (-> s0-1 origin y) (the float (+ (/ s4-1 2) 175))) + (let ((a0-49 s0-1)) + (set! (-> a0-49 color) (font-color lighter-lighter-blue)) + ) + (let ((v1-104 s0-1)) + (set! (-> v1-104 height) (the float 15)) + ) + (let ((v1-105 s0-1)) + (set! (-> v1-105 scale) 0.5) + ) + (print-game-text-scaled + (lookup-text! *common-text* (game-text-id task-completed) #f) + f30-0 + s0-1 + (the int (* 128.0 f30-0)) + ) + ) + ) + ) ) - (let ((v1-105 s0-1)) - (set! (-> v1-105 scale) 0.5) - ) - (print-game-text-scaled - (lookup-text! *common-text* (game-text-id task-completed) #f) - f30-0 - s0-1 - (the int (* 128.0 f30-0)) - ) - ) ) - ) ) - ) ) - ) 0 (none) ) @@ -230,90 +194,81 @@ (hide-progress-icons) (let* ((v1-1 (/ (-> obj transition-offset) 16)) (s4-0 (if (= (-> obj level-transition) 1) - (- (-> obj transition-offset)) - (-> obj transition-offset) - ) - ) + (- (-> obj transition-offset)) + (-> obj transition-offset) + ) + ) (f30-0 (-> obj transition-percentage-invert)) (s3-0 (- v1-1)) ) - (when (-> obj stat-transition) - (set! v1-1 (if (!= (-> obj display-state) (-> obj next-display-state)) - (- (-> obj transition-offset)) - (-> obj transition-offset) - ) - ) - (set! s3-0 v1-1) - (set! s4-0 0) - (set! f30-0 1.0) - ) - (set! - (-> obj particles 15 init-pos x) - (the float (- (+ v1-1 150) (-> obj left-x-offset))) - ) - (set! (-> obj particles 15 init-pos y) (the float (+ s4-0 214))) - (set! (-> obj icons 4 icon-x) (- (+ v1-1 148) (-> obj left-x-offset))) - (set! (-> obj icons 4 icon-y) (+ (-> obj big-orb-y-offset) s4-0)) - (let ((a0-15 (-> obj icons 4 icon 0 root))) - (set-yaw-angle-clear-roll-pitch! - a0-15 - (- (y-angle a0-15) (* 182.04445 (* 4.0 (-> *display* time-adjust-ratio)))) - ) - ) - (let - ((s4-1 - (new - 'stack - 'font-context - *font-default-matrix* - (- (+ s3-0 200) (-> obj left-x-offset)) - (+ (/ s4-0 2) 96) - 8325000.0 - (font-color default) - (font-flags shadow kerning) - ) + (when (-> obj stat-transition) + (set! v1-1 (if (!= (-> obj display-state) (-> obj next-display-state)) + (- (-> obj transition-offset)) + (-> obj transition-offset) + ) + ) + (set! s3-0 v1-1) + (set! s4-0 0) + (set! f30-0 1.0) ) - ) - (let ((v1-19 s4-1)) - (set! (-> v1-19 width) (the float 328)) - ) - (let ((v1-20 s4-1)) - (set! (-> v1-20 height) (the float 70)) - ) - (set! (-> s4-1 flags) (font-flags shadow kerning large)) - (let ((s3-1 print-game-text-scaled)) - (format - (clear *temp-string*) - "~D/~D" - (-> *game-info* money-per-level arg0) - (-> *game-counts* data arg0 money-count) + (set! (-> obj particles 15 init-pos x) (the float (- (+ v1-1 150) (-> obj left-x-offset)))) + (set! (-> obj particles 15 init-pos y) (the float (+ s4-0 214))) + (set! (-> obj icons 4 icon-x) (- (+ v1-1 148) (-> obj left-x-offset))) + (set! (-> obj icons 4 icon-y) (+ (-> obj big-orb-y-offset) s4-0)) + (let ((a0-15 (-> obj icons 4 icon 0 root))) + (set-yaw-angle-clear-roll-pitch! + a0-15 + (- (y-angle a0-15) (* 182.04445 (* 4.0 (-> *display* time-adjust-ratio)))) + ) ) - (s3-1 *temp-string* f30-0 s4-1 (the int (* 128.0 f30-0))) - ) - (let ((v1-26 s4-1)) - (set! (-> v1-26 width) (the float 428)) - ) - (set! (-> s4-1 origin x) (+ -220.0 (-> s4-1 origin x))) - (set! (-> s4-1 origin y) (+ 40.0 (-> s4-1 origin y))) - (set! (-> s4-1 flags) (font-flags shadow kerning middle large)) - (print-game-text-scaled - (lookup-text! *common-text* (game-text-id total-collected) #f) - (* 0.7 f30-0) - s4-1 - (the int (* 128.0 f30-0)) - ) - (set! (-> s4-1 origin y) (+ 15.0 (-> s4-1 origin y))) - (let ((s5-2 print-game-text-scaled)) - (format - (clear *temp-string*) - "~D/~D" - (the int (-> *game-info* money-total)) - (-> obj total-nb-of-orbs) + (let ((s4-1 + (new + 'stack + 'font-context + *font-default-matrix* + (- (+ s3-0 200) (-> obj left-x-offset)) + (+ (/ s4-0 2) 96) + 8325000.0 + (font-color default) + (font-flags shadow kerning) + ) + ) + ) + (let ((v1-19 s4-1)) + (set! (-> v1-19 width) (the float 328)) + ) + (let ((v1-20 s4-1)) + (set! (-> v1-20 height) (the float 70)) + ) + (set! (-> s4-1 flags) (font-flags shadow kerning large)) + (let ((s3-1 print-game-text-scaled)) + (format + (clear *temp-string*) + "~D/~D" + (-> *game-info* money-per-level arg0) + (-> *game-counts* data arg0 money-count) + ) + (s3-1 *temp-string* f30-0 s4-1 (the int (* 128.0 f30-0))) + ) + (let ((v1-26 s4-1)) + (set! (-> v1-26 width) (the float 428)) + ) + (set! (-> s4-1 origin x) (+ -220.0 (-> s4-1 origin x))) + (set! (-> s4-1 origin y) (+ 40.0 (-> s4-1 origin y))) + (set! (-> s4-1 flags) (font-flags shadow kerning middle large)) + (print-game-text-scaled + (lookup-text! *common-text* (game-text-id total-collected) #f) + (* 0.7 f30-0) + s4-1 + (the int (* 128.0 f30-0)) + ) + (set! (-> s4-1 origin y) (+ 15.0 (-> s4-1 origin y))) + (let ((s5-2 print-game-text-scaled)) + (format (clear *temp-string*) "~D/~D" (the int (-> *game-info* money-total)) (-> obj total-nb-of-orbs)) + (s5-2 *temp-string* f30-0 s4-1 (the int (* 128.0 f30-0))) + ) ) - (s5-2 *temp-string* f30-0 s4-1 (the int (* 128.0 f30-0))) - ) ) - ) 0 (none) ) @@ -323,160 +278,143 @@ (let* ((v1-2 (-> *level-task-data* arg0)) (a0-3 (/ (-> obj transition-offset) 16)) (s4-0 (if (= (-> obj level-transition) 1) - (- (-> obj transition-offset)) - (-> obj transition-offset) - ) - ) + (- (-> obj transition-offset)) + (-> obj transition-offset) + ) + ) (f30-0 (-> obj transition-percentage-invert)) (s3-0 (- a0-3)) ) - (when (-> obj stat-transition) - (set! a0-3 (if (!= (-> obj display-state) (-> obj next-display-state)) - (- (-> obj transition-offset)) - (-> obj transition-offset) - ) - ) - (set! s3-0 a0-3) - (set! s4-0 0) - (set! f30-0 1.0) - ) - (set! - (-> obj particles 14 init-pos x) - (the float (- (+ a0-3 150) (-> obj left-x-offset))) - ) - (set! (-> obj particles 14 init-pos y) (the float (+ s4-0 214))) - (let ((s2-0 0)) - (let ((a1-8 (-> v1-2 buzzer-task-index))) - (if (!= a1-8 -1) - (set! s2-0 (buzzer-count *game-info* (-> v1-2 task-info a1-8 task-id))) + (when (-> obj stat-transition) + (set! a0-3 (if (!= (-> obj display-state) (-> obj next-display-state)) + (- (-> obj transition-offset)) + (-> obj transition-offset) + ) + ) + (set! s3-0 a0-3) + (set! s4-0 0) + (set! f30-0 1.0) ) - ) - (let - ((s4-1 - (new - 'stack - 'font-context - *font-default-matrix* - (- (+ s3-0 200) (-> obj left-x-offset)) - (+ (/ s4-0 2) 96) - 8325000.0 - (font-color default) - (font-flags shadow kerning) + (set! (-> obj particles 14 init-pos x) (the float (- (+ a0-3 150) (-> obj left-x-offset)))) + (set! (-> obj particles 14 init-pos y) (the float (+ s4-0 214))) + (let ((s2-0 0)) + (let ((a1-8 (-> v1-2 buzzer-task-index))) + (if (!= a1-8 -1) + (set! s2-0 (buzzer-count *game-info* (-> v1-2 task-info a1-8 task-id))) + ) + ) + (let ((s4-1 + (new + 'stack + 'font-context + *font-default-matrix* + (- (+ s3-0 200) (-> obj left-x-offset)) + (+ (/ s4-0 2) 96) + 8325000.0 + (font-color default) + (font-flags shadow kerning) + ) + ) + ) + (let ((v1-9 s4-1)) + (set! (-> v1-9 width) (the float 328)) + ) + (let ((v1-10 s4-1)) + (set! (-> v1-10 height) (the float 70)) + ) + (set! (-> s4-1 flags) (font-flags shadow kerning large)) + (let ((s3-1 print-game-text-scaled)) + (format (clear *temp-string*) "~D/~D" s2-0 (-> *game-counts* data arg0 buzzer-count)) + (s3-1 *temp-string* f30-0 s4-1 (the int (* 128.0 f30-0))) + ) + (let ((v1-14 s4-1)) + (set! (-> v1-14 width) (the float 428)) + ) + (set! (-> s4-1 origin x) (+ -220.0 (-> s4-1 origin x))) + (set! (-> s4-1 origin y) (+ 40.0 (-> s4-1 origin y))) + (set! (-> s4-1 flags) (font-flags shadow kerning middle large)) + (print-game-text-scaled + (lookup-text! *common-text* (game-text-id total-collected) #f) + (* 0.7 f30-0) + s4-1 + (the int (* 128.0 f30-0)) + ) + (set! (-> s4-1 origin y) (+ 15.0 (-> s4-1 origin y))) + (let ((s5-2 print-game-text-scaled)) + (format (clear *temp-string*) "~D/~D" (the int (-> *game-info* buzzer-total)) (-> obj total-nb-of-buzzers)) + (s5-2 *temp-string* f30-0 s4-1 (the int (* 128.0 f30-0))) + ) ) - ) ) - (let ((v1-9 s4-1)) - (set! (-> v1-9 width) (the float 328)) - ) - (let ((v1-10 s4-1)) - (set! (-> v1-10 height) (the float 70)) - ) - (set! (-> s4-1 flags) (font-flags shadow kerning large)) - (let ((s3-1 print-game-text-scaled)) - (format - (clear *temp-string*) - "~D/~D" - s2-0 - (-> *game-counts* data arg0 buzzer-count) - ) - (s3-1 *temp-string* f30-0 s4-1 (the int (* 128.0 f30-0))) - ) - (let ((v1-14 s4-1)) - (set! (-> v1-14 width) (the float 428)) - ) - (set! (-> s4-1 origin x) (+ -220.0 (-> s4-1 origin x))) - (set! (-> s4-1 origin y) (+ 40.0 (-> s4-1 origin y))) - (set! (-> s4-1 flags) (font-flags shadow kerning middle large)) - (print-game-text-scaled - (lookup-text! *common-text* (game-text-id total-collected) #f) - (* 0.7 f30-0) - s4-1 - (the int (* 128.0 f30-0)) - ) - (set! (-> s4-1 origin y) (+ 15.0 (-> s4-1 origin y))) - (let ((s5-2 print-game-text-scaled)) - (format - (clear *temp-string*) - "~D/~D" - (the int (-> *game-info* buzzer-total)) - (-> obj total-nb-of-buzzers) - ) - (s5-2 *temp-string* f30-0 s4-1 (the int (* 128.0 f30-0))) - ) - ) ) - ) 0 (none) ) -(defmethod - draw-memcard-storage-error - progress - ((obj progress) (arg0 font-context)) +(defmethod draw-memcard-storage-error progress ((obj progress) (arg0 font-context)) (let ((v1-0 arg0)) - (set! (-> v1-0 scale) 0.55) - ) + (set! (-> v1-0 scale) 0.55) + ) (let ((v1-1 arg0)) - (set! (-> v1-1 width) (the float 265)) - ) + (set! (-> v1-1 width) (the float 265)) + ) (let ((v1-2 arg0)) - (set! (-> v1-2 height) (the float 55)) - ) + (set! (-> v1-2 height) (the float 55)) + ) (set! (-> arg0 flags) (font-flags shadow kerning middle left large)) (let ((s4-0 (game-text-id card-not-formatted-title))) - (case (-> obj display-state) - (((progress-screen memcard-no-space)) - (set! s4-0 (game-text-id memcard-no-space)) + (case (-> obj display-state) + (((progress-screen memcard-no-space)) + (set! s4-0 (game-text-id memcard-no-space)) + ) + (((progress-screen memcard-not-inserted)) + (set! s4-0 (game-text-id memcard-not-inserted)) + ) + ) + (let ((s3-0 print-game-text-scaled)) + (format (clear *temp-string*) (lookup-text! *common-text* s4-0 #f) 1) + (s3-0 *temp-string* (-> obj transition-percentage-invert) arg0 128) ) - (((progress-screen memcard-not-inserted)) - (set! s4-0 (game-text-id memcard-not-inserted)) - ) ) - (let ((s3-0 print-game-text-scaled)) - (format (clear *temp-string*) (lookup-text! *common-text* s4-0 #f) 1) - (s3-0 *temp-string* (-> obj transition-percentage-invert) arg0 128) - ) - ) (set! (-> arg0 origin x) (the float (- 20 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 70.0) (let ((v1-12 arg0)) - (set! (-> v1-12 width) (the float 350)) - ) - (let ((v1-13 arg0)) - (set! (-> v1-13 height) (the float 40)) - ) - (let ((s4-1 print-game-text-scaled)) - (format - (clear *temp-string*) - (lookup-text! *common-text* (game-text-id memcard-space-requirement1) #f) - (if (-> obj card-info) - (-> obj card-info mem-required) - 0 - ) + (set! (-> v1-12 width) (the float 350)) + ) + (let ((v1-13 arg0)) + (set! (-> v1-13 height) (the float 40)) + ) + (let ((s4-1 print-game-text-scaled)) + (format + (clear *temp-string*) + (lookup-text! *common-text* (game-text-id memcard-space-requirement1) #f) + (if (-> obj card-info) + (-> obj card-info mem-required) + 0 + ) + ) + (s4-1 *temp-string* (-> obj transition-percentage-invert) arg0 128) ) - (s4-1 *temp-string* (-> obj transition-percentage-invert) arg0 128) - ) (set! (-> arg0 origin y) 115.0) (let ((v1-17 arg0)) - (set! (-> v1-17 height) (the float 60)) - ) + (set! (-> v1-17 height) (the float 60)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id memcard-space-requirement2) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id memcard-space-requirement2) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) (let ((v1-19 arg0)) - (set! (-> v1-19 scale) 0.65) - ) + (set! (-> v1-19 scale) 0.65) + ) (set! (-> arg0 origin y) 160.0) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id continue?) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id continue?) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) 0 (none) ) @@ -484,706 +422,618 @@ (defmethod draw-memcard-format progress ((obj progress) (arg0 font-context)) (set! (-> arg0 origin y) 35.0) (let ((v1-0 arg0)) - (set! (-> v1-0 scale) 0.55) - ) + (set! (-> v1-0 scale) 0.55) + ) (let ((v1-1 arg0)) - (set! (-> v1-1 width) (the float 265)) - ) + (set! (-> v1-1 width) (the float 265)) + ) (let ((v1-2 arg0)) - (set! (-> v1-2 height) (the float 55)) - ) + (set! (-> v1-2 height) (the float 55)) + ) (set! (-> arg0 flags) (font-flags shadow kerning middle left large)) (let ((s4-0 print-game-text-scaled)) - (format - (clear *temp-string*) - (lookup-text! *common-text* (game-text-id card-not-formatted-title) #f) - 1 + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id card-not-formatted-title) #f) 1) + (s4-0 *temp-string* (-> obj transition-percentage-invert) arg0 128) ) - (s4-0 *temp-string* (-> obj transition-percentage-invert) arg0 128) - ) (set! (-> arg0 origin x) (the float (- 20 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 105.0) (let ((v1-7 arg0)) - (set! (-> v1-7 width) (the float 360)) - ) + (set! (-> v1-7 width) (the float 360)) + ) (let ((v1-8 arg0)) - (set! (-> v1-8 height) (the float 40)) - ) + (set! (-> v1-8 height) (the float 40)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id card-not-formatted-msg) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id card-not-formatted-msg) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) (let ((v1-10 arg0)) - (set! (-> v1-10 scale) 0.65) - ) + (set! (-> v1-10 scale) 0.65) + ) (set! (-> arg0 origin y) 138.0) (let ((v1-11 arg0)) - (set! (-> v1-11 height) (the float 60)) - ) + (set! (-> v1-11 height) (the float 60)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id format?) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id format?) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) 0 (none) ) (defmethod draw-memcard-data-exists progress ((obj progress) (arg0 font-context)) (let ((v1-0 arg0)) - (set! (-> v1-0 scale) 0.65) - ) + (set! (-> v1-0 scale) 0.65) + ) (set! (-> arg0 flags) (font-flags shadow kerning middle left large)) (set! (-> arg0 origin x) (the float (- 20 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 55.0) (let ((v1-4 arg0)) - (set! (-> v1-4 width) (the float 365)) - ) + (set! (-> v1-4 width) (the float 365)) + ) (let ((v1-5 arg0)) - (set! (-> v1-5 height) (the float 75)) - ) + (set! (-> v1-5 height) (the float 75)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id save-data-already-exists) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id save-data-already-exists) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) (set! (-> arg0 origin y) 140.0) (let ((v1-7 arg0)) - (set! (-> v1-7 width) (the float 360)) - ) + (set! (-> v1-7 width) (the float 360)) + ) (let ((v1-8 arg0)) - (set! (-> v1-8 height) (the float 40)) - ) + (set! (-> v1-8 height) (the float 40)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id overwrite?) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id overwrite?) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) 0 (none) ) (defmethod draw-memcard-no-data progress ((obj progress) (arg0 font-context)) (let ((v1-0 arg0)) - (set! (-> v1-0 scale) 0.65) - ) + (set! (-> v1-0 scale) 0.65) + ) (set! (-> arg0 flags) (font-flags shadow kerning middle left large)) (set! (-> arg0 origin x) (the float (- 20 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 40.0) (let ((v1-4 arg0)) - (set! (-> v1-4 width) (the float 365)) - ) - (let ((v1-5 arg0)) - (set! (-> v1-5 height) (the float 75)) - ) - (let ((s4-0 print-game-text-scaled)) - (format - (clear *temp-string*) - (lookup-text! *common-text* (game-text-id no-save-data) #f) - 1 + (set! (-> v1-4 width) (the float 365)) + ) + (let ((v1-5 arg0)) + (set! (-> v1-5 height) (the float 75)) + ) + (let ((s4-0 print-game-text-scaled)) + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id no-save-data) #f) 1) + (s4-0 *temp-string* (-> obj transition-percentage-invert) arg0 128) ) - (s4-0 *temp-string* (-> obj transition-percentage-invert) arg0 128) - ) (set! (-> arg0 origin y) 130.0) (let ((v1-7 arg0)) - (set! (-> v1-7 width) (the float 360)) - ) + (set! (-> v1-7 width) (the float 360)) + ) (let ((v1-8 arg0)) - (set! (-> v1-8 height) (the float 40)) - ) + (set! (-> v1-8 height) (the float 40)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id create-save-data?) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id create-save-data?) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) 0 (none) ) (defmethod draw-memcard-accessing progress ((obj progress) (arg0 font-context)) (let ((v1-0 arg0)) - (set! (-> v1-0 scale) 1.0) - ) + (set! (-> v1-0 scale) 1.0) + ) (set! (-> arg0 flags) (font-flags shadow kerning middle left large)) (set! (-> arg0 origin x) (the float (- 20 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 35.0) (let ((v1-4 arg0)) - (set! (-> v1-4 width) (the float 365)) - ) + (set! (-> v1-4 width) (the float 365)) + ) (let ((v1-5 arg0)) - (set! (-> v1-5 height) (the float 75)) - ) - (when - (or - (< (mod (-> *display* real-frame-counter) 300) 150) - (!= (-> obj transition-percentage-invert) 1.0) + (set! (-> v1-5 height) (the float 75)) ) - (let ((a1-1 (game-text-id loading-data))) - (case (-> obj display-state) - (((progress-screen memcard-saving)) - (set! a1-1 (game-text-id saving-data)) - ) - (((progress-screen memcard-formatting)) - (set! a1-1 (game-text-id formatting)) + (when (or (< (mod (-> *display* real-frame-counter) 300) 150) (!= (-> obj transition-percentage-invert) 1.0)) + (let ((a1-1 (game-text-id loading-data))) + (case (-> obj display-state) + (((progress-screen memcard-saving)) + (set! a1-1 (game-text-id saving-data)) + ) + (((progress-screen memcard-formatting)) + (set! a1-1 (game-text-id formatting)) + ) + (((progress-screen memcard-creating)) + (set! a1-1 (game-text-id creating-save-data)) + ) + ) + (print-game-text-scaled (lookup-text! *common-text* a1-1 #f) (-> obj transition-percentage-invert) arg0 128) ) - (((progress-screen memcard-creating)) - (set! a1-1 (game-text-id creating-save-data)) - ) - ) - (print-game-text-scaled - (lookup-text! *common-text* a1-1 #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) ) - ) (let ((v1-18 arg0)) - (set! (-> v1-18 scale) 0.65) - ) + (set! (-> v1-18 scale) 0.65) + ) (set! (-> arg0 flags) (font-flags shadow kerning middle left large)) (set! (-> arg0 origin x) (the float (- 15 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 100.0) (let ((v1-22 arg0)) - (set! (-> v1-22 width) (the float 370)) - ) - (let ((v1-23 arg0)) - (set! (-> v1-23 height) (the float 75)) - ) - (let ((s4-1 print-game-text-scaled)) - (format - (clear *temp-string*) - (lookup-text! *common-text* (game-text-id do-not-remove-mem-card) #f) - 1 + (set! (-> v1-22 width) (the float 370)) + ) + (let ((v1-23 arg0)) + (set! (-> v1-23 height) (the float 75)) + ) + (let ((s4-1 print-game-text-scaled)) + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id do-not-remove-mem-card) #f) 1) + (s4-1 *temp-string* (-> obj transition-percentage-invert) arg0 128) ) - (s4-1 *temp-string* (-> obj transition-percentage-invert) arg0 128) - ) 0 (none) ) (defmethod draw-memcard-insert progress ((obj progress) (arg0 font-context)) (let ((v1-0 arg0)) - (set! (-> v1-0 scale) 0.65) - ) + (set! (-> v1-0 scale) 0.65) + ) (set! (-> arg0 flags) (font-flags shadow kerning middle left large)) (set! (-> arg0 origin x) (the float (- 50 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 35.0) (let ((v1-4 arg0)) - (set! (-> v1-4 width) (the float 310)) - ) - (let ((v1-5 arg0)) - (set! (-> v1-5 height) (the float 110)) - ) - (let ((s4-0 print-game-text-scaled)) - (format - (clear *temp-string*) - (lookup-text! *common-text* (game-text-id insert-memcard) #f) - 1 + (set! (-> v1-4 width) (the float 310)) + ) + (let ((v1-5 arg0)) + (set! (-> v1-5 height) (the float 110)) + ) + (let ((s4-0 print-game-text-scaled)) + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id insert-memcard) #f) 1) + (s4-0 *temp-string* (-> obj transition-percentage-invert) arg0 128) ) - (s4-0 *temp-string* (-> obj transition-percentage-invert) arg0 128) - ) (let ((v1-7 arg0)) - (set! (-> v1-7 scale) 0.65) - ) + (set! (-> v1-7 scale) 0.65) + ) (set! (-> arg0 origin y) 130.0) (let ((v1-8 arg0)) - (set! (-> v1-8 height) (the float 60)) - ) + (set! (-> v1-8 height) (the float 60)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id back?) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id back?) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) 0 (none) ) (defmethod draw-memcard-file-select progress ((obj progress) (arg0 font-context)) (local-vars - (sv-16 (function _varargs_ object)) - (sv-32 (function _varargs_ object)) - (sv-48 (function _varargs_ object)) - (sv-64 (function _varargs_ object)) - (sv-80 (function _varargs_ object)) - (sv-96 (function _varargs_ object)) - (sv-112 (function _varargs_ object)) - (sv-128 (function _varargs_ object)) - (sv-144 (function _varargs_ object)) - ) + (sv-16 (function _varargs_ object)) + (sv-32 (function _varargs_ object)) + (sv-48 (function _varargs_ object)) + (sv-64 (function _varargs_ object)) + (sv-80 (function _varargs_ object)) + (sv-96 (function _varargs_ object)) + (sv-112 (function _varargs_ object)) + (sv-128 (function _varargs_ object)) + (sv-144 (function _varargs_ object)) + ) (let ((s4-0 (* (+ (-> obj transition-offset) -256) 2))) - (if (< s4-0 0) - (set! s4-0 0) + (if (< s4-0 0) + (set! s4-0 0) + ) + (if (< 500 s4-0) + (set! s4-0 700) + ) + (set! (-> obj particles 19 init-pos x) (the float (- (- 202 (adjust-pos s4-0 150)) (-> obj left-x-offset)))) + (set! (-> obj particles 20 init-pos x) (the float (- (+ (adjust-pos s4-0 100) 202) (-> obj left-x-offset)))) + (set! (-> obj particles 21 init-pos x) (the float (- (- 202 (adjust-pos s4-0 50)) (-> obj left-x-offset)))) + (set! (-> obj particles 22 init-pos x) (the float (- (+ s4-0 202) (-> obj left-x-offset)))) ) - (if (< 500 s4-0) - (set! s4-0 700) - ) - (set! - (-> obj particles 19 init-pos x) - (the float (- (- 202 (adjust-pos s4-0 150)) (-> obj left-x-offset))) - ) - (set! - (-> obj particles 20 init-pos x) - (the float (- (+ (adjust-pos s4-0 100) 202) (-> obj left-x-offset))) - ) - (set! - (-> obj particles 21 init-pos x) - (the float (- (- 202 (adjust-pos s4-0 50)) (-> obj left-x-offset))) - ) - (set! - (-> obj particles 22 init-pos x) - (the float (- (+ s4-0 202) (-> obj left-x-offset))) - ) - ) (cond - ((= (-> *setting-control* current video-mode) 'pal) - (set! (-> obj particles 21 init-pos y) 256.0) - (set! (-> obj particles 22 init-pos y) 338.0) + ((= (-> *setting-control* current video-mode) 'pal) + (set! (-> obj particles 21 init-pos y) 256.0) + (set! (-> obj particles 22 init-pos y) 338.0) + ) + (else + (set! (-> obj particles 21 init-pos y) 255.0) + (set! (-> obj particles 22 init-pos y) 336.0) + ) ) - (else - (set! (-> obj particles 21 init-pos y) 255.0) - (set! (-> obj particles 22 init-pos y) 336.0) - ) - ) (let ((f0-13 (* 2.0 (+ -0.5 (-> obj transition-percentage-invert))))) - 128 - (if (< f0-13 0.0) - (set! f0-13 0.0) - ) - (let ((s4-1 (the int (* 128.0 f0-13)))) - (let ((v1-29 arg0)) - (set! (-> v1-29 scale) 0.5) - ) - (set! (-> arg0 flags) (font-flags shadow kerning middle left large)) - (set! (-> arg0 origin x) (the float (- 102 (-> obj left-x-offset)))) - (set! (-> arg0 origin y) 5.0) - (let ((v1-33 arg0)) - (set! (-> v1-33 width) (the float 200)) - ) - (let ((v1-34 arg0)) - (set! (-> v1-34 height) (the float 20)) - ) - (print-game-text - (lookup-text! - *common-text* - (the-as - game-text-id - (if (= (-> obj display-state) (progress-screen load-game)) - 321 - 320 + 128 + (if (< f0-13 0.0) + (set! f0-13 0.0) + ) + (let ((s4-1 (the int (* 128.0 f0-13)))) + (let ((v1-29 arg0)) + (set! (-> v1-29 scale) 0.5) ) - ) - #f - ) - arg0 - #f - s4-1 - 22 - ) - (set! (-> arg0 origin y) 26.0) - (let ((v1-37 arg0)) - (set! (-> v1-37 height) (the float 20)) - ) - (let ((s3-3 (-> obj card-info)) - (s2-0 23) - ) - (dotimes (s1-0 4) - (set! (-> arg0 origin x) (the float (- 41 (-> obj left-x-offset)))) (set! (-> arg0 flags) (font-flags shadow kerning middle left large)) - (let ((a0-17 arg0)) - (set! (-> a0-17 color) (font-color default)) - ) - (let ((v1-42 arg0)) - (set! (-> v1-42 width) (the float 320)) - ) - (cond - ((and - s3-3 - (= (-> s3-3 formatted) 1) - (= (-> s3-3 inited) 1) - (= (-> s3-3 file s1-0 present) 1) - ) - (set! - (-> obj particles s2-0 init-pos x) - (the float (- 66 (-> obj left-x-offset))) - ) - (let ((v1-57 arg0)) - (set! (-> v1-57 scale) 0.6) - ) - (if - (and - (< (-> s3-3 file s1-0 level-index) (length *level-task-data-remap*)) - (> (-> s3-3 file s1-0 level-index) 0) - ) - (print-game-text - (lookup-text! - *common-text* - (-> - *level-task-data* - (-> *level-task-data-remap* (+ (-> s3-3 file s1-0 level-index) -1)) - level-name-id - ) - #f - ) - arg0 - #f - s4-1 - 22 - ) - (print-game-text "OLD SAVE GAME" arg0 #f s4-1 22) - ) - (let ((a0-28 arg0)) - (set! (-> a0-28 color) (font-color blue-white)) - ) - (cond - ((or - (>= - 600 - (- - (-> *display* real-frame-counter) - (-> obj last-option-index-change) - ) - ) - (or - (< - (mod - (- - (-> *display* real-frame-counter) - (-> obj last-option-index-change) - ) - 1200 - ) - 600 - ) - (!= (-> obj option-index) s1-0) - (-> obj in-transition) - ) - ) - (let ((v1-87 arg0)) - (set! (-> v1-87 scale) 0.5) - ) - (set! (-> arg0 origin y) (+ 16.0 (-> arg0 origin y))) - (set! (-> arg0 flags) (font-flags shadow kerning middle large)) - (set! (-> arg0 origin x) (the float (- -73 (-> obj left-x-offset)))) - (let ((v1-91 arg0)) - (set! (-> v1-91 width) (the float 350)) - ) - (let ((s0-2 print-game-text)) - (set! sv-16 format) - (let ((a0-40 (clear *temp-string*)) - (a1-13 "~D") - (a2-5 (the int (-> s3-3 file s1-0 fuel-cell-count))) - ) - (sv-16 a0-40 a1-13 a2-5) - ) - (s0-2 *temp-string* arg0 #f s4-1 22) - ) - (set! (-> arg0 origin x) (the float (- 1 (-> obj left-x-offset)))) - (let ((s0-3 print-game-text)) - (set! sv-32 format) - (let ((a0-44 (clear *temp-string*)) - (a1-15 "~D") - (a2-7 (the int (-> s3-3 file s1-0 money-count))) - ) - (sv-32 a0-44 a1-15 a2-7) - ) - (s0-3 *temp-string* arg0 #f s4-1 22) - ) - (set! (-> arg0 origin x) (the float (- 79 (-> obj left-x-offset)))) - (let ((s0-4 print-game-text)) - (set! sv-48 format) - (let ((a0-48 (clear *temp-string*)) - (a1-17 "~D") - (a2-9 (the int (-> s3-3 file s1-0 buzzer-count))) - ) - (sv-48 a0-48 a1-17 a2-9) - ) - (s0-4 *temp-string* arg0 #f s4-1 22) - ) - (set! (-> arg0 origin y) (+ 1.0 (-> arg0 origin y))) - (let ((v1-108 arg0)) - (set! (-> v1-108 scale) 1.0) - ) - (set! (-> arg0 flags) (font-flags shadow kerning right large)) - (set! (-> arg0 origin x) (the float (- 352 (-> obj left-x-offset)))) - (let ((s0-5 print-game-text)) - (set! sv-64 format) - (let ((a0-52 (clear *temp-string*)) - (a1-19 "~D%") - (a2-11 (the int (-> s3-3 file s1-0 completion-percentage))) - ) - (sv-64 a0-52 a1-19 a2-11) - ) - (s0-5 *temp-string* arg0 #f s4-1 22) - ) - (let ((v1-116 arg0)) - (set! (-> v1-116 scale) 0.5) - ) - (set! (-> arg0 origin y) (+ 9.0 (-> arg0 origin y))) - (set! (-> arg0 flags) (font-flags shadow kerning large)) - (set! (-> arg0 origin x) (the float (- 85 (-> obj left-x-offset)))) - (let ((s0-6 print-game-text)) - (set! sv-80 format) - (let ((a0-56 (clear *temp-string*)) - (a1-21 "/~D") - (a2-17 - (if (< 100 (the int (-> s3-3 file s1-0 fuel-cell-count))) - (-> obj total-nb-of-power-cells) - 100 - ) + (set! (-> arg0 origin x) (the float (- 102 (-> obj left-x-offset)))) + (set! (-> arg0 origin y) 5.0) + (let ((v1-33 arg0)) + (set! (-> v1-33 width) (the float 200)) + ) + (let ((v1-34 arg0)) + (set! (-> v1-34 height) (the float 20)) + ) + (print-game-text + (lookup-text! + *common-text* + (the-as game-text-id (if (= (-> obj display-state) (progress-screen load-game)) + 321 + 320 + ) ) - ) - (sv-80 a0-56 a1-21 a2-17) - ) - (s0-6 *temp-string* arg0 #f s4-1 22) - ) - (set! (-> arg0 origin x) (the float (- 150 (-> obj left-x-offset)))) - (let ((s0-7 print-game-text)) - (set! sv-96 format) - (let ((a0-60 (clear *temp-string*)) - (a1-23 "/~D") - (a2-19 (-> obj total-nb-of-orbs)) - ) - (sv-96 a0-60 a1-23 a2-19) - ) - (s0-7 *temp-string* arg0 #f s4-1 22) - ) - (set! (-> arg0 origin x) (the float (- 238 (-> obj left-x-offset)))) - (let ((s0-8 print-game-text)) - (set! sv-112 format) - (let ((a0-64 (clear *temp-string*)) - (a1-25 "/~D") - (a2-21 (-> obj total-nb-of-buzzers)) - ) - (sv-112 a0-64 a1-25 a2-21) - ) - (s0-8 *temp-string* arg0 #f s4-1 22) - ) - (set! (-> arg0 origin y) (+ 15.0 (-> arg0 origin y))) + #f ) - (else - (set! (-> arg0 origin y) (+ 18.0 (-> arg0 origin y))) - (set! (-> arg0 origin x) (the float (- 28 (-> obj left-x-offset)))) - (let ((v1-131 arg0)) - (set! (-> v1-131 scale) 0.8) - ) - (set! (-> arg0 flags) (font-flags shadow kerning middle large)) - (let ((v1-133 arg0)) - (set! (-> v1-133 width) (the float 350)) - ) + arg0 + #f + s4-1 + 22 + ) + (set! (-> arg0 origin y) 26.0) + (let ((v1-37 arg0)) + (set! (-> v1-37 height) (the float 20)) + ) + (let ((s3-3 (-> obj card-info)) + (s2-0 23) + ) + (dotimes (s1-0 4) + (set! (-> arg0 origin x) (the float (- 41 (-> obj left-x-offset)))) + (set! (-> arg0 flags) (font-flags shadow kerning middle left large)) + (let ((a0-17 arg0)) + (set! (-> a0-17 color) (font-color default)) + ) + (let ((v1-42 arg0)) + (set! (-> v1-42 width) (the float 320)) + ) (cond - ((= (scf-get-territory) 1) - (let ((s0-10 print-game-text)) - (set! sv-128 format) - (let ((a0-69 (clear *temp-string*)) - (a1-27 "~X/~X/20~2X ~2X:~2X") - (a2-23 (-> s3-3 file s1-0 day)) - (a3-10 (-> s3-3 file s1-0 month)) - (t0-10 (-> s3-3 file s1-0 year)) - (t1-0 (-> s3-3 file s1-0 hour)) - (t2-0 (-> s3-3 file s1-0 minute)) + ((and s3-3 (= (-> s3-3 formatted) 1) (= (-> s3-3 inited) 1) (= (-> s3-3 file s1-0 present) 1)) + (set! (-> obj particles s2-0 init-pos x) (the float (- 66 (-> obj left-x-offset)))) + (let ((v1-57 arg0)) + (set! (-> v1-57 scale) 0.6) + ) + (if (and (< (-> s3-3 file s1-0 level-index) (length *level-task-data-remap*)) + (> (-> s3-3 file s1-0 level-index) 0) + ) + (print-game-text + (lookup-text! + *common-text* + (-> *level-task-data* (-> *level-task-data-remap* (+ (-> s3-3 file s1-0 level-index) -1)) level-name-id) + #f + ) + arg0 + #f + s4-1 + 22 ) - (sv-128 a0-69 a1-27 a2-23 a3-10 t0-10 t1-0 t2-0) - ) - (s0-10 *temp-string* arg0 #f s4-1 22) - ) - ) - (else - (let ((s0-11 print-game-text)) - (set! sv-144 format) - (let ((a0-72 (clear *temp-string*)) - (a1-29 "~X/~X/20~2X ~2X:~2X") - (a2-25 (-> s3-3 file s1-0 month)) - (a3-12 (-> s3-3 file s1-0 day)) - (t0-12 (-> s3-3 file s1-0 year)) - (t1-1 (-> s3-3 file s1-0 hour)) - (t2-1 (-> s3-3 file s1-0 minute)) + (print-game-text "OLD SAVE GAME" arg0 #f s4-1 22) + ) + (let ((a0-28 arg0)) + (set! (-> a0-28 color) (font-color blue-white)) + ) + (cond + ((or (>= 600 (- (-> *display* real-frame-counter) (-> obj last-option-index-change))) + (or (< (mod (- (-> *display* real-frame-counter) (-> obj last-option-index-change)) 1200) 600) + (!= (-> obj option-index) s1-0) + (-> obj in-transition) + ) + ) + (let ((v1-87 arg0)) + (set! (-> v1-87 scale) 0.5) + ) + (set! (-> arg0 origin y) (+ 16.0 (-> arg0 origin y))) + (set! (-> arg0 flags) (font-flags shadow kerning middle large)) + (set! (-> arg0 origin x) (the float (- -73 (-> obj left-x-offset)))) + (let ((v1-91 arg0)) + (set! (-> v1-91 width) (the float 350)) + ) + (let ((s0-2 print-game-text)) + (set! sv-16 format) + (let ((a0-40 (clear *temp-string*)) + (a1-13 "~D") + (a2-5 (the int (-> s3-3 file s1-0 fuel-cell-count))) + ) + (sv-16 a0-40 a1-13 a2-5) + ) + (s0-2 *temp-string* arg0 #f s4-1 22) + ) + (set! (-> arg0 origin x) (the float (- 1 (-> obj left-x-offset)))) + (let ((s0-3 print-game-text)) + (set! sv-32 format) + (let ((a0-44 (clear *temp-string*)) + (a1-15 "~D") + (a2-7 (the int (-> s3-3 file s1-0 money-count))) + ) + (sv-32 a0-44 a1-15 a2-7) + ) + (s0-3 *temp-string* arg0 #f s4-1 22) + ) + (set! (-> arg0 origin x) (the float (- 79 (-> obj left-x-offset)))) + (let ((s0-4 print-game-text)) + (set! sv-48 format) + (let ((a0-48 (clear *temp-string*)) + (a1-17 "~D") + (a2-9 (the int (-> s3-3 file s1-0 buzzer-count))) + ) + (sv-48 a0-48 a1-17 a2-9) + ) + (s0-4 *temp-string* arg0 #f s4-1 22) + ) + (set! (-> arg0 origin y) (+ 1.0 (-> arg0 origin y))) + (let ((v1-108 arg0)) + (set! (-> v1-108 scale) 1.0) + ) + (set! (-> arg0 flags) (font-flags shadow kerning right large)) + (set! (-> arg0 origin x) (the float (- 352 (-> obj left-x-offset)))) + (let ((s0-5 print-game-text)) + (set! sv-64 format) + (let ((a0-52 (clear *temp-string*)) + (a1-19 "~D%") + (a2-11 (the int (-> s3-3 file s1-0 completion-percentage))) + ) + (sv-64 a0-52 a1-19 a2-11) + ) + (s0-5 *temp-string* arg0 #f s4-1 22) + ) + (let ((v1-116 arg0)) + (set! (-> v1-116 scale) 0.5) + ) + (set! (-> arg0 origin y) (+ 9.0 (-> arg0 origin y))) + (set! (-> arg0 flags) (font-flags shadow kerning large)) + (set! (-> arg0 origin x) (the float (- 85 (-> obj left-x-offset)))) + (let ((s0-6 print-game-text)) + (set! sv-80 format) + (let ((a0-56 (clear *temp-string*)) + (a1-21 "/~D") + (a2-17 (if (< 100 (the int (-> s3-3 file s1-0 fuel-cell-count))) + (-> obj total-nb-of-power-cells) + 100 + ) + ) + ) + (sv-80 a0-56 a1-21 a2-17) + ) + (s0-6 *temp-string* arg0 #f s4-1 22) + ) + (set! (-> arg0 origin x) (the float (- 150 (-> obj left-x-offset)))) + (let ((s0-7 print-game-text)) + (set! sv-96 format) + (let ((a0-60 (clear *temp-string*)) + (a1-23 "/~D") + (a2-19 (-> obj total-nb-of-orbs)) + ) + (sv-96 a0-60 a1-23 a2-19) + ) + (s0-7 *temp-string* arg0 #f s4-1 22) + ) + (set! (-> arg0 origin x) (the float (- 238 (-> obj left-x-offset)))) + (let ((s0-8 print-game-text)) + (set! sv-112 format) + (let ((a0-64 (clear *temp-string*)) + (a1-25 "/~D") + (a2-21 (-> obj total-nb-of-buzzers)) + ) + (sv-112 a0-64 a1-25 a2-21) + ) + (s0-8 *temp-string* arg0 #f s4-1 22) + ) + (set! (-> arg0 origin y) (+ 15.0 (-> arg0 origin y))) + ) + (else + (set! (-> arg0 origin y) (+ 18.0 (-> arg0 origin y))) + (set! (-> arg0 origin x) (the float (- 28 (-> obj left-x-offset)))) + (let ((v1-131 arg0)) + (set! (-> v1-131 scale) 0.8) ) - (sv-144 a0-72 a1-29 a2-25 a3-12 t0-12 t1-1 t2-1) - ) - (s0-11 *temp-string* arg0 #f s4-1 22) + (set! (-> arg0 flags) (font-flags shadow kerning middle large)) + (let ((v1-133 arg0)) + (set! (-> v1-133 width) (the float 350)) + ) + (cond + ((= (scf-get-territory) 1) + (let ((s0-10 print-game-text)) + (set! sv-128 format) + (let ((a0-69 (clear *temp-string*)) + (a1-27 "~X/~X/20~2X ~2X:~2X") + (a2-23 (-> s3-3 file s1-0 day)) + (a3-10 (-> s3-3 file s1-0 month)) + (t0-10 (-> s3-3 file s1-0 year)) + (t1-0 (-> s3-3 file s1-0 hour)) + (t2-0 (-> s3-3 file s1-0 minute)) + ) + (sv-128 a0-69 a1-27 a2-23 a3-10 t0-10 t1-0 t2-0) + ) + (s0-10 *temp-string* arg0 #f s4-1 22) + ) + ) + (else + (let ((s0-11 print-game-text)) + (set! sv-144 format) + (let ((a0-72 (clear *temp-string*)) + (a1-29 "~X/~X/20~2X ~2X:~2X") + (a2-25 (-> s3-3 file s1-0 month)) + (a3-12 (-> s3-3 file s1-0 day)) + (t0-12 (-> s3-3 file s1-0 year)) + (t1-1 (-> s3-3 file s1-0 hour)) + (t2-1 (-> s3-3 file s1-0 minute)) + ) + (sv-144 a0-72 a1-29 a2-25 a3-12 t0-12 t1-1 t2-1) + ) + (s0-11 *temp-string* arg0 #f s4-1 22) + ) + ) + ) + (set! (-> obj particles s2-0 init-pos x) -320.0) + (set! (-> arg0 origin y) (+ 23.0 (-> arg0 origin y))) + ) + ) ) + (else + (set! (-> obj particles s2-0 init-pos x) -320.0) + (set! (-> arg0 origin y) (+ 12.0 (-> arg0 origin y))) + (let ((v1-173 arg0)) + (set! (-> v1-173 scale) 0.7) + ) + (print-game-text (lookup-text! *common-text* (game-text-id empty) #f) arg0 #f s4-1 22) + (set! (-> arg0 origin y) (+ 29.0 (-> arg0 origin y))) + ) ) - ) - (set! (-> obj particles s2-0 init-pos x) -320.0) - (set! (-> arg0 origin y) (+ 23.0 (-> arg0 origin y))) + (+! s2-0 1) ) - ) ) - (else - (set! (-> obj particles s2-0 init-pos x) -320.0) - (set! (-> arg0 origin y) (+ 12.0 (-> arg0 origin y))) - (let ((v1-173 arg0)) - (set! (-> v1-173 scale) 0.7) - ) - (print-game-text - (lookup-text! *common-text* (game-text-id empty) #f) - arg0 - #f - s4-1 - 22 - ) - (set! (-> arg0 origin y) (+ 29.0 (-> arg0 origin y))) - ) - ) - (+! s2-0 1) ) - ) ) - ) 0 (none) ) -(defmethod - draw-memcard-auto-save-error - progress - ((obj progress) (arg0 font-context)) +(defmethod draw-memcard-auto-save-error progress ((obj progress) (arg0 font-context)) (let ((v1-0 arg0)) - (set! (-> v1-0 scale) 0.6) - ) + (set! (-> v1-0 scale) 0.6) + ) (set! (-> arg0 flags) (font-flags shadow kerning middle left large)) (set! (-> arg0 origin x) (the float (- 70 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 5.0) (let ((v1-4 arg0)) - (set! (-> v1-4 width) (the float 265)) - ) + (set! (-> v1-4 width) (the float 265)) + ) (let ((v1-5 arg0)) - (set! (-> v1-5 height) (the float 35)) - ) + (set! (-> v1-5 height) (the float 35)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id error-saving) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id error-saving) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) (set! (-> arg0 origin x) (the float (- 20 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 34.0) (let ((v1-9 arg0)) - (set! (-> v1-9 width) (the float 360)) - ) - (let ((v1-10 arg0)) - (set! (-> v1-10 height) (the float 50)) - ) - (let ((s4-1 print-game-text-scaled)) - (format - (clear *temp-string*) - (lookup-text! *common-text* (game-text-id check-memcard) #f) - 1 + (set! (-> v1-9 width) (the float 360)) + ) + (let ((v1-10 arg0)) + (set! (-> v1-10 height) (the float 50)) + ) + (let ((s4-1 print-game-text-scaled)) + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id check-memcard) #f) 1) + (s4-1 *temp-string* (-> obj transition-percentage-invert) arg0 128) ) - (s4-1 *temp-string* (-> obj transition-percentage-invert) arg0 128) - ) (set! (-> arg0 origin y) 89.0) (let ((v1-12 arg0)) - (set! (-> v1-12 width) (the float 360)) - ) + (set! (-> v1-12 width) (the float 360)) + ) (let ((v1-13 arg0)) - (set! (-> v1-13 height) (the float 20)) - ) + (set! (-> v1-13 height) (the float 20)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id autosave-disabled-title) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id autosave-disabled-title) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) (set! (-> arg0 origin y) 118.0) (let ((v1-15 arg0)) - (set! (-> v1-15 width) (the float 360)) - ) + (set! (-> v1-15 width) (the float 360)) + ) (let ((v1-16 arg0)) - (set! (-> v1-16 height) (the float 60)) - ) + (set! (-> v1-16 height) (the float 60)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id autosave-disabled-msg) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id autosave-disabled-msg) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) (let ((v1-18 arg0)) - (set! (-> v1-18 scale) 0.65) - ) + (set! (-> v1-18 scale) 0.65) + ) (set! (-> arg0 origin y) 160.0) (let ((v1-19 arg0)) - (set! (-> v1-19 height) (the float 60)) - ) + (set! (-> v1-19 height) (the float 60)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id continue?) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id continue?) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) 0 (none) ) (defmethod draw-memcard-removed progress ((obj progress) (arg0 font-context)) (let ((v1-0 arg0)) - (set! (-> v1-0 scale) 0.6) - ) + (set! (-> v1-0 scale) 0.6) + ) (set! (-> arg0 flags) (font-flags shadow kerning middle left large)) (set! (-> arg0 origin x) (the float (- 70 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 10.0) (let ((v1-4 arg0)) - (set! (-> v1-4 width) (the float 265)) - ) - (let ((v1-5 arg0)) - (set! (-> v1-5 height) (the float 55)) - ) - (let ((s4-0 print-game-text-scaled)) - (format - (clear *temp-string*) - (lookup-text! *common-text* (game-text-id memcard-removed) #f) - 1 + (set! (-> v1-4 width) (the float 265)) + ) + (let ((v1-5 arg0)) + (set! (-> v1-5 height) (the float 55)) + ) + (let ((s4-0 print-game-text-scaled)) + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id memcard-removed) #f) 1) + (s4-0 *temp-string* (-> obj transition-percentage-invert) arg0 128) ) - (s4-0 *temp-string* (-> obj transition-percentage-invert) arg0 128) - ) (set! (-> arg0 origin x) (the float (- 20 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 78.0) (let ((v1-9 arg0)) - (set! (-> v1-9 width) (the float 360)) - ) + (set! (-> v1-9 width) (the float 360)) + ) (let ((v1-10 arg0)) - (set! (-> v1-10 height) (the float 20)) - ) + (set! (-> v1-10 height) (the float 20)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id autosave-disabled-title) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id autosave-disabled-title) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) (set! (-> arg0 origin y) 112.0) (let ((v1-12 arg0)) - (set! (-> v1-12 width) (the float 360)) - ) + (set! (-> v1-12 width) (the float 360)) + ) (let ((v1-13 arg0)) - (set! (-> v1-13 height) (the float 60)) - ) + (set! (-> v1-13 height) (the float 60)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id autosave-disabled-msg) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id autosave-disabled-msg) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) (let ((v1-15 arg0)) - (set! (-> v1-15 scale) 0.65) - ) + (set! (-> v1-15 scale) 0.65) + ) (set! (-> arg0 origin y) 160.0) (let ((v1-16 arg0)) - (set! (-> v1-16 height) (the float 60)) - ) + (set! (-> v1-16 height) (the float 60)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id continue?) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id continue?) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) 0 (none) ) @@ -1191,61 +1041,57 @@ (defmethod draw-memcard-error progress ((obj progress) (arg0 font-context)) (set! (-> arg0 origin y) 15.0) (let ((v1-0 arg0)) - (set! (-> v1-0 scale) 0.7) - ) + (set! (-> v1-0 scale) 0.7) + ) (let ((v1-1 arg0)) - (set! (-> v1-1 width) (the float 265)) - ) + (set! (-> v1-1 width) (the float 265)) + ) (let ((v1-2 arg0)) - (set! (-> v1-2 height) (the float 55)) - ) + (set! (-> v1-2 height) (the float 55)) + ) (set! (-> arg0 flags) (font-flags shadow kerning middle left large)) (let ((s4-0 (game-text-id error-loading))) - (case (-> obj display-state) - (((progress-screen memcard-error-saving)) - (set! s4-0 (game-text-id error-saving)) + (case (-> obj display-state) + (((progress-screen memcard-error-saving)) + (set! s4-0 (game-text-id error-saving)) + ) + (((progress-screen memcard-error-formatting)) + (set! s4-0 (game-text-id error-formatting)) + ) + (((progress-screen memcard-error-creating)) + (set! s4-0 (game-text-id error-creating-data)) + ) + ) + (let ((s3-0 print-game-text-scaled)) + (format (clear *temp-string*) (lookup-text! *common-text* s4-0 #f) 1) + (s3-0 *temp-string* (-> obj transition-percentage-invert) arg0 128) ) - (((progress-screen memcard-error-formatting)) - (set! s4-0 (game-text-id error-formatting)) - ) - (((progress-screen memcard-error-creating)) - (set! s4-0 (game-text-id error-creating-data)) - ) ) - (let ((s3-0 print-game-text-scaled)) - (format (clear *temp-string*) (lookup-text! *common-text* s4-0 #f) 1) - (s3-0 *temp-string* (-> obj transition-percentage-invert) arg0 128) - ) - ) (set! (-> arg0 origin x) (the float (- 20 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 80.0) (let ((v1-13 arg0)) - (set! (-> v1-13 width) (the float 360)) - ) - (let ((v1-14 arg0)) - (set! (-> v1-14 height) (the float 70)) - ) - (let ((s4-1 print-game-text-scaled)) - (format - (clear *temp-string*) - (lookup-text! *common-text* (game-text-id check-memcard-and-retry) #f) - 1 + (set! (-> v1-13 width) (the float 360)) + ) + (let ((v1-14 arg0)) + (set! (-> v1-14 height) (the float 70)) + ) + (let ((s4-1 print-game-text-scaled)) + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id check-memcard-and-retry) #f) 1) + (s4-1 *temp-string* (-> obj transition-percentage-invert) arg0 128) ) - (s4-1 *temp-string* (-> obj transition-percentage-invert) arg0 128) - ) (let ((v1-16 arg0)) - (set! (-> v1-16 scale) 0.65) - ) + (set! (-> v1-16 scale) 0.65) + ) (set! (-> arg0 origin y) 155.0) (let ((v1-17 arg0)) - (set! (-> v1-17 height) (the float 60)) - ) + (set! (-> v1-17 height) (the float 60)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id continue?) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id continue?) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) 0 (none) ) @@ -1254,73 +1100,64 @@ (set! (-> arg0 origin x) (the float (- 35 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 18.0) (let ((v1-2 arg0)) - (set! (-> v1-2 scale) 0.6) - ) + (set! (-> v1-2 scale) 0.6) + ) (let ((v1-3 arg0)) - (set! (-> v1-3 width) (the float 330)) - ) + (set! (-> v1-3 width) (the float 330)) + ) (let ((v1-4 arg0)) - (set! (-> v1-4 height) (the float 60)) - ) + (set! (-> v1-4 height) (the float 60)) + ) (set! (-> arg0 flags) (font-flags shadow kerning middle left large)) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id autosave-warn-title) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id autosave-warn-title) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) (set! (-> arg0 origin x) (the float (- 15 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 110.0) (let ((v1-9 arg0)) - (set! (-> v1-9 width) (the float 370)) - ) + (set! (-> v1-9 width) (the float 370)) + ) (let ((v1-10 arg0)) - (set! (-> v1-10 height) (the float 60)) - ) + (set! (-> v1-10 height) (the float 60)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id autosave-warn-msg) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id autosave-warn-msg) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) (let ((v1-12 arg0)) - (set! (-> v1-12 scale) 0.65) - ) + (set! (-> v1-12 scale) 0.65) + ) (set! (-> arg0 origin y) 175.0) (let ((v1-13 arg0)) - (set! (-> v1-13 height) (the float 20)) - ) + (set! (-> v1-13 height) (the float 20)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id continue?) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) - (set! - (-> *progress-process* 0 particles 31 init-pos y) - (the float (if (= (get-aspect-ratio) 'aspect16x9) - 170 - 180 - ) + (lookup-text! *common-text* (game-text-id continue?) #f) + (-> obj transition-percentage-invert) + arg0 + 128 ) - ) - (set! - (-> *progress-process* 0 particles 31 init-pos x) - (the - float - (- - (if - (or - (< (mod (-> *display* real-frame-counter) 300) 270) - (!= (-> obj transition-percentage-invert) 1.0) - ) - 205 - -320 - ) - (-> obj left-x-offset) - ) - ) - ) + (set! (-> *progress-process* 0 particles 31 init-pos y) (the float (if (= (get-aspect-ratio) 'aspect16x9) + 170 + 180 + ) + ) + ) + (set! (-> *progress-process* 0 particles 31 init-pos x) + (the float + (- (if (or (< (mod (-> *display* real-frame-counter) 300) 270) (!= (-> obj transition-percentage-invert) 1.0)) + 205 + -320 + ) + (-> obj left-x-offset) + ) + ) + ) 0 (none) ) @@ -1329,58 +1166,58 @@ (set! (-> arg0 origin x) (the float (- 50 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 20.0) (let ((v1-2 arg0)) - (set! (-> v1-2 scale) 0.6) - ) + (set! (-> v1-2 scale) 0.6) + ) (let ((v1-3 arg0)) - (set! (-> v1-3 width) (the float 300)) - ) + (set! (-> v1-3 width) (the float 300)) + ) (let ((v1-4 arg0)) - (set! (-> v1-4 height) (the float 40)) - ) + (set! (-> v1-4 height) (the float 40)) + ) (set! (-> arg0 flags) (font-flags shadow kerning middle left large)) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id screen-change-to-60hz) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id screen-change-to-60hz) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) (set! (-> arg0 origin x) (the float (- 15 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 60.0) (let ((v1-9 arg0)) - (set! (-> v1-9 width) (the float 370)) - ) + (set! (-> v1-9 width) (the float 370)) + ) (let ((v1-10 arg0)) - (set! (-> v1-10 height) (the float 60)) - ) + (set! (-> v1-10 height) (the float 60)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id screen-60hz-warn-support) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id screen-60hz-warn-support) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) (set! (-> arg0 origin y) 120.0) (let ((v1-12 arg0)) - (set! (-> v1-12 height) (the float 50)) - ) + (set! (-> v1-12 height) (the float 50)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id screen-60hz-warn-timer) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id screen-60hz-warn-timer) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) (let ((v1-14 arg0)) - (set! (-> v1-14 scale) 0.65) - ) + (set! (-> v1-14 scale) 0.65) + ) (set! (-> arg0 origin y) 175.0) (let ((v1-15 arg0)) - (set! (-> v1-15 height) (the float 20)) - ) + (set! (-> v1-15 height) (the float 20)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id continue?) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id continue?) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) 0 (none) ) @@ -1389,50 +1226,50 @@ (set! (-> arg0 origin x) (the float (- 50 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 50.0) (let ((v1-2 arg0)) - (set! (-> v1-2 scale) 0.6) - ) + (set! (-> v1-2 scale) 0.6) + ) (let ((v1-3 arg0)) - (set! (-> v1-3 width) (the float 300)) - ) + (set! (-> v1-3 width) (the float 300)) + ) (let ((v1-4 arg0)) - (set! (-> v1-4 height) (the float 40)) - ) + (set! (-> v1-4 height) (the float 40)) + ) (set! (-> arg0 flags) (font-flags shadow kerning middle left large)) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id no-disc-title) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) - (set! (-> arg0 origin x) (the float (- 20 (-> obj left-x-offset)))) - (set! (-> arg0 origin y) 90.0) - (let ((v1-9 arg0)) - (set! (-> v1-9 width) (the float 360)) - ) - (let ((v1-10 arg0)) - (set! (-> v1-10 height) (the float 60)) - ) - (print-game-text-scaled - (lookup-text! *common-text* (game-text-id no-disc-msg) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) - (when (is-cd-in?) - (let ((v1-13 arg0)) - (set! (-> v1-13 scale) 0.65) - ) - (set! (-> arg0 origin y) 155.0) - (let ((v1-14 arg0)) - (set! (-> v1-14 height) (the float 20)) - ) - (print-game-text-scaled - (lookup-text! *common-text* (game-text-id continue?) #f) + (lookup-text! *common-text* (game-text-id no-disc-title) #f) (-> obj transition-percentage-invert) arg0 128 ) - ) + (set! (-> arg0 origin x) (the float (- 20 (-> obj left-x-offset)))) + (set! (-> arg0 origin y) 90.0) + (let ((v1-9 arg0)) + (set! (-> v1-9 width) (the float 360)) + ) + (let ((v1-10 arg0)) + (set! (-> v1-10 height) (the float 60)) + ) + (print-game-text-scaled + (lookup-text! *common-text* (game-text-id no-disc-msg) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) + (when (is-cd-in?) + (let ((v1-13 arg0)) + (set! (-> v1-13 scale) 0.65) + ) + (set! (-> arg0 origin y) 155.0) + (let ((v1-14 arg0)) + (set! (-> v1-14 height) (the float 20)) + ) + (print-game-text-scaled + (lookup-text! *common-text* (game-text-id continue?) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) + ) 0 (none) ) @@ -1441,48 +1278,48 @@ (set! (-> arg0 origin x) (the float (- 50 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 50.0) (let ((v1-2 arg0)) - (set! (-> v1-2 scale) 0.6) - ) + (set! (-> v1-2 scale) 0.6) + ) (let ((v1-3 arg0)) - (set! (-> v1-3 width) (the float 300)) - ) + (set! (-> v1-3 width) (the float 300)) + ) (let ((v1-4 arg0)) - (set! (-> v1-4 height) (the float 40)) - ) + (set! (-> v1-4 height) (the float 40)) + ) (set! (-> arg0 flags) (font-flags shadow kerning middle left large)) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id bad-disc-title) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id bad-disc-title) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) (set! (-> arg0 origin x) (the float (- 20 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 90.0) (let ((v1-9 arg0)) - (set! (-> v1-9 width) (the float 360)) - ) + (set! (-> v1-9 width) (the float 360)) + ) (let ((v1-10 arg0)) - (set! (-> v1-10 height) (the float 60)) - ) + (set! (-> v1-10 height) (the float 60)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id bad-disc-msg) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id bad-disc-msg) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) (let ((v1-12 arg0)) - (set! (-> v1-12 scale) 0.65) - ) + (set! (-> v1-12 scale) 0.65) + ) (set! (-> arg0 origin y) 155.0) (let ((v1-13 arg0)) - (set! (-> v1-13 height) (the float 20)) - ) + (set! (-> v1-13 height) (the float 20)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id continue?) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id continue?) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) 0 (none) ) @@ -1491,21 +1328,21 @@ (set! (-> arg0 origin x) (the float (- 50 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 70.0) (let ((v1-2 arg0)) - (set! (-> v1-2 scale) 0.6) - ) + (set! (-> v1-2 scale) 0.6) + ) (let ((v1-3 arg0)) - (set! (-> v1-3 width) (the float 300)) - ) + (set! (-> v1-3 width) (the float 300)) + ) (let ((v1-4 arg0)) - (set! (-> v1-4 height) (the float 40)) - ) + (set! (-> v1-4 height) (the float 40)) + ) (set! (-> arg0 flags) (font-flags shadow kerning middle left large)) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id quit?) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id quit?) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) 0 (none) ) @@ -1514,31 +1351,31 @@ (set! (-> arg0 origin x) (the float (- 50 (-> obj left-x-offset)))) (set! (-> arg0 origin y) 45.0) (let ((v1-2 arg0)) - (set! (-> v1-2 scale) 0.6) - ) + (set! (-> v1-2 scale) 0.6) + ) (let ((v1-3 arg0)) - (set! (-> v1-3 width) (the float 300)) - ) + (set! (-> v1-3 width) (the float 300)) + ) (let ((v1-4 arg0)) - (set! (-> v1-4 height) (the float 50)) - ) + (set! (-> v1-4 height) (the float 50)) + ) (set! (-> arg0 flags) (font-flags shadow kerning middle left large)) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id screen-now-60hz) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id screen-now-60hz) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) (set! (-> arg0 origin y) 95.0) (let ((v1-7 arg0)) - (set! (-> v1-7 height) (the float 50)) - ) + (set! (-> v1-7 height) (the float 50)) + ) (print-game-text-scaled - (lookup-text! *common-text* (game-text-id screen-60hz-keep?) #f) - (-> obj transition-percentage-invert) - arg0 - 128 - ) + (lookup-text! *common-text* (game-text-id screen-60hz-keep?) #f) + (-> obj transition-percentage-invert) + arg0 + 128 + ) 0 (none) ) @@ -1546,86 +1383,81 @@ (defmethod draw-notice-screen progress ((obj progress)) (hide-progress-icons) (when *common-text* - (let - ((a1-1 - (new - 'stack - 'font-context - *font-default-matrix* - (- 70 (-> obj left-x-offset)) - 10 - 0.0 - (font-color default) - (font-flags shadow kerning) - ) + (let ((a1-1 (new + 'stack + 'font-context + *font-default-matrix* + (- 70 (-> obj left-x-offset)) + 10 + 0.0 + (font-color default) + (font-flags shadow kerning) + ) + ) + ) + (case (-> obj display-state) + (((progress-screen memcard-format)) + (draw-memcard-format obj a1-1) + ) + (((progress-screen memcard-no-space) + (progress-screen memcard-not-inserted) + (progress-screen memcard-not-formatted) + ) + (draw-memcard-storage-error obj a1-1) + ) + (((progress-screen memcard-data-exists)) + (draw-memcard-data-exists obj a1-1) + ) + (((progress-screen memcard-no-data)) + (draw-memcard-no-data obj a1-1) + ) + (((progress-screen memcard-loading) + (progress-screen memcard-saving) + (progress-screen memcard-formatting) + (progress-screen memcard-creating) + ) + (draw-memcard-accessing obj a1-1) + ) + (((progress-screen memcard-insert)) + (draw-memcard-insert obj a1-1) + ) + (((progress-screen load-game) (progress-screen save-game) (progress-screen save-game-title)) + (draw-memcard-file-select obj a1-1) + ) + (((progress-screen memcard-auto-save-error)) + (draw-memcard-auto-save-error obj a1-1) + ) + (((progress-screen memcard-removed)) + (draw-memcard-removed obj a1-1) + ) + (((progress-screen memcard-error-loading) + (progress-screen memcard-error-saving) + (progress-screen memcard-error-formatting) + (progress-screen memcard-error-creating) + ) + (draw-memcard-error obj a1-1) + ) + (((progress-screen auto-save)) + (draw-auto-save obj a1-1) + ) + (((progress-screen pal-change-to-60hz)) + (draw-pal-change-to-60hz obj a1-1) + ) + (((progress-screen pal-now-60hz)) + (draw-pal-now-60hz obj a1-1) + ) + (((progress-screen no-disc)) + (draw-no-disc obj a1-1) + ) + (((progress-screen bad-disc)) + (draw-bad-disc obj a1-1) + ) + (((progress-screen quit)) + (draw-quit obj a1-1) + ) + ) ) - ) - (case (-> obj display-state) - (((progress-screen memcard-format)) - (draw-memcard-format obj a1-1) - ) - (((progress-screen memcard-no-space) - (progress-screen memcard-not-inserted) - (progress-screen memcard-not-formatted) - ) - (draw-memcard-storage-error obj a1-1) - ) - (((progress-screen memcard-data-exists)) - (draw-memcard-data-exists obj a1-1) - ) - (((progress-screen memcard-no-data)) - (draw-memcard-no-data obj a1-1) - ) - (((progress-screen memcard-loading) - (progress-screen memcard-saving) - (progress-screen memcard-formatting) - (progress-screen memcard-creating) - ) - (draw-memcard-accessing obj a1-1) - ) - (((progress-screen memcard-insert)) - (draw-memcard-insert obj a1-1) - ) - (((progress-screen load-game) - (progress-screen save-game) - (progress-screen save-game-title) - ) - (draw-memcard-file-select obj a1-1) - ) - (((progress-screen memcard-auto-save-error)) - (draw-memcard-auto-save-error obj a1-1) - ) - (((progress-screen memcard-removed)) - (draw-memcard-removed obj a1-1) - ) - (((progress-screen memcard-error-loading) - (progress-screen memcard-error-saving) - (progress-screen memcard-error-formatting) - (progress-screen memcard-error-creating) - ) - (draw-memcard-error obj a1-1) - ) - (((progress-screen auto-save)) - (draw-auto-save obj a1-1) - ) - (((progress-screen pal-change-to-60hz)) - (draw-pal-change-to-60hz obj a1-1) - ) - (((progress-screen pal-now-60hz)) - (draw-pal-now-60hz obj a1-1) - ) - (((progress-screen no-disc)) - (draw-no-disc obj a1-1) - ) - (((progress-screen bad-disc)) - (draw-bad-disc obj a1-1) - ) - (((progress-screen quit)) - (draw-quit obj a1-1) - ) - ) ) - ) 0 (none) ) @@ -1634,884 +1466,694 @@ (let* ((s2-0 (-> *display* frames (-> *display* on-screen) frame global-buf)) (gp-0 (-> s2-0 base)) ) - (draw-sprite2d-xy s2-0 arg0 arg1 255 14 (new 'static 'rgba :a #x60)) - (draw-sprite2d-xy - s2-0 - arg0 - (+ arg1 2) - (the int (* 255.0 arg2)) - 10 - (the-as rgba arg3) + (draw-sprite2d-xy s2-0 arg0 arg1 255 14 (new 'static 'rgba :a #x60)) + (draw-sprite2d-xy s2-0 arg0 (+ arg1 2) (the int (* 255.0 arg2)) 10 (the-as rgba arg3)) + (let ((a3-3 (-> s2-0 base))) + (let ((v1-3 (the-as dma-packet (-> s2-0 base)))) + (set! (-> v1-3 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> v1-3 vif0) (new 'static 'vif-tag)) + (set! (-> v1-3 vif1) (new 'static 'vif-tag)) + (set! (-> s2-0 base) (&+ (the-as pointer v1-3) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id sprite) + gp-0 + (the-as (pointer dma-tag) a3-3) + ) + ) ) - (let ((a3-3 (-> s2-0 base))) - (let ((v1-3 (the-as dma-packet (-> s2-0 base)))) - (set! (-> v1-3 dma) (new 'static 'dma-tag :id (dma-tag-id next))) - (set! (-> v1-3 vif0) (new 'static 'vif-tag)) - (set! (-> v1-3 vif1) (new 'static 'vif-tag)) - (set! (-> s2-0 base) (&+ (the-as pointer v1-3) 16)) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id sprite) - gp-0 - (the-as (pointer dma-tag) a3-3) - ) - ) - ) 0 (none) ) -(defun - print-language-name - ((arg0 int) (arg1 font-context) (arg2 int) (arg3 symbol)) +(defun print-language-name ((arg0 int) (arg1 font-context) (arg2 int) (arg3 symbol)) (let ((s5-0 (if arg3 - arg2 - (- arg2) - ) - ) + arg2 + (- arg2) + ) + ) ) - (+! (-> arg1 origin x) (the float s5-0)) - (let ((f30-0 (- 1.0 (* 0.0033333334 (the float arg2))))) - (print-game-text-scaled - (lookup-text! *common-text* (-> *language-name-remap* arg0) #f) - f30-0 - arg1 - (the int (* 128.0 f30-0)) - ) + (+! (-> arg1 origin x) (the float s5-0)) + (let ((f30-0 (- 1.0 (* 0.0033333334 (the float arg2))))) + (print-game-text-scaled + (lookup-text! *common-text* (-> *language-name-remap* arg0) #f) + f30-0 + arg1 + (the int (* 128.0 f30-0)) + ) + ) + (set! (-> arg1 origin x) (- (-> arg1 origin x) (the float s5-0))) ) - (set! (-> arg1 origin x) (- (-> arg1 origin x) (the float s5-0))) - ) (set! (-> arg1 color) (font-color default)) arg1 ) -(defmethod - draw-options - progress - ((obj progress) (arg0 int) (arg1 int) (arg2 float)) +(defmethod draw-options progress ((obj progress) (arg0 int) (arg1 int) (arg2 float)) (local-vars - (sv-112 font-context) - (sv-128 int) - (sv-144 int) - (sv-160 (function _varargs_ object)) - (sv-176 string) - (sv-192 string) - (sv-208 string) - (sv-224 (function _varargs_ object)) - (sv-240 string) - (sv-256 string) - (sv-272 string) - (sv-288 (function string font-context symbol int int float)) - (sv-304 (function _varargs_ object)) - (sv-320 (function _varargs_ object)) - (sv-336 string) - (sv-352 string) - (sv-368 string) - (sv-384 (function _varargs_ object)) - (sv-400 string) - (sv-416 string) - (sv-432 string) - (sv-448 uint) - (sv-464 int) - (sv-480 int) - (sv-496 int) - (sv-512 uint) - (sv-528 (function _varargs_ object)) - (sv-544 string) - (sv-560 string) - (sv-576 string) - (sv-592 (function _varargs_ object)) - (sv-608 string) - (sv-624 string) - (sv-640 string) - (sv-656 (function _varargs_ object)) - (sv-672 string) - (sv-688 string) - (sv-704 string) - (sv-720 (function _varargs_ object)) - (sv-736 string) - (sv-752 string) - (sv-768 string) - (sv-784 (function _varargs_ object)) - (sv-800 string) - (sv-816 string) - (sv-832 string) - (sv-848 (function _varargs_ object)) - (sv-864 string) - (sv-880 string) - (sv-896 string) - (sv-912 string) - ) + (sv-112 font-context) + (sv-128 int) + (sv-144 int) + (sv-160 (function _varargs_ object)) + (sv-176 string) + (sv-192 string) + (sv-208 string) + (sv-224 (function _varargs_ object)) + (sv-240 string) + (sv-256 string) + (sv-272 string) + (sv-288 (function string font-context symbol int int float)) + (sv-304 (function _varargs_ object)) + (sv-320 (function _varargs_ object)) + (sv-336 string) + (sv-352 string) + (sv-368 string) + (sv-384 (function _varargs_ object)) + (sv-400 string) + (sv-416 string) + (sv-432 string) + (sv-448 uint) + (sv-464 int) + (sv-480 int) + (sv-496 int) + (sv-512 uint) + (sv-528 (function _varargs_ object)) + (sv-544 string) + (sv-560 string) + (sv-576 string) + (sv-592 (function _varargs_ object)) + (sv-608 string) + (sv-624 string) + (sv-640 string) + (sv-656 (function _varargs_ object)) + (sv-672 string) + (sv-688 string) + (sv-704 string) + (sv-720 (function _varargs_ object)) + (sv-736 string) + (sv-752 string) + (sv-768 string) + (sv-784 (function _varargs_ object)) + (sv-800 string) + (sv-816 string) + (sv-832 string) + (sv-848 (function _varargs_ object)) + (sv-864 string) + (sv-880 string) + (sv-896 string) + (sv-912 string) + ) (let ((s3-0 (-> *options-remap* (-> obj display-state)))) - (when s3-0 - (let ((s2-1 (- arg0 (/ (* arg1 (length s3-0)) 2))) - (s1-0 0) - ) - 27 - 0 - (set! - sv-112 - (new - 'stack - 'font-context - *font-default-matrix* - 0 - 0 - 0.0 - (font-color default) - (font-flags shadow kerning) - ) - ) - (let ((v1-11 sv-112)) - (set! (-> v1-11 width) (the float 350)) - ) - (let ((v1-12 sv-112)) - (set! (-> v1-12 height) (the float 25)) - ) - (set! (-> sv-112 flags) (font-flags shadow kerning middle left large)) - (dotimes (s0-0 (length s3-0)) - (set! sv-912 (the-as string #f)) - (set! sv-128 27) - (set! sv-144 s2-1) - (let ((v1-18 (-> s3-0 s0-0 option-type))) - (cond - ((= v1-18 7) - (cond - ((-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify))) - (set! sv-160 format) - (set! sv-176 (clear *temp-string*)) - (set! sv-192 "~30L~S~0L ~S") - (set! sv-208 (lookup-text! *common-text* (game-text-id yes) #f)) - (let ((a3-2 (lookup-text! *common-text* (game-text-id no) #f))) - (sv-160 sv-176 sv-192 sv-208 a3-2) + (when s3-0 + (let ((s2-1 (- arg0 (/ (* arg1 (length s3-0)) 2))) + (s1-0 0) ) - (set! sv-912 *temp-string*) - sv-912 - ) - (else - (set! sv-224 format) - (set! sv-240 (clear *temp-string*)) - (set! sv-256 "~0L~S ~30L~S~1L") - (set! sv-272 (lookup-text! *common-text* (game-text-id yes) #f)) - (let ((a3-3 (lookup-text! *common-text* (game-text-id no) #f))) - (sv-224 sv-240 sv-256 sv-272 a3-3) - ) - (set! sv-912 *temp-string*) - sv-912 - ) - ) - ) - ((or (= v1-18 6) (= v1-18 8)) - (cond - ((nonzero? (-> s3-0 s0-0 name)) - (set! sv-912 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f)) - sv-912 - ) - (else - (set! sv-912 (the-as string #f)) - (the-as symbol sv-912) - ) - ) - ) - ((and (-> obj selected-option) (= (-> obj option-index) s0-0)) - (let ((a0-19 sv-112)) - (set! (-> a0-19 color) (font-color default)) - ) - (set! - (-> sv-112 origin x) - (the float (- sv-128 (-> obj left-x-offset))) - ) - (case (-> s3-0 s0-0 option-type) - ((3) - (set! (-> sv-112 origin y) (the float (+ s2-1 -20))) - ) - (else - (set! (-> sv-112 origin y) (the float (+ s2-1 -8))) - ) - ) - (let ((v1-64 sv-112)) - (set! (-> v1-64 scale) 0.6) - ) - (set! sv-288 print-game-text) - (let ((a0-23 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f)) - (a1-11 sv-112) - (a2-10 #f) - (a3-4 128) - (t0-1 22) - ) - (sv-288 a0-23 a1-11 a2-10 a3-4 t0-1) - ) - (case (-> s3-0 s0-0 option-type) - ((3) - (set! sv-144 (+ s2-1 3)) - sv-144 - ) - (else - (set! sv-144 (+ s2-1 7)) - sv-144 - ) - ) - (let ((v1-81 (-> s3-0 s0-0 option-type))) - (cond - ((zero? v1-81) - (let* ((v1-82 (the-as uint #x8000ffff)) - (f0-12 - (* - 0.01 - (-> - (the-as (pointer float) (-> s3-0 s0-0 value-to-modify)) - ) - ) - ) - (a0-34 - (logior - (logand v1-82 -256) - (shr (shl (the int (+ 64.0 (* 191.0 f0-12))) 56) 56) - ) - ) - (a3-5 - (logior - (logand a0-34 -65281) - (shr (shl (shr (shl a0-34 56) 56) 56) 48) - ) - ) - ) - (draw-percent-bar - (- 75 (-> obj left-x-offset)) - (+ s2-1 8) - f0-12 - (the-as int a3-5) + 27 + 0 + (set! sv-112 + (new 'stack 'font-context *font-default-matrix* 0 0 0.0 (font-color default) (font-flags shadow kerning)) ) - ) - (set! sv-304 format) - (let ((a0-42 (clear *temp-string*)) - (a1-13 "~D") - (a2-12 - (the - int - (-> (the-as (pointer float) (-> s3-0 s0-0 value-to-modify))) - ) - ) - ) - (sv-304 a0-42 a1-13 a2-12) - ) - (set! sv-912 *temp-string*) - (set! - sv-128 - (+ - (the - int - (* - 2.5 - (-> (the-as (pointer float) (-> s3-0 s0-0 value-to-modify))) - ) - ) - -100 - ) - ) - sv-128 - ) - ((= v1-81 2) + (let ((v1-11 sv-112)) + (set! (-> v1-11 width) (the float 350)) + ) + (let ((v1-12 sv-112)) + (set! (-> v1-12 height) (the float 25)) + ) + (set! (-> sv-112 flags) (font-flags shadow kerning middle left large)) + (dotimes (s0-0 (length s3-0)) + (set! sv-912 (the-as string #f)) + (set! sv-128 27) + (set! sv-144 s2-1) + (let ((v1-18 (-> s3-0 s0-0 option-type))) (cond - ((-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify))) - (set! sv-320 format) - (set! sv-336 (clear *temp-string*)) - (set! sv-352 "~30L~S~0L ~S") - (set! sv-368 (lookup-text! *common-text* (game-text-id on) #f)) - (let ((a3-6 (lookup-text! *common-text* (game-text-id off) #f))) - (sv-320 sv-336 sv-352 sv-368 a3-6) - ) - (set! sv-912 *temp-string*) - sv-912 - ) - (else - (set! sv-384 format) - (set! sv-400 (clear *temp-string*)) - (set! sv-416 "~0L~S ~30L~S~1L") - (set! sv-432 (lookup-text! *common-text* (game-text-id on) #f)) - (let ((a3-7 (lookup-text! *common-text* (game-text-id off) #f))) - (sv-384 sv-400 sv-416 sv-432 a3-7) - ) - (set! sv-912 *temp-string*) - sv-912 - ) - ) - ) - ((= v1-81 1) - (set! sv-512 (-> obj language-selection)) - (set! - sv-448 - (-> (the-as (pointer uint64) (-> s3-0 s0-0 value-to-modify))) - ) - (if - (and - (zero? (scf-get-territory)) - (not - (and - (= *progress-cheat* 'language) - (logtest? - (-> *cpad-list* cpads 0 button0-abs 0) - (pad-buttons l2) - ) - (logtest? - (-> *cpad-list* cpads 0 button0-abs 0) - (pad-buttons r2) - ) - ) - ) - ) - (set! sv-464 5) - (set! sv-464 6) - ) - (if (-> obj language-transition) - (set! - (-> obj language-x-offset) - (seekl - (-> obj language-x-offset) - 200 - (the int (* 10.0 (-> *display* time-adjust-ratio))) - ) - ) - ) - (when (>= (-> obj language-x-offset) 100) - (set! (-> obj language-selection) sv-448) - (set! sv-512 sv-448) - (set! (-> obj language-transition) #f) - (set! (-> obj language-x-offset) 0) - 0 - ) - (set! (-> sv-112 origin y) (the float (+ s2-1 3))) - (let ((a0-62 sv-112)) - (set! (-> a0-62 color) (font-color lighter-lighter-blue)) - ) - 0 - (set! sv-480 (mod (the-as int (+ sv-512 1)) sv-464)) - (let ((a0-66 (mod (+ sv-464 -1 sv-512) sv-464)) - (v1-153 (mod (the-as int (+ sv-512 2)) sv-464)) - ) - (set! sv-496 (mod (+ sv-464 -2 sv-512) sv-464)) - (cond - ((-> obj language-direction) - (let ((a2-22 (- 200 (+ (-> obj language-x-offset) 100)))) - (print-language-name a0-66 sv-112 a2-22 #f) - ) - (let ((a2-23 (+ (-> obj language-x-offset) 100))) - (cond - ((< a2-23 150) - (let ((t9-27 print-language-name) - (a1-30 sv-112) - (a3-9 #t) - ) - (t9-27 sv-480 a1-30 a2-23 a3-9) - ) + ((= v1-18 7) + (cond + ((-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify))) + (set! sv-160 format) + (set! sv-176 (clear *temp-string*)) + (set! sv-192 "~30L~S~0L ~S") + (set! sv-208 (lookup-text! *common-text* (game-text-id yes) #f)) + (let ((a3-2 (lookup-text! *common-text* (game-text-id no) #f))) + (sv-160 sv-176 sv-192 sv-208 a3-2) + ) + (set! sv-912 *temp-string*) + sv-912 ) (else - (let ((a2-24 (- 200 (-> obj language-x-offset))) - (t9-28 print-language-name) - (a1-31 sv-112) - (a3-10 #f) - ) - (t9-28 sv-496 a1-31 a2-24 a3-10) + (set! sv-224 format) + (set! sv-240 (clear *temp-string*)) + (set! sv-256 "~0L~S ~30L~S~1L") + (set! sv-272 (lookup-text! *common-text* (game-text-id yes) #f)) + (let ((a3-3 (lookup-text! *common-text* (game-text-id no) #f))) + (sv-224 sv-240 sv-256 sv-272 a3-3) + ) + (set! sv-912 *temp-string*) + sv-912 + ) + ) + ) + ((or (= v1-18 6) (= v1-18 8)) + (cond + ((nonzero? (-> s3-0 s0-0 name)) + (set! sv-912 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f)) + sv-912 + ) + (else + (set! sv-912 (the-as string #f)) + (the-as symbol sv-912) + ) + ) + ) + ((and (-> obj selected-option) (= (-> obj option-index) s0-0)) + (let ((a0-19 sv-112)) + (set! (-> a0-19 color) (font-color default)) + ) + (set! (-> sv-112 origin x) (the float (- sv-128 (-> obj left-x-offset)))) + (case (-> s3-0 s0-0 option-type) + ((3) + (set! (-> sv-112 origin y) (the float (+ s2-1 -20))) + ) + (else + (set! (-> sv-112 origin y) (the float (+ s2-1 -8))) + ) + ) + (let ((v1-64 sv-112)) + (set! (-> v1-64 scale) 0.6) + ) + (set! sv-288 print-game-text) + (let ((a0-23 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f)) + (a1-11 sv-112) + (a2-10 #f) + (a3-4 128) + (t0-1 22) + ) + (sv-288 a0-23 a1-11 a2-10 a3-4 t0-1) + ) + (case (-> s3-0 s0-0 option-type) + ((3) + (set! sv-144 (+ s2-1 3)) + sv-144 + ) + (else + (set! sv-144 (+ s2-1 7)) + sv-144 + ) + ) + (let ((v1-81 (-> s3-0 s0-0 option-type))) + (cond + ((zero? v1-81) + (let* ((v1-82 (the-as uint #x8000ffff)) + (f0-12 (* 0.01 (-> (the-as (pointer float) (-> s3-0 s0-0 value-to-modify))))) + (a0-34 (logior (logand v1-82 -256) (shr (shl (the int (+ 64.0 (* 191.0 f0-12))) 56) 56))) + (a3-5 (logior (logand a0-34 -65281) (shr (shl (shr (shl a0-34 56) 56) 56) 48))) + ) + (draw-percent-bar (- 75 (-> obj left-x-offset)) (+ s2-1 8) f0-12 (the-as int a3-5)) + ) + (set! sv-304 format) + (let ((a0-42 (clear *temp-string*)) + (a1-13 "~D") + (a2-12 (the int (-> (the-as (pointer float) (-> s3-0 s0-0 value-to-modify))))) + ) + (sv-304 a0-42 a1-13 a2-12) + ) + (set! sv-912 *temp-string*) + (set! sv-128 (+ (the int (* 2.5 (-> (the-as (pointer float) (-> s3-0 s0-0 value-to-modify))))) -100)) + sv-128 + ) + ((= v1-81 2) + (cond + ((-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify))) + (set! sv-320 format) + (set! sv-336 (clear *temp-string*)) + (set! sv-352 "~30L~S~0L ~S") + (set! sv-368 (lookup-text! *common-text* (game-text-id on) #f)) + (let ((a3-6 (lookup-text! *common-text* (game-text-id off) #f))) + (sv-320 sv-336 sv-352 sv-368 a3-6) + ) + (set! sv-912 *temp-string*) + sv-912 + ) + (else + (set! sv-384 format) + (set! sv-400 (clear *temp-string*)) + (set! sv-416 "~0L~S ~30L~S~1L") + (set! sv-432 (lookup-text! *common-text* (game-text-id on) #f)) + (let ((a3-7 (lookup-text! *common-text* (game-text-id off) #f))) + (sv-384 sv-400 sv-416 sv-432 a3-7) + ) + (set! sv-912 *temp-string*) + sv-912 + ) + ) + ) + ((= v1-81 1) + (set! sv-512 (-> obj language-selection)) + (set! sv-448 (-> (the-as (pointer uint64) (-> s3-0 s0-0 value-to-modify)))) + (if (and (zero? (scf-get-territory)) + (not (and (= *progress-cheat* 'language) (cpad-hold? 0 l2) (cpad-hold? 0 r2))) + ) + (set! sv-464 5) + (set! sv-464 6) + ) + (if (-> obj language-transition) + (set! (-> obj language-x-offset) + (seekl (-> obj language-x-offset) 200 (the int (* 10.0 (-> *display* time-adjust-ratio)))) + ) + ) + (when (>= (-> obj language-x-offset) 100) + (set! (-> obj language-selection) sv-448) + (set! sv-512 sv-448) + (set! (-> obj language-transition) #f) + (set! (-> obj language-x-offset) 0) + 0 + ) + (set! (-> sv-112 origin y) (the float (+ s2-1 3))) + (let ((a0-62 sv-112)) + (set! (-> a0-62 color) (font-color lighter-lighter-blue)) + ) + 0 + (set! sv-480 (mod (the-as int (+ sv-512 1)) sv-464)) + (let ((a0-66 (mod (+ sv-464 -1 sv-512) sv-464)) + (v1-153 (mod (the-as int (+ sv-512 2)) sv-464)) + ) + (set! sv-496 (mod (+ sv-464 -2 sv-512) sv-464)) + (cond + ((-> obj language-direction) + (let ((a2-22 (- 200 (+ (-> obj language-x-offset) 100)))) + (print-language-name a0-66 sv-112 a2-22 #f) + ) + (let ((a2-23 (+ (-> obj language-x-offset) 100))) + (cond + ((< a2-23 150) + (let ((t9-27 print-language-name) + (a1-30 sv-112) + (a3-9 #t) + ) + (t9-27 sv-480 a1-30 a2-23 a3-9) + ) + ) + (else + (let ((a2-24 (- 200 (-> obj language-x-offset))) + (t9-28 print-language-name) + (a1-31 sv-112) + (a3-10 #f) + ) + (t9-28 sv-496 a1-31 a2-24 a3-10) + ) + ) + ) + ) + ) + (else + (let ((a2-25 (+ (-> obj language-x-offset) 100))) + (cond + ((< a2-25 150) + (print-language-name a0-66 sv-112 a2-25 #f) + ) + (else + (let ((a2-26 (- 200 (-> obj language-x-offset)))) + (print-language-name v1-153 sv-112 a2-26 #t) + ) + ) + ) + ) + (let ((a2-27 (- 200 (+ (-> obj language-x-offset) 100)))) + (print-language-name sv-480 sv-112 a2-27 #t) + ) + ) + ) + ) + (when (not (-> obj language-transition)) + (let ((a0-75 sv-112)) + (set! (-> a0-75 color) (font-color yellow-green-2)) + ) + ) + (let ((t9-32 print-language-name) + (a1-37 sv-112) + (a2-28 (-> obj language-x-offset)) + (a3-14 (-> obj language-direction)) + ) + (t9-32 (the-as int sv-512) a1-37 a2-28 (the-as symbol a3-14)) + ) + ) + ((= v1-81 3) + (set! sv-912 (lookup-text! *common-text* (game-text-id move-dpad) #f)) + sv-912 + ) + ((= v1-81 4) + (cond + ((= (-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify))) 'aspect4x3) + (set! sv-528 format) + (set! sv-544 (clear *temp-string*)) + (set! sv-560 "~30L~S~0L ~S") + (set! sv-576 (lookup-text! *common-text* (game-text-id 4x3) #f)) + (let ((a3-15 (lookup-text! *common-text* (game-text-id 16x9) #f))) + (sv-528 sv-544 sv-560 sv-576 a3-15) + ) + (set! sv-912 *temp-string*) + sv-912 + ) + (else + (set! sv-592 format) + (set! sv-608 (clear *temp-string*)) + (set! sv-624 "~0L~S ~30L~S~1L") + (set! sv-640 (lookup-text! *common-text* (game-text-id 4x3) #f)) + (let ((a3-16 (lookup-text! *common-text* (game-text-id 16x9) #f))) + (sv-592 sv-608 sv-624 sv-640 a3-16) + ) + (set! sv-912 *temp-string*) + sv-912 + ) + ) + ) + ((= v1-81 5) + (cond + ((= (-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify))) 'ntsc) + (set! sv-656 format) + (set! sv-672 (clear *temp-string*)) + (set! sv-688 "~0L~S ~30L~S~1L") + (set! sv-704 (lookup-text! *common-text* (game-text-id 50hz) #f)) + (let ((a3-17 (lookup-text! *common-text* (game-text-id 60hz) #f))) + (sv-656 sv-672 sv-688 sv-704 a3-17) + ) + (set! sv-912 *temp-string*) + sv-912 + ) + (else + (set! sv-720 format) + (set! sv-736 (clear *temp-string*)) + (set! sv-752 "~30L~S~0L ~S") + (set! sv-768 (lookup-text! *common-text* (game-text-id 50hz) #f)) + (let ((a3-18 (lookup-text! *common-text* (game-text-id 60hz) #f))) + (sv-720 sv-736 sv-752 sv-768 a3-18) + ) + (set! sv-912 *temp-string*) + sv-912 + ) + ) + ) ) - ) ) - ) ) (else - (let ((a2-25 (+ (-> obj language-x-offset) 100))) - (cond - ((< a2-25 150) - (print-language-name a0-66 sv-112 a2-25 #f) - ) - (else - (let ((a2-26 (- 200 (-> obj language-x-offset)))) - (print-language-name v1-153 sv-112 a2-26 #t) - ) - ) - ) - ) - (let ((a2-27 (- 200 (+ (-> obj language-x-offset) 100)))) - (print-language-name sv-480 sv-112 a2-27 #t) - ) - ) - ) - ) - (when (not (-> obj language-transition)) - (let ((a0-75 sv-112)) - (set! (-> a0-75 color) (font-color yellow-green-2)) - ) - ) - (let ((t9-32 print-language-name) - (a1-37 sv-112) - (a2-28 (-> obj language-x-offset)) - (a3-14 (-> obj language-direction)) - ) - (t9-32 (the-as int sv-512) a1-37 a2-28 (the-as symbol a3-14)) - ) - ) - ((= v1-81 3) - (set! - sv-912 - (lookup-text! *common-text* (game-text-id move-dpad) #f) - ) - sv-912 - ) - ((= v1-81 4) - (cond - ((= - (-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify))) - 'aspect4x3 - ) - (set! sv-528 format) - (set! sv-544 (clear *temp-string*)) - (set! sv-560 "~30L~S~0L ~S") - (set! sv-576 (lookup-text! *common-text* (game-text-id 4x3) #f)) - (let ((a3-15 (lookup-text! *common-text* (game-text-id 16x9) #f))) - (sv-528 sv-544 sv-560 sv-576 a3-15) - ) - (set! sv-912 *temp-string*) - sv-912 - ) - (else - (set! sv-592 format) - (set! sv-608 (clear *temp-string*)) - (set! sv-624 "~0L~S ~30L~S~1L") - (set! sv-640 (lookup-text! *common-text* (game-text-id 4x3) #f)) - (let ((a3-16 (lookup-text! *common-text* (game-text-id 16x9) #f))) - (sv-592 sv-608 sv-624 sv-640 a3-16) - ) - (set! sv-912 *temp-string*) - sv-912 - ) - ) - ) - ((= v1-81 5) - (cond - ((= - (-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify))) - 'ntsc - ) - (set! sv-656 format) - (set! sv-672 (clear *temp-string*)) - (set! sv-688 "~0L~S ~30L~S~1L") - (set! sv-704 (lookup-text! *common-text* (game-text-id 50hz) #f)) - (let ((a3-17 (lookup-text! *common-text* (game-text-id 60hz) #f))) - (sv-656 sv-672 sv-688 sv-704 a3-17) - ) - (set! sv-912 *temp-string*) - sv-912 - ) - (else - (set! sv-720 format) - (set! sv-736 (clear *temp-string*)) - (set! sv-752 "~30L~S~0L ~S") - (set! sv-768 (lookup-text! *common-text* (game-text-id 50hz) #f)) - (let ((a3-18 (lookup-text! *common-text* (game-text-id 60hz) #f))) - (sv-720 sv-736 sv-752 sv-768 a3-18) - ) - (set! sv-912 *temp-string*) - sv-912 - ) - ) - ) - ) - ) - ) - (else - (let ((v1-195 (-> s3-0 s0-0 option-type))) - (cond - ((or (zero? v1-195) (= v1-195 3) (= v1-195 4) (= v1-195 5)) - (set! sv-912 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f)) - sv-912 - ) - ((= v1-195 2) - (set! sv-784 format) - (set! sv-800 (clear *temp-string*)) - (set! sv-816 "~S: ~S") - (set! sv-832 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f)) - (let - ((a3-19 - (if (-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify))) - (lookup-text! *common-text* (game-text-id on) #f) - (lookup-text! *common-text* (game-text-id off) #f) - ) - ) - ) - (sv-784 sv-800 sv-816 sv-832 a3-19) - ) - (set! sv-912 *temp-string*) - sv-912 - ) - ((= v1-195 1) - (set! sv-848 format) - (set! sv-864 (clear *temp-string*)) - (set! sv-880 "~S: ~S") - (set! sv-896 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f)) - (let - ((a3-20 - (lookup-text! - *common-text* - (-> - *language-name-remap* - (-> (the-as (pointer uint64) (-> s3-0 s0-0 value-to-modify))) - ) - #f - ) - ) - ) - (sv-848 sv-864 sv-880 sv-896 a3-20) - ) - (set! sv-912 *temp-string*) - sv-912 - ) - ) - ) - ) - ) - ) - (when sv-912 - (let ((f0-23 (-> obj transition-percentage-invert))) - (let ((v1-235 sv-112)) - (set! - (-> v1-235 color) - (the-as - font-color - (if (and (= s0-0 (-> obj option-index)) (not (-> obj in-transition))) - 30 - 0 - ) - ) - ) - ) - (set! - (-> sv-112 origin x) - (the float (- sv-128 (-> obj left-x-offset))) - ) - (set! - (-> sv-112 origin y) - (the float (the int (* (the float sv-144) (if (-> s3-0 s0-0 scale) - f0-23 - 1.0 - ) - ) + (let ((v1-195 (-> s3-0 s0-0 option-type))) + (cond + ((or (zero? v1-195) (= v1-195 3) (= v1-195 4) (= v1-195 5)) + (set! sv-912 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f)) + sv-912 ) - ) - ) - (let ((v1-246 sv-112)) - (set! (-> v1-246 scale) (* arg2 f0-23)) - ) - (let ((t9-60 print-game-text) - (a1-64 sv-112) - (a2-50 #f) - (a3-21 (the int (* 128.0 f0-23))) - (t0-2 22) + ((= v1-195 2) + (set! sv-784 format) + (set! sv-800 (clear *temp-string*)) + (set! sv-816 "~S: ~S") + (set! sv-832 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f)) + (let ((a3-19 (if (-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify))) + (lookup-text! *common-text* (game-text-id on) #f) + (lookup-text! *common-text* (game-text-id off) #f) + ) + ) + ) + (sv-784 sv-800 sv-816 sv-832 a3-19) + ) + (set! sv-912 *temp-string*) + sv-912 + ) + ((= v1-195 1) + (set! sv-848 format) + (set! sv-864 (clear *temp-string*)) + (set! sv-880 "~S: ~S") + (set! sv-896 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f)) + (let ((a3-20 (lookup-text! + *common-text* + (-> *language-name-remap* (-> (the-as (pointer uint64) (-> s3-0 s0-0 value-to-modify)))) + #f + ) + ) + ) + (sv-848 sv-864 sv-880 sv-896 a3-20) + ) + (set! sv-912 *temp-string*) + sv-912 + ) + ) + ) + ) ) - (t9-60 sv-912 a1-64 a2-50 a3-21 t0-2) - ) + ) + (when sv-912 + (let ((f0-23 (-> obj transition-percentage-invert))) + (let ((v1-235 sv-112)) + (set! (-> v1-235 color) + (the-as font-color (if (and (= s0-0 (-> obj option-index)) (not (-> obj in-transition))) + 30 + 0 + ) + ) + ) + ) + (set! (-> sv-112 origin x) (the float (- sv-128 (-> obj left-x-offset)))) + (set! (-> sv-112 origin y) (the float (the int (* (the float sv-144) (if (-> s3-0 s0-0 scale) + f0-23 + 1.0 + ) + ) + ) + ) + ) + (let ((v1-246 sv-112)) + (set! (-> v1-246 scale) (* arg2 f0-23)) + ) + (let ((t9-60 print-game-text) + (a1-64 sv-112) + (a2-50 #f) + (a3-21 (the int (* 128.0 f0-23))) + (t0-2 22) + ) + (t9-60 sv-912 a1-64 a2-50 a3-21 t0-2) + ) + ) + ) + (+! s2-1 arg1) + (+! s1-0 1) + ) ) - ) - (+! s2-1 arg1) - (+! s1-0 1) ) - ) ) - ) 0 (none) ) (defmethod draw-progress progress ((obj progress)) - (let - ((f30-0 (+ -409.0 (-> obj particles 2 init-pos x) (* 0.8 (the float (-> obj left-x-offset))))) - (s5-0 (if (or (-> obj stat-transition) (nonzero? (-> obj level-transition))) - 0 - (-> obj transition-offset) - ) - ) - ) - (let - ((f28-0 - (if (or (-> obj stat-transition) (nonzero? (-> obj level-transition))) - 1.0 - (-> obj transition-percentage-invert) - ) - ) - ) - (with-dma-buffer-add-bucket ((s3-0 (-> (current-frame) global-buf)) - (bucket-id debug-draw0)) - (draw-string-xy (string-format "~D" (the int (+ 0.5 (-> *target* game money)))) s3-0 - (the int (+ 428.0 (the float s5-0) f30-0)) (- 12 (the int (* 0.16666667 f30-0))) - (font-color default) (font-flags shadow kerning large)) - (let ((s2-1 draw-string-xy)) - (format - (clear *temp-string*) - "~D" - (the int (+ 0.5 (-> *target* game fuel))) - ) - (s2-1 - *temp-string* - s3-0 - (the int (+ 456.0 (the float (adjust-pos s5-0 50)) f30-0)) - (- 48 (the int (* 0.125 f30-0))) - (font-color default) - (font-flags shadow kerning large) - ) - ) - (let ((s2-2 draw-string-xy)) - (format - (clear *temp-string*) - "~D" - (the int (+ 0.5 (-> *target* fact-info-target buzzer))) - ) - (s2-2 - *temp-string* - s3-0 - (the int (+ 469.0 (the float (adjust-pos s5-0 100)) f30-0)) - 89 - (font-color default) - (font-flags shadow kerning large) - ) - ) - ) - (let - ((s4-2 - (new - 'stack - 'font-context - *font-default-matrix* - (the - int - (+ - (- 423.0 (the float (/ (-> obj left-x-offset) 2))) - f30-0 - (the float (adjust-pos s5-0 150)) + (let ((f30-0 (+ -409.0 (-> obj particles 2 init-pos x) (* 0.8 (the float (-> obj left-x-offset))))) + (s5-0 (if (or (-> obj stat-transition) (nonzero? (-> obj level-transition))) + 0 + (-> obj transition-offset) + ) + ) + ) + (let ((f28-0 (if (or (-> obj stat-transition) (nonzero? (-> obj level-transition))) + 1.0 + (-> obj transition-percentage-invert) + ) + ) + ) + (let* ((s3-0 (-> *display* frames (-> *display* on-screen) frame global-buf)) + (s4-0 (-> s3-0 base)) + ) + (let ((s2-0 draw-string-xy)) + (format (clear *temp-string*) "~D" (the int (+ 0.5 (-> *target* game money)))) + (s2-0 + *temp-string* + s3-0 + (the int (+ 428.0 (the float s5-0) f30-0)) + (- 12 (the int (* 0.16666667 f30-0))) + (font-color default) + (font-flags shadow kerning large) + ) + ) + (let ((s2-1 draw-string-xy)) + (format (clear *temp-string*) "~D" (the int (+ 0.5 (-> *target* game fuel)))) + (s2-1 + *temp-string* + s3-0 + (the int (+ 456.0 (the float (adjust-pos s5-0 50)) f30-0)) + (- 48 (the int (* 0.125 f30-0))) + (font-color default) + (font-flags shadow kerning large) + ) + ) + (let ((s2-2 draw-string-xy)) + (format (clear *temp-string*) "~D" (the int (+ 0.5 (-> *target* fact-info-target buzzer)))) + (s2-2 + *temp-string* + s3-0 + (the int (+ 469.0 (the float (adjust-pos s5-0 100)) f30-0)) + 89 + (font-color default) + (font-flags shadow kerning large) + ) + ) + (let ((a3-4 (-> s3-0 base))) + (let ((v1-20 (the-as object (-> s3-0 base)))) + (set! (-> (the-as dma-packet v1-20) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-20) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-20) vif1) (new 'static 'vif-tag)) + (set! (-> s3-0 base) (&+ (the-as pointer v1-20) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + s4-0 + (the-as (pointer dma-tag) a3-4) + ) ) - ) - 131 - 0.0 - (font-color default) - (font-flags shadow kerning) ) - ) - ) - (let ((v1-29 s4-2)) - (set! (-> v1-29 width) (the float 100)) - ) - (let ((v1-30 s4-2)) - (set! (-> v1-30 height) (the float 15)) - ) - (let ((v1-31 s4-2)) - (set! (-> v1-31 scale) 0.5) - ) - (set! (-> s4-2 flags) (font-flags shadow kerning large)) - (print-game-text - (lookup-text! *common-text* (game-text-id options) #f) - s4-2 - #f - 128 - 22 - ) - (let ((v1-34 s4-2)) - (set! (-> v1-34 width) (the float 160)) - ) - (let ((v1-35 s4-2)) - (set! (-> v1-35 height) (the float 22)) - ) - (let ((v1-36 s4-2)) - (set! (-> v1-36 scale) 1.3) - ) - (let ((a0-31 s4-2)) - (set! (-> a0-31 color) (font-color another-light-blue)) - ) - (set! - (-> s4-2 origin x) - (+ - (- - 435.0 - (the float (if (< (-> *progress-process* 0 completion-percentage) 10.0) - 93 - 80 - ) - ) + (let ((s4-2 + (new + 'stack + 'font-context + *font-default-matrix* + (the int (+ (- 423.0 (the float (/ (-> obj left-x-offset) 2))) f30-0 (the float (adjust-pos s5-0 150)))) + 131 + 0.0 + (font-color default) + (font-flags shadow kerning) + ) + ) + ) + (let ((v1-29 s4-2)) + (set! (-> v1-29 width) (the float 100)) + ) + (let ((v1-30 s4-2)) + (set! (-> v1-30 height) (the float 15)) + ) + (let ((v1-31 s4-2)) + (set! (-> v1-31 scale) 0.5) + ) + (set! (-> s4-2 flags) (font-flags shadow kerning large)) + (print-game-text (lookup-text! *common-text* (game-text-id options) #f) s4-2 #f 128 22) + (let ((v1-34 s4-2)) + (set! (-> v1-34 width) (the float 160)) + ) + (let ((v1-35 s4-2)) + (set! (-> v1-35 height) (the float 22)) + ) + (let ((v1-36 s4-2)) + (set! (-> v1-36 scale) 1.3) + ) + (let ((a0-31 s4-2)) + (set! (-> a0-31 color) (font-color another-light-blue)) + ) + (set! (-> s4-2 origin x) + (+ (- 435.0 (the float (if (< (-> *progress-process* 0 completion-percentage) 10.0) + 93 + 80 + ) + ) + ) + f30-0 + ) + ) + (set! (-> s4-2 origin y) 180.0) + (set! (-> s4-2 flags) (font-flags shadow kerning middle left large)) + (let ((s3-3 print-game-text)) + (format (clear *temp-string*) "~2D%" (the int (-> *progress-process* 0 completion-percentage))) + (s3-3 *temp-string* s4-2 #f (the int (* 128.0 f28-0)) 22) + ) ) - f30-0 - ) ) - (set! (-> s4-2 origin y) 180.0) - (set! (-> s4-2 flags) (font-flags shadow kerning middle left large)) - (let ((s3-3 print-game-text)) - (format - (clear *temp-string*) - "~2D%" - (the int (-> *progress-process* 0 completion-percentage)) - ) - (s3-3 *temp-string* s4-2 #f (the int (* 128.0 f28-0)) 22) - ) - ) - ) - 0.0 - (let ((f28-1 (+ -94.0 (-> obj particles 2 init-pos x))) - (s3-4 90) - (s4-3 224) - (s2-5 (/ s5-0 5)) - (f26-3 (-> obj button-scale)) - ) - (let ((f24-0 (* 182.04445 (- (/ -36.0 f26-3) (the float s2-5))))) - (set! - (-> obj particles 27 init-pos x) - (the float (+ s3-4 (the int (* f28-1 (cos f24-0))))) - ) - (set! - (-> obj particles 27 init-pos y) - (the float (+ s4-3 (the int (* f28-1 (sin f24-0))))) - ) - ) - (let - ((f24-2 (* 182.04445 (- (/ -21.0 f26-3) (the float (adjust-pos s2-5 10))))) - ) - (set! - (-> obj particles 28 init-pos x) - (the float (+ s3-4 (the int (* f28-1 (cos f24-2))))) - ) - (set! - (-> obj particles 28 init-pos y) - (the float (+ s4-3 (the int (* f28-1 (sin f24-2))))) - ) - ) - (let - ((f24-4 (* 182.04445 (- (/ -6.0 f26-3) (the float (adjust-pos s2-5 15)))))) - (set! - (-> obj particles 29 init-pos x) - (the float (+ s3-4 (the int (* f28-1 (cos f24-4))))) - ) - (set! - (-> obj particles 29 init-pos y) - (the float (+ s4-3 (the int (* f28-1 (sin f24-4))))) - ) - ) - (let - ((f26-5 (* 182.04445 (- (/ 9.0 f26-3) (the float (adjust-pos s2-5 20)))))) - (set! - (-> obj particles 30 init-pos x) - (the float (+ s3-4 (the int (* f28-1 (cos f26-5))))) - ) - (set! - (-> obj particles 30 init-pos y) - (the float (+ s4-3 (the int (* f28-1 (sin f26-5))))) - ) - ) - ) - (when *cheat-mode* - (let ((a0-46 "AUTO SAVE OFF")) - (if (-> *setting-control* current auto-save) - (set! a0-46 "AUTO SAVE ON") - ) - (let* - ((s3-5 (-> *display* frames (-> *display* on-screen) frame global-buf)) - (s4-4 (-> s3-5 base)) - ) - (draw-string-xy - a0-46 - s3-5 - (the int (+ 430.0 f30-0)) - 200 - (font-color blue-white) - (font-flags shadow kerning middle) - ) - (let ((a3-9 (-> s3-5 base))) - (let ((v1-81 (the-as object (-> s3-5 base)))) - (set! - (-> (the-as dma-packet v1-81) dma) - (new 'static 'dma-tag :id (dma-tag-id next)) - ) - (set! (-> (the-as dma-packet v1-81) vif0) (new 'static 'vif-tag)) - (set! (-> (the-as dma-packet v1-81) vif1) (new 'static 'vif-tag)) - (set! (-> s3-5 base) (&+ (the-as pointer v1-81) 16)) + 0.0 + (let ((f28-1 (+ -94.0 (-> obj particles 2 init-pos x))) + (s3-4 90) + (s4-3 224) + (s2-5 (/ s5-0 5)) + (f26-3 (-> obj button-scale)) + ) + (let ((f24-0 (* 182.04445 (- (/ -36.0 f26-3) (the float s2-5))))) + (set! (-> obj particles 27 init-pos x) (the float (+ s3-4 (the int (* f28-1 (cos f24-0)))))) + (set! (-> obj particles 27 init-pos y) (the float (+ s4-3 (the int (* f28-1 (sin f24-0)))))) ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - s4-4 - (the-as (pointer dma-tag) a3-9) + (let ((f24-2 (* 182.04445 (- (/ -21.0 f26-3) (the float (adjust-pos s2-5 10)))))) + (set! (-> obj particles 28 init-pos x) (the float (+ s3-4 (the int (* f28-1 (cos f24-2)))))) + (set! (-> obj particles 28 init-pos y) (the float (+ s4-3 (the int (* f28-1 (sin f24-2)))))) + ) + (let ((f24-4 (* 182.04445 (- (/ -6.0 f26-3) (the float (adjust-pos s2-5 15)))))) + (set! (-> obj particles 29 init-pos x) (the float (+ s3-4 (the int (* f28-1 (cos f24-4)))))) + (set! (-> obj particles 29 init-pos y) (the float (+ s4-3 (the int (* f28-1 (sin f24-4)))))) + ) + (let ((f26-5 (* 182.04445 (- (/ 9.0 f26-3) (the float (adjust-pos s2-5 20)))))) + (set! (-> obj particles 30 init-pos x) (the float (+ s3-4 (the int (* f28-1 (cos f26-5)))))) + (set! (-> obj particles 30 init-pos y) (the float (+ s4-3 (the int (* f28-1 (sin f26-5)))))) ) - ) ) - ) + (when *cheat-mode* + (let ((a0-46 "AUTO SAVE OFF")) + (if (-> *setting-control* current auto-save) + (set! a0-46 "AUTO SAVE ON") + ) + (let* ((s3-5 (-> *display* frames (-> *display* on-screen) frame global-buf)) + (s4-4 (-> s3-5 base)) + ) + (draw-string-xy + a0-46 + s3-5 + (the int (+ 430.0 f30-0)) + 200 + (font-color blue-white) + (font-flags shadow kerning middle) + ) + (let ((a3-9 (-> s3-5 base))) + (let ((v1-81 (the-as object (-> s3-5 base)))) + (set! (-> (the-as dma-packet v1-81) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-81) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-81) vif1) (new 'static 'vif-tag)) + (set! (-> s3-5 base) (&+ (the-as pointer v1-81) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + s4-4 + (the-as (pointer dma-tag) a3-9) + ) + ) + ) + ) + ) + (let ((a0-52 (-> obj icons 5 icon 0 root))) + (set-yaw-angle-clear-roll-pitch! + a0-52 + (- (y-angle a0-52) (* 182.04445 (* 4.0 (-> *display* time-adjust-ratio)))) + ) + ) + (let* ((f28-2 (* 0.00024414062 (the float (-> *progress-process* 0 in-out-position)))) + (f30-1 (* 300.0 f28-2)) + ) + (set! (-> obj particles 18 init-pos x) + (the float (+ (the int (the float (adjust-pos s5-0 50))) 394 (the int f30-1) (-> obj right-x-offset))) + ) + (set! (-> obj particles 18 init-pos y) (the float (- 40 (the int (* 80.0 f28-2))))) + (set! (-> obj icons 5 icon-x) + (+ (the int (the float (adjust-pos s5-0 50))) 393 (the int f30-1) (-> obj right-x-offset)) + ) + (set! (-> obj icons 5 icon-y) (- (-> obj small-orb-y-offset) (the int (* 80.0 f28-2)))) + (set! (-> obj particles 16 init-pos x) + (the float (+ (the int (the float (adjust-pos s5-0 100))) 425 (the int f30-1) (-> obj right-x-offset))) + ) + (set! (-> obj particles 16 init-pos y) (the float (- 112 (the int (* 60.0 f28-2))))) + (set! (-> obj particles 17 init-pos x) (the float (+ (the int (the float (adjust-pos s5-0 150))) + 442 + (the int f30-1) + (the int (* 0.7 (the float (-> obj right-x-offset)))) + ) + ) + ) + ) ) - (let ((a0-52 (-> obj icons 5 icon 0 root))) - (set-yaw-angle-clear-roll-pitch! - a0-52 - (- (y-angle a0-52) (* 182.04445 (* 4.0 (-> *display* time-adjust-ratio)))) - ) - ) - (let* - ((f28-2 - (* 0.00024414062 (the float (-> *progress-process* 0 in-out-position))) - ) - (f30-1 (* 300.0 f28-2)) - ) - (set! - (-> obj particles 18 init-pos x) - (the - float - (+ - (the int (the float (adjust-pos s5-0 50))) - 394 - (the int f30-1) - (-> obj right-x-offset) - ) - ) - ) - (set! - (-> obj particles 18 init-pos y) - (the float (- 40 (the int (* 80.0 f28-2)))) - ) - (set! - (-> obj icons 5 icon-x) - (+ - (the int (the float (adjust-pos s5-0 50))) - 393 - (the int f30-1) - (-> obj right-x-offset) - ) - ) - (set! - (-> obj icons 5 icon-y) - (- (-> obj small-orb-y-offset) (the int (* 80.0 f28-2))) - ) - (set! - (-> obj particles 16 init-pos x) - (the - float - (+ - (the int (the float (adjust-pos s5-0 100))) - 425 - (the int f30-1) - (-> obj right-x-offset) - ) - ) - ) - (set! - (-> obj particles 16 init-pos y) - (the float (- 112 (the int (* 60.0 f28-2)))) - ) - (set! - (-> obj particles 17 init-pos x) - (the - float - (+ - (the int (the float (adjust-pos s5-0 150))) - 442 - (the int f30-1) - (the int (* 0.7 (the float (-> obj right-x-offset)))) - ) - ) - ) - ) - ) (set! (-> obj particles 17 init-pos y) 193.0) + 0 (none) ) + + diff --git a/goal_src/engine/ui/progress/progress-part.gc b/goal_src/engine/ui/progress/progress-part.gc index 5a2385d85..82a7f3d62 100644 --- a/goal_src/engine/ui/progress/progress-part.gc +++ b/goal_src/engine/ui/progress/progress-part.gc @@ -7,146 +7,145 @@ ;; DECOMP BEGINS -(defun - part-progress-hud-left-func - ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) +(defun part-progress-hud-left-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) (let ((v1-0 *progress-process*)) - (set! (-> arg2 vector 0 w) (-> v1-0 0 left-side-x-scale)) - (set! (-> arg2 vector 1 w) (-> v1-0 0 left-side-y-scale)) - ) + (set! (-> arg2 vector 0 w) (-> v1-0 0 left-side-x-scale)) + (set! (-> arg2 vector 1 w) (-> v1-0 0 left-side-y-scale)) + ) (none) ) -(defun - part-progress-hud-right-func - ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) +(defun part-progress-hud-right-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) (let ((v1-0 *progress-process*)) - (set! (-> arg2 vector 0 w) (-> v1-0 0 right-side-x-scale)) - (set! (-> arg2 vector 1 w) (-> v1-0 0 right-side-y-scale)) + (set! (-> arg2 vector 0 w) (-> v1-0 0 right-side-x-scale)) + (set! (-> arg2 vector 1 w) (-> v1-0 0 right-side-y-scale)) + ) + (none) + ) + +(defun part-progress-hud-orb-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (#cond + (PC_PORT + (unless (and *pc-settings* (not (-> *pc-settings* use-vis?))) + (set! (-> arg2 vector 0 w) (/ 5324.8 (-> *progress-process* 0 sides-x-scale))) + (set! (-> arg2 vector 1 w) (/ 5324.8 (-> *progress-process* 0 sides-x-scale))) + ) + ) + (#t + (set! (-> arg2 vector 0 w) (/ 5324.8 (-> *progress-process* 0 sides-x-scale))) + (set! (-> arg2 vector 1 w) (/ 5324.8 (-> *progress-process* 0 sides-x-scale))) + ) ) (none) ) -(defun - part-progress-hud-orb-func - ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) - (set! (-> arg2 vector 0 w) (/ 5324.8 (-> *progress-process* 0 sides-x-scale))) - (set! (-> arg2 vector 1 w) (/ 5324.8 (-> *progress-process* 0 sides-x-scale))) - (none) - ) - -(defun - part-progress-hud-buzzer-func - ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) - (set! (-> arg2 vector 0 w) (/ 6144.0 (-> *progress-process* 0 sides-x-scale))) - (set! (-> arg2 vector 1 w) (/ 6144.0 (-> *progress-process* 0 sides-x-scale))) - (none) - ) - -(defun - part-progress-hud-button-func - ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) - (set! (-> arg2 vector 0 w) (/ 6553.6 (-> *progress-process* 0 sides-x-scale))) - (set! (-> arg2 vector 1 w) (/ 6553.6 (-> *progress-process* 0 sides-x-scale))) - (none) - ) - -(defun - part-progress-hud-tint-func - ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) - (set! - (-> arg2 vector 2 w) - (the float (- 64 (sar (* 63 (-> *progress-process* 0 in-out-position)) 12))) +(defun part-progress-hud-buzzer-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (#cond + (PC_PORT + (unless (and *pc-settings* (not (-> *pc-settings* use-vis?))) + (set! (-> arg2 vector 0 w) (/ 6144.0 (-> *progress-process* 0 sides-x-scale))) + (set! (-> arg2 vector 1 w) (/ 6144.0 (-> *progress-process* 0 sides-x-scale))) + ) + ) + (#t + (set! (-> arg2 vector 0 w) (/ 6144.0 (-> *progress-process* 0 sides-x-scale))) + (set! (-> arg2 vector 1 w) (/ 6144.0 (-> *progress-process* 0 sides-x-scale))) + ) ) - 0 (none) ) -(defun - part-progress-card-slot-01-func - ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) +(defun part-progress-hud-button-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (#cond + (PC_PORT + (unless (and *pc-settings* (not (-> *pc-settings* use-vis?))) + (set! (-> arg2 vector 0 w) (/ 6553.6 (-> *progress-process* 0 sides-x-scale))) + (set! (-> arg2 vector 1 w) (/ 6553.6 (-> *progress-process* 0 sides-x-scale))) + ) + ) + (#t + (set! (-> arg2 vector 0 w) (/ 6553.6 (-> *progress-process* 0 sides-x-scale))) + (set! (-> arg2 vector 1 w) (/ 6553.6 (-> *progress-process* 0 sides-x-scale))) + ) + ) + (none) + ) + +(defun part-progress-hud-tint-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (set! (-> arg2 vector 2 w) (the float (- 64 (sar (* 63 (-> *progress-process* 0 in-out-position)) 12)))) + (#when PC_PORT + (if (and *pc-settings* (not (-> *pc-settings* use-vis?))) + (set! (-> arg2 vector 0 w) (* (meters 15) (-> *pc-settings* aspect-ratio-scale))) + ) + ) + (none) + ) + +(defun part-progress-card-slot-01-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) (set! (-> arg2 vector 2 w) (if (zero? (-> *progress-process* 0 option-index)) - 64.0 - 32.0 - ) - ) + 64.0 + 32.0 + ) + ) (set! (-> arg2 vector 1 w) (-> *progress-process* 0 slot-scale)) 0 (none) ) -(defun - part-progress-card-slot-02-func - ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) +(defun part-progress-card-slot-02-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) (set! (-> arg2 vector 2 w) (if (= (-> *progress-process* 0 option-index) 1) - 64.0 - 32.0 - ) - ) + 64.0 + 32.0 + ) + ) (set! (-> arg2 vector 1 w) (-> *progress-process* 0 slot-scale)) 0 (none) ) -(defun - part-progress-card-slot-03-func - ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) +(defun part-progress-card-slot-03-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) (set! (-> arg2 vector 2 w) (if (= (-> *progress-process* 0 option-index) 2) - 64.0 - 32.0 - ) - ) + 64.0 + 32.0 + ) + ) (set! (-> arg2 vector 1 w) (-> *progress-process* 0 slot-scale)) 0 (none) ) -(defun - part-progress-card-slot-04-func - ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) +(defun part-progress-card-slot-04-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) (set! (-> arg2 vector 2 w) (if (= (-> *progress-process* 0 option-index) 3) - 64.0 - 32.0 - ) - ) + 64.0 + 32.0 + ) + ) (set! (-> arg2 vector 1 w) (-> *progress-process* 0 slot-scale)) 0 (none) ) -(defun - part-progress-card-cell-func - ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) - (let - ((f0-1 - (* 2.0 (+ -0.5 (-> *progress-process* 0 transition-percentage-invert))) - ) +(defun part-progress-card-cell-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (let ((f0-1 (* 2.0 (+ -0.5 (-> *progress-process* 0 transition-percentage-invert))))) + (if (< f0-1 0.0) + (set! f0-1 0.0) + ) + (set! (-> arg2 vector 2 w) (* 128.0 f0-1)) ) - (if (< f0-1 0.0) - (set! f0-1 0.0) - ) - (set! (-> arg2 vector 2 w) (* 128.0 f0-1)) - ) 0 (none) ) -(defun - part-progress-save-icon-func - ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) - (let - ((f0-1 (* 6144.0 (-> *progress-process* 0 transition-percentage-invert)))) - (set! (-> arg2 vector 0 w) f0-1) - (set! (-> arg2 vector 1 w) f0-1) - ) +(defun part-progress-save-icon-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (let ((f0-1 (* 6144.0 (-> *progress-process* 0 transition-percentage-invert)))) + (set! (-> arg2 vector 0 w) f0-1) + (set! (-> arg2 vector 1 w) f0-1) + ) 0 (none) ) -;; TODO - this has some changes within it to prevent a crash until `generic-obs` is finalized! -(defun - fuel-cell-progress-hud-orbit-callback - ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) +(defun fuel-cell-progress-hud-orbit-callback ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) (let* ((a0-1 (-> arg1 key)) (s5-0 (the-as progress (-> a0-1 proc))) (v1-0 (the int (the-as float (-> arg1 user-float)))) @@ -173,11 +172,7 @@ (s2-0 (new 'stack-no-clear 'vector)) ) (cond - ((or - (= s4-0 -1) - (= (-> s5-0 particle-state s4-0) 2) - (= (-> s5-0 particle-state s4-0) 1) - ) + ((or (= s4-0 -1) (= (-> s5-0 particle-state s4-0) 2) (= (-> s5-0 particle-state s4-0) 1)) (set! (-> arg2 vector 0 x) 245760.0) ) ((= v1-0 -1) @@ -185,31 +180,16 @@ (set! (-> arg2 vector 0 y) 0.0) ) (else - ;; NOTE: this check has been added so we can run progress even when manipy isn't working yet. - (cond - (#f;;(nonzero? (-> s5-0 icons (logand s4-0 3) icon 0 node-list)) - (vector<-cspace! - s3-0 - (-> s5-0 icons (logand s4-0 3) icon 0 node-list data v1-0) - ) - (vector<-cspace! - s2-0 - (-> s5-0 icons (logand s4-0 3) icon 0 node-list data 3) - ) - (vector-! s3-0 s3-0 s2-0) - (set! (-> arg2 vector 0 x) (* 48.0 (-> s3-0 x))) - (set! (-> arg2 vector 0 y) (* 60.0 (-> s3-0 y))) - (set! (-> arg2 vector 0 z) (* 32.0 (-> s3-0 z))) - ) - (else - ;; NOTE: this is added as a temporary workaround. - ;; if we don't have this stuff loaded right, just set the offset to 0. - ;; this ends up being the right offset in all the cases except for things that - ;; orbit the powercell. Those are just draw underneath the powercell - (set! (-> arg2 vector 0 x) 0.0) - (set! (-> arg2 vector 0 y) 0.0) - ) - ) + ;; NOTE: this code has been commented for now so we can run progress even when manipy isn't working yet. + ;; if we don't have this stuff loaded right, just set the offset to 0. + ;; this ends up being the right offset in all the cases except for things that + ;; orbit the powercell. Those are just drawn underneath the powercell + ; (vector<-cspace! s3-0 (-> s5-0 icons (logand s4-0 3) icon 0 node-list data v1-0)) + ; (vector<-cspace! s2-0 (-> s5-0 icons (logand s4-0 3) icon 0 node-list data 3)) + ; (vector-! s3-0 s3-0 s2-0) + (set! (-> arg2 vector 0 x) (* 48.0 (-> s3-0 x))) + (set! (-> arg2 vector 0 y) (* 60.0 (-> s3-0 y))) + (set! (-> arg2 vector 0 z) (* 32.0 (-> s3-0 z))) ) ) ) @@ -221,1588 +201,1051 @@ (none) ) -(set! - (-> *part-group-id-table* 85) - (new 'static 'sparticle-launch-group - :length 1 - :duration #xbb8 - :linger-duration #x5dc - :flags - (sp-group-flag use-local-clock screen-space) - :name "group-part-progress-hud-previous" - :launcher - (new 'static 'inline-array sparticle-group-item 1 - (sp-item 332 :flags (launch-asap)) - ) - :bounds (new 'static 'sphere :w 4096.0) - ) - ) +(set! (-> *part-group-id-table* 85) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags + (sp-group-flag use-local-clock screen-space) + :name "group-part-progress-hud-previous" + :launcher + (new 'static 'inline-array sparticle-group-item 1 (sp-item 332 :flags (launch-asap))) + :bounds (new 'static 'sphere :w 4096.0) + ) + ) -(set! - (-> *part-group-id-table* 86) - (new 'static 'sparticle-launch-group - :length 1 - :duration #xbb8 - :linger-duration #x5dc - :flags - (sp-group-flag use-local-clock screen-space) - :name "group-part-progress-hud-next" - :launcher - (new 'static 'inline-array sparticle-group-item 1 - (sp-item 333 :flags (launch-asap)) - ) - :bounds (new 'static 'sphere :w 4096.0) - ) - ) +(set! (-> *part-group-id-table* 86) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags + (sp-group-flag use-local-clock screen-space) + :name "group-part-progress-hud-next" + :launcher + (new 'static 'inline-array sparticle-group-item 1 (sp-item 333 :flags (launch-asap))) + :bounds (new 'static 'sphere :w 4096.0) + ) + ) -(set! - (-> *part-group-id-table* 87) - (new 'static 'sparticle-launch-group - :length 1 - :duration #xbb8 - :linger-duration #x5dc - :flags (sp-group-flag screen-space) - :name "group-part-progress-hud-selector" - :launcher - (new 'static 'inline-array sparticle-group-item 1 - (sp-item 334 :flags (launch-asap)) - ) - :bounds (new 'static 'sphere :w 4096.0) - ) - ) +(set! (-> *part-group-id-table* 87) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-progress-hud-selector" + :launcher + (new 'static 'inline-array sparticle-group-item 1 (sp-item 334 :flags (launch-asap))) + :bounds (new 'static 'sphere :w 4096.0) + ) + ) -(set! - (-> *part-group-id-table* 88) - (new 'static 'sparticle-launch-group - :length 1 - :duration #xbb8 - :linger-duration #x5dc - :flags (sp-group-flag screen-space) - :name "group-part-progress-hud-left" - :launcher - (new 'static 'inline-array sparticle-group-item 1 - (sp-item 335 :flags (launch-asap)) - ) - :bounds (new 'static 'sphere :w 4096.0) - ) - ) +(set! (-> *part-group-id-table* 88) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-progress-hud-left" + :launcher + (new 'static 'inline-array sparticle-group-item 1 (sp-item 335 :flags (launch-asap))) + :bounds (new 'static 'sphere :w 4096.0) + ) + ) -(set! - (-> *part-group-id-table* 89) - (new 'static 'sparticle-launch-group - :length 1 - :duration #xbb8 - :linger-duration #x5dc - :flags (sp-group-flag screen-space) - :name "group-part-progress-hud-right" - :launcher - (new 'static 'inline-array sparticle-group-item 1 - (sp-item 336 :flags (launch-asap)) - ) - :bounds (new 'static 'sphere :w 4096.0) - ) - ) +(set! (-> *part-group-id-table* 89) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-progress-hud-right" + :launcher + (new 'static 'inline-array sparticle-group-item 1 (sp-item 336 :flags (launch-asap))) + :bounds (new 'static 'sphere :w 4096.0) + ) + ) -(set! - (-> *part-group-id-table* 90) - (new 'static 'sparticle-launch-group - :length 1 - :duration #xbb8 - :linger-duration #x5dc - :flags (sp-group-flag screen-space) - :name "group-part-progress-hud-tint" - :launcher - (new 'static 'inline-array sparticle-group-item 1 - (sp-item 337 :flags (launch-asap)) - ) - :bounds (new 'static 'sphere :w 4096.0) - ) - ) +(set! (-> *part-group-id-table* 90) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-progress-hud-tint" + :launcher + (new 'static 'inline-array sparticle-group-item 1 (sp-item 337 :flags (launch-asap))) + :bounds (new 'static 'sphere :w 4096.0) + ) + ) -(set! - (-> *part-group-id-table* 91) - (new 'static 'sparticle-launch-group - :length 3 - :duration #xbb8 - :linger-duration #x5dc - :flags (sp-group-flag screen-space) - :name "group-part-progress-card-cell" - :launcher - (new 'static 'inline-array sparticle-group-item 3 - (sp-item 2190 :flags (launch-asap)) - (sp-item 2191 :flags (launch-asap)) - (sp-item 2192 :flags (launch-asap)) - ) - :bounds (new 'static 'sphere :w 4096.0) - ) - ) +(set! (-> *part-group-id-table* 91) (new 'static 'sparticle-launch-group + :length 3 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-progress-card-cell" + :launcher + (new 'static 'inline-array sparticle-group-item 3 + (sp-item 2190 :flags (launch-asap)) + (sp-item 2191 :flags (launch-asap)) + (sp-item 2192 :flags (launch-asap)) + ) + :bounds (new 'static 'sphere :w 4096.0) + ) + ) -(set! - (-> *part-group-id-table* 570) - (new 'static 'sparticle-launch-group - :length 1 - :duration #xbb8 - :linger-duration #x5dc - :flags (sp-group-flag screen-space) - :name "group-part-progress-button-x" - :launcher - (new 'static 'inline-array sparticle-group-item 1 - (sp-item 2336 :flags (launch-asap)) - ) - :bounds (new 'static 'sphere :w 4096.0) - ) - ) +(set! (-> *part-group-id-table* 570) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-progress-button-x" + :launcher + (new 'static 'inline-array sparticle-group-item 1 (sp-item 2336 :flags (launch-asap))) + :bounds (new 'static 'sphere :w 4096.0) + ) + ) -(set! - (-> *part-group-id-table* 571) - (new 'static 'sparticle-launch-group - :length 1 - :duration #xbb8 - :linger-duration #x5dc - :flags (sp-group-flag screen-space) - :name "group-part-progress-button-square" - :launcher - (new 'static 'inline-array sparticle-group-item 1 - (sp-item 2337 :flags (launch-asap)) - ) - :bounds (new 'static 'sphere :w 4096.0) - ) - ) +(set! (-> *part-group-id-table* 571) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-progress-button-square" + :launcher + (new 'static 'inline-array sparticle-group-item 1 (sp-item 2337 :flags (launch-asap))) + :bounds (new 'static 'sphere :w 4096.0) + ) + ) -(set! - (-> *part-group-id-table* 572) - (new 'static 'sparticle-launch-group - :length 1 - :duration #xbb8 - :linger-duration #x5dc - :flags (sp-group-flag screen-space) - :name "group-part-progress-button-triangle" - :launcher - (new 'static 'inline-array sparticle-group-item 1 - (sp-item 2338 :flags (launch-asap)) - ) - :bounds (new 'static 'sphere :w 4096.0) - ) - ) +(set! (-> *part-group-id-table* 572) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-progress-button-triangle" + :launcher + (new 'static 'inline-array sparticle-group-item 1 (sp-item 2338 :flags (launch-asap))) + :bounds (new 'static 'sphere :w 4096.0) + ) + ) -(set! - (-> *part-group-id-table* 573) - (new 'static 'sparticle-launch-group - :length 1 - :duration #xbb8 - :linger-duration #x5dc - :flags (sp-group-flag screen-space) - :name "group-part-progress-button-circle" - :launcher - (new 'static 'inline-array sparticle-group-item 1 - (sp-item 2339 :flags (launch-asap)) - ) - :bounds (new 'static 'sphere :w 4096.0) - ) - ) +(set! (-> *part-group-id-table* 573) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-progress-button-circle" + :launcher + (new 'static 'inline-array sparticle-group-item 1 (sp-item 2339 :flags (launch-asap))) + :bounds (new 'static 'sphere :w 4096.0) + ) + ) -(set! - (-> *part-group-id-table* 92) - (new 'static 'sparticle-launch-group - :length 1 - :duration #xbb8 - :linger-duration #x5dc - :flags (sp-group-flag screen-space) - :name "group-part-progress-card-slot-01" - :launcher - (new 'static 'inline-array sparticle-group-item 1 - (sp-item 2142 :flags (launch-asap)) - ) - :bounds (new 'static 'sphere :w 4096.0) - ) - ) +(set! (-> *part-group-id-table* 92) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-progress-card-slot-01" + :launcher + (new 'static 'inline-array sparticle-group-item 1 (sp-item 2142 :flags (launch-asap))) + :bounds (new 'static 'sphere :w 4096.0) + ) + ) -(set! - (-> *part-group-id-table* 93) - (new 'static 'sparticle-launch-group - :length 1 - :duration #xbb8 - :linger-duration #x5dc - :flags (sp-group-flag screen-space) - :name "group-part-progress-card-slot-02" - :launcher - (new 'static 'inline-array sparticle-group-item 1 - (sp-item 2143 :flags (launch-asap)) - ) - :bounds (new 'static 'sphere :w 4096.0) - ) - ) +(set! (-> *part-group-id-table* 93) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-progress-card-slot-02" + :launcher + (new 'static 'inline-array sparticle-group-item 1 (sp-item 2143 :flags (launch-asap))) + :bounds (new 'static 'sphere :w 4096.0) + ) + ) -(set! - (-> *part-group-id-table* 94) - (new 'static 'sparticle-launch-group - :length 1 - :duration #xbb8 - :linger-duration #x5dc - :flags (sp-group-flag screen-space) - :name "group-part-progress-card-slot-03" - :launcher - (new 'static 'inline-array sparticle-group-item 1 - (sp-item 2144 :flags (launch-asap)) - ) - :bounds (new 'static 'sphere :w 4096.0) - ) - ) +(set! (-> *part-group-id-table* 94) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-progress-card-slot-03" + :launcher + (new 'static 'inline-array sparticle-group-item 1 (sp-item 2144 :flags (launch-asap))) + :bounds (new 'static 'sphere :w 4096.0) + ) + ) -(set! - (-> *part-group-id-table* 95) - (new 'static 'sparticle-launch-group - :length 1 - :duration #xbb8 - :linger-duration #x5dc - :flags (sp-group-flag screen-space) - :name "group-part-progress-card-slot-04" - :launcher - (new 'static 'inline-array sparticle-group-item 1 - (sp-item 2145 :flags (launch-asap)) - ) - :bounds (new 'static 'sphere :w 4096.0) - ) - ) +(set! (-> *part-group-id-table* 95) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-progress-card-slot-04" + :launcher + (new 'static 'inline-array sparticle-group-item 1 (sp-item 2145 :flags (launch-asap))) + :bounds (new 'static 'sphere :w 4096.0) + ) + ) -(set! - (-> *part-group-id-table* 96) - (new 'static 'sparticle-launch-group - :length 1 - :duration #xbb8 - :linger-duration #x5dc - :flags (sp-group-flag screen-space) - :name - "group-part-progress-hud-power-cell-center" - :launcher - (new 'static 'inline-array sparticle-group-item 1 - (sp-item 338 :flags (launch-asap)) - ) - :bounds (new 'static 'sphere :w 409600.0) - ) - ) +(set! (-> *part-group-id-table* 96) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name + "group-part-progress-hud-power-cell-center" + :launcher + (new 'static 'inline-array sparticle-group-item 1 (sp-item 338 :flags (launch-asap))) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) -(set! - (-> *part-id-table* 337) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 12 - (sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 15.0)) - (sp-flt spt-scale-y (meters 11.5)) - (sp-flt spt-r 128.0) - (sp-flt spt-g 32.0) - (sp-flt spt-b 0.0) - (sp-flt spt-a 64.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit2 bit9 bit13) - (sp-func spt-func 'part-progress-hud-tint-func) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 337) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 15.0)) + (sp-flt spt-scale-y (meters 11.5)) + (sp-flt spt-r 128.0) + (sp-flt spt-g 32.0) + (sp-flt spt-b 0.0) + (sp-flt spt-a 64.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9 bit13) + (sp-func spt-func 'part-progress-hud-tint-func) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 2190) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 12 - (sp-tex spt-texture (new 'static 'texture-id :index #x6e :page #x1cf)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 0.8)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit9 bit13) - (sp-func spt-func 'part-progress-card-cell-func) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 2190) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x6e :page #x1cf)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 0.8)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9 bit13) + (sp-func spt-func 'part-progress-card-cell-func) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 2191) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 13 - (sp-tex spt-texture (new 'static 'texture-id :index #x6d :page #x1cf)) - (sp-flt spt-num 1.0) - (sp-flt spt-x (meters 1.05)) - (sp-flt spt-scale-x (meters 0.8)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit9 bit13) - (sp-func spt-func 'part-progress-card-cell-func) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 2191) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (sp-tex spt-texture (new 'static 'texture-id :index #x6d :page #x1cf)) + (sp-flt spt-num 1.0) + (sp-flt spt-x (meters 1.05)) + (sp-flt spt-scale-x (meters 0.8)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9 bit13) + (sp-func spt-func 'part-progress-card-cell-func) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 2192) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 13 - (sp-tex spt-texture (new 'static 'texture-id :index #x6c :page #x1cf)) - (sp-flt spt-num 1.0) - (sp-flt spt-x (meters 2.3)) - (sp-flt spt-scale-x (meters 0.8)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit9 bit13) - (sp-func spt-func 'part-progress-card-cell-func) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 2192) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (sp-tex spt-texture (new 'static 'texture-id :index #x6c :page #x1cf)) + (sp-flt spt-num 1.0) + (sp-flt spt-x (meters 2.3)) + (sp-flt spt-scale-x (meters 0.8)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9 bit13) + (sp-func spt-func 'part-progress-card-cell-func) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 2336) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 12 - (sp-tex spt-texture (new 'static 'texture-id :index #x5 :page #x408)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 1.6)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit2 bit9 bit13) - (sp-func spt-func 'part-progress-hud-button-func) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 2336) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x5 :page #x408)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.6)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9 bit13) + (sp-func spt-func 'part-progress-hud-button-func) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 2337) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 12 - (sp-tex spt-texture (new 'static 'texture-id :index #x6 :page #x408)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 1.6)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit2 bit9 bit13) - (sp-func spt-func 'part-progress-hud-button-func) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 2337) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x6 :page #x408)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.6)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9 bit13) + (sp-func spt-func 'part-progress-hud-button-func) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 2338) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 12 - (sp-tex spt-texture (new 'static 'texture-id :index #x7 :page #x408)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 1.6)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit2 bit9 bit13) - (sp-func spt-func 'part-progress-hud-button-func) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 2338) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x7 :page #x408)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.6)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9 bit13) + (sp-func spt-func 'part-progress-hud-button-func) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 2339) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 12 - (sp-tex spt-texture (new 'static 'texture-id :index #x8 :page #x408)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 1.6)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit2 bit9 bit13) - (sp-func spt-func 'part-progress-hud-button-func) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 2339) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x8 :page #x408)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.6)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9 bit13) + (sp-func spt-func 'part-progress-hud-button-func) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 2142) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 12 - (sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 9.2)) - (sp-flt spt-scale-y (meters 2.0)) - (sp-flt spt-r 0.0) - (sp-flt spt-g 0.0) - (sp-flt spt-b 0.0) - (sp-flt spt-a 64.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit9 bit13) - (sp-func spt-func 'part-progress-card-slot-01-func) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 2142) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 9.2)) + (sp-flt spt-scale-y (meters 2.0)) + (sp-flt spt-r 0.0) + (sp-flt spt-g 0.0) + (sp-flt spt-b 0.0) + (sp-flt spt-a 64.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9 bit13) + (sp-func spt-func 'part-progress-card-slot-01-func) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 2143) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 12 - (sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 9.2)) - (sp-flt spt-scale-y (meters 2.0)) - (sp-flt spt-r 0.0) - (sp-flt spt-g 0.0) - (sp-flt spt-b 0.0) - (sp-flt spt-a 64.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit9 bit13) - (sp-func spt-func 'part-progress-card-slot-02-func) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 2143) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 9.2)) + (sp-flt spt-scale-y (meters 2.0)) + (sp-flt spt-r 0.0) + (sp-flt spt-g 0.0) + (sp-flt spt-b 0.0) + (sp-flt spt-a 64.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9 bit13) + (sp-func spt-func 'part-progress-card-slot-02-func) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 2144) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 12 - (sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 9.2)) - (sp-flt spt-scale-y (meters 2.0)) - (sp-flt spt-r 0.0) - (sp-flt spt-g 0.0) - (sp-flt spt-b 0.0) - (sp-flt spt-a 64.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit9 bit13) - (sp-func spt-func 'part-progress-card-slot-03-func) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 2144) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 9.2)) + (sp-flt spt-scale-y (meters 2.0)) + (sp-flt spt-r 0.0) + (sp-flt spt-g 0.0) + (sp-flt spt-b 0.0) + (sp-flt spt-a 64.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9 bit13) + (sp-func spt-func 'part-progress-card-slot-03-func) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 2145) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 12 - (sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 9.2)) - (sp-flt spt-scale-y (meters 2.0)) - (sp-flt spt-r 0.0) - (sp-flt spt-g 0.0) - (sp-flt spt-b 0.0) - (sp-flt spt-a 64.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit9 bit13) - (sp-func spt-func 'part-progress-card-slot-04-func) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 2145) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x36 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 9.2)) + (sp-flt spt-scale-y (meters 2.0)) + (sp-flt spt-r 0.0) + (sp-flt spt-g 0.0) + (sp-flt spt-b 0.0) + (sp-flt spt-a 64.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9 bit13) + (sp-func spt-func 'part-progress-card-slot-04-func) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 332) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 11 - (sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x408)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 1.2)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit2 bit9 bit13) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 332) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 11 + (sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x408)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.2)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9 bit13) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 333) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 11 - (sp-tex spt-texture (new 'static 'texture-id :index #x1 :page #x408)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 1.2)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit2 bit9 bit13) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 333) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 11 + (sp-tex spt-texture (new 'static 'texture-id :index #x1 :page #x408)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.2)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9 bit13) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 334) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 11 - (sp-tex spt-texture (new 'static 'texture-id :index #x4 :page #x408)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 1.8)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit2 bit9 bit13) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 334) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 11 + (sp-tex spt-texture (new 'static 'texture-id :index #x4 :page #x408)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.8)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9 bit13) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 335) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 12 - (sp-tex spt-texture (new 'static 'texture-id :page #x408)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 3.5)) - (sp-flt spt-scale-y (meters 13.0)) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit2 bit9 bit13) - (sp-func spt-func 'part-progress-hud-left-func) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 335) + (new 'static 'sparticle-launcher :init-specs (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :page #x408)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 3.5)) + (sp-flt spt-scale-y (meters 13.0)) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9 bit13) + (sp-func spt-func 'part-progress-hud-left-func) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 336) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 12 - (sp-tex spt-texture (new 'static 'texture-id :index #x3 :page #x408)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 6.0)) - (sp-flt spt-scale-y (meters 13.0)) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit2 bit9 bit13) - (sp-func spt-func 'part-progress-hud-right-func) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 336) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x3 :page #x408)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 6.0)) + (sp-flt spt-scale-y (meters 13.0)) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9 bit13) + (sp-func spt-func 'part-progress-hud-right-func) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 339) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 13 - (sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 0.3)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit9 bit13) - (sp-flt spt-userdata 4.0) - (sp-func spt-func 'fuel-cell-progress-hud-orbit-callback) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 339) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 0.3)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9 bit13) + (sp-flt spt-userdata 4.0) + (sp-func spt-func 'fuel-cell-progress-hud-orbit-callback) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 340) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 13 - (sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 0.3)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit9 bit13) - (sp-flt spt-userdata 5.0) - (sp-func spt-func 'fuel-cell-progress-hud-orbit-callback) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 340) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 0.3)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9 bit13) + (sp-flt spt-userdata 5.0) + (sp-func spt-func 'fuel-cell-progress-hud-orbit-callback) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 341) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 13 - (sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 0.3)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit9 bit13) - (sp-flt spt-userdata 6.0) - (sp-func spt-func 'fuel-cell-progress-hud-orbit-callback) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 341) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 0.3)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9 bit13) + (sp-flt spt-userdata 6.0) + (sp-func spt-func 'fuel-cell-progress-hud-orbit-callback) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 342) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 13 - (sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 0.3)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit9 bit13) - (sp-flt spt-userdata 7.0) - (sp-func spt-func 'fuel-cell-progress-hud-orbit-callback) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 342) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 0.3)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9 bit13) + (sp-flt spt-userdata 7.0) + (sp-func spt-func 'fuel-cell-progress-hud-orbit-callback) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 343) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 13 - (sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 0.2)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit9 bit13) - (sp-flt spt-userdata 9.0) - (sp-func spt-func 'fuel-cell-progress-hud-orbit-callback) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 343) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 0.2)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9 bit13) + (sp-flt spt-userdata 9.0) + (sp-func spt-func 'fuel-cell-progress-hud-orbit-callback) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 338) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 13 - (sp-tex spt-texture (new 'static 'texture-id :index #x30 :page #x2)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 1.2)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit2 bit9 bit13) - (sp-flt spt-userdata 3.0) - (sp-func spt-func 'fuel-cell-progress-hud-orbit-callback) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 338) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (sp-tex spt-texture (new 'static 'texture-id :index #x30 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.2)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9 bit13) + (sp-flt spt-userdata 3.0) + (sp-func spt-func 'fuel-cell-progress-hud-orbit-callback) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 344) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 2 - (sp-flt spt-fade-a -0.53333336) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 344) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 2 (sp-flt spt-fade-a -0.53333336) (sp-end)) + ) + ) -(set! - (-> *part-id-table* 345) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 22 - (sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2)) - (sp-flt spt-num 0.5) - (sp-flt spt-z 2160.0) - (sp-flt spt-scale-x (meters 0.25)) - (sp-int spt-rot-x 4) - (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0) - (sp-rnd-flt spt-scale-y (meters 0.07) (meters 0.46) 1.0) - (sp-rnd-int spt-r 0 1 255.0) - (sp-rnd-int spt-g 0 1 255.0) - (sp-rnd-int spt-b 0 1 255.0) - (sp-flt spt-a 0.0) - (sp-flt spt-scalevel-x (meters 0.009765625)) - (sp-rnd-flt spt-rotvel-z (degrees -0.15) (degrees 0.3) 1.0) - (sp-flt spt-scalevel-y (meters 0.009765625)) - (sp-flt spt-fade-a 0.35555556) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit2 bit3 bit9 bit13) - (sp-flt spt-userdata -1.0) - (sp-func spt-func 'fuel-cell-progress-hud-orbit-callback) - (sp-int spt-next-time 90) - (sp-launcher-by-id spt-next-launcher 232) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 345) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 22 + (sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2)) + (sp-flt spt-num 0.5) + (sp-flt spt-z 2160.0) + (sp-flt spt-scale-x (meters 0.25)) + (sp-int spt-rot-x 4) + (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0) + (sp-rnd-flt spt-scale-y (meters 0.07) (meters 0.46) 1.0) + (sp-rnd-int spt-r 0 1 255.0) + (sp-rnd-int spt-g 0 1 255.0) + (sp-rnd-int spt-b 0 1 255.0) + (sp-flt spt-a 0.0) + (sp-flt spt-scalevel-x (meters 0.009765625)) + (sp-rnd-flt spt-rotvel-z (degrees -0.15) (degrees 0.3) 1.0) + (sp-flt spt-scalevel-y (meters 0.009765625)) + (sp-flt spt-fade-a 0.35555556) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit3 bit9 bit13) + (sp-flt spt-userdata -1.0) + (sp-func spt-func 'fuel-cell-progress-hud-orbit-callback) + (sp-int spt-next-time 90) + (sp-launcher-by-id spt-next-launcher 232) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 346) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 21 - (sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2)) - (sp-flt spt-num 0.06) - (sp-flt spt-z 2160.0) - (sp-rnd-flt spt-scale-x (meters 1.0) (meters 0.25) 1.0) - (sp-int spt-rot-x 4) - (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0) - (sp-flt spt-scale-y (meters 0.1)) - (sp-rnd-int spt-r 0 1 255.0) - (sp-rnd-int spt-g 0 1 255.0) - (sp-rnd-int spt-b 0 1 255.0) - (sp-flt spt-a 0.0) - (sp-flt spt-scalevel-x (meters 0.009765625)) - (sp-rnd-flt spt-rotvel-z (degrees -0.15) (degrees 0.3) 1.0) - (sp-flt spt-fade-a 0.32) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit2 bit3 bit9 bit13) - (sp-flt spt-userdata -1.0) - (sp-func spt-func 'fuel-cell-progress-hud-orbit-callback) - (sp-int spt-next-time 75) - (sp-launcher-by-id spt-next-launcher 232) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 346) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 21 + (sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2)) + (sp-flt spt-num 0.06) + (sp-flt spt-z 2160.0) + (sp-rnd-flt spt-scale-x (meters 1.0) (meters 0.25) 1.0) + (sp-int spt-rot-x 4) + (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0) + (sp-flt spt-scale-y (meters 0.1)) + (sp-rnd-int spt-r 0 1 255.0) + (sp-rnd-int spt-g 0 1 255.0) + (sp-rnd-int spt-b 0 1 255.0) + (sp-flt spt-a 0.0) + (sp-flt spt-scalevel-x (meters 0.009765625)) + (sp-rnd-flt spt-rotvel-z (degrees -0.15) (degrees 0.3) 1.0) + (sp-flt spt-fade-a 0.32) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit3 bit9 bit13) + (sp-flt spt-userdata -1.0) + (sp-func spt-func 'fuel-cell-progress-hud-orbit-callback) + (sp-int spt-next-time 75) + (sp-launcher-by-id spt-next-launcher 232) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 347) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 16 - (sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2)) - (sp-flt spt-num 1.0) - (sp-flt spt-z 2160.0) - (sp-flt spt-scale-x (meters 2.0)) - (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0) - (sp-flt spt-scale-y (meters 1.8)) - (sp-flt spt-r 192.0) - (sp-flt spt-g 192.0) - (sp-rnd-flt spt-b 0.0 128.0 1.0) - (sp-flt spt-a 64.0) - (sp-flt spt-rotvel-z (degrees -0.4)) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit2 bit3 bit9 bit13) - (sp-flt spt-userdata -1.0) - (sp-func spt-func 'fuel-cell-progress-hud-orbit-callback) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 347) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 16 + (sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-z 2160.0) + (sp-flt spt-scale-x (meters 2.0)) + (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0) + (sp-flt spt-scale-y (meters 1.8)) + (sp-flt spt-r 192.0) + (sp-flt spt-g 192.0) + (sp-rnd-flt spt-b 0.0 128.0 1.0) + (sp-flt spt-a 64.0) + (sp-flt spt-rotvel-z (degrees -0.4)) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit3 bit9 bit13) + (sp-flt spt-userdata -1.0) + (sp-func spt-func 'fuel-cell-progress-hud-orbit-callback) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 348) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 16 - (sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2)) - (sp-flt spt-num 1.0) - (sp-flt spt-z 2160.0) - (sp-flt spt-scale-x (meters 2.4)) - (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0) - (sp-flt spt-scale-y (meters 2.0)) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 64.0) - (sp-flt spt-rotvel-z (degrees 0.3)) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit2 bit3 bit9 bit13) - (sp-flt spt-userdata -1.0) - (sp-func spt-func 'fuel-cell-progress-hud-orbit-callback) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 348) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 16 + (sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-z 2160.0) + (sp-flt spt-scale-x (meters 2.4)) + (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0) + (sp-flt spt-scale-y (meters 2.0)) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 64.0) + (sp-flt spt-rotvel-z (degrees 0.3)) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit3 bit9 bit13) + (sp-flt spt-userdata -1.0) + (sp-func spt-func 'fuel-cell-progress-hud-orbit-callback) + (sp-end) + ) + ) + ) -(set! - (-> *part-group-id-table* 97) - (new 'static 'sparticle-launch-group - :length 8 - :duration #xbb8 - :linger-duration #x5dc - :flags - (sp-group-flag use-local-clock screen-space) - :name - "group-part-progress-hud-power-cell-whole" - :launcher - (new 'static 'inline-array sparticle-group-item 8 - (sp-item 338 :flags (launch-asap)) - (sp-item 347 :flags (launch-asap) :period 3600 :length 5) - (sp-item 348 :flags (launch-asap) :period 3600 :length 5) - (sp-item 343 :flags (launch-asap)) - (sp-item 339 :flags (launch-asap)) - (sp-item 340 :flags (launch-asap)) - (sp-item 341 :flags (launch-asap)) - (sp-item 342 :flags (launch-asap)) - ) - :bounds (new 'static 'sphere :w 409600.0) - ) - ) +(set! (-> *part-group-id-table* 97) (new 'static 'sparticle-launch-group + :length 8 + :duration #xbb8 + :linger-duration #x5dc + :flags + (sp-group-flag use-local-clock screen-space) + :name + "group-part-progress-hud-power-cell-whole" + :launcher + (new 'static 'inline-array sparticle-group-item 8 + (sp-item 338 :flags (launch-asap)) + (sp-item 347 :flags (launch-asap) :period 3600 :length 5) + (sp-item 348 :flags (launch-asap) :period 3600 :length 5) + (sp-item 343 :flags (launch-asap)) + (sp-item 339 :flags (launch-asap)) + (sp-item 340 :flags (launch-asap)) + (sp-item 341 :flags (launch-asap)) + (sp-item 342 :flags (launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) -(set! - (-> *part-group-id-table* 98) - (new 'static 'sparticle-launch-group - :length 2 - :duration #xbb8 - :linger-duration #x5dc - :flags (sp-group-flag screen-space) - :name "group-part-progress-buzzer" - :launcher - (new 'static 'inline-array sparticle-group-item 2 - (sp-item 1982 :flags (launch-asap) :binding 1981) - (sp-item 1981 :flags (start-dead launch-asap)) - ) - :bounds (new 'static 'sphere :w 409600.0) - ) - ) +(set! (-> *part-group-id-table* 98) (new 'static 'sparticle-launch-group + :length 2 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-progress-buzzer" + :launcher + (new 'static 'inline-array sparticle-group-item 2 + (sp-item 1982 :flags (launch-asap) :binding 1981) + (sp-item 1981 :flags (start-dead launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) -(set! - (-> *part-id-table* 1982) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 11 - (sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 2.2)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 0.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit9 bit13) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 1982) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 11 + (sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 2.2)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 0.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9 bit13) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 1981) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 17 - (sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2)) - (sp-flt spt-num 1.0) - (sp-flt spt-x (meters 0.0)) - (sp-flt spt-y (meters 1.3333334)) - (sp-flt spt-z 409.6) - (sp-flt spt-scale-x (meters 2.0)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-flt spt-omega 0.0) - (sp-flt spt-vel-x (meters 0.053333335)) - (sp-flt spt-vel-z (meters 0.0)) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit2 bit7 bit9 bit13) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 1981) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 17 + (sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-x (meters 0.0)) + (sp-flt spt-y (meters 1.3333334)) + (sp-flt spt-z 409.6) + (sp-flt spt-scale-x (meters 2.0)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-flt spt-omega 0.0) + (sp-flt spt-vel-x (meters 0.053333335)) + (sp-flt spt-vel-z (meters 0.0)) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit7 bit9 bit13) + (sp-end) + ) + ) + ) -(set! - (-> *part-group-id-table* 99) - (new 'static 'sparticle-launch-group - :length 1 - :duration #xbb8 - :linger-duration #x5dc - :flags (sp-group-flag screen-space) - :name "group-part-progress-orb" - :launcher - (new 'static 'inline-array sparticle-group-item 1 - (sp-item 1983 :flags (launch-asap)) - ) - :bounds (new 'static 'sphere :w 409600.0) - ) - ) +(set! (-> *part-group-id-table* 99) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-progress-orb" + :launcher + (new 'static 'inline-array sparticle-group-item 1 (sp-item 1983 :flags (launch-asap))) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) -(set! - (-> *part-id-table* 1983) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 11 - (sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #x2)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 2.2)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit2 bit9 bit13) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 1983) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 11 + (sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 2.2)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9 bit13) + (sp-end) + ) + ) + ) -(set! - (-> *part-group-id-table* 100) - (new 'static 'sparticle-launch-group - :length 2 - :duration #xbb8 - :linger-duration #x5dc - :flags (sp-group-flag screen-space) - :name "group-part-progress-buzzer-small" - :launcher - (new 'static 'inline-array sparticle-group-item 2 - (sp-item 1985 :flags (launch-asap) :binding 1984) - (sp-item 1984 :flags (start-dead launch-asap)) - ) - :bounds (new 'static 'sphere :w 409600.0) - ) - ) +(set! (-> *part-group-id-table* 100) (new 'static 'sparticle-launch-group + :length 2 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-progress-buzzer-small" + :launcher + (new 'static 'inline-array sparticle-group-item 2 + (sp-item 1985 :flags (launch-asap) :binding 1984) + (sp-item 1984 :flags (start-dead launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) -(set! - (-> *part-id-table* 1985) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 11 - (sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 1.0)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 0.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit9 bit13) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 1985) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 11 + (sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.0)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 0.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9 bit13) + (sp-end) + ) + ) + ) -(set! - (-> *part-id-table* 1984) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 18 - (sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2)) - (sp-flt spt-num 1.0) - (sp-flt spt-x (meters 0.0)) - (sp-flt spt-y (meters 1.3333334)) - (sp-flt spt-z 204.8) - (sp-flt spt-scale-x (meters 1.5)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-flt spt-omega 0.0) - (sp-flt spt-vel-x (meters 0.05037037)) - (sp-flt spt-vel-z (meters 0.0)) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit2 bit7 bit9 bit13) - (sp-func spt-func 'part-progress-hud-buzzer-func) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 1984) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 18 + (sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-x (meters 0.0)) + (sp-flt spt-y (meters 1.3333334)) + (sp-flt spt-z 204.8) + (sp-flt spt-scale-x (meters 1.5)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-flt spt-omega 0.0) + (sp-flt spt-vel-x (meters 0.05037037)) + (sp-flt spt-vel-z (meters 0.0)) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit7 bit9 bit13) + (sp-func spt-func 'part-progress-hud-buzzer-func) + (sp-end) + ) + ) + ) -(set! - (-> *part-group-id-table* 101) - (new 'static 'sparticle-launch-group - :length 1 - :duration #xbb8 - :linger-duration #x5dc - :flags (sp-group-flag screen-space) - :name "group-part-progress-orb-small" - :launcher - (new 'static 'inline-array sparticle-group-item 1 - (sp-item 1986 :flags (launch-asap)) - ) - :bounds (new 'static 'sphere :w 409600.0) - ) - ) +(set! (-> *part-group-id-table* 101) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-progress-orb-small" + :launcher + (new 'static 'inline-array sparticle-group-item 1 (sp-item 1986 :flags (launch-asap))) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) -(set! - (-> *part-id-table* 1986) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 12 - (sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #x2)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 1.3)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit2 bit9 bit13) - (sp-func spt-func 'part-progress-hud-orb-func) - (sp-end) - ) - ) - ) +(set! (-> *part-id-table* 1986) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.3)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9 bit13) + (sp-func spt-func 'part-progress-hud-orb-func) + (sp-end) + ) + ) + ) -(set! - (-> *part-group-id-table* 615) - (new 'static 'sparticle-launch-group - :length 1 - :duration #xbb8 - :linger-duration #x5dc - :flags (sp-group-flag screen-space) - :name "group-part-progress-save-icon" - :launcher - (new 'static 'inline-array sparticle-group-item 1 - (sp-item 2478 :flags (launch-asap)) - ) - :bounds (new 'static 'sphere :w 409600.0) - ) - ) +(set! (-> *part-group-id-table* 615) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-progress-save-icon" + :launcher + (new 'static 'inline-array sparticle-group-item 1 (sp-item 2478 :flags (launch-asap))) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) -(set! - (-> *part-id-table* 2478) - (new 'static 'sparticle-launcher - :init-specs - (new 'static 'inline-array sp-field-init-spec 12 - (sp-tex spt-texture (new 'static 'texture-id :index #x6b :page #x1cf)) - (sp-flt spt-num 1.0) - (sp-flt spt-scale-x (meters 1.8)) - (sp-copy-from-other spt-scale-y -4) - (sp-flt spt-r 128.0) - (sp-flt spt-g 128.0) - (sp-flt spt-b 128.0) - (sp-flt spt-a 128.0) - (sp-int spt-timer -1) - (sp-cpuinfo-flags bit2 bit9 bit13) - (sp-func spt-func 'part-progress-save-icon-func) - (sp-end) +(set! (-> *part-id-table* 2478) (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x6b :page #x1cf)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.8)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9 bit13) + (sp-func spt-func 'part-progress-save-icon-func) + (sp-end) + ) + ) + ) + +(defmacro progress-new-particle (&key part &key x &key y &key z) + `(when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((part-nb (-> obj nb-of-particles))) + (set! (-> obj particles part-nb) (new 'static 'hud-particle)) + (set! (-> obj particles part-nb part) (create-launch-control (-> *part-group-id-table* ,part) obj)) + (set! (-> obj particles part-nb init-pos x) ,x) + (set! (-> obj particles part-nb init-pos y) ,y) + (set! (-> obj particles part-nb init-pos z) ,z) + (set! (-> obj particles part-nb part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) ) - ) ) (defmethod initialize-particles progress ((obj progress)) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-0 (-> obj nb-of-particles))) - (set! (-> obj particles s5-0) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-0 part) - (create-launch-control (-> *part-group-id-table* 90) obj) - ) - (set! (-> obj particles s5-0 init-pos x) 256.0) - (set! (-> obj particles s5-0 init-pos y) 224.0) - (set! (-> obj particles s5-0 init-pos z) 16.0) - (set! (-> obj particles s5-0 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-1 (-> obj nb-of-particles))) - (set! (-> obj particles s5-1) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-1 part) - (create-launch-control (-> *part-group-id-table* 88) obj) - ) - (set! (-> obj particles s5-1 init-pos x) -42.0) - (set! (-> obj particles s5-1 init-pos y) 254.0) - (set! (-> obj particles s5-1 init-pos z) 5.0) - (set! (-> obj particles s5-1 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-2 (-> obj nb-of-particles))) - (set! (-> obj particles s5-2) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-2 part) - (create-launch-control (-> *part-group-id-table* 89) obj) - ) - (set! (-> obj particles s5-2 init-pos x) 610.0) - (set! (-> obj particles s5-2 init-pos y) 254.0) - (set! (-> obj particles s5-2 init-pos z) 5.0) - (set! (-> obj particles s5-2 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-3 (-> obj nb-of-particles))) - (set! (-> obj particles s5-3) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-3 part) - (create-launch-control (-> *part-group-id-table* 85) obj) - ) - (set! (-> obj particles s5-3 init-pos x) -320.0) - (set! (-> obj particles s5-3 init-pos y) 40.0) - (set! (-> obj particles s5-3 init-pos z) 14.0) - (set! (-> obj particles s5-3 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-4 (-> obj nb-of-particles))) - (set! (-> obj particles s5-4) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-4 part) - (create-launch-control (-> *part-group-id-table* 86) obj) - ) - (set! (-> obj particles s5-4 init-pos x) -320.0) - (set! (-> obj particles s5-4 init-pos y) 400.0) - (set! (-> obj particles s5-4 init-pos z) 14.0) - (set! (-> obj particles s5-4 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-5 (-> obj nb-of-particles))) - (set! (-> obj particles s5-5) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-5 part) - (create-launch-control (-> *part-group-id-table* 87) obj) - ) - (set! (-> obj particles s5-5 init-pos x) -320.0) - (set! (-> obj particles s5-5 init-pos y) 194.0) - (set! (-> obj particles s5-5 init-pos z) 15.0) - (set! (-> obj particles s5-5 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-6 (-> obj nb-of-particles))) - (set! (-> obj particles s5-6) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-6 part) - (create-launch-control (-> *part-group-id-table* 97) obj) - ) - (set! (-> obj particles s5-6 init-pos x) -320.0) - (set! (-> obj particles s5-6 init-pos y) 194.0) - (set! (-> obj particles s5-6 init-pos z) 14.0) - (set! (-> obj particles s5-6 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-7 (-> obj nb-of-particles))) - (set! (-> obj particles s5-7) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-7 part) - (create-launch-control (-> *part-group-id-table* 97) obj) - ) - (set! (-> obj particles s5-7 init-pos x) -320.0) - (set! (-> obj particles s5-7 init-pos y) 194.0) - (set! (-> obj particles s5-7 init-pos z) 14.0) - (set! (-> obj particles s5-7 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-8 (-> obj nb-of-particles))) - (set! (-> obj particles s5-8) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-8 part) - (create-launch-control (-> *part-group-id-table* 97) obj) - ) - (set! (-> obj particles s5-8 init-pos x) -320.0) - (set! (-> obj particles s5-8 init-pos y) 194.0) - (set! (-> obj particles s5-8 init-pos z) 14.0) - (set! (-> obj particles s5-8 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-9 (-> obj nb-of-particles))) - (set! (-> obj particles s5-9) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-9 part) - (create-launch-control (-> *part-group-id-table* 97) obj) - ) - (set! (-> obj particles s5-9 init-pos x) -320.0) - (set! (-> obj particles s5-9 init-pos y) 194.0) - (set! (-> obj particles s5-9 init-pos z) 14.0) - (set! (-> obj particles s5-9 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-10 (-> obj nb-of-particles))) - (set! (-> obj particles s5-10) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-10 part) - (create-launch-control (-> *part-group-id-table* 97) obj) - ) - (set! (-> obj particles s5-10 init-pos x) -320.0) - (set! (-> obj particles s5-10 init-pos y) 194.0) - (set! (-> obj particles s5-10 init-pos z) 14.0) - (set! (-> obj particles s5-10 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-11 (-> obj nb-of-particles))) - (set! (-> obj particles s5-11) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-11 part) - (create-launch-control (-> *part-group-id-table* 97) obj) - ) - (set! (-> obj particles s5-11 init-pos x) -320.0) - (set! (-> obj particles s5-11 init-pos y) 194.0) - (set! (-> obj particles s5-11 init-pos z) 14.0) - (set! (-> obj particles s5-11 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-12 (-> obj nb-of-particles))) - (set! (-> obj particles s5-12) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-12 part) - (create-launch-control (-> *part-group-id-table* 97) obj) - ) - (set! (-> obj particles s5-12 init-pos x) -320.0) - (set! (-> obj particles s5-12 init-pos y) 194.0) - (set! (-> obj particles s5-12 init-pos z) 14.0) - (set! (-> obj particles s5-12 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-13 (-> obj nb-of-particles))) - (set! (-> obj particles s5-13) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-13 part) - (create-launch-control (-> *part-group-id-table* 97) obj) - ) - (set! (-> obj particles s5-13 init-pos x) -320.0) - (set! (-> obj particles s5-13 init-pos y) 194.0) - (set! (-> obj particles s5-13 init-pos z) 14.0) - (set! (-> obj particles s5-13 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-14 (-> obj nb-of-particles))) - (set! (-> obj particles s5-14) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-14 part) - (create-launch-control (-> *part-group-id-table* 98) obj) - ) - (set! (-> obj particles s5-14 init-pos x) -320.0) - (set! (-> obj particles s5-14 init-pos y) 224.0) - (set! (-> obj particles s5-14 init-pos z) 14.0) - (set! (-> obj particles s5-14 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-15 (-> obj nb-of-particles))) - (set! (-> obj particles s5-15) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-15 part) - (create-launch-control (-> *part-group-id-table* 99) obj) - ) - (set! (-> obj particles s5-15 init-pos x) -320.0) - (set! (-> obj particles s5-15 init-pos y) 224.0) - (set! (-> obj particles s5-15 init-pos z) 14.0) - (set! (-> obj particles s5-15 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-16 (-> obj nb-of-particles))) - (set! (-> obj particles s5-16) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-16 part) - (create-launch-control (-> *part-group-id-table* 97) obj) - ) - (set! (-> obj particles s5-16 init-pos x) -320.0) - (set! (-> obj particles s5-16 init-pos y) 112.0) - (set! (-> obj particles s5-16 init-pos z) 4.0) - (set! (-> obj particles s5-16 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-17 (-> obj nb-of-particles))) - (set! (-> obj particles s5-17) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-17 part) - (create-launch-control (-> *part-group-id-table* 100) obj) - ) - (set! (-> obj particles s5-17 init-pos x) -320.0) - (set! (-> obj particles s5-17 init-pos y) 193.0) - (set! (-> obj particles s5-17 init-pos z) 4.0) - (set! (-> obj particles s5-17 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-18 (-> obj nb-of-particles))) - (set! (-> obj particles s5-18) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-18 part) - (create-launch-control (-> *part-group-id-table* 101) obj) - ) - (set! (-> obj particles s5-18 init-pos x) -320.0) - (set! (-> obj particles s5-18 init-pos y) 40.0) - (set! (-> obj particles s5-18 init-pos z) 4.0) - (set! (-> obj particles s5-18 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-19 (-> obj nb-of-particles))) - (set! (-> obj particles s5-19) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-19 part) - (create-launch-control (-> *part-group-id-table* 92) obj) - ) - (set! (-> obj particles s5-19 init-pos x) -320.0) - (set! (-> obj particles s5-19 init-pos y) 90.0) - (set! (-> obj particles s5-19 init-pos z) 16.0) - (set! (-> obj particles s5-19 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-20 (-> obj nb-of-particles))) - (set! (-> obj particles s5-20) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-20 part) - (create-launch-control (-> *part-group-id-table* 93) obj) - ) - (set! (-> obj particles s5-20 init-pos x) -320.0) - (set! (-> obj particles s5-20 init-pos y) 172.0) - (set! (-> obj particles s5-20 init-pos z) 16.0) - (set! (-> obj particles s5-20 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-21 (-> obj nb-of-particles))) - (set! (-> obj particles s5-21) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-21 part) - (create-launch-control (-> *part-group-id-table* 94) obj) - ) - (set! (-> obj particles s5-21 init-pos x) -320.0) - (set! (-> obj particles s5-21 init-pos y) 254.0) - (set! (-> obj particles s5-21 init-pos z) 16.0) - (set! (-> obj particles s5-21 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-22 (-> obj nb-of-particles))) - (set! (-> obj particles s5-22) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-22 part) - (create-launch-control (-> *part-group-id-table* 95) obj) - ) - (set! (-> obj particles s5-22 init-pos x) -320.0) - (set! (-> obj particles s5-22 init-pos y) 336.0) - (set! (-> obj particles s5-22 init-pos z) 16.0) - (set! (-> obj particles s5-22 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-23 (-> obj nb-of-particles))) - (set! (-> obj particles s5-23) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-23 part) - (create-launch-control (-> *part-group-id-table* 91) obj) - ) - (set! (-> obj particles s5-23 init-pos x) -320.0) - (set! (-> obj particles s5-23 init-pos y) 102.0) - (set! (-> obj particles s5-23 init-pos z) 13.0) - (set! (-> obj particles s5-23 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-24 (-> obj nb-of-particles))) - (set! (-> obj particles s5-24) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-24 part) - (create-launch-control (-> *part-group-id-table* 91) obj) - ) - (set! (-> obj particles s5-24 init-pos x) -320.0) - (set! (-> obj particles s5-24 init-pos y) 184.0) - (set! (-> obj particles s5-24 init-pos z) 13.0) - (set! (-> obj particles s5-24 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-25 (-> obj nb-of-particles))) - (set! (-> obj particles s5-25) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-25 part) - (create-launch-control (-> *part-group-id-table* 91) obj) - ) - (set! (-> obj particles s5-25 init-pos x) -320.0) - (set! (-> obj particles s5-25 init-pos y) 266.0) - (set! (-> obj particles s5-25 init-pos z) 13.0) - (set! (-> obj particles s5-25 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-26 (-> obj nb-of-particles))) - (set! (-> obj particles s5-26) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-26 part) - (create-launch-control (-> *part-group-id-table* 91) obj) - ) - (set! (-> obj particles s5-26 init-pos x) -320.0) - (set! (-> obj particles s5-26 init-pos y) 348.0) - (set! (-> obj particles s5-26 init-pos z) 13.0) - (set! (-> obj particles s5-26 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-27 (-> obj nb-of-particles))) - (set! (-> obj particles s5-27) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-27 part) - (create-launch-control (-> *part-group-id-table* 570) obj) - ) - (set! (-> obj particles s5-27 init-pos x) -320.0) - (set! (-> obj particles s5-27 init-pos y) 338.0) - (set! (-> obj particles s5-27 init-pos z) 4.0) - (set! (-> obj particles s5-27 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-28 (-> obj nb-of-particles))) - (set! (-> obj particles s5-28) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-28 part) - (create-launch-control (-> *part-group-id-table* 571) obj) - ) - (set! (-> obj particles s5-28 init-pos x) -320.0) - (set! (-> obj particles s5-28 init-pos y) 338.0) - (set! (-> obj particles s5-28 init-pos z) 4.0) - (set! (-> obj particles s5-28 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-29 (-> obj nb-of-particles))) - (set! (-> obj particles s5-29) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-29 part) - (create-launch-control (-> *part-group-id-table* 572) obj) - ) - (set! (-> obj particles s5-29 init-pos x) -320.0) - (set! (-> obj particles s5-29 init-pos y) 338.0) - (set! (-> obj particles s5-29 init-pos z) 4.0) - (set! (-> obj particles s5-29 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-30 (-> obj nb-of-particles))) - (set! (-> obj particles s5-30) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-30 part) - (create-launch-control (-> *part-group-id-table* 573) obj) - ) - (set! (-> obj particles s5-30 init-pos x) -320.0) - (set! (-> obj particles s5-30 init-pos y) 338.0) - (set! (-> obj particles s5-30 init-pos z) 4.0) - (set! (-> obj particles s5-30 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) - (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) - (let ((s5-31 (-> obj nb-of-particles))) - (set! (-> obj particles s5-31) (new 'static 'hud-particle)) - (set! - (-> obj particles s5-31 part) - (create-launch-control (-> *part-group-id-table* 615) obj) - ) - (set! (-> obj particles s5-31 init-pos x) -320.0) - (set! (-> obj particles s5-31 init-pos y) 180.0) - (set! (-> obj particles s5-31 init-pos z) 4.0) - (set! (-> obj particles s5-31 part matrix) -1) - ) - (+! (-> obj nb-of-particles) 1) - ) + (progress-new-particle :part 90 :x 256.0 :y 224.0 :z 16.0) ;; tint + (progress-new-particle :part 88 :x -42.0 :y (#if PC_PORT 256.0 254.0) :z 5.0) ;; left + (progress-new-particle :part 89 :x 610.0 :y (#if PC_PORT 256.0 254.0) :z 5.0) ;; right + (progress-new-particle :part 85 :x -320.0 :y 40.0 :z 14.0) + (progress-new-particle :part 86 :x -320.0 :y 400.0 :z 14.0) + (progress-new-particle :part 87 :x -320.0 :y 194.0 :z 15.0) + (progress-new-particle :part 97 :x -320.0 :y 194.0 :z 14.0) + (progress-new-particle :part 97 :x -320.0 :y 194.0 :z 14.0) + (progress-new-particle :part 97 :x -320.0 :y 194.0 :z 14.0) + (progress-new-particle :part 97 :x -320.0 :y 194.0 :z 14.0) + (progress-new-particle :part 97 :x -320.0 :y 194.0 :z 14.0) + (progress-new-particle :part 97 :x -320.0 :y 194.0 :z 14.0) + (progress-new-particle :part 97 :x -320.0 :y 194.0 :z 14.0) + (progress-new-particle :part 97 :x -320.0 :y 194.0 :z 14.0) + (progress-new-particle :part 98 :x -320.0 :y 224.0 :z 14.0) + (progress-new-particle :part 99 :x -320.0 :y 224.0 :z 14.0) + (progress-new-particle :part 97 :x -320.0 :y 112.0 :z 4.0) + (progress-new-particle :part 100 :x -320.0 :y 193.0 :z 4.0) + (progress-new-particle :part 101 :x -320.0 :y 40.0 :z 4.0) + (progress-new-particle :part 92 :x -320.0 :y 90.0 :z 16.0) + (progress-new-particle :part 93 :x -320.0 :y 172.0 :z 16.0) + (progress-new-particle :part 94 :x -320.0 :y 254.0 :z 16.0) + (progress-new-particle :part 95 :x -320.0 :y 336.0 :z 16.0) + (progress-new-particle :part 91 :x -320.0 :y 102.0 :z 13.0) + (progress-new-particle :part 91 :x -320.0 :y 184.0 :z 13.0) + (progress-new-particle :part 91 :x -320.0 :y 266.0 :z 13.0) + (progress-new-particle :part 91 :x -320.0 :y 348.0 :z 13.0) + (progress-new-particle :part 570 :x -320.0 :y 338.0 :z 4.0) + (progress-new-particle :part 571 :x -320.0 :y 338.0 :z 4.0) + (progress-new-particle :part 572 :x -320.0 :y 338.0 :z 4.0) + (progress-new-particle :part 573 :x -320.0 :y 338.0 :z 4.0) + (progress-new-particle :part 615 :x -320.0 :y 180.0 :z 4.0) 0 (none) ) diff --git a/goal_src/engine/ui/progress/progress.gc b/goal_src/engine/ui/progress/progress.gc index 954c90e2c..d0043d1c4 100644 --- a/goal_src/engine/ui/progress/progress.gc +++ b/goal_src/engine/ui/progress/progress.gc @@ -5,21 +5,22 @@ ;; name in dgo: progress ;; dgos: GAME, ENGINE +;; DECOMP BEGINS (deftype progress-global-state (basic) - ((aspect-ratio-choice symbol :offset-assert 4) - (video-mode-choice symbol :offset-assert 8) - (yes-no-choice symbol :offset-assert 12) - (which int32 :offset-assert 16) - (starting-state progress-screen :offset-assert 24) - (last-slot-saved int32 :offset-assert 32) - (slider-backup float :offset-assert 36) - (language-backup int64 :offset-assert 40) - (on-off-backup symbol :offset-assert 48) - (center-x-backup int32 :offset-assert 52) - (center-y-backup int32 :offset-assert 56) - (aspect-ratio-backup symbol :offset-assert 60) - (last-slider-sound int64 :offset-assert 64) + ((aspect-ratio-choice symbol :offset-assert 4) + (video-mode-choice symbol :offset-assert 8) + (yes-no-choice symbol :offset-assert 12) + (which int32 :offset-assert 16) + (starting-state progress-screen :offset-assert 24) + (last-slot-saved int32 :offset-assert 32) + (slider-backup float :offset-assert 36) + (language-backup int64 :offset-assert 40) + (on-off-backup symbol :offset-assert 48) + (center-x-backup int32 :offset-assert 52) + (center-y-backup int32 :offset-assert 56) + (aspect-ratio-backup symbol :offset-assert 60) + (last-slider-sound int64 :offset-assert 64) ) :method-count-assert 9 :size-assert #x48 @@ -45,8 +46,8 @@ (movie?) (handle->process (-> *game-info* pov-camera-handle)) (handle->process (-> *game-info* other-camera-handle)) - (< (-> *display* base-frame-counter) (the-as int (-> *game-info* letterbox-time))) - (< (-> *display* base-frame-counter) (the-as int (-> *game-info* blackout-time))) + (< (-> *display* base-frame-counter) (-> *game-info* letterbox-time)) + (< (-> *display* base-frame-counter) (-> *game-info* blackout-time)) (!= (-> *setting-control* current bg-a) 0.0) (!= (-> *setting-control* current bg-a-force) 0.0) (not (-> *setting-control* current allow-progress)) @@ -60,19 +61,14 @@ ) (defun pause-allowed? () - (not - (or - (< - (-> *display* base-frame-counter) - (the-as int (-> *game-info* blackout-time)) - ) - (!= (-> *setting-control* current bg-a) 0.0) - (!= (-> *setting-control* current bg-a-force) 0.0) - (not (-> *setting-control* current allow-pause)) - (handle->process (-> *game-info* auto-save-proc)) - (not *target*) - ) - ) + (not (or (< (-> *display* base-frame-counter) (-> *game-info* blackout-time)) + (!= (-> *setting-control* current bg-a) 0.0) + (!= (-> *setting-control* current bg-a-force) 0.0) + (not (-> *setting-control* current allow-pause)) + (handle->process (-> *game-info* auto-save-proc)) + (not *target*) + ) + ) ) (defun init-game-options ((obj progress)) @@ -109,12 +105,7 @@ ) ) ((and (= (scf-get-territory) GAME_TERRITORY_SCEI) - (not (and (= *progress-cheat* 'language) - (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l2)) - (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r2)) - ) - ) - ) + (not (and (= *progress-cheat* 'language) (cpad-hold? 0 l2) (cpad-hold? 0 r2)))) ;; if ntsc-j and we're not using language cheat (needs l2+r2) *game-options-japan* ) @@ -187,16 +178,19 @@ (when (and *target* (-> *level* border?)) (let* ((cur-lev (-> *target* current-level)) - (lev-idx (+ (-> cur-lev info index) -1))) - (if (and (>= lev-idx 0) - (< lev-idx (-> *level-task-data-remap* length)) - (zero? (-> *game-info* level-opened (-> *level-task-data-remap* lev-idx))) - (or (= *kernel-boot-message* 'play) (= (-> cur-lev nickname) 'mis)) ;; only allow misty in demo! - ) - (set! (-> *game-info* level-opened (-> *level-task-data-remap* lev-idx)) 1) - ) - ) + (lev-idx (+ (-> cur-lev info index) -1)) + ) + (if (and + (>= lev-idx 0) + (< lev-idx (-> *level-task-data-remap* length)) + (zero? (-> *game-info* level-opened (-> *level-task-data-remap* lev-idx))) + (or (= *kernel-boot-message* 'play) (= (-> cur-lev nickname) 'mis)) ;; only allow misty in demo! + ) + (set! (-> *game-info* level-opened (-> *level-task-data-remap* lev-idx)) 1) + ) + ) ) + 0 (none) ) @@ -207,35 +201,32 @@ (dotimes (i (length *level-task-data*)) ;; level tasks (let ((tasks (-> *level-task-data* i))) - ;; unless there's no tasks or the level is already open... - (unless (or (= tasks #f) (= (-> *game-info* level-opened i) 1)) - ;; ...do stuff - (cond - ((!= *kernel-boot-message* 'play) - ;; open misty in demo regardless - (if (= (-> tasks level-name-id) (game-text-id misty-level-name)) - (set! (-> *game-info* level-opened i) (the-as uint 1)) - ) - ) - (*cheat-mode* - ;; open every level in cheat mode regardless + ;; unless there's no tasks or the level is already open... + (unless (or (= tasks #f) (= (-> *game-info* level-opened i) 1)) + (cond + ((!= *kernel-boot-message* 'play) + (if (= (-> tasks level-name-id) (game-text-id misty-level-name)) (set! (-> *game-info* level-opened i) (the-as uint 1)) ) - (else - (dotimes (ii (-> tasks nb-of-tasks)) - (if (and (zero? (-> *game-info* level-opened ii)) - (!= ii (-> tasks buzzer-task-index)) - (task-known? (-> tasks task-info ii task-id)) - ) - ;; open level if we know there's a task there and the level is closed - (set! (-> *game-info* level-opened ii) 1) - ) - ) - ) + ) + (*cheat-mode* + (set! (-> *game-info* level-opened i) (the-as uint 1)) + ) + (else + (dotimes (ii (-> tasks nb-of-tasks)) + (if (and (zero? (-> *game-info* level-opened ii)) + (!= ii (-> tasks buzzer-task-index)) + (task-known? (-> tasks task-info ii task-id)) + ) + (set! (-> *game-info* level-opened ii) (the-as uint 1)) + ) ) + ) ) ) + ) ) + 0 (none) ) @@ -243,65 +234,64 @@ "find next available task. skips over unknown tasks and doesn't do anything if none are found" (let ((gp-0 cur-task-idx)) - (let ((s4-0 (+ cur-task-idx 1)) - (s3-0 (-> *level-task-data* lev-idx)) - ) - (while (and (< s4-0 (-> s3-0 nb-of-tasks)) (= gp-0 cur-task-idx)) - (if (or *cheat-mode* (task-known? (-> s3-0 task-info s4-0 task-id))) - (set! gp-0 s4-0) + (let ((s4-0 (+ cur-task-idx 1)) + (s3-0 (-> *level-task-data* lev-idx)) + ) + (while (and (< s4-0 (-> s3-0 nb-of-tasks)) (= gp-0 cur-task-idx)) + (if (or *cheat-mode* (task-known? (-> s3-0 task-info s4-0 task-id))) + (set! gp-0 s4-0) + ) + (+! s4-0 1) + ) ) - (+! s4-0 1) - ) + gp-0 ) - gp-0 - ) ) (defun get-next-task-down ((cur-task-idx int) (lev-idx int)) "find previous available task. skips over unknown tasks and doesn't do anything if none are found" (let ((gp-0 cur-task-idx)) - (let ((s4-0 (+ cur-task-idx -1)) - (s3-0 (-> *level-task-data* lev-idx)) - ) - (while (and (>= s4-0 0) (= gp-0 cur-task-idx)) - (if (or *cheat-mode* (task-known? (-> s3-0 task-info s4-0 task-id))) - (set! gp-0 s4-0) + (let ((s4-0 (+ cur-task-idx -1)) + (s3-0 (-> *level-task-data* lev-idx)) + ) + (while (and (>= s4-0 0) (= gp-0 cur-task-idx)) + (if (or *cheat-mode* (task-known? (-> s3-0 task-info s4-0 task-id))) + (set! gp-0 s4-0) + ) + (+! s4-0 -1) + ) ) - (+! s4-0 -1) - ) + gp-0 ) - gp-0 - ) ) (defun get-next-level-up ((lev-idx int)) (let ((gp-0 lev-idx)) - (let ((s4-0 (+ lev-idx 1))) - (while (and (< s4-0 (length *level-task-data*)) (= gp-0 lev-idx)) - (if (= (-> *game-info* level-opened s4-0) 1) - (set! gp-0 s4-0) + (let ((s4-0 (+ lev-idx 1))) + (while (and (< s4-0 (length *level-task-data*)) (= gp-0 lev-idx)) + (if (= (-> *game-info* level-opened s4-0) 1) + (set! gp-0 s4-0) + ) + (+! s4-0 1) + ) ) - (+! s4-0 1) - ) + gp-0 ) - gp-0 - ) ) -;; definition for function get-next-level-down (defun get-next-level-down ((lev-idx int)) (let ((v0-0 lev-idx)) - (let ((v1-0 (+ lev-idx -1))) - (while (and (>= v1-0 0) (= v0-0 lev-idx)) - (if (= (-> *game-info* level-opened v1-0) 1) - (set! v0-0 v1-0) + (let ((v1-0 (+ lev-idx -1))) + (while (and (>= v1-0 0) (= v0-0 lev-idx)) + (if (= (-> *game-info* level-opened v1-0) 1) + (set! v0-0 v1-0) + ) + (+! v1-0 -1) + ) ) - (+! v1-0 -1) - ) + v0-0 ) - v0-0 - ) ) (defun calculate-completion ((the-progress progress)) @@ -311,13 +301,13 @@ Orbs are tallied 10%" (local-vars - (current-cells int) - (current-buzzers int) - (current-orbs int) - (total-cells int) - (total-buzzers int) - (total-orbs int) - ) + (current-cells int) + (current-buzzers int) + (current-orbs int) + (total-cells int) + (total-buzzers int) + (total-orbs int) + ) (set! current-cells 0) (set! current-buzzers 0) (set! current-orbs 0) @@ -325,49 +315,46 @@ (set! total-buzzers 0) (set! total-orbs 0) (dotimes (s5-0 (length *level-task-data*)) - (let ((s4-0 (-> *level-task-data* s5-0))) - (when (!= s4-0 #f) - (when (or (= *kernel-boot-message* 'play) - (= (-> s4-0 level-name-id) (game-text-id misty-level-name)) - ) - (dotimes (s3-0 (-> s4-0 nb-of-tasks)) - (if (= (get-task-status (-> s4-0 task-info s3-0 task-id)) (task-status invalid)) - (+! current-cells 1) + (let ((s4-0 (-> *level-task-data* s5-0))) + (when (!= s4-0 #f) + (when (or (= *kernel-boot-message* 'play) (= (-> s4-0 level-name-id) (game-text-id misty-level-name))) + (dotimes (s3-0 (-> s4-0 nb-of-tasks)) + (if (= (get-task-status (-> s4-0 task-info s3-0 task-id)) (task-status invalid)) + (set! current-cells (+ current-cells 1)) + ) + ) + (set! total-cells (+ total-cells (-> s4-0 nb-of-tasks))) + (set! current-orbs (+ current-orbs (-> *game-info* money-per-level s5-0))) + (set! total-orbs (+ total-orbs (-> *game-counts* data s5-0 money-count))) + (let ((v1-20 (-> s4-0 buzzer-task-index))) + (when (!= v1-20 -1) + (set! current-buzzers (+ current-buzzers (buzzer-count *game-info* (-> s4-0 task-info v1-20 task-id)))) + (set! total-buzzers (+ total-buzzers (-> *game-counts* data s5-0 buzzer-count))) + ) + ) + ) ) - ) - (+! total-cells (-> s4-0 nb-of-tasks)) - (+! current-orbs (-> *game-info* money-per-level s5-0)) - (+! total-orbs (-> *game-counts* data s5-0 money-count)) - (let ((v1-20 (-> s4-0 buzzer-task-index))) - (when (!= v1-20 -1) - (+! current-buzzers (buzzer-count *game-info* (-> s4-0 task-info v1-20 task-id))) - (+! total-buzzers (-> *game-counts* data s5-0 buzzer-count)) - ) - ) ) - ) ) - ) (when the-progress - (set! (-> the-progress total-nb-of-power-cells) total-cells) - (set! (-> the-progress total-nb-of-buzzers) total-buzzers) - (set! (-> the-progress total-nb-of-orbs) total-orbs) - ) - (+ - (/ (* 80.0 (the float current-cells)) (the float total-cells)) - (/ (* 10.0 (the float current-orbs)) (the float total-orbs)) - (/ (* 10.0 (the float current-buzzers)) (the float total-buzzers)) - ) + (set! (-> the-progress total-nb-of-power-cells) total-cells) + (set! (-> the-progress total-nb-of-buzzers) total-buzzers) + (set! (-> the-progress total-nb-of-orbs) total-orbs) + ) + (+ (/ (* 80.0 (the float current-cells)) (the float total-cells)) + (/ (* 10.0 (the float current-orbs)) (the float total-orbs)) + (/ (* 10.0 (the float current-buzzers)) (the float total-buzzers)) + ) ) (define *progress-save-info* (new 'global 'mc-slot-info)) -(defmacro progress-make-manipy-icon (obj &key (skel #f) - &key (x #f) - &key (y #f) - &key (z #f) - &key (scale-x #f) - &key (scale-y #f) +(defmacro progress-make-manipy-icon (obj &key skel + &key x + &key y + &key z + &key scale-x + &key scale-y ) `(when (< (-> ,obj nb-of-icons) 6) (let ((icon-idx (-> ,obj nb-of-icons))) @@ -447,76 +434,80 @@ (send-event (ppointer->process (-> obj icons 1 icon)) 'set-frame-num 2.5) (send-event (ppointer->process (-> obj icons 2 icon)) 'set-frame-num 10.0) (send-event (ppointer->process (-> obj icons 3 icon)) 'set-frame-num 15.5) + 0 (none) ) (defmethod enter! progress ((obj progress) (screen progress-screen) (option int)) (when (!= (-> obj display-state) screen) - (set! (-> *progress-state* yes-no-choice) #f) - (set! (-> obj selected-option) #f) - (set! (-> obj option-index) option) - (set! (-> obj last-option-index-change) (-> *display* real-frame-counter)) - (set! (-> obj display-state) screen) - (set! (-> obj next-display-state) screen) - (set-transition-speed! obj) - (case (-> obj display-state) - (((progress-screen memcard-creating)) - (auto-save-command 'create-file 0 0 obj) - ) - (((progress-screen memcard-loading)) - (set! (-> *progress-state* last-slot-saved) (-> *progress-state* which)) - (sound-volume-off) - (auto-save-command 'restore 0 (-> *progress-state* which) obj) - ) - (((progress-screen memcard-saving)) - (set! (-> *progress-state* last-slot-saved) (-> *progress-state* which)) - (auto-save-command 'save 0 (-> *progress-state* which) obj) - ) - (((progress-screen memcard-formatting)) - (auto-save-command 'format-card 0 0 obj) - ) - (((progress-screen save-game) (progress-screen load-game)) - (set! (-> obj option-index) (max 0 (-> *progress-state* last-slot-saved))) - ) - (((progress-screen memcard-removed)) - (set! (-> *progress-state* last-slot-saved) 0) - ) + (set! (-> *progress-state* yes-no-choice) #f) + (set! (-> obj selected-option) #f) + (set! (-> obj option-index) option) + (set! (-> obj last-option-index-change) (-> *display* real-frame-counter)) + (set! (-> obj display-state) screen) + (set! (-> obj next-display-state) screen) + (set-transition-speed! obj) + (case (-> obj display-state) + (((progress-screen memcard-creating)) + (auto-save-command 'create-file 0 0 obj) + ) + (((progress-screen memcard-loading)) + (set! (-> *progress-state* last-slot-saved) (-> *progress-state* which)) + (sound-volume-off) + (auto-save-command 'restore 0 (-> *progress-state* which) obj) + ) + (((progress-screen memcard-saving)) + (set! (-> *progress-state* last-slot-saved) (-> *progress-state* which)) + (auto-save-command 'save 0 (-> *progress-state* which) obj) + ) + (((progress-screen memcard-formatting)) + (auto-save-command 'format-card 0 0 obj) + ) + (((progress-screen save-game) (progress-screen load-game)) + (set! (-> obj option-index) (max 0 (-> *progress-state* last-slot-saved))) + ) + (((progress-screen memcard-removed)) + (set! (-> *progress-state* last-slot-saved) 0) + 0 + ) + ) ) - ) + 0 (none) ) (defmethod push! progress ((obj progress)) (let ((v1-0 (-> obj display-state-pos))) - (cond - ((< v1-0 5) - (set! (-> obj display-state-stack v1-0) (-> obj display-state)) - (set! (-> obj option-index-stack v1-0) (-> obj option-index)) - (set! (-> obj display-state-pos) (+ v1-0 1)) - ) - (else - (format #t "ERROR: Can't push any more states on the display-state-stack.~%") - ) + (cond + ((< v1-0 5) + (set! (-> obj display-state-stack v1-0) (-> obj display-state)) + (set! (-> obj option-index-stack v1-0) (-> obj option-index)) + (set! (-> obj display-state-pos) (+ v1-0 1)) + ) + (else + (format #t "ERROR: Can't push any more states on the display-state-stack.~%") + ) + ) ) - ) 0 (none) ) (defmethod pop! progress ((obj progress)) (let ((v1-0 (-> obj display-state-pos))) - (cond - ((> v1-0 0) - (let ((a2-0 (+ v1-0 -1))) - (set! (-> obj display-state-pos) a2-0) - (enter! obj (-> obj display-state-stack a2-0) (-> obj option-index-stack a2-0)) + (cond + ((> v1-0 0) + (let ((a2-0 (+ v1-0 -1))) + (set! (-> obj display-state-pos) a2-0) + (enter! obj (-> obj display-state-stack a2-0) (-> obj option-index-stack a2-0)) + ) + ) + (else + (set-master-mode 'game) + ) ) - ) - (else - (set-master-mode 'game) - ) ) - ) + 0 (none) ) @@ -524,21 +515,26 @@ (set! (-> obj transition-offset) arg0) (set! (-> obj transition-offset-invert) (- 512 arg0)) (set! (-> obj transition-percentage) (* 0.001953125 (the float arg0))) - (set! - (-> obj transition-percentage-invert) - (- 1.0 (-> obj transition-percentage)) - ) + (set! (-> obj transition-percentage-invert) (- 1.0 (-> obj transition-percentage))) 0 (none) ) (defmethod set-transition-speed! progress ((obj progress)) - (let ((v1-0 (-> obj display-state))) - (if (or (= v1-0 0) (= v1-0 1) (= v1-0 2) (= v1-0 16) (= v1-0 17) (= v1-0 18)) + (case (-> obj display-state) + (((progress-screen fuel-cell) + (progress-screen money) + (progress-screen buzzer) + (progress-screen load-game) + (progress-screen save-game) + (progress-screen save-game-title) + ) (set! (-> obj transition-speed) 15.0) - (set! (-> obj transition-speed) 45.0) ) - ) + (else + (set! (-> obj transition-speed) 45.0) + ) + ) 0 (none) ) @@ -567,8 +563,8 @@ (set! (-> self right-side-x-scale) 0.0) (set! (-> self right-side-y-scale) 0.0) (dotimes (v1-6 5) - (set! (-> self display-state-stack v1-6) (the progress-screen 0)) - ) + (set! (-> self display-state-stack v1-6) (progress-screen fuel-cell)) + ) (init-game-options self) (initialize-icons self) (initialize-particles self) @@ -605,15 +601,15 @@ (set! (-> self particle-state 30) 0) (set! (-> self particle-state 31) 0) (let ((gp-0 (new 'stack-no-clear 'quaternion))) - (quaternion-axis-angle! gp-0 0.0 1.0 0.0 16384.0) - (quaternion*! (-> self icons 0 icon 0 root quat) gp-0 (-> self icons 0 icon 0 root quat)) - (quaternion-axis-angle! gp-0 0.0 1.0 0.0 32768.0) - (quaternion*! (-> self icons 1 icon 0 root quat) gp-0 (-> self icons 1 icon 0 root quat)) - (quaternion-axis-angle! gp-0 0.0 1.0 0.0 49152.0) - (quaternion*! (-> self icons 2 icon 0 root quat) gp-0 (-> self icons 2 icon 0 root quat)) - (quaternion-axis-angle! gp-0 0.0 1.0 0.0 0.0) - (quaternion*! (-> self icons 3 icon 0 root quat) gp-0 (-> self icons 3 icon 0 root quat)) - ) + (quaternion-axis-angle! gp-0 0.0 1.0 0.0 16384.0) + (quaternion*! (-> self icons 0 icon 0 root quat) gp-0 (-> self icons 0 icon 0 root quat)) + (quaternion-axis-angle! gp-0 0.0 1.0 0.0 32768.0) + (quaternion*! (-> self icons 1 icon 0 root quat) gp-0 (-> self icons 1 icon 0 root quat)) + (quaternion-axis-angle! gp-0 0.0 1.0 0.0 49152.0) + (quaternion*! (-> self icons 2 icon 0 root quat) gp-0 (-> self icons 2 icon 0 root quat)) + (quaternion-axis-angle! gp-0 0.0 1.0 0.0 0.0) + (quaternion*! (-> self icons 3 icon 0 root quat) gp-0 (-> self icons 3 icon 0 root quat)) + ) (adjust-ratios self (get-aspect-ratio) (get-video-mode)) (adjust-icons self) (set! (-> self event-hook) (-> progress-waiting event)) @@ -621,95 +617,102 @@ (none) ) -(define *progress-stack* (the (pointer uint8) (malloc 'global #x3800))) +(define *progress-stack* (the-as (pointer uint8) (malloc 'global #x3800))) (defconstant *progress-stack-top* (&-> *progress-stack* #x3800)) (defun activate-progress ((creator process) (screen progress-screen)) (when *target* - (cond - ((not *progress-process*) - (when (progress-allowed?) - ;;(hide-hud) TODO - (make-levels-with-tasks-available-to-progress) - (disable-level-text-file-loading) - (set! (-> *progress-state* starting-state) screen) - (set! *progress-process* (make-init-process progress progress-init-by-other - :to creator - :stack *progress-stack-top*)) - (let ((s5-1 *progress-process*)) - (set! (-> s5-1 0 completion-percentage) (calculate-completion (-> s5-1 0))) - (set! *master-mode* 'progress) - (let ((s4-1 (-> *target* current-level))) - (cond - ((!= *kernel-boot-message* 'play) - (set! (-> s5-1 0 display-level-index) 4) ;; default misty on demo - ) - ((or (= s4-1 #f) - (< (length *level-task-data-remap*) (-> s4-1 info index)) - ) - (set! (-> s5-1 0 display-level-index) 0) ;; geyser rock - ) - (else - (set! (-> s5-1 0 display-level-index) (-> *level-task-data-remap* (+ (-> s4-1 info index) -1))) - ) + (cond + ((not *progress-process*) + (when (progress-allowed?) + ;;(hide-hud) + (make-levels-with-tasks-available-to-progress) + (disable-level-text-file-loading) + (set! (-> *progress-state* starting-state) screen) + (let ((s4-0 (get-process *default-dead-pool* progress #x4000))) + (set! *progress-process* + (the-as (pointer progress) (when s4-0 + (let ((t9-5 (method-of-type progress activate))) + (t9-5 (the-as progress s4-0) creator 'progress (&-> *progress-stack* 14336)) + ) + (run-now-in-process s4-0 progress-init-by-other) + (-> s4-0 ppointer) + ) + ) + ) + ) + (let ((s5-1 *progress-process*)) + (set! (-> s5-1 0 completion-percentage) (calculate-completion (-> s5-1 0))) + (set! *master-mode* 'progress) + (let ((s4-1 (-> *target* current-level))) + (cond + ((!= *kernel-boot-message* 'play) + (set! (-> s5-1 0 display-level-index) 4) + ) + ((or (= s4-1 #f) (< (length *level-task-data-remap*) (-> s4-1 info index))) + (set! (-> s5-1 0 display-level-index) 0) + 0 + ) + (else + (set! (-> s5-1 0 display-level-index) (-> *level-task-data-remap* (+ (-> s4-1 info index) -1))) + ) + ) + ) + (set! (-> s5-1 0 next-level-index) (-> s5-1 0 display-level-index)) + (set! (-> s5-1 0 display-state) (progress-screen invalid)) + (set-transition-progress! (-> s5-1 0) 512) + (set! (-> s5-1 0 task-index) (get-next-task-up -1 (-> s5-1 0 display-level-index))) + ) + ) + (when *progress-process* + (enter! (-> *progress-process* 0) screen 0) + (set! (-> *progress-process* 0 card-info) #f) ) - ) - (set! (-> s5-1 0 next-level-index) (-> s5-1 0 display-level-index)) - (set! (-> s5-1 0 display-state) (progress-screen invalid)) - (set-transition-progress! (-> s5-1 0) 512) - (set! (-> s5-1 0 task-index) (get-next-task-up -1 (-> s5-1 0 display-level-index))) ) + (else + (push! (-> *progress-process* 0)) + (set! (-> *progress-process* 0 next-display-state) screen) + (set! (-> *progress-process* 0 card-info) #f) + ) ) - (when *progress-process* - (enter! (-> *progress-process* 0) screen 0) - (set! (-> *progress-process* 0 card-info) #f) - ) - ) - (else - (push! (-> *progress-process* 0)) - (set! (-> *progress-process* 0 next-display-state) screen) - (set! (-> *progress-process* 0 card-info) #f) - ) ) - ) + 0 (none) ) (defun deactivate-progress () - (when (and *progress-process* - (= (-> *progress-process* 0 next-state name) 'progress-gone) - ) - (copy-settings-from-target! *setting-control*) - (dotimes (gp-0 (-> *progress-process* 0 nb-of-particles)) - (kill-and-free-particles (-> *progress-process* 0 particles gp-0 part)) - (set! (-> *progress-process* 0 particles gp-0 part matrix) -1) + (when (and *progress-process* (= (-> *progress-process* 0 next-state name) 'progress-gone)) + (copy-settings-from-target! *setting-control*) + (dotimes (gp-0 (-> *progress-process* 0 nb-of-particles)) + (kill-and-free-particles (-> *progress-process* 0 particles gp-0 part)) + (set! (-> *progress-process* 0 particles gp-0 part matrix) -1) + ) + (set! (-> *progress-process* 0 nb-of-particles) 0) + (deactivate (-> *progress-process* 0)) + (set! *progress-process* (the-as (pointer progress) #f)) + (enable-level-text-file-loading) ) - (set! (-> *progress-process* 0 nb-of-particles) 0) - (deactivate (-> *progress-process* 0)) - (set! *progress-process* (the-as (pointer progress) #f)) - (enable-level-text-file-loading) - ) + 0 (none) ) (defun hide-progress-screen () "shoo!" - (when *progress-process* - (send-event (ppointer->process *progress-process*) 'go-away) - ) + (if *progress-process* + (send-event (ppointer->process *progress-process*) 'go-away) + ) + 0 (none) ) (defun hide-progress-icons () - - ;; starts from 6 and clears 8 particles (let ((v1-0 6)) - (dotimes (a0-0 8) - (set! (-> *progress-process* 0 particles v1-0 init-pos x) -320.0) - (+! v1-0 1) + (dotimes (a0-0 8) + (set! (-> *progress-process* 0 particles v1-0 init-pos x) -320.0) + (+! v1-0 1) + ) ) - ) (set! (-> *progress-process* 0 particles 5 init-pos x) -320.0) (set! (-> *progress-process* 0 particles 14 init-pos x) -320.0) (set! (-> *progress-process* 0 particles 15 init-pos x) -320.0) @@ -731,77 +734,82 @@ (none) ) -(defmethod relocate game-count-info ((this game-count-info) (offset int)) +(defmethod relocate game-count-info ((obj game-count-info) (arg0 int)) "Load in the game-count-info. This is a bit of a hack." - (set! *game-counts* this) + (set! *game-counts* obj) ) (defmethod relocate progress ((obj progress) (arg0 int)) (dotimes (v1-0 (-> obj nb-of-particles)) - (when (-> obj particles v1-0 part) - (if (nonzero? (-> obj particles v1-0 part)) - (set! (-> obj particles v1-0 part) - (the-as sparticle-launch-control (&+ (the-as pointer (-> obj particles v1-0 part)) arg0))) - ) + (when (-> obj particles v1-0 part) + (if (nonzero? (-> obj particles v1-0 part)) + (set! (-> obj particles v1-0 part) + (the-as sparticle-launch-control (&+ (the-as pointer (-> obj particles v1-0 part)) arg0)) + ) + ) + ) ) - ) (the-as progress ((method-of-type process relocate) obj arg0)) ) (defmethod adjust-sprites progress ((obj progress)) (let ((f0-1 (* (1/ METER_LENGTH) (the float (-> obj in-out-position))))) - (set! (-> obj particles 2 init-pos x) (the float (+ (-> obj right-x-offset) 409 (the int (* 301.5 f0-1))))) - (set! (-> obj particles 1 init-pos x) (the float (+ (-> obj left-x-offset) 59))) - (set! (-> obj left-side-x-scale) (* 4096.0 (+ (/ 3.5 (-> obj sides-x-scale)) (* 10.0 f0-1)))) - (set! (-> obj left-side-y-scale) (* 4096.0 (+ (-> obj sides-y-scale) (* 10.0 f0-1)))) - (set! (-> obj right-side-x-scale) (* 4096.0 (+ (/ 6.0 (-> obj sides-x-scale)) (* 4.0 f0-1)))) - (set! (-> obj right-side-y-scale) (* 4096.0 (+ (-> obj sides-y-scale) (* 4.0 f0-1)))) - ) + (set! (-> obj particles 2 init-pos x) (the float (+ (-> obj right-x-offset) 409 (the int (* 301.5 f0-1))))) + (set! (-> obj particles 1 init-pos x) (the float (+ (-> obj left-x-offset) 59))) + (set! (-> obj left-side-x-scale) (meters (+ (/ 3.5 (-> obj sides-x-scale)) (* 10.0 f0-1)))) + (set! (-> obj left-side-y-scale) (meters (+ (-> obj sides-y-scale) (* 10.0 f0-1)))) + (set! (-> obj right-side-x-scale) (meters (+ (/ 6.0 (-> obj sides-x-scale)) (* 4.0 f0-1)))) + (set! (-> obj right-side-y-scale) (meters (+ (-> obj sides-y-scale) (* 4.0 f0-1)))) + ) (dotimes (s5-0 (-> obj nb-of-particles)) - (set! (-> obj particles s5-0 pos x) (+ -256.0 (-> obj particles s5-0 init-pos x))) - (set! (-> obj particles s5-0 pos y) (* 0.5 (- (* (-> obj particles s5-0 init-pos y) (-> *video-parms* relative-y-scale)) - (the float (-> *video-parms* screen-sy)) - ) - ) + (set! (-> obj particles s5-0 pos x) (+ -256.0 (-> obj particles s5-0 init-pos x))) + (set! (-> obj particles s5-0 pos y) + (* 0.5 (- (* (-> obj particles s5-0 init-pos y) (-> *video-parms* relative-y-scale)) + (the float (-> *video-parms* screen-sy)) + ) + ) + ) + (set! (-> obj particles s5-0 pos z) (-> obj particles s5-0 init-pos z)) + (if (> (-> obj particles s5-0 part matrix) 0) + (set-vector! (sprite-get-user-hvdf (-> obj particles s5-0 part matrix)) + (the float (+ (the int (-> obj particles s5-0 pos x)) 2048)) + (the float (+ (the int (-> obj particles s5-0 pos y)) 2048)) + (- (-> *math-camera* hvdf-off z) (* 1024.0 (-> obj particles s5-0 pos z))) + (-> *math-camera* hvdf-off w) + ) + ) + (spawn (-> obj particles s5-0 part) *null-vector*) ) - (set! (-> obj particles s5-0 pos z) (-> obj particles s5-0 init-pos z)) - (when (> (-> obj particles s5-0 part matrix) 0) - (let ((v1-53 (sprite-get-user-hvdf (-> obj particles s5-0 part matrix)))) - (set! (-> v1-53 x) (the float (+ (the int (-> obj particles s5-0 pos x)) 2048))) - (set! (-> v1-53 y) (the float (+ (the int (-> obj particles s5-0 pos y)) 2048))) - (set! (-> v1-53 z) (- (-> *math-camera* hvdf-off z) (* 1024.0 (-> obj particles s5-0 pos z)))) - (set! (-> v1-53 w) (-> *math-camera* hvdf-off w)) - ) - ) - (spawn (-> obj particles s5-0 part) *null-vector*) - ) + 0 (none) ) (defmethod adjust-icons progress ((obj progress)) (dotimes (v1-0 (-> obj nb-of-icons)) - (when (>= v1-0 4) - (set-vector! (-> obj icons v1-0 icon 0 root scale) - (* (-> obj icons v1-0 scale-x) (-> *video-parms* relative-x-scale)) - (* (-> obj icons v1-0 scale-y) (-> *video-parms* relative-y-scale)) - (* (-> obj icons v1-0 scale-x) (-> *video-parms* relative-x-scale)) - 1.0 - ) - (set! (-> obj icons v1-0 icon 0 root trans x) (the float (+ (-> obj icons v1-0 icon-x) -256))) - (set! (-> obj icons v1-0 icon 0 root trans y) (* (-> *video-parms* relative-y-scale) - (- (* (-> *video-parms* relative-y-scale) - (the float (-> obj icons v1-0 icon-y))) - (the float (-> *video-parms* screen-sy)) - ) - )) + (when (>= v1-0 4) + (set-vector! (-> obj icons v1-0 icon 0 root scale) + (* (-> obj icons v1-0 scale-x) (-> *video-parms* relative-x-scale)) + (* (-> obj icons v1-0 scale-y) (-> *video-parms* relative-y-scale)) + (* (-> obj icons v1-0 scale-x) (-> *video-parms* relative-x-scale)) + 1.0 + ) + (set! (-> obj icons v1-0 icon 0 root trans x) (the float (+ (-> obj icons v1-0 icon-x) -256))) + (set! (-> obj icons v1-0 icon 0 root trans y) + (* (-> *video-parms* relative-y-scale) + (- (* (-> *video-parms* relative-y-scale) (the float (-> obj icons v1-0 icon-y))) + (the float (-> *video-parms* screen-sy)) + ) + ) + ) + ) ) - ) + 0 (none) ) (defmethod adjust-ratios progress ((obj progress) (aspect symbol) (video-mode symbol)) - (case aspect - (('aspect4x3) + (case aspect + (('aspect4x3) (set! (-> obj sides-x-scale) 1.0) (set! (-> obj sides-y-scale) 13.0) (set! (-> obj left-x-offset) 0) @@ -815,33 +823,38 @@ (set! (-> obj icons 4 scale-x) 0.013) (set! (-> obj icons 4 scale-y) -0.015) ) - (('aspect16x9) - (set! (-> obj sides-x-scale) 1.2) - (set! (-> obj sides-y-scale) 9.8) - (set! (-> obj left-x-offset) -10) - (set! (-> obj right-x-offset) 17) - (set! (-> obj button-scale) 1.05) - (set! (-> obj slot-scale) 6144.0) - (set! (-> obj small-orb-y-offset) 59) - (set! (-> obj icons 5 scale-x) 0.008) - (set! (-> obj icons 5 scale-y) -0.0098) - (set! (-> obj big-orb-y-offset) 255) - (set! (-> obj icons 4 scale-x) 0.017) - (set! (-> obj icons 4 scale-y) -0.0205) + (('aspect16x9) + (set! (-> obj sides-x-scale) 1.2) + (set! (-> obj sides-y-scale) 9.8) + (set! (-> obj left-x-offset) -10) + (set! (-> obj right-x-offset) 17) + (set! (-> obj button-scale) 1.05) + (set! (-> obj slot-scale) 6144.0) + (set! (-> obj small-orb-y-offset) 59) + (set! (-> obj icons 5 scale-x) 0.008) + (set! (-> obj icons 5 scale-y) -0.0098) + (set! (-> obj big-orb-y-offset) 255) + (set! (-> obj icons 4 scale-x) 0.017) + (set! (-> obj icons 4 scale-y) -0.0205) + ) ) - ) (when (= video-mode 'pal) - (set! (-> obj icons 5 scale-y) (* 1.15 (-> obj icons 5 scale-y))) - (set! (-> obj icons 4 scale-x) (* 1.05 (-> obj icons 4 scale-x))) - (set! (-> obj icons 4 scale-y) (* (-> obj icons 4 scale-y) (if (= aspect 'aspect16x9) - 1.18 - 1.15 - ))) - (+! (-> obj big-orb-y-offset) (if (= aspect 'aspect16x9) - 3 - 2 - )) - ) + (set! (-> obj icons 5 scale-y) (* 1.15 (-> obj icons 5 scale-y))) + (set! (-> obj icons 4 scale-x) (* 1.05 (-> obj icons 4 scale-x))) + (set! (-> obj icons 4 scale-y) (* (-> obj icons 4 scale-y) (the-as float (if (= aspect 'aspect16x9) + 1.18 + 1.15 + ) + ) + ) + ) + (+! (-> obj big-orb-y-offset) (if (= aspect 'aspect16x9) + 3 + 2 + ) + ) + ) + 0 (none) ) @@ -849,33 +862,28 @@ (let ((v1-2 (-> *progress-process* 0 display-state)) (a1-1 (-> *progress-state* starting-state)) ) - (and - (= (-> obj next-state name) 'progress-normal) - (not (-> obj in-transition)) - (not (-> obj selected-option)) - (or - (= v1-2 (progress-screen fuel-cell)) - (= v1-2 (progress-screen money)) - (= v1-2 (progress-screen buzzer)) - (and - (or - (= a1-1 (progress-screen fuel-cell)) - (= a1-1 (progress-screen money)) - (= a1-1 (progress-screen buzzer)) - (= a1-1 (progress-screen title)) - ) - (or - (= v1-2 (progress-screen settings)) - (= v1-2 (progress-screen game-settings)) - (= v1-2 (progress-screen graphic-settings)) - (= v1-2 (progress-screen sound-settings)) - (= v1-2 (progress-screen title)) - (= v1-2 (progress-screen settings-title)) - ) - ) - ) + (and (= (-> obj next-state name) 'progress-normal) + (not (-> obj in-transition)) + (not (-> obj selected-option)) + (or (= v1-2 (progress-screen fuel-cell)) + (= v1-2 (progress-screen money)) + (= v1-2 (progress-screen buzzer)) + (and (or (= a1-1 (progress-screen fuel-cell)) + (= a1-1 (progress-screen money)) + (= a1-1 (progress-screen buzzer)) + (= a1-1 (progress-screen title)) + ) + (or (= v1-2 (progress-screen settings)) + (= v1-2 (progress-screen game-settings)) + (= v1-2 (progress-screen graphic-settings)) + (= v1-2 (progress-screen sound-settings)) + (= v1-2 (progress-screen title)) + (= v1-2 (progress-screen settings-title)) + ) + ) + ) + ) ) - ) ) (defmethod dummy-19 progress ((obj progress)) @@ -883,9 +891,7 @@ ) (defmethod hidden? progress ((obj progress)) - (or (not *progress-process*) - (= (-> *progress-process* 0 in-out-position) 4096) - ) + (or (not *progress-process*) (= (-> *progress-process* 0 in-out-position) 4096)) ) (defmacro test-make-target () @@ -903,553 +909,334 @@ ) (defstate progress-waiting (progress) - :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + :event + (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) (case arg2 (('go-away) (go progress-gone) ) ) - #f - ) - :code (behavior () - (loop - (when (hud-hidden?) - (dotimes (gp-0 (-> self nb-of-particles)) - (if (= (-> self particles gp-0 part matrix) -1) - (set! (-> self particles gp-0 part matrix) (sprite-allocate-user-hvdf)) - ) - ) - (set-setting! *setting-control* self 'common-page 'set 0.0 1) - (suspend) - (go progress-coming-in) - ) - (suspend) ) - (none) - ) + :code + (behavior () + (loop + (when (hud-hidden?) + (dotimes (gp-0 (-> self nb-of-particles)) + (if (= (-> self particles gp-0 part matrix) -1) + (set! (-> self particles gp-0 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (set-setting! *setting-control* self 'common-page 'set 0.0 1) + (suspend) + (go progress-coming-in) + ) + (suspend) + ) + (none) + ) ) (defstate progress-gone (progress) - :code (behavior () - (clear-pending-settings-from-process *setting-control* self 'process-mask) - (copy-settings-from-target! *setting-control*) - (logior! (-> self mask) (process-mask sleep)) - (suspend) - (none) - ) + :code + (behavior () + (clear-pending-settings-from-process *setting-control* self 'process-mask) + (copy-settings-from-target! *setting-control*) + (logior! (-> self mask) (process-mask sleep)) + (suspend) + 0 + (none) + ) ) (defmethod dummy-53 progress ((obj progress) (arg0 progress-screen)) (let ((s4-0 (-> obj card-info)) (gp-0 arg0) ) - (when s4-0 - (case arg0 - (((progress-screen memcard-no-space) - (progress-screen memcard-not-inserted) - (progress-screen memcard-not-formatted) - ) - (cond + (when s4-0 + (case arg0 + (((progress-screen memcard-no-space) + (progress-screen memcard-not-inserted) + (progress-screen memcard-not-formatted) + ) + (cond + ((zero? (-> s4-0 handle)) + (set! gp-0 (progress-screen memcard-not-inserted)) + ) + ((zero? (-> s4-0 formatted)) + (cond + ((or (zero? (-> obj display-state-pos)) + (and (!= (-> *progress-state* starting-state) 27) (nonzero? (-> *progress-state* starting-state))) + ) + (set-master-mode 'game) + ) + (else + (if (!= arg0 (progress-screen memcard-not-formatted)) + (set! gp-0 (progress-screen memcard-format)) + ) + ) + ) + ) + ((and (zero? (-> s4-0 inited)) (< (-> s4-0 mem-actual) (-> s4-0 mem-required))) + (set! gp-0 (progress-screen memcard-no-space)) + ) + ((or (zero? (-> obj display-state-pos)) + (and (!= (-> *progress-state* starting-state) 27) (nonzero? (-> *progress-state* starting-state))) + ) + (set-master-mode 'game) + ) + (else + (set! gp-0 (progress-screen save-game)) + ) + ) + ) + (((progress-screen memcard-insert)) + (if (= (-> s4-0 inited) 1) + (set! gp-0 (progress-screen load-game)) + ) + ) + ) + (cond ((zero? (-> s4-0 handle)) - (set! gp-0 (progress-screen memcard-not-inserted)) + (cond + ((-> *setting-control* current auto-save) + (set! gp-0 (progress-screen memcard-removed)) + ) + (else + (cond + ((= arg0 (progress-screen load-game)) + (set! gp-0 (progress-screen memcard-insert)) + ) + ((or (= arg0 (progress-screen memcard-format)) + (= arg0 (progress-screen memcard-no-space)) + (= arg0 (progress-screen memcard-not-formatted)) + (= arg0 (progress-screen save-game)) + (= arg0 (progress-screen save-game-title)) + (= arg0 (progress-screen memcard-no-data)) + (= arg0 (progress-screen memcard-data-exists)) + ) + (set! gp-0 (progress-screen memcard-not-inserted)) + ) + ) + ) + ) ) ((zero? (-> s4-0 formatted)) - (cond - ((or - (zero? (-> obj display-state-pos)) - (and - (!= (-> *progress-state* starting-state) 27) - (nonzero? (-> *progress-state* starting-state)) - ) + (case arg0 + (((progress-screen load-game)) + (set! gp-0 (progress-screen memcard-insert)) ) - (set-master-mode 'game) - ) - (else - (if (!= arg0 9) + (((progress-screen save-game) (progress-screen save-game-title)) (set! gp-0 (progress-screen memcard-format)) ) ) - ) ) - ((and - (zero? (-> s4-0 inited)) - (< (-> s4-0 mem-actual) (-> s4-0 mem-required)) - ) - (set! gp-0 (progress-screen memcard-no-space)) - ) - ((or - (zero? (-> obj display-state-pos)) - (and - (!= (-> *progress-state* starting-state) 27) - (nonzero? (-> *progress-state* starting-state)) + ((zero? (-> s4-0 inited)) + (case arg0 + (((progress-screen save-game) (progress-screen save-game-title)) + (if (>= (-> s4-0 mem-actual) (-> s4-0 mem-required)) + (set! gp-0 (progress-screen memcard-no-data)) + (set! gp-0 (progress-screen memcard-no-space)) + ) + ) + (((progress-screen load-game)) + (set! gp-0 (progress-screen memcard-insert)) + ) ) - ) - (set-master-mode 'game) - ) - (else - (set! gp-0 (progress-screen save-game)) ) ) - ) - (((progress-screen memcard-insert)) - (if (= (-> s4-0 inited) 1) - (set! gp-0 (progress-screen load-game)) - ) ) - ) - (cond - ((zero? (-> s4-0 handle)) - (cond - ((-> *setting-control* current auto-save) - (set! gp-0 (progress-screen memcard-removed)) - ) - (else - (cond - ((= arg0 (progress-screen load-game)) - (set! gp-0 (progress-screen memcard-insert)) - ) - ((or - (= arg0 (progress-screen memcard-format)) - (= arg0 (progress-screen memcard-no-space)) - (= arg0 (progress-screen memcard-not-formatted)) - (= arg0 (progress-screen save-game)) - (= arg0 (progress-screen save-game-title)) - (= arg0 (progress-screen memcard-no-data)) - (= arg0 (progress-screen memcard-data-exists)) - ) - (set! gp-0 (progress-screen memcard-not-inserted)) - ) - ) - ) - ) - ) - ((zero? (-> s4-0 formatted)) - (case arg0 - (((progress-screen load-game)) - (set! gp-0 (progress-screen memcard-insert)) - ) - (((progress-screen save-game) (progress-screen save-game-title)) - (set! gp-0 (progress-screen memcard-format)) - ) - ) - ) - ((zero? (-> s4-0 inited)) - (case arg0 - (((progress-screen save-game) (progress-screen save-game-title)) - (if (>= (-> s4-0 mem-actual) (-> s4-0 mem-required)) - (set! gp-0 (progress-screen memcard-no-data)) - (set! gp-0 (progress-screen memcard-no-space)) - ) - ) - (((progress-screen load-game)) - (set! gp-0 (progress-screen memcard-insert)) - ) - ) - ) - ) + gp-0 ) - gp-0 - ) ) (defmethod dummy-31 progress ((obj progress)) (let ((s5-0 (-> obj card-info))) - (when (and s5-0 (not (-> obj in-transition))) - (when - (or - (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) - (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle)) - ) - (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x)) - (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) - (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons circle)) - (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle)) - (case (-> obj display-state) - (((progress-screen load-game)) - (cond - ((< (-> obj option-index) 4) - (when (nonzero? (-> s5-0 file (-> obj option-index) present)) - (sound-play-by-name - (static-sound-name "start-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t + (when (and s5-0 (not (-> obj in-transition))) + (when (or (cpad-pressed? 0 x) (cpad-pressed? 0 circle)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons circle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle)) + (case (-> obj display-state) + (((progress-screen load-game)) + (cond + ((< (-> obj option-index) 4) + (when (nonzero? (-> s5-0 file (-> obj option-index) present)) + (sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t) + (set! (-> *progress-state* which) (-> obj option-index)) + (set! (-> obj next-display-state) (progress-screen memcard-loading)) + ) + ) + (else + (sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t) + (set! (-> obj next-display-state) (progress-screen invalid)) + ) + ) + ) + (((progress-screen save-game) (progress-screen save-game-title)) + (cond + ((< (-> obj option-index) 4) + (sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t) + (set! (-> *progress-state* which) (-> obj option-index)) + (if (zero? (-> s5-0 file (-> obj option-index) present)) + (set! (-> obj next-display-state) (progress-screen memcard-saving)) + (set! (-> obj next-display-state) (progress-screen memcard-data-exists)) + ) + ) + ((and (= (-> obj display-state) (progress-screen save-game-title)) (= (-> obj option-index) 4)) + (sound-play-by-name (static-sound-name "starts-options") (new-sound-id) 1024 0 0 1 #t) + (sound-volume-off) + (set! (-> *game-info* mode) 'play) + (initialize! *game-info* 'game (the-as game-save #f) "intro-start") + (set-master-mode 'game) + ) + (else + (sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t) + (set! (-> obj next-display-state) (progress-screen invalid)) + ) + ) + ) + (((progress-screen memcard-insert)) + (sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t) + (set! (-> obj next-display-state) (progress-screen invalid)) + ) + (((progress-screen memcard-data-exists)) + (cond + ((-> *progress-state* yes-no-choice) + (sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t) + (set! (-> obj next-display-state) (progress-screen memcard-saving)) + ) + ((begin + (sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t) + (= (-> obj display-state-stack 0) (progress-screen title)) + ) + (set! (-> obj next-display-state) (progress-screen save-game-title)) + ) + (else + (set! (-> obj next-display-state) (progress-screen save-game)) + ) + ) + ) + (((progress-screen memcard-no-data)) + (cond + ((-> *progress-state* yes-no-choice) + (sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t) + (set! (-> obj next-display-state) (progress-screen memcard-creating)) + ) + (else + (sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t) + (sound-volume-off) + (set! (-> *game-info* mode) 'play) + (initialize! *game-info* 'game (the-as game-save #f) "intro-start") + (set-master-mode 'game) + ) + ) + ) + (((progress-screen memcard-no-space) + (progress-screen memcard-not-inserted) + (progress-screen memcard-not-formatted) ) - (set! (-> *progress-state* which) (-> obj option-index)) - (set! (-> obj next-display-state) (progress-screen memcard-loading)) + (cond + ((= (-> obj display-state-stack 0) (progress-screen title)) + (sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t) + (sound-volume-off) + (set! (-> *game-info* mode) 'play) + (initialize! *game-info* 'game (the-as game-save #f) "intro-start") + (set-master-mode 'game) + ) + ((nonzero? (-> obj display-state-stack 0)) + (sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t) + (set-master-mode 'game) + ) + (else + (sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t) + (set! (-> obj next-display-state) (progress-screen invalid)) + ) + ) + ) + (((progress-screen memcard-error-loading) + (progress-screen memcard-error-saving) + (progress-screen memcard-error-formatting) + (progress-screen memcard-error-creating) + (progress-screen memcard-auto-save-error) + (progress-screen memcard-removed) + (progress-screen auto-save) + ) + (sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t) + (set! (-> obj next-display-state) (progress-screen invalid)) + ) + (((progress-screen pal-change-to-60hz)) + (cond + ((-> *progress-state* yes-no-choice) + (sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t) + (set! (-> *setting-control* default video-mode) (-> *progress-state* video-mode-choice)) + (set! (-> obj video-mode-timeout) (-> *display* real-frame-counter)) + (set! (-> obj next-display-state) (progress-screen pal-now-60hz)) + ) + (else + (sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t) + (set! (-> *progress-state* video-mode-choice) 'pal) + (set! (-> obj next-display-state) (progress-screen invalid)) + ) + ) + ) + (((progress-screen pal-now-60hz)) + (cond + ((not (-> *progress-state* yes-no-choice)) + (set! (-> *progress-state* video-mode-choice) 'pal) + (set! (-> *setting-control* default video-mode) (-> *progress-state* video-mode-choice)) + (sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t) + ) + (else + (sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t) + ) + ) + (set! (-> obj next-display-state) (progress-screen invalid)) + ) + (((progress-screen no-disc) (progress-screen bad-disc)) + (when (is-cd-in?) + (sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t) + (set! (-> obj next-display-state) (progress-screen invalid)) + ) + ) + (((progress-screen quit)) + (cond + ((-> *progress-state* yes-no-choice) + (sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t) + (sound-volume-off) + (set! (-> *game-info* mode) 'play) + (initialize! *game-info* 'game (the-as game-save #f) "title-start") + ) + (else + (sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t) + (set! (-> obj next-display-state) (progress-screen invalid)) + ) + ) + ) + (((progress-screen memcard-format)) + (cond + ((-> *progress-state* yes-no-choice) + (sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t) + (set! (-> obj next-display-state) (progress-screen memcard-formatting)) + ) + ((= (-> obj display-state-stack 0) (progress-screen title)) + (sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t) + (sound-volume-off) + (set! (-> *game-info* mode) 'play) + (initialize! *game-info* 'game (the-as game-save #f) "intro-start") + (set-master-mode 'game) + ) + (else + (sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t) + (set! (-> obj next-display-state) (progress-screen invalid)) + ) + ) ) ) - (else - (sound-play-by-name - (static-sound-name "cursor-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! (-> obj next-display-state) (progress-screen invalid)) - ) - ) ) - (((progress-screen save-game) (progress-screen save-game-title)) - (cond - ((< (-> obj option-index) 4) - (sound-play-by-name - (static-sound-name "start-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! (-> *progress-state* which) (-> obj option-index)) - (if (zero? (-> s5-0 file (-> obj option-index) present)) - (set! (-> obj next-display-state) (progress-screen memcard-saving)) - (set! - (-> obj next-display-state) - (progress-screen memcard-data-exists) - ) - ) - ) - ((and - (= (-> obj display-state) (progress-screen save-game-title)) - (= (-> obj option-index) 4) - ) - (sound-play-by-name - (static-sound-name "starts-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (sound-volume-off) - (set! (-> *game-info* mode) 'play) - (initialize! *game-info* 'game (the-as game-save #f) "intro-start") - (set-master-mode 'game) - ) - (else - (sound-play-by-name - (static-sound-name "cursor-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! (-> obj next-display-state) (progress-screen invalid)) - ) - ) - ) - (((progress-screen memcard-insert)) - (sound-play-by-name - (static-sound-name "cursor-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! (-> obj next-display-state) (progress-screen invalid)) - ) - (((progress-screen memcard-data-exists)) - (cond - ((-> *progress-state* yes-no-choice) - (sound-play-by-name - (static-sound-name "start-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! (-> obj next-display-state) (progress-screen memcard-saving)) - ) - ((begin - (sound-play-by-name - (static-sound-name "cursor-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (= (-> obj display-state-stack 0) (progress-screen title)) - ) - (set! (-> obj next-display-state) (progress-screen save-game-title)) - ) - (else - (set! (-> obj next-display-state) (progress-screen save-game)) - ) - ) - ) - (((progress-screen memcard-no-data)) - (cond - ((-> *progress-state* yes-no-choice) - (sound-play-by-name - (static-sound-name "start-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! (-> obj next-display-state) (progress-screen memcard-creating)) - ) - (else - (sound-play-by-name - (static-sound-name "cursor-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (sound-volume-off) - (set! (-> *game-info* mode) 'play) - (initialize! *game-info* 'game (the-as game-save #f) "intro-start") - (set-master-mode 'game) - ) - ) - ) - (((progress-screen memcard-no-space) - (progress-screen memcard-not-inserted) - (progress-screen memcard-not-formatted) - ) - (cond - ((= (-> obj display-state-stack 0) (progress-screen title)) - (sound-play-by-name - (static-sound-name "start-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (sound-volume-off) - (set! (-> *game-info* mode) 'play) - (initialize! *game-info* 'game (the-as game-save #f) "intro-start") - (set-master-mode 'game) - ) - ((nonzero? (-> obj display-state-stack 0)) - (sound-play-by-name - (static-sound-name "start-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set-master-mode 'game) - ) - (else - (sound-play-by-name - (static-sound-name "cursor-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! (-> obj next-display-state) (progress-screen invalid)) - ) - ) - ) - (((progress-screen memcard-error-loading) - (progress-screen memcard-error-saving) - (progress-screen memcard-error-formatting) - (progress-screen memcard-error-creating) - (progress-screen memcard-auto-save-error) - (progress-screen memcard-removed) - (progress-screen auto-save) - ) - (sound-play-by-name - (static-sound-name "cursor-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! (-> obj next-display-state) (progress-screen invalid)) - ) - (((progress-screen pal-change-to-60hz)) - (cond - ((-> *progress-state* yes-no-choice) - (sound-play-by-name - (static-sound-name "start-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! - (-> *setting-control* default video-mode) - (-> *progress-state* video-mode-choice) - ) - (set! - (-> obj video-mode-timeout) - (the-as uint (-> *display* real-frame-counter)) - ) - (set! (-> obj next-display-state) (progress-screen pal-now-60hz)) - ) - (else - (sound-play-by-name - (static-sound-name "cursor-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! (-> *progress-state* video-mode-choice) 'pal) - (set! (-> obj next-display-state) (progress-screen invalid)) - ) - ) - ) - (((progress-screen pal-now-60hz)) - (cond - ((not (-> *progress-state* yes-no-choice)) - (set! (-> *progress-state* video-mode-choice) 'pal) - (set! - (-> *setting-control* default video-mode) - (-> *progress-state* video-mode-choice) - ) - (sound-play-by-name - (static-sound-name "cursor-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - ) - (else - (sound-play-by-name - (static-sound-name "start-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - ) - ) - (set! (-> obj next-display-state) (progress-screen invalid)) - ) - (((progress-screen no-disc) (progress-screen bad-disc)) - (when (is-cd-in?) - (sound-play-by-name - (static-sound-name "cursor-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! (-> obj next-display-state) (progress-screen invalid)) - ) - ) - (((progress-screen quit)) - (cond - ((-> *progress-state* yes-no-choice) - (sound-play-by-name - (static-sound-name "start-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (sound-volume-off) - (set! (-> *game-info* mode) 'play) - (initialize! *game-info* 'game (the-as game-save #f) "title-start") - ) - (else - (sound-play-by-name - (static-sound-name "cursor-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! (-> obj next-display-state) (progress-screen invalid)) - ) - ) - ) - (((progress-screen memcard-format)) - (cond - ((-> *progress-state* yes-no-choice) - (sound-play-by-name - (static-sound-name "start-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! (-> obj next-display-state) (progress-screen memcard-formatting)) - ) - ((= (-> obj display-state-stack 0) (progress-screen title)) - (sound-play-by-name - (static-sound-name "start-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (sound-volume-off) - (set! (-> *game-info* mode) 'play) - (initialize! *game-info* 'game (the-as game-save #f) "intro-start") - (set-master-mode 'game) - ) - (else - (sound-play-by-name - (static-sound-name "cursor-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! (-> obj next-display-state) (progress-screen invalid)) - ) - ) - ) ) - ) ) - ) + 0 (none) ) @@ -1457,1803 +1244,1003 @@ (mc-get-slot-info 0 *progress-save-info*) (set! (-> obj card-info) *progress-save-info*) (let ((s5-0 (-> *options-remap* (-> obj display-state)))) - (when (and s5-0 (not (-> obj in-transition))) - (cond - ((logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons up)) + (when (and s5-0 (not (-> obj in-transition))) (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) - (when (not (-> obj selected-option)) - (if (!= (length s5-0) 1) - (sound-play-by-name - (static-sound-name "cursor-up-down") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - ) - (set! - (-> obj last-option-index-change) - (-> *display* real-frame-counter) - ) - (if (> (-> obj option-index) 0) - (+! (-> obj option-index) -1) - (set! (-> obj option-index) (+ (length s5-0) -1)) - ) - ) - ) - (else - (when (-> obj selected-option) - (let ((v1-34 #f)) - (case (-> s5-0 (-> obj option-index) option-type) - ((3) - (when (< -48 (-> *setting-control* current screeny)) - (set! v1-34 #t) - (+! (-> *setting-control* default screeny) -1) - ) - ) - ) - (when v1-34 - (when - (< - 90 - (- - (-> *display* real-frame-counter) - (-> *progress-state* last-slider-sound) - ) - ) - (set! - (-> *progress-state* last-slider-sound) - (-> *display* real-frame-counter) - ) - (sound-play-by-name - (static-sound-name "slider2001") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - ) - ) - ) - ) - ) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons down)) - (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) - (when (not (-> obj selected-option)) - (if (!= (length s5-0) 1) - (sound-play-by-name - (static-sound-name "cursor-up-down") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - ) - (set! - (-> obj last-option-index-change) - (-> *display* real-frame-counter) - ) + ((cpad-hold? 0 up) (cond - ((< (-> obj option-index) (+ (length s5-0) -1)) - (+! (-> obj option-index) 1) - ) - (else - (set! (-> obj option-index) 0) - 0 - ) - ) - ) - ) - (else - (when (-> obj selected-option) - (let ((v1-69 #f)) - (case (-> s5-0 (-> obj option-index) option-type) - ((3) - (when (< (-> *setting-control* current screeny) 48) - (set! v1-69 #t) - (+! (-> *setting-control* default screeny) 1) - ) - ) - ) - (when v1-69 - (when - (< - 90 - (- - (-> *display* real-frame-counter) - (-> *progress-state* last-slider-sound) - ) - ) - (set! - (-> *progress-state* last-slider-sound) - (-> *display* real-frame-counter) - ) - (sound-play-by-name - (static-sound-name "slider2001") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - ) - ) - ) - ) - ) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons left)) - (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons left)) - (when - (or - (-> obj selected-option) - (= (-> s5-0 (-> obj option-index) option-type) 7) - ) - (let ((s4-5 #f)) - (case (-> s5-0 (-> obj option-index) option-type) - ((2 7) - (when - (not - (-> - (the-as - (pointer uint32) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - ) - (set! s4-5 #t) - (if - (= - (-> s5-0 (-> obj option-index) value-to-modify) - (&-> *setting-control* current vibration) - ) - (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 90) - ) - ) - (set! - (-> - (the-as - (pointer symbol) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - #t - ) - ) - ((4) - (set! - s4-5 - (= - (-> - (the-as - (pointer symbol) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - 'aspect16x9 - ) - ) - (set! - (-> - (the-as - (pointer symbol) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - 'aspect4x3 - ) - ) - ((5) - (set! - s4-5 - (= - (-> - (the-as - (pointer symbol) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - 'ntsc - ) - ) - (set! - (-> - (the-as - (pointer symbol) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - 'pal - ) - ) - ((1) - (if - (> - (the-as - int - (-> - (the-as - (pointer uint64) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - ) - 0 - ) - (+! - (-> - (the-as - (pointer uint64) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - -1 - ) - (set! - (-> - (the-as - (pointer int64) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - (if - (and - (zero? (scf-get-territory)) - (not - (and - (= *progress-cheat* 'language) - (logtest? - (-> *cpad-list* cpads 0 button0-abs 0) - (pad-buttons l2) - ) - (logtest? - (-> *cpad-list* cpads 0 button0-abs 0) - (pad-buttons r2) - ) + ((cpad-pressed? 0 up) + (when (not (-> obj selected-option)) + (if (!= (length s5-0) 1) + (sound-play-by-name (static-sound-name "cursor-up-down") (new-sound-id) 1024 0 0 1 #t) ) - ) - ) - 4 - 5 - ) - ) - ) - (set! (-> obj language-transition) #t) - (set! (-> obj language-direction) #t) - (set! s4-5 #t) - ) - ) - (if s4-5 - (sound-play-by-name - (static-sound-name "cursor-l-r") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - ) - ) - ) - ) - (else - (when (-> obj selected-option) - (let ((v1-157 #f)) - (let ((a0-101 (-> s5-0 (-> obj option-index) option-type))) - (cond - ((zero? a0-101) - (cond - ((>= - (-> - (the-as - (pointer float) - (-> s5-0 (-> obj option-index) value-to-modify) + (set! (-> obj last-option-index-change) (-> *display* real-frame-counter)) + (if (> (-> obj option-index) 0) + (+! (-> obj option-index) -1) + (set! (-> obj option-index) (+ (length s5-0) -1)) ) - ) - (+ 1.0 (-> s5-0 (-> obj option-index) param1)) - ) - (set! - (-> - (the-as - (pointer float) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - (+ - -1.0 - (-> - (the-as - (pointer float) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - ) - ) - (set! v1-157 #t) - ) - ((< - (-> s5-0 (-> obj option-index) param1) - (-> - (the-as - (pointer float) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - ) - (set! - (-> - (the-as - (pointer float) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - (-> s5-0 (-> obj option-index) param1) - ) - (set! v1-157 #t) - ) ) - ) - ((= a0-101 3) - (when (< -96 (-> *setting-control* default screenx)) - (set! v1-157 #t) - (+! (-> *setting-control* default screenx) -1) - ) - ) ) - ) - (when v1-157 - (let ((f30-0 100.0)) - (case (-> s5-0 (-> obj option-index) name) - (((game-text-id music-volume) (game-text-id speech-volume)) - (set! - f30-0 - (-> - (the-as - (pointer float) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - ) - ) - ) - (when - (< - 90 - (- - (-> *display* real-frame-counter) - (-> *progress-state* last-slider-sound) - ) - ) - (set! - (-> *progress-state* last-slider-sound) - (-> *display* real-frame-counter) - ) - (sound-play-by-name - (static-sound-name "slider2001") - (new-sound-id) - (the int (* 10.24 f30-0)) - 0 - 0 - 1 - #t - ) - ) - ) - ) - ) - ) - ) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons right)) - (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons right)) - (when - (or - (-> obj selected-option) - (= (-> s5-0 (-> obj option-index) option-type) 7) - ) - (let ((v1-217 (the-as object #f))) - (case (-> s5-0 (-> obj option-index) option-type) - ((2 7) - (set! - v1-217 - (-> - (the-as - (pointer uint32) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - ) - (set! - (-> - (the-as - (pointer symbol) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - #f - ) - ) - ((4) - (set! - v1-217 - (= - (-> - (the-as - (pointer symbol) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - 'aspect4x3 - ) - ) - (set! - (-> - (the-as - (pointer symbol) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - 'aspect16x9 - ) - ) - ((5) - (set! - v1-217 - (= - (-> - (the-as - (pointer symbol) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - 'pal - ) - ) - (set! - (-> - (the-as - (pointer symbol) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - 'ntsc - ) - ) - ((1) - (let - ((v1-243 - (if - (and - (zero? (scf-get-territory)) - (not - (and - (= *progress-cheat* 'language) - (logtest? - (-> *cpad-list* cpads 0 button0-abs 0) - (pad-buttons l2) - ) - (logtest? - (-> *cpad-list* cpads 0 button0-abs 0) - (pad-buttons r2) + (else + (when (-> obj selected-option) + (let ((v1-34 #f)) + (case (-> s5-0 (-> obj option-index) option-type) + ((3) + (when (< -48 (-> *setting-control* current screeny)) + (set! v1-34 #t) + (+! (-> *setting-control* default screeny) -1) + ) ) ) - ) - ) - 4 - 5 - ) - ) - ) - (cond - ((< - (the-as - int - (-> - (the-as - (pointer uint64) - (-> s5-0 (-> obj option-index) value-to-modify) + (when v1-34 + (when (< 90 (- (-> *display* real-frame-counter) (-> *progress-state* last-slider-sound))) + (set! (-> *progress-state* last-slider-sound) (-> *display* real-frame-counter)) + (sound-play-by-name (static-sound-name "slider2001") (new-sound-id) 1024 0 0 1 #t) + ) ) - ) ) - v1-243 - ) - (+! - (-> - (the-as - (pointer uint64) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - 1 - ) ) - (else - (set! - (-> - (the-as - (pointer int64) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - 0 - ) - 0 - ) - ) ) - (set! (-> obj language-transition) #t) - (set! (-> obj language-direction) #f) - (set! v1-217 #t) - ) ) - (if v1-217 - (sound-play-by-name - (static-sound-name "cursor-l-r") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - ) - ) ) - ) - (else - (when (-> obj selected-option) - (let ((v1-263 #f)) - (let ((a0-177 (-> s5-0 (-> obj option-index) option-type))) - (cond - ((zero? a0-177) - (cond - ((>= - (+ -1.0 (-> s5-0 (-> obj option-index) param2)) - (-> - (the-as - (pointer float) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - ) - (set! - (-> - (the-as - (pointer float) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - (+ - 1.0 - (-> - (the-as - (pointer float) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - ) - ) - (set! v1-263 #t) - ) - ((< - (-> - (the-as - (pointer float) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - (-> s5-0 (-> obj option-index) param2) - ) - (set! - (-> - (the-as - (pointer float) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - (-> s5-0 (-> obj option-index) param2) - ) - (set! v1-263 #t) - ) - ) - ) - ((= a0-177 3) - (when (< (-> *setting-control* default screenx) 96) - (set! v1-263 #t) - (+! (-> *setting-control* default screenx) 1) - ) - ) - ) - ) - (when v1-263 - (let ((f30-1 100.0)) - (case (-> s5-0 (-> obj option-index) name) - (((game-text-id music-volume) (game-text-id speech-volume)) - (set! - f30-1 - (-> - (the-as - (pointer float) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - ) - ) - ) - (when - (< - 90 - (- - (-> *display* real-frame-counter) - (-> *progress-state* last-slider-sound) - ) - ) - (set! - (-> *progress-state* last-slider-sound) - (-> *display* real-frame-counter) - ) - (sound-play-by-name - (static-sound-name "slider2001") - (new-sound-id) - (the int (* 10.24 f30-1)) - 0 - 0 - 1 - #t - ) - ) - ) - ) - ) - ) - ) - ) - ) - ((or - (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) - (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) - ) - (cond - ((-> obj selected-option) - (let ((v1-319 (-> s5-0 (-> obj option-index) option-type))) + ((cpad-hold? 0 down) (cond - ((zero? v1-319) - (set! - (-> - (the-as - (pointer float) - (-> s5-0 (-> obj option-index) value-to-modify) + ((cpad-pressed? 0 down) + (when (not (-> obj selected-option)) + (if (!= (length s5-0) 1) + (sound-play-by-name (static-sound-name "cursor-up-down") (new-sound-id) 1024 0 0 1 #t) + ) + (set! (-> obj last-option-index-change) (-> *display* real-frame-counter)) + (cond + ((< (-> obj option-index) (+ (length s5-0) -1)) + (+! (-> obj option-index) 1) + ) + (else + (set! (-> obj option-index) 0) + 0 + ) + ) ) - ) - (-> *progress-state* slider-backup) ) - ) - ((= v1-319 1) - (set! - (-> - (the-as - (pointer int64) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - (-> *progress-state* language-backup) - ) - ) - ((= v1-319 2) - (set! - (-> - (the-as - (pointer symbol) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - (-> *progress-state* on-off-backup) - ) - ) - ((= v1-319 3) - (set! - (-> *setting-control* default screenx) - (-> *progress-state* center-x-backup) - ) - (set! - (-> *setting-control* default screeny) - (-> *progress-state* center-y-backup) - ) - ) - ((or (= v1-319 4) (= v1-319 5)) - (set! - (-> - (the-as - (pointer symbol) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - (-> *progress-state* aspect-ratio-backup) - ) - ) - ) - ) - (sound-play-by-name - (static-sound-name "cursor-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! (-> obj selected-option) #f) - ) - ((or - (dummy-32 obj) - (= (-> obj display-state) (progress-screen load-game)) - (= (-> obj display-state) (progress-screen save-game)) - (= (-> obj display-state) (progress-screen save-game-title)) - ) - (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons square)) - (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) - (logclear! - (-> *cpad-list* cpads 0 button0-abs 0) - (pad-buttons triangle) - ) - (logclear! - (-> *cpad-list* cpads 0 button0-rel 0) - (pad-buttons triangle) - ) - (if (= (-> obj display-state) (progress-screen settings)) - (sound-play-by-name - (static-sound-name "menu-stats") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (sound-play-by-name - (static-sound-name "cursor-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - ) - (load-level-text-files - (-> *level-task-data* (-> obj display-level-index) text-group-index) - ) - (set! (-> obj next-display-state) (progress-screen invalid)) - ) - ) - ) - ((or - (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) - (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle)) - ) - (cond - ((not (-> obj selected-option)) - (cond - ((= (-> s5-0 (-> obj option-index) option-type) 6) - (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x)) - (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) - (logclear! - (-> *cpad-list* cpads 0 button0-abs 0) - (pad-buttons circle) - ) - (logclear! - (-> *cpad-list* cpads 0 button0-rel 0) - (pad-buttons circle) - ) - (push! obj) - (sound-play-by-name - (static-sound-name "select-option") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! - (-> obj next-display-state) - (the-as progress-screen (-> s5-0 (-> obj option-index) param3)) - ) - (case (-> obj next-display-state) - (((progress-screen load-game) - (progress-screen save-game) - (progress-screen save-game-title) - ) - (set! - (-> obj next-display-state) - (dummy-53 obj (-> obj next-display-state)) - ) + (else + (when (-> obj selected-option) + (let ((v1-69 #f)) + (case (-> s5-0 (-> obj option-index) option-type) + ((3) + (when (< (-> *setting-control* current screeny) 48) + (set! v1-69 #t) + (+! (-> *setting-control* default screeny) 1) + ) + ) + ) + (when v1-69 + (when (< 90 (- (-> *display* real-frame-counter) (-> *progress-state* last-slider-sound))) + (set! (-> *progress-state* last-slider-sound) (-> *display* real-frame-counter)) + (sound-play-by-name (static-sound-name "slider2001") (new-sound-id) 1024 0 0 1 #t) + ) + ) + ) + ) ) ) - ) - ((= (-> s5-0 (-> obj option-index) option-type) 8) - (cond - ((= (-> s5-0 (-> obj option-index) name) (game-text-id exit-demo)) - (set! *master-exit* 'force) - (set-master-mode 'game) + ) + ((cpad-hold? 0 left) + (cond + ((cpad-pressed? 0 left) + (when (or (-> obj selected-option) (= (-> s5-0 (-> obj option-index) option-type) 7)) + (let ((s4-5 #f)) + (case (-> s5-0 (-> obj option-index) option-type) + ((2 7) + (when (not (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify)))) + (set! s4-5 #t) + (if (= (-> s5-0 (-> obj option-index) value-to-modify) (&-> *setting-control* current vibration)) + (cpad-set-buzz! (-> *cpad-list* cpads 0) 1 255 90) + ) + ) + (set! (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify))) #t) + ) + ((4) + (set! s4-5 (= (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify))) 'aspect16x9)) + (set! (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify))) 'aspect4x3) + ) + ((5) + (set! s4-5 (= (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify))) 'ntsc)) + (set! (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify))) 'pal) + ) + ((1) + (if (> (the-as int (-> (the-as (pointer uint64) (-> s5-0 (-> obj option-index) value-to-modify)))) 0) + (+! (-> (the-as (pointer uint64) (-> s5-0 (-> obj option-index) value-to-modify))) -1) + (set! (-> (the-as (pointer int64) (-> s5-0 (-> obj option-index) value-to-modify))) + (if (and (zero? (scf-get-territory)) + (not (and (= *progress-cheat* 'language) (cpad-hold? 0 l2) (cpad-hold? 0 r2))) + ) + 4 + 5 + ) + ) + ) + (set! (-> obj language-transition) #t) + (set! (-> obj language-direction) #t) + (set! s4-5 #t) + ) + ) + (if s4-5 + (sound-play-by-name (static-sound-name "cursor-l-r") (new-sound-id) 1024 0 0 1 #t) + ) + ) + ) ) - ((= (-> s5-0 (-> obj option-index) name) (game-text-id back)) + (else + (when (-> obj selected-option) + (let ((v1-157 #f)) + (let ((a0-101 (-> s5-0 (-> obj option-index) option-type))) + (cond + ((zero? a0-101) + (cond + ((>= (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify))) + (+ 1.0 (-> s5-0 (-> obj option-index) param1)) + ) + (set! (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify))) + (+ -1.0 (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))) + ) + (set! v1-157 #t) + ) + ((< (-> s5-0 (-> obj option-index) param1) + (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify))) + ) + (set! (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify))) + (-> s5-0 (-> obj option-index) param1) + ) + (set! v1-157 #t) + ) + ) + ) + ((= a0-101 3) + (when (< -96 (-> *setting-control* default screenx)) + (set! v1-157 #t) + (+! (-> *setting-control* default screenx) -1) + ) + ) + ) + ) + (when v1-157 + (let ((f30-0 100.0)) + (case (-> s5-0 (-> obj option-index) name) + (((game-text-id music-volume) (game-text-id speech-volume)) + (set! f30-0 (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))) + ) + ) + (when (< 90 (- (-> *display* real-frame-counter) (-> *progress-state* last-slider-sound))) + (set! (-> *progress-state* last-slider-sound) (-> *display* real-frame-counter)) + (sound-play-by-name (static-sound-name "slider2001") (new-sound-id) (the int (* 10.24 f30-0)) 0 0 1 #t) + ) + ) + ) + ) + ) + ) + ) + ) + ((cpad-hold? 0 right) + (cond + ((cpad-pressed? 0 right) + (when (or (-> obj selected-option) (= (-> s5-0 (-> obj option-index) option-type) 7)) + (let ((v1-217 (the-as object #f))) + (case (-> s5-0 (-> obj option-index) option-type) + ((2 7) + (set! v1-217 (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify)))) + (set! (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify))) #f) + ) + ((4) + (set! v1-217 (= (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify))) 'aspect4x3)) + (set! (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify))) 'aspect16x9) + ) + ((5) + (set! v1-217 (= (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify))) 'pal)) + (set! (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify))) 'ntsc) + ) + ((1) + (let ((v1-243 (if (and (zero? (scf-get-territory)) + (not (and (= *progress-cheat* 'language) (cpad-hold? 0 l2) (cpad-hold? 0 r2))) + ) + 4 + 5 + ) + ) + ) + (cond + ((< (the-as int (-> (the-as (pointer uint64) (-> s5-0 (-> obj option-index) value-to-modify)))) v1-243) + (+! (-> (the-as (pointer uint64) (-> s5-0 (-> obj option-index) value-to-modify))) 1) + ) + (else + (set! (-> (the-as (pointer int64) (-> s5-0 (-> obj option-index) value-to-modify))) 0) + 0 + ) + ) + ) + (set! (-> obj language-transition) #t) + (set! (-> obj language-direction) #f) + (set! v1-217 #t) + ) + ) + (if v1-217 + (sound-play-by-name (static-sound-name "cursor-l-r") (new-sound-id) 1024 0 0 1 #t) + ) + ) + ) + ) + (else + (when (-> obj selected-option) + (let ((v1-263 #f)) + (let ((a0-177 (-> s5-0 (-> obj option-index) option-type))) + (cond + ((zero? a0-177) + (cond + ((>= (+ -1.0 (-> s5-0 (-> obj option-index) param2)) + (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify))) + ) + (set! (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify))) + (+ 1.0 (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))) + ) + (set! v1-263 #t) + ) + ((< (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify))) + (-> s5-0 (-> obj option-index) param2) + ) + (set! (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify))) + (-> s5-0 (-> obj option-index) param2) + ) + (set! v1-263 #t) + ) + ) + ) + ((= a0-177 3) + (when (< (-> *setting-control* default screenx) 96) + (set! v1-263 #t) + (+! (-> *setting-control* default screenx) 1) + ) + ) + ) + ) + (when v1-263 + (let ((f30-1 100.0)) + (case (-> s5-0 (-> obj option-index) name) + (((game-text-id music-volume) (game-text-id speech-volume)) + (set! f30-1 (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))) + ) + ) + (when (< 90 (- (-> *display* real-frame-counter) (-> *progress-state* last-slider-sound))) + (set! (-> *progress-state* last-slider-sound) (-> *display* real-frame-counter)) + (sound-play-by-name (static-sound-name "slider2001") (new-sound-id) (the int (* 10.24 f30-1)) 0 0 1 #t) + ) + ) + ) + ) + ) + ) + ) + ) + ((or (cpad-pressed? 0 square) (cpad-pressed? 0 triangle)) + (cond + ((-> obj selected-option) + (let ((v1-319 (-> s5-0 (-> obj option-index) option-type))) + (cond + ((zero? v1-319) + (set! (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify))) + (-> *progress-state* slider-backup) + ) + ) + ((= v1-319 1) + (set! (-> (the-as (pointer int64) (-> s5-0 (-> obj option-index) value-to-modify))) + (-> *progress-state* language-backup) + ) + ) + ((= v1-319 2) + (set! (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify))) + (-> *progress-state* on-off-backup) + ) + ) + ((= v1-319 3) + (set! (-> *setting-control* default screenx) (-> *progress-state* center-x-backup)) + (set! (-> *setting-control* default screeny) (-> *progress-state* center-y-backup)) + ) + ((or (= v1-319 4) (= v1-319 5)) + (set! (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify))) + (-> *progress-state* aspect-ratio-backup) + ) + ) + ) + ) + (sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t) + (set! (-> obj selected-option) #f) + ) + ((or (dummy-32 obj) + (= (-> obj display-state) (progress-screen load-game)) + (= (-> obj display-state) (progress-screen save-game)) + (= (-> obj display-state) (progress-screen save-game-title)) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons square)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons triangle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) (if (= (-> obj display-state) (progress-screen settings)) - (sound-play-by-name - (static-sound-name "menu-stats") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (sound-play-by-name - (static-sound-name "cursor-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - ) - (load-level-text-files - (-> - *level-task-data* - (-> obj display-level-index) - text-group-index - ) - ) + (sound-play-by-name (static-sound-name "menu-stats") (new-sound-id) 1024 0 0 1 #t) + (sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t) + ) + (load-level-text-files (-> *level-task-data* (-> obj display-level-index) text-group-index)) (set! (-> obj next-display-state) (progress-screen invalid)) ) ) - ) - ((!= (-> s5-0 (-> obj option-index) option-type) 7) - (let ((v1-427 (-> s5-0 (-> obj option-index) option-type))) - (cond - ((zero? v1-427) - (set! - (-> *progress-state* slider-backup) - (-> - (the-as - (pointer float) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - ) - ) - ((= v1-427 1) - (set! - (-> *progress-state* language-backup) - (the-as - int - (-> - (the-as - (pointer uint64) - (-> s5-0 (-> obj option-index) value-to-modify) + ) + ((or (cpad-pressed? 0 x) (cpad-pressed? 0 circle)) + (cond + ((not (-> obj selected-option)) + (cond + ((= (-> s5-0 (-> obj option-index) option-type) 6) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons circle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle)) + (push! obj) + (sound-play-by-name (static-sound-name "select-option") (new-sound-id) 1024 0 0 1 #t) + (set! (-> obj next-display-state) (the-as progress-screen (-> s5-0 (-> obj option-index) param3))) + (case (-> obj next-display-state) + (((progress-screen load-game) (progress-screen save-game) (progress-screen save-game-title)) + (set! (-> obj next-display-state) (dummy-53 obj (-> obj next-display-state))) + ) ) - ) ) - ) - ) - ((= v1-427 2) - (set! - (-> *progress-state* on-off-backup) - (the-as - symbol - (-> - (the-as - (pointer uint32) - (-> s5-0 (-> obj option-index) value-to-modify) + ((= (-> s5-0 (-> obj option-index) option-type) 8) + (cond + ((= (-> s5-0 (-> obj option-index) name) (game-text-id exit-demo)) + (set! *master-exit* 'force) + (set-master-mode 'game) + ) + ((= (-> s5-0 (-> obj option-index) name) (game-text-id back)) + (if (= (-> obj display-state) (progress-screen settings)) + (sound-play-by-name (static-sound-name "menu-stats") (new-sound-id) 1024 0 0 1 #t) + (sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t) + ) + (load-level-text-files (-> *level-task-data* (-> obj display-level-index) text-group-index)) + (set! (-> obj next-display-state) (progress-screen invalid)) + ) ) - ) ) - ) - ) - ((= v1-427 3) - (set! - (-> *progress-state* center-x-backup) - (-> *setting-control* default screenx) - ) - (set! - (-> *progress-state* center-y-backup) - (-> *setting-control* default screeny) - ) - ) - ((or (= v1-427 4) (= v1-427 5)) - (set! - (-> *progress-state* aspect-ratio-backup) - (the-as - symbol - (-> - (the-as - (pointer uint32) - (-> s5-0 (-> obj option-index) value-to-modify) + ((!= (-> s5-0 (-> obj option-index) option-type) 7) + (let ((v1-427 (-> s5-0 (-> obj option-index) option-type))) + (cond + ((zero? v1-427) + (set! (-> *progress-state* slider-backup) + (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify))) + ) + ) + ((= v1-427 1) + (set! (-> *progress-state* language-backup) + (the-as int (-> (the-as (pointer uint64) (-> s5-0 (-> obj option-index) value-to-modify)))) + ) + ) + ((= v1-427 2) + (set! (-> *progress-state* on-off-backup) + (the-as symbol (-> (the-as (pointer uint32) (-> s5-0 (-> obj option-index) value-to-modify)))) + ) + ) + ((= v1-427 3) + (set! (-> *progress-state* center-x-backup) (-> *setting-control* default screenx)) + (set! (-> *progress-state* center-y-backup) (-> *setting-control* default screeny)) + ) + ((or (= v1-427 4) (= v1-427 5)) + (set! (-> *progress-state* aspect-ratio-backup) + (the-as symbol (-> (the-as (pointer uint32) (-> s5-0 (-> obj option-index) value-to-modify)))) + ) + ) + ) + ) + (sound-play-by-name (static-sound-name "select-option") (new-sound-id) 1024 0 0 1 #t) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons circle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle)) + (set! (-> obj selected-option) #t) + (when (= (-> s5-0 (-> obj option-index) option-type) 1) + (set! (-> obj language-selection) (the-as uint (-> *setting-control* current language))) + (set! (-> obj language-direction) #t) + (set! (-> obj language-transition) #f) + (set! (-> obj language-x-offset) 0) + 0 ) - ) ) ) - ) ) + (else + (sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t) + (set! (-> obj selected-option) #f) + (case (-> s5-0 (-> obj option-index) option-type) + ((4) + (set! (-> *setting-control* default aspect-ratio) + (the-as symbol (-> (the-as (pointer uint32) (-> s5-0 (-> obj option-index) value-to-modify)))) + ) + ) + ((5) + (case (-> (the-as (pointer uint32) (-> s5-0 (-> obj option-index) value-to-modify))) + (('pal) + (set! (-> *setting-control* default video-mode) + (the-as symbol (-> (the-as (pointer uint32) (-> s5-0 (-> obj option-index) value-to-modify)))) + ) + ) + (('ntsc) + (push! obj) + (set! (-> obj next-display-state) (progress-screen pal-change-to-60hz)) + ) + ) + ) + ((1) + (if (not (-> obj language-transition)) + (load-level-text-files (-> obj display-level-index)) + ) + ) + ) + ) ) - (sound-play-by-name - (static-sound-name "select-option") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x)) - (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) - (logclear! - (-> *cpad-list* cpads 0 button0-abs 0) - (pad-buttons circle) - ) - (logclear! - (-> *cpad-list* cpads 0 button0-rel 0) - (pad-buttons circle) - ) - (set! (-> obj selected-option) #t) - (when (= (-> s5-0 (-> obj option-index) option-type) 1) - (set! - (-> obj language-selection) - (the-as uint (-> *setting-control* current language)) - ) - (set! (-> obj language-direction) #t) - (set! (-> obj language-transition) #f) - (set! (-> obj language-x-offset) 0) - 0 - ) - ) ) ) - (else - (sound-play-by-name - (static-sound-name "start-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! (-> obj selected-option) #f) - (case (-> s5-0 (-> obj option-index) option-type) - ((4) - (set! - (-> *setting-control* default aspect-ratio) - (the-as - symbol - (-> - (the-as - (pointer uint32) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - ) - ) - ) - ((5) - (case - (-> - (the-as - (pointer uint32) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - - (('pal) - (set! - (-> *setting-control* default video-mode) - (the-as - symbol - (-> - (the-as - (pointer uint32) - (-> s5-0 (-> obj option-index) value-to-modify) - ) - ) - ) - ) - ) - (('ntsc) - (push! obj) - (set! - (-> obj next-display-state) - (progress-screen pal-change-to-60hz) - ) - ) - ) - ) - ((1) - (if (not (-> obj language-transition)) - (load-level-text-files (-> obj display-level-index)) - ) - ) - ) - ) - ) ) - ) ) - ) 0 (none) ) (defmethod respond-progress progress ((obj progress)) (when (not (-> obj in-transition)) - (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) - (let ((s5-0 (-> obj display-level-index))) - (set! (-> obj next-level-index) (get-next-level-down s5-0)) - (when (!= s5-0 (-> obj next-level-index)) - (sound-play-by-name - (static-sound-name "cursor-up-down") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! (-> obj level-transition) 2) - ) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) - (let ((s5-2 (-> obj next-level-index))) - (set! (-> obj next-level-index) (get-next-level-up s5-2)) - (when (!= s5-2 (-> obj next-level-index)) - (sound-play-by-name - (static-sound-name "cursor-up-down") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! (-> obj level-transition) 1) - ) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) - (when (nonzero? (-> obj display-state)) - (sound-play-by-name - (static-sound-name "select-option") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! (-> obj next-display-state) (progress-screen fuel-cell)) - (set! (-> obj stat-transition) #t) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) - (when (!= (-> obj display-state) 1) - (sound-play-by-name - (static-sound-name "select-option") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! (-> obj next-display-state) (progress-screen money)) - (set! (-> obj stat-transition) #t) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle)) - (when (!= (-> obj display-state) 2) - (sound-play-by-name - (static-sound-name "select-option") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (set! (-> obj next-display-state) (progress-screen buzzer)) - (set! (-> obj stat-transition) #t) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle)) - (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons circle)) - (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle)) - (sound-play-by-name - (static-sound-name "start-options") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (push! obj) - (set! (-> obj next-display-state) (progress-screen settings)) - ) - ((= (-> obj display-state) (progress-screen fuel-cell)) - (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons left)) - (let ((s5-8 (-> obj task-index))) - (set! - (-> obj task-index) - (get-next-task-down (-> obj task-index) (-> obj display-level-index)) + (cond + ((cpad-pressed? 0 up) + (let ((s5-0 (-> obj display-level-index))) + (set! (-> obj next-level-index) (get-next-level-down s5-0)) + (when (!= s5-0 (-> obj next-level-index)) + (sound-play-by-name (static-sound-name "cursor-up-down") (new-sound-id) 1024 0 0 1 #t) + (set! (-> obj level-transition) 2) + ) ) - (if (!= s5-8 (-> obj task-index)) - (sound-play-by-name - (static-sound-name "cursor-l-r") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t + ) + ((cpad-pressed? 0 down) + (let ((s5-2 (-> obj next-level-index))) + (set! (-> obj next-level-index) (get-next-level-up s5-2)) + (when (!= s5-2 (-> obj next-level-index)) + (sound-play-by-name (static-sound-name "cursor-up-down") (new-sound-id) 1024 0 0 1 #t) + (set! (-> obj level-transition) 1) + ) + ) + ) + ((cpad-pressed? 0 square) + (when (nonzero? (-> obj display-state)) + (sound-play-by-name (static-sound-name "select-option") (new-sound-id) 1024 0 0 1 #t) + (set! (-> obj next-display-state) (progress-screen fuel-cell)) + (set! (-> obj stat-transition) #t) + ) + ) + ((cpad-pressed? 0 x) + (when (!= (-> obj display-state) (progress-screen money)) + (sound-play-by-name (static-sound-name "select-option") (new-sound-id) 1024 0 0 1 #t) + (set! (-> obj next-display-state) (progress-screen money)) + (set! (-> obj stat-transition) #t) + ) + ) + ((cpad-pressed? 0 triangle) + (when (!= (-> obj display-state) (progress-screen buzzer)) + (sound-play-by-name (static-sound-name "select-option") (new-sound-id) 1024 0 0 1 #t) + (set! (-> obj next-display-state) (progress-screen buzzer)) + (set! (-> obj stat-transition) #t) + ) + ) + ((cpad-pressed? 0 circle) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons circle)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle)) + (sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t) + (push! obj) + (set! (-> obj next-display-state) (progress-screen settings)) + ) + ((= (-> obj display-state) (progress-screen fuel-cell)) + (cond + ((cpad-pressed? 0 left) + (let ((s5-8 (-> obj task-index))) + (set! (-> obj task-index) (get-next-task-down (-> obj task-index) (-> obj display-level-index))) + (if (!= s5-8 (-> obj task-index)) + (sound-play-by-name (static-sound-name "cursor-l-r") (new-sound-id) 1024 0 0 1 #t) + ) + ) + ) + ((cpad-pressed? 0 right) + (let ((s5-10 (-> obj task-index))) + (set! (-> obj task-index) (get-next-task-up (-> obj task-index) (-> obj display-level-index))) + (if (!= s5-10 (-> obj task-index)) + (sound-play-by-name (static-sound-name "cursor-l-r") (new-sound-id) 1024 0 0 1 #t) + ) + ) ) ) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons right)) - (let ((s5-10 (-> obj task-index))) - (set! - (-> obj task-index) - (get-next-task-up (-> obj task-index) (-> obj display-level-index)) - ) - (if (!= s5-10 (-> obj task-index)) - (sound-play-by-name - (static-sound-name "cursor-l-r") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - ) - ) ) ) - ) ) - ) + 0 (none) ) (defstate progress-normal (progress) :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) - (local-vars (v0-0 none)) - (let ((v1-0 arg2)) - (the-as object (cond - ((= v1-0 'go-away) - (go progress-going-out) - ) - ((= v1-0 'notify) - (cond - ((= (-> arg3 param 0) 'done) - (case (-> self display-state) - (((progress-screen memcard-saving)) - (cond - ((= - (-> self display-state-stack 0) - (progress-screen title) - ) - (let - ((gp-1 (-> *setting-control* default auto-save))) - (sound-volume-off) - (set! (-> *game-info* mode) 'play) - (initialize! - *game-info* - 'game - (the-as game-save #f) - "intro-start" + (local-vars (v0-0 none)) + (let ((v1-0 arg2)) + (the-as object (cond + ((= v1-0 'go-away) + (go progress-going-out) + ) + ((= v1-0 'notify) + (cond + ((= (-> arg3 param 0) 'done) + (case (-> self display-state) + (((progress-screen memcard-saving)) + (cond + ((= (-> self display-state-stack 0) (progress-screen title)) + (let ((gp-1 (-> *setting-control* default auto-save))) + (sound-volume-off) + (set! (-> *game-info* mode) 'play) + (initialize! *game-info* 'game (the-as game-save #f) "intro-start") + (set! (-> *setting-control* default auto-save) gp-1) + ) + (set-master-mode 'game) + ) + (else + (set! v0-0 (the-as none -1)) + (set! (-> self next-display-state) (the-as progress-screen v0-0)) + v0-0 + ) + ) ) - (set! - (-> *setting-control* default auto-save) - gp-1 + (((progress-screen memcard-formatting)) + (set! (-> self force-transition) #t) + (set! v0-0 (the-as none 15)) + (set! (-> self next-display-state) (the-as progress-screen v0-0)) + v0-0 + ) + (((progress-screen memcard-creating)) + (cond + ((= (-> self display-state-stack 0) (progress-screen title)) + (set! v0-0 (the-as none 18)) + (set! (-> self next-display-state) (the-as progress-screen v0-0)) + ) + (else + (set! v0-0 (the-as none 17)) + (set! (-> self next-display-state) (the-as progress-screen v0-0)) + ) + ) + v0-0 ) ) - (set-master-mode 'game) - ) - (else - (set! v0-0 (the-as none -1)) - (set! - (-> self next-display-state) - (the-as progress-screen v0-0) + ) + ((= (-> arg3 param 0) 'error) + (let ((t9-4 format) + (a0-17 #t) + (a1-2 "ERROR NOTIFY: ~S ~D~%") + (v1-13 (-> arg3 param 1)) + ) + (t9-4 + a0-17 + a1-2 + (cond + ((= v1-13 17) + "no-auto-save" + ) + ((= v1-13 16) + "no-process" + ) + ((= v1-13 15) + "bad-version" + ) + ((= v1-13 14) + "no-space" + ) + ((= v1-13 13) + "no-save" + ) + ((= v1-13 12) + "no-file" + ) + ((= v1-13 11) + "no-format" + ) + ((= v1-13 10) + "no-last" + ) + ((= v1-13 9) + "no-card" + ) + ((= v1-13 8) + "no-memory" + ) + ((= v1-13 7) + "new-game" + ) + ((= v1-13 6) + "read-error" + ) + ((= v1-13 5) + "write-error" + ) + ((= v1-13 4) + "internal-error" + ) + ((= v1-13 3) + "format-failed" + ) + ((= v1-13 2) + "bad-handle" + ) + ((= v1-13 1) + "ok" + ) + ((zero? v1-13) + "busy" + ) + (else + "*unknown*" + ) + ) + (-> self display-state) + ) + ) + (case (-> arg3 param 1) + ((14) + (set! v0-0 (the-as none 7)) + (set! (-> self next-display-state) (the-as progress-screen v0-0)) + v0-0 + ) + (else + (case (-> self display-state) + (((progress-screen memcard-formatting)) + (set! v0-0 (the-as none 24)) + (set! (-> self next-display-state) (the-as progress-screen v0-0)) + v0-0 + ) + (((progress-screen memcard-creating)) + (set! v0-0 (the-as none 25)) + (set! (-> self next-display-state) (the-as progress-screen v0-0)) + v0-0 + ) + (((progress-screen memcard-saving)) + (set! v0-0 (the-as none 21)) + (set! (-> self next-display-state) (the-as progress-screen v0-0)) + v0-0 + ) + (((progress-screen memcard-loading)) + (set! v0-0 (the-as none 20)) + (set! (-> self next-display-state) (the-as progress-screen v0-0)) + v0-0 + ) + ) + ) ) - v0-0 - ) ) ) - (((progress-screen memcard-formatting)) - (set! (-> self force-transition) #t) - (set! v0-0 (the-as none 15)) - (set! - (-> self next-display-state) - (the-as progress-screen v0-0) - ) - v0-0 - ) - (((progress-screen memcard-creating)) - (cond - ((= - (-> self display-state-stack 0) - (progress-screen title) - ) - (set! v0-0 (the-as none 18)) - (set! - (-> self next-display-state) - (the-as progress-screen v0-0) - ) - ) - (else - (set! v0-0 (the-as none 17)) - (set! - (-> self next-display-state) - (the-as progress-screen v0-0) - ) - ) - ) - v0-0 - ) ) ) - ((= (-> arg3 param 0) 'error) - (let ((t9-4 format) - (a0-17 #t) - (a1-2 "ERROR NOTIFY: ~S ~D~%") - (v1-13 (-> arg3 param 1)) - ) - (t9-4 a0-17 a1-2 (cond - ((= v1-13 17) - "no-auto-save" - ) - ((= v1-13 16) - "no-process" - ) - ((= v1-13 15) - "bad-version" - ) - ((= v1-13 14) - "no-space" - ) - ((= v1-13 13) - "no-save" - ) - ((= v1-13 12) - "no-file" - ) - ((= v1-13 11) - "no-format" - ) - ((= v1-13 10) - "no-last" - ) - ((= v1-13 9) - "no-card" - ) - ((= v1-13 8) - "no-memory" - ) - ((= v1-13 7) - "new-game" - ) - ((= v1-13 6) - "read-error" - ) - ((= v1-13 5) - "write-error" - ) - ((= v1-13 4) - "internal-error" - ) - ((= v1-13 3) - "format-failed" - ) - ((= v1-13 2) - "bad-handle" - ) - ((= v1-13 1) - "ok" - ) - ((zero? v1-13) - "busy" - ) - (else - "*unknown*" - ) - ) - (-> self display-state) - ) - ) - (case (-> arg3 param 1) - ((14) - (set! v0-0 (the-as none 7)) - (set! - (-> self next-display-state) - (the-as progress-screen v0-0) - ) - v0-0 - ) - (else - (case (-> self display-state) - (((progress-screen memcard-formatting)) - (set! v0-0 (the-as none 24)) - (set! - (-> self next-display-state) - (the-as progress-screen v0-0) - ) - v0-0 - ) - (((progress-screen memcard-creating)) - (set! v0-0 (the-as none 25)) - (set! - (-> self next-display-state) - (the-as progress-screen v0-0) - ) - v0-0 - ) - (((progress-screen memcard-saving)) - (set! v0-0 (the-as none 21)) - (set! - (-> self next-display-state) - (the-as progress-screen v0-0) - ) - v0-0 - ) - (((progress-screen memcard-loading)) - (set! v0-0 (the-as none 20)) - (set! - (-> self next-display-state) - (the-as progress-screen v0-0) - ) - v0-0 - ) - ) - ) - ) - ) - ) - ) - ) - ) + ) + ) ) - ) :code (behavior () - (while #t - (when - (and - (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l1)) - (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r1)) - *cheat-mode* - ) - (when - (and - (< - (-> self task-index) - (-> *level-task-data* (-> self display-level-index) nb-of-tasks) - ) - (>= (-> self task-index) 0) - ) - (let - ((gp-0 - (-> - *level-task-data* - (-> self display-level-index) - task-info - (-> self task-index) - task-id - ) - ) - ) - (close-specific-task! gp-0 (task-status need-resolution)) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 2) - (set! (-> a1-3 message) 'get-pickup) - (set! (-> a1-3 param 0) (the-as uint 6)) - (set! (-> a1-3 param 1) (the-as uint (the float gp-0))) - (send-event-function *target* a1-3) - ) - ) - ) - ) - (if - (and - (= (-> self display-state) (-> self next-display-state)) - (= (-> self display-level-index) (-> self next-level-index)) - ) - (set! - (-> self transition-offset) - (seekl - (-> self transition-offset) - 0 - (* - (the - int - (* (-> self transition-speed) (-> *display* time-adjust-ratio)) - ) - (if (or (-> self stat-transition) (nonzero? (-> self level-transition))) - 2 - 1 - ) - ) - ) - ) - (set! - (-> self transition-offset) - (seekl - (-> self transition-offset) - 512 - (* - (the - int - (* (-> self transition-speed) (-> *display* time-adjust-ratio)) - ) - (if (or (-> self stat-transition) (nonzero? (-> self level-transition))) - 2 - 1 - ) - ) - ) - ) - ) - (set-transition-progress! self (-> self transition-offset)) - (set! - (-> self in-transition) - (or (-> self force-transition) (nonzero? (-> self transition-offset))) - ) - (when - (and - (not (handle->process (-> *game-info* auto-save-proc))) - (or (-> self force-transition) (-> self in-transition)) - (>= - (-> self transition-offset) - (if - (and - (zero? (-> self level-transition)) - (nonzero? (-> self next-display-state)) - (!= (-> self next-display-state) 1) - (!= (-> self next-display-state) 2) - ) - 512 - 256 - ) - ) - ) - (if (>= (the-as int (-> self next-display-state)) 0) - (enter! self (-> self next-display-state) 0) - (pop! self) - ) - (set! (-> self display-level-index) (-> self next-level-index)) - (when (nonzero? (-> self level-transition)) - (set! - (-> self task-index) - (get-next-task-up -1 (-> self display-level-index)) - ) - (case (-> self level-transition) - ((1) - (set! (-> self level-transition) 2) - ) - ((2) - (set! (-> self level-transition) 1) - ) - ) - ) - (set! (-> self force-transition) #f) - ) - (when (zero? (-> self transition-offset)) - (set! (-> self stat-transition) #f) - (set! (-> self level-transition) 0) - 0 - ) - (let ((gp-1 #f)) - (let ((v1-62 #f)) - (case (-> self display-state) - (((progress-screen fuel-cell) - (progress-screen money) - (progress-screen buzzer) - ) - (let ((s5-0 (-> self display-level-index))) - (when - (and - (< (mod (-> *display* real-frame-counter) 60) 30) - (zero? (-> *progress-process* 0 in-out-position)) - (not (-> self in-transition)) - (zero? (-> self transition-offset)) + (loop + (when (and (cpad-hold? 0 l1) (cpad-hold? 0 r1) *cheat-mode*) + (when (and (< (-> self task-index) (-> *level-task-data* (-> self display-level-index) nb-of-tasks)) + (>= (-> self task-index) 0) + ) + (let ((gp-0 (-> *level-task-data* (-> self display-level-index) task-info (-> self task-index) task-id))) + (close-specific-task! gp-0 (task-status need-resolution)) + (send-event *target* 'get-pickup 6 (the float gp-0)) ) - (set! gp-1 (!= s5-0 (get-next-level-up s5-0))) - (set! v1-62 (!= s5-0 (get-next-level-down s5-0))) + ) + ) + (if (and (= (-> self display-state) (-> self next-display-state)) + (= (-> self display-level-index) (-> self next-level-index)) + ) + (set! (-> self transition-offset) + (seekl + (-> self transition-offset) + 0 + (* (the int (* (-> self transition-speed) (-> *display* time-adjust-ratio))) + (if (or (-> self stat-transition) (nonzero? (-> self level-transition))) + 2 + 1 + ) + ) + ) + ) + (set! (-> self transition-offset) + (seekl + (-> self transition-offset) + 512 + (* (the int (* (-> self transition-speed) (-> *display* time-adjust-ratio))) + (if (or (-> self stat-transition) (nonzero? (-> self level-transition))) + 2 + 1 + ) + ) + ) + ) + ) + (set-transition-progress! self (-> self transition-offset)) + (set! (-> self in-transition) (or (-> self force-transition) (nonzero? (-> self transition-offset)))) + (when (and (not (handle->process (-> *game-info* auto-save-proc))) + (or (-> self force-transition) (-> self in-transition)) + (>= (-> self transition-offset) (if (and (zero? (-> self level-transition)) + (nonzero? (-> self next-display-state)) + (!= (-> self next-display-state) 1) + (!= (-> self next-display-state) 2) + ) + 512 + 256 + ) + ) + ) + (if (>= (the-as int (-> self next-display-state)) 0) + (enter! self (-> self next-display-state) 0) + (pop! self) + ) + (set! (-> self display-level-index) (-> self next-level-index)) + (when (nonzero? (-> self level-transition)) + (set! (-> self task-index) (get-next-task-up -1 (-> self display-level-index))) + (case (-> self level-transition) + ((1) + (set! (-> self level-transition) 2) + ) + ((2) + (set! (-> self level-transition) 1) + ) + ) + ) + (set! (-> self force-transition) #f) + ) + (when (zero? (-> self transition-offset)) + (set! (-> self stat-transition) #f) + (set! (-> self level-transition) 0) + 0 + ) + (let ((gp-1 #f)) + (let ((v1-62 #f)) + (case (-> self display-state) + (((progress-screen fuel-cell) (progress-screen money) (progress-screen buzzer)) + (let ((s5-0 (-> self display-level-index))) + (when (and (< (mod (-> *display* real-frame-counter) 60) 30) + (zero? (-> *progress-process* 0 in-out-position)) + (not (-> self in-transition)) + (zero? (-> self transition-offset)) + ) + (set! gp-1 (!= s5-0 (get-next-level-up s5-0))) + (set! v1-62 (!= s5-0 (get-next-level-down s5-0))) + ) + ) + ) + ) + (set! (-> self particles 3 init-pos x) (the float (if v1-62 + (- 195 (-> *progress-process* 0 left-x-offset)) + -320 + ) + ) + ) + ) + (set! (-> self particles 4 init-pos x) (the float (if gp-1 + (- 195 (-> *progress-process* 0 left-x-offset)) + -320 + ) + ) + ) + ) + (dummy-29 self) + (set! (-> self next-display-state) (dummy-53 self (-> self next-display-state))) + (let ((v1-74 (-> self display-state))) + (cond + ((or (= v1-74 (progress-screen fuel-cell)) + (or (= v1-74 (progress-screen money)) (= v1-74 (progress-screen buzzer))) + ) + (respond-progress self) + ) + ((or (= v1-74 (progress-screen memcard-no-space)) + (= v1-74 (progress-screen memcard-format)) + (= v1-74 (progress-screen memcard-data-exists)) + (= v1-74 (progress-screen memcard-insert)) + (= v1-74 (progress-screen load-game)) + (= v1-74 (progress-screen save-game)) + (= v1-74 (progress-screen save-game-title)) + (= v1-74 (progress-screen memcard-error-loading)) + (= v1-74 (progress-screen memcard-error-saving)) + (= v1-74 (progress-screen memcard-error-formatting)) + (= v1-74 (progress-screen memcard-error-creating)) + (= v1-74 (progress-screen memcard-auto-save-error)) + (= v1-74 (progress-screen memcard-removed)) + (= v1-74 (progress-screen memcard-no-data)) + (= v1-74 (progress-screen memcard-not-inserted)) + (= v1-74 (progress-screen memcard-not-formatted)) + (= v1-74 (progress-screen auto-save)) + (= v1-74 (progress-screen pal-change-to-60hz)) + (= v1-74 (progress-screen pal-now-60hz)) + (= v1-74 (progress-screen no-disc)) + (= v1-74 (progress-screen bad-disc)) + (= v1-74 (progress-screen quit)) + ) + (dummy-31 self) ) ) - ) - ) - (set! (-> self particles 3 init-pos x) (the float (if v1-62 - (- - 195 - (-> - *progress-process* - 0 - left-x-offset - ) - ) - -320 - ) - ) - ) - ) - (set! (-> self particles 4 init-pos x) (the float (if gp-1 - (- - 195 - (-> - *progress-process* - 0 - left-x-offset - ) - ) - -320 - ) - ) - ) - ) - (dummy-29 self) - (set! - (-> self next-display-state) - (dummy-53 self (-> self next-display-state)) - ) - (let ((v1-74 (-> self display-state))) - (cond - ((or - (= v1-74 (progress-screen fuel-cell)) - (or - (= v1-74 (progress-screen money)) - (= v1-74 (progress-screen buzzer)) - ) ) - (respond-progress self) - ) - ((or - (= v1-74 (progress-screen memcard-no-space)) - (= v1-74 (progress-screen memcard-format)) - (= v1-74 (progress-screen memcard-data-exists)) - (= v1-74 (progress-screen memcard-insert)) - (= v1-74 (progress-screen load-game)) - (= v1-74 (progress-screen save-game)) - (= v1-74 (progress-screen save-game-title)) - (= v1-74 (progress-screen memcard-error-loading)) - (= v1-74 (progress-screen memcard-error-saving)) - (= v1-74 (progress-screen memcard-error-formatting)) - (= v1-74 (progress-screen memcard-error-creating)) - (= v1-74 (progress-screen memcard-auto-save-error)) - (= v1-74 (progress-screen memcard-removed)) - (= v1-74 (progress-screen memcard-no-data)) - (= v1-74 (progress-screen memcard-not-inserted)) - (= v1-74 (progress-screen memcard-not-formatted)) - (= v1-74 (progress-screen auto-save)) - (= v1-74 (progress-screen pal-change-to-60hz)) - (= v1-74 (progress-screen pal-now-60hz)) - (= v1-74 (progress-screen no-disc)) - (= v1-74 (progress-screen bad-disc)) - (= v1-74 (progress-screen quit)) - ) - (dummy-31 self) - ) + (suspend) ) - ) - (suspend) + (none) ) - (none) - ) :post (behavior () - (let* ((a1-0 (-> self display-level-index)) - (gp-0 (-> *level-task-data* a1-0)) - ) - #t - (let ((s5-0 #f)) - (case (-> self display-state) - (((progress-screen fuel-cell)) - (set! s5-0 #t) - (draw-fuel-cell-screen self a1-0) - ) - (((progress-screen money)) - (set! s5-0 #t) - (draw-money-screen self a1-0) - ) - (((progress-screen buzzer)) - (set! s5-0 #t) - (draw-buzzer-screen self a1-0) - ) - (((progress-screen game-settings) (progress-screen settings)) - (hide-progress-icons) - (draw-options self 115 30 0.82) - ) - (((progress-screen graphic-settings) - (progress-screen sound-settings) - (progress-screen settings-title) - (progress-screen title) - ) - (hide-progress-icons) - (draw-options self 115 30 0.82) - ) - (((progress-screen memcard-removed) - (progress-screen memcard-auto-save-error) - ) - (draw-notice-screen self) - (draw-options self 192 0 0.82) - ) - (((progress-screen memcard-no-data)) - (draw-notice-screen self) - (draw-options self 165 0 0.82) - ) - (((progress-screen memcard-format)) - (draw-notice-screen self) - (draw-options self 172 0 0.82) - ) - (((progress-screen memcard-no-space) - (progress-screen memcard-not-inserted) - (progress-screen memcard-not-formatted) - ) - (draw-notice-screen self) - (draw-options self 195 0 0.82) - ) - (((progress-screen memcard-error-loading) - (progress-screen memcard-error-saving) - (progress-screen memcard-error-formatting) - (progress-screen memcard-error-creating) - (progress-screen memcard-auto-save-error) - ) - (draw-notice-screen self) - (draw-options self 190 0 0.82) - ) - (((progress-screen pal-change-to-60hz)) - (draw-notice-screen self) - (draw-options self 190 0 0.82) - ) - (((progress-screen pal-now-60hz)) - (when - (< - 3000 - (- - (-> *display* real-frame-counter) - (the-as int (-> self video-mode-timeout)) - ) - ) - (set! (-> *progress-state* video-mode-choice) 'pal) - (set! - (-> *setting-control* default video-mode) - (-> *progress-state* video-mode-choice) - ) - (set! (-> self next-display-state) (progress-screen invalid)) - ) - (draw-notice-screen self) - (draw-options self 140 0 0.82) - ) - (((progress-screen no-disc) (progress-screen bad-disc)) - (draw-notice-screen self) - (if (is-cd-in?) - (draw-options self 170 0 0.82) - ) - ) - (((progress-screen quit)) - (draw-notice-screen self) - (draw-options self 110 0 0.82) - ) - (((progress-screen auto-save)) - (draw-notice-screen self) - (draw-options self 190 0 0.82) - ) - (((progress-screen memcard-insert)) - (draw-notice-screen self) - (draw-options self 165 0 0.82) - ) - (((progress-screen memcard-data-exists)) - (draw-notice-screen self) - (draw-options self 168 0 0.82) - ) - (((progress-screen memcard-loading) - (progress-screen memcard-saving) - (progress-screen memcard-formatting) - (progress-screen memcard-creating) - ) - (draw-notice-screen self) - ) - (((progress-screen load-game) (progress-screen save-game)) - (draw-notice-screen self) - (draw-options self 190 0 0.82) - ) - (((progress-screen save-game-title)) - (draw-notice-screen self) - (draw-options self 169 15 0.6) - ) - ) - (when s5-0 - (let* ((v1-98 (cond - ((-> self stat-transition) - 0 - ) - ((= (-> self level-transition) 1) - (- (-> self transition-offset)) - ) - (else - (-> self transition-offset) - ) - ) - ) - (f30-0 (the-as float (if (-> self stat-transition) - 1.0 - (-> self transition-percentage-invert) - ) - ) - ) - (s5-1 - (new - 'stack - 'font-context - *font-default-matrix* - (- 32 (-> self left-x-offset)) - (the int (* (+ 42.0 (the float (/ v1-98 2))) f30-0)) - 8325000.0 - (font-color lighter-lighter-blue) - (font-flags shadow kerning) - ) - ) + (let* ((a1-0 (-> self display-level-index)) + (gp-0 (-> *level-task-data* a1-0)) + ) + #t + (let ((s5-0 #f)) + (case (-> self display-state) + (((progress-screen fuel-cell)) + (set! s5-0 #t) + (draw-fuel-cell-screen self a1-0) + ) + (((progress-screen money)) + (set! s5-0 #t) + (draw-money-screen self a1-0) + ) + (((progress-screen buzzer)) + (set! s5-0 #t) + (draw-buzzer-screen self a1-0) + ) + (((progress-screen game-settings) (progress-screen settings)) + (hide-progress-icons) + (draw-options self 115 30 0.82) + ) + (((progress-screen graphic-settings) + (progress-screen sound-settings) + (progress-screen settings-title) + (progress-screen title) + ) + (hide-progress-icons) + (draw-options self 115 30 0.82) + ) + (((progress-screen memcard-removed) (progress-screen memcard-auto-save-error)) + (draw-notice-screen self) + (draw-options self 192 0 0.82) + ) + (((progress-screen memcard-no-data)) + (draw-notice-screen self) + (draw-options self 165 0 0.82) + ) + (((progress-screen memcard-format)) + (draw-notice-screen self) + (draw-options self 172 0 0.82) + ) + (((progress-screen memcard-no-space) + (progress-screen memcard-not-inserted) + (progress-screen memcard-not-formatted) + ) + (draw-notice-screen self) + (draw-options self 195 0 0.82) + ) + (((progress-screen memcard-error-loading) + (progress-screen memcard-error-saving) + (progress-screen memcard-error-formatting) + (progress-screen memcard-error-creating) + (progress-screen memcard-auto-save-error) + ) + (draw-notice-screen self) + (draw-options self 190 0 0.82) + ) + (((progress-screen pal-change-to-60hz)) + (draw-notice-screen self) + (draw-options self 190 0 0.82) + ) + (((progress-screen pal-now-60hz)) + (when (< 3000 (- (-> *display* real-frame-counter) (-> self video-mode-timeout))) + (set! (-> *progress-state* video-mode-choice) 'pal) + (set! (-> *setting-control* default video-mode) (-> *progress-state* video-mode-choice)) + (set! (-> self next-display-state) (progress-screen invalid)) ) - (let ((v1-103 s5-1)) - (set! (-> v1-103 width) (the float 328)) - ) - (let ((v1-104 s5-1)) - (set! (-> v1-104 height) (the float 45)) - ) - (set! (-> s5-1 flags) (font-flags shadow kerning middle left large)) - (print-game-text-scaled - (lookup-text! *common-text* (-> gp-0 level-name-id) #f) - f30-0 - s5-1 - (the int (* 128.0 f30-0)) + (draw-notice-screen self) + (draw-options self 140 0 0.82) + ) + (((progress-screen no-disc) (progress-screen bad-disc)) + (draw-notice-screen self) + (if (is-cd-in?) + (draw-options self 170 0 0.82) + ) + ) + (((progress-screen quit)) + (draw-notice-screen self) + (draw-options self 110 0 0.82) + ) + (((progress-screen auto-save)) + (draw-notice-screen self) + (draw-options self 190 0 0.82) + ) + (((progress-screen memcard-insert)) + (draw-notice-screen self) + (draw-options self 165 0 0.82) + ) + (((progress-screen memcard-data-exists)) + (draw-notice-screen self) + (draw-options self 168 0 0.82) + ) + (((progress-screen memcard-loading) + (progress-screen memcard-saving) + (progress-screen memcard-formatting) + (progress-screen memcard-creating) + ) + (draw-notice-screen self) + ) + (((progress-screen load-game) (progress-screen save-game)) + (draw-notice-screen self) + (draw-options self 190 0 0.82) + ) + (((progress-screen save-game-title)) + (draw-notice-screen self) + (draw-options self 169 15 0.6) + ) + ) + (when s5-0 + (let* ((v1-98 (cond + ((-> self stat-transition) + 0 + ) + ((= (-> self level-transition) 1) + (- (-> self transition-offset)) + ) + (else + (-> self transition-offset) + ) + ) + ) + (f30-0 (the-as float (if (-> self stat-transition) + 1.0 + (-> self transition-percentage-invert) + ) + ) + ) + (s5-1 + (new + 'stack + 'font-context + *font-default-matrix* + (- 32 (-> self left-x-offset)) + (the int (* (+ 42.0 (the float (/ v1-98 2))) f30-0)) + 8325000.0 + (font-color lighter-lighter-blue) + (font-flags shadow kerning) + ) + ) + ) + (let ((v1-103 s5-1)) + (set! (-> v1-103 width) (the float 328)) + ) + (let ((v1-104 s5-1)) + (set! (-> v1-104 height) (the float 45)) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning middle left large)) + (print-game-text-scaled + (lookup-text! *common-text* (-> gp-0 level-name-id) #f) + f30-0 + s5-1 + (the int (* 128.0 f30-0)) + ) + ) + ) ) + ) + (case (-> self display-state) + (((progress-screen fuel-cell) (progress-screen money) (progress-screen buzzer)) + (draw-progress self) ) ) - ) + (adjust-sprites self) + (adjust-icons self) + (none) ) - (case (-> self display-state) - (((progress-screen fuel-cell) - (progress-screen money) - (progress-screen buzzer) - ) - (draw-progress self) - ) - ) - (adjust-sprites self) - (adjust-icons self) - (none) - ) ) (defstate progress-coming-in (progress) @@ -3261,95 +2248,77 @@ (-> progress-waiting event) :enter (behavior () - (sound-group-pause (the-as uint 255)) - (logclear! (-> *setting-control* default process-mask) (process-mask pause menu)) - (push-setting! *setting-control* self 'process-mask 'set 0.0 16) - (copy-settings-from-target! *setting-control*) - (sound-play-by-name - (static-sound-name "select-menu") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t + (sound-group-pause (the-as uint 255)) + (logclear! (-> *setting-control* default process-mask) (process-mask pause menu)) + (push-setting! *setting-control* self 'process-mask 'set 0.0 16) + (copy-settings-from-target! *setting-control*) + (sound-play-by-name (static-sound-name "select-menu") (new-sound-id) 1024 0 0 1 #t) + (set-blackout-frames 0) + (set! *pause-lock* #f) + (none) ) - (set-blackout-frames 0) - (set! *pause-lock* #f) - (none) - ) :code (behavior () - (loop - (seekl! (-> self in-out-position) 0 (the int (* 170.0 (-> *display* time-adjust-ratio)))) - (when (< (-> self in-out-position) 2867) - (seekl! (-> self transition-offset) 0 (the int (* (-> self transition-speed) (-> *display* time-adjust-ratio)))) - (set-transition-progress! self (-> self transition-offset)) + (loop + (set! (-> self in-out-position) + (seekl (-> self in-out-position) 0 (the int (* 170.0 (-> *display* time-adjust-ratio)))) + ) + (when (< (-> self in-out-position) 2867) + (set! (-> self transition-offset) (seekl + (-> self transition-offset) + 0 + (the int (* (-> self transition-speed) (-> *display* time-adjust-ratio))) + ) + ) + (set-transition-progress! self (-> self transition-offset)) + ) + (if (zero? (-> self in-out-position)) + (go progress-normal) + ) + (suspend) ) - (if (zero? (-> self in-out-position)) - (go progress-normal) - ) - (suspend) + (none) ) - (none) - ) - :post (-> progress-normal post) + :post + (-> progress-normal post) ) (defstate progress-going-out (progress) :enter (behavior () - (sound-play-by-name - (static-sound-name "menu-close") - (new-sound-id) - 1024 - 0 - 0 - 1 - #t - ) - (hide-progress-icons) - (set! (-> self particles 3 init-pos x) -320.0) - (set! (-> self particles 4 init-pos x) -320.0) - (case (-> self display-state) - (((progress-screen load-game) - (progress-screen save-game) - (progress-screen save-game-title) - ) - (set! (-> self transition-speed) 30.0) - ) - ) - (none) - ) - :code - (behavior () - (while #t - (set! - (-> self transition-offset) - (seekl - (-> self transition-offset) - 512 - (the int (* (-> self transition-speed) (-> *display* time-adjust-ratio))) - ) - ) - (set-transition-progress! self (-> self transition-offset)) - (when (< 153 (-> self transition-offset)) - (set! - (-> self in-out-position) - (seekl - (-> self in-out-position) - 4096 - (the int (* 170.0 (-> *display* time-adjust-ratio))) + (sound-play-by-name (static-sound-name "menu-close") (new-sound-id) 1024 0 0 1 #t) + (hide-progress-icons) + (set! (-> self particles 3 init-pos x) -320.0) + (set! (-> self particles 4 init-pos x) -320.0) + (case (-> self display-state) + (((progress-screen load-game) (progress-screen save-game) (progress-screen save-game-title)) + (set! (-> self transition-speed) 30.0) ) ) - (if (= (-> self in-out-position) 4096) - (go progress-gone) - ) - ) - (suspend) + (none) + ) + :code + (behavior () + (loop + (set! (-> self transition-offset) (seekl + (-> self transition-offset) + 512 + (the int (* (-> self transition-speed) (-> *display* time-adjust-ratio))) + ) + ) + (set-transition-progress! self (-> self transition-offset)) + (when (< 153 (-> self transition-offset)) + (set! (-> self in-out-position) + (seekl (-> self in-out-position) 4096 (the int (* 170.0 (-> *display* time-adjust-ratio)))) + ) + (if (= (-> self in-out-position) 4096) + (go progress-gone) + ) + ) + (suspend) + ) + (none) ) - (none) - ) :post (-> progress-normal post) ) @@ -3357,250 +2326,211 @@ (defstate progress-debug (progress) :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) - (let ((v1-0 arg2)) - (the-as object (if (= v1-0 'go-away) - (go progress-going-out) - ) - ) + (case arg2 + (('go-away) + (go progress-going-out) + ) + ) ) - ) :code (behavior () - (while #t - (cond - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons left)) - (if (> (-> self current-debug-string) 0) - (+! (-> self current-debug-string) -1) - ) + (loop + (cond + ((cpad-pressed? 0 left) + (if (> (-> self current-debug-string) 0) + (+! (-> self current-debug-string) -1) + ) + ) + ((cpad-pressed? 0 right) + (if (< (-> self current-debug-string) (+ (-> *common-text* length) -1)) + (+! (-> self current-debug-string) 1) + ) + ) + ((cpad-pressed? 0 up) + (when (> (-> self current-debug-group) 0) + (+! (-> self current-debug-group) -1) + (set! (-> self current-debug-string) 0) + 0 + ) + ) + ((cpad-pressed? 0 down) + (when (< (-> self current-debug-group) (+ (-> *text-group-names* length) -1)) + (+! (-> self current-debug-group) 1) + (set! (-> self current-debug-string) 0) + 0 + ) + ) + ((cpad-pressed? 0 l1) + (if (> (the-as int (-> *setting-control* default language)) 0) + (+! (-> *setting-control* default language) -1) + ) + ) + ((cpad-pressed? 0 r1) + (if (< (the-as int (-> *setting-control* default language)) 6) + (+! (-> *setting-control* default language) 1) + ) + ) + ((cpad-pressed? 0 l2) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l2)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons l2)) + (go progress-normal) + ) + ) + (load-game-text-info (-> *text-group-names* (-> self current-debug-group)) '*common-text* *common-text-heap*) + (suspend) ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons right)) - (if (< (-> self current-debug-string) (+ (-> *common-text* length) -1)) - (+! (-> self current-debug-string) 1) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) - (when (> (-> self current-debug-group) 0) - (+! (-> self current-debug-group) -1) - (set! (-> self current-debug-string) 0) - 0 - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) - (when - (< (-> self current-debug-group) (+ (-> *text-group-names* length) -1)) - (+! (-> self current-debug-group) 1) - (set! (-> self current-debug-string) 0) - 0 - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons l1)) - (if (> (the-as int (-> *setting-control* default language)) 0) - (+! (-> *setting-control* default language) -1) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons r1)) - (if (< (the-as int (-> *setting-control* default language)) 6) - (+! (-> *setting-control* default language) 1) - ) - ) - ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons l2)) - (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l2)) - (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons l2)) - (go progress-normal) - ) - ) - (load-game-text-info - (-> *text-group-names* (-> self current-debug-group)) - '*common-text* - *common-text-heap* - ) - (suspend) + (none) ) - (none) - ) :post (behavior () - (let* ((s5-0 (-> *display* frames (-> *display* on-screen) frame global-buf)) - (gp-0 (-> s5-0 base)) - ) - (let ((s4-0 draw-string-xy)) - (let ((s3-0 format) - (a0-4 (clear *temp-string*)) - (a1-0 "TEXT DEBUG: LANGUAGE ~S ID 0x~X") - (v1-4 (-> *setting-control* current language)) + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) frame global-buf)) + (gp-0 (-> s5-0 base)) ) - (s3-0 a0-4 a1-0 (cond - ((= v1-4 (language-enum uk-english)) - "uk-english" - ) - ((= v1-4 (language-enum japanese)) - "japanese" - ) - ((= v1-4 (language-enum italian)) - "italian" - ) - ((= v1-4 (language-enum spanish)) - "spanish" - ) - ((= v1-4 (language-enum german)) - "german" - ) - ((= v1-4 (language-enum french)) - "french" - ) - ((= v1-4 (language-enum english)) - "english" - ) - (else - "*unknown*" - ) - ) - (-> *common-text* data (-> self current-debug-string) id) - ) - ) - (s4-0 - *temp-string* - s5-0 - 40 - 40 - (font-color default) - (font-flags shadow kerning) - ) - ) - (let ((a3-4 (-> s5-0 base))) - (let ((v1-7 (the-as dma-packet (-> s5-0 base)))) - (set! (-> v1-7 dma) (new 'static 'dma-tag :id (dma-tag-id next))) - (set! (-> v1-7 vif0) (new 'static 'vif-tag)) - (set! (-> v1-7 vif1) (new 'static 'vif-tag)) - (set! (-> s5-0 base) (&+ (the-as pointer v1-7) 16)) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - gp-0 - (the-as (pointer dma-tag) a3-4) - ) - ) - ) - (let* ((s5-1 (-> *display* frames (-> *display* on-screen) frame global-buf)) - (gp-1 (-> s5-1 base)) + (let ((s4-0 draw-string-xy)) + (let ((s3-0 format) + (a0-4 (clear *temp-string*)) + (a1-0 "TEXT DEBUG: LANGUAGE ~S ID 0x~X") + (v1-4 (-> *setting-control* current language)) + ) + (s3-0 + a0-4 + a1-0 + (cond + ((= v1-4 (language-enum uk-english)) + "uk-english" + ) + ((= v1-4 (language-enum japanese)) + "japanese" + ) + ((= v1-4 (language-enum italian)) + "italian" + ) + ((= v1-4 (language-enum spanish)) + "spanish" + ) + ((= v1-4 (language-enum german)) + "german" + ) + ((= v1-4 (language-enum french)) + "french" + ) + ((= v1-4 (language-enum english)) + "english" + ) + (else + "*unknown*" + ) + ) + (-> *common-text* data (-> self current-debug-string) id) + ) ) - (let ((s4-1 draw-string-xy)) - (format (clear *temp-string*) "USE LEFT/RIGHT TO SELECT STRING") - (s4-1 - *temp-string* - s5-1 - 40 - 155 - (font-color default) - (font-flags shadow kerning) - ) - ) - (let ((a3-6 (-> s5-1 base))) - (let ((v1-16 (the-as dma-packet (-> s5-1 base)))) - (set! (-> v1-16 dma) (new 'static 'dma-tag :id (dma-tag-id next))) - (set! (-> v1-16 vif0) (new 'static 'vif-tag)) - (set! (-> v1-16 vif1) (new 'static 'vif-tag)) - (set! (-> s5-1 base) (the-as pointer (the-as dma-packet (&+ v1-16 16)))) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - gp-1 - (the-as (pointer dma-tag) a3-6) - ) - ) - ) - (let* ((s5-2 (-> *display* frames (-> *display* on-screen) frame global-buf)) - (gp-2 (-> s5-2 base)) + (s4-0 *temp-string* s5-0 40 40 (font-color default) (font-flags shadow kerning)) + ) + (let ((a3-4 (-> s5-0 base))) + (let ((v1-7 (the-as dma-packet (-> s5-0 base)))) + (set! (-> v1-7 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> v1-7 vif0) (new 'static 'vif-tag)) + (set! (-> v1-7 vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-7) 16)) ) - (let ((s4-2 draw-string-xy)) - (format (clear *temp-string*) "USE UP/DOWN TO SELECT GROUP") - (s4-2 - *temp-string* - s5-2 - 40 - 165 - (font-color default) - (font-flags shadow kerning) - ) - ) - (let ((a3-8 (-> s5-2 base))) - (let ((v1-25 (the-as dma-packet (-> s5-2 base)))) - (set! (-> v1-25 dma) (new 'static 'dma-tag :id (dma-tag-id next))) - (set! (-> v1-25 vif0) (new 'static 'vif-tag)) - (set! (-> v1-25 vif1) (new 'static 'vif-tag)) - (set! (-> s5-2 base) (the-as pointer (the-as dma-packet (&+ v1-25 16)))) - ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - gp-2 - (the-as (pointer dma-tag) a3-8) - ) - ) - ) - (let* ((s5-3 (-> *display* frames (-> *display* on-screen) frame global-buf)) - (gp-3 (-> s5-3 base)) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + gp-0 + (the-as (pointer dma-tag) a3-4) ) - (let ((s4-3 draw-string-xy)) - (format (clear *temp-string*) "USE L1/R1 TO SELECT LANGUAGE") - (s4-3 - *temp-string* - s5-3 - 40 - 175 - (font-color default) - (font-flags shadow kerning) + ) ) - ) - (let ((a3-10 (-> s5-3 base))) - (let ((v1-34 (the-as dma-packet (-> s5-3 base)))) - (set! (-> v1-34 dma) (new 'static 'dma-tag :id (dma-tag-id next))) - (set! (-> v1-34 vif0) (new 'static 'vif-tag)) - (set! (-> v1-34 vif1) (new 'static 'vif-tag)) - (set! (-> s5-3 base) (the-as pointer (the-as dma-packet (&+ v1-34 16)))) + (let* ((s5-1 (-> *display* frames (-> *display* on-screen) frame global-buf)) + (gp-1 (-> s5-1 base)) + ) + (let ((s4-1 draw-string-xy)) + (format (clear *temp-string*) "USE LEFT/RIGHT TO SELECT STRING") + (s4-1 *temp-string* s5-1 40 155 (font-color default) (font-flags shadow kerning)) + ) + (let ((a3-6 (-> s5-1 base))) + (let ((v1-16 (the-as dma-packet (-> s5-1 base)))) + (set! (-> v1-16 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> v1-16 vif0) (new 'static 'vif-tag)) + (set! (-> v1-16 vif1) (new 'static 'vif-tag)) + (set! (-> s5-1 base) (the-as pointer (the-as dma-packet (&+ v1-16 16)))) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + gp-1 + (the-as (pointer dma-tag) a3-6) + ) + ) ) - (dma-bucket-insert-tag - (-> *display* frames (-> *display* on-screen) frame bucket-group) - (bucket-id debug-draw0) - gp-3 - (the-as (pointer dma-tag) a3-10) + (let* ((s5-2 (-> *display* frames (-> *display* on-screen) frame global-buf)) + (gp-2 (-> s5-2 base)) + ) + (let ((s4-2 draw-string-xy)) + (format (clear *temp-string*) "USE UP/DOWN TO SELECT GROUP") + (s4-2 *temp-string* s5-2 40 165 (font-color default) (font-flags shadow kerning)) + ) + (let ((a3-8 (-> s5-2 base))) + (let ((v1-25 (the-as dma-packet (-> s5-2 base)))) + (set! (-> v1-25 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> v1-25 vif0) (new 'static 'vif-tag)) + (set! (-> v1-25 vif1) (new 'static 'vif-tag)) + (set! (-> s5-2 base) (the-as pointer (the-as dma-packet (&+ v1-25 16)))) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + gp-2 + (the-as (pointer dma-tag) a3-8) + ) + ) ) - ) + (let* ((s5-3 (-> *display* frames (-> *display* on-screen) frame global-buf)) + (gp-3 (-> s5-3 base)) + ) + (let ((s4-3 draw-string-xy)) + (format (clear *temp-string*) "USE L1/R1 TO SELECT LANGUAGE") + (s4-3 *temp-string* s5-3 40 175 (font-color default) (font-flags shadow kerning)) + ) + (let ((a3-10 (-> s5-3 base))) + (let ((v1-34 (the-as dma-packet (-> s5-3 base)))) + (set! (-> v1-34 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> v1-34 vif0) (new 'static 'vif-tag)) + (set! (-> v1-34 vif1) (new 'static 'vif-tag)) + (set! (-> s5-3 base) (the-as pointer (the-as dma-packet (&+ v1-34 16)))) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + gp-3 + (the-as (pointer dma-tag) a3-10) + ) + ) + ) + (let ((gp-4 (new + 'stack + 'font-context + *font-default-matrix* + 32 + 50 + 0.0 + (font-color default) + (font-flags shadow kerning) + ) + ) + ) + (let ((v1-42 gp-4)) + (set! (-> v1-42 width) (the float 328)) + ) + (let ((v1-43 gp-4)) + (set! (-> v1-43 height) (the float 100)) + ) + (logior! (-> gp-4 flags) (font-flags shadow kerning large)) + (draw-debug-text-box gp-4) + (print-game-text (-> *common-text* data (-> self current-debug-string) text) gp-4 #f 128 22) + ) + (none) ) - (let - ((gp-4 - (new - 'stack - 'font-context - *font-default-matrix* - 32 - 50 - 0.0 - (font-color default) - (font-flags shadow kerning) - ) - ) - ) - (let ((v1-42 gp-4)) - (set! (-> v1-42 width) (the float 328)) - ) - (let ((v1-43 gp-4)) - (set! (-> v1-43 height) (the float 100)) - ) - (logior! (-> gp-4 flags) (font-flags shadow kerning large)) - (draw-debug-text-box gp-4) - (print-game-text - (-> *common-text* data (-> self current-debug-string) text) - gp-4 - #f - 128 - 22 - ) - ) - (none) - ) ) diff --git a/goal_src/goos-lib.gs b/goal_src/goos-lib.gs index 7899f8b8c..7fb447a08 100644 --- a/goal_src/goos-lib.gs +++ b/goal_src/goos-lib.gs @@ -333,9 +333,7 @@ (when (> val max-val) (set! max-val val)) ) - - max-val - ) + max-val) ) diff --git a/scripts/update-goal-src.py b/scripts/update-goal-src.py index 10969ce9e..7d6ed3962 100644 --- a/scripts/update-goal-src.py +++ b/scripts/update-goal-src.py @@ -35,7 +35,9 @@ files_with_modifications = [ "plant-boss", "helix-water", "lavatube-energy", - "sage-finalboss-FIN" + "sage-finalboss-FIN", + "progress", + "entity" ] for file in files: