mirror of
https://github.com/open-goal/jak-project
synced 2026-07-11 15:28:58 -04:00
jak3: wip pc progress code (#3898)
This commit is contained in:
@@ -71,6 +71,11 @@
|
||||
(uk-english 11)
|
||||
)
|
||||
|
||||
(defenum language-enum-s32
|
||||
:type int32
|
||||
:copy-entries language-enum
|
||||
)
|
||||
|
||||
(define-extern *debug-segment* symbol)
|
||||
(define-extern nothing (function none))
|
||||
(define-extern _format (function _varargs_ object))
|
||||
@@ -10036,8 +10041,258 @@
|
||||
(credits-08b6 #x08b6)
|
||||
|
||||
;; PC port IDs START
|
||||
(discord-rpc-not-in-mission #x1200)
|
||||
(discord-rpc-in-side-mission #x1201)
|
||||
(discord-rpc-not-in-mission #x11fe)
|
||||
(discord-rpc-in-side-mission #x11ff)
|
||||
(progress-display-mode #x1200)
|
||||
(progress-windowed #x1201)
|
||||
(progress-fullscreen #x1202)
|
||||
(progress-borderless #x1203)
|
||||
(progress-aspect-ratio-auto #x1204)
|
||||
(progress-aspect-ratio-custom #x1205)
|
||||
(progress-aspect-ratio-4x3 #x1206)
|
||||
(progress-aspect-ratio-16x9 #x1207)
|
||||
(progress-aspect-ratio-custom-title #x1208)
|
||||
(progress-aspect-ratio-custom-pad-x #x1209)
|
||||
(progress-aspect-ratio-custom-pad-circle #x120a)
|
||||
(progress-aspect-ratio-custom-warn #x120b)
|
||||
(progress-music-player #x120c)
|
||||
(progress-vsync #x120d)
|
||||
(progress-text-language #x120e)
|
||||
(progress-cheats #x120f)
|
||||
(progress-aspect-ratio-custom-width #x1210)
|
||||
(progress-aspect-ratio-custom-height #x1211)
|
||||
(progress-music-player-locked #x1212)
|
||||
(progress-music-player-now-playing #x1213)
|
||||
(progress-music-player-no-track #x1214)
|
||||
(progress-music-player-flava-default #x1215)
|
||||
(progress-music-player-flava-gun #x1216)
|
||||
(progress-music-player-flava-board #x1217)
|
||||
(progress-music-player-flava-mech #x1218)
|
||||
(progress-music-player-flava-darkjak #x1219)
|
||||
(progress-music-player-flava-pilot #x121a)
|
||||
(progress-music-player-danger #x121b)
|
||||
(progress-music-player-danger-0 #x121c)
|
||||
(progress-music-player-danger-1 #x121d)
|
||||
(progress-music-player-danger-2 #x121e)
|
||||
(progress-music-player-danger-3 #x121f)
|
||||
(progress-music-player-city #x1220)
|
||||
(progress-music-player-city-battle #x1221)
|
||||
(progress-music-player-battle #x1222)
|
||||
(progress-music-player-danger2 #x1223)
|
||||
(progress-music-player-danger3 #x1224)
|
||||
(progress-music-player-danger4 #x1225)
|
||||
(progress-music-player-danger6 #x1226)
|
||||
(progress-music-player-danger7 #x1227)
|
||||
(progress-music-player-danger9 #x1228)
|
||||
(progress-music-player-danger10 #x1229)
|
||||
(progress-music-player-danger11 #x122a)
|
||||
(progress-music-player-atoll #x122b)
|
||||
(progress-music-player-atoll-battle #x122c)
|
||||
(progress-music-player-strip #x122d)
|
||||
(progress-music-player-forest #x122e)
|
||||
(progress-music-player-forest-battle #x122f)
|
||||
(progress-music-player-sewer #x1230)
|
||||
(progress-music-player-sewer-battle #x1231)
|
||||
(progress-music-player-mountain #x1232)
|
||||
(progress-music-player-mountain-battle #x1233)
|
||||
(progress-music-player-palcab #x1234)
|
||||
(progress-music-player-palcab-battle #x1235)
|
||||
(progress-music-player-race #x1236)
|
||||
(progress-music-player-ruins #x1237)
|
||||
(progress-window-size #x1238)
|
||||
(progress-window-size-decoration #x1239)
|
||||
(progress-game-res #x123a)
|
||||
(progress-game-res-decoration #x123b)
|
||||
(progress-lod-bg #x123c)
|
||||
(progress-lod-fg #x123d)
|
||||
(progress-subtitle-speaker #x123f)
|
||||
(progress-subtitle-speaker-off #x1240)
|
||||
(progress-subtitle-speaker-auto #x1241)
|
||||
(progress-subtitle-speaker-on #x1242)
|
||||
(progress-territory #x1243)
|
||||
(progress-territory-scea #x1244)
|
||||
(progress-territory-scee #x1245)
|
||||
(progress-territory-scei #x1246)
|
||||
(progress-territory-scek #x1247)
|
||||
(progress-msaa #x1248)
|
||||
(progress-msaa-x #x1249)
|
||||
(progress-led-options #x124a)
|
||||
(progress-led-state #x124b)
|
||||
(progress-led-health #x124c)
|
||||
(progress-disable-auto-save #x124d)
|
||||
(progress-auto-save-disabled #x124e)
|
||||
(progress-disable-auto-save-warn #x124f)
|
||||
(progress-cheats-turbo-board #x1250)
|
||||
(progress-cheats-health-bars #x1251)
|
||||
(progress-cheats-vehicle-health-bars #x1252)
|
||||
(progress-cheats-vehicle-invuln #x1253)
|
||||
(progress-cheats-statistics #x1254)
|
||||
(progress-cheats-suck-in-all #x1255)
|
||||
(progress-cheats-music-player #x1256)
|
||||
(progress-cheats-no-textures #x1257)
|
||||
(progress-cheats-fast-movies #x1258)
|
||||
(progress-cheats-slow-movies #x1259)
|
||||
(progress-cheats-fast-speed #x125a)
|
||||
(progress-cheats-slow-speed #x125b)
|
||||
(progress-cheats-fast-travel #x125c)
|
||||
(progress-cheats-orb-tracker #x125d)
|
||||
(progress-cheats-real-time-of-day #x125e)
|
||||
(progress-cheats-city-peace #x125f)
|
||||
(progress-cheats-board-tricks #x1260)
|
||||
(progress-cheats-weather-bad #x1261)
|
||||
(progress-cheats-weather-good #x1262)
|
||||
(progress-cheats-hijack-lines #x1263)
|
||||
(progress-cheats-locked #x1264)
|
||||
(progress-cheats-turbo-board-unlock #x1265)
|
||||
(progress-cheats-health-bars-unlock #x1266)
|
||||
(progress-cheats-vehicle-health-bars-unlock #x1267)
|
||||
(progress-cheats-statistics-unlock #x1268)
|
||||
(progress-cheats-suck-in-all-unlock #x1269)
|
||||
(progress-cheats-fast-travel-unlock #x126a)
|
||||
; (progress-camera-options #x1280)
|
||||
; (progress-camera-options-first-horz #x1281)
|
||||
; (progress-camera-options-first-vert #x1282)
|
||||
; (progress-camera-options-third-horz #x1283)
|
||||
; (progress-camera-options-third-vert #x1284)
|
||||
(progress-normal #x1286)
|
||||
(progress-inverted #x1287)
|
||||
(progress-ps2-parts #x1288)
|
||||
(progress-discord-rpc #x1289)
|
||||
(progress-lod-default #x128a)
|
||||
(progress-lod-low #x128b)
|
||||
(progress-lod-high #x128c)
|
||||
(progress-credits #x128d)
|
||||
(progress-frame-rate #x128e)
|
||||
(progress-misc-game-options #x128f)
|
||||
(progress-speedrunner-mode #x1290)
|
||||
(progress-menu-input-options #x1291)
|
||||
(progress-restore-defaults #x1292)
|
||||
(progress-menu-controller-options #x1293)
|
||||
(progress-controller-options-select-controller #x1294)
|
||||
(progress-controller-options-analog-deadzone #x1295)
|
||||
(progress-controller-options-ignore-if-unfocused #x1296)
|
||||
(progress-controller-options-led-hp #x1297)
|
||||
(progress-controller-options-led-state #x1298)
|
||||
(progress-input-options-enable-keyboard #x1299)
|
||||
(progress-input-options-enable-mouse #x129a)
|
||||
(progress-menu-mouse-options #x129b)
|
||||
(progress-mouse-options-track-camera #x129c)
|
||||
(progress-mouse-options-horz-sens #x129d)
|
||||
(progress-mouse-options-vert-sens #x129e)
|
||||
(progress-mouse-options-player-movement #x129f)
|
||||
(progress-shadows #x12a0)
|
||||
(progress-shadows-normal #x12a1)
|
||||
(progress-shadows-extended #x12a2)
|
||||
(progress-error-no-resolutions #x12a3)
|
||||
(progress-territory-auto #x12a4)
|
||||
(progress-kill-stats #x12a5)
|
||||
(progress-other-stats #x12a6)
|
||||
(progress-ks-total-killed #x12a7)
|
||||
(progress-ks-killed-by-jak #x12a8)
|
||||
(progress-ks-killed-by-darkjak #x12a9)
|
||||
(progress-ks-killed-by-daxter #x12aa)
|
||||
(progress-ks-killed-by-others #x12ab)
|
||||
(progress-ks-source-gun-yellow #x12ac)
|
||||
(progress-ks-source-gun-red #x12ad)
|
||||
(progress-ks-source-gun-blue #x12ae)
|
||||
(progress-ks-source-gun-dark #x12af)
|
||||
(progress-ks-source-board #x12b0)
|
||||
(progress-ks-source-board-trick #x12b1)
|
||||
(progress-ks-source-mech #x12b2)
|
||||
(progress-ks-source-mech-bonk #x12b3)
|
||||
(progress-ks-source-turret #x12b4)
|
||||
(progress-ks-source-punch #x12b5)
|
||||
(progress-ks-source-flop #x12b6)
|
||||
(progress-ks-source-uppercut #x12b7)
|
||||
(progress-ks-source-spin #x12b8)
|
||||
(progress-ks-source-roll #x12b9)
|
||||
(progress-ks-source-darkjak-punch #x12ba)
|
||||
(progress-ks-source-darkjak-flop #x12bb)
|
||||
(progress-ks-source-darkjak-uppercut #x12bc)
|
||||
(progress-ks-source-darkjak-spin #x12bd)
|
||||
(progress-ks-source-darkjak-roll #x12be)
|
||||
(progress-ks-source-darkjak-bomb0 #x12bf)
|
||||
(progress-ks-source-darkjak-bomb1 #x12c0)
|
||||
(progress-ks-source-indax-punch #x12c1)
|
||||
(progress-ks-source-indax-spin #x12c2)
|
||||
(progress-ks-source-guard #x12c3)
|
||||
(progress-ks-source-sig #x12c4)
|
||||
(progress-ks-source-ashelin #x12c5)
|
||||
(progress-ks-source-jinx #x12c6)
|
||||
(progress-ks-source-grim #x12c7)
|
||||
(progress-ks-source-mog #x12c8)
|
||||
(progress-ks-source-metalhead #x12c9)
|
||||
(progress-ks-source-other-bot #x12ca)
|
||||
(progress-ks-source-other-enemy #x12cb)
|
||||
(progress-input-options-auto-hide-cursor #x1300)
|
||||
(progress-menu-reassign-binds #x1301)
|
||||
(progress-reassign-binds-controller #x1302)
|
||||
(progress-reassign-binds-keyboard #x1303)
|
||||
(progress-reassign-binds-mouse #x1304)
|
||||
(progress-multiselect-no-items-found #x1305)
|
||||
(progress-keybinds-waiting-for-bind #x1306)
|
||||
(progress-keybinds-unset #x1307)
|
||||
(progress-unknown-option #x1308)
|
||||
(progress-hires-sky #x1309)
|
||||
(progress-fast-airlock #x130a)
|
||||
(progress-fast-elevator #x130b)
|
||||
(progress-highscores-header-speedrun #x130c)
|
||||
(progress-highscores-subheader-speedrun-any #x130d)
|
||||
(progress-highscores-subheader-speedrun-anyhoverless #x130e)
|
||||
(progress-highscores-subheader-speedrun-allmissions #x130f)
|
||||
(progress-highscores-subheader-speedrun-100 #x1310)
|
||||
(progress-highscores-subheader-speedrun-anyorbs #x1311)
|
||||
(progress-highscores-subheader-speedrun-anyhero #x1312)
|
||||
(progress-highscores-local-time #x1313)
|
||||
(progress-fps-disclaimer-warning #x1314)
|
||||
(progress-fps-disclaimer #x1315)
|
||||
(progress-highscores-local-score #x1316)
|
||||
(trick-board-none #x1320)
|
||||
(trick-board-spin #x1321)
|
||||
(trick-board-boost #x1322)
|
||||
(trick-board-flip #x1323)
|
||||
(trick-board-rail #x1324)
|
||||
(trick-board-rail-jump #x1325)
|
||||
(trick-board-nosegrab #x1326)
|
||||
(trick-board-method #x1327)
|
||||
(trick-board-board-spin #x1328)
|
||||
(trick-board-board-flip #x1329)
|
||||
(trick-board-noseflip #x132a)
|
||||
(trick-board-kickflip #x132b)
|
||||
(trick-board-jump #x132c)
|
||||
(trick-board-duck-jump #x132d)
|
||||
(trick-board-quick-jump #x132e)
|
||||
(trick-darkjak #x132f)
|
||||
(trick-darkjak-bomb0 #x1330)
|
||||
(trick-darkjak-bomb1 #x1331)
|
||||
(trick-darkjak-giant #x1332)
|
||||
(progress-graphics-ps2 #x1333)
|
||||
(progress-graphics-actor-culling #x1334)
|
||||
(progress-graphics-force-envmap #x1335)
|
||||
(progress-fast-progress #x1336)
|
||||
(progress-graphics-ps2-lod-dist #x1337)
|
||||
(progress-graphics-msaa-off #x1338)
|
||||
(progress-graphics-display #x1339)
|
||||
(language-name-finnish #x133a)
|
||||
(progress-hint-subtitles #x133b)
|
||||
(language-name-portuguese #x133c)
|
||||
(language-name-swedish #x133d)
|
||||
(language-name-danish #x133e)
|
||||
(language-name-norwegian #x133f)
|
||||
(language-name-dutch #x1340)
|
||||
(language-name-br-portuguese #x1341)
|
||||
(language-name-hungarian #x1342)
|
||||
(language-name-catalan #x1343)
|
||||
(language-name-icelandic #x1344)
|
||||
(language-name-polish #x1345)
|
||||
(language-name-lithuanian #x1346)
|
||||
(language-name-czech #x1347)
|
||||
(language-name-croatian #x1348)
|
||||
(language-name-galician #x1349)
|
||||
(progress-controller-options-enable-pressure-sensitivity #x134a)
|
||||
(progress-controller-options-swap-r1-r2 #x134b)
|
||||
(progress-controller-options-enable-trigger-effects #x134c)
|
||||
(progress-misc-fix-projectile-focus #x134d)
|
||||
)
|
||||
;; ---text-h:text-id
|
||||
|
||||
@@ -27740,30 +27995,30 @@
|
||||
(state-array symbol 8 :offset-assert 432)
|
||||
(option-index-stack int32 8 :offset-assert 464) ;; guessed by decompiler
|
||||
(state-pos int32 :offset-assert 496)
|
||||
(secret-buying basic :offset-assert 500)
|
||||
(secret-buy-choice basic :offset-assert 504)
|
||||
(secret-buying symbol :offset-assert 500)
|
||||
(secret-buy-choice symbol :offset-assert 504)
|
||||
(scanlines-alpha float :offset-assert 508)
|
||||
(start-time time-frame :offset-assert 512)
|
||||
(which-slot int32 :offset-assert 520)
|
||||
(starting-state basic :offset-assert 524)
|
||||
(yes-no-choice basic :offset-assert 528)
|
||||
(starting-state symbol :offset-assert 524)
|
||||
(yes-no-choice symbol :offset-assert 528)
|
||||
(time-out time-frame :offset-assert 536)
|
||||
(last-sound time-frame :offset-assert 544)
|
||||
(last-move time-frame :offset-assert 552)
|
||||
(center-x-backup int32 :offset-assert 560)
|
||||
(center-y-backup int32 :offset-assert 564)
|
||||
(flip-horizontal basic :offset-assert 568)
|
||||
(flip-vertical basic :offset-assert 572)
|
||||
(progressive-scan basic :offset-assert 576)
|
||||
(aspect-ratio basic :offset-assert 580)
|
||||
(video-mode basic :offset-assert 584)
|
||||
(flip-horizontal symbol :offset-assert 568)
|
||||
(flip-vertical symbol :offset-assert 572)
|
||||
(progressive-scan symbol :offset-assert 576)
|
||||
(aspect-ratio symbol :offset-assert 580)
|
||||
(video-mode symbol :offset-assert 584)
|
||||
(stereo-mode-backup int32 :offset-assert 588)
|
||||
(vibrations basic :offset-assert 592)
|
||||
(subtitles basic :offset-assert 596)
|
||||
(languages int32 3 :offset-assert 600)
|
||||
(subtitle-language-index int32 :offset 600)
|
||||
(language-index int32 :offset 604)
|
||||
(audio-language-index int32 :offset 608)
|
||||
(vibrations symbol :offset-assert 592)
|
||||
(subtitles symbol :offset-assert 596)
|
||||
(languages language-enum-s32 3 :offset-assert 600)
|
||||
(subtitle-language-index language-enum-s32 :offset 600)
|
||||
(language-index language-enum-s32 :offset 604)
|
||||
(audio-language-index language-enum-s32 :offset 608)
|
||||
(current-task-index int32 :offset-assert 612)
|
||||
(current-line-index int32 :offset-assert 616)
|
||||
(first-closed-line-index int32 :offset-assert 620)
|
||||
@@ -27789,7 +28044,7 @@
|
||||
)
|
||||
(:methods
|
||||
(init-defaults (_type_) object) ;; 24
|
||||
(respond-to-cpad (_type_) none) ;; 25
|
||||
(respond-to-cpad (_type_) object) ;; 25
|
||||
(gone? (_type_) object) ;; 26
|
||||
(can-go-back? (_type_) symbol) ;; 27
|
||||
(get-state-check-card (_type_ symbol) symbol) ;; 28
|
||||
@@ -27797,27 +28052,27 @@
|
||||
(pop-state (_type_) int) ;; 30
|
||||
(set-next-state (_type_ symbol int) int) ;; 31
|
||||
(set-menu-options (_type_ symbol) int) ;; 32
|
||||
(progress-method-33 (_type_ progress-box) none) ;; 33
|
||||
(progress-method-34 (_type_) none) ;; 34
|
||||
(progress-method-33 (_type_ progress-box) object) ;; 33
|
||||
(progress-method-34 (_type_) object) ;; 34
|
||||
(get-scissor-stack-top (_type_) vector) ;; 35
|
||||
(get-language-by-idx (_type_ int) int) ;; 36
|
||||
(progress-method-37 (_type_) none) ;; 37
|
||||
(progress-method-38 (_type_ font-context float) none) ;; 38
|
||||
(progress-method-39 (_type_) none) ;; 39
|
||||
(progress-method-40 (_type_ font-context int int float) none) ;; 40
|
||||
(progress-method-41 (_type_ progress-box float) none) ;; 41
|
||||
(progress-method-42 (_type_ progress-box float) none) ;; 42
|
||||
(progress-method-43 (_type_ progress-box float) none) ;; 43
|
||||
(progress-method-44 (_type_ font-context string) none) ;; 44
|
||||
(set-selected-color (_type_) object) ;; 37
|
||||
(adjust-font-origin-y (_type_ font-context float) object) ;; 38
|
||||
(progress-method-39 (_type_) object) ;; 39
|
||||
(draw-highlight-bar (_type_ font-context int int float) object) ;; 40
|
||||
(draw-bg-box-outline (_type_ progress-box float) object) ;; 41
|
||||
(draw-bg-box-alpha-2 (_type_ progress-box float) object) ;; 42
|
||||
(draw-bg-box-alpha-1 (_type_ progress-box float) object) ;; 43
|
||||
(progress-method-44 (_type_ font-context string) object) ;; 44
|
||||
(progress-method-45 (_type_ font-context float float string float float int) float) ;; 45
|
||||
(progress-method-46 (_type_ font-context float int) none) ;; 46
|
||||
(progress-method-47 (_type_ font-context symbol symbol) none) ;; 47
|
||||
(draw-prev-next-footer (_type_ font-context float) none) ;; 48
|
||||
(draw-yes-no-style-footer (_type_ font-context text-id text-id) none) ;; 49
|
||||
(progress-method-50 (_type_ font-context text-id text-id text-id symbol symbol float) none) ;; 50
|
||||
(progress-method-51 (_type_ font-context) none) ;; 51
|
||||
(progress-method-52 (_type_ font-context string float float float float float) none) ;; 52
|
||||
(progress-method-53 (_type_ font-context) none) ;; 53
|
||||
(draw-header (_type_ font-context float text-id) object) ;; 46
|
||||
(progress-method-47 (_type_ font-context symbol symbol) object) ;; 47
|
||||
(draw-prev-next-footer (_type_ font-context float) object) ;; 48
|
||||
(draw-yes-no-style-footer (_type_ font-context text-id text-id) object) ;; 49
|
||||
(progress-method-50 (_type_ font-context text-id text-id text-id symbol symbol float) object) ;; 50
|
||||
(progress-method-51 (_type_ font-context) object) ;; 51
|
||||
(draw-slider-option (_type_ font-context string float float float float float) object) ;; 52
|
||||
(progress-method-53 (_type_ font-context) object) ;; 53
|
||||
)
|
||||
)
|
||||
|
||||
@@ -27844,7 +28099,7 @@
|
||||
(load-save-3b progress-box :inline :offset-assert 1216)
|
||||
(last-slot-saved int32 :offset-assert 1280)
|
||||
(selected-num int32 :offset-assert 1284)
|
||||
(secrets-unlocked basic :offset-assert 1288)
|
||||
(secrets-unlocked symbol :offset-assert 1288)
|
||||
(hero-mode-save symbol :offset-assert 1292)
|
||||
)
|
||||
:method-count-assert 9
|
||||
@@ -28170,7 +28425,7 @@
|
||||
((current-index float :offset-assert 64)
|
||||
(target-index float :offset-assert 68)
|
||||
(scroll-speed float :offset-assert 72)
|
||||
(on-screen basic :offset-assert 76)
|
||||
(on-screen symbol :offset-assert 76)
|
||||
)
|
||||
:method-count-assert 12
|
||||
:size-assert #x50
|
||||
@@ -34702,7 +34957,7 @@
|
||||
(deftype level-exit (process-drawable)
|
||||
((minimap connection-minimap :offset-assert 200)
|
||||
(task-counter uint32 :offset-assert 204)
|
||||
(ent basic :offset-assert 208)
|
||||
(ent entity-actor :offset-assert 208)
|
||||
)
|
||||
:method-count-assert 21
|
||||
:size-assert #xd4
|
||||
@@ -35904,7 +36159,7 @@
|
||||
(stick-lock symbol :offset-assert 80)
|
||||
(flap-sound-id uint32 :offset-assert 84)
|
||||
(mode-sound-bank connection :offset-assert 88)
|
||||
(mode basic :offset-assert 92)
|
||||
(mode symbol :offset-assert 92)
|
||||
(color-index int32 :offset-assert 96)
|
||||
(as-daxter? symbol :offset-assert 100)
|
||||
(art-group-backup art-group :offset-assert 104)
|
||||
@@ -36063,8 +36318,8 @@
|
||||
(fall-height meters :offset-assert 648)
|
||||
(mech-jump-thrust-fuel float :offset-assert 652)
|
||||
(strafe-jump-pre-window time-frame :offset-assert 656)
|
||||
(strafe-jump basic :offset-assert 664)
|
||||
(strafe-duck-jump basic :offset-assert 668)
|
||||
(strafe-jump symbol :offset-assert 664)
|
||||
(strafe-duck-jump symbol :offset-assert 668)
|
||||
(dark-jump-height-min meters :offset-assert 672)
|
||||
(dark-jump-height-max meters :offset-assert 676)
|
||||
(ladder-walk-up-speed meters :offset-assert 680)
|
||||
@@ -37748,8 +38003,8 @@
|
||||
(mech-start-time time-frame :offset-assert 96) ;; time-frame
|
||||
(mech-time time-frame :offset-assert 104) ;; time-frame
|
||||
(no-get-off-time time-frame :offset-assert 112) ;; time-frame
|
||||
(stick-lock basic :offset-assert 120)
|
||||
(stick-off basic :offset-assert 124)
|
||||
(stick-lock symbol :offset-assert 120)
|
||||
(stick-off symbol :offset-assert 124)
|
||||
(forward-vel meters :offset-assert 128)
|
||||
(jump-thrust meters :offset-assert 132)
|
||||
(jump-thrust-fuel float :offset-assert 136)
|
||||
@@ -37772,8 +38027,8 @@
|
||||
(exhaust-local-dir vector 2 :inline :offset-assert 400) ;; guessed by decompiler
|
||||
(smoke-local-pos vector 2 :inline :offset-assert 432) ;; guessed by decompiler
|
||||
(smoke-local-vel vector 2 :inline :offset-assert 464) ;; guessed by decompiler
|
||||
(particle-system-2d basic :offset-assert 496)
|
||||
(particle-system-3d basic :offset-assert 500)
|
||||
(particle-system-2d sparticle-system :offset-assert 496)
|
||||
(particle-system-3d sparticle-system :offset-assert 500)
|
||||
(part-thruster sparticle-launcher :offset-assert 504)
|
||||
(part-thruster-scale-x sp-field-init-spec :offset-assert 508)
|
||||
(part-thruster-scale-y sp-field-init-spec :offset-assert 512)
|
||||
@@ -38692,7 +38947,7 @@
|
||||
)
|
||||
|
||||
(deftype ammo-collectable (collectable)
|
||||
((ammo-effect basic :offset-assert 404)
|
||||
((ammo-effect sparticle-launch-group :offset-assert 404)
|
||||
)
|
||||
:method-count-assert 36
|
||||
:size-assert #x198
|
||||
@@ -54941,8 +55196,8 @@
|
||||
)
|
||||
|
||||
(deftype prebot-medium-eco-creature (prebot-large-eco-creature)
|
||||
((is-top basic :offset-assert 776)
|
||||
(is-bottom basic :offset-assert 780)
|
||||
((is-top symbol :offset-assert 776)
|
||||
(is-bottom symbol :offset-assert 780)
|
||||
(initial-scale float :offset-assert 784)
|
||||
(final-scale float :offset-assert 788)
|
||||
)
|
||||
|
||||
@@ -269,7 +269,11 @@
|
||||
"~140Hfg-sh: ~8,,0m": 1,
|
||||
"~267Hfg-p2: ~8,,0m~%": 1,
|
||||
"~30Hp2: ~8D~131Hhf: ~8D~%~1K": 2,
|
||||
"Current time (~d:~d) [mission-percentage ~f~%": 2
|
||||
"Current time (~d:~d) [mission-percentage ~f~%": 2,
|
||||
"~33L~S ~44L~S": 2,
|
||||
"~44L~S~33L ~S": 2,
|
||||
"~32L~S~44L ~S": 2,
|
||||
"~44L~S ~32L~S~1L": 2
|
||||
},
|
||||
|
||||
"blocks_ending_in_asm_branch": {
|
||||
@@ -472,7 +476,7 @@
|
||||
// where "op" is the op number for the call to format.
|
||||
"dynamic_format_arg_counts": {
|
||||
"auto-save-post": [[182, 1]],
|
||||
"(method 10 menu-secret-option)": [[289, 1]],
|
||||
"(method 10 menu-secret-option)": [[289, 0]],
|
||||
"(method 10 menu-create-game-option)": [[49, 1]],
|
||||
"(method 10 menu-format-card-option)": [[49, 1]],
|
||||
"(method 10 menu-card-removed-option)": [[49, 1]],
|
||||
|
||||
@@ -1,4 +1,248 @@
|
||||
{
|
||||
"1200": "Not in a mission",
|
||||
"1201": "Playing a bonus mission"
|
||||
"11fe": "Not in a mission",
|
||||
"11ff": "Playing a bonus mission",
|
||||
"1200": "Display Mode",
|
||||
"1201": "Windowed",
|
||||
"1202": "Fullscreen",
|
||||
"1203": "Borderless",
|
||||
"1204": "Automatic",
|
||||
"1205": "Custom",
|
||||
"1206": "4x3 (PS2)",
|
||||
"1207": "16x9 (PS2)",
|
||||
"1208": "Choose width and height ratio",
|
||||
"1209": "Press <PAD_X> to confirm and exit.",
|
||||
"120a": "Press <PAD_CIRCLE> to confirm and exit.",
|
||||
"120b": "Ratio must not be lower than 4x3!",
|
||||
"120c": "Music Player",
|
||||
"120d": "V-Sync",
|
||||
"120e": "Text Language",
|
||||
"120f": "OpenGOAL Secrets",
|
||||
"1210": "Width",
|
||||
"1211": "Height",
|
||||
"1212": "??????????",
|
||||
"1213": "Now playing...",
|
||||
"1214": "No Track",
|
||||
"1215": "Default",
|
||||
"1216": "Morph Gun",
|
||||
"1217": "JET-Board",
|
||||
"1218": "Titan Suit",
|
||||
"1219": "Dark Jak",
|
||||
"121a": "Vehicle",
|
||||
"121b": "Danger",
|
||||
"121c": "None",
|
||||
"121d": "Low",
|
||||
"121e": "Medium",
|
||||
"121f": "High",
|
||||
"1220": "Haven Exploration",
|
||||
"1221": "Guard Pursuit",
|
||||
"1222": "Ram Head Battle (Alt)",
|
||||
"1223": "Mar's Tomb",
|
||||
"1224": "Onin Challenge",
|
||||
"1225": "Metal Kor",
|
||||
"1226": "Krew Battle",
|
||||
"1227": "Baron Battle",
|
||||
"1228": "Bouncing Boulders",
|
||||
"1229": "Exploding Eco",
|
||||
"122a": "Fortress Tank",
|
||||
"122b": "Pumping Station",
|
||||
"122c": "Protect Sig",
|
||||
"122d": "Strip Mine",
|
||||
"122e": "Haven Forest",
|
||||
"122f": "Forest Dragons",
|
||||
"1230": "The Fortress",
|
||||
"1231": "Escape",
|
||||
"1232": "Mountain Temple",
|
||||
"1233": "Ram Head Battle",
|
||||
"1234": "Praxis Palace",
|
||||
"1235": "Weapons Factory",
|
||||
"1236": "Arena Race",
|
||||
"1237": "Dead Town",
|
||||
"1238": "Window Size",
|
||||
"1239": "Select Window Size",
|
||||
"123a": "Game Resolution",
|
||||
"123b": "Select Game Resolution",
|
||||
"123c": "Level of Detail (Background)",
|
||||
"123d": "Level of Detail (Foreground)",
|
||||
"123f": "Show Speaker in Subtitle",
|
||||
"1240": "Never",
|
||||
"1241": "Off-Screen",
|
||||
"1242": "Always",
|
||||
"1243": "Game Territory",
|
||||
"1244": "America (SCEA)",
|
||||
"1245": "Europe (SCEE)",
|
||||
"1246": "Japan (SCEI)",
|
||||
"1247": "Korea (SCEK)",
|
||||
"1248": "MSAA",
|
||||
"1249": "~Dx",
|
||||
"124a": "Controller LED Options",
|
||||
"124b": "Show Player State",
|
||||
"124c": "Show Amount of Health",
|
||||
"124d": "Disable Auto-Save",
|
||||
"124e": "Auto-Save Disabled",
|
||||
"124f": "Are you sure you want to disable auto-save?",
|
||||
"1250": "Turbo JET-Board in Haven City",
|
||||
"1251": "Enemy Health Bars",
|
||||
"1252": "Vehicle Health Bars",
|
||||
"1253": "Vehicle Invulnerability",
|
||||
"1254": "Statistics",
|
||||
"1255": "Automatically Grab Collectables",
|
||||
"1256": "Music Player",
|
||||
"1257": "No Textures Mode",
|
||||
"1258": "Fast Movies",
|
||||
"1259": "Slow Movies",
|
||||
"125a": "Fast Gameplay",
|
||||
"125b": "Slow Gameplay",
|
||||
"125c": "Instant Travel in Haven City",
|
||||
"125d": "Precursor Orb Tracker",
|
||||
"125e": "Real Time of Day",
|
||||
"125f": "Pacified Haven City",
|
||||
"1260": "JET-Board Trick Display",
|
||||
"1261": "Bad Weather",
|
||||
"1262": "Nice Weather",
|
||||
"1263": "Vehicle Hijack Voice Lines",
|
||||
"1264": "Locked",
|
||||
"1265": "Hit all 3 valves and find Mar's Statue in \"~S\" in under ~D seconds",
|
||||
"1266": "Reduce Haven City's population count by ~D",
|
||||
"1267": "Reduce Haven City's vehicle count by ~D",
|
||||
"1268": "Hunt every species of Metal Head",
|
||||
"1269": "Use the JET-Board to break open containers",
|
||||
"126a": "Transport the Rift Rider while leaving Samos and Young Samos unscathed",
|
||||
"1280": "Camera Options",
|
||||
"1281": "Left/Right (1st Person)",
|
||||
"1282": "Up/Down (1st Person)",
|
||||
"1283": "Left/Right (3rd Person)",
|
||||
"1284": "Up/Down (3rd Person)",
|
||||
"1285": "Reset to Default",
|
||||
"1286": "Normal",
|
||||
"1287": "Inverted",
|
||||
"1288": "Particle Culling",
|
||||
"1289": "Discord Rich-Presence",
|
||||
"128a": "Default",
|
||||
"128b": "Low",
|
||||
"128c": "High",
|
||||
"128d": "Credits",
|
||||
"128e": "Frame Rate",
|
||||
"128f": "Miscellaneous",
|
||||
"1290": "Speedrunner Mode",
|
||||
"1291": "Input Options",
|
||||
"1292": "Restore Defaults",
|
||||
"1293": "Controller Options",
|
||||
"1294": "Select Controller",
|
||||
"1295": "Analog Deadzone",
|
||||
"1296": "Ignore When Window is Unfocused",
|
||||
"1297": "Use LED for Health",
|
||||
"1298": "Use LED for Other States",
|
||||
"1299": "Enable Keyboard",
|
||||
"129a": "Enable Mouse",
|
||||
"129b": "Mouse Options",
|
||||
"129c": "Track Camera",
|
||||
"129d": "Horizontal Sensitivity",
|
||||
"129e": "Vertical Sensitivity",
|
||||
"129f": "Player Movement",
|
||||
"12a0": "Object Shadows",
|
||||
"12a1": "Normal",
|
||||
"12a2": "Extended",
|
||||
"12a3": "No valid resolutions found.",
|
||||
"12a4": "Automatic",
|
||||
"12a5": "Bestiary",
|
||||
"12a6": "Other Statistics",
|
||||
"12a7": "Total Killed",
|
||||
"12a8": "Killed by Jak",
|
||||
"12a9": "Killed by Dark Jak",
|
||||
"12aa": "Killed by Daxter",
|
||||
"12ab": "Killed by Others",
|
||||
"12ac": "Blaster",
|
||||
"12ad": "Scatter Gun",
|
||||
"12ae": "Vulcan Fury",
|
||||
"12af": "Peacemaker",
|
||||
"12b0": "JET-Board",
|
||||
"12b1": "JET-Board Trick",
|
||||
"12b2": "Titan Suit Punch",
|
||||
"12b3": "Titan Suit Body",
|
||||
"12b4": "Gunpod",
|
||||
"12b5": "Punch",
|
||||
"12b6": "Flop",
|
||||
"12b7": "Uppercut",
|
||||
"12b8": "Spin",
|
||||
"12b9": "Roll",
|
||||
"12bf": "Dark Bomb",
|
||||
"12c0": "Dark Blast",
|
||||
"12c3": "Krimzon Guard",
|
||||
"12c4": "Sig",
|
||||
"12c5": "Ashelin",
|
||||
"12c6": "Jinx",
|
||||
"12c7": "Grim",
|
||||
"12c8": "Mog",
|
||||
"12c9": "Metal Heads",
|
||||
"12ca": "Other Friends",
|
||||
"12cb": "Other Enemies",
|
||||
"1300": "Auto Hide Cursor",
|
||||
"1301": "Reassign Binds",
|
||||
"1302": "Controller Binds",
|
||||
"1303": "Keyboard Binds",
|
||||
"1304": "Mouse Binds",
|
||||
"1305": "No Options",
|
||||
"1306": "Waiting",
|
||||
"1307": "Unset",
|
||||
"1308": "Unknown",
|
||||
"1309": "High-Resolution Sky",
|
||||
"130a": "Fast Airlocks and Doors",
|
||||
"130b": "Fast Elevators",
|
||||
"130c": "Speedrun",
|
||||
"130d": "Any%",
|
||||
"130e": "Any% - Hoverless",
|
||||
"130f": "All Missions",
|
||||
"1310": "100%",
|
||||
"1311": "Any% - All Orbs",
|
||||
"1312": "Any% - Hero Mode",
|
||||
"1313": "Local Time",
|
||||
"1314": "Warning!",
|
||||
"1315": "This setting is highly experimental. When not played at 60 frames per second, visual and gameplay issues may arise as a result.",
|
||||
"1316": "Local Score",
|
||||
"1320": "None",
|
||||
"1321": "Spin",
|
||||
"1322": "Boost",
|
||||
"1323": "Flip",
|
||||
"1324": "Rail Grind",
|
||||
"1325": "Rail Jump",
|
||||
"1326": "Nosegrab",
|
||||
"1327": "Method",
|
||||
"1328": "Board Spin",
|
||||
"1329": "Board Flip",
|
||||
"132a": "Noseflip",
|
||||
"132b": "Kickflip",
|
||||
"132c": "Jump",
|
||||
"132d": "Duck Jump",
|
||||
"132e": "Quick Jump",
|
||||
"132f": "Dark Jak",
|
||||
"1330": "Dark Bomb",
|
||||
"1331": "Dark Blast",
|
||||
"1332": "Dark Giant",
|
||||
"1333": "PS2 Options",
|
||||
"1334": "Actor Culling",
|
||||
"1335": "Force Environment Mapping",
|
||||
"1336": "Fast Progress Menu",
|
||||
"1337": "PS2 LOD Distance",
|
||||
"1338": "Off",
|
||||
"1339": "Display",
|
||||
"133a": "<FLAG_FINLAND> Suomi",
|
||||
"133b": "Hint Subtitles",
|
||||
"133c": "Português",
|
||||
"133d": "Svenska ",
|
||||
"133e": "Dansk",
|
||||
"133f": "Norsk",
|
||||
"1340": "Nederlands",
|
||||
"1341": "Português (Brasil)",
|
||||
"1342": "Magyar",
|
||||
"1343": "Català",
|
||||
"1344": "Íslenska ",
|
||||
"1345": "Polski",
|
||||
"1346": "Lietuvių Kalba",
|
||||
"1347": "Čeština",
|
||||
"1348": "Hrvatski",
|
||||
"1349": "Galego",
|
||||
"134a": "Pressure Sensitivity",
|
||||
"134b": "Swap R1 and R2",
|
||||
"134c": "Trigger Effects",
|
||||
"134d": "Fix Projectile Focus"
|
||||
}
|
||||
|
||||
@@ -149,6 +149,9 @@ void OpenGLRenderer::init_bucket_renderers_jak3() {
|
||||
|
||||
init_bucket_renderer<OceanMidAndFar>("ocean-mid-far", BucketCategory::OCEAN,
|
||||
BucketId::OCEAN_MID_FAR);
|
||||
// 7 (hack for progress menu box)
|
||||
init_bucket_renderer<DirectRenderer>("progress-hack", BucketCategory::OTHER,
|
||||
BucketId::PROGRESS_HACK, 0x8000);
|
||||
|
||||
// 8 (in tfrag category for now, just for stat reporting.)
|
||||
init_bucket_renderer<Hfrag>("hfrag", BucketCategory::TFRAG, BucketId::HFRAG);
|
||||
|
||||
@@ -419,9 +419,8 @@ enum class BucketId {
|
||||
TEX_LCOM_SKY_PRE = 4,
|
||||
SKY = 5,
|
||||
OCEAN_MID_FAR = 6,
|
||||
|
||||
PROGRESS_HACK = 7,
|
||||
HFRAG = 8,
|
||||
|
||||
TEX_L0_TFRAG = 10,
|
||||
TFRAG_L0_TFRAG = 11,
|
||||
TIE_L0_TFRAG = 12,
|
||||
|
||||
@@ -377,22 +377,24 @@ void InitMachine_PCPort() {
|
||||
make_function_symbol_from_c("alloc-vagdir-names", (void*)kmachine_extras::alloc_vagdir_names);
|
||||
|
||||
// external RPCs
|
||||
/*
|
||||
make_function_symbol_from_c("pc-fetch-external-speedrun-times",
|
||||
(void*)pc_fetch_external_speedrun_times);
|
||||
make_function_symbol_from_c("pc-fetch-external-race-times", (void*)pc_fetch_external_race_times);
|
||||
make_function_symbol_from_c("pc-fetch-external-highscores", (void*)pc_fetch_external_highscores);
|
||||
(void*)kmachine_extras::pc_fetch_external_speedrun_times);
|
||||
make_function_symbol_from_c("pc-fetch-external-race-times",
|
||||
(void*)kmachine_extras::pc_fetch_external_race_times);
|
||||
make_function_symbol_from_c("pc-fetch-external-highscores",
|
||||
(void*)kmachine_extras::pc_fetch_external_highscores);
|
||||
make_function_symbol_from_c("pc-get-external-speedrun-time",
|
||||
(void*)pc_get_external_speedrun_time);
|
||||
make_function_symbol_from_c("pc-get-external-race-time", (void*)pc_get_external_race_time);
|
||||
make_function_symbol_from_c("pc-get-external-highscore", (void*)pc_get_external_highscore);
|
||||
(void*)kmachine_extras::pc_get_external_speedrun_time);
|
||||
make_function_symbol_from_c("pc-get-external-race-time",
|
||||
(void*)kmachine_extras::pc_get_external_race_time);
|
||||
make_function_symbol_from_c("pc-get-external-highscore",
|
||||
(void*)kmachine_extras::pc_get_external_highscore);
|
||||
make_function_symbol_from_c("pc-get-num-external-speedrun-times",
|
||||
(void*)pc_get_num_external_speedrun_times);
|
||||
(void*)kmachine_extras::pc_get_num_external_speedrun_times);
|
||||
make_function_symbol_from_c("pc-get-num-external-race-times",
|
||||
(void*)pc_get_num_external_race_times);
|
||||
(void*)kmachine_extras::pc_get_num_external_race_times);
|
||||
make_function_symbol_from_c("pc-get-num-external-highscores",
|
||||
(void*)pc_get_num_external_highscores);
|
||||
*/
|
||||
(void*)kmachine_extras::pc_get_num_external_highscores);
|
||||
|
||||
// speedrunning stuff
|
||||
make_function_symbol_from_c("pc-sr-mode-get-practice-entries-amount",
|
||||
|
||||
@@ -662,6 +662,10 @@
|
||||
`(set! ,val (max ,val ,maxval)))
|
||||
(defmacro min! (val minval)
|
||||
`(set! ,val (min ,val ,minval)))
|
||||
(defmacro fmax! (val maxval)
|
||||
`(set! ,val (fmax ,val ,maxval)))
|
||||
(defmacro fmin! (val minval)
|
||||
`(set! ,val (fmin ,val ,minval)))
|
||||
|
||||
(defmacro minmax (val minval maxval)
|
||||
`(max (min ,val ,maxval) ,minval)
|
||||
|
||||
@@ -244,31 +244,31 @@
|
||||
(((game-save-elt hint-list))
|
||||
(dotimes (i (-> tag elt-count))
|
||||
(awhen (text-id->string (-> *game-info* hint-control i id))
|
||||
(format #t " ~-32S [~D]~%" it i)
|
||||
(format #t
|
||||
" ~-32S: ~D~%"
|
||||
"start-time"
|
||||
(-> (the-as (pointer uint64) (&+ (&+ (the-as pointer tag) 16) (* i (-> tag elt-size)))) 0))
|
||||
(format #t
|
||||
" ~-32S: ~D~%"
|
||||
"last-time-called"
|
||||
(-> (the-as (pointer uint64) (&+ (&+ (the-as pointer tag) 16) (* i (-> tag elt-size)))) 1))
|
||||
(format #t
|
||||
" ~-32S: ~D~%"
|
||||
"num-attempts"
|
||||
(-> (the-as (pointer uint8) (&+ (&+ (the-as pointer tag) 16) (* i (-> tag elt-size)))) 16))
|
||||
(format #t
|
||||
" ~-32S: ~D~%"
|
||||
"num-success"
|
||||
(-> (the-as (pointer uint8) (&+ (&+ (the-as pointer tag) 16) (* i (-> tag elt-size)))) 17)))))
|
||||
(format #t " ~-32S [~D]~%" it i)
|
||||
(format #t
|
||||
" ~-32S: ~D~%"
|
||||
"start-time"
|
||||
(-> (the-as (pointer uint64) (&+ (&+ (the-as pointer tag) 16) (* i (-> tag elt-size)))) 0))
|
||||
(format #t
|
||||
" ~-32S: ~D~%"
|
||||
"last-time-called"
|
||||
(-> (the-as (pointer uint64) (&+ (&+ (the-as pointer tag) 16) (* i (-> tag elt-size)))) 1))
|
||||
(format #t
|
||||
" ~-32S: ~D~%"
|
||||
"num-attempts"
|
||||
(-> (the-as (pointer uint8) (&+ (&+ (the-as pointer tag) 16) (* i (-> tag elt-size)))) 16))
|
||||
(format #t
|
||||
" ~-32S: ~D~%"
|
||||
"num-success"
|
||||
(-> (the-as (pointer uint8) (&+ (&+ (the-as pointer tag) 16) (* i (-> tag elt-size)))) 17)))))
|
||||
(((game-save-elt text-list))
|
||||
(dotimes (i (* 8 (-> tag elt-count)))
|
||||
(awhen (text-id->string (the text-id i))
|
||||
(unless (string= it "*unknown*")
|
||||
(format #t
|
||||
" ~-32S: ~A~%"
|
||||
it
|
||||
(logtest? (-> (the-as (pointer uint8) (&+ (the-as pointer tag) 16)) (/ i 8)) (ash 1 (mod i 8))))))))
|
||||
(unless (string= it "*unknown*")
|
||||
(format #t
|
||||
" ~-32S: ~A~%"
|
||||
it
|
||||
(logtest? (-> (the-as (pointer uint8) (&+ (the-as pointer tag) 16)) (/ i 8)) (ash 1 (mod i 8))))))))
|
||||
(((game-save-elt task-list) (game-save-elt perm-list))
|
||||
(dotimes (i (-> tag elt-count))
|
||||
(let ((perm (the-as entity-perm (&+ (the-as pointer tag) 16 (* i 16)))))
|
||||
@@ -603,7 +603,7 @@
|
||||
(set! (-> *setting-control* default language) (the-as language-enum (-> save-data user-uint64))))
|
||||
;; ((= a0-1 (game-save-elt vibration)) (set! (-> *setting-control* default vibration) (= (-> save-data user-uint64) 1)))
|
||||
;; ((= a0-1 (game-save-elt play-hints)) (set! (-> *setting-control* default play-hints) (= (-> save-data user-uint64) 1)))
|
||||
(else (format 0 "PC PORT: Skipping setting from game save, its stored in the pc-settings now"))))
|
||||
(else (format 0 "PC PORT: Skipping setting from game save, its stored in the pc-settings now~%"))))
|
||||
(set! save-data
|
||||
(the-as game-save-tag
|
||||
(&+ (the-as pointer save-data) (logand -16 (+ (* (the-as int (-> save-data elt-size)) (-> save-data elt-count)) 31)))))))
|
||||
|
||||
@@ -1164,7 +1164,7 @@
|
||||
(the int (-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0))
|
||||
)
|
||||
)
|
||||
(else (format 0 "PC PORT: Skipping setting from game save, its stored in the pc-settings now"))
|
||||
(else (format 0 "PC PORT: Skipping setting from game save, its stored in the pc-settings now~%"))
|
||||
)
|
||||
(set! v1-0 (&+
|
||||
(the-as pointer v1-0)
|
||||
|
||||
@@ -167,6 +167,8 @@
|
||||
"cam-update-h.o"
|
||||
"hud-h.o"
|
||||
"progress-h.o"
|
||||
"progress-h-pc.o" ;; added
|
||||
"progress-generic-h-pc.o" ;; added
|
||||
"rpc-h.o"
|
||||
"path-h.o"
|
||||
"nav-mesh-h.o"
|
||||
@@ -388,8 +390,13 @@
|
||||
"hud-classes.o"
|
||||
"secrets-menu.o"
|
||||
"progress-static.o"
|
||||
"progress-static-pc.o" ;; added
|
||||
"progress.o"
|
||||
"progress-pc.o" ;; added
|
||||
"progress-generic-pc.o" ;; added
|
||||
"progress-draw.o"
|
||||
"progress-draw-pc.o" ;; added
|
||||
"progress-generic-draw-pc.o" ;; added
|
||||
"ocean.o"
|
||||
"ocean-vu0.o"
|
||||
"ocean-texture.o"
|
||||
|
||||
@@ -2026,7 +2026,7 @@
|
||||
)
|
||||
|
||||
(deftype ammo-collectable (collectable)
|
||||
((ammo-effect basic)
|
||||
((ammo-effect sparticle-launch-group)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -1667,14 +1667,9 @@
|
||||
(defbehavior lightning-tracker-init lightning-tracker ((arg0 lightning-spec) (arg1 time-frame) (arg2 symbol) (arg3 process-drawable) (arg4 vector) (arg5 vector))
|
||||
(stack-size-set! (-> self main-thread) 128)
|
||||
(set! (-> self target0) (process->handle arg3))
|
||||
(let ((s1-1 (ppointer->process (-> self parent))))
|
||||
(set! (-> self target1) (process->handle (the-as process (if (type? s1-1 process-drawable)
|
||||
s1-1
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> self target1)
|
||||
(process->handle (the-as process (as-type (ppointer->process (-> self parent)) process-drawable)))
|
||||
)
|
||||
;; Note: there's some changes here to skip setting things if arg4 is #f.
|
||||
;; the address of #f is misaligned, but on ps2 the lq instruction will silently mask.
|
||||
;; Loading from #f doesn't really make sense, so this was likely just a mistake in the
|
||||
@@ -3875,7 +3870,7 @@
|
||||
(deftype level-exit (process-drawable)
|
||||
((minimap connection-minimap)
|
||||
(task-counter uint32)
|
||||
(ent basic)
|
||||
(ent entity-actor)
|
||||
)
|
||||
(:state-methods
|
||||
active
|
||||
|
||||
@@ -1685,21 +1685,25 @@
|
||||
(let ((v1-0 (the-as object (-> arg0 tag))))
|
||||
(while (< (the-as int v1-0) (the-as int (&-> arg0 tag 0 user-int8 (-> arg0 length))))
|
||||
(case (-> (the-as (inline-array game-save-tag) v1-0) 0 elt-type)
|
||||
(((game-save-elt sfx-volume))
|
||||
(set! (-> *setting-control* user-default sfx-volume)
|
||||
(-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0)
|
||||
)
|
||||
)
|
||||
(((game-save-elt music-volume))
|
||||
(set! (-> *setting-control* user-default music-volume)
|
||||
(-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0)
|
||||
)
|
||||
)
|
||||
(((game-save-elt dialog-volume))
|
||||
(set! (-> *setting-control* user-default dialog-volume)
|
||||
(-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0)
|
||||
)
|
||||
)
|
||||
;; og:preserve-this moved these to pc-settings
|
||||
(((game-save-elt sfx-volume) (game-save-elt music-volume) (game-save-elt dialog-volume) (game-save-elt vibration) (game-save-elt subtitle))
|
||||
(format 0 "game-info::load-game: skip setting ~S, stored in pc-settings now~%"
|
||||
(game-save-elt->string (-> (the (inline-array game-save-tag) v1-0) 0 elt-type))))
|
||||
; (((game-save-elt sfx-volume))
|
||||
; (set! (-> *setting-control* user-default sfx-volume)
|
||||
; (-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0)
|
||||
; )
|
||||
; )
|
||||
; (((game-save-elt music-volume))
|
||||
; (set! (-> *setting-control* user-default music-volume)
|
||||
; (-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0)
|
||||
; )
|
||||
; )
|
||||
; (((game-save-elt dialog-volume))
|
||||
; (set! (-> *setting-control* user-default dialog-volume)
|
||||
; (-> (the-as (inline-array game-save-tag) v1-0) 0 user-float0)
|
||||
; )
|
||||
; )
|
||||
(((game-save-elt language))
|
||||
(set! (-> *setting-control* user-default language)
|
||||
(the-as language-enum (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64))
|
||||
@@ -1720,16 +1724,17 @@
|
||||
(the-as int (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64))
|
||||
)
|
||||
)
|
||||
(((game-save-elt vibration))
|
||||
(set! (-> *setting-control* user-default vibration)
|
||||
(= (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64) 1)
|
||||
)
|
||||
)
|
||||
(((game-save-elt subtitle))
|
||||
(set! (-> *setting-control* user-default subtitle)
|
||||
(= (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64) 1)
|
||||
)
|
||||
)
|
||||
;; og:preserve-this moved these to pc-settings
|
||||
; (((game-save-elt vibration))
|
||||
; (set! (-> *setting-control* user-default vibration)
|
||||
; (= (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64) 1)
|
||||
; )
|
||||
; )
|
||||
; (((game-save-elt subtitle))
|
||||
; (set! (-> *setting-control* user-default subtitle)
|
||||
; (= (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64) 1)
|
||||
; )
|
||||
; )
|
||||
(((game-save-elt flip-horizontal))
|
||||
(set! (-> *setting-control* cam-default flip-horizontal)
|
||||
(= (-> (the-as (inline-array game-save-tag) v1-0) 0 user-uint64) 1)
|
||||
@@ -2416,7 +2421,9 @@
|
||||
)
|
||||
(suspend)
|
||||
)
|
||||
(activate-progress *dproc* 'icon-info)
|
||||
;; og:preserve-this disable auto-save prompt in speedrunner mode
|
||||
(when (not (-> *pc-settings* speedrunner-mode?))
|
||||
(activate-progress *dproc* 'icon-info))
|
||||
(while *progress-process*
|
||||
(suspend)
|
||||
)
|
||||
|
||||
@@ -284,6 +284,13 @@
|
||||
)
|
||||
;; ---game-vehicle-u8
|
||||
|
||||
(defmacro language? (&rest langs)
|
||||
"is the current language any of the ones specified?"
|
||||
`(or ,@(apply (lambda (x) `(= (-> *setting-control* user-default language) (language-enum ,x))) langs)))
|
||||
|
||||
(defmacro text-language? (&rest langs)
|
||||
"is the current language any of the ones specified?"
|
||||
`(or ,@(apply (lambda (x) `(= (-> *pc-settings* text-language) (pc-language ,x))) langs)))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
(stick-lock symbol)
|
||||
(flap-sound-id uint32)
|
||||
(mode-sound-bank connection)
|
||||
(mode basic)
|
||||
(mode symbol)
|
||||
(color-index int32)
|
||||
(as-daxter? symbol)
|
||||
(art-group-backup art-group)
|
||||
|
||||
@@ -999,19 +999,19 @@
|
||||
(set! (-> self flut color-index) arg2)
|
||||
(case arg1
|
||||
((#t)
|
||||
(set! (-> self flut mode) (the-as basic 'normal))
|
||||
(set! (-> self flut mode) 'normal)
|
||||
(set! (-> self flut as-daxter?) #f)
|
||||
)
|
||||
(('racer)
|
||||
(set! (-> self flut mode) (the-as basic arg1))
|
||||
(set! (-> self flut mode) arg1)
|
||||
(set! (-> self flut as-daxter?) #f)
|
||||
)
|
||||
(('wild)
|
||||
(set! (-> self flut mode) (the-as basic arg1))
|
||||
(set! (-> self flut mode) arg1)
|
||||
(set! (-> self flut as-daxter?) #t)
|
||||
)
|
||||
(else
|
||||
(set! (-> self flut mode) (the-as basic arg1))
|
||||
(set! (-> self flut mode) arg1)
|
||||
(set! (-> self flut as-daxter?) #f)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
(mech-start-time time-frame)
|
||||
(mech-time time-frame)
|
||||
(no-get-off-time time-frame)
|
||||
(stick-lock basic)
|
||||
(stick-off basic)
|
||||
(stick-lock symbol)
|
||||
(stick-off symbol)
|
||||
(forward-vel meters)
|
||||
(jump-thrust meters)
|
||||
(jump-thrust-fuel float)
|
||||
@@ -48,8 +48,8 @@
|
||||
(exhaust-local-dir vector 2 :inline)
|
||||
(smoke-local-pos vector 2 :inline)
|
||||
(smoke-local-vel vector 2 :inline)
|
||||
(particle-system-2d basic)
|
||||
(particle-system-3d basic)
|
||||
(particle-system-2d sparticle-system)
|
||||
(particle-system-3d sparticle-system)
|
||||
(part-thruster sparticle-launcher)
|
||||
(part-thruster-scale-x sp-field-init-spec)
|
||||
(part-thruster-scale-y sp-field-init-spec)
|
||||
|
||||
@@ -154,14 +154,7 @@
|
||||
(a2-4 *launch-matrix*)
|
||||
)
|
||||
(vector-copy! (-> a2-4 trans) s0-0)
|
||||
(t9-4
|
||||
(the-as sparticle-system a0-7)
|
||||
a1-6
|
||||
a2-4
|
||||
(the-as sparticle-launch-state #f)
|
||||
(the-as sparticle-launch-control #f)
|
||||
1.0
|
||||
)
|
||||
(t9-4 a0-7 a1-6 a2-4 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1056,7 +1056,7 @@
|
||||
)
|
||||
:trans (-> target-mech-hit trans)
|
||||
:code (behavior ((arg0 symbol))
|
||||
(set! (-> self mech stick-off) (the-as basic #t))
|
||||
(set! (-> self mech stick-off) #t)
|
||||
(set! (-> self control unknown-word04) (the-as uint #f))
|
||||
(set! (-> self control did-move-to-pole-or-max-jump-height)
|
||||
(the-as float (send-event (handle->process (-> self attack-info attacker)) 'target 'die arg0))
|
||||
@@ -1341,7 +1341,7 @@
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self control mod-surface) *mech-pickup-mods*)
|
||||
(set! (-> self mech stick-off) (the-as basic #t))
|
||||
(set! (-> self mech stick-off) #t)
|
||||
(set-time! (-> self state-time))
|
||||
(set-forward-vel 0.0)
|
||||
(set! (-> self carry other) (the-as handle #f))
|
||||
@@ -1563,7 +1563,7 @@
|
||||
(set! (-> self control mod-surface) *mech-walk-mods*)
|
||||
(set-time! (-> self state-time))
|
||||
(set-forward-vel 0.0)
|
||||
(set! (-> self mech stick-off) (the-as basic #t))
|
||||
(set! (-> self mech stick-off) #t)
|
||||
)
|
||||
:exit (-> target-mech-carry-pickup exit)
|
||||
:code (behavior ()
|
||||
@@ -2304,7 +2304,7 @@
|
||||
(set! (-> self control mod-surface) *mech-walk-mods*)
|
||||
(set-time! (-> self state-time))
|
||||
(set-forward-vel 0.0)
|
||||
(set! (-> self mech stick-off) (the-as basic #t))
|
||||
(set! (-> self mech stick-off) #t)
|
||||
)
|
||||
:exit (-> target-mech-carry-pickup exit)
|
||||
:code (behavior ()
|
||||
@@ -2405,7 +2405,7 @@
|
||||
(vector-copy! (-> self mech mech-trans) (-> self control unknown-vector38))
|
||||
(quaternion-copy! (the-as quaternion (-> self mech mech-quat)) (-> self control unknown-quat40))
|
||||
(vector-copy! (-> self mech mech-scale) (-> self control scale))
|
||||
(set! (-> self mech stick-off) (the-as basic #t))
|
||||
(set! (-> self mech stick-off) #t)
|
||||
(ja-no-eval :group! jakb-mech-get-on-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(let ((f30-0 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 70.0 80.0))))
|
||||
@@ -2467,7 +2467,7 @@
|
||||
(vector-copy! (-> self mech mech-trans) (-> self control unknown-vector38))
|
||||
(quaternion-copy! (the-as quaternion (-> self mech mech-quat)) (-> self control unknown-quat40))
|
||||
(vector-copy! (-> self mech mech-scale) (-> self control scale))
|
||||
(set! (-> self mech stick-off) (the-as basic #t))
|
||||
(set! (-> self mech stick-off) #t)
|
||||
(ja-no-eval :group! jakb-mech-get-on-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(let ((f30-0 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 70.0 80.0))))
|
||||
@@ -2506,7 +2506,7 @@
|
||||
:event target-mech-handler
|
||||
:enter (behavior ()
|
||||
(vector-reset! (-> self control transv))
|
||||
(set! (-> self mech stick-off) (the-as basic #t))
|
||||
(set! (-> self mech stick-off) #t)
|
||||
(send-event (handle->process (-> self mech shield-handle)) 'enabled)
|
||||
)
|
||||
:exit (behavior ()
|
||||
@@ -2631,7 +2631,7 @@
|
||||
(set! (-> self neck flex-blend) 0.0)
|
||||
(logior! (-> self target-flags) (target-flags tf2))
|
||||
(logior! (-> self focus-status) (focus-status grabbed))
|
||||
(set! (-> self mech stick-off) (the-as basic #t))
|
||||
(set! (-> self mech stick-off) #t)
|
||||
(sound-stop (-> self mech engine-sound-id))
|
||||
(sound-stop (-> self mech thrust-sound-id))
|
||||
(sound-stop (-> self mech drag-sound-id))
|
||||
|
||||
@@ -318,8 +318,8 @@
|
||||
(fall-height meters)
|
||||
(mech-jump-thrust-fuel float)
|
||||
(strafe-jump-pre-window time-frame)
|
||||
(strafe-jump basic)
|
||||
(strafe-duck-jump basic)
|
||||
(strafe-jump symbol)
|
||||
(strafe-duck-jump symbol)
|
||||
(dark-jump-height-min meters)
|
||||
(dark-jump-height-max meters)
|
||||
(ladder-walk-up-speed meters)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -169,7 +169,7 @@
|
||||
|
||||
|
||||
(deftype progress (process-drawable)
|
||||
((scissor-stack vector 8 :inline)
|
||||
((scissor-stack vector 8 :inline)
|
||||
(scissor-count int32)
|
||||
(current-options menu-option-list)
|
||||
(menu-transition float)
|
||||
@@ -183,38 +183,38 @@
|
||||
(next symbol)
|
||||
(ring-angle float)
|
||||
(ring-want-angle float)
|
||||
(init-quat quaternion :inline)
|
||||
(init-quat quaternion :inline)
|
||||
(pos-transition float)
|
||||
(anim-frame float)
|
||||
(swing float)
|
||||
(main-menu symbol)
|
||||
(state-array symbol 8)
|
||||
(option-index-stack int32 8)
|
||||
(state-array symbol 8)
|
||||
(option-index-stack int32 8)
|
||||
(state-pos int32)
|
||||
(secret-buying basic)
|
||||
(secret-buy-choice basic)
|
||||
(secret-buying symbol)
|
||||
(secret-buy-choice symbol)
|
||||
(scanlines-alpha float)
|
||||
(start-time time-frame)
|
||||
(which-slot int32)
|
||||
(starting-state basic)
|
||||
(yes-no-choice basic)
|
||||
(starting-state symbol)
|
||||
(yes-no-choice symbol)
|
||||
(time-out time-frame)
|
||||
(last-sound time-frame)
|
||||
(last-move time-frame)
|
||||
(center-x-backup int32)
|
||||
(center-y-backup int32)
|
||||
(flip-horizontal basic)
|
||||
(flip-vertical basic)
|
||||
(progressive-scan basic)
|
||||
(aspect-ratio basic)
|
||||
(video-mode basic)
|
||||
(flip-horizontal symbol)
|
||||
(flip-vertical symbol)
|
||||
(progressive-scan symbol)
|
||||
(aspect-ratio symbol)
|
||||
(video-mode symbol)
|
||||
(stereo-mode-backup int32)
|
||||
(vibrations basic)
|
||||
(subtitles basic)
|
||||
(languages int32 3)
|
||||
(subtitle-language-index int32 :overlay-at (-> languages 0))
|
||||
(language-index int32 :overlay-at (-> languages 1))
|
||||
(audio-language-index int32 :overlay-at (-> languages 2))
|
||||
(vibrations symbol)
|
||||
(subtitles symbol)
|
||||
(languages language-enum-s32 3)
|
||||
(subtitle-language-index language-enum-s32 :overlay-at (-> languages 0))
|
||||
(language-index language-enum-s32 :overlay-at (-> languages 1))
|
||||
(audio-language-index language-enum-s32 :overlay-at (-> languages 2))
|
||||
(current-task-index int32)
|
||||
(current-line-index int32)
|
||||
(first-closed-line-index int32)
|
||||
@@ -237,7 +237,7 @@
|
||||
)
|
||||
(:methods
|
||||
(init-defaults (_type_) object)
|
||||
(respond-to-cpad (_type_) none)
|
||||
(respond-to-cpad (_type_) object)
|
||||
(gone? (_type_) object)
|
||||
(can-go-back? (_type_) symbol)
|
||||
(get-state-check-card (_type_ symbol) symbol)
|
||||
@@ -245,27 +245,27 @@
|
||||
(pop-state (_type_) int)
|
||||
(set-next-state (_type_ symbol int) int)
|
||||
(set-menu-options (_type_ symbol) int)
|
||||
(progress-method-33 (_type_ progress-box) none)
|
||||
(progress-method-34 (_type_) none)
|
||||
(progress-method-33 (_type_ progress-box) object)
|
||||
(progress-method-34 (_type_) object)
|
||||
(get-scissor-stack-top (_type_) vector)
|
||||
(get-language-by-idx (_type_ int) int)
|
||||
(progress-method-37 (_type_) none)
|
||||
(progress-method-38 (_type_ font-context float) none)
|
||||
(progress-method-39 (_type_) none)
|
||||
(progress-method-40 (_type_ font-context int int float) none)
|
||||
(progress-method-41 (_type_ progress-box float) none)
|
||||
(progress-method-42 (_type_ progress-box float) none)
|
||||
(progress-method-43 (_type_ progress-box float) none)
|
||||
(progress-method-44 (_type_ font-context string) none)
|
||||
(set-selected-color (_type_) object)
|
||||
(adjust-font-origin-y (_type_ font-context float) object)
|
||||
(progress-method-39 (_type_) object)
|
||||
(draw-highlight-bar (_type_ font-context int int float) object)
|
||||
(draw-bg-box-outline (_type_ progress-box float) object)
|
||||
(draw-bg-box-alpha-2 (_type_ progress-box float) object)
|
||||
(draw-bg-box-alpha-1 (_type_ progress-box float) object)
|
||||
(progress-method-44 (_type_ font-context string) object)
|
||||
(progress-method-45 (_type_ font-context float float string float float int) float)
|
||||
(progress-method-46 (_type_ font-context float int) none)
|
||||
(progress-method-47 (_type_ font-context symbol symbol) none)
|
||||
(draw-prev-next-footer (_type_ font-context float) none)
|
||||
(draw-yes-no-style-footer (_type_ font-context text-id text-id) none)
|
||||
(progress-method-50 (_type_ font-context text-id text-id text-id symbol symbol float) none)
|
||||
(progress-method-51 (_type_ font-context) none)
|
||||
(progress-method-52 (_type_ font-context string float float float float float) none)
|
||||
(progress-method-53 (_type_ font-context) none)
|
||||
(draw-header (_type_ font-context float text-id) object)
|
||||
(progress-method-47 (_type_ font-context symbol symbol) object)
|
||||
(draw-prev-next-footer (_type_ font-context float) object)
|
||||
(draw-yes-no-style-footer (_type_ font-context text-id text-id) object)
|
||||
(progress-method-50 (_type_ font-context text-id text-id text-id symbol symbol float) object)
|
||||
(progress-method-51 (_type_ font-context) object)
|
||||
(draw-slider-option (_type_ font-context string float float float float float) object)
|
||||
(progress-method-53 (_type_ font-context) object)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -293,7 +293,7 @@
|
||||
(load-save-3b progress-box :inline)
|
||||
(last-slot-saved int32)
|
||||
(selected-num int32)
|
||||
(secrets-unlocked basic)
|
||||
(secrets-unlocked symbol)
|
||||
(hero-mode-save symbol)
|
||||
)
|
||||
)
|
||||
@@ -510,7 +510,7 @@
|
||||
((current-index float)
|
||||
(target-index float)
|
||||
(scroll-speed float)
|
||||
(on-screen basic)
|
||||
(on-screen symbol)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -247,17 +247,21 @@
|
||||
(set-time! (-> this last-move))
|
||||
(set! (-> this center-x-backup) (-> *setting-control* user-default screenx))
|
||||
(set! (-> this center-y-backup) (-> *setting-control* user-default screeny))
|
||||
(set! (-> this flip-horizontal) (the-as basic (-> *setting-control* cam-default flip-horizontal)))
|
||||
(set! (-> this flip-vertical) (the-as basic (-> *setting-control* cam-default flip-vertical)))
|
||||
(set! (-> this progressive-scan) (the-as basic (-> *setting-control* user-default set-video-mode)))
|
||||
(set! (-> this aspect-ratio) (the-as basic (get-aspect-ratio)))
|
||||
(set! (-> this video-mode) (the-as basic (get-video-mode)))
|
||||
(set! (-> this flip-horizontal) (-> *setting-control* cam-default flip-horizontal))
|
||||
(set! (-> this flip-vertical) (-> *setting-control* cam-default flip-vertical))
|
||||
(set! (-> this progressive-scan) (-> *setting-control* user-default set-video-mode))
|
||||
(set! (-> this aspect-ratio) (get-aspect-ratio))
|
||||
(set! (-> this video-mode) (get-video-mode))
|
||||
(set! (-> this stereo-mode-backup) (-> *setting-control* user-default stereo-mode))
|
||||
(set! (-> this vibrations) (the-as basic (-> *setting-control* user-default vibration)))
|
||||
(set! (-> this subtitles) (the-as basic (-> *setting-control* user-default subtitle)))
|
||||
(set! (-> this language-index) (the-as int (-> *setting-control* user-default language)))
|
||||
(set! (-> this subtitle-language-index) (the-as int (-> *setting-control* user-default subtitle-language)))
|
||||
(set! (-> this audio-language-index) (the-as int (-> *setting-control* user-default audio-language)))
|
||||
(set! (-> this vibrations) (-> *setting-control* user-default vibration))
|
||||
(set! (-> this subtitles) (-> *setting-control* user-default subtitle))
|
||||
(set! (-> this language-index) (the-as language-enum-s32 (-> *setting-control* user-default language)))
|
||||
(set! (-> this subtitle-language-index)
|
||||
(the-as language-enum-s32 (-> *setting-control* user-default subtitle-language))
|
||||
)
|
||||
(set! (-> this audio-language-index)
|
||||
(the-as language-enum-s32 (-> *setting-control* user-default audio-language))
|
||||
)
|
||||
(set! (-> (the-as menu-missions-option (-> *missions-options* options 0)) current-index) 0.0)
|
||||
(set! (-> (the-as menu-missions-option (-> *missions-options* options 0)) target-index) 0.0)
|
||||
(set! (-> *progress-work* secrets-unlocked) #f)
|
||||
@@ -413,7 +417,7 @@
|
||||
(set! (-> self pos-transition) 1.0)
|
||||
(init-defaults self)
|
||||
(set-next-state self arg0 0)
|
||||
(set! (-> self starting-state) (the-as basic (-> self next)))
|
||||
(set! (-> self starting-state) (-> self next))
|
||||
(set! (-> self current) (-> self next))
|
||||
(if (= arg0 'main)
|
||||
(set! (-> self next) 'none)
|
||||
@@ -921,7 +925,7 @@
|
||||
0
|
||||
)
|
||||
(('select-scene-special)
|
||||
(set! (-> this starting-state) (the-as basic 'title))
|
||||
(set! (-> this starting-state) 'title)
|
||||
(set! (-> this state-pos) 0)
|
||||
(let ((v1-80 (-> this state-pos)))
|
||||
(set! (-> this state-array v1-80) 'title)
|
||||
@@ -970,6 +974,7 @@
|
||||
0
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defmethod respond-to-cpad ((this progress))
|
||||
(mc-get-slot-info 0 *progress-save-info*)
|
||||
(memcard-unlocked-secrets? this #f)
|
||||
@@ -1084,7 +1089,6 @@
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defbehavior progress-trans progress ()
|
||||
@@ -1130,7 +1134,7 @@
|
||||
(cond
|
||||
((and (cpad-hold? 0 l2) (cpad-hold? 0 r1))
|
||||
(when (= (-> self current-options) *main-options*)
|
||||
(set! (-> *progress-work* secrets-unlocked) (the-as basic #t))
|
||||
(set! (-> *progress-work* secrets-unlocked) #t)
|
||||
(set! (-> *progress-work* selected-num) 0)
|
||||
(set! (-> self current-options) *main-options-debug*)
|
||||
)
|
||||
@@ -1315,6 +1319,7 @@
|
||||
0
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defmethod progress-method-33 ((this progress) (arg0 progress-box))
|
||||
(set! (-> this scissor-count) (min 7 (+ (-> this scissor-count) 1)))
|
||||
(let ((s5-0 (-> this scissor-stack (-> this scissor-count)))
|
||||
@@ -1367,9 +1372,9 @@
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defmethod progress-method-34 ((this progress))
|
||||
(set! (-> this scissor-count) (max 0 (+ (-> this scissor-count) -1)))
|
||||
(let ((gp-0 (-> this scissor-stack (-> this scissor-count))))
|
||||
@@ -1415,7 +1420,6 @@
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod get-scissor-stack-top ((this progress))
|
||||
@@ -1425,7 +1429,7 @@
|
||||
(defbehavior progress-post progress ()
|
||||
(local-vars (sv-208 font-context) (sv-212 int) (sv-216 hud-box) (sv-220 symbol))
|
||||
(when (-> self current-options)
|
||||
(progress-method-37 self)
|
||||
(set-selected-color self)
|
||||
(set! (-> self scissor-count) -1)
|
||||
(progress-method-33 self (-> *progress-work* full-screen))
|
||||
(let ((gp-0 (-> self current-options options)))
|
||||
@@ -1445,8 +1449,8 @@
|
||||
(begin-scan sv-216 self)
|
||||
(let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> self menu-transition))))))
|
||||
(when (not (or (= (-> self current) 'bigmap) (= (-> self next) 'bigmap)))
|
||||
(progress-method-43 self (-> s4-0 small-screen) (* 144.0 f30-0))
|
||||
(progress-method-41 self (-> s4-0 small-screen) (* 128.0 f30-0))
|
||||
(draw-bg-box-alpha-1 self (-> s4-0 small-screen) (* 144.0 f30-0))
|
||||
(draw-bg-box-outline self (-> s4-0 small-screen) (* 128.0 f30-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2235,7 +2239,7 @@
|
||||
|
||||
(defmethod respond-progress ((this menu-already-exists-option) (arg0 progress) (arg1 symbol))
|
||||
(let ((a1-2 (get-state-check-card arg0 'select-save))
|
||||
(gp-0 (the-as object #f))
|
||||
(gp-0 #f)
|
||||
)
|
||||
(if (!= a1-2 'select-save)
|
||||
(set-next-state arg0 a1-2 0)
|
||||
@@ -2243,7 +2247,7 @@
|
||||
(cond
|
||||
((cpad-pressed? 0 left l-analog-left)
|
||||
(set! gp-0 (not (-> arg0 yes-no-choice)))
|
||||
(set! (-> arg0 yes-no-choice) (the-as basic #t))
|
||||
(set! (-> arg0 yes-no-choice) #t)
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(set! gp-0 (-> arg0 yes-no-choice))
|
||||
@@ -2278,7 +2282,7 @@
|
||||
|
||||
(defmethod respond-progress ((this menu-create-game-option) (arg0 progress) (arg1 symbol))
|
||||
(let ((s4-0 (&-> arg0 yes-no-choice))
|
||||
(gp-0 (the-as object #f))
|
||||
(gp-0 #f)
|
||||
)
|
||||
(let ((a1-2 (get-state-check-card arg0 'select-save)))
|
||||
(if (!= a1-2 'select-save)
|
||||
@@ -2288,7 +2292,7 @@
|
||||
(cond
|
||||
((cpad-pressed? 0 left l-analog-left)
|
||||
(set! gp-0 (not (-> s4-0 0)))
|
||||
(set! (-> s4-0 0) (the-as basic #t))
|
||||
(set! (-> s4-0 0) #t)
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(set! gp-0 (-> s4-0 0))
|
||||
@@ -2330,7 +2334,7 @@
|
||||
((cpad-pressed? 0 left l-analog-left)
|
||||
(when (and (not (-> s5-0 0)) (not (-> arg0 clear-screen)))
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> s5-0 0) (the-as basic #t))
|
||||
(set! (-> s5-0 0) #t)
|
||||
)
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
@@ -2447,7 +2451,7 @@
|
||||
(cond
|
||||
((and (cpad-pressed? 0 left l-analog-left) (not (-> gp-0 0)))
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> gp-0 0) (the-as basic #t))
|
||||
(set! (-> gp-0 0) #t)
|
||||
)
|
||||
((and (cpad-pressed? 0 right l-analog-right) (-> gp-0 0))
|
||||
(sound-play "generic-beep")
|
||||
@@ -2459,12 +2463,12 @@
|
||||
(set! (-> arg0 time-out) 0)
|
||||
(cond
|
||||
((-> arg0 yes-no-choice)
|
||||
(set! (-> *setting-control* user-default video-mode) (the-as symbol (-> arg0 video-mode)))
|
||||
(set! (-> *setting-control* user-default video-mode) (-> arg0 video-mode))
|
||||
(set-time! (-> arg0 time-out))
|
||||
(set-next-state arg0 'video-mode-ok 0)
|
||||
)
|
||||
(else
|
||||
(set! (-> arg0 video-mode) (the-as basic 'pal))
|
||||
(set! (-> arg0 video-mode) 'pal)
|
||||
(pop-state arg0)
|
||||
)
|
||||
)
|
||||
@@ -2479,7 +2483,7 @@
|
||||
(cond
|
||||
((and (cpad-pressed? 0 left l-analog-left) (not (-> s5-0 0)))
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> s5-0 0) (the-as basic #t))
|
||||
(set! (-> s5-0 0) #t)
|
||||
)
|
||||
((and (cpad-pressed? 0 right l-analog-right) (-> s5-0 0))
|
||||
(sound-play "generic-beep")
|
||||
@@ -2493,8 +2497,8 @@
|
||||
(sound-play "generic-beep")
|
||||
)
|
||||
(else
|
||||
(set! (-> arg0 video-mode) (the-as basic 'pal))
|
||||
(set! (-> *setting-control* user-default video-mode) (the-as symbol (-> arg0 video-mode)))
|
||||
(set! (-> arg0 video-mode) 'pal)
|
||||
(set! (-> *setting-control* user-default video-mode) (-> arg0 video-mode))
|
||||
(sound-play "generic-beep")
|
||||
)
|
||||
)
|
||||
@@ -2505,8 +2509,8 @@
|
||||
)
|
||||
(when (and (nonzero? (-> arg0 time-out)) (< (seconds 10) (- (current-time) (-> arg0 time-out))))
|
||||
(set! (-> arg0 time-out) 0)
|
||||
(set! (-> arg0 video-mode) (the-as basic 'pal))
|
||||
(set! (-> *setting-control* user-default video-mode) (the-as symbol (-> arg0 video-mode)))
|
||||
(set! (-> arg0 video-mode) 'pal)
|
||||
(set! (-> *setting-control* user-default video-mode) (-> arg0 video-mode))
|
||||
(pop-state arg0)
|
||||
)
|
||||
0
|
||||
@@ -2517,8 +2521,8 @@
|
||||
(cond
|
||||
((and (cpad-pressed? 0 left l-analog-left) (not (-> s5-0 0)))
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> arg0 progressive-scan) (the-as basic #t))
|
||||
(set! (-> s5-0 0) (the-as basic #t))
|
||||
(set! (-> arg0 progressive-scan) #t)
|
||||
(set! (-> s5-0 0) #t)
|
||||
)
|
||||
((and (cpad-pressed? 0 right l-analog-right) (-> s5-0 0))
|
||||
(sound-play "generic-beep")
|
||||
@@ -2533,7 +2537,7 @@
|
||||
((-> arg0 yes-no-choice)
|
||||
(sound-play "generic-beep")
|
||||
(set-progressive-scan #t)
|
||||
(set! (-> arg0 progressive-scan) (the-as basic #t))
|
||||
(set! (-> arg0 progressive-scan) #t)
|
||||
(set-time! (-> arg0 time-out))
|
||||
(set-next-state arg0 'progressive-mode-ok 0)
|
||||
)
|
||||
@@ -2554,7 +2558,7 @@
|
||||
(cond
|
||||
((and (cpad-pressed? 0 left l-analog-left) (not (-> s5-0 0)))
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> s5-0 0) (the-as basic #t))
|
||||
(set! (-> s5-0 0) #t)
|
||||
)
|
||||
((and (cpad-pressed? 0 right l-analog-right) (-> s5-0 0))
|
||||
(sound-play "generic-beep")
|
||||
@@ -2571,7 +2575,7 @@
|
||||
)
|
||||
(else
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> arg0 progressive-scan) (the-as basic #t))
|
||||
(set! (-> arg0 progressive-scan) #t)
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 time-out) 0)
|
||||
@@ -2668,7 +2672,7 @@
|
||||
|
||||
(defmethod respond-progress ((this menu-format-card-option) (arg0 progress) (arg1 symbol))
|
||||
(let ((s4-0 (&-> arg0 yes-no-choice))
|
||||
(gp-0 (the-as object #f))
|
||||
(gp-0 #f)
|
||||
)
|
||||
(let ((a1-2 (get-state-check-card arg0 (-> arg0 current))))
|
||||
(set-next-state arg0 a1-2 0)
|
||||
@@ -2676,7 +2680,7 @@
|
||||
(cond
|
||||
((cpad-pressed? 0 left l-analog-left)
|
||||
(set! gp-0 (not (-> s4-0 0)))
|
||||
(set! (-> s4-0 0) (the-as basic #t))
|
||||
(set! (-> s4-0 0) #t)
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(set! gp-0 (-> s4-0 0))
|
||||
@@ -3224,7 +3228,7 @@
|
||||
)
|
||||
|
||||
(defmethod respond-progress ((this menu-secret-option) (arg0 progress) (arg1 symbol))
|
||||
(let ((gp-0 (the-as object #f)))
|
||||
(let ((gp-0 #f))
|
||||
(the float (+ (-> *menu-secrets-array* length) -1))
|
||||
(let ((a0-1 (+ (-> *menu-secrets-array* length) -1))
|
||||
(v1-5 *menu-secrets-array*)
|
||||
@@ -3252,7 +3256,7 @@
|
||||
(cond
|
||||
((cpad-pressed? 0 left l-analog-left)
|
||||
(set! gp-0 (not (-> arg0 yes-no-choice)))
|
||||
(set! (-> arg0 yes-no-choice) (the-as basic #t))
|
||||
(set! (-> arg0 yes-no-choice) #t)
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(set! gp-0 (-> arg0 yes-no-choice))
|
||||
@@ -3422,39 +3426,45 @@
|
||||
(set! (-> *cpad-list* cpads 0 buzz-pause-val 0) (the-as uint 255))
|
||||
(set! (-> *cpad-list* cpads 0 buzz-pause-time) (the-as uint 15))
|
||||
)
|
||||
(set! (-> arg0 vibrations) (the-as basic #t))
|
||||
(set! (-> arg0 vibrations) #t)
|
||||
)
|
||||
((4)
|
||||
(set! (-> arg0 subtitles) (the-as basic #t))
|
||||
(set! (-> arg0 subtitles) #t)
|
||||
)
|
||||
((5)
|
||||
(set! (-> arg0 subtitle-language-index) (mod (+ (-> arg0 subtitle-language-index) 9) 10))
|
||||
(if (and (= (-> arg0 subtitle-language-index) 7)
|
||||
(set! (-> arg0 subtitle-language-index)
|
||||
(the-as language-enum-s32 (mod (the-as int (+ (-> arg0 subtitle-language-index) 9)) 10))
|
||||
)
|
||||
(if (and (= (-> arg0 subtitle-language-index) (language-enum-s32 korean))
|
||||
(or (= (scf-get-territory) 1)
|
||||
(and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language))
|
||||
)
|
||||
)
|
||||
(+! (-> arg0 subtitle-language-index) -1)
|
||||
)
|
||||
(if (= (-> arg0 subtitle-language-index) 6)
|
||||
(if (= (-> arg0 subtitle-language-index) (language-enum-s32 japanese))
|
||||
(+! (-> arg0 subtitle-language-index) -2)
|
||||
)
|
||||
)
|
||||
((6)
|
||||
(set! (-> arg0 language-index) (mod (+ (-> arg0 language-index) 9) 10))
|
||||
(if (and (= (-> arg0 language-index) 7)
|
||||
(set! (-> arg0 language-index)
|
||||
(the-as language-enum-s32 (mod (the-as int (+ (-> arg0 language-index) 9)) 10))
|
||||
)
|
||||
(if (and (= (-> arg0 language-index) (language-enum-s32 korean))
|
||||
(or (= (scf-get-territory) 1)
|
||||
(and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language))
|
||||
)
|
||||
)
|
||||
(+! (-> arg0 language-index) -1)
|
||||
)
|
||||
(if (= (-> arg0 language-index) 6)
|
||||
(if (= (-> arg0 language-index) (language-enum-s32 japanese))
|
||||
(+! (-> arg0 language-index) -2)
|
||||
)
|
||||
)
|
||||
((7)
|
||||
(set! (-> arg0 audio-language-index) (mod (+ (-> arg0 audio-language-index) 4) 5))
|
||||
(set! (-> arg0 audio-language-index)
|
||||
(the-as language-enum-s32 (mod (the-as int (+ (-> arg0 audio-language-index) 4)) 5))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3468,11 +3478,13 @@
|
||||
(set! (-> arg0 subtitles) #f)
|
||||
)
|
||||
((5)
|
||||
(set! (-> arg0 subtitle-language-index) (mod (+ (-> arg0 subtitle-language-index) 1) 10))
|
||||
(if (= (-> arg0 subtitle-language-index) 5)
|
||||
(set! (-> arg0 subtitle-language-index)
|
||||
(the-as language-enum-s32 (mod (the-as int (+ (-> arg0 subtitle-language-index) 1)) 10))
|
||||
)
|
||||
(if (= (-> arg0 subtitle-language-index) (language-enum-s32 commentary))
|
||||
(+! (-> arg0 subtitle-language-index) 2)
|
||||
)
|
||||
(if (and (= (-> arg0 subtitle-language-index) 7)
|
||||
(if (and (= (-> arg0 subtitle-language-index) (language-enum-s32 korean))
|
||||
(or (= (scf-get-territory) 1)
|
||||
(and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language))
|
||||
)
|
||||
@@ -3481,11 +3493,13 @@
|
||||
)
|
||||
)
|
||||
((6)
|
||||
(set! (-> arg0 language-index) (mod (+ (-> arg0 language-index) 1) 10))
|
||||
(if (= (-> arg0 language-index) 5)
|
||||
(set! (-> arg0 language-index)
|
||||
(the-as language-enum-s32 (mod (the-as int (+ (-> arg0 language-index) 1)) 10))
|
||||
)
|
||||
(if (= (-> arg0 language-index) (language-enum-s32 commentary))
|
||||
(+! (-> arg0 language-index) 2)
|
||||
)
|
||||
(if (and (= (-> arg0 language-index) 7)
|
||||
(if (and (= (-> arg0 language-index) (language-enum-s32 korean))
|
||||
(or (= (scf-get-territory) 1)
|
||||
(and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language))
|
||||
)
|
||||
@@ -3494,17 +3508,19 @@
|
||||
)
|
||||
)
|
||||
((7)
|
||||
(set! (-> arg0 audio-language-index) (mod (+ (-> arg0 audio-language-index) 1) 5))
|
||||
(set! (-> arg0 audio-language-index)
|
||||
(the-as language-enum-s32 (mod (the-as int (+ (-> arg0 audio-language-index) 1)) 5))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((cpad-pressed? 0 confirm)
|
||||
(case (-> this menu-option-type)
|
||||
((3)
|
||||
(set! (-> *setting-control* user-default vibration) (the-as symbol (-> arg0 vibrations)))
|
||||
(set! (-> *setting-control* user-default vibration) (-> arg0 vibrations))
|
||||
)
|
||||
((4)
|
||||
(set! (-> *setting-control* user-default subtitle) (the-as symbol (-> arg0 subtitles)))
|
||||
(set! (-> *setting-control* user-default subtitle) (-> arg0 subtitles))
|
||||
)
|
||||
((5)
|
||||
(set! (-> *setting-control* user-default subtitle-language)
|
||||
@@ -3513,7 +3529,7 @@
|
||||
)
|
||||
((6)
|
||||
(set! (-> *setting-control* user-default language) (the-as language-enum (-> arg0 language-index)))
|
||||
(load-level-text-files (-> arg0 language-index))
|
||||
(load-level-text-files (the-as int (-> arg0 language-index)))
|
||||
)
|
||||
((7)
|
||||
(set! (-> *setting-control* user-default audio-language)
|
||||
@@ -3536,11 +3552,15 @@
|
||||
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down l-analog-down))
|
||||
)
|
||||
(else
|
||||
(set! (-> arg0 vibrations) (the-as basic (-> *setting-control* user-default vibration)))
|
||||
(set! (-> arg0 subtitles) (the-as basic (-> *setting-control* user-default subtitle)))
|
||||
(set! (-> arg0 language-index) (the-as int (-> *setting-control* user-default language)))
|
||||
(set! (-> arg0 subtitle-language-index) (the-as int (-> *setting-control* user-default subtitle-language)))
|
||||
(set! (-> arg0 audio-language-index) (the-as int (-> *setting-control* user-default audio-language)))
|
||||
(set! (-> arg0 vibrations) (-> *setting-control* user-default vibration))
|
||||
(set! (-> arg0 subtitles) (-> *setting-control* user-default subtitle))
|
||||
(set! (-> arg0 language-index) (the-as language-enum-s32 (-> *setting-control* user-default language)))
|
||||
(set! (-> arg0 subtitle-language-index)
|
||||
(the-as language-enum-s32 (-> *setting-control* user-default subtitle-language))
|
||||
)
|
||||
(set! (-> arg0 audio-language-index)
|
||||
(the-as language-enum-s32 (-> *setting-control* user-default audio-language))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
@@ -3548,31 +3568,35 @@
|
||||
|
||||
(defmethod respond-progress ((this menu-language-option) (arg0 progress) (arg1 symbol))
|
||||
(enable-level-text-file-loading)
|
||||
(set! (-> arg0 language-index) (the-as int (-> *setting-control* user-default language)))
|
||||
(set! (-> arg0 language-index) (the-as language-enum-s32 (-> *setting-control* user-default language)))
|
||||
(cond
|
||||
((cpad-pressed? 0 left l-analog-left)
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> arg0 language-index) (mod (+ (-> arg0 language-index) 9) 10))
|
||||
(if (and (= (-> arg0 language-index) 7)
|
||||
(set! (-> arg0 language-index)
|
||||
(the-as language-enum-s32 (mod (the-as int (+ (-> arg0 language-index) 9)) 10))
|
||||
)
|
||||
(if (and (= (-> arg0 language-index) (language-enum-s32 korean))
|
||||
(or (= (scf-get-territory) 1)
|
||||
(and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language))
|
||||
)
|
||||
)
|
||||
(+! (-> arg0 language-index) -1)
|
||||
)
|
||||
(if (= (-> arg0 language-index) 6)
|
||||
(if (= (-> arg0 language-index) (language-enum-s32 japanese))
|
||||
(+! (-> arg0 language-index) -2)
|
||||
)
|
||||
(set! (-> *setting-control* user-default language) (the-as language-enum (-> arg0 language-index)))
|
||||
(load-level-text-files (-> arg0 language-index))
|
||||
(load-level-text-files (the-as int (-> arg0 language-index)))
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> arg0 language-index) (mod (+ (-> arg0 language-index) 1) 10))
|
||||
(if (= (-> arg0 language-index) 5)
|
||||
(set! (-> arg0 language-index)
|
||||
(the-as language-enum-s32 (mod (the-as int (+ (-> arg0 language-index) 1)) 10))
|
||||
)
|
||||
(if (= (-> arg0 language-index) (language-enum-s32 commentary))
|
||||
(+! (-> arg0 language-index) 2)
|
||||
)
|
||||
(if (and (= (-> arg0 language-index) 7)
|
||||
(if (and (= (-> arg0 language-index) (language-enum-s32 korean))
|
||||
(or (= (scf-get-territory) 1)
|
||||
(and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language))
|
||||
)
|
||||
@@ -3580,7 +3604,7 @@
|
||||
(+! (-> arg0 language-index) 1)
|
||||
)
|
||||
(set! (-> *setting-control* user-default language) (the-as language-enum (-> arg0 language-index)))
|
||||
(load-level-text-files (-> arg0 language-index))
|
||||
(load-level-text-files (the-as int (-> arg0 language-index)))
|
||||
)
|
||||
((cpad-pressed? 0 confirm)
|
||||
(set! (-> *setting-control* user-default subtitle-language) (the-as language-enum (-> arg0 language-index)))
|
||||
@@ -3652,17 +3676,17 @@
|
||||
(cond
|
||||
((cpad-pressed? 0 left l-analog-left)
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> arg0 aspect-ratio) (the-as basic 'aspect4x3))
|
||||
(set! (-> arg0 aspect-ratio) 'aspect4x3)
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> arg0 aspect-ratio) (the-as basic 'aspect16x9))
|
||||
(set! (-> arg0 aspect-ratio) 'aspect16x9)
|
||||
)
|
||||
((cpad-pressed? 0 triangle)
|
||||
(set! (-> arg0 aspect-ratio) (the-as basic (get-aspect-ratio)))
|
||||
(set! (-> arg0 aspect-ratio) (get-aspect-ratio))
|
||||
)
|
||||
((cpad-pressed? 0 confirm)
|
||||
(set! (-> *setting-control* user-default aspect-ratio) (the-as symbol (-> arg0 aspect-ratio)))
|
||||
(set! (-> *setting-control* user-default aspect-ratio) (-> arg0 aspect-ratio))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3670,7 +3694,7 @@
|
||||
(cond
|
||||
((cpad-pressed? 0 left l-analog-left)
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> arg0 progressive-scan) (the-as basic #t))
|
||||
(set! (-> arg0 progressive-scan) #t)
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(sound-play "generic-beep")
|
||||
@@ -3678,7 +3702,7 @@
|
||||
(set! (-> *setting-control* user-default set-video-mode) #f)
|
||||
)
|
||||
((cpad-pressed? 0 triangle)
|
||||
(set! (-> arg0 progressive-scan) (the-as basic (-> *setting-control* user-default set-video-mode)))
|
||||
(set! (-> arg0 progressive-scan) (-> *setting-control* user-default set-video-mode))
|
||||
)
|
||||
((cpad-pressed? 0 confirm)
|
||||
(push-state arg0)
|
||||
@@ -3690,21 +3714,21 @@
|
||||
(cond
|
||||
((cpad-pressed? 0 left l-analog-left)
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> arg0 video-mode) (the-as basic 'pal))
|
||||
(set! (-> arg0 video-mode) 'pal)
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> arg0 video-mode) (the-as basic 'ntsc))
|
||||
(set! (-> arg0 video-mode) 'ntsc)
|
||||
)
|
||||
((cpad-pressed? 0 triangle)
|
||||
(set! (-> arg0 video-mode) (the-as basic (get-video-mode)))
|
||||
(set! (-> arg0 video-mode) (get-video-mode))
|
||||
)
|
||||
((cpad-pressed? 0 confirm)
|
||||
(when (!= (-> *setting-control* user-default video-mode) (-> arg0 video-mode))
|
||||
(let ((v1-88 (-> arg0 video-mode)))
|
||||
(case v1-88
|
||||
(('pal)
|
||||
(set! (-> *setting-control* user-default video-mode) (the-as symbol v1-88))
|
||||
(set! (-> *setting-control* user-default video-mode) v1-88)
|
||||
)
|
||||
(('ntsc)
|
||||
(push-state arg0)
|
||||
@@ -3730,13 +3754,13 @@
|
||||
(set! (-> arg0 center-y-backup) (-> *setting-control* user-default screeny))
|
||||
)
|
||||
((9)
|
||||
(set! (-> arg0 aspect-ratio) (the-as basic (-> *setting-control* user-default aspect-ratio)))
|
||||
(set! (-> arg0 aspect-ratio) (-> *setting-control* user-default aspect-ratio))
|
||||
)
|
||||
((10)
|
||||
(set! (-> arg0 progressive-scan) (the-as basic (-> *setting-control* user-default set-video-mode)))
|
||||
(set! (-> arg0 progressive-scan) (-> *setting-control* user-default set-video-mode))
|
||||
)
|
||||
((11)
|
||||
(set! (-> arg0 video-mode) (the-as basic (get-video-mode)))
|
||||
(set! (-> arg0 video-mode) (get-video-mode))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3756,14 +3780,14 @@
|
||||
(sound-play "generic-beep")
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(set! (-> arg0 flip-horizontal) (the-as basic #t))
|
||||
(set! (-> arg0 flip-horizontal) #t)
|
||||
(sound-play "generic-beep")
|
||||
)
|
||||
((cpad-pressed? 0 confirm)
|
||||
(set! (-> *setting-control* cam-default flip-horizontal) (the-as symbol (-> arg0 flip-horizontal)))
|
||||
(set! (-> *setting-control* cam-default flip-horizontal) (-> arg0 flip-horizontal))
|
||||
)
|
||||
((cpad-pressed? 0 triangle)
|
||||
(set! (-> arg0 flip-horizontal) (the-as basic (-> *setting-control* cam-current flip-horizontal)))
|
||||
(set! (-> arg0 flip-horizontal) (-> *setting-control* cam-current flip-horizontal))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3774,14 +3798,14 @@
|
||||
(sound-play "generic-beep")
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(set! (-> arg0 flip-vertical) (the-as basic #t))
|
||||
(set! (-> arg0 flip-vertical) #t)
|
||||
(sound-play "generic-beep")
|
||||
)
|
||||
((cpad-pressed? 0 confirm)
|
||||
(set! (-> *setting-control* cam-default flip-vertical) (the-as symbol (-> arg0 flip-vertical)))
|
||||
(set! (-> *setting-control* cam-default flip-vertical) (-> arg0 flip-vertical))
|
||||
)
|
||||
((cpad-pressed? 0 triangle)
|
||||
(set! (-> arg0 flip-vertical) (the-as basic (-> *setting-control* cam-current flip-vertical)))
|
||||
(set! (-> arg0 flip-vertical) (-> *setting-control* cam-current flip-vertical))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3794,12 +3818,12 @@
|
||||
(else
|
||||
(cond
|
||||
((cpad-pressed? 0 confirm)
|
||||
(set! (-> arg0 flip-horizontal) (the-as basic (-> *setting-control* cam-current flip-horizontal)))
|
||||
(set! (-> arg0 flip-vertical) (the-as basic (-> *setting-control* cam-current flip-vertical)))
|
||||
(set! (-> arg0 flip-horizontal) (-> *setting-control* cam-current flip-horizontal))
|
||||
(set! (-> arg0 flip-vertical) (-> *setting-control* cam-current flip-vertical))
|
||||
)
|
||||
((cpad-pressed? 0 triangle)
|
||||
(set! (-> arg0 flip-horizontal) (the-as basic (-> *setting-control* cam-current flip-horizontal)))
|
||||
(set! (-> arg0 flip-vertical) (the-as basic (-> *setting-control* cam-current flip-vertical)))
|
||||
(set! (-> arg0 flip-horizontal) (-> *setting-control* cam-current flip-horizontal))
|
||||
(set! (-> arg0 flip-vertical) (-> *setting-control* cam-current flip-vertical))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3985,7 +4009,7 @@
|
||||
(cond
|
||||
((and (cpad-pressed? 0 left l-analog-left) (not (-> s5-0 0)))
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> s5-0 0) (the-as basic #t))
|
||||
(set! (-> s5-0 0) #t)
|
||||
)
|
||||
((and (cpad-pressed? 0 right l-analog-right) (-> s5-0 0))
|
||||
(sound-play "generic-beep")
|
||||
|
||||
@@ -1346,8 +1346,258 @@
|
||||
(credits-08b6 #x08b6)
|
||||
|
||||
;; PC port IDs START
|
||||
(discord-rpc-not-in-mission #x1200)
|
||||
(discord-rpc-in-side-mission #x1201)
|
||||
(discord-rpc-not-in-mission #x11fe)
|
||||
(discord-rpc-in-side-mission #x11ff)
|
||||
(progress-display-mode #x1200)
|
||||
(progress-windowed #x1201)
|
||||
(progress-fullscreen #x1202)
|
||||
(progress-borderless #x1203)
|
||||
(progress-aspect-ratio-auto #x1204)
|
||||
(progress-aspect-ratio-custom #x1205)
|
||||
(progress-aspect-ratio-4x3 #x1206)
|
||||
(progress-aspect-ratio-16x9 #x1207)
|
||||
(progress-aspect-ratio-custom-title #x1208)
|
||||
(progress-aspect-ratio-custom-pad-x #x1209)
|
||||
(progress-aspect-ratio-custom-pad-circle #x120a)
|
||||
(progress-aspect-ratio-custom-warn #x120b)
|
||||
(progress-music-player #x120c)
|
||||
(progress-vsync #x120d)
|
||||
(progress-text-language #x120e)
|
||||
(progress-cheats #x120f)
|
||||
(progress-aspect-ratio-custom-width #x1210)
|
||||
(progress-aspect-ratio-custom-height #x1211)
|
||||
(progress-music-player-locked #x1212)
|
||||
(progress-music-player-now-playing #x1213)
|
||||
(progress-music-player-no-track #x1214)
|
||||
(progress-music-player-flava-default #x1215)
|
||||
(progress-music-player-flava-gun #x1216)
|
||||
(progress-music-player-flava-board #x1217)
|
||||
(progress-music-player-flava-mech #x1218)
|
||||
(progress-music-player-flava-darkjak #x1219)
|
||||
(progress-music-player-flava-pilot #x121a)
|
||||
(progress-music-player-danger #x121b)
|
||||
(progress-music-player-danger-0 #x121c)
|
||||
(progress-music-player-danger-1 #x121d)
|
||||
(progress-music-player-danger-2 #x121e)
|
||||
(progress-music-player-danger-3 #x121f)
|
||||
(progress-music-player-city #x1220)
|
||||
(progress-music-player-city-battle #x1221)
|
||||
(progress-music-player-battle #x1222)
|
||||
(progress-music-player-danger2 #x1223)
|
||||
(progress-music-player-danger3 #x1224)
|
||||
(progress-music-player-danger4 #x1225)
|
||||
(progress-music-player-danger6 #x1226)
|
||||
(progress-music-player-danger7 #x1227)
|
||||
(progress-music-player-danger9 #x1228)
|
||||
(progress-music-player-danger10 #x1229)
|
||||
(progress-music-player-danger11 #x122a)
|
||||
(progress-music-player-atoll #x122b)
|
||||
(progress-music-player-atoll-battle #x122c)
|
||||
(progress-music-player-strip #x122d)
|
||||
(progress-music-player-forest #x122e)
|
||||
(progress-music-player-forest-battle #x122f)
|
||||
(progress-music-player-sewer #x1230)
|
||||
(progress-music-player-sewer-battle #x1231)
|
||||
(progress-music-player-mountain #x1232)
|
||||
(progress-music-player-mountain-battle #x1233)
|
||||
(progress-music-player-palcab #x1234)
|
||||
(progress-music-player-palcab-battle #x1235)
|
||||
(progress-music-player-race #x1236)
|
||||
(progress-music-player-ruins #x1237)
|
||||
(progress-window-size #x1238)
|
||||
(progress-window-size-decoration #x1239)
|
||||
(progress-game-res #x123a)
|
||||
(progress-game-res-decoration #x123b)
|
||||
(progress-lod-bg #x123c)
|
||||
(progress-lod-fg #x123d)
|
||||
(progress-subtitle-speaker #x123f)
|
||||
(progress-subtitle-speaker-off #x1240)
|
||||
(progress-subtitle-speaker-auto #x1241)
|
||||
(progress-subtitle-speaker-on #x1242)
|
||||
(progress-territory #x1243)
|
||||
(progress-territory-scea #x1244)
|
||||
(progress-territory-scee #x1245)
|
||||
(progress-territory-scei #x1246)
|
||||
(progress-territory-scek #x1247)
|
||||
(progress-msaa #x1248)
|
||||
(progress-msaa-x #x1249)
|
||||
(progress-led-options #x124a)
|
||||
(progress-led-state #x124b)
|
||||
(progress-led-health #x124c)
|
||||
(progress-disable-auto-save #x124d)
|
||||
(progress-auto-save-disabled #x124e)
|
||||
(progress-disable-auto-save-warn #x124f)
|
||||
(progress-cheats-turbo-board #x1250)
|
||||
(progress-cheats-health-bars #x1251)
|
||||
(progress-cheats-vehicle-health-bars #x1252)
|
||||
(progress-cheats-vehicle-invuln #x1253)
|
||||
(progress-cheats-statistics #x1254)
|
||||
(progress-cheats-suck-in-all #x1255)
|
||||
(progress-cheats-music-player #x1256)
|
||||
(progress-cheats-no-textures #x1257)
|
||||
(progress-cheats-fast-movies #x1258)
|
||||
(progress-cheats-slow-movies #x1259)
|
||||
(progress-cheats-fast-speed #x125a)
|
||||
(progress-cheats-slow-speed #x125b)
|
||||
(progress-cheats-fast-travel #x125c)
|
||||
(progress-cheats-orb-tracker #x125d)
|
||||
(progress-cheats-real-time-of-day #x125e)
|
||||
(progress-cheats-city-peace #x125f)
|
||||
(progress-cheats-board-tricks #x1260)
|
||||
(progress-cheats-weather-bad #x1261)
|
||||
(progress-cheats-weather-good #x1262)
|
||||
(progress-cheats-hijack-lines #x1263)
|
||||
(progress-cheats-locked #x1264)
|
||||
(progress-cheats-turbo-board-unlock #x1265)
|
||||
(progress-cheats-health-bars-unlock #x1266)
|
||||
(progress-cheats-vehicle-health-bars-unlock #x1267)
|
||||
(progress-cheats-statistics-unlock #x1268)
|
||||
(progress-cheats-suck-in-all-unlock #x1269)
|
||||
(progress-cheats-fast-travel-unlock #x126a)
|
||||
; (progress-camera-options #x1280)
|
||||
; (progress-camera-options-first-horz #x1281)
|
||||
; (progress-camera-options-first-vert #x1282)
|
||||
; (progress-camera-options-third-horz #x1283)
|
||||
; (progress-camera-options-third-vert #x1284)
|
||||
(progress-normal #x1286)
|
||||
(progress-inverted #x1287)
|
||||
(progress-ps2-parts #x1288)
|
||||
(progress-discord-rpc #x1289)
|
||||
(progress-lod-default #x128a)
|
||||
(progress-lod-low #x128b)
|
||||
(progress-lod-high #x128c)
|
||||
(progress-credits #x128d)
|
||||
(progress-frame-rate #x128e)
|
||||
(progress-misc-game-options #x128f)
|
||||
(progress-speedrunner-mode #x1290)
|
||||
(progress-menu-input-options #x1291)
|
||||
(progress-restore-defaults #x1292)
|
||||
(progress-menu-controller-options #x1293)
|
||||
(progress-controller-options-select-controller #x1294)
|
||||
(progress-controller-options-analog-deadzone #x1295)
|
||||
(progress-controller-options-ignore-if-unfocused #x1296)
|
||||
(progress-controller-options-led-hp #x1297)
|
||||
(progress-controller-options-led-state #x1298)
|
||||
(progress-input-options-enable-keyboard #x1299)
|
||||
(progress-input-options-enable-mouse #x129a)
|
||||
(progress-menu-mouse-options #x129b)
|
||||
(progress-mouse-options-track-camera #x129c)
|
||||
(progress-mouse-options-horz-sens #x129d)
|
||||
(progress-mouse-options-vert-sens #x129e)
|
||||
(progress-mouse-options-player-movement #x129f)
|
||||
(progress-shadows #x12a0)
|
||||
(progress-shadows-normal #x12a1)
|
||||
(progress-shadows-extended #x12a2)
|
||||
(progress-error-no-resolutions #x12a3)
|
||||
(progress-territory-auto #x12a4)
|
||||
(progress-kill-stats #x12a5)
|
||||
(progress-other-stats #x12a6)
|
||||
(progress-ks-total-killed #x12a7)
|
||||
(progress-ks-killed-by-jak #x12a8)
|
||||
(progress-ks-killed-by-darkjak #x12a9)
|
||||
(progress-ks-killed-by-daxter #x12aa)
|
||||
(progress-ks-killed-by-others #x12ab)
|
||||
(progress-ks-source-gun-yellow #x12ac)
|
||||
(progress-ks-source-gun-red #x12ad)
|
||||
(progress-ks-source-gun-blue #x12ae)
|
||||
(progress-ks-source-gun-dark #x12af)
|
||||
(progress-ks-source-board #x12b0)
|
||||
(progress-ks-source-board-trick #x12b1)
|
||||
(progress-ks-source-mech #x12b2)
|
||||
(progress-ks-source-mech-bonk #x12b3)
|
||||
(progress-ks-source-turret #x12b4)
|
||||
(progress-ks-source-punch #x12b5)
|
||||
(progress-ks-source-flop #x12b6)
|
||||
(progress-ks-source-uppercut #x12b7)
|
||||
(progress-ks-source-spin #x12b8)
|
||||
(progress-ks-source-roll #x12b9)
|
||||
(progress-ks-source-darkjak-punch #x12ba)
|
||||
(progress-ks-source-darkjak-flop #x12bb)
|
||||
(progress-ks-source-darkjak-uppercut #x12bc)
|
||||
(progress-ks-source-darkjak-spin #x12bd)
|
||||
(progress-ks-source-darkjak-roll #x12be)
|
||||
(progress-ks-source-darkjak-bomb0 #x12bf)
|
||||
(progress-ks-source-darkjak-bomb1 #x12c0)
|
||||
(progress-ks-source-indax-punch #x12c1)
|
||||
(progress-ks-source-indax-spin #x12c2)
|
||||
(progress-ks-source-guard #x12c3)
|
||||
(progress-ks-source-sig #x12c4)
|
||||
(progress-ks-source-ashelin #x12c5)
|
||||
(progress-ks-source-jinx #x12c6)
|
||||
(progress-ks-source-grim #x12c7)
|
||||
(progress-ks-source-mog #x12c8)
|
||||
(progress-ks-source-metalhead #x12c9)
|
||||
(progress-ks-source-other-bot #x12ca)
|
||||
(progress-ks-source-other-enemy #x12cb)
|
||||
(progress-input-options-auto-hide-cursor #x1300)
|
||||
(progress-menu-reassign-binds #x1301)
|
||||
(progress-reassign-binds-controller #x1302)
|
||||
(progress-reassign-binds-keyboard #x1303)
|
||||
(progress-reassign-binds-mouse #x1304)
|
||||
(progress-multiselect-no-items-found #x1305)
|
||||
(progress-keybinds-waiting-for-bind #x1306)
|
||||
(progress-keybinds-unset #x1307)
|
||||
(progress-unknown-option #x1308)
|
||||
(progress-hires-sky #x1309)
|
||||
(progress-fast-airlock #x130a)
|
||||
(progress-fast-elevator #x130b)
|
||||
(progress-highscores-header-speedrun #x130c)
|
||||
(progress-highscores-subheader-speedrun-any #x130d)
|
||||
(progress-highscores-subheader-speedrun-anyhoverless #x130e)
|
||||
(progress-highscores-subheader-speedrun-allmissions #x130f)
|
||||
(progress-highscores-subheader-speedrun-100 #x1310)
|
||||
(progress-highscores-subheader-speedrun-anyorbs #x1311)
|
||||
(progress-highscores-subheader-speedrun-anyhero #x1312)
|
||||
(progress-highscores-local-time #x1313)
|
||||
(progress-fps-disclaimer-warning #x1314)
|
||||
(progress-fps-disclaimer #x1315)
|
||||
(progress-highscores-local-score #x1316)
|
||||
(trick-board-none #x1320)
|
||||
(trick-board-spin #x1321)
|
||||
(trick-board-boost #x1322)
|
||||
(trick-board-flip #x1323)
|
||||
(trick-board-rail #x1324)
|
||||
(trick-board-rail-jump #x1325)
|
||||
(trick-board-nosegrab #x1326)
|
||||
(trick-board-method #x1327)
|
||||
(trick-board-board-spin #x1328)
|
||||
(trick-board-board-flip #x1329)
|
||||
(trick-board-noseflip #x132a)
|
||||
(trick-board-kickflip #x132b)
|
||||
(trick-board-jump #x132c)
|
||||
(trick-board-duck-jump #x132d)
|
||||
(trick-board-quick-jump #x132e)
|
||||
(trick-darkjak #x132f)
|
||||
(trick-darkjak-bomb0 #x1330)
|
||||
(trick-darkjak-bomb1 #x1331)
|
||||
(trick-darkjak-giant #x1332)
|
||||
(progress-graphics-ps2 #x1333)
|
||||
(progress-graphics-actor-culling #x1334)
|
||||
(progress-graphics-force-envmap #x1335)
|
||||
(progress-fast-progress #x1336)
|
||||
(progress-graphics-ps2-lod-dist #x1337)
|
||||
(progress-graphics-msaa-off #x1338)
|
||||
(progress-graphics-display #x1339)
|
||||
(language-name-finnish #x133a)
|
||||
(progress-hint-subtitles #x133b)
|
||||
(language-name-portuguese #x133c)
|
||||
(language-name-swedish #x133d)
|
||||
(language-name-danish #x133e)
|
||||
(language-name-norwegian #x133f)
|
||||
(language-name-dutch #x1340)
|
||||
(language-name-br-portuguese #x1341)
|
||||
(language-name-hungarian #x1342)
|
||||
(language-name-catalan #x1343)
|
||||
(language-name-icelandic #x1344)
|
||||
(language-name-polish #x1345)
|
||||
(language-name-lithuanian #x1346)
|
||||
(language-name-czech #x1347)
|
||||
(language-name-croatian #x1348)
|
||||
(language-name-galician #x1349)
|
||||
(progress-controller-options-enable-pressure-sensitivity #x134a)
|
||||
(progress-controller-options-swap-r1-r2 #x134b)
|
||||
(progress-controller-options-enable-trigger-effects #x134c)
|
||||
(progress-misc-fix-projectile-focus #x134d)
|
||||
)
|
||||
;; ---text-id
|
||||
|
||||
|
||||
@@ -219,7 +219,9 @@
|
||||
(defmethod lookup-text ((this level) (arg0 text-id) (arg1 symbol))
|
||||
(let ((v1-0 *common-text*))
|
||||
(dotimes (a3-0 (-> this loaded-text-info-count))
|
||||
(if (= (-> this loaded-text-info a3-0 language-id) (-> *setting-control* user-current language))
|
||||
;; og:preserve-this added
|
||||
(if (= (-> this loaded-text-info a3-0 language-id) (#if PC_PORT (the language-enum (-> *pc-settings* text-language))
|
||||
(-> *setting-control* user-current language)))
|
||||
(set! v1-0 (-> this loaded-text-info a3-0))
|
||||
)
|
||||
)
|
||||
@@ -233,12 +235,18 @@
|
||||
(defun load-game-text-info ((arg0 string) (arg1 (pointer object)) (arg2 kheap))
|
||||
(local-vars (v0-4 int) (sv-16 object) (sv-20 int) (sv-24 int) (sv-32 int))
|
||||
(set! sv-16 (-> arg1 0))
|
||||
(set! sv-20 (the-as int (-> *setting-control* user-current language)))
|
||||
;; og:preserve-this added
|
||||
(set! sv-20 (#if PC_PORT (the int (-> *pc-settings* text-language))
|
||||
(-> *setting-control* user-current language)))
|
||||
(set! sv-24 0)
|
||||
(set! sv-32 (&- (-> arg2 top) (the-as uint (-> arg2 base))))
|
||||
(if (and (= (scf-get-territory) 1) (= sv-20 (language-enum english)) (not (demo?)))
|
||||
(set! sv-20 11)
|
||||
)
|
||||
;; english -> UK english in PAL
|
||||
;; og:preserve-this no longer necessary.
|
||||
(#unless PC_PORT
|
||||
(if (and (= (scf-get-territory) GAME_TERRITORY_SCEE) (= sv-24 (the int (language-enum english))) (not (demo?)))
|
||||
(set! sv-24 (the int (language-enum uk-english)))
|
||||
)
|
||||
)
|
||||
(when (and (or (= sv-16 #f)
|
||||
(!= (-> (the-as game-text-info sv-16) language-id) sv-20)
|
||||
(not (string= (-> (the-as game-text-info sv-16) group-name) arg0))
|
||||
@@ -310,8 +318,8 @@
|
||||
(when (or *level-text-file-load-flag* (>= arg0 0))
|
||||
(load-game-text-info "common" (&-> '*common-text* value) *common-text-heap*)
|
||||
(#when PC_PORT
|
||||
(protect ((-> *setting-control* user-current language))
|
||||
(set! (-> *setting-control* user-current language) (language-enum english))
|
||||
(protect ((-> *pc-settings* text-language))
|
||||
(set! (-> *pc-settings* text-language) (pc-language english))
|
||||
(load-game-text-info "common" (&-> '*fallback-text* value) *fallback-text-heap*))))
|
||||
(none))
|
||||
|
||||
@@ -564,6 +572,10 @@
|
||||
(set! (-> arg1 origin y) sv-20)
|
||||
(set! (-> arg1 flags) sv-24)
|
||||
(set! (-> arg1 color) sv-28)
|
||||
;; og:preserve-this
|
||||
(#when PC_PORT
|
||||
(if (and *debug-segment* *display-text-box*)
|
||||
(draw-debug-text-box arg1)))
|
||||
(if (> sv-64 0)
|
||||
(* sv-56 (the float sv-64))
|
||||
0.0
|
||||
|
||||
@@ -42,6 +42,19 @@
|
||||
(uk-english 11)
|
||||
)
|
||||
|
||||
(defenum language-enum-s32
|
||||
:type int32
|
||||
:copy-entries language-enum
|
||||
)
|
||||
|
||||
(defenum runtime-exit-status
|
||||
:type uint32
|
||||
(running)
|
||||
(restart-runtime)
|
||||
(exit)
|
||||
(restart-in-debug)
|
||||
)
|
||||
|
||||
;; fixed symbols
|
||||
(define-extern #f symbol)
|
||||
(define-extern #t symbol)
|
||||
@@ -198,9 +211,19 @@
|
||||
(define-extern pc-set-auto-hide-cursor! (function symbol none))
|
||||
(define-extern pc-get-pressure-sensitivity-enabled? (function symbol))
|
||||
(define-extern pc-set-pressure-sensitivity-enabled! (function symbol none))
|
||||
(define-extern pc-current-controller-has-pressure-sensitivity? (function symbol))
|
||||
(define-extern pc-current-controller-has-trigger-effect-support? (function symbol))
|
||||
(define-extern pc-get-trigger-effects-enabled? (function symbol))
|
||||
(define-extern pc-set-trigger-effects-enabled! (function symbol none))
|
||||
(defenum pc-trigger-effect-option
|
||||
(left 0)
|
||||
(right 1)
|
||||
(both 2))
|
||||
(define-extern pc-clear-trigger-effect! (function pc-trigger-effect-option none))
|
||||
(define-extern pc-send-trigger-effect-feedback! (function pc-trigger-effect-option int int none))
|
||||
(define-extern pc-send-trigger-effect-vibrate! (function pc-trigger-effect-option int int int none))
|
||||
(define-extern pc-send-trigger-effect-weapon! (function pc-trigger-effect-option int int int none))
|
||||
(define-extern pc-send-trigger-rumble! (function int int int none))
|
||||
|
||||
;; Display Related Functions
|
||||
(define-extern pc-get-display-mode (function symbol))
|
||||
|
||||
@@ -1684,8 +1684,8 @@
|
||||
)
|
||||
|
||||
(deftype prebot-medium-eco-creature (prebot-large-eco-creature)
|
||||
((is-top basic)
|
||||
(is-bottom basic)
|
||||
((is-top symbol)
|
||||
(is-bottom symbol)
|
||||
(initial-scale float)
|
||||
(final-scale float)
|
||||
)
|
||||
@@ -2327,7 +2327,7 @@
|
||||
)
|
||||
|
||||
(defmethod prebot-medium-eco-creature-method-196 ((this prebot-medium-eco-creature))
|
||||
(set! (-> this is-top) (the-as basic #t))
|
||||
(set! (-> this is-top) #t)
|
||||
(let ((v1-2 (-> this node-list data 32)))
|
||||
(set! (-> v1-2 param0) prebot-eco-creature-joint-callback)
|
||||
(set! (-> v1-2 param1) (the-as basic #x3d23d70a))
|
||||
@@ -2389,7 +2389,7 @@
|
||||
)
|
||||
|
||||
(defmethod prebot-medium-eco-creature-method-197 ((this prebot-medium-eco-creature))
|
||||
(set! (-> this is-bottom) (the-as basic #t))
|
||||
(set! (-> this is-bottom) #t)
|
||||
(let ((v1-2 (-> this node-list data 4)))
|
||||
(set! (-> v1-2 param0) prebot-eco-creature-joint-callback)
|
||||
(set! (-> v1-2 param1) (the-as basic #x3d23d70a))
|
||||
|
||||
@@ -966,6 +966,8 @@
|
||||
)
|
||||
|
||||
(defbehavior factory-fighter-init-by-other factory-fighter ()
|
||||
;; og:preserve-this added
|
||||
(stack-size-set! (-> self main-thread) 512)
|
||||
(init-collision! self)
|
||||
(quaternion-identity! (-> self root quat))
|
||||
(vector-identity! (-> self root scale))
|
||||
|
||||
@@ -391,7 +391,9 @@
|
||||
(sound-stop (-> self sound-id-loop))
|
||||
)
|
||||
:trans (behavior ()
|
||||
(while (and *target* (not (logtest? (-> *target* focus-status) (focus-status dead))))
|
||||
;; og:preserve-this fix infinite loop when this state is entered while debug hovering
|
||||
; (while (and *target* (not (logtest? (-> *target* focus-status) (focus-status dead))))
|
||||
(when (and *target* (not (focus-test? *target* dead)))
|
||||
(send-event
|
||||
*target*
|
||||
'attack-invinc
|
||||
|
||||
@@ -104,7 +104,13 @@
|
||||
|
||||
;; other
|
||||
(controller-led-status? symbol)
|
||||
(controller-swap-r1-r2? symbol)
|
||||
(speedrunner-mode-custom-bind uint32)
|
||||
|
||||
(memcard-subtitles? symbol)
|
||||
|
||||
(text-language pc-language) ;; language for game text
|
||||
(subtitle-language pc-language)
|
||||
)
|
||||
|
||||
(:methods
|
||||
@@ -152,6 +158,13 @@
|
||||
(false! (-> obj minimap-force-north))
|
||||
(false! (-> obj hires-clouds?))
|
||||
(set! (-> obj speedrunner-mode-custom-bind) 0)
|
||||
|
||||
(set! (-> obj memcard-volume-sfx) 0.5)
|
||||
(set! (-> obj memcard-volume-music) 0.4)
|
||||
(set! (-> obj memcard-volume-dialog) 0.75)
|
||||
(set! (-> obj memcard-vibration?) #t)
|
||||
(set! (-> obj memcard-subtitles?) #f)
|
||||
(set! (-> obj hinttitles?) #t)
|
||||
0)
|
||||
|
||||
(defmethod reset-extra ((obj pc-settings-jak3) (call-handlers symbol))
|
||||
|
||||
@@ -214,6 +214,11 @@
|
||||
|
||||
(set! (-> obj music-unlocked) (new 'global 'bit-array (-> *music-player-tracks* length)))
|
||||
((method-of-type pc-settings initialize) obj)
|
||||
(set! (-> *setting-control* user-default sfx-volume) (-> obj memcard-volume-sfx))
|
||||
(set! (-> *setting-control* user-default music-volume) (-> obj memcard-volume-music))
|
||||
(set! (-> *setting-control* user-default dialog-volume) (-> obj memcard-volume-dialog))
|
||||
(set! (-> *setting-control* user-default vibration) (-> obj memcard-vibration?))
|
||||
(set! (-> *setting-control* user-default subtitle) (-> obj memcard-subtitles?))
|
||||
obj)
|
||||
|
||||
(defmethod set-game-setting! ((obj pc-settings-jak3) (setting symbol) (value symbol))
|
||||
@@ -612,6 +617,7 @@
|
||||
(("cheats-purchased") (set! (-> obj cheats-purchased) (the-as pc-cheats (file-stream-read-int file))))
|
||||
(("cheats-unlocked") (set! (-> obj cheats-unlocked) (the-as pc-cheats (file-stream-read-int file))))
|
||||
(("cheats-backup") (file-stream-read-int file)) ;; TODO - Don't remove this, parsing code can't handle unexpected keys
|
||||
(("memcard-subtitles?") (set! (-> obj memcard-subtitles?) (file-stream-read-symbol file)))
|
||||
(("music-unlocked")
|
||||
(dotimes (i (/ (align64 (-> obj music-unlocked length)) 64))
|
||||
(bit-array<-int64 (-> obj music-unlocked) (* i 64) (file-stream-read-int file))
|
||||
@@ -663,6 +669,7 @@
|
||||
(format file " (cheats-revealed #x~x)~%" (-> obj cheats-revealed))
|
||||
(format file " (cheats-purchased #x~x)~%" (-> obj cheats-purchased))
|
||||
(format file " (cheats-unlocked #x~x)~%" (-> obj cheats-unlocked))
|
||||
(format file " (memcard-subtitles? ~A)~%" (-> obj memcard-subtitles?))
|
||||
|
||||
(format file " (music-unlocked")
|
||||
(dotimes (i (/ (align64 (-> obj music-unlocked length)) 64))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,634 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
|
||||
;;
|
||||
|
||||
(defglobalconstant DEBUG_PAGE_ROWS #f)
|
||||
|
||||
(defconstant FONT_SIZE_HEADER 0.6) ;; font size for the decoration text
|
||||
(defconstant FONT_SIZE_OPTION 0.5) ;; font size for regular options
|
||||
(defconstant FONT_SIZE_OPTION_EXTRA 0.35) ;; font size for option sub-text
|
||||
(defconstant HIGHLIGHT_SIZE 18) ;; default highlight size for options
|
||||
(defconstant HIGHLIGHT_SIZE_LARGE 33)
|
||||
|
||||
|
||||
;;
|
||||
|
||||
|
||||
(defun draw-page-border ((hud-bounds hud-box) (alpha float))
|
||||
(let ((x-pos 70)
|
||||
(y-pos 112)
|
||||
(width 375)
|
||||
(background-height 200))
|
||||
(when (= (get-aspect-ratio) 'aspect16x9)
|
||||
(set! x-pos 79)
|
||||
(set! y-pos 86)
|
||||
(set! width 356)
|
||||
(set! background-height 255))
|
||||
(#when PC_PORT
|
||||
;; added for better widescreen handling
|
||||
(when (not (-> *pc-settings* use-vis?))
|
||||
(set! x-pos (the int (adjust-game-x (the float x-pos))))
|
||||
(set! width (the int (* (-> *pc-settings* aspect-ratio-reciprocal) width)))))
|
||||
(set-vector! (-> hud-bounds color) 128 128 64 (the int (* 128.0 alpha)))
|
||||
;; Top Line
|
||||
(set! (-> hud-bounds min x) (the float x-pos))
|
||||
(set! (-> hud-bounds max x) (the float (+ x-pos width)))
|
||||
(set! (-> hud-bounds min y) (the float y-pos))
|
||||
(set! (-> hud-bounds max y) (the float y-pos))
|
||||
(with-dma-buffer-add-bucket ((buffer-1 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id hud-draw-hud-alpha))
|
||||
(draw-box-prim-only hud-bounds buffer-1))
|
||||
;; Bottom Line
|
||||
(set! (-> hud-bounds min x) (the float x-pos))
|
||||
(set! (-> hud-bounds max x) (the float (+ x-pos width)))
|
||||
(set! (-> hud-bounds min y) (the float (+ y-pos background-height)))
|
||||
(set! (-> hud-bounds max y) (the float (+ y-pos background-height)))
|
||||
(with-dma-buffer-add-bucket ((buffer-2 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id hud-draw-hud-alpha))
|
||||
(draw-box-prim-only hud-bounds buffer-2)))
|
||||
(none))
|
||||
|
||||
(defun draw-page-background ((alpha float))
|
||||
(let ((x-pos 70)
|
||||
(y-pos 112)
|
||||
(width 375)
|
||||
(background-height 200))
|
||||
(when (= (get-aspect-ratio) 'aspect16x9)
|
||||
(set! x-pos 79)
|
||||
(set! y-pos 86)
|
||||
(set! width 356)
|
||||
(set! background-height 256))
|
||||
(#when PC_PORT
|
||||
;; added for better widescreen handling
|
||||
(when (not (-> *pc-settings* use-vis?))
|
||||
(set! x-pos (the int (adjust-game-x (the float x-pos))))
|
||||
(set! width (the int (* (-> *pc-settings* aspect-ratio-reciprocal) width)))))
|
||||
(with-dma-buffer-add-bucket ((buffer (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id bucket7))
|
||||
(draw-sprite2d-xy buffer x-pos y-pos width background-height
|
||||
(new 'static 'rgba :r #x80 :g #x80 :b #x40 :a (the int (* 64.0 alpha))) #x3fffff)
|
||||
))
|
||||
(none))
|
||||
|
||||
(defun draw-page-header ((font-ctx font-context) (text text-id) (alpha float))
|
||||
(let ((x-pos 70)
|
||||
(y-pos 82)
|
||||
(width 375))
|
||||
(when (= (get-aspect-ratio) 'aspect16x9)
|
||||
(set! x-pos 79)
|
||||
(set! y-pos 55)
|
||||
(set! width 356))
|
||||
; (progress-method-42 (-> *progress-process*) (-> *progress-work* header) (* 64.0 alpha))
|
||||
; (progress-method-41 (-> *progress-process*) (-> *progress-work* header) (* 128.0 alpha))
|
||||
(set-scale! font-ctx FONT_SIZE_HEADER)
|
||||
(set! (-> font-ctx origin y) (the float y-pos))
|
||||
(set-color! font-ctx (font-color font-color-32))
|
||||
(print-game-text (lookup-text! *common-text* text #f) font-ctx #f 44 (bucket-id hud-draw-hud-alpha)))
|
||||
(none))
|
||||
|
||||
(defun draw-scrolling-page-up-down-arrows ((font-ctx font-context) (draw-up? symbol) (draw-down? symbol))
|
||||
(let ((new-x-pos 250.0)
|
||||
(new-y-pos-up 100)
|
||||
(new-y-pos-down 211)
|
||||
(new-scale 0.5)
|
||||
(old-scale (-> font-ctx scale))
|
||||
(old-x-pos (-> font-ctx origin x))
|
||||
(old-y-pos (-> font-ctx origin y)))
|
||||
(when (= (get-aspect-ratio) 'aspect16x9)
|
||||
(set! new-x-pos 251.5)
|
||||
(set! new-y-pos-up 75)
|
||||
(set! new-y-pos-down 265))
|
||||
(set! (-> font-ctx scale) new-scale)
|
||||
(when draw-up?
|
||||
(set! (-> font-ctx origin x) (the float new-x-pos))
|
||||
(set! (-> font-ctx origin y) (the float new-y-pos-up))
|
||||
(let ((print-text-fn print-game-text))
|
||||
(format (clear *progress-generic-temp-string*) "~33L~C" 160)
|
||||
(print-text-fn *progress-generic-temp-string* font-ctx #f 44 (bucket-id hud-draw-hud-alpha))))
|
||||
(when draw-down?
|
||||
(set! (-> font-ctx origin x) (the float new-x-pos))
|
||||
(set! (-> font-ctx origin y) (the float (+ new-y-pos-up new-y-pos-down)))
|
||||
(let ((print-text-fn-1 print-game-text))
|
||||
(format (clear *progress-generic-temp-string*) "~33L~C" 162)
|
||||
(print-text-fn-1 *progress-generic-temp-string* font-ctx #f 44 (bucket-id hud-draw-hud-alpha))))
|
||||
(set! (-> font-ctx origin x) old-x-pos)
|
||||
(set! (-> font-ctx origin y) old-y-pos)
|
||||
(set! (-> font-ctx scale) old-scale))
|
||||
(none))
|
||||
|
||||
;; The boundary info could be moved to the menu-option, every one of these is duplicate code
|
||||
(defun begin-scissor-scrolling-page ((hud-bounds hud-box))
|
||||
(cond
|
||||
((= (get-aspect-ratio) 'aspect16x9)
|
||||
(set! (-> hud-bounds min x) 19.0)
|
||||
(set! (-> hud-bounds min y) 86.0)
|
||||
(set! (-> hud-bounds max x) 494.0)
|
||||
(set! (-> hud-bounds max y) 340.0))
|
||||
(else
|
||||
(set! (-> hud-bounds min x) 70.0)
|
||||
(set! (-> hud-bounds min y) 112.0)
|
||||
(set! (-> hud-bounds max x) 444.0)
|
||||
(set! (-> hud-bounds max y) 312.0)))
|
||||
(#when PC_PORT
|
||||
(set! (-> hud-bounds min x) (the float (the int (adjust-game-x (-> hud-bounds min x)))))
|
||||
(set! (-> hud-bounds max x) (the float (the int (adjust-game-x (-> hud-bounds max x))))))
|
||||
(with-dma-buffer-add-bucket ((buffer (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id hud-draw-hud-alpha))
|
||||
(setup-scissor hud-bounds buffer))
|
||||
(none))
|
||||
|
||||
(defun end-scissor-scrolling-page ((hud-bounds hud-box) (arg1 float))
|
||||
(with-dma-buffer-add-bucket ((buffer (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id hud-draw-hud-alpha)
|
||||
)
|
||||
(restore-scissor hud-bounds buffer))
|
||||
(none))
|
||||
|
||||
(defun-debug draw-generic-page-row-line ((y-coord int))
|
||||
(#when DEBUG_PAGE_ROWS
|
||||
(with-dma-buffer-add-bucket ((buf (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id debug-no-zbuf2))
|
||||
(draw-sprite2d-xy buf 0 y-coord 512 1 (static-rgba #xff #xff #xff #x40) #x3fffff)))
|
||||
0)
|
||||
|
||||
(defmethod draw-option ((obj menu-generic-scrolling-page) (progress progress) (font-ctx font-context) (arg3 int) (arg4 symbol))
|
||||
(when (or (zero? (-> obj mounted?)) (not (-> obj mounted?)))
|
||||
(on-mount! obj))
|
||||
;; the list has a total of 200px of y-height
|
||||
;; with 10px of margin at the top and bottom, that leaves 180 / 4 = 45px per item
|
||||
;; it's the responsibility of each generic component to center itself within these 45px lines
|
||||
(when (not (-> *progress-pc-generic-store* clear-screen?))
|
||||
(let* ((font-alpha (fmax 0.0 (* 2.0 (- 0.5 (-> progress menu-transition)))))
|
||||
(hud-bounds (new 'stack-no-clear 'hud-box))
|
||||
(max-page-size (if (= (get-aspect-ratio) 'aspect16x9) 7 5))
|
||||
(margin-top-bottom 0.0)
|
||||
(line-height (/ (if (= (get-aspect-ratio) 'aspect16x9) 253.0 200.0) max-page-size)))
|
||||
(set! (-> font-ctx alpha) font-alpha)
|
||||
(set-color! font-ctx (font-color font-color-32))
|
||||
;; header
|
||||
(draw-page-header font-ctx (-> obj name) font-alpha)
|
||||
;; background borders
|
||||
(draw-page-border (-> obj box 0) font-alpha)
|
||||
;; background
|
||||
(draw-page-background font-alpha)
|
||||
(begin-scissor-scrolling-page hud-bounds)
|
||||
(if (= (get-aspect-ratio) 'aspect16x9)
|
||||
(set! (-> font-ctx origin y) (+ 86.0 margin-top-bottom))
|
||||
(set! (-> font-ctx origin y) (+ 112.0 margin-top-bottom)))
|
||||
|
||||
;; do scrolling. if we notice we need to scroll too much, we just snap immediately instead of smoothly stepping.
|
||||
(cond
|
||||
((> (-> *progress-pc-generic-store* current-menu-scroll-index) (-> *progress-pc-generic-store* current-menu-hover-index))
|
||||
(if (>= (fabs (- (-> *progress-pc-generic-store* current-menu-scroll-index) (the float (-> *progress-pc-generic-store* current-menu-hover-index)))) 2.0)
|
||||
(set! (-> *progress-pc-generic-store* current-menu-scroll-index) (the float (-> *progress-pc-generic-store* current-menu-hover-index)))
|
||||
(seek-ease! (-> *progress-pc-generic-store* current-menu-scroll-index) (the float (-> *progress-pc-generic-store* current-menu-hover-index)) (* 0.125 (-> PP clock time-adjust-ratio)) 0.3 (* 0.00125 (-> PP clock time-adjust-ratio)))))
|
||||
((< (+ (-> *progress-pc-generic-store* current-menu-scroll-index) (1- max-page-size)) (-> *progress-pc-generic-store* current-menu-hover-index))
|
||||
(if (>= (fabs (- (-> *progress-pc-generic-store* current-menu-scroll-index) (the float (- (-> *progress-pc-generic-store* current-menu-hover-index) (1- max-page-size))))) 2.0)
|
||||
(set! (-> *progress-pc-generic-store* current-menu-scroll-index) (the float (- (-> *progress-pc-generic-store* current-menu-hover-index) (1- max-page-size))))
|
||||
(seek-ease! (-> *progress-pc-generic-store* current-menu-scroll-index) (the float (- (-> *progress-pc-generic-store* current-menu-hover-index) (1- max-page-size))) (* 0.125 (-> PP clock time-adjust-ratio)) 0.3 (* 0.00125 (-> PP clock time-adjust-ratio)))))
|
||||
)
|
||||
|
||||
;; render items
|
||||
(let* ((start-index (the int (-> *progress-pc-generic-store* current-menu-scroll-index)))
|
||||
;; we add 1 because the scroll effect will reveal 1 extra
|
||||
(end-index (min (-> obj menu-options length) (+ start-index max-page-size 1))))
|
||||
;; scroll adjust
|
||||
(-! (-> font-ctx origin y) (* line-height (fabs (- (-> *progress-pc-generic-store* current-menu-scroll-index) start-index))))
|
||||
(while (< start-index end-index)
|
||||
(let ((menu-option (-> obj menu-options start-index)))
|
||||
(when (nonzero? menu-option)
|
||||
;; save the y,x position as who knows where it will end up after the component finishes rendering
|
||||
(let ((old-y-pos (-> font-ctx origin y))
|
||||
(old-x-pos (-> font-ctx origin x)))
|
||||
(draw-option menu-option progress font-ctx start-index
|
||||
(= (-> obj selected-option-index) start-index))
|
||||
;; move to the next line
|
||||
(set! (-> font-ctx origin y) (+ old-y-pos line-height))
|
||||
;; - debugging, draw the dividing lines to make centering new items easier
|
||||
(draw-generic-page-row-line (the int (-> font-ctx origin y)))
|
||||
(set! (-> font-ctx origin x) old-x-pos)
|
||||
;; reset the font color
|
||||
(set-color! font-ctx (font-color font-color-32)))))
|
||||
(+! start-index 1)))
|
||||
;; end
|
||||
(end-scissor-scrolling-page hud-bounds 1.0)
|
||||
(set-flags! font-ctx (font-flags kerning large))
|
||||
(let ((draw-up-arrow? (< 0 (-> *progress-pc-generic-store* current-menu-hover-index)))
|
||||
(draw-down-arrow? (< (-> *progress-pc-generic-store* current-menu-hover-index) (1- (-> obj menu-options length)))))
|
||||
(draw-scrolling-page-up-down-arrows font-ctx draw-up-arrow? draw-down-arrow?))))
|
||||
(none))
|
||||
|
||||
(defun draw-generic-highlight ((y-pos int) (height int) (alpha float))
|
||||
(let ((x-pos (if (= (get-aspect-ratio) 'aspect4x3)
|
||||
70
|
||||
50))
|
||||
(width (if (= (get-aspect-ratio) 'aspect4x3)
|
||||
374
|
||||
500)))
|
||||
(when (not (-> *pc-settings* use-vis?))
|
||||
(set! x-pos (the int (adjust-game-x (the float x-pos))))
|
||||
(set! width (the int (* (-> *pc-settings* aspect-ratio-reciprocal) width))))
|
||||
(with-dma-buffer-add-bucket ((buffer (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id hud-draw-hud-alpha)
|
||||
)
|
||||
(draw-sprite2d-xy buffer x-pos y-pos width height
|
||||
(new 'static 'rgba :r #x80 :g #x80 :b #x40 :a (the int (* 64.0 alpha))) #x3fffff))))
|
||||
|
||||
(defmethod draw-option ((obj menu-generic-boolean-option) (arg0 progress) (font-ctx font-context) (option-index int) (selected? symbol))
|
||||
(when (not (-> obj mounted?))
|
||||
(on-mount! obj))
|
||||
(let ((alpha (* 2.0 (- 0.5 (-> arg0 menu-transition))))
|
||||
(line-height 18.0))
|
||||
(fmax! alpha 0.0)
|
||||
(set! (-> font-ctx alpha) alpha)
|
||||
(set-flags! font-ctx (font-flags kerning middle large))
|
||||
(set-scale! font-ctx FONT_SIZE_OPTION)
|
||||
(+! (-> font-ctx origin y) (if (= (get-aspect-ratio) 'aspect4x3) 7.0 5.0))
|
||||
(cond
|
||||
(selected?
|
||||
(set-color! font-ctx (font-color font-color-34))
|
||||
(draw-generic-highlight (the int (- (-> font-ctx origin y) 2.0)) HIGHLIGHT_SIZE_LARGE alpha)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) font-ctx #f 44 (bucket-id hud-draw-hud-alpha))
|
||||
(+! (-> font-ctx origin y) line-height)
|
||||
(set! *progress-generic-temp-string* (clear *progress-generic-temp-string*))
|
||||
(if (-> obj value)
|
||||
(format *progress-generic-temp-string* "~33L~S~44L ~S" (lookup-text! *common-text* (-> obj truthy-text) #f) (lookup-text! *common-text* (-> obj falsey-text) #f))
|
||||
(format *progress-generic-temp-string* "~44L~S ~33L~S~1L" (lookup-text! *common-text* (-> obj truthy-text) #f) (lookup-text! *common-text* (-> obj falsey-text) #f))))
|
||||
;; hover case
|
||||
(else
|
||||
(cond
|
||||
((and (nonzero? (-> obj should-disable?))
|
||||
(-> obj should-disable?)
|
||||
((-> obj should-disable?)))
|
||||
(set-color! font-ctx (font-color font-color-44))
|
||||
(when (= option-index (-> *progress-pc-generic-store* current-menu-hover-index))
|
||||
(draw-generic-highlight (the int (+ -2.0 (-> font-ctx origin y))) HIGHLIGHT_SIZE (* 0.5 alpha))))
|
||||
((= option-index (-> *progress-pc-generic-store* current-menu-hover-index))
|
||||
(set-color! font-ctx (font-color font-color-33))
|
||||
(draw-generic-highlight (the int (+ -2.0 (-> font-ctx origin y))) HIGHLIGHT_SIZE alpha))
|
||||
(else
|
||||
(set-color! font-ctx (font-color font-color-32))))
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) font-ctx #f 44 (bucket-id hud-draw-hud-alpha))
|
||||
(+! (-> font-ctx origin y) line-height)
|
||||
(set! *progress-generic-temp-string* (clear *progress-generic-temp-string*))
|
||||
(let ((actual-value (call-get-value-fn obj)))
|
||||
(if actual-value
|
||||
(format *progress-generic-temp-string* "~1L~S~44L ~S" (lookup-text! *common-text* (-> obj truthy-text) #f) (lookup-text! *common-text* (-> obj falsey-text) #f))
|
||||
(format *progress-generic-temp-string* "~44L~S ~1L~S~1L" (lookup-text! *common-text* (-> obj truthy-text) #f) (lookup-text! *common-text* (-> obj falsey-text) #f))))))
|
||||
(set-scale! font-ctx FONT_SIZE_OPTION_EXTRA)
|
||||
(print-game-text *progress-generic-temp-string* font-ctx #f 44 (bucket-id hud-draw-hud-alpha)))
|
||||
(none))
|
||||
|
||||
(defmethod draw-option ((obj menu-generic-carousel-option)
|
||||
(progress progress)
|
||||
(font-ctx font-context)
|
||||
(option-index int)
|
||||
(selected? symbol))
|
||||
(when (not (-> obj mounted?))
|
||||
(on-mount! obj))
|
||||
(let ((alpha (fmax (* 2.0 (- 0.5 (-> progress menu-transition))) 0.0)))
|
||||
(set! (-> font-ctx scale) 0.45)
|
||||
(set! (-> font-ctx alpha) alpha)
|
||||
(+! (-> font-ctx origin y) 5.0)
|
||||
(set-flags! font-ctx (font-flags kerning middle large))
|
||||
;; the item label
|
||||
(cond
|
||||
(selected?
|
||||
(set! (-> font-ctx color) (font-color font-color-34))
|
||||
(draw-generic-highlight (the int (- (-> font-ctx origin y) 2.0)) HIGHLIGHT_SIZE_LARGE alpha))
|
||||
((and (nonzero? (-> obj should-disable?))
|
||||
(!= (-> obj should-disable?) #f)
|
||||
((-> obj should-disable?)))
|
||||
(set-color! font-ctx (font-color font-color-32))
|
||||
(when (= option-index (-> *progress-pc-generic-store* current-menu-hover-index))
|
||||
(draw-generic-highlight (the int (+ -2.0 (-> font-ctx origin y))) HIGHLIGHT_SIZE (* 0.5 alpha))))
|
||||
((= option-index (-> *progress-pc-generic-store* current-menu-hover-index))
|
||||
(set! (-> font-ctx color) (font-color font-color-33))
|
||||
(draw-generic-highlight (the int (- (-> font-ctx origin y) 2.0)) HIGHLIGHT_SIZE alpha)))
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) font-ctx #f 44 (bucket-id hud-draw-hud-alpha))
|
||||
(+! (-> font-ctx origin y) 18.0)
|
||||
(set! (-> font-ctx scale) 0.35)
|
||||
(set! (-> font-ctx color) (font-color font-color-34))
|
||||
;; the value
|
||||
(cond
|
||||
((or (< (-> obj item-index) 0) (> (-> obj item-index) (num-items obj)))
|
||||
(print-game-text (lookup-text! *common-text* (text-id progress-multiselect-no-items-found) #f) font-ctx #f 44 (bucket-id hud-draw-hud-alpha)))
|
||||
((and selected? (>= (-> obj item-index) 0) (< (-> obj item-index) (num-items obj)))
|
||||
(format (clear *progress-generic-temp-string*) "~33L~C ~S ~33L~C" 163 (get-item-label obj (-> obj item-index)) 161)
|
||||
(print-game-text *progress-generic-temp-string* font-ctx #f 44 (bucket-id hud-draw-hud-alpha)))
|
||||
(else
|
||||
(let ((actual-index (call-get-item-index-fn obj)))
|
||||
(print-game-text (get-item-label obj actual-index) font-ctx #f 44 (bucket-id hud-draw-hud-alpha))))))
|
||||
(none))
|
||||
|
||||
(defun draw-generic-simple-string-option ((option menu-generic-option) (progress progress) (font-ctx font-context) (option-index int) (str string))
|
||||
(let ((alpha (* 2.0 (- 0.5 (-> progress menu-transition))))
|
||||
(line-height 23.0))
|
||||
(fmax! alpha 0.0)
|
||||
(set! (-> font-ctx alpha) alpha)
|
||||
(set-flags! font-ctx (font-flags kerning middle large))
|
||||
(set-scale! font-ctx FONT_SIZE_OPTION)
|
||||
(+! (-> font-ctx origin y) (if (= (get-aspect-ratio) 'aspect4x3) 14.0 11.0))
|
||||
(cond
|
||||
((and (nonzero? (-> option should-disable?))
|
||||
(!= (-> option should-disable?) #f)
|
||||
((-> option should-disable?)))
|
||||
(set-color! font-ctx (font-color font-color-44))
|
||||
(when (= option-index (-> *progress-pc-generic-store* current-menu-hover-index))
|
||||
(draw-generic-highlight (the int (+ -2.0 (-> font-ctx origin y))) HIGHLIGHT_SIZE (* 0.5 alpha))))
|
||||
((= option-index (-> *progress-pc-generic-store* current-menu-hover-index))
|
||||
(set-color! font-ctx (font-color font-color-33))
|
||||
(draw-generic-highlight (the int (+ -2.0 (-> font-ctx origin y))) HIGHLIGHT_SIZE alpha))
|
||||
(else
|
||||
(set-color! font-ctx (font-color font-color-32))))
|
||||
(print-game-text str font-ctx #f 44 (bucket-id hud-draw-hud-alpha)))
|
||||
(none))
|
||||
|
||||
(defmethod draw-option ((obj menu-generic-link-option) (progress progress) (font-ctx font-context) (option-index int) (selected? symbol))
|
||||
(when (not (-> obj mounted?))
|
||||
(on-mount! obj))
|
||||
(draw-generic-simple-string-option obj progress font-ctx option-index (lookup-text! *common-text* (-> obj name) #f))
|
||||
(none))
|
||||
|
||||
(defmethod draw-option ((obj menu-generic-button-option) (progress progress) (font-ctx font-context) (option-index int) (selected? symbol))
|
||||
(when (not (-> obj mounted?))
|
||||
(on-mount! obj))
|
||||
(draw-generic-simple-string-option obj progress font-ctx option-index (lookup-text! *common-text* (-> obj name) #f))
|
||||
(none))
|
||||
|
||||
(defmethod draw-option ((obj menu-generic-confirm-option) (progress progress) (font-ctx font-context) (option-index int) (selected? symbol))
|
||||
(when (not (-> obj mounted?))
|
||||
(on-mount! obj))
|
||||
;; drawn different depending on whether or not the confirmation prompt is open
|
||||
(cond
|
||||
(selected?
|
||||
;; TODO - this is duplicate code with the boolean option, but i ran out of arguments, make a struct or something later
|
||||
(let ((alpha (* 2.0 (- 0.5 (-> progress menu-transition))))
|
||||
(line-height 18.0))
|
||||
(fmax! alpha 0.0)
|
||||
(set! (-> font-ctx alpha) alpha)
|
||||
(set-flags! font-ctx (font-flags kerning middle large))
|
||||
(set-scale! font-ctx FONT_SIZE_OPTION)
|
||||
(+! (-> font-ctx origin y) (if (= (get-aspect-ratio) 'aspect4x3) 7.0 5.0))
|
||||
(cond
|
||||
(selected?
|
||||
(set-color! font-ctx (font-color font-color-33))
|
||||
(draw-generic-highlight (the int (- (-> font-ctx origin y) 2.0)) HIGHLIGHT_SIZE_LARGE alpha)
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) font-ctx #f 44 (bucket-id hud-draw-hud-alpha))
|
||||
(+! (-> font-ctx origin y) line-height)
|
||||
(set! *progress-generic-temp-string* (clear *progress-generic-temp-string*))
|
||||
(if (-> obj confirmed?)
|
||||
(format *progress-generic-temp-string* "~33L~S~35L ~S" (lookup-text! *common-text* (text-id progress-yes) #f) (lookup-text! *common-text* (text-id progress-no) #f))
|
||||
(format *progress-generic-temp-string* "~35L~S ~33L~S~1L" (lookup-text! *common-text* (text-id progress-yes) #f) (lookup-text! *common-text* (text-id progress-no) #f))))
|
||||
;; hover case
|
||||
(else
|
||||
(cond
|
||||
((and (nonzero? (-> obj should-disable?))
|
||||
(!= (-> obj should-disable?) #f)
|
||||
((-> obj should-disable?)))
|
||||
(set-color! font-ctx (font-color font-color-32))
|
||||
(when (= option-index (-> *progress-pc-generic-store* current-menu-hover-index))
|
||||
(draw-generic-highlight (the int (+ -1.0 (-> font-ctx origin y))) HIGHLIGHT_SIZE (* 0.5 alpha))))
|
||||
((= option-index (-> *progress-pc-generic-store* current-menu-hover-index))
|
||||
(set-color! font-ctx (font-color font-color-33))
|
||||
(draw-generic-highlight (the int (+ -1.0 (-> font-ctx origin y))) HIGHLIGHT_SIZE alpha))
|
||||
(else
|
||||
(set-color! font-ctx (font-color font-color-34))))
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) font-ctx #f 44 (bucket-id hud-draw-hud-alpha))
|
||||
(+! (-> font-ctx origin y) line-height)
|
||||
(set! *progress-generic-temp-string* (clear *progress-generic-temp-string*))
|
||||
(if (-> obj confirmed?)
|
||||
(format *progress-generic-temp-string* "~1L~S~35L ~S" (lookup-text! *common-text* (text-id progress-yes) #f) (lookup-text! *common-text* (text-id progress-no) #f))
|
||||
(format *progress-generic-temp-string* "~35L~S ~1L~S~1L" (lookup-text! *common-text* (text-id progress-yes) #f) (lookup-text! *common-text* (text-id progress-no) #f)))))
|
||||
(set-scale! font-ctx FONT_SIZE_OPTION_EXTRA)
|
||||
(print-game-text *progress-generic-temp-string* font-ctx #f 44 (bucket-id hud-draw-hud-alpha))))
|
||||
(else
|
||||
(draw-generic-simple-string-option obj progress font-ctx option-index (lookup-text! *common-text* (-> obj name) #f))))
|
||||
(none))
|
||||
|
||||
(defmethod draw-option ((obj menu-generic-slider-option) (arg0 progress) (font-ctx font-context) (option-index int) (selected? symbol))
|
||||
(when (not (-> obj mounted?))
|
||||
(on-mount! obj))
|
||||
(let ((alpha (fmax 0.0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))
|
||||
(slider-value (if selected? (-> obj value) (call-get-value-fn obj))))
|
||||
(set! (-> font-ctx alpha) alpha)
|
||||
(set-scale! font-ctx FONT_SIZE_OPTION)
|
||||
(+! (-> font-ctx origin y) 20.0)
|
||||
(case (get-aspect-ratio)
|
||||
(('aspect4x3))
|
||||
(('aspect16x9)))
|
||||
(set-flags! font-ctx (font-flags kerning middle large))
|
||||
(cond
|
||||
(selected?
|
||||
(set-scale! font-ctx FONT_SIZE_OPTION_EXTRA)
|
||||
(+! (-> font-ctx origin y) (if (= (get-aspect-ratio) 'aspect4x3) -15.0 -15.0))
|
||||
(set-color! font-ctx (font-color font-color-33))
|
||||
(draw-generic-highlight (the int (+ -2.0 (-> font-ctx origin y))) HIGHLIGHT_SIZE_LARGE alpha)
|
||||
(if (= (-> obj show-decimal?) #t)
|
||||
(print-game-text (string-format "~S: ~,,2f" (lookup-text! *common-text* (-> obj name) #f) slider-value) font-ctx #f 44 (bucket-id hud-draw-hud-alpha))
|
||||
(print-game-text (string-format "~S: ~D" (lookup-text! *common-text* (-> obj name) #f) slider-value) font-ctx #f 44 (bucket-id hud-draw-hud-alpha)))
|
||||
(set! (-> obj bar-sprite tex) (get-texture hud-sliderbackground progress-minimap))
|
||||
(set! (-> obj bar-sprite scale-x) 2.0)
|
||||
(set! (-> obj bar-sprite scale-y) 0.5)
|
||||
(let ((sprite-color-0 (-> obj bar-sprite color-ptr)))
|
||||
(set! (-> sprite-color-0 0) 128)
|
||||
(set! (-> sprite-color-0 1) 128)
|
||||
(set! (-> sprite-color-0 2) 128)
|
||||
(set! (-> sprite-color-0 3) 128)
|
||||
)
|
||||
(set! (-> obj bar-sprite pos z) #x3fffff)
|
||||
(set! (-> obj bar-sprite pos w) 0)
|
||||
(set! (-> obj bar-cursor-sprite tex) (get-texture hud-sliderframe progress-minimap))
|
||||
(set! (-> obj bar-cursor-sprite scale-x) 0.2)
|
||||
(set! (-> obj bar-cursor-sprite scale-y) 1.0)
|
||||
(let ((sprite-color-1 (-> obj bar-cursor-sprite color-ptr)))
|
||||
(set! (-> sprite-color-1 0) 128)
|
||||
(set! (-> sprite-color-1 1) 128)
|
||||
(set! (-> sprite-color-1 2) 128)
|
||||
(set! (-> sprite-color-1 3) 128)
|
||||
)
|
||||
(set! (-> obj bar-cursor-sprite pos z) #x3fffff)
|
||||
(set! (-> obj bar-cursor-sprite pos w) 0)
|
||||
;; bar
|
||||
(set-hud-piece-position! (-> obj bar-sprite) (the int (adjust-game-x 135.0)) (+ (the int (-> font-ctx origin y)) (if (= (get-aspect-ratio) 'aspect4x3) 18 15)))
|
||||
;; calculate the percentage of the bar based on the range
|
||||
;; (actual + abs(range-min)) / (range-max + abs(range-min)) = percentage
|
||||
(let* ((percentage (/ (+ slider-value (fabs (-> obj min-value)))
|
||||
(+ (-> obj max-value) (fabs (-> obj min-value)))))
|
||||
;; cursor (135 -> 365) = 230 pixels
|
||||
(cursor-x-pos (adjust-game-x-int (+ 135 (* (if (= (get-aspect-ratio) 'aspect4x3) 230.0 231.0) percentage))))
|
||||
(bar-remainder (- (adjust-game-x-int 365) cursor-x-pos)))
|
||||
;; cursor position
|
||||
(set-hud-piece-position! (-> obj bar-cursor-sprite) cursor-x-pos (+ (the int (-> font-ctx origin y)) (if (= (get-aspect-ratio) 'aspect4x3) 14 11)))
|
||||
(with-dma-buffer-add-bucket ((buffer (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id hud-draw-hud-alpha))
|
||||
(draw (-> obj bar-sprite) buffer (-> *level* level-default) #t)
|
||||
;; bar mask
|
||||
;; TODO - bar remainder isnt correct on custom aspect ratios since those internally still return `aspect4x3` for (get-aspect-ratio), this is a larger issue though
|
||||
;; perhaps just standardize menu size in general and ditch aspect ratio differences.
|
||||
(draw-sprite2d-xy buffer (+ cursor-x-pos 10) (+ (the int (-> font-ctx origin y)) (if (= (get-aspect-ratio) 'aspect4x3) 23 20)) (+ bar-remainder (if (= (get-aspect-ratio) 'aspect4x3) 9 6)) 6
|
||||
(new 'static 'rgba :r (the int (* 0.0 alpha slider-value))
|
||||
:g (the int (* 0.0 alpha slider-value))
|
||||
:b (the int (* 0.0 alpha slider-value))
|
||||
:a (the int (* 128.0 alpha)))
|
||||
#x3fffff)
|
||||
(draw (-> obj bar-cursor-sprite) buffer (-> *level* level-default) #t))))
|
||||
(else
|
||||
(+! (-> font-ctx origin y) -8.0)
|
||||
(cond
|
||||
((and (nonzero? (-> obj should-disable?))
|
||||
(!= (-> obj should-disable?) #f)
|
||||
((-> obj should-disable?)))
|
||||
(set-color! font-ctx (font-color font-color-44))
|
||||
(when (= option-index (-> *progress-pc-generic-store* current-menu-hover-index))
|
||||
(draw-generic-highlight (the int (+ -1.0 (-> font-ctx origin y))) HIGHLIGHT_SIZE (* 0.5 alpha))))
|
||||
((= option-index (-> *progress-pc-generic-store* current-menu-hover-index))
|
||||
(set-color! font-ctx (font-color font-color-33))
|
||||
(draw-generic-highlight (the int (+ -2.0 (-> font-ctx origin y))) HIGHLIGHT_SIZE alpha))
|
||||
(else
|
||||
(set-color! font-ctx (font-color font-color-32))))
|
||||
(if (= (-> obj show-decimal?) #t)
|
||||
(print-game-text (string-format "~S: ~,,2f" (lookup-text! *common-text* (-> obj name) #f) slider-value) font-ctx #f 44 (bucket-id hud-draw-hud-alpha))
|
||||
(print-game-text (string-format "~S: ~D" (lookup-text! *common-text* (-> obj name) #f) slider-value) font-ctx #f 44 (bucket-id hud-draw-hud-alpha)))))
|
||||
)
|
||||
(none))
|
||||
|
||||
(defmethod draw-option ((obj menu-generic-details-page) (progress progress) (font-ctx font-context) (option-index int) (selected? symbol))
|
||||
(when (or (zero? (-> obj mounted?)) (not (-> obj mounted?)))
|
||||
(on-mount! obj))
|
||||
;; the list has a total of 200px of y-height
|
||||
;; with 10px of margin at the top and bottom, that leaves 180 / 4 = 45px per item
|
||||
;; it's the responsibility of each generic component to center itself within these 45px lines
|
||||
(when (not (-> *progress-pc-generic-store* clear-screen?))
|
||||
(let* ((font-alpha (fmax 0.0 (* 2.0 (- 0.5 (-> progress menu-transition)))))
|
||||
(hud-bounds (new 'stack-no-clear 'hud-box))
|
||||
(max-page-size (if (= (get-aspect-ratio) 'aspect16x9) 12 10))
|
||||
(margin-top-bottom 0.0)
|
||||
(line-height (/ (if (= (get-aspect-ratio) 'aspect16x9) 253.0 200.0) max-page-size)))
|
||||
(set! (-> font-ctx alpha) font-alpha)
|
||||
(set-color! font-ctx (font-color font-color-32))
|
||||
;; header
|
||||
(draw-page-header font-ctx (-> obj name) font-alpha)
|
||||
;; background borders
|
||||
(draw-page-border (-> obj box 0) font-alpha)
|
||||
;; background
|
||||
(draw-page-background font-alpha)
|
||||
(begin-scissor-scrolling-page hud-bounds)
|
||||
(if (= (get-aspect-ratio) 'aspect16x9)
|
||||
(set! (-> font-ctx origin y) (+ 86.0 margin-top-bottom))
|
||||
(set! (-> font-ctx origin y) (+ 112.0 margin-top-bottom)))
|
||||
;; render items
|
||||
(let* ((entry-index (max 0 (* (/ (-> *progress-pc-generic-store* current-menu-hover-index) max-page-size) max-page-size)))
|
||||
(end-index (min (-> obj entries length) (+ entry-index max-page-size))))
|
||||
(while (< entry-index end-index)
|
||||
(let ((entry (-> obj entries entry-index)))
|
||||
(when (nonzero? entry)
|
||||
;; save the y,x position as who knows where it will end up after the component finishes rendering
|
||||
(let ((old-y-pos (-> font-ctx origin y))
|
||||
(old-x-pos (-> font-ctx origin x)))
|
||||
(draw-option entry progress font-ctx entry-index
|
||||
(= (-> obj selected-entry-index) entry-index))
|
||||
;; move to the next line
|
||||
(set! (-> font-ctx origin y) (+ old-y-pos line-height))
|
||||
;; - debugging, draw the dividing lines to make center new items easier
|
||||
(draw-generic-page-row-line (the int (-> font-ctx origin y)))
|
||||
(set! (-> font-ctx origin x) old-x-pos)
|
||||
;; reset the font color
|
||||
(set-color! font-ctx (font-color font-color-32)))))
|
||||
(+! entry-index 1)))
|
||||
;; end
|
||||
(end-scissor-scrolling-page hud-bounds 1.0)
|
||||
(set-flags! font-ctx (font-flags kerning large))
|
||||
(let* ((draw-up-arrow? (and (not (zero? (-> *progress-pc-generic-store* current-menu-hover-index)))
|
||||
(>= (-> *progress-pc-generic-store* current-menu-hover-index) max-page-size)))
|
||||
(last-page-remainder (mod (-> obj entries length) max-page-size))
|
||||
(last-page-starting-index (if (zero? last-page-remainder)
|
||||
(- (-> obj entries length) max-page-size)
|
||||
(- (-> obj entries length) last-page-remainder)))
|
||||
(draw-down-arrow? (and (> (-> obj entries length) max-page-size)
|
||||
(< (-> *progress-pc-generic-store* current-menu-hover-index) last-page-starting-index))))
|
||||
(draw-scrolling-page-up-down-arrows font-ctx draw-up-arrow? draw-down-arrow?))))
|
||||
(none))
|
||||
|
||||
(defmethod draw-option ((obj menu-generic-details-keybind-entry) (progress progress) (font-ctx font-context) (option-index int) (selected? symbol))
|
||||
(when (or (zero? (-> obj mounted?)) (not (-> obj mounted?)))
|
||||
(on-mount! obj))
|
||||
;; TODO - implement `should-disable?` if it's ever relevant (its not right now)
|
||||
(let ((alpha (* 2.0 (- 0.5 (-> progress menu-transition))))
|
||||
(line-height 23.0))
|
||||
(fmax! alpha 0.0)
|
||||
(set! (-> font-ctx alpha) alpha)
|
||||
(set-scale! font-ctx 0.40)
|
||||
(cond
|
||||
((= option-index (-> *progress-pc-generic-store* current-menu-hover-index))
|
||||
(set-color! font-ctx (font-color font-color-33))
|
||||
(draw-generic-highlight (the int (+ 2.0 (-> font-ctx origin y))) 18 alpha))
|
||||
(else
|
||||
(set-color! font-ctx (font-color font-color-32))))
|
||||
;; Print left aligned text
|
||||
(set-flags! font-ctx (font-flags kerning middle-vert large))
|
||||
(-! (-> font-ctx origin y) 1.0)
|
||||
(set! (-> font-ctx origin x) (the float (adjust-game-x (if (= (get-aspect-ratio) 'aspect16x9) 25.0 80.0))))
|
||||
(print-game-text (get-keybind-string obj) font-ctx #f 44 (bucket-id hud-draw-hud-alpha))
|
||||
;; Now print the right aligned text
|
||||
(set! (-> font-ctx origin x) (the float (adjust-game-x (if (= (get-aspect-ratio) 'aspect16x9) 490.0 438.0))))
|
||||
(+! (-> font-ctx origin y) 6.0)
|
||||
(set-flags! font-ctx (font-flags kerning right large))
|
||||
(let ((bind (pc-get-current-bind (-> obj bind-info) *pc-cpp-temp-string*)))
|
||||
(cond
|
||||
(selected?
|
||||
(print-game-text (string-format "~S...(~Ds)" (lookup-text! *common-text* (text-id progress-keybinds-waiting-for-bind) #f)
|
||||
(inc (/ (- (seconds 5) (- (current-time) (-> *progress-pc-generic-store* keybind-select-time))) TICKS_PER_SECOND)))
|
||||
font-ctx #f 44 (bucket-id hud-draw-hud-alpha)))
|
||||
((not bind)
|
||||
(print-game-text (lookup-text! *common-text* (text-id progress-keybinds-unset) #f) font-ctx #f 44 (bucket-id hud-draw-hud-alpha)))
|
||||
((string= *pc-cpp-temp-string* "unknown")
|
||||
(print-game-text (lookup-text! *common-text* (text-id progress-unknown-option) #f) font-ctx #f 44 (bucket-id hud-draw-hud-alpha)))
|
||||
(else
|
||||
(print-game-text *pc-cpp-temp-string* font-ctx #f 44 (bucket-id hud-draw-hud-alpha))))))
|
||||
(none))
|
||||
|
||||
(defmethod draw-option ((obj menu-generic-details-confirm-entry) (progress progress) (font-ctx font-context) (option-index int) (selected? symbol))
|
||||
(when (or (zero? (-> obj mounted?)) (not (-> obj mounted?)))
|
||||
(on-mount! obj))
|
||||
;; TODO - implement `should-disable?` if it's ever relevant (its not right now)
|
||||
(let ((alpha (* 2.0 (- 0.5 (-> progress menu-transition))))
|
||||
(line-height 23.0))
|
||||
(fmax! alpha 0.0)
|
||||
(set! (-> font-ctx alpha) alpha)
|
||||
(set-scale! font-ctx 0.40)
|
||||
(cond
|
||||
((= option-index (-> *progress-pc-generic-store* current-menu-hover-index))
|
||||
(set-color! font-ctx (font-color font-color-33))
|
||||
(draw-generic-highlight (the int (+ 2.0 (-> font-ctx origin y))) 18 alpha))
|
||||
(else
|
||||
(set-color! font-ctx (font-color font-color-32))))
|
||||
;; Print left aligned text
|
||||
(set-flags! font-ctx (font-flags kerning middle-vert large))
|
||||
(-! (-> font-ctx origin y) 1.0)
|
||||
(set! (-> font-ctx origin x) (the float (adjust-game-x (if (= (get-aspect-ratio) 'aspect16x9) 25.0 80.0))))
|
||||
(print-game-text (lookup-text! *common-text* (-> obj name) #f) font-ctx #f 44 (bucket-id hud-draw-hud-alpha))
|
||||
(when selected?
|
||||
;; Now print the right aligned text, if the option is selected
|
||||
(set! (-> font-ctx origin x) (the float (adjust-game-x (if (= (get-aspect-ratio) 'aspect16x9) 430.0 438.0))))
|
||||
(+! (-> font-ctx origin y) 6.0)
|
||||
(set-flags! font-ctx (font-flags kerning right large))
|
||||
(clear *progress-generic-temp-string*)
|
||||
(if (-> obj confirmed?)
|
||||
(format *progress-generic-temp-string* "~33L~S~35L ~S" (lookup-text! *common-text* (text-id progress-yes) #f) (lookup-text! *common-text* (text-id progress-no) #f))
|
||||
(format *progress-generic-temp-string* "~35L~S ~33L~S~1L" (lookup-text! *common-text* (text-id progress-yes) #f) (lookup-text! *common-text* (text-id progress-no) #f)))
|
||||
(print-game-text *progress-generic-temp-string* font-ctx #f 44 (bucket-id hud-draw-hud-alpha))))
|
||||
(none))
|
||||
|
||||
|
||||
(defmethod draw-option ((obj menu-generic-to-resolutions-option) (progress progress) (font-ctx font-context) (option-index int) (selected? symbol))
|
||||
;; change the name depending on whether we're fullscreen or not
|
||||
(cond
|
||||
((and (= (-> obj name) (text-id progress-window-size)) (fullscreen?))
|
||||
(set! (-> obj name) (text-id progress-game-res)))
|
||||
((and (= (-> obj name) (text-id progress-game-res)) (not (fullscreen?)))
|
||||
(set! (-> obj name) (text-id progress-window-size))))
|
||||
(call-parent-method obj progress font-ctx option-index selected?))
|
||||
|
||||
@@ -0,0 +1,279 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
|
||||
(deftype generic-progress-state-entry (structure)
|
||||
"All info that is pushed onto a 'stack' when navigating to a sub-menu with
|
||||
the new generic menu options"
|
||||
(;; what needs to be drawn now, the normal progress code figures this out with a hard-coded switch statement, this avoids that
|
||||
(ref menu-option-list)
|
||||
;; generic function to potentially run some setup code when the entry is loaded
|
||||
(on-load (function none))
|
||||
;; so we can restore back to the same menu position
|
||||
(hover-index int32)
|
||||
(scroll-index int32)
|
||||
;; symbol used normally for progress stuff
|
||||
(progress-id symbol))
|
||||
(:methods
|
||||
(call-on-load (_type_) none)))
|
||||
|
||||
(deftype progress-pc-generic-store (structure)
|
||||
"Isolated type for keeping track of some global state, as re-using the normal [[*progress*]] object
|
||||
can lead to unexpected behaviour -- they change some values all over the place"
|
||||
((current-menu-hover-index int32)
|
||||
(current-menu-scroll-index float)
|
||||
(clear-screen? symbol)
|
||||
(keybind-select-time time-frame)
|
||||
(history-stack generic-progress-state-entry 10 :inline)
|
||||
(history-stack-index int32)
|
||||
(current-highscore-page-index int32)
|
||||
(custom-highscore-score float) ;; TODO - just needed a way to pass a `(pointer float)` to C++, didn't seem like you could do such a thing with a `let` binding?
|
||||
)
|
||||
(:methods
|
||||
(init! (_type_) none)
|
||||
(navigate! (_type_ progress menu-option-list (function none)) none)
|
||||
(back! (_type_ progress) none)
|
||||
(has-history? (_type_) symbol)
|
||||
(clear-history-if-empty! (_type_) none)
|
||||
(clear-history! (_type_) none)))
|
||||
|
||||
(define *progress-pc-generic-store* (new 'static 'progress-pc-generic-store))
|
||||
|
||||
(deftype menu-generic-option (menu-option)
|
||||
((mounted? symbol)
|
||||
(should-disable? (function symbol)))
|
||||
(:methods
|
||||
(on-mount! "Called when the menu item is first drawn as a means to initialize defaults, etc" (_type_) none)
|
||||
(should-disable? (_type_) symbol)))
|
||||
|
||||
(deftype menu-generic-button-option (menu-generic-option)
|
||||
"A button option that run its action when selected"
|
||||
(;; props
|
||||
(on-confirm (function progress none)))
|
||||
(:methods
|
||||
(call-on-confirm (_type_ progress) none)))
|
||||
|
||||
(deftype menu-generic-scrolling-page (menu-generic-option)
|
||||
"A menu option that holds menu options"
|
||||
(;; props
|
||||
(menu-options (array menu-option))
|
||||
;; state
|
||||
(selected-option-index int32)
|
||||
(last-move time-frame)))
|
||||
|
||||
(deftype menu-generic-link-option (menu-generic-option)
|
||||
"A very simple link option that allows you to link to any other [[menu-option-list]]"
|
||||
(;; props
|
||||
(target menu-option-list)
|
||||
;; generic function to potentially run some setup code when the entry is loaded
|
||||
;; this is not called from the link option, but rather stored in the history entry
|
||||
(on-load (function none))))
|
||||
|
||||
(deftype menu-generic-boolean-option (menu-generic-option)
|
||||
"Generic two option menu entry (ie. yes/no)"
|
||||
(;; props
|
||||
(truthy-text text-id)
|
||||
(falsey-text text-id)
|
||||
;; state
|
||||
(value symbol)
|
||||
;; lambdas
|
||||
(get-value-fn (function symbol))
|
||||
(on-confirm (function symbol none)))
|
||||
(:methods
|
||||
(call-get-value-fn (_type_) symbol)
|
||||
(call-on-confirm (_type_ symbol) none)))
|
||||
|
||||
(deftype menu-generic-carousel-option (menu-generic-option)
|
||||
"Generic left-right menu entry (ie. language selection)"
|
||||
(;; props
|
||||
;; - either you can provide a list of hard-coded items (takes precedence)
|
||||
(items (array text-id))
|
||||
;; - or you can provide functions that return the max-size and the string labels at those indicies
|
||||
(get-max-size-fn (function int))
|
||||
(get-item-label-fn (function int string))
|
||||
(no-items-label text-id) ;; TODO - implement if `progress-multiselect-no-items-found` isn't ever sufficient
|
||||
;; state
|
||||
(item-index int32)
|
||||
;; lambdas
|
||||
(get-item-index-fn (function int))
|
||||
(on-confirm (function int progress none)))
|
||||
(:methods
|
||||
(num-items (_type_) int)
|
||||
(get-item-label (_type_ int) string)
|
||||
(call-get-item-index-fn (_type_) int)
|
||||
(call-on-confirm (_type_ int progress) none)))
|
||||
|
||||
(deftype menu-generic-confirm-option (menu-generic-option)
|
||||
"A button option that confirms before triggering it's action"
|
||||
(;; props
|
||||
(on-confirm (function none))
|
||||
;; state
|
||||
(confirmed? symbol))
|
||||
(:methods
|
||||
(call-on-confirm (_type_) none)))
|
||||
|
||||
(deftype menu-generic-slider-option (menu-generic-option)
|
||||
"A generic slider, can go into the negative as well."
|
||||
(;; props
|
||||
(min-value float)
|
||||
(max-value float)
|
||||
(step float)
|
||||
(show-decimal? symbol)
|
||||
;; state
|
||||
(value float)
|
||||
(bar-sprite hud-sprite :inline)
|
||||
(bar-cursor-sprite hud-sprite :inline)
|
||||
(last-sound-played time-frame)
|
||||
;; lambdas
|
||||
(get-value-fn (function float))
|
||||
(on-confirm (function float none)))
|
||||
(:methods
|
||||
(call-get-value-fn (_type_) float)
|
||||
(call-on-confirm (_type_ float) none)))
|
||||
|
||||
(deftype menu-generic-details-entry (menu-generic-option)
|
||||
"A generic details list entry"
|
||||
())
|
||||
|
||||
(deftype menu-generic-to-resolutions-option (menu-generic-button-option)
|
||||
"Specialization of a generic button option"
|
||||
())
|
||||
|
||||
(defenum controller-keybind
|
||||
:type int8
|
||||
(select 0)
|
||||
(l3 1)
|
||||
(r3 2)
|
||||
(start 3)
|
||||
(dpad-up 4)
|
||||
(dpad-right 5)
|
||||
(dpad-down 6)
|
||||
(dpad-left 7)
|
||||
(l2 8)
|
||||
(r2 9)
|
||||
(l1 10)
|
||||
(r1 11)
|
||||
(triangle 12)
|
||||
(circle 13)
|
||||
(cross 14)
|
||||
(square 15)
|
||||
(l-analog-up 16)
|
||||
(l-analog-down 17)
|
||||
(l-analog-left 18)
|
||||
(l-analog-right 19)
|
||||
(r-analog-up 20)
|
||||
(r-analog-down 21)
|
||||
(r-analog-left 22)
|
||||
(r-analog-right 23))
|
||||
|
||||
(defenum input-device-type
|
||||
:type int8
|
||||
(controller 0)
|
||||
(keyboard 1)
|
||||
(mouse 2))
|
||||
|
||||
(deftype menu-generic-details-keybind-entry (menu-generic-details-entry)
|
||||
((keybind controller-keybind)
|
||||
(device-type input-device-type)
|
||||
;; state
|
||||
(bind-info bind-assignment-info :inline))
|
||||
(:methods
|
||||
(get-keybind-string (_type_) string)))
|
||||
|
||||
(deftype menu-generic-details-confirm-entry (menu-generic-details-entry)
|
||||
(;; props
|
||||
(on-confirm (function none))
|
||||
;; state
|
||||
(confirmed? symbol))
|
||||
(:methods
|
||||
(call-on-confirm (_type_) none)))
|
||||
|
||||
(deftype menu-generic-details-page (menu-generic-option)
|
||||
"A generic details list page, compact rows that can be selected.
|
||||
This is very similar to the [[menu-generic-scrolling-page]] component but instead of holding
|
||||
[[menu-option]]s, it holds [[menu-generic-details-entry]]'s"
|
||||
((entries (array menu-generic-details-entry))
|
||||
;; state
|
||||
(selected-entry-index int32)
|
||||
(last-move time-frame)))
|
||||
|
||||
(defmacro progress-new-generic-option (option)
|
||||
`(new 'static 'menu-option-list :options (new 'static 'boxed-array :type menu-option ,option)))
|
||||
|
||||
(defmacro progress-new-generic-scrolling-page (title &rest options)
|
||||
`(new 'static 'menu-option-list
|
||||
:options (new 'static 'boxed-array :type menu-option
|
||||
(new 'static 'menu-generic-scrolling-page
|
||||
:name ,title
|
||||
:menu-options (new 'static 'boxed-array :type menu-option
|
||||
,@options)))))
|
||||
|
||||
(defmacro progress-new-generic-link (text target &key (should-disable? #f))
|
||||
`(new 'static 'menu-generic-link-option
|
||||
:name ,text
|
||||
:should-disable? ,should-disable?
|
||||
:target ,target))
|
||||
|
||||
(defmacro progress-new-generic-link-to-page (title &key (should-disable? #f) &rest options)
|
||||
`(new 'static 'menu-generic-link-option
|
||||
:name ,title
|
||||
:should-disable? ,should-disable?
|
||||
:target (new 'static 'menu-option-list
|
||||
:options (new 'static 'boxed-array :type menu-option
|
||||
,@options))))
|
||||
|
||||
(defmacro progress-new-generic-link-to-scrolling-page (title &key (should-disable? #f) &rest options)
|
||||
`(new 'static 'menu-generic-link-option
|
||||
:name ,title
|
||||
:should-disable? ,should-disable?
|
||||
:target (new 'static 'menu-option-list
|
||||
:options (new 'static 'boxed-array :type menu-option
|
||||
(new 'static 'menu-generic-scrolling-page
|
||||
:name ,title
|
||||
:menu-options (new 'static 'boxed-array :type menu-option
|
||||
,@options))))))
|
||||
|
||||
(defmacro progress-new-generic-link-to-keybind-details-page (title &key (should-disable? #f) &key device-type &key entries &key confirm)
|
||||
`(new 'static 'menu-generic-link-option
|
||||
:name ,title
|
||||
:should-disable? ,should-disable?
|
||||
:target (new 'static 'menu-option-list
|
||||
:options (new 'static 'boxed-array :type menu-option
|
||||
(new 'static 'menu-generic-details-page
|
||||
:name ,title
|
||||
:entries (new 'static 'boxed-array :type menu-generic-details-entry
|
||||
,@(apply (lambda (x) `(new 'static 'menu-generic-details-keybind-entry :keybind (controller-keybind ,x) :device-type (input-device-type ,device-type))) entries)
|
||||
(new 'static 'menu-generic-details-confirm-entry :name ,(first confirm) :on-confirm ,(second confirm))))))))
|
||||
|
||||
(defmacro static-progress-generic-pc-settings-lod-default-high-boolean (name field)
|
||||
`(new 'static 'menu-generic-boolean-option
|
||||
:name ,name
|
||||
:truthy-text (text-id progress-lod-default)
|
||||
:falsey-text (text-id progress-lod-high)
|
||||
:get-value-fn (lambda () ,field)
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! ,field val)
|
||||
(pc-settings-save))))
|
||||
|
||||
(defmacro static-progress-generic-pc-settings-on-off-boolean (name field)
|
||||
`(new 'static 'menu-generic-boolean-option
|
||||
:name ,name
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () ,field)
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! ,field val)
|
||||
(pc-settings-save))))
|
||||
|
||||
(defmacro static-progress-generic-pc-settings-shadows-normal-extended-boolean (name field)
|
||||
`(new 'static 'menu-generic-boolean-option
|
||||
:name ,name
|
||||
:truthy-text (text-id progress-shadows-normal)
|
||||
:falsey-text (text-id progress-shadows-extended)
|
||||
:get-value-fn (lambda () ,field)
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! ,field val)
|
||||
(pc-settings-save))))
|
||||
|
||||
(define *progress-generic-temp-string* (new 'global 'string 512 (the string #f)))
|
||||
|
||||
@@ -0,0 +1,589 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
(defmethod call-on-load ((this generic-progress-state-entry))
|
||||
(when (and (nonzero? (-> this on-load)) (!= (-> this on-load) #f))
|
||||
((-> this on-load)))
|
||||
(none))
|
||||
|
||||
(defmethod call-get-value-fn ((this menu-generic-boolean-option))
|
||||
(if (and (nonzero? (-> this get-value-fn)) (!= (-> this get-value-fn) #f))
|
||||
((-> this get-value-fn))
|
||||
#f))
|
||||
|
||||
(defmethod call-on-confirm ((this menu-generic-boolean-option) (val symbol))
|
||||
(when (and (nonzero? (-> this on-confirm)) (!= (-> this on-confirm) #f))
|
||||
((-> this on-confirm) val))
|
||||
(none))
|
||||
|
||||
(defmethod call-get-item-index-fn ((this menu-generic-carousel-option))
|
||||
(if (and (nonzero? (-> this get-item-index-fn)) (!= (-> this get-item-index-fn) #f))
|
||||
((-> this get-item-index-fn))
|
||||
0))
|
||||
|
||||
(defmethod call-on-confirm ((this menu-generic-carousel-option) (val int) (the-progress progress))
|
||||
(when (and (nonzero? (-> this on-confirm)) (-> this on-confirm))
|
||||
((-> this on-confirm) val the-progress))
|
||||
(none))
|
||||
|
||||
(defmethod call-on-confirm ((this menu-generic-button-option) (the-progress progress))
|
||||
(when (and (nonzero? (-> this on-confirm)) (-> this on-confirm))
|
||||
((-> this on-confirm) the-progress))
|
||||
(none))
|
||||
|
||||
(defmethod call-on-confirm ((this menu-generic-confirm-option))
|
||||
(when (and (nonzero? (-> this on-confirm)) (!= (-> this on-confirm) #f))
|
||||
((-> this on-confirm)))
|
||||
(none))
|
||||
|
||||
(defmethod call-get-value-fn ((this menu-generic-slider-option))
|
||||
(if (and (nonzero? (-> this get-value-fn)) (!= (-> this get-value-fn) #f))
|
||||
((-> this get-value-fn))
|
||||
0.0))
|
||||
|
||||
(defmethod call-on-confirm ((this menu-generic-slider-option) (val float))
|
||||
(when (and (nonzero? (-> this on-confirm)) (!= (-> this on-confirm) #f))
|
||||
((-> this on-confirm) val))
|
||||
(none))
|
||||
|
||||
(defmethod init! ((this progress-pc-generic-store))
|
||||
(set! (-> this clear-screen?) #f)
|
||||
(set! (-> this keybind-select-time) 0)
|
||||
(set! (-> this current-highscore-page-index) 0)
|
||||
(none))
|
||||
|
||||
(defmethod call-on-confirm ((this menu-generic-details-confirm-entry))
|
||||
(when (and (nonzero? (-> this on-confirm)) (!= (-> this on-confirm) #f))
|
||||
((-> this on-confirm)))
|
||||
(none))
|
||||
|
||||
(defmethod navigate! ((this progress-pc-generic-store) (progress progress) (target menu-option-list) (on-load (function none)))
|
||||
(when (< (-> this history-stack-index) 9) ;; hard-coded length
|
||||
;; if this is the first history entry, we push the current page as well
|
||||
;; if it's not, then we update the current entry before proceeding to the next page
|
||||
(if (has-history? this)
|
||||
(let ((stack-entry (-> this history-stack (-> this history-stack-index))))
|
||||
(set! (-> stack-entry hover-index) (-> this current-menu-hover-index))
|
||||
(set! (-> stack-entry scroll-index) (the int (-> this current-menu-scroll-index)))
|
||||
(set! (-> stack-entry progress-id) (-> progress current)))
|
||||
(let ((stack-entry (-> this history-stack (-> this history-stack-index))))
|
||||
(set! (-> stack-entry ref) (-> progress current-options))
|
||||
(set! (-> stack-entry on-load) on-load)
|
||||
(set! (-> stack-entry hover-index) (-> this current-menu-hover-index))
|
||||
(set! (-> stack-entry scroll-index) (the int (-> this current-menu-scroll-index)))
|
||||
(set! (-> stack-entry progress-id) (-> progress current))))
|
||||
;; push the target history entry now
|
||||
(inc! (-> this history-stack-index))
|
||||
;; Create a new stack entry
|
||||
(let ((stack-entry (-> this history-stack (-> this history-stack-index))))
|
||||
(set! (-> stack-entry ref) target)
|
||||
(set! (-> stack-entry on-load) on-load)
|
||||
(set! (-> stack-entry hover-index) 0)
|
||||
(set! (-> stack-entry progress-id) 'generic-menu))
|
||||
;; Update global state
|
||||
(set! (-> this clear-screen?) #t)
|
||||
(set! (-> progress next) 'generic-menu)
|
||||
(set! (-> progress selected-option) #f))
|
||||
(none))
|
||||
|
||||
(defmethod back! ((this progress-pc-generic-store) (progress progress))
|
||||
(set! (-> this history-stack-index) (max 0 (dec (-> this history-stack-index))))
|
||||
(set! (-> this clear-screen?) #t)
|
||||
(set! (-> progress next) 'generic-menu)
|
||||
(set! (-> progress selected-option) #f)
|
||||
(none))
|
||||
|
||||
(defmethod has-history? ((this progress-pc-generic-store))
|
||||
(> (-> this history-stack-index) 0))
|
||||
|
||||
(defmethod clear-history-if-empty! ((this progress-pc-generic-store))
|
||||
"if we have no history, just reset the entry. This is so we don't preserve state after completely exiting the menu"
|
||||
(when (not (has-history? this))
|
||||
(set! (-> this history-stack-index) 0)
|
||||
(set! (-> this clear-screen?) #f)
|
||||
(set! (-> this current-menu-hover-index) 0)
|
||||
(set! (-> this current-menu-scroll-index) 0.0)
|
||||
(let ((stack-entry (-> this history-stack (-> this history-stack-index))))
|
||||
(set! (-> stack-entry hover-index) 0)
|
||||
(set! (-> stack-entry ref) #f)
|
||||
(set! (-> stack-entry on-load) #f)
|
||||
(set! (-> stack-entry progress-id) #f)))
|
||||
(none))
|
||||
|
||||
(defmethod clear-history! ((this progress-pc-generic-store))
|
||||
(set! (-> this history-stack-index) 0)
|
||||
(set! (-> this clear-screen?) #t)
|
||||
(set! (-> this current-menu-hover-index) 0)
|
||||
(set! (-> this current-menu-scroll-index) 0.0)
|
||||
(none))
|
||||
|
||||
(defmethod on-mount! ((this menu-generic-option))
|
||||
(set! (-> this mounted?) #t)
|
||||
(none))
|
||||
|
||||
;; TODO - call the parent methods, when there is an elegant way to do so (not having to know the ID)
|
||||
|
||||
(defmethod on-mount! ((this menu-generic-carousel-option))
|
||||
(set! (-> this mounted?) #t)
|
||||
(set! (-> this item-index) 0)
|
||||
(none))
|
||||
|
||||
(defmethod on-mount! ((this menu-generic-scrolling-page))
|
||||
(set! (-> this mounted?) #t)
|
||||
(set! (-> this selected-option-index) -1)
|
||||
(none))
|
||||
|
||||
(defmethod on-mount! ((this menu-generic-details-page))
|
||||
(set! (-> this mounted?) #t)
|
||||
(set! (-> this selected-entry-index) -1)
|
||||
(none))
|
||||
|
||||
(defmethod on-mount! ((this menu-generic-confirm-option))
|
||||
(set! (-> this mounted?) #t)
|
||||
(set! (-> this confirmed?) #f)
|
||||
(none))
|
||||
|
||||
(defun controller-keybind->input-index ((bind controller-keybind))
|
||||
(case bind
|
||||
(((controller-keybind l-analog-up)) 1)
|
||||
(((controller-keybind l-analog-down)) 1)
|
||||
(((controller-keybind l-analog-left)) 0)
|
||||
(((controller-keybind l-analog-right)) 0)
|
||||
(((controller-keybind r-analog-up)) 3)
|
||||
(((controller-keybind r-analog-down)) 3)
|
||||
(((controller-keybind r-analog-left)) 2)
|
||||
(((controller-keybind r-analog-right)) 2)
|
||||
(else (the int bind))))
|
||||
|
||||
(defmethod on-mount! ((this menu-generic-details-keybind-entry))
|
||||
(set! (-> this mounted?) #t)
|
||||
(set! (-> this bind-info port) 0) ;; always port 0 for now
|
||||
(set! (-> this bind-info device-type) (the int (-> this device-type)))
|
||||
(set! (-> this bind-info for-buttons?) #t)
|
||||
(set! (-> this bind-info analog-min-range?) #f)
|
||||
(set! (-> this bind-info input-idx) (controller-keybind->input-index (-> this keybind)))
|
||||
(case (-> this keybind)
|
||||
(((controller-keybind l-analog-up) (controller-keybind l-analog-down) (controller-keybind l-analog-left) (controller-keybind l-analog-right)
|
||||
(controller-keybind r-analog-up) (controller-keybind r-analog-down) (controller-keybind r-analog-left) (controller-keybind r-analog-right))
|
||||
(set! (-> this bind-info for-buttons?) #f)
|
||||
(case (-> this keybind)
|
||||
(((controller-keybind l-analog-up) (controller-keybind l-analog-left) (controller-keybind r-analog-up) (controller-keybind r-analog-left))
|
||||
(set! (-> this bind-info analog-min-range?) #t)))))
|
||||
(none))
|
||||
|
||||
;; Progress Code Overrides
|
||||
|
||||
(defmethod respond-to-cpad ((this progress))
|
||||
(mc-get-slot-info 0 *progress-save-info*)
|
||||
(memcard-unlocked-secrets? this #f)
|
||||
;; ND originally did this...called this every frame in the game options, looked like a hack
|
||||
;; there's probably a way to consistently do it synchronously
|
||||
(load-level-text-files (the-as int (-> *pc-settings* text-language)))
|
||||
(when (-> this current-options)
|
||||
(let ((option-array (-> this current-options options))
|
||||
(has-generic-history? (has-history? *progress-pc-generic-store*)))
|
||||
(when (and option-array (= (-> this menu-transition) 0.0))
|
||||
(let ((in-generic-page? (and (= (-> option-array length) 1)
|
||||
(or (type? (-> option-array 0) menu-generic-scrolling-page)
|
||||
(type? (-> option-array 0) menu-generic-details-page)))))
|
||||
(cond
|
||||
;; If it's a scrolling menu, we have to pull from it's list of items
|
||||
(in-generic-page?
|
||||
;; update the scrolling list
|
||||
(respond-progress
|
||||
(the-as menu-option (-> option-array 0))
|
||||
this
|
||||
(and (= (-> this menu-transition) 0.0) (-> this selected-option))))
|
||||
;; Do a bounds check to avoid crashing
|
||||
((>= (-> this option-index) (-> option-array length))
|
||||
(format 0 "respond-to-cpad:progress: Option index ~D out of bounds~%" (-> this option-index)))
|
||||
(else
|
||||
(respond-progress
|
||||
(the-as menu-option (-> option-array (-> this option-index)))
|
||||
this
|
||||
(and (= (-> this menu-transition) 0.0) (-> this selected-option)))))
|
||||
(cond
|
||||
((-> this selected-option)
|
||||
(cond
|
||||
((cpad-pressed? 0 confirm)
|
||||
(set! (-> this selected-option) #f)
|
||||
)
|
||||
((cpad-pressed? 0 triangle)
|
||||
(when (not in-generic-page?)
|
||||
(if (= (-> this current-options) *main-options*)
|
||||
(sound-play "window-contract")
|
||||
(sound-play "generic-beep")))
|
||||
(set! (-> this selected-option) #f))))
|
||||
(else
|
||||
(cond
|
||||
((cpad-pressed? 0 up l-analog-up)
|
||||
(cond
|
||||
((= (-> this current-options) *main-options*)
|
||||
(sound-play "ring-select"))
|
||||
((!= (length option-array) 1)
|
||||
(sound-play "roll-over")))
|
||||
;; skip over hidden secrets menu
|
||||
(if (and (= *title-pc* (-> this current-options)) (not (memcard-unlocked-secrets? #f #f)) (= (-> this option-index) 3))
|
||||
(set! (-> this option-index) 3))
|
||||
(cond
|
||||
((> (-> this want-option-index) 0)
|
||||
(set! (-> this want-option-index) -1))
|
||||
((< -2 (-> this want-option-index))
|
||||
(+! (-> this want-option-index) -1))))
|
||||
((cpad-pressed? 0 down l-analog-down)
|
||||
(cond
|
||||
((= (-> this current-options) *main-options*)
|
||||
(sound-play "ring-select"))
|
||||
((!= (length option-array) 1)
|
||||
(sound-play "roll-over")))
|
||||
;; skip over hidden secrets menu
|
||||
(if (and (= *title-pc* (-> this current-options)) (not (memcard-unlocked-secrets? #f #f)) (= (-> this option-index) 2))
|
||||
(set! (-> this option-index) 3))
|
||||
(cond
|
||||
((< (-> this want-option-index) 0)
|
||||
(set! (-> this want-option-index) 1))
|
||||
((< (-> this want-option-index) 2)
|
||||
(+! (-> this want-option-index) 1))))
|
||||
((cpad-pressed? 0 confirm)
|
||||
(cpad-clear! 0 confirm)
|
||||
(when (and (not in-generic-page?)
|
||||
(not (-> this clear-screen)))
|
||||
(sound-play "generic-beep"))
|
||||
;; don't "select" the page link
|
||||
(when (!= (-> this next) 'generic-menu)
|
||||
(set! (-> this selected-option) #t)))
|
||||
((cpad-pressed? 0 triangle)
|
||||
;; if we are within a generic managed menu option, handle the stack elsewhere
|
||||
;; TODO - this likely has issues if we have a nested-non-generic menu, but deal with that use-case if it's ever
|
||||
;; actually employed
|
||||
(when (and (not has-generic-history?) (can-go-back? this))
|
||||
(cpad-clear! 0 triangle)
|
||||
(if (and (= (-> this starting-state) 'main) (!= (-> this current-options) *main-options*))
|
||||
(sound-play "window-contract")
|
||||
(sound-play "generic-beep"))
|
||||
(clear-history-if-empty! *progress-pc-generic-store*)
|
||||
(pop-state this))))))))))
|
||||
(none))
|
||||
|
||||
;; Component implementation
|
||||
|
||||
;; - input handling
|
||||
|
||||
(defmethod respond-progress ((this menu-generic-scrolling-page) (progress progress) (selected? symbol))
|
||||
"Handle progress menu navigation logic."
|
||||
(let ((selected-item? #f))
|
||||
(if (= (-> this selected-option-index) -1)
|
||||
(cond
|
||||
((or (cpad-pressed? 0 down l-analog-down)
|
||||
(and (cpad-hold? 0 down l-analog-down)
|
||||
(>= (- (current-time) (the-as int (-> this last-move))) (seconds 0.2))))
|
||||
(set! (-> this last-move) (current-time))
|
||||
(cond
|
||||
((< (-> *progress-pc-generic-store* current-menu-hover-index) (dec (-> this menu-options length)))
|
||||
(+! (-> *progress-pc-generic-store* current-menu-hover-index) 1)
|
||||
(sound-play "roll-over"))
|
||||
(else
|
||||
(set! (-> *progress-pc-generic-store* current-menu-hover-index) 0)
|
||||
(sound-play "roll-over"))))
|
||||
((or (cpad-pressed? 0 up l-analog-up)
|
||||
(and (cpad-hold? 0 up l-analog-up)
|
||||
(>= (- (current-time) (the-as int (-> this last-move))) (seconds 0.2))))
|
||||
(set! (-> this last-move) (current-time))
|
||||
(+! (-> *progress-pc-generic-store* current-menu-hover-index) -1)
|
||||
(sound-play "roll-over")
|
||||
(when (< (-> *progress-pc-generic-store* current-menu-hover-index) 0)
|
||||
(set! (-> *progress-pc-generic-store* current-menu-hover-index) (dec (-> this menu-options length)))))
|
||||
((cpad-pressed? 0 confirm)
|
||||
(when (< (-> *progress-pc-generic-store* current-menu-hover-index) (-> this menu-options length))
|
||||
(let ((menu-option (-> this menu-options (-> *progress-pc-generic-store* current-menu-hover-index))))
|
||||
;; if the option is disabled, return early
|
||||
(when (and (type? menu-option menu-generic-option)
|
||||
(nonzero? (-> (the-as menu-generic-option menu-option) should-disable?))
|
||||
(!= (-> (the-as menu-generic-option menu-option) should-disable?) #f)
|
||||
((-> (the-as menu-generic-option menu-option) should-disable?)))
|
||||
(sound-play "roll-over")
|
||||
(cpad-clear! 0 confirm)
|
||||
(return 0))
|
||||
;; ignore confirm if it's a link
|
||||
(cond
|
||||
;; TODO the condition for menu-generic-to-resolutions-option shouldn't be required if it
|
||||
;; followed the existing pattern of being a page that contains options, instead of a single option that is a page
|
||||
;; There are already components that do a similar thing (see menu-generic-details-page)
|
||||
((or (type? menu-option menu-generic-link-option) (type? menu-option menu-generic-to-resolutions-option))
|
||||
(set! selected-item? #t))
|
||||
(else
|
||||
(set! (-> this selected-option-index) (-> *progress-pc-generic-store* current-menu-hover-index))
|
||||
(sound-play "generic-beep"))))))
|
||||
((cpad-pressed? 0 triangle)
|
||||
;; we are in a sub-page, time to go back
|
||||
(when (has-history? *progress-pc-generic-store*)
|
||||
(back! *progress-pc-generic-store* progress)
|
||||
(sound-play "generic-beep"))))
|
||||
;; menu option already selected
|
||||
(cond
|
||||
((cpad-pressed? 0 confirm)
|
||||
(set! (-> this selected-option-index) -1))
|
||||
((cpad-pressed? 0 triangle)
|
||||
(set! (-> this selected-option-index) -1))))
|
||||
;; propagate event to menu-option
|
||||
(when (< (-> *progress-pc-generic-store* current-menu-hover-index) (-> this menu-options length))
|
||||
(respond-progress (-> this menu-options (-> *progress-pc-generic-store* current-menu-hover-index)) progress (or selected? selected-item?))))
|
||||
0)
|
||||
|
||||
(defmethod respond-progress ((this menu-generic-boolean-option) (progress progress) (selected? symbol))
|
||||
(if selected?
|
||||
(cond
|
||||
((cpad-pressed? 0 left l-analog-left right l-analog-right)
|
||||
(if (-> this value)
|
||||
(set! (-> this value) #f)
|
||||
(set! (-> this value) #t))
|
||||
(sound-play "generic-beep"))
|
||||
((cpad-pressed? 0 confirm)
|
||||
(call-on-confirm this (-> this value))
|
||||
(sound-play "generic-beep")))
|
||||
(cond
|
||||
((cpad-pressed? 0 confirm)
|
||||
;; set the value, this is so we edit the component's state and not the actual underlying value
|
||||
;; in other words, don't change the setting until the user has actually confirmed the change!
|
||||
(set! (-> this value) (call-get-value-fn this)))))
|
||||
0)
|
||||
|
||||
(defmethod respond-progress ((this menu-generic-carousel-option) (progress progress) (selected? symbol))
|
||||
(if selected?
|
||||
(cond
|
||||
((cpad-pressed? 0 left l-analog-left)
|
||||
(dec! (-> this item-index))
|
||||
(when (< (-> this item-index) 0)
|
||||
(set! (-> this item-index) (dec (num-items this))))
|
||||
(sound-play "generic-beep"))
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(inc! (-> this item-index))
|
||||
(when (>= (-> this item-index) (num-items this))
|
||||
(set! (-> this item-index) 0))
|
||||
(sound-play "generic-beep"))
|
||||
((cpad-pressed? 0 confirm)
|
||||
(call-on-confirm this (-> this item-index) progress)
|
||||
(sound-play "generic-beep")))
|
||||
(cond
|
||||
((cpad-pressed? 0 confirm)
|
||||
;; set the value, this is so we edit the component's state and not the actual underlying value
|
||||
;; in other words, don't change the setting until the user has actually confirmed the change!
|
||||
(set! (-> this item-index) (call-get-item-index-fn this)))))
|
||||
0)
|
||||
|
||||
(defmethod respond-progress ((this menu-generic-link-option) (progress progress) (selected? symbol))
|
||||
(when (and selected? (cpad-pressed? 0 confirm))
|
||||
(navigate! *progress-pc-generic-store* progress (-> this target) (-> this on-load))
|
||||
(set! (-> progress selected-option) #f)
|
||||
(sound-play "generic-beep"))
|
||||
0)
|
||||
|
||||
(defmethod respond-progress ((this menu-generic-button-option) (progress progress) (selected? symbol))
|
||||
(cond
|
||||
((cpad-pressed? 0 confirm)
|
||||
(cpad-clear! 0 confirm)
|
||||
(call-on-confirm this progress)
|
||||
(sound-play "generic-beep")))
|
||||
0)
|
||||
|
||||
(defmethod respond-progress ((this menu-generic-confirm-option) (progress progress) (selected? symbol))
|
||||
(if selected?
|
||||
(cond
|
||||
((cpad-pressed? 0 left l-analog-left right l-analog-right)
|
||||
(if (-> this confirmed?)
|
||||
(set! (-> this confirmed?) #f)
|
||||
(set! (-> this confirmed?) #t))
|
||||
(sound-play "generic-beep"))
|
||||
((cpad-pressed? 0 confirm)
|
||||
(call-on-confirm this)
|
||||
(sound-play "generic-beep")))
|
||||
(cond
|
||||
((cpad-pressed? 0 confirm)
|
||||
(set! (-> this confirmed?) #f))))
|
||||
0)
|
||||
|
||||
(defmethod respond-progress ((this menu-generic-slider-option) (progress progress) (selected? symbol))
|
||||
(if selected?
|
||||
(cond
|
||||
((and (> (-> this value) (-> this min-value))
|
||||
(cpad-hold? 0 left l-analog-left))
|
||||
;; TODO - might not work well on higher frame-rates
|
||||
(set! (-> this value) (fmax (- (-> this value) (-> this step)) (-> this min-value)))
|
||||
(when (< (seconds 0.03) (- (current-time) (-> this last-sound-played)))
|
||||
(set! (-> this last-sound-played) (current-time))
|
||||
(sound-play-by-name (static-sound-name "menu-slide") (new-sound-id) 512 0 0 (sound-group sfx) #t)))
|
||||
((and (< (-> this value) (-> this max-value))
|
||||
(cpad-hold? 0 right l-analog-right))
|
||||
;; TODO - might not work well on higher frame-rates
|
||||
(set! (-> this value) (fmin (+ (-> this value) (-> this step)) (-> this max-value)))
|
||||
(when (< (seconds 0.03) (- (current-time) (-> this last-sound-played)))
|
||||
(set! (-> this last-sound-played) (current-time))
|
||||
(sound-play-by-name (static-sound-name "menu-slide") (new-sound-id) 512 0 0 (sound-group sfx) #t)))
|
||||
((cpad-pressed? 0 confirm)
|
||||
(call-on-confirm this (-> this value))
|
||||
(sound-play "generic-beep")))
|
||||
(cond
|
||||
((cpad-pressed? 0 confirm)
|
||||
;; set the value, this is so we edit the component's state and not the actual underlying value
|
||||
;; in other words, don't change the setting until the user has actually confirmed the change!
|
||||
(set! (-> this value) (call-get-value-fn this)))))
|
||||
0)
|
||||
|
||||
(defmethod respond-progress ((this menu-generic-details-page) (progress progress) (selected? symbol))
|
||||
(if (= (-> this selected-entry-index) -1)
|
||||
(cond
|
||||
((or (cpad-pressed? 0 down l-analog-down)
|
||||
(and (cpad-hold? 0 down l-analog-down)
|
||||
(>= (- (current-time) (the-as int (-> this last-move))) (seconds 0.2))))
|
||||
(set! (-> this last-move) (current-time))
|
||||
(cond
|
||||
((< (-> *progress-pc-generic-store* current-menu-hover-index) (dec (-> this entries length)))
|
||||
(+! (-> *progress-pc-generic-store* current-menu-hover-index) 1)
|
||||
(sound-play "roll-over"))
|
||||
(else
|
||||
(set! (-> *progress-pc-generic-store* current-menu-hover-index) 0)
|
||||
(sound-play "roll-over"))))
|
||||
((or (cpad-pressed? 0 up l-analog-up)
|
||||
(and (cpad-hold? 0 up l-analog-up)
|
||||
(>= (- (current-time) (the-as int (-> this last-move))) (seconds 0.2))))
|
||||
(set! (-> this last-move) (current-time))
|
||||
(+! (-> *progress-pc-generic-store* current-menu-hover-index) -1)
|
||||
(sound-play "roll-over")
|
||||
(when (< (-> *progress-pc-generic-store* current-menu-hover-index) 0)
|
||||
(set! (-> *progress-pc-generic-store* current-menu-hover-index) (dec (-> this entries length)))))
|
||||
((cpad-pressed? 0 confirm)
|
||||
(when (< (-> *progress-pc-generic-store* current-menu-hover-index) (-> this entries length))
|
||||
(set! (-> this selected-entry-index) (-> *progress-pc-generic-store* current-menu-hover-index))
|
||||
(sound-play "generic-beep")))
|
||||
((cpad-pressed? 0 triangle)
|
||||
;; we are in a sub-page, time to go back
|
||||
(when (has-history? *progress-pc-generic-store*)
|
||||
(back! *progress-pc-generic-store* progress)
|
||||
(sound-play "score-slide"))))
|
||||
;; menu option already selected
|
||||
(cond
|
||||
((cpad-pressed? 0 confirm)
|
||||
(set! (-> this selected-entry-index) -1))
|
||||
((cpad-pressed? 0 triangle)
|
||||
(set! (-> this selected-entry-index) -1))
|
||||
;; keybinds
|
||||
((nonzero? (-> *progress-pc-generic-store* keybind-select-time))
|
||||
;; when the bind has been set, or it's expired
|
||||
(when (or (not (pc-waiting-for-bind?))
|
||||
(>= (- (current-time) (the-as int (-> *progress-pc-generic-store* keybind-select-time))) (seconds 5.0)))
|
||||
(set! (-> *progress-pc-generic-store* keybind-select-time) 0)
|
||||
(set! (-> this selected-entry-index) -1)
|
||||
(set! (-> progress selected-option) #f)
|
||||
(cond
|
||||
((not (pc-waiting-for-bind?))
|
||||
(sound-play "generic-beep"))
|
||||
(else
|
||||
(pc-stop-waiting-for-bind!)
|
||||
(sound-play "roll-over")))))))
|
||||
;; propagate event to menu-option
|
||||
(when (< (-> *progress-pc-generic-store* current-menu-hover-index) (-> this entries length))
|
||||
(respond-progress (-> this entries (-> *progress-pc-generic-store* current-menu-hover-index)) progress selected?))
|
||||
0)
|
||||
|
||||
(defmethod respond-progress ((this menu-generic-details-keybind-entry) (progress progress) (selected? symbol))
|
||||
(when (not selected?)
|
||||
(cond
|
||||
((cpad-pressed? 0 confirm)
|
||||
(let ((bind-info (-> this bind-info)))
|
||||
(pc-set-waiting-for-bind! (-> bind-info device-type) (not (-> bind-info for-buttons?)) (-> bind-info analog-min-range?) (-> bind-info input-idx)))
|
||||
(set! (-> *progress-pc-generic-store* keybind-select-time) (current-time)))))
|
||||
0)
|
||||
|
||||
(defmethod respond-progress ((this menu-generic-details-confirm-entry) (progress progress) (selected? symbol))
|
||||
(if selected?
|
||||
(cond
|
||||
((cpad-pressed? 0 left l-analog-left right l-analog-right)
|
||||
(if (-> this confirmed?)
|
||||
(set! (-> this confirmed?) #f)
|
||||
(set! (-> this confirmed?) #t))
|
||||
(sound-play "generic-beep"))
|
||||
((cpad-pressed? 0 confirm)
|
||||
(call-on-confirm this)
|
||||
(sound-play "generic-beep")))
|
||||
(cond
|
||||
((cpad-pressed? 0 confirm)
|
||||
(set! (-> this confirmed?) #f))))
|
||||
0)
|
||||
|
||||
;; - rest of component logic
|
||||
|
||||
(defmethod num-items ((this menu-generic-carousel-option))
|
||||
"Get the number of items in the carousel"
|
||||
(if (and (nonzero? (-> this items)) (!= (-> this items) #f))
|
||||
(-> this items length)
|
||||
(if (and (and (nonzero? (-> this get-max-size-fn)) (!= (-> this get-max-size-fn) #f))
|
||||
(and (nonzero? (-> this get-item-label-fn)) (!= (-> this get-max-size-fn) #f)))
|
||||
((-> this get-max-size-fn))
|
||||
0)))
|
||||
|
||||
(defmethod get-item-label ((this menu-generic-carousel-option) (item-index int))
|
||||
"Gets the string label of the currently choosen item, preferring the `items` array if it exists"
|
||||
(if (and (nonzero? (-> this items)) (!= (-> this items) #f))
|
||||
(lookup-text! *common-text* (-> this items item-index) #f)
|
||||
(if (and (nonzero? (-> this get-item-label-fn)) (!= (-> this get-max-size-fn) #f))
|
||||
((-> this get-item-label-fn) item-index)
|
||||
"#ERROR")))
|
||||
|
||||
;; TODO - it could be possible to map certain controllers to buttons (ie. dualshock controllers could have nice mappings instead of SDL named ones)
|
||||
(defmethod get-keybind-string ((this menu-generic-details-keybind-entry))
|
||||
(case (-> this keybind)
|
||||
(((controller-keybind cross))
|
||||
;; the PS2 TRC says it should be pronounced "ecks", hence why every game that speaks the buttons out loud says X, plus at least 80% of people also already say X (i assume in part because of that).
|
||||
;; the official spelling is probably "cross" (see PS2 development reference manuals), but that has less weight in the context of displaying the name to the user, I think?
|
||||
;; "cross" seems to be mainly a UK thing (those weirdos)
|
||||
(if (language? uk-english)
|
||||
"~Y~22L<~Z~Y~27L*~Z~Y~1L>~Z~Y~23L[~Z~+26H Cross"
|
||||
"~Y~22L<~Z~Y~27L*~Z~Y~1L>~Z~Y~23L[~Z~+26H X"))
|
||||
(((controller-keybind square))
|
||||
"~Y~22L<~Z~Y~24L#~Z~Y~1L>~Z~Y~23L[~Z~+26H S~+7Vq~-7Vuare")
|
||||
(((controller-keybind circle))
|
||||
"~Y~22L<~Z~Y~25L@~Z~Y~1L>~Z~Y~23L[~Z~+26H Circle")
|
||||
(((controller-keybind triangle))
|
||||
"~Y~22L<~Z~Y~26L;~Z~Y~1L>~Z~Y~23L[~Z~+26H Trian~+7Vg~-7Vle")
|
||||
(((controller-keybind dpad-up))
|
||||
"~Y~0L\ca1~Z~3L~+17H~-13V\ca2~Z~0L~+17H~+14V\ca0~Z~0L~+32H\ca3~Z~+56H D-Pad U~+7Vp~-7V")
|
||||
(((controller-keybind dpad-down))
|
||||
"~Y~0L\ca1~Z~0L~+17H~-13V\ca2~Z~3L~+17H~+14V\ca0~Z~0L~+32H\ca3~Z~+56H D-Pad Down")
|
||||
(((controller-keybind dpad-right))
|
||||
"~Y~0L\ca1~Z~0L~+17H~-13V\ca2~Z~0L~+17H~+14V\ca0~Z~3L~+32H\ca3~Z~+56H D-Pad Ri~+7Vg~-7Vht")
|
||||
(((controller-keybind dpad-left))
|
||||
"~Y~3L\ca1~Z~0L~+17H~-13V\ca2~Z~0L~+17H~+14V\ca0~Z~0L~+32H\ca3~Z~+56H D-Pad Left")
|
||||
(((controller-keybind l1))
|
||||
"~Y~22L~-2H~-12V\ca6\ca7~Z~22L~-2H~+17V\cb0\cb1~Z~1L~+4H~+3V\c95~Z~+38H L1")
|
||||
(((controller-keybind l2))
|
||||
"~Y~22L~-2H~-6V\ca8\ca9~Z~22L~-2H~+16V\cb2\cb3~Z~1L~+5H~-2V\c97~Z~+38H L2")
|
||||
(((controller-keybind l3))
|
||||
"\c91 L3")
|
||||
(((controller-keybind r1))
|
||||
"~Y~22L~-2H~-12V\ca6\ca7~Z~22L~-2H~+17V\cb0\cb1~Z~1L~+6H~+3V\c94~Z~+38H R1")
|
||||
(((controller-keybind r2))
|
||||
"~Y~22L~-2H~-6V\ca8\ca9~Z~22L~-2H~+16V\cb2\cb3~Z~1L~+5H~-2V\c96~Z~+38H R2")
|
||||
(((controller-keybind r3))
|
||||
"\c91 R3")
|
||||
(((controller-keybind select))
|
||||
"\c92 Select")
|
||||
(((controller-keybind start))
|
||||
"\c92 Start")
|
||||
(((controller-keybind l-analog-up))
|
||||
"~Y~1L\c91~Z~-17V~6L\c98~Z~+26H Left Analo~+7Vg~-7V U~+7Vp~-7V")
|
||||
(((controller-keybind l-analog-down))
|
||||
"~Y~1L\c91~Z~+15V~6L\c9c~Z~+26H Left Analo~+7Vg~-7V Down")
|
||||
(((controller-keybind l-analog-left))
|
||||
"~Y~1L\c91~Z~-17H~6L\c9e~Z~+26H Left Analo~+7Vg~-7V Left")
|
||||
(((controller-keybind l-analog-right))
|
||||
"~Y~1L\c91~Z~+17H~6L\ca4~Z~+26H Left Analo~+7Vg~-7V Ri~+7Vg~-7Vht")
|
||||
(((controller-keybind r-analog-up))
|
||||
"~Y~1L\c91~Z~-17V~6L\c98~Z~+26H Ri~+7Vg~-7Vht Analo~+7Vg~-7V U~+7Vp~-7V")
|
||||
(((controller-keybind r-analog-down))
|
||||
"~Y~1L\c91~Z~+15V~6L\c9c~Z~+26H Ri~+7Vg~-7Vht Analo~+7Vg~-7V Down")
|
||||
(((controller-keybind r-analog-left))
|
||||
"~Y~1L\c91~Z~-17H~6L\c9e~Z~+26H Ri~+7Vg~-7Vht Analo~+7Vg~-7V Left")
|
||||
(((controller-keybind r-analog-right))
|
||||
"~Y~1L\c91~Z~+17H~6L\ca4~Z~+26H Ri~+7Vg~-7Vht Analo~+7Vg~-7V Ri~+7Vg~-7Vht")
|
||||
(else
|
||||
"Unknown Bind")))
|
||||
@@ -0,0 +1,61 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
#|
|
||||
|
||||
Additional PC port specific file for overriding/expanding the progress menu
|
||||
This gives us more freedom to write code how we want.
|
||||
|
||||
|#
|
||||
|
||||
|
||||
(defmacro push-and-set-state (progress state)
|
||||
`(begin
|
||||
(push-state ,progress)
|
||||
(set-next-state ,progress ,state 0)))
|
||||
|
||||
(deftype menu-aspect-ratio-custom-option (menu-option)
|
||||
()
|
||||
)
|
||||
|
||||
(deftype menu-frame-rate-disclaimer-option (menu-option)
|
||||
()
|
||||
)
|
||||
|
||||
(deftype menu-exit-game-option (menu-qr-option)
|
||||
()
|
||||
)
|
||||
|
||||
(deftype menu-resolution-option (menu-option)
|
||||
((last-move time-frame)
|
||||
(selected-index int16)
|
||||
(scroll-index float)
|
||||
(valid? symbol)
|
||||
|
||||
;; OS state kept for drawing later, avoids desync and duplicate fetching
|
||||
(num-resolutions int)
|
||||
(win-aspect float)
|
||||
(win-w int64)
|
||||
(win-h int64)
|
||||
)
|
||||
)
|
||||
|
||||
(deftype menu-music-player-option (menu-option)
|
||||
((last-move time-frame)
|
||||
|
||||
;; player params
|
||||
(music-index int16)
|
||||
(flava-index int8)
|
||||
(excitement int8)
|
||||
|
||||
;; scroll
|
||||
(current-scroll float)
|
||||
(max-scroll float)
|
||||
|
||||
;; sprites 0-3 used to show level icon
|
||||
(sprites hud-sprite 4 :inline)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,832 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
#|@file
|
||||
Additional PC port specific file for overriding/expanding the progress menu
|
||||
This gives us more freedom to write code how we want.
|
||||
|#
|
||||
|
||||
(define *title-pc*
|
||||
(new 'static 'menu-option-list
|
||||
:y-center #xc6
|
||||
:y-space 15
|
||||
:scale 0.82
|
||||
:options (new 'static 'boxed-array :type menu-option
|
||||
(new 'static 'menu-sub-menu-option
|
||||
:name (text-id progress-title-new-game)
|
||||
:offset-y 0.15
|
||||
:next-state 'select-save-title
|
||||
)
|
||||
(new 'static 'menu-sub-menu-option :name (text-id progress-load-save) :offset-y 0.3 :next-state 'select-load)
|
||||
(new 'static 'menu-sub-menu-option :name (text-id progress-options) :offset-y 0.45 :next-state 'title-options)
|
||||
(new 'static 'menu-sub-menu-option :name (text-id progress-secrets) :offset-y 0.6 :next-state 'unlocked-secrets)
|
||||
(new 'static 'menu-exit-game-option :name (text-id progress-quit) :offset-y 0.75)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define *sound-options-pc*
|
||||
(progress-new-generic-scrolling-page (text-id progress-sound-options)
|
||||
(new 'static 'menu-generic-slider-option
|
||||
:name (text-id progress-sfx-volume)
|
||||
:min-value 0.0
|
||||
:max-value 1.0
|
||||
:step 0.01
|
||||
:show-decimal? #t
|
||||
:get-value-fn (lambda () (-> *pc-settings* memcard-volume-sfx))
|
||||
:on-confirm (lambda ((val float))
|
||||
(set! (-> *pc-settings* memcard-volume-sfx) val)
|
||||
(pc-settings-save)
|
||||
(set! (-> *setting-control* user-default sfx-volume) val)))
|
||||
(new 'static 'menu-generic-slider-option
|
||||
:name (text-id progress-music-volume)
|
||||
:min-value 0.0
|
||||
:max-value 1.0
|
||||
:step 0.01
|
||||
:show-decimal? #t
|
||||
:get-value-fn (lambda () (-> *pc-settings* memcard-volume-music))
|
||||
:on-confirm (lambda ((val float))
|
||||
(set! (-> *pc-settings* memcard-volume-music) val)
|
||||
(pc-settings-save)
|
||||
(set! (-> *setting-control* user-default music-volume) val)))
|
||||
(new 'static 'menu-generic-slider-option
|
||||
:name (text-id progress-speech-volume)
|
||||
:min-value 0.0
|
||||
:max-value 1.0
|
||||
:step 0.01
|
||||
:show-decimal? #t
|
||||
:get-value-fn (lambda () (-> *pc-settings* memcard-volume-dialog))
|
||||
:on-confirm (lambda ((val float))
|
||||
(set! (-> *pc-settings* memcard-volume-dialog) val)
|
||||
(pc-settings-save)
|
||||
(set! (-> *setting-control* user-default dialog-volume) val)))
|
||||
(new 'static 'menu-generic-carousel-option
|
||||
:name (text-id progress-sound-format)
|
||||
:get-max-size-fn (lambda () 3)
|
||||
:get-item-label-fn (lambda ((index int))
|
||||
(case index
|
||||
((0) (lookup-text! *common-text* (text-id progress-sound-mono) #f))
|
||||
((1) (lookup-text! *common-text* (text-id progress-sound-stereo) #f))
|
||||
((2) (lookup-text! *common-text* (text-id progress-sound-surround) #f))))
|
||||
:get-item-index-fn (lambda () (-> *setting-control* user-default stereo-mode))
|
||||
:on-confirm (lambda ((index int) (the-progress progress)) (set! (-> *setting-control* user-default stereo-mode) index)))))
|
||||
|
||||
(define *options-options-pc* (new 'static 'menu-option-list
|
||||
:y-center #xc6
|
||||
:y-space 30
|
||||
:scale 0.82
|
||||
:options (new 'static 'boxed-array :type menu-option
|
||||
(new 'static 'menu-sub-menu-option
|
||||
:name (text-id progress-game-options)
|
||||
:offset-y 0.1
|
||||
:next-state 'game-options
|
||||
)
|
||||
(new 'static 'menu-sub-menu-option
|
||||
:name (text-id progress-graphic-options)
|
||||
:offset-y 0.275
|
||||
:next-state 'graphic-options
|
||||
)
|
||||
(new 'static 'menu-sub-menu-option
|
||||
:name (text-id progress-sound-options)
|
||||
:offset-y 0.45
|
||||
:next-state 'sound-options
|
||||
)
|
||||
(new 'static 'menu-sub-menu-option
|
||||
:name (text-id progress-picture-options)
|
||||
:offset-y 0.625
|
||||
:next-state 'picture-options
|
||||
)
|
||||
(new 'static 'menu-sub-menu-option
|
||||
:name (text-id progress-camera-options)
|
||||
:offset-y 0.8
|
||||
:next-state 'camera-options
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(define *unlocked-secrets-pc*
|
||||
(new 'static 'menu-option-list
|
||||
:y-center #xc6
|
||||
:y-space 30
|
||||
:scale 0.82
|
||||
:options (new 'static 'boxed-array :type menu-option
|
||||
(new 'static 'menu-unlocked-sub-menu-option
|
||||
:name (text-id progress-title-level-select-act-1)
|
||||
:offset-y 0.0384
|
||||
:next-state 'select-start
|
||||
:mask #x20
|
||||
:value 1
|
||||
)
|
||||
(new 'static 'menu-unlocked-sub-menu-option
|
||||
:name (text-id progress-title-level-select-act-2)
|
||||
:offset-y 0.1153
|
||||
:next-state 'select-start
|
||||
:mask #x40
|
||||
:value 2
|
||||
)
|
||||
(new 'static 'menu-unlocked-sub-menu-option
|
||||
:name (text-id progress-title-level-select-act-3)
|
||||
:offset-y 0.1923
|
||||
:next-state 'select-start
|
||||
:mask #x80
|
||||
:value 3
|
||||
)
|
||||
(new 'static 'menu-unlocked-sub-menu-option
|
||||
:name (text-id progress-title-scrap-book)
|
||||
:offset-y 0.2692
|
||||
:next-state 'go-away
|
||||
:mask #x100
|
||||
:value 1
|
||||
)
|
||||
(new 'static 'menu-unlocked-sub-menu-option
|
||||
:name (text-id progress-title-mega-scrap-book)
|
||||
:offset-y 0.3461
|
||||
:next-state 'go-away
|
||||
:mask #x200
|
||||
:value 2
|
||||
)
|
||||
(new 'static 'menu-unlocked-sub-menu-option
|
||||
:name (text-id progress-title-jak1-mdl-viewer)
|
||||
:offset-y 0.423
|
||||
:next-state 'select-model
|
||||
:mask #x800
|
||||
:value 1
|
||||
)
|
||||
(new 'static 'menu-unlocked-sub-menu-option
|
||||
:name (text-id progress-title-jak2-mdl-viewer)
|
||||
:offset-y 0.5
|
||||
:next-state 'select-model
|
||||
:mask #x1000
|
||||
:value 2
|
||||
)
|
||||
(new 'static 'menu-unlocked-sub-menu-option
|
||||
:name (text-id progress-title-jak3-mdl-viewer)
|
||||
:offset-y 0.5769
|
||||
:next-state 'select-model
|
||||
:mask #x2000
|
||||
:value 3
|
||||
)
|
||||
(new 'static 'menu-unlocked-sub-menu-option
|
||||
:name (text-id progress-scene-player-act-1)
|
||||
:offset-y 0.6538
|
||||
:next-state 'select-scene
|
||||
:mask #x2
|
||||
)
|
||||
(new 'static 'menu-unlocked-sub-menu-option
|
||||
:name (text-id progress-scene-player-act-2)
|
||||
:offset-y 0.7307
|
||||
:next-state 'select-scene
|
||||
:mask #x4
|
||||
:value 1
|
||||
)
|
||||
(new 'static 'menu-unlocked-sub-menu-option
|
||||
:name (text-id progress-scene-player-act-3)
|
||||
:offset-y 0.8076
|
||||
:next-state 'select-scene
|
||||
:mask #x8
|
||||
:value 2
|
||||
)
|
||||
(new 'static 'menu-unlocked-sub-menu-option
|
||||
:name (text-id progress-title-commentary)
|
||||
:offset-y 0.8846
|
||||
:next-state 'select-scene
|
||||
:mask #x10
|
||||
:value 3
|
||||
)
|
||||
; (new 'static 'menu-unlocked-sub-menu-option :name (text-id progress-music-player) :offset-y 0.9)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; TODO - this is a gross misuse of macros, instead if we want to hide a very small amount of options in one menu versus another
|
||||
;; it's a clear indication of a missing feature (add a lambda that determines visibility, or just the use disabled one)
|
||||
(defmacro game-options-pc-input-options ()
|
||||
`(progress-new-generic-link-to-scrolling-page (text-id progress-menu-input-options)
|
||||
; (progress-new-generic-link-to-scrolling-page (text-id progress-camera-options)
|
||||
; (new 'static 'menu-generic-boolean-option
|
||||
; :name (text-id progress-camera-options-first-horz)
|
||||
; :truthy-text (text-id progress-normal)
|
||||
; :falsey-text (text-id progress-inverted)
|
||||
; :get-value-fn (lambda () (-> *pc-settings* first-camera-h-inverted?))
|
||||
; :on-confirm (lambda ((val symbol))
|
||||
; (set! (-> *pc-settings* first-camera-h-inverted?) val)
|
||||
; (pc-settings-save)))
|
||||
; (new 'static 'menu-generic-boolean-option
|
||||
; :name (text-id progress-camera-options-first-vert)
|
||||
; :truthy-text (text-id progress-normal)
|
||||
; :falsey-text (text-id progress-inverted)
|
||||
; :get-value-fn (lambda () (-> *pc-settings* first-camera-v-inverted?))
|
||||
; :on-confirm (lambda ((val symbol))
|
||||
; (set! (-> *pc-settings* first-camera-v-inverted?) val)
|
||||
; (pc-settings-save)))
|
||||
; (new 'static 'menu-generic-boolean-option
|
||||
; :name (text-id progress-camera-options-third-horz)
|
||||
; :truthy-text (text-id progress-normal)
|
||||
; :falsey-text (text-id progress-inverted)
|
||||
; :get-value-fn (lambda () (-> *pc-settings* third-camera-h-inverted?))
|
||||
; :on-confirm (lambda ((val symbol))
|
||||
; (set! (-> *pc-settings* third-camera-h-inverted?) val)
|
||||
; (pc-settings-save)))
|
||||
; (new 'static 'menu-generic-boolean-option
|
||||
; :name (text-id progress-camera-options-third-vert)
|
||||
; :truthy-text (text-id progress-normal)
|
||||
; :falsey-text (text-id progress-inverted)
|
||||
; :get-value-fn (lambda () (-> *pc-settings* third-camera-v-inverted?))
|
||||
; :on-confirm (lambda ((val symbol))
|
||||
; (set! (-> *pc-settings* third-camera-v-inverted?) val)
|
||||
; (pc-settings-save)))
|
||||
; (new 'static 'menu-generic-confirm-option
|
||||
; :name (text-id progress-restore-defaults)
|
||||
; :on-confirm (lambda ((val symbol))
|
||||
; (reset-camera *pc-settings* #t)
|
||||
; (pc-settings-save))))
|
||||
(progress-new-generic-link-to-scrolling-page (text-id progress-menu-controller-options) :should-disable? (lambda () (<= (pc-get-controller-count) 0))
|
||||
(new 'static 'menu-generic-carousel-option
|
||||
:name (text-id progress-controller-options-select-controller)
|
||||
:get-max-size-fn (lambda () (pc-get-controller-count))
|
||||
:get-item-label-fn (lambda ((index int))
|
||||
(pc-get-controller-name index *pc-cpp-temp-string*)
|
||||
*pc-cpp-temp-string*)
|
||||
:get-item-index-fn (lambda () (pc-get-controller-index 0))
|
||||
:on-confirm (lambda ((index int) (the-progress progress)) (pc-set-controller! index 0)))
|
||||
(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-vibration)
|
||||
:should-disable? (lambda () (not (pc-current-controller-has-rumble?)))
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (-> *setting-control* user-default vibration))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! (-> *pc-settings* memcard-vibration?) val)
|
||||
(pc-settings-save)
|
||||
(set! (-> *setting-control* user-default vibration) val)))
|
||||
(new 'static 'menu-generic-slider-option
|
||||
:name (text-id progress-controller-options-analog-deadzone)
|
||||
:min-value 0.0
|
||||
:max-value 1.0
|
||||
:step 0.01
|
||||
:show-decimal? #t
|
||||
:get-value-fn (lambda () (-> *pc-settings* stick-deadzone))
|
||||
:on-confirm (lambda ((val float))
|
||||
(set! (-> *pc-settings* stick-deadzone) val)
|
||||
(pc-settings-save)))
|
||||
(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-controller-options-ignore-if-unfocused)
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (-> *pc-settings* ignore-controller-win-unfocused?))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! (-> *pc-settings* ignore-controller-win-unfocused?) val)
|
||||
(pc-settings-save)))
|
||||
(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-controller-options-led-hp)
|
||||
:should-disable? (lambda () (not (pc-current-controller-has-led?)))
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (-> *pc-settings* controller-led-hp?))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! (-> *pc-settings* controller-led-hp?) val)
|
||||
(pc-settings-save)))
|
||||
(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-controller-options-led-state)
|
||||
:should-disable? (lambda () (not (pc-current-controller-has-led?)))
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (-> *pc-settings* controller-led-eco?))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! (-> *pc-settings* controller-led-eco?) val)
|
||||
(pc-settings-save)))
|
||||
(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-controller-options-enable-pressure-sensitivity)
|
||||
:should-disable? (lambda () (not (pc-current-controller-has-pressure-sensitivity?)))
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (pc-get-pressure-sensitivity-enabled?))
|
||||
:on-confirm (lambda ((val symbol)) (pc-set-pressure-sensitivity-enabled! val)))
|
||||
(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-controller-options-swap-r1-r2)
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (-> *pc-settings* controller-swap-r1-r2?))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! (-> *pc-settings* controller-swap-r1-r2?) val)
|
||||
(pc-settings-save)))
|
||||
(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-controller-options-enable-trigger-effects)
|
||||
:should-disable? (lambda () (not (pc-current-controller-has-trigger-effect-support?)))
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (pc-get-trigger-effects-enabled?))
|
||||
:on-confirm (lambda ((val symbol)) (pc-set-trigger-effects-enabled! val)))
|
||||
(new 'static 'menu-generic-confirm-option
|
||||
:name (text-id progress-restore-defaults)
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(reset-input *pc-settings* 'controller #t)
|
||||
(pc-set-pressure-sensitivity-enabled! #f)
|
||||
(pc-set-trigger-effects-enabled! #f)
|
||||
(set-ignore-controller-in-bg! *pc-settings* (-> *pc-settings* ignore-controller-win-unfocused?))
|
||||
(pc-settings-save))))
|
||||
(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-input-options-enable-keyboard)
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (pc-get-keyboard-enabled?))
|
||||
:on-confirm (lambda ((val symbol)) (pc-set-keyboard-enabled! val)))
|
||||
(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-input-options-enable-mouse)
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (-> *pc-settings* mouse-enabled?))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! (-> *pc-settings* mouse-enabled?) val)
|
||||
(update-mouse-controls! *pc-settings*)
|
||||
(pc-settings-save)))
|
||||
(progress-new-generic-link-to-scrolling-page (text-id progress-menu-mouse-options) :should-disable? (lambda () (not (-> *pc-settings* mouse-enabled?)))
|
||||
(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-mouse-options-track-camera)
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (-> *pc-settings* mouse-camera?))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! (-> *pc-settings* mouse-camera?) val)
|
||||
(update-mouse-controls! *pc-settings*)
|
||||
(pc-settings-save)))
|
||||
(new 'static 'menu-generic-slider-option
|
||||
:name (text-id progress-mouse-options-horz-sens)
|
||||
:should-disable? (lambda () (not (-> *pc-settings* mouse-camera?)))
|
||||
:min-value -100.0
|
||||
:max-value 100.0
|
||||
:step 0.10
|
||||
:show-decimal? #t
|
||||
:get-value-fn (lambda () (-> *pc-settings* mouse-xsens))
|
||||
:on-confirm (lambda ((val float))
|
||||
(set! (-> *pc-settings* mouse-xsens) val)
|
||||
(update-mouse-controls! *pc-settings*)
|
||||
(pc-settings-save)))
|
||||
(new 'static 'menu-generic-slider-option
|
||||
:name (text-id progress-mouse-options-vert-sens)
|
||||
:should-disable? (lambda () (not (-> *pc-settings* mouse-camera?)))
|
||||
:min-value -100.0
|
||||
:max-value 100.0
|
||||
:step 0.10
|
||||
:show-decimal? #t
|
||||
:get-value-fn (lambda () (-> *pc-settings* mouse-ysens))
|
||||
:on-confirm (lambda ((val float))
|
||||
(set! (-> *pc-settings* mouse-ysens) val)
|
||||
(update-mouse-controls! *pc-settings*)
|
||||
(pc-settings-save)))
|
||||
(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-mouse-options-player-movement)
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (-> *pc-settings* mouse-movement?))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! (-> *pc-settings* mouse-movement?) val)
|
||||
(update-mouse-controls! *pc-settings*)
|
||||
(pc-settings-save)))
|
||||
(new 'static 'menu-generic-confirm-option
|
||||
:name (text-id progress-restore-defaults)
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(reset-input *pc-settings* 'mouse #t)
|
||||
(update-mouse-controls! *pc-settings*)
|
||||
(pc-settings-save))))
|
||||
(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-input-options-auto-hide-cursor)
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (-> *pc-settings* auto-hide-cursor?))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! (-> *pc-settings* auto-hide-cursor?) val)
|
||||
(update-mouse-controls! *pc-settings*)
|
||||
(pc-settings-save)))
|
||||
(progress-new-generic-link-to-scrolling-page (text-id progress-menu-reassign-binds)
|
||||
(progress-new-generic-link-to-keybind-details-page (text-id progress-reassign-binds-controller)
|
||||
:should-disable? (lambda () (<= (pc-get-controller-count) 0))
|
||||
:device-type controller
|
||||
:entries (select l3 r3 start dpad-up dpad-right dpad-down dpad-left l2 r2 l1 r1 triangle circle cross square)
|
||||
:confirm ((text-id progress-restore-defaults) (lambda () (pc-reset-bindings-to-defaults! 0 0))))
|
||||
(progress-new-generic-link-to-keybind-details-page (text-id progress-reassign-binds-keyboard)
|
||||
:should-disable? (lambda () (not (pc-get-keyboard-enabled?)))
|
||||
:device-type keyboard
|
||||
:entries (l-analog-up l-analog-down l-analog-left l-analog-right r-analog-up r-analog-down r-analog-left r-analog-right
|
||||
select l3 r3 start dpad-up dpad-right dpad-down dpad-left l2 r2 l1 r1 triangle circle cross square)
|
||||
:confirm ((text-id progress-restore-defaults) (lambda () (pc-reset-bindings-to-defaults! 0 1))))
|
||||
(progress-new-generic-link-to-keybind-details-page (text-id progress-reassign-binds-mouse)
|
||||
:should-disable? (lambda () (not (-> *pc-settings* mouse-enabled?)))
|
||||
:device-type mouse
|
||||
:entries (select l3 r3 start dpad-up dpad-right dpad-down dpad-left l2 r2 l1 r1 triangle circle cross square)
|
||||
:confirm ((text-id progress-restore-defaults) (lambda () (pc-reset-bindings-to-defaults! 0 2)))))
|
||||
(new 'static 'menu-generic-confirm-option
|
||||
:name (text-id progress-restore-defaults)
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(reset-input *pc-settings* 'input #t)
|
||||
(pc-set-keyboard-enabled! (-> *pc-settings* keyboard-enabled?))
|
||||
(update-mouse-controls! *pc-settings*)
|
||||
(pc-settings-save)))))
|
||||
|
||||
(defmacro game-options-pc-subtitle-toggle ()
|
||||
`(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-subtitles)
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (-> *setting-control* user-default subtitle))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! (-> *pc-settings* memcard-subtitles?) val)
|
||||
(pc-settings-save)
|
||||
(set! (-> *setting-control* user-default subtitle) val))))
|
||||
|
||||
(defmacro game-options-pc-hint-subtitle-toggle ()
|
||||
`(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-hint-subtitles)
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (-> *pc-settings* hinttitles?))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! (-> *pc-settings* hinttitles?) val)
|
||||
(pc-settings-save))))
|
||||
|
||||
(defmacro game-options-pc-subtitle-language ()
|
||||
`(new 'static 'menu-generic-carousel-option
|
||||
:name (text-id progress-subtitle-language)
|
||||
:items (new 'static 'boxed-array :type text-id
|
||||
(text-id progress-language-english)
|
||||
(text-id progress-language-french)
|
||||
(text-id progress-language-german)
|
||||
(text-id progress-language-spanish)
|
||||
(text-id progress-language-italian)
|
||||
(text-id progress-language-commentary)
|
||||
(text-id progress-language-japanese)
|
||||
(text-id progress-language-korean)
|
||||
(text-id progress-language-russian)
|
||||
(text-id progress-language-portuguese)
|
||||
(text-id progress-language-dutch)
|
||||
(text-id progress-language-english-uk)
|
||||
; (text-id language-name-finnish)
|
||||
; (text-id language-name-swedish)
|
||||
; (text-id language-name-danish)
|
||||
; (text-id language-name-norwegian)
|
||||
; (text-id language-name-dutch)
|
||||
; (text-id language-name-br-portuguese)
|
||||
; (text-id language-name-hungarian)
|
||||
; (text-id language-name-catalan)
|
||||
; (text-id language-name-icelandic)
|
||||
; (text-id language-name-polish)
|
||||
; (text-id language-name-lithuanian)
|
||||
; (text-id language-name-czech)
|
||||
; (text-id language-name-croatian)
|
||||
; (text-id language-name-galician)
|
||||
)
|
||||
:get-item-index-fn (lambda () (-> *pc-settings* subtitle-language))
|
||||
:on-confirm (lambda ((index int) (the-progress progress))
|
||||
(set! (-> *pc-settings* subtitle-language) (the-as pc-language index))
|
||||
(pc-settings-save))))
|
||||
|
||||
(defmacro game-options-pc-sound-language ()
|
||||
`(new 'static 'menu-generic-carousel-option
|
||||
:name (text-id progress-language)
|
||||
:items (new 'static 'boxed-array :type text-id
|
||||
(text-id progress-language-english)
|
||||
(text-id progress-language-french)
|
||||
(text-id progress-language-german)
|
||||
(text-id progress-language-spanish)
|
||||
(text-id progress-language-italian)
|
||||
(text-id progress-language-commentary)
|
||||
(text-id progress-language-japanese)
|
||||
(text-id progress-language-korean)
|
||||
(text-id progress-language-russian)
|
||||
(text-id progress-language-portuguese)
|
||||
(text-id progress-language-dutch)
|
||||
(text-id progress-language-english-uk)
|
||||
)
|
||||
:get-item-index-fn (lambda () (-> *setting-control* user-default language))
|
||||
:on-confirm (lambda ((index int) (the-progress progress))
|
||||
(set! (-> *setting-control* user-default language) (the-as language-enum index)))))
|
||||
|
||||
(defmacro game-options-pc-text-language ()
|
||||
`(new 'static 'menu-generic-carousel-option
|
||||
:name (text-id progress-text-language)
|
||||
:items (new 'static 'boxed-array :type text-id
|
||||
(text-id progress-language-english)
|
||||
(text-id progress-language-french)
|
||||
(text-id progress-language-german)
|
||||
(text-id progress-language-spanish)
|
||||
(text-id progress-language-italian)
|
||||
(text-id progress-language-commentary)
|
||||
(text-id progress-language-japanese)
|
||||
(text-id progress-language-korean)
|
||||
(text-id progress-language-russian)
|
||||
(text-id progress-language-portuguese)
|
||||
(text-id progress-language-dutch)
|
||||
(text-id progress-language-english-uk)
|
||||
; (text-id language-name-finnish)
|
||||
; (text-id language-name-swedish)
|
||||
; (text-id language-name-danish)
|
||||
; (text-id language-name-norwegian)
|
||||
; (text-id language-name-dutch)
|
||||
; (text-id language-name-br-portuguese)
|
||||
; (text-id language-name-hungarian)
|
||||
; (text-id language-name-catalan)
|
||||
; (text-id language-name-icelandic)
|
||||
; (text-id language-name-polish)
|
||||
; (text-id language-name-lithuanian)
|
||||
; (text-id language-name-czech)
|
||||
; (text-id language-name-croatian)
|
||||
; (text-id language-name-galician)
|
||||
)
|
||||
:get-item-index-fn (lambda () (-> *pc-settings* text-language))
|
||||
:on-confirm (lambda ((index int) (the-progress progress))
|
||||
(set! (-> *pc-settings* text-language) (the-as pc-language index))
|
||||
;; NOTE - this doesn't actually work (naughty dog tried it too in their progress code)
|
||||
(load-level-text-files (the-as int (-> *pc-settings* text-language)))
|
||||
(pc-settings-save))))
|
||||
|
||||
(defmacro misc-options-pc-discord-rpc ()
|
||||
`(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-discord-rpc)
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (-> *pc-settings* discord-rpc?))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! (-> *pc-settings* discord-rpc?) val)
|
||||
(pc-settings-save))))
|
||||
|
||||
(defmacro misc-options-pc-speedrunner-mode ()
|
||||
`(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-speedrunner-mode)
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (-> *pc-settings* speedrunner-mode?))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! (-> *pc-settings* speedrunner-mode?) val)
|
||||
(pc-settings-save))))
|
||||
|
||||
(defmacro misc-options-pc-fast-progress ()
|
||||
`(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-fast-progress)
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (-> *pc-settings* fast-progress?))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! (-> *pc-settings* fast-progress?) val)
|
||||
(pc-settings-save))))
|
||||
|
||||
(defmacro misc-options-pc-projectile-focus ()
|
||||
`(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-misc-fix-projectile-focus)
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (-> *pc-settings* fix-projectile-focus))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! (-> *pc-settings* fix-projectile-focus) val)
|
||||
(pc-settings-save))))
|
||||
|
||||
(define *game-options-pc*
|
||||
(progress-new-generic-scrolling-page (text-id progress-game-options)
|
||||
(game-options-pc-input-options)
|
||||
(game-options-pc-subtitle-toggle)
|
||||
(game-options-pc-hint-subtitle-toggle)
|
||||
(game-options-pc-subtitle-language)
|
||||
(game-options-pc-sound-language)
|
||||
(game-options-pc-text-language)
|
||||
(progress-new-generic-link-to-scrolling-page (text-id progress-misc-game-options)
|
||||
(misc-options-pc-discord-rpc)
|
||||
(misc-options-pc-speedrunner-mode)
|
||||
(misc-options-pc-fast-progress)
|
||||
(misc-options-pc-projectile-focus))))
|
||||
|
||||
(define *game-options-title-pc*
|
||||
(progress-new-generic-scrolling-page (text-id progress-game-options)
|
||||
(game-options-pc-input-options)
|
||||
(game-options-pc-subtitle-toggle)
|
||||
(game-options-pc-hint-subtitle-toggle)
|
||||
(game-options-pc-subtitle-language)
|
||||
(game-options-pc-sound-language)
|
||||
(game-options-pc-text-language)
|
||||
;; TODO - is there a reason we only display the territory setting on the title screen?
|
||||
(new 'static 'menu-generic-carousel-option
|
||||
:name (text-id progress-territory)
|
||||
:items (new 'static 'boxed-array :type text-id
|
||||
(text-id progress-territory-auto)
|
||||
(text-id progress-territory-scea)
|
||||
(text-id progress-territory-scee)
|
||||
(text-id progress-territory-scei)
|
||||
(text-id progress-territory-scek))
|
||||
:get-item-index-fn (lambda () (1+ (-> *pc-settings* territory)))
|
||||
:on-confirm (lambda ((index int) (the-progress progress)) (set! (-> *pc-settings* territory) (1- index)) (pc-settings-save)))
|
||||
(progress-new-generic-link-to-scrolling-page (text-id progress-misc-game-options)
|
||||
(misc-options-pc-discord-rpc)
|
||||
(misc-options-pc-speedrunner-mode)
|
||||
;; TODO - is there a reason we only display the fast airlock and fast-elevator setting on the title screen (worried about people changing it mid game?)
|
||||
(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-fast-airlock)
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (-> *pc-settings* fast-airlock?))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! (-> *pc-settings* fast-airlock?) val)
|
||||
(pc-settings-save)))
|
||||
(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-fast-elevator)
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (-> *pc-settings* fast-elevator?))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! (-> *pc-settings* fast-elevator?) val)
|
||||
(pc-settings-save)))
|
||||
(misc-options-pc-fast-progress))))
|
||||
|
||||
|
||||
(define *msaa-options* (new 'static 'boxed-array :type int16 1 2 4 8 16))
|
||||
(define *frame-rate-options* (new 'static 'boxed-array :type int16 60 75 90 120 144 165 240))
|
||||
(define *frame-rate-disclaimer-seen?* #f)
|
||||
|
||||
(define *graphic-options-pc*
|
||||
(progress-new-generic-scrolling-page (text-id progress-graphic-options)
|
||||
;; NOTE/TODO - this doesn't follow the established generic menu pattern
|
||||
;; a generic scrolling list menu component should be created (similar to menu-generic-details-page)
|
||||
;; so the code can be localized to functions instead of scattered around in a bunch of switch statements
|
||||
(new 'static 'menu-generic-to-resolutions-option
|
||||
:name (text-id progress-window-size)
|
||||
:on-confirm (lambda ((the-progress progress))
|
||||
(push-and-set-state the-progress 'resolutions)))
|
||||
(new 'static 'menu-generic-carousel-option
|
||||
:name (text-id progress-graphics-display)
|
||||
:get-item-index-fn (lambda () (pc-get-display-id))
|
||||
:get-max-size-fn (lambda () (pc-get-display-count))
|
||||
:get-item-label-fn (lambda ((index int))
|
||||
(let ((name (pc-get-display-name index *pc-cpp-temp-string*)))
|
||||
(if name
|
||||
(string-format "(~D) ~S" index *pc-cpp-temp-string*)
|
||||
(string-format "Dis~+7Vp~-7Vla~+7Vy~-7V ~D" index))
|
||||
))
|
||||
:on-confirm (lambda ((index int) (the-progress progress))
|
||||
(pc-set-display-id! index))
|
||||
:should-disable? (lambda () (or (= (pc-get-display-mode) 'windowed) (<= (pc-get-display-count) 1))))
|
||||
(new 'static 'menu-generic-carousel-option
|
||||
:name (text-id progress-display-mode)
|
||||
:items (new 'static 'boxed-array :type text-id
|
||||
(text-id progress-windowed)
|
||||
(text-id progress-fullscreen)
|
||||
(text-id progress-borderless))
|
||||
:get-item-index-fn (lambda ()
|
||||
(case (pc-get-display-mode)
|
||||
(('windowed) 0)
|
||||
(('fullscreen) 1)
|
||||
(('borderless) 2)))
|
||||
:on-confirm (lambda ((index int) (the-progress progress))
|
||||
(case index
|
||||
((0) (pc-set-display-mode! 'windowed))
|
||||
((1) (pc-set-display-mode! 'fullscreen))
|
||||
((2) (pc-set-display-mode! 'borderless)))))
|
||||
(new 'static 'menu-generic-carousel-option
|
||||
:name (text-id progress-graphics-aspect-ratio)
|
||||
:items (new 'static 'boxed-array :type text-id
|
||||
(text-id progress-aspect-ratio-4x3)
|
||||
(text-id progress-aspect-ratio-16x9)
|
||||
(text-id progress-aspect-ratio-auto)
|
||||
(text-id progress-aspect-ratio-custom))
|
||||
:get-item-index-fn (lambda ()
|
||||
(cond
|
||||
((not (-> *pc-settings* use-vis?))
|
||||
(if (-> *pc-settings* aspect-ratio-auto?) 2 3))
|
||||
(else
|
||||
(case (get-aspect-ratio)
|
||||
(('aspect16x9) 1)
|
||||
(else 0)))))
|
||||
:on-confirm (lambda ((index int) (the-progress progress))
|
||||
(case index
|
||||
((0)
|
||||
(if (not (-> *pc-settings* use-vis?))
|
||||
(false! (-> *setting-control* user-current aspect-ratio)))
|
||||
(set! (-> *setting-control* user-default aspect-ratio) 'aspect4x3)
|
||||
(true! (-> *pc-settings* use-vis?)))
|
||||
((1)
|
||||
(if (not (-> *pc-settings* use-vis?))
|
||||
(false! (-> *setting-control* user-current aspect-ratio)))
|
||||
(set! (-> *setting-control* user-default aspect-ratio) 'aspect16x9)
|
||||
(true! (-> *pc-settings* use-vis?)))
|
||||
((2)
|
||||
(set! (-> *setting-control* user-default aspect-ratio) 'aspect4x3)
|
||||
(true! (-> *pc-settings* aspect-ratio-auto?))
|
||||
(false! (-> *pc-settings* use-vis?)))
|
||||
((3)
|
||||
(push-and-set-state the-progress 'aspect-ratio-custom)))
|
||||
(pc-settings-save)))
|
||||
(new 'static 'menu-generic-carousel-option
|
||||
:name (text-id progress-frame-rate)
|
||||
:should-disable? (lambda () (or (not *debug-segment*) (-> *pc-settings* speedrunner-mode?)))
|
||||
:get-item-index-fn (lambda ()
|
||||
;; TODO - use an array
|
||||
(case (-> *pc-settings* target-fps)
|
||||
((60) 0)
|
||||
((75) 1)
|
||||
((90) 2)
|
||||
((120) 3)
|
||||
((144) 4)
|
||||
((165) 5)
|
||||
((240) 6)))
|
||||
:get-max-size-fn (lambda () (-> *frame-rate-options* length))
|
||||
:get-item-label-fn (lambda ((index int)) (string-format "~D" (-> *frame-rate-options* index)))
|
||||
:on-confirm (lambda ((index int) (the-progress progress))
|
||||
(cond
|
||||
((or (zero? index) (= (-> *frame-rate-options* index) (-> *pc-settings* target-fps)) *frame-rate-disclaimer-seen?*)
|
||||
(set-frame-rate! *pc-settings* (-> *frame-rate-options* index) #t)
|
||||
(pc-settings-save))
|
||||
(else
|
||||
(defun-extern set-progress-frame-rate-index int int)
|
||||
(set-progress-frame-rate-index index)
|
||||
(push-and-set-state the-progress 'fps-disclaimer)))))
|
||||
(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-vsync)
|
||||
:truthy-text (text-id progress-on)
|
||||
:falsey-text (text-id progress-off)
|
||||
:get-value-fn (lambda () (-> *pc-settings* vsync?))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(set! (-> *pc-settings* vsync?) val)
|
||||
(pc-settings-save)))
|
||||
(new 'static 'menu-generic-carousel-option
|
||||
:name (text-id progress-msaa)
|
||||
:get-item-index-fn (lambda ()
|
||||
;; TODO - use an array
|
||||
(case (-> *pc-settings* gfx-msaa)
|
||||
((1) 0)
|
||||
((2) 1)
|
||||
((4) 2)
|
||||
((8) 3)
|
||||
((16) 4)))
|
||||
:get-max-size-fn (lambda () (-> *msaa-options* length))
|
||||
:get-item-label-fn (lambda ((index int))
|
||||
(if (zero? index)
|
||||
(lookup-text! *common-text* (text-id progress-graphics-msaa-off) #f)
|
||||
(string-format (lookup-text! *common-text* (text-id progress-msaa-x) #f) (-> *msaa-options* index))))
|
||||
:on-confirm (lambda ((index int) (the-progress progress))
|
||||
(set! (-> *pc-settings* gfx-msaa) (ash 1 index))
|
||||
(pc-settings-save)))
|
||||
(progress-new-generic-link-to-scrolling-page (text-id progress-graphics-ps2)
|
||||
(new 'static 'menu-generic-boolean-option
|
||||
:name (text-id progress-lod-bg)
|
||||
:truthy-text (text-id progress-lod-low)
|
||||
:falsey-text (text-id progress-lod-high)
|
||||
:get-value-fn (lambda () (> (-> *pc-settings* lod-force-tfrag) 0))
|
||||
:on-confirm (lambda ((val symbol))
|
||||
(cond
|
||||
(val
|
||||
(set! (-> *pc-settings* lod-force-tfrag) 2)
|
||||
(set! (-> *pc-settings* lod-force-tie) 2))
|
||||
(else
|
||||
(set! (-> *pc-settings* lod-force-tfrag) 0)
|
||||
(set! (-> *pc-settings* lod-force-tie) 0)))
|
||||
(pc-settings-save)))
|
||||
(static-progress-generic-pc-settings-lod-default-high-boolean (text-id progress-lod-fg) (-> *pc-settings* ps2-lod-dist?))
|
||||
(static-progress-generic-pc-settings-on-off-boolean (text-id progress-ps2-parts) (-> *pc-settings* ps2-parts?))
|
||||
(static-progress-generic-pc-settings-shadows-normal-extended-boolean (text-id progress-shadows) (-> *pc-settings* ps2-shadow?))
|
||||
(static-progress-generic-pc-settings-on-off-boolean (text-id progress-hires-sky) (-> *pc-settings* hires-clouds?)))
|
||||
))
|
||||
|
||||
|
||||
|
||||
(define *frame-rate-disclaimer-options*
|
||||
(new 'static 'menu-option-list
|
||||
:y-center 198
|
||||
:y-space 34
|
||||
:scale 0.82
|
||||
:options (new 'static 'boxed-array :type menu-option (new 'static 'menu-frame-rate-disclaimer-option))
|
||||
)
|
||||
)
|
||||
|
||||
(define *aspect-ratio-custom-options*
|
||||
(new 'static 'menu-option-list
|
||||
:y-center 198
|
||||
:y-space 34
|
||||
:scale 0.82
|
||||
:options (new 'static 'boxed-array :type menu-option
|
||||
(new 'static 'menu-aspect-ratio-custom-option :name (text-id progress-aspect-ratio-custom-title))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *music-player-options*
|
||||
(new 'static 'menu-option-list
|
||||
:y-center 198
|
||||
:y-space 34
|
||||
:scale 0.82
|
||||
:options (new 'static 'boxed-array :type menu-option
|
||||
(new 'static 'menu-music-player-option :name (text-id progress-music-player))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *resolutions-options*
|
||||
(new 'static 'menu-option-list
|
||||
:y-center 198
|
||||
:y-space 34
|
||||
:scale 0.82
|
||||
:options (new 'static 'boxed-array :type menu-option
|
||||
(new 'static 'menu-resolution-option :name (text-id progress-window-size))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
(require "engine/gfx/hw/display-h.gc")
|
||||
(require "kernel/gstring.gc")
|
||||
(require "kernel/gstate.gc")
|
||||
|
||||
(defun font-color->string ((val font-color))
|
||||
(enum->string font-color val))
|
||||
|
||||
(deftype color-display (process) ())
|
||||
|
||||
(define *color-displays* (the color-display #f))
|
||||
|
||||
(defmethod relocate ((this color-display) (offset int))
|
||||
(set! *color-displays* this)
|
||||
(if *color-displays* (&+! *color-displays* offset))
|
||||
(call-parent-method this offset))
|
||||
|
||||
(defun draw-all-font-colors ()
|
||||
(with-dma-buffer-add-bucket ((buf (-> (current-frame) debug-buf)) (bucket-id debug-no-zbuf2))
|
||||
(dotimes (i 44)
|
||||
(draw-string-xy (string-format "~2D ~S" i (font-color->string (the font-color i)))
|
||||
buf
|
||||
(+ 4 (* (get-screen-x 0.5) (mod i 2)))
|
||||
(+ 8 (* 8 (/ i 2)))
|
||||
(the font-color i)
|
||||
(font-flags shadow)))))
|
||||
|
||||
(defun start-display-text-colors ()
|
||||
(if *color-displays*
|
||||
(format #t "Colors are already being displayed")
|
||||
(set! *color-displays*
|
||||
(the color-display (ppointer->process (process-spawn-function color-display
|
||||
:name "color-display"
|
||||
(lambda :behavior color-display ()
|
||||
(loop
|
||||
(draw-all-font-colors)
|
||||
(suspend)))))))))
|
||||
|
||||
(defun-debug stop-display-text-colors ()
|
||||
"Kill the example text color display"
|
||||
(kill-by-name "color-display" *active-pool*))
|
||||
+1
-1
@@ -2435,7 +2435,7 @@
|
||||
|
||||
;; definition of type ammo-collectable
|
||||
(deftype ammo-collectable (collectable)
|
||||
((ammo-effect basic)
|
||||
((ammo-effect sparticle-launch-group)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -4494,7 +4494,7 @@
|
||||
(deftype level-exit (process-drawable)
|
||||
((minimap connection-minimap)
|
||||
(task-counter uint32)
|
||||
(ent basic)
|
||||
(ent entity-actor)
|
||||
)
|
||||
(:state-methods
|
||||
active
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
(stick-lock symbol)
|
||||
(flap-sound-id uint32)
|
||||
(mode-sound-bank connection)
|
||||
(mode basic)
|
||||
(mode symbol)
|
||||
(color-index int32)
|
||||
(as-daxter? symbol)
|
||||
(art-group-backup art-group)
|
||||
|
||||
+4
-4
@@ -1041,19 +1041,19 @@
|
||||
(set! (-> self flut color-index) arg2)
|
||||
(case arg1
|
||||
((#t)
|
||||
(set! (-> self flut mode) (the-as basic 'normal))
|
||||
(set! (-> self flut mode) 'normal)
|
||||
(set! (-> self flut as-daxter?) #f)
|
||||
)
|
||||
(('racer)
|
||||
(set! (-> self flut mode) (the-as basic arg1))
|
||||
(set! (-> self flut mode) arg1)
|
||||
(set! (-> self flut as-daxter?) #f)
|
||||
)
|
||||
(('wild)
|
||||
(set! (-> self flut mode) (the-as basic arg1))
|
||||
(set! (-> self flut mode) arg1)
|
||||
(set! (-> self flut as-daxter?) #t)
|
||||
)
|
||||
(else
|
||||
(set! (-> self flut mode) (the-as basic arg1))
|
||||
(set! (-> self flut mode) arg1)
|
||||
(set! (-> self flut as-daxter?) #f)
|
||||
)
|
||||
)
|
||||
|
||||
+4
-4
@@ -19,8 +19,8 @@
|
||||
(mech-start-time time-frame)
|
||||
(mech-time time-frame)
|
||||
(no-get-off-time time-frame)
|
||||
(stick-lock basic)
|
||||
(stick-off basic)
|
||||
(stick-lock symbol)
|
||||
(stick-off symbol)
|
||||
(forward-vel meters)
|
||||
(jump-thrust meters)
|
||||
(jump-thrust-fuel float)
|
||||
@@ -43,8 +43,8 @@
|
||||
(exhaust-local-dir vector 2 :inline)
|
||||
(smoke-local-pos vector 2 :inline)
|
||||
(smoke-local-vel vector 2 :inline)
|
||||
(particle-system-2d basic)
|
||||
(particle-system-3d basic)
|
||||
(particle-system-2d sparticle-system)
|
||||
(particle-system-3d sparticle-system)
|
||||
(part-thruster sparticle-launcher)
|
||||
(part-thruster-scale-x sp-field-init-spec)
|
||||
(part-thruster-scale-y sp-field-init-spec)
|
||||
|
||||
+1
-8
@@ -159,14 +159,7 @@
|
||||
(a2-4 *launch-matrix*)
|
||||
)
|
||||
(vector-copy! (-> a2-4 trans) s0-0)
|
||||
(t9-4
|
||||
(the-as sparticle-system a0-7)
|
||||
a1-6
|
||||
a2-4
|
||||
(the-as sparticle-launch-state #f)
|
||||
(the-as sparticle-launch-control #f)
|
||||
1.0
|
||||
)
|
||||
(t9-4 a0-7 a1-6 a2-4 (the-as sparticle-launch-state #f) (the-as sparticle-launch-control #f) 1.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+8
-8
@@ -1094,7 +1094,7 @@
|
||||
)
|
||||
:trans (-> target-mech-hit trans)
|
||||
:code (behavior ((arg0 symbol))
|
||||
(set! (-> self mech stick-off) (the-as basic #t))
|
||||
(set! (-> self mech stick-off) #t)
|
||||
(set! (-> self control unknown-word04) (the-as uint #f))
|
||||
(set! (-> self control did-move-to-pole-or-max-jump-height)
|
||||
(the-as float (send-event (handle->process (-> self attack-info attacker)) 'target 'die arg0))
|
||||
@@ -1383,7 +1383,7 @@
|
||||
)
|
||||
:enter (behavior ()
|
||||
(set! (-> self control mod-surface) *mech-pickup-mods*)
|
||||
(set! (-> self mech stick-off) (the-as basic #t))
|
||||
(set! (-> self mech stick-off) #t)
|
||||
(set-time! (-> self state-time))
|
||||
(set-forward-vel 0.0)
|
||||
(set! (-> self carry other) (the-as handle #f))
|
||||
@@ -1606,7 +1606,7 @@
|
||||
(set! (-> self control mod-surface) *mech-walk-mods*)
|
||||
(set-time! (-> self state-time))
|
||||
(set-forward-vel 0.0)
|
||||
(set! (-> self mech stick-off) (the-as basic #t))
|
||||
(set! (-> self mech stick-off) #t)
|
||||
)
|
||||
:exit (-> target-mech-carry-pickup exit)
|
||||
:code (behavior ()
|
||||
@@ -2369,7 +2369,7 @@
|
||||
(set! (-> self control mod-surface) *mech-walk-mods*)
|
||||
(set-time! (-> self state-time))
|
||||
(set-forward-vel 0.0)
|
||||
(set! (-> self mech stick-off) (the-as basic #t))
|
||||
(set! (-> self mech stick-off) #t)
|
||||
)
|
||||
:exit (-> target-mech-carry-pickup exit)
|
||||
:code (behavior ()
|
||||
@@ -2471,7 +2471,7 @@
|
||||
(vector-copy! (-> self mech mech-trans) (-> self control unknown-vector38))
|
||||
(quaternion-copy! (the-as quaternion (-> self mech mech-quat)) (-> self control unknown-quat40))
|
||||
(vector-copy! (-> self mech mech-scale) (-> self control scale))
|
||||
(set! (-> self mech stick-off) (the-as basic #t))
|
||||
(set! (-> self mech stick-off) #t)
|
||||
(ja-no-eval :group! jakb-mech-get-on-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(let ((f30-0 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 70.0 80.0))))
|
||||
@@ -2534,7 +2534,7 @@
|
||||
(vector-copy! (-> self mech mech-trans) (-> self control unknown-vector38))
|
||||
(quaternion-copy! (the-as quaternion (-> self mech mech-quat)) (-> self control unknown-quat40))
|
||||
(vector-copy! (-> self mech mech-scale) (-> self control scale))
|
||||
(set! (-> self mech stick-off) (the-as basic #t))
|
||||
(set! (-> self mech stick-off) #t)
|
||||
(ja-no-eval :group! jakb-mech-get-on-ja :num! (seek!) :frame-num 0.0)
|
||||
(until (ja-done? 0)
|
||||
(let ((f30-0 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 70.0 80.0))))
|
||||
@@ -2574,7 +2574,7 @@
|
||||
:event target-mech-handler
|
||||
:enter (behavior ()
|
||||
(vector-reset! (-> self control transv))
|
||||
(set! (-> self mech stick-off) (the-as basic #t))
|
||||
(set! (-> self mech stick-off) #t)
|
||||
(send-event (handle->process (-> self mech shield-handle)) 'enabled)
|
||||
)
|
||||
:exit (behavior ()
|
||||
@@ -2701,7 +2701,7 @@
|
||||
(set! (-> self neck flex-blend) 0.0)
|
||||
(logior! (-> self target-flags) (target-flags tf2))
|
||||
(logior! (-> self focus-status) (focus-status grabbed))
|
||||
(set! (-> self mech stick-off) (the-as basic #t))
|
||||
(set! (-> self mech stick-off) #t)
|
||||
(sound-stop (-> self mech engine-sound-id))
|
||||
(sound-stop (-> self mech thrust-sound-id))
|
||||
(sound-stop (-> self mech drag-sound-id))
|
||||
|
||||
+2
-2
@@ -324,8 +324,8 @@
|
||||
(fall-height meters)
|
||||
(mech-jump-thrust-fuel float)
|
||||
(strafe-jump-pre-window time-frame)
|
||||
(strafe-jump basic)
|
||||
(strafe-duck-jump basic)
|
||||
(strafe-jump symbol)
|
||||
(strafe-duck-jump symbol)
|
||||
(dark-jump-height-min meters)
|
||||
(dark-jump-height-max meters)
|
||||
(ladder-walk-up-speed meters)
|
||||
|
||||
+209
-251
File diff suppressed because it is too large
Load Diff
+40
-40
@@ -62,7 +62,7 @@
|
||||
|
||||
;; definition of type progress
|
||||
(deftype progress (process-drawable)
|
||||
((scissor-stack vector 8 :inline)
|
||||
((scissor-stack vector 8 :inline)
|
||||
(scissor-count int32)
|
||||
(current-options menu-option-list)
|
||||
(menu-transition float)
|
||||
@@ -76,38 +76,38 @@
|
||||
(next symbol)
|
||||
(ring-angle float)
|
||||
(ring-want-angle float)
|
||||
(init-quat quaternion :inline)
|
||||
(init-quat quaternion :inline)
|
||||
(pos-transition float)
|
||||
(anim-frame float)
|
||||
(swing float)
|
||||
(main-menu symbol)
|
||||
(state-array symbol 8)
|
||||
(option-index-stack int32 8)
|
||||
(state-array symbol 8)
|
||||
(option-index-stack int32 8)
|
||||
(state-pos int32)
|
||||
(secret-buying basic)
|
||||
(secret-buy-choice basic)
|
||||
(secret-buying symbol)
|
||||
(secret-buy-choice symbol)
|
||||
(scanlines-alpha float)
|
||||
(start-time time-frame)
|
||||
(which-slot int32)
|
||||
(starting-state basic)
|
||||
(yes-no-choice basic)
|
||||
(starting-state symbol)
|
||||
(yes-no-choice symbol)
|
||||
(time-out time-frame)
|
||||
(last-sound time-frame)
|
||||
(last-move time-frame)
|
||||
(center-x-backup int32)
|
||||
(center-y-backup int32)
|
||||
(flip-horizontal basic)
|
||||
(flip-vertical basic)
|
||||
(progressive-scan basic)
|
||||
(aspect-ratio basic)
|
||||
(video-mode basic)
|
||||
(flip-horizontal symbol)
|
||||
(flip-vertical symbol)
|
||||
(progressive-scan symbol)
|
||||
(aspect-ratio symbol)
|
||||
(video-mode symbol)
|
||||
(stereo-mode-backup int32)
|
||||
(vibrations basic)
|
||||
(subtitles basic)
|
||||
(languages int32 3)
|
||||
(subtitle-language-index int32 :overlay-at (-> languages 0))
|
||||
(language-index int32 :overlay-at (-> languages 1))
|
||||
(audio-language-index int32 :overlay-at (-> languages 2))
|
||||
(vibrations symbol)
|
||||
(subtitles symbol)
|
||||
(languages language-enum-s32 3)
|
||||
(subtitle-language-index language-enum-s32 :overlay-at (-> languages 0))
|
||||
(language-index language-enum-s32 :overlay-at (-> languages 1))
|
||||
(audio-language-index language-enum-s32 :overlay-at (-> languages 2))
|
||||
(current-task-index int32)
|
||||
(current-line-index int32)
|
||||
(first-closed-line-index int32)
|
||||
@@ -130,7 +130,7 @@
|
||||
)
|
||||
(:methods
|
||||
(init-defaults (_type_) object)
|
||||
(respond-to-cpad (_type_) none)
|
||||
(respond-to-cpad (_type_) object)
|
||||
(gone? (_type_) object)
|
||||
(can-go-back? (_type_) symbol)
|
||||
(get-state-check-card (_type_ symbol) symbol)
|
||||
@@ -138,27 +138,27 @@
|
||||
(pop-state (_type_) int)
|
||||
(set-next-state (_type_ symbol int) int)
|
||||
(set-menu-options (_type_ symbol) int)
|
||||
(progress-method-33 (_type_ progress-box) none)
|
||||
(progress-method-34 (_type_) none)
|
||||
(progress-method-33 (_type_ progress-box) object)
|
||||
(progress-method-34 (_type_) object)
|
||||
(get-scissor-stack-top (_type_) vector)
|
||||
(get-language-by-idx (_type_ int) int)
|
||||
(progress-method-37 (_type_) none)
|
||||
(progress-method-38 (_type_ font-context float) none)
|
||||
(progress-method-39 (_type_) none)
|
||||
(progress-method-40 (_type_ font-context int int float) none)
|
||||
(progress-method-41 (_type_ progress-box float) none)
|
||||
(progress-method-42 (_type_ progress-box float) none)
|
||||
(progress-method-43 (_type_ progress-box float) none)
|
||||
(progress-method-44 (_type_ font-context string) none)
|
||||
(set-selected-color (_type_) object)
|
||||
(adjust-font-origin-y (_type_ font-context float) object)
|
||||
(progress-method-39 (_type_) object)
|
||||
(draw-highlight-bar (_type_ font-context int int float) object)
|
||||
(draw-bg-box-outline (_type_ progress-box float) object)
|
||||
(draw-bg-box-alpha-2 (_type_ progress-box float) object)
|
||||
(draw-bg-box-alpha-1 (_type_ progress-box float) object)
|
||||
(progress-method-44 (_type_ font-context string) object)
|
||||
(progress-method-45 (_type_ font-context float float string float float int) float)
|
||||
(progress-method-46 (_type_ font-context float int) none)
|
||||
(progress-method-47 (_type_ font-context symbol symbol) none)
|
||||
(draw-prev-next-footer (_type_ font-context float) none)
|
||||
(draw-yes-no-style-footer (_type_ font-context text-id text-id) none)
|
||||
(progress-method-50 (_type_ font-context text-id text-id text-id symbol symbol float) none)
|
||||
(progress-method-51 (_type_ font-context) none)
|
||||
(progress-method-52 (_type_ font-context string float float float float float) none)
|
||||
(progress-method-53 (_type_ font-context) none)
|
||||
(draw-header (_type_ font-context float text-id) object)
|
||||
(progress-method-47 (_type_ font-context symbol symbol) object)
|
||||
(draw-prev-next-footer (_type_ font-context float) object)
|
||||
(draw-yes-no-style-footer (_type_ font-context text-id text-id) object)
|
||||
(progress-method-50 (_type_ font-context text-id text-id text-id symbol symbol float) object)
|
||||
(progress-method-51 (_type_ font-context) object)
|
||||
(draw-slider-option (_type_ font-context string float float float float float) object)
|
||||
(progress-method-53 (_type_ font-context) object)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
(load-save-3b progress-box :inline)
|
||||
(last-slot-saved int32)
|
||||
(selected-num int32)
|
||||
(secrets-unlocked basic)
|
||||
(secrets-unlocked symbol)
|
||||
(hero-mode-save symbol)
|
||||
)
|
||||
)
|
||||
@@ -1044,7 +1044,7 @@
|
||||
((current-index float)
|
||||
(target-index float)
|
||||
(scroll-speed float)
|
||||
(on-screen basic)
|
||||
(on-screen symbol)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
+122
-101
@@ -247,17 +247,21 @@
|
||||
(set-time! (-> this last-move))
|
||||
(set! (-> this center-x-backup) (-> *setting-control* user-default screenx))
|
||||
(set! (-> this center-y-backup) (-> *setting-control* user-default screeny))
|
||||
(set! (-> this flip-horizontal) (the-as basic (-> *setting-control* cam-default flip-horizontal)))
|
||||
(set! (-> this flip-vertical) (the-as basic (-> *setting-control* cam-default flip-vertical)))
|
||||
(set! (-> this progressive-scan) (the-as basic (-> *setting-control* user-default set-video-mode)))
|
||||
(set! (-> this aspect-ratio) (the-as basic (get-aspect-ratio)))
|
||||
(set! (-> this video-mode) (the-as basic (get-video-mode)))
|
||||
(set! (-> this flip-horizontal) (-> *setting-control* cam-default flip-horizontal))
|
||||
(set! (-> this flip-vertical) (-> *setting-control* cam-default flip-vertical))
|
||||
(set! (-> this progressive-scan) (-> *setting-control* user-default set-video-mode))
|
||||
(set! (-> this aspect-ratio) (get-aspect-ratio))
|
||||
(set! (-> this video-mode) (get-video-mode))
|
||||
(set! (-> this stereo-mode-backup) (-> *setting-control* user-default stereo-mode))
|
||||
(set! (-> this vibrations) (the-as basic (-> *setting-control* user-default vibration)))
|
||||
(set! (-> this subtitles) (the-as basic (-> *setting-control* user-default subtitle)))
|
||||
(set! (-> this language-index) (the-as int (-> *setting-control* user-default language)))
|
||||
(set! (-> this subtitle-language-index) (the-as int (-> *setting-control* user-default subtitle-language)))
|
||||
(set! (-> this audio-language-index) (the-as int (-> *setting-control* user-default audio-language)))
|
||||
(set! (-> this vibrations) (-> *setting-control* user-default vibration))
|
||||
(set! (-> this subtitles) (-> *setting-control* user-default subtitle))
|
||||
(set! (-> this language-index) (the-as language-enum-s32 (-> *setting-control* user-default language)))
|
||||
(set! (-> this subtitle-language-index)
|
||||
(the-as language-enum-s32 (-> *setting-control* user-default subtitle-language))
|
||||
)
|
||||
(set! (-> this audio-language-index)
|
||||
(the-as language-enum-s32 (-> *setting-control* user-default audio-language))
|
||||
)
|
||||
(set! (-> (the-as menu-missions-option (-> *missions-options* options 0)) current-index) 0.0)
|
||||
(set! (-> (the-as menu-missions-option (-> *missions-options* options 0)) target-index) 0.0)
|
||||
(set! (-> *progress-work* secrets-unlocked) #f)
|
||||
@@ -434,7 +438,7 @@
|
||||
(set! (-> self pos-transition) 1.0)
|
||||
(init-defaults self)
|
||||
(set-next-state self arg0 0)
|
||||
(set! (-> self starting-state) (the-as basic (-> self next)))
|
||||
(set! (-> self starting-state) (-> self next))
|
||||
(set! (-> self current) (-> self next))
|
||||
(if (= arg0 'main)
|
||||
(set! (-> self next) 'none)
|
||||
@@ -959,7 +963,7 @@
|
||||
0
|
||||
)
|
||||
(('select-scene-special)
|
||||
(set! (-> this starting-state) (the-as basic 'title))
|
||||
(set! (-> this starting-state) 'title)
|
||||
(set! (-> this state-pos) 0)
|
||||
(let ((v1-80 (-> this state-pos)))
|
||||
(set! (-> this state-array v1-80) 'title)
|
||||
@@ -1009,7 +1013,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 25 of type progress
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defmethod respond-to-cpad ((this progress))
|
||||
(mc-get-slot-info 0 *progress-save-info*)
|
||||
(memcard-unlocked-secrets? this #f)
|
||||
@@ -1124,7 +1128,6 @@
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function progress-trans
|
||||
@@ -1172,7 +1175,7 @@
|
||||
(cond
|
||||
((and (cpad-hold? 0 l2) (cpad-hold? 0 r1))
|
||||
(when (= (-> self current-options) *main-options*)
|
||||
(set! (-> *progress-work* secrets-unlocked) (the-as basic #t))
|
||||
(set! (-> *progress-work* secrets-unlocked) #t)
|
||||
(set! (-> *progress-work* selected-num) 0)
|
||||
(set! (-> self current-options) *main-options-debug*)
|
||||
)
|
||||
@@ -1361,7 +1364,7 @@
|
||||
|
||||
;; definition for method 33 of type progress
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defmethod progress-method-33 ((this progress) (arg0 progress-box))
|
||||
(set! (-> this scissor-count) (min 7 (+ (-> this scissor-count) 1)))
|
||||
(let ((s5-0 (-> this scissor-stack (-> this scissor-count)))
|
||||
@@ -1414,11 +1417,10 @@
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 34 of type progress
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
;; WARN: Return type mismatch int vs object.
|
||||
(defmethod progress-method-34 ((this progress))
|
||||
(set! (-> this scissor-count) (max 0 (+ (-> this scissor-count) -1)))
|
||||
(let ((gp-0 (-> this scissor-stack (-> this scissor-count))))
|
||||
@@ -1464,7 +1466,6 @@
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 35 of type progress
|
||||
@@ -1485,7 +1486,7 @@
|
||||
(defbehavior progress-post progress ()
|
||||
(local-vars (sv-208 font-context) (sv-212 int) (sv-216 hud-box) (sv-220 symbol))
|
||||
(when (-> self current-options)
|
||||
(progress-method-37 self)
|
||||
(set-selected-color self)
|
||||
(set! (-> self scissor-count) -1)
|
||||
(progress-method-33 self (-> *progress-work* full-screen))
|
||||
(let ((gp-0 (-> self current-options options)))
|
||||
@@ -1505,8 +1506,8 @@
|
||||
(begin-scan sv-216 self)
|
||||
(let ((f30-0 (fmax 0.0 (* 2.0 (- 0.5 (-> self menu-transition))))))
|
||||
(when (not (or (= (-> self current) 'bigmap) (= (-> self next) 'bigmap)))
|
||||
(progress-method-43 self (-> s4-0 small-screen) (* 144.0 f30-0))
|
||||
(progress-method-41 self (-> s4-0 small-screen) (* 128.0 f30-0))
|
||||
(draw-bg-box-alpha-1 self (-> s4-0 small-screen) (* 144.0 f30-0))
|
||||
(draw-bg-box-outline self (-> s4-0 small-screen) (* 128.0 f30-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2306,7 +2307,7 @@
|
||||
;; definition for method 9 of type menu-already-exists-option
|
||||
(defmethod respond-progress ((this menu-already-exists-option) (arg0 progress) (arg1 symbol))
|
||||
(let ((a1-2 (get-state-check-card arg0 'select-save))
|
||||
(gp-0 (the-as object #f))
|
||||
(gp-0 #f)
|
||||
)
|
||||
(if (!= a1-2 'select-save)
|
||||
(set-next-state arg0 a1-2 0)
|
||||
@@ -2314,7 +2315,7 @@
|
||||
(cond
|
||||
((cpad-pressed? 0 left l-analog-left)
|
||||
(set! gp-0 (not (-> arg0 yes-no-choice)))
|
||||
(set! (-> arg0 yes-no-choice) (the-as basic #t))
|
||||
(set! (-> arg0 yes-no-choice) #t)
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(set! gp-0 (-> arg0 yes-no-choice))
|
||||
@@ -2350,7 +2351,7 @@
|
||||
;; definition for method 9 of type menu-create-game-option
|
||||
(defmethod respond-progress ((this menu-create-game-option) (arg0 progress) (arg1 symbol))
|
||||
(let ((s4-0 (&-> arg0 yes-no-choice))
|
||||
(gp-0 (the-as object #f))
|
||||
(gp-0 #f)
|
||||
)
|
||||
(let ((a1-2 (get-state-check-card arg0 'select-save)))
|
||||
(if (!= a1-2 'select-save)
|
||||
@@ -2360,7 +2361,7 @@
|
||||
(cond
|
||||
((cpad-pressed? 0 left l-analog-left)
|
||||
(set! gp-0 (not (-> s4-0 0)))
|
||||
(set! (-> s4-0 0) (the-as basic #t))
|
||||
(set! (-> s4-0 0) #t)
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(set! gp-0 (-> s4-0 0))
|
||||
@@ -2403,7 +2404,7 @@
|
||||
((cpad-pressed? 0 left l-analog-left)
|
||||
(when (and (not (-> s5-0 0)) (not (-> arg0 clear-screen)))
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> s5-0 0) (the-as basic #t))
|
||||
(set! (-> s5-0 0) #t)
|
||||
)
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
@@ -2523,7 +2524,7 @@
|
||||
(cond
|
||||
((and (cpad-pressed? 0 left l-analog-left) (not (-> gp-0 0)))
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> gp-0 0) (the-as basic #t))
|
||||
(set! (-> gp-0 0) #t)
|
||||
)
|
||||
((and (cpad-pressed? 0 right l-analog-right) (-> gp-0 0))
|
||||
(sound-play "generic-beep")
|
||||
@@ -2535,12 +2536,12 @@
|
||||
(set! (-> arg0 time-out) 0)
|
||||
(cond
|
||||
((-> arg0 yes-no-choice)
|
||||
(set! (-> *setting-control* user-default video-mode) (the-as symbol (-> arg0 video-mode)))
|
||||
(set! (-> *setting-control* user-default video-mode) (-> arg0 video-mode))
|
||||
(set-time! (-> arg0 time-out))
|
||||
(set-next-state arg0 'video-mode-ok 0)
|
||||
)
|
||||
(else
|
||||
(set! (-> arg0 video-mode) (the-as basic 'pal))
|
||||
(set! (-> arg0 video-mode) 'pal)
|
||||
(pop-state arg0)
|
||||
)
|
||||
)
|
||||
@@ -2556,7 +2557,7 @@
|
||||
(cond
|
||||
((and (cpad-pressed? 0 left l-analog-left) (not (-> s5-0 0)))
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> s5-0 0) (the-as basic #t))
|
||||
(set! (-> s5-0 0) #t)
|
||||
)
|
||||
((and (cpad-pressed? 0 right l-analog-right) (-> s5-0 0))
|
||||
(sound-play "generic-beep")
|
||||
@@ -2570,8 +2571,8 @@
|
||||
(sound-play "generic-beep")
|
||||
)
|
||||
(else
|
||||
(set! (-> arg0 video-mode) (the-as basic 'pal))
|
||||
(set! (-> *setting-control* user-default video-mode) (the-as symbol (-> arg0 video-mode)))
|
||||
(set! (-> arg0 video-mode) 'pal)
|
||||
(set! (-> *setting-control* user-default video-mode) (-> arg0 video-mode))
|
||||
(sound-play "generic-beep")
|
||||
)
|
||||
)
|
||||
@@ -2582,8 +2583,8 @@
|
||||
)
|
||||
(when (and (nonzero? (-> arg0 time-out)) (< (seconds 10) (- (current-time) (-> arg0 time-out))))
|
||||
(set! (-> arg0 time-out) 0)
|
||||
(set! (-> arg0 video-mode) (the-as basic 'pal))
|
||||
(set! (-> *setting-control* user-default video-mode) (the-as symbol (-> arg0 video-mode)))
|
||||
(set! (-> arg0 video-mode) 'pal)
|
||||
(set! (-> *setting-control* user-default video-mode) (-> arg0 video-mode))
|
||||
(pop-state arg0)
|
||||
)
|
||||
0
|
||||
@@ -2595,8 +2596,8 @@
|
||||
(cond
|
||||
((and (cpad-pressed? 0 left l-analog-left) (not (-> s5-0 0)))
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> arg0 progressive-scan) (the-as basic #t))
|
||||
(set! (-> s5-0 0) (the-as basic #t))
|
||||
(set! (-> arg0 progressive-scan) #t)
|
||||
(set! (-> s5-0 0) #t)
|
||||
)
|
||||
((and (cpad-pressed? 0 right l-analog-right) (-> s5-0 0))
|
||||
(sound-play "generic-beep")
|
||||
@@ -2611,7 +2612,7 @@
|
||||
((-> arg0 yes-no-choice)
|
||||
(sound-play "generic-beep")
|
||||
(set-progressive-scan #t)
|
||||
(set! (-> arg0 progressive-scan) (the-as basic #t))
|
||||
(set! (-> arg0 progressive-scan) #t)
|
||||
(set-time! (-> arg0 time-out))
|
||||
(set-next-state arg0 'progressive-mode-ok 0)
|
||||
)
|
||||
@@ -2633,7 +2634,7 @@
|
||||
(cond
|
||||
((and (cpad-pressed? 0 left l-analog-left) (not (-> s5-0 0)))
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> s5-0 0) (the-as basic #t))
|
||||
(set! (-> s5-0 0) #t)
|
||||
)
|
||||
((and (cpad-pressed? 0 right l-analog-right) (-> s5-0 0))
|
||||
(sound-play "generic-beep")
|
||||
@@ -2650,7 +2651,7 @@
|
||||
)
|
||||
(else
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> arg0 progressive-scan) (the-as basic #t))
|
||||
(set! (-> arg0 progressive-scan) #t)
|
||||
)
|
||||
)
|
||||
(set! (-> arg0 time-out) 0)
|
||||
@@ -2755,7 +2756,7 @@
|
||||
;; definition for method 9 of type menu-format-card-option
|
||||
(defmethod respond-progress ((this menu-format-card-option) (arg0 progress) (arg1 symbol))
|
||||
(let ((s4-0 (&-> arg0 yes-no-choice))
|
||||
(gp-0 (the-as object #f))
|
||||
(gp-0 #f)
|
||||
)
|
||||
(let ((a1-2 (get-state-check-card arg0 (-> arg0 current))))
|
||||
(set-next-state arg0 a1-2 0)
|
||||
@@ -2763,7 +2764,7 @@
|
||||
(cond
|
||||
((cpad-pressed? 0 left l-analog-left)
|
||||
(set! gp-0 (not (-> s4-0 0)))
|
||||
(set! (-> s4-0 0) (the-as basic #t))
|
||||
(set! (-> s4-0 0) #t)
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(set! gp-0 (-> s4-0 0))
|
||||
@@ -3323,7 +3324,7 @@
|
||||
|
||||
;; definition for method 9 of type menu-secret-option
|
||||
(defmethod respond-progress ((this menu-secret-option) (arg0 progress) (arg1 symbol))
|
||||
(let ((gp-0 (the-as object #f)))
|
||||
(let ((gp-0 #f))
|
||||
(the float (+ (-> *menu-secrets-array* length) -1))
|
||||
(let ((a0-1 (+ (-> *menu-secrets-array* length) -1))
|
||||
(v1-5 *menu-secrets-array*)
|
||||
@@ -3351,7 +3352,7 @@
|
||||
(cond
|
||||
((cpad-pressed? 0 left l-analog-left)
|
||||
(set! gp-0 (not (-> arg0 yes-no-choice)))
|
||||
(set! (-> arg0 yes-no-choice) (the-as basic #t))
|
||||
(set! (-> arg0 yes-no-choice) #t)
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(set! gp-0 (-> arg0 yes-no-choice))
|
||||
@@ -3522,39 +3523,45 @@
|
||||
(set! (-> *cpad-list* cpads 0 buzz-pause-val 0) (the-as uint 255))
|
||||
(set! (-> *cpad-list* cpads 0 buzz-pause-time) (the-as uint 15))
|
||||
)
|
||||
(set! (-> arg0 vibrations) (the-as basic #t))
|
||||
(set! (-> arg0 vibrations) #t)
|
||||
)
|
||||
((4)
|
||||
(set! (-> arg0 subtitles) (the-as basic #t))
|
||||
(set! (-> arg0 subtitles) #t)
|
||||
)
|
||||
((5)
|
||||
(set! (-> arg0 subtitle-language-index) (mod (+ (-> arg0 subtitle-language-index) 9) 10))
|
||||
(if (and (= (-> arg0 subtitle-language-index) 7)
|
||||
(set! (-> arg0 subtitle-language-index)
|
||||
(the-as language-enum-s32 (mod (the-as int (+ (-> arg0 subtitle-language-index) 9)) 10))
|
||||
)
|
||||
(if (and (= (-> arg0 subtitle-language-index) (language-enum-s32 korean))
|
||||
(or (= (scf-get-territory) 1)
|
||||
(and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language))
|
||||
)
|
||||
)
|
||||
(+! (-> arg0 subtitle-language-index) -1)
|
||||
)
|
||||
(if (= (-> arg0 subtitle-language-index) 6)
|
||||
(if (= (-> arg0 subtitle-language-index) (language-enum-s32 japanese))
|
||||
(+! (-> arg0 subtitle-language-index) -2)
|
||||
)
|
||||
)
|
||||
((6)
|
||||
(set! (-> arg0 language-index) (mod (+ (-> arg0 language-index) 9) 10))
|
||||
(if (and (= (-> arg0 language-index) 7)
|
||||
(set! (-> arg0 language-index)
|
||||
(the-as language-enum-s32 (mod (the-as int (+ (-> arg0 language-index) 9)) 10))
|
||||
)
|
||||
(if (and (= (-> arg0 language-index) (language-enum-s32 korean))
|
||||
(or (= (scf-get-territory) 1)
|
||||
(and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language))
|
||||
)
|
||||
)
|
||||
(+! (-> arg0 language-index) -1)
|
||||
)
|
||||
(if (= (-> arg0 language-index) 6)
|
||||
(if (= (-> arg0 language-index) (language-enum-s32 japanese))
|
||||
(+! (-> arg0 language-index) -2)
|
||||
)
|
||||
)
|
||||
((7)
|
||||
(set! (-> arg0 audio-language-index) (mod (+ (-> arg0 audio-language-index) 4) 5))
|
||||
(set! (-> arg0 audio-language-index)
|
||||
(the-as language-enum-s32 (mod (the-as int (+ (-> arg0 audio-language-index) 4)) 5))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3568,11 +3575,13 @@
|
||||
(set! (-> arg0 subtitles) #f)
|
||||
)
|
||||
((5)
|
||||
(set! (-> arg0 subtitle-language-index) (mod (+ (-> arg0 subtitle-language-index) 1) 10))
|
||||
(if (= (-> arg0 subtitle-language-index) 5)
|
||||
(set! (-> arg0 subtitle-language-index)
|
||||
(the-as language-enum-s32 (mod (the-as int (+ (-> arg0 subtitle-language-index) 1)) 10))
|
||||
)
|
||||
(if (= (-> arg0 subtitle-language-index) (language-enum-s32 commentary))
|
||||
(+! (-> arg0 subtitle-language-index) 2)
|
||||
)
|
||||
(if (and (= (-> arg0 subtitle-language-index) 7)
|
||||
(if (and (= (-> arg0 subtitle-language-index) (language-enum-s32 korean))
|
||||
(or (= (scf-get-territory) 1)
|
||||
(and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language))
|
||||
)
|
||||
@@ -3581,11 +3590,13 @@
|
||||
)
|
||||
)
|
||||
((6)
|
||||
(set! (-> arg0 language-index) (mod (+ (-> arg0 language-index) 1) 10))
|
||||
(if (= (-> arg0 language-index) 5)
|
||||
(set! (-> arg0 language-index)
|
||||
(the-as language-enum-s32 (mod (the-as int (+ (-> arg0 language-index) 1)) 10))
|
||||
)
|
||||
(if (= (-> arg0 language-index) (language-enum-s32 commentary))
|
||||
(+! (-> arg0 language-index) 2)
|
||||
)
|
||||
(if (and (= (-> arg0 language-index) 7)
|
||||
(if (and (= (-> arg0 language-index) (language-enum-s32 korean))
|
||||
(or (= (scf-get-territory) 1)
|
||||
(and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language))
|
||||
)
|
||||
@@ -3594,17 +3605,19 @@
|
||||
)
|
||||
)
|
||||
((7)
|
||||
(set! (-> arg0 audio-language-index) (mod (+ (-> arg0 audio-language-index) 1) 5))
|
||||
(set! (-> arg0 audio-language-index)
|
||||
(the-as language-enum-s32 (mod (the-as int (+ (-> arg0 audio-language-index) 1)) 5))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((cpad-pressed? 0 confirm)
|
||||
(case (-> this menu-option-type)
|
||||
((3)
|
||||
(set! (-> *setting-control* user-default vibration) (the-as symbol (-> arg0 vibrations)))
|
||||
(set! (-> *setting-control* user-default vibration) (-> arg0 vibrations))
|
||||
)
|
||||
((4)
|
||||
(set! (-> *setting-control* user-default subtitle) (the-as symbol (-> arg0 subtitles)))
|
||||
(set! (-> *setting-control* user-default subtitle) (-> arg0 subtitles))
|
||||
)
|
||||
((5)
|
||||
(set! (-> *setting-control* user-default subtitle-language)
|
||||
@@ -3613,7 +3626,7 @@
|
||||
)
|
||||
((6)
|
||||
(set! (-> *setting-control* user-default language) (the-as language-enum (-> arg0 language-index)))
|
||||
(load-level-text-files (-> arg0 language-index))
|
||||
(load-level-text-files (the-as int (-> arg0 language-index)))
|
||||
)
|
||||
((7)
|
||||
(set! (-> *setting-control* user-default audio-language)
|
||||
@@ -3636,11 +3649,15 @@
|
||||
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down l-analog-down))
|
||||
)
|
||||
(else
|
||||
(set! (-> arg0 vibrations) (the-as basic (-> *setting-control* user-default vibration)))
|
||||
(set! (-> arg0 subtitles) (the-as basic (-> *setting-control* user-default subtitle)))
|
||||
(set! (-> arg0 language-index) (the-as int (-> *setting-control* user-default language)))
|
||||
(set! (-> arg0 subtitle-language-index) (the-as int (-> *setting-control* user-default subtitle-language)))
|
||||
(set! (-> arg0 audio-language-index) (the-as int (-> *setting-control* user-default audio-language)))
|
||||
(set! (-> arg0 vibrations) (-> *setting-control* user-default vibration))
|
||||
(set! (-> arg0 subtitles) (-> *setting-control* user-default subtitle))
|
||||
(set! (-> arg0 language-index) (the-as language-enum-s32 (-> *setting-control* user-default language)))
|
||||
(set! (-> arg0 subtitle-language-index)
|
||||
(the-as language-enum-s32 (-> *setting-control* user-default subtitle-language))
|
||||
)
|
||||
(set! (-> arg0 audio-language-index)
|
||||
(the-as language-enum-s32 (-> *setting-control* user-default audio-language))
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
@@ -3649,31 +3666,35 @@
|
||||
;; definition for method 9 of type menu-language-option
|
||||
(defmethod respond-progress ((this menu-language-option) (arg0 progress) (arg1 symbol))
|
||||
(enable-level-text-file-loading)
|
||||
(set! (-> arg0 language-index) (the-as int (-> *setting-control* user-default language)))
|
||||
(set! (-> arg0 language-index) (the-as language-enum-s32 (-> *setting-control* user-default language)))
|
||||
(cond
|
||||
((cpad-pressed? 0 left l-analog-left)
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> arg0 language-index) (mod (+ (-> arg0 language-index) 9) 10))
|
||||
(if (and (= (-> arg0 language-index) 7)
|
||||
(set! (-> arg0 language-index)
|
||||
(the-as language-enum-s32 (mod (the-as int (+ (-> arg0 language-index) 9)) 10))
|
||||
)
|
||||
(if (and (= (-> arg0 language-index) (language-enum-s32 korean))
|
||||
(or (= (scf-get-territory) 1)
|
||||
(and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language))
|
||||
)
|
||||
)
|
||||
(+! (-> arg0 language-index) -1)
|
||||
)
|
||||
(if (= (-> arg0 language-index) 6)
|
||||
(if (= (-> arg0 language-index) (language-enum-s32 japanese))
|
||||
(+! (-> arg0 language-index) -2)
|
||||
)
|
||||
(set! (-> *setting-control* user-default language) (the-as language-enum (-> arg0 language-index)))
|
||||
(load-level-text-files (-> arg0 language-index))
|
||||
(load-level-text-files (the-as int (-> arg0 language-index)))
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> arg0 language-index) (mod (+ (-> arg0 language-index) 1) 10))
|
||||
(if (= (-> arg0 language-index) 5)
|
||||
(set! (-> arg0 language-index)
|
||||
(the-as language-enum-s32 (mod (the-as int (+ (-> arg0 language-index) 1)) 10))
|
||||
)
|
||||
(if (= (-> arg0 language-index) (language-enum-s32 commentary))
|
||||
(+! (-> arg0 language-index) 2)
|
||||
)
|
||||
(if (and (= (-> arg0 language-index) 7)
|
||||
(if (and (= (-> arg0 language-index) (language-enum-s32 korean))
|
||||
(or (= (scf-get-territory) 1)
|
||||
(and (!= (scf-get-territory) 3) (not *cheat-mode*) (!= *progress-cheat* 'language))
|
||||
)
|
||||
@@ -3681,7 +3702,7 @@
|
||||
(+! (-> arg0 language-index) 1)
|
||||
)
|
||||
(set! (-> *setting-control* user-default language) (the-as language-enum (-> arg0 language-index)))
|
||||
(load-level-text-files (-> arg0 language-index))
|
||||
(load-level-text-files (the-as int (-> arg0 language-index)))
|
||||
)
|
||||
((cpad-pressed? 0 confirm)
|
||||
(set! (-> *setting-control* user-default subtitle-language) (the-as language-enum (-> arg0 language-index)))
|
||||
@@ -3754,17 +3775,17 @@
|
||||
(cond
|
||||
((cpad-pressed? 0 left l-analog-left)
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> arg0 aspect-ratio) (the-as basic 'aspect4x3))
|
||||
(set! (-> arg0 aspect-ratio) 'aspect4x3)
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> arg0 aspect-ratio) (the-as basic 'aspect16x9))
|
||||
(set! (-> arg0 aspect-ratio) 'aspect16x9)
|
||||
)
|
||||
((cpad-pressed? 0 triangle)
|
||||
(set! (-> arg0 aspect-ratio) (the-as basic (get-aspect-ratio)))
|
||||
(set! (-> arg0 aspect-ratio) (get-aspect-ratio))
|
||||
)
|
||||
((cpad-pressed? 0 confirm)
|
||||
(set! (-> *setting-control* user-default aspect-ratio) (the-as symbol (-> arg0 aspect-ratio)))
|
||||
(set! (-> *setting-control* user-default aspect-ratio) (-> arg0 aspect-ratio))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3772,7 +3793,7 @@
|
||||
(cond
|
||||
((cpad-pressed? 0 left l-analog-left)
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> arg0 progressive-scan) (the-as basic #t))
|
||||
(set! (-> arg0 progressive-scan) #t)
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(sound-play "generic-beep")
|
||||
@@ -3780,7 +3801,7 @@
|
||||
(set! (-> *setting-control* user-default set-video-mode) #f)
|
||||
)
|
||||
((cpad-pressed? 0 triangle)
|
||||
(set! (-> arg0 progressive-scan) (the-as basic (-> *setting-control* user-default set-video-mode)))
|
||||
(set! (-> arg0 progressive-scan) (-> *setting-control* user-default set-video-mode))
|
||||
)
|
||||
((cpad-pressed? 0 confirm)
|
||||
(push-state arg0)
|
||||
@@ -3792,21 +3813,21 @@
|
||||
(cond
|
||||
((cpad-pressed? 0 left l-analog-left)
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> arg0 video-mode) (the-as basic 'pal))
|
||||
(set! (-> arg0 video-mode) 'pal)
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> arg0 video-mode) (the-as basic 'ntsc))
|
||||
(set! (-> arg0 video-mode) 'ntsc)
|
||||
)
|
||||
((cpad-pressed? 0 triangle)
|
||||
(set! (-> arg0 video-mode) (the-as basic (get-video-mode)))
|
||||
(set! (-> arg0 video-mode) (get-video-mode))
|
||||
)
|
||||
((cpad-pressed? 0 confirm)
|
||||
(when (!= (-> *setting-control* user-default video-mode) (-> arg0 video-mode))
|
||||
(let ((v1-88 (-> arg0 video-mode)))
|
||||
(case v1-88
|
||||
(('pal)
|
||||
(set! (-> *setting-control* user-default video-mode) (the-as symbol v1-88))
|
||||
(set! (-> *setting-control* user-default video-mode) v1-88)
|
||||
)
|
||||
(('ntsc)
|
||||
(push-state arg0)
|
||||
@@ -3832,13 +3853,13 @@
|
||||
(set! (-> arg0 center-y-backup) (-> *setting-control* user-default screeny))
|
||||
)
|
||||
((9)
|
||||
(set! (-> arg0 aspect-ratio) (the-as basic (-> *setting-control* user-default aspect-ratio)))
|
||||
(set! (-> arg0 aspect-ratio) (-> *setting-control* user-default aspect-ratio))
|
||||
)
|
||||
((10)
|
||||
(set! (-> arg0 progressive-scan) (the-as basic (-> *setting-control* user-default set-video-mode)))
|
||||
(set! (-> arg0 progressive-scan) (-> *setting-control* user-default set-video-mode))
|
||||
)
|
||||
((11)
|
||||
(set! (-> arg0 video-mode) (the-as basic (get-video-mode)))
|
||||
(set! (-> arg0 video-mode) (get-video-mode))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3859,14 +3880,14 @@
|
||||
(sound-play "generic-beep")
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(set! (-> arg0 flip-horizontal) (the-as basic #t))
|
||||
(set! (-> arg0 flip-horizontal) #t)
|
||||
(sound-play "generic-beep")
|
||||
)
|
||||
((cpad-pressed? 0 confirm)
|
||||
(set! (-> *setting-control* cam-default flip-horizontal) (the-as symbol (-> arg0 flip-horizontal)))
|
||||
(set! (-> *setting-control* cam-default flip-horizontal) (-> arg0 flip-horizontal))
|
||||
)
|
||||
((cpad-pressed? 0 triangle)
|
||||
(set! (-> arg0 flip-horizontal) (the-as basic (-> *setting-control* cam-current flip-horizontal)))
|
||||
(set! (-> arg0 flip-horizontal) (-> *setting-control* cam-current flip-horizontal))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3877,14 +3898,14 @@
|
||||
(sound-play "generic-beep")
|
||||
)
|
||||
((cpad-pressed? 0 right l-analog-right)
|
||||
(set! (-> arg0 flip-vertical) (the-as basic #t))
|
||||
(set! (-> arg0 flip-vertical) #t)
|
||||
(sound-play "generic-beep")
|
||||
)
|
||||
((cpad-pressed? 0 confirm)
|
||||
(set! (-> *setting-control* cam-default flip-vertical) (the-as symbol (-> arg0 flip-vertical)))
|
||||
(set! (-> *setting-control* cam-default flip-vertical) (-> arg0 flip-vertical))
|
||||
)
|
||||
((cpad-pressed? 0 triangle)
|
||||
(set! (-> arg0 flip-vertical) (the-as basic (-> *setting-control* cam-current flip-vertical)))
|
||||
(set! (-> arg0 flip-vertical) (-> *setting-control* cam-current flip-vertical))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3897,12 +3918,12 @@
|
||||
(else
|
||||
(cond
|
||||
((cpad-pressed? 0 confirm)
|
||||
(set! (-> arg0 flip-horizontal) (the-as basic (-> *setting-control* cam-current flip-horizontal)))
|
||||
(set! (-> arg0 flip-vertical) (the-as basic (-> *setting-control* cam-current flip-vertical)))
|
||||
(set! (-> arg0 flip-horizontal) (-> *setting-control* cam-current flip-horizontal))
|
||||
(set! (-> arg0 flip-vertical) (-> *setting-control* cam-current flip-vertical))
|
||||
)
|
||||
((cpad-pressed? 0 triangle)
|
||||
(set! (-> arg0 flip-horizontal) (the-as basic (-> *setting-control* cam-current flip-horizontal)))
|
||||
(set! (-> arg0 flip-vertical) (the-as basic (-> *setting-control* cam-current flip-vertical)))
|
||||
(set! (-> arg0 flip-horizontal) (-> *setting-control* cam-current flip-horizontal))
|
||||
(set! (-> arg0 flip-vertical) (-> *setting-control* cam-current flip-vertical))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -4092,7 +4113,7 @@
|
||||
(cond
|
||||
((and (cpad-pressed? 0 left l-analog-left) (not (-> s5-0 0)))
|
||||
(sound-play "generic-beep")
|
||||
(set! (-> s5-0 0) (the-as basic #t))
|
||||
(set! (-> s5-0 0) #t)
|
||||
)
|
||||
((and (cpad-pressed? 0 right l-analog-right) (-> s5-0 0))
|
||||
(sound-play "generic-beep")
|
||||
|
||||
+4
-4
@@ -1721,8 +1721,8 @@
|
||||
|
||||
;; definition of type prebot-medium-eco-creature
|
||||
(deftype prebot-medium-eco-creature (prebot-large-eco-creature)
|
||||
((is-top basic)
|
||||
(is-bottom basic)
|
||||
((is-top symbol)
|
||||
(is-bottom symbol)
|
||||
(initial-scale float)
|
||||
(final-scale float)
|
||||
)
|
||||
@@ -2388,7 +2388,7 @@
|
||||
;; definition for method 196 of type prebot-medium-eco-creature
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod prebot-medium-eco-creature-method-196 ((this prebot-medium-eco-creature))
|
||||
(set! (-> this is-top) (the-as basic #t))
|
||||
(set! (-> this is-top) #t)
|
||||
(let ((v1-2 (-> this node-list data 32)))
|
||||
(set! (-> v1-2 param0) prebot-eco-creature-joint-callback)
|
||||
(set! (-> v1-2 param1) (the-as basic #x3d23d70a))
|
||||
@@ -2452,7 +2452,7 @@
|
||||
;; definition for method 197 of type prebot-medium-eco-creature
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod prebot-medium-eco-creature-method-197 ((this prebot-medium-eco-creature))
|
||||
(set! (-> this is-bottom) (the-as basic #t))
|
||||
(set! (-> this is-bottom) #t)
|
||||
(let ((v1-2 (-> this node-list data 4)))
|
||||
(set! (-> v1-2 param0) prebot-eco-creature-joint-callback)
|
||||
(set! (-> v1-2 param1) (the-as basic #x3d23d70a))
|
||||
|
||||
Reference in New Issue
Block a user