mirror of
https://github.com/open-goal/jak-project
synced 2026-08-12 11:53:26 -04:00
[decomp] get started on game info (#674)
* temp * menu text * wip * recognize handle to process * more
This commit is contained in:
@@ -16,3 +16,5 @@
|
||||
(define-perm *camera* camera-master #f)
|
||||
(define-perm *camera-combiner* camera-combiner #f)
|
||||
(define-perm *camera-orbit-target* process-drawable #f)
|
||||
|
||||
(define-extern position-in-front-of-camera! (function vector float float vector))
|
||||
@@ -93,3 +93,6 @@
|
||||
:flag-assert #x900002004
|
||||
)
|
||||
|
||||
|
||||
(define-extern kill-current-level-hint (function pair pair symbol none))
|
||||
(define-extern level-hint-spawn (function game-text-id string symbol process-tree int none))
|
||||
@@ -17,10 +17,17 @@
|
||||
(defenum entity-perm-status
|
||||
:bitfield #t
|
||||
:type uint16
|
||||
(bit-0 0)
|
||||
(bit-1 1)
|
||||
(dead 2)
|
||||
(unknown 5) ;; TODO - task-control::task-cstage::14
|
||||
(complete 6))
|
||||
(bit-3 3)
|
||||
(bit-4 4)
|
||||
(user-set-from-cstage 5)
|
||||
(complete 6)
|
||||
(bit-7 7)
|
||||
(real-complete 8)
|
||||
(bit-9 9)
|
||||
)
|
||||
|
||||
;; definition of type entity-perm
|
||||
(deftype entity-perm (structure)
|
||||
@@ -44,15 +51,15 @@
|
||||
:size-assert #x10
|
||||
:flag-assert #xa00000010
|
||||
(:methods
|
||||
(dummy-9 () none 9)
|
||||
)
|
||||
(update-perm! (_type_ symbol entity-perm-status) _type_ 9)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type entity-links
|
||||
(deftype entity-links (structure)
|
||||
((prev-link entity-links :offset-assert 0)
|
||||
(next-link entity-links :offset-assert 4)
|
||||
(entity basic :offset-assert 8)
|
||||
(entity entity :offset-assert 8)
|
||||
(process process :offset-assert 12)
|
||||
(level level :offset-assert 16)
|
||||
(vis-id int32 :offset-assert 20)
|
||||
@@ -82,7 +89,8 @@
|
||||
|
||||
;; definition of type entity-links-array
|
||||
(deftype entity-links-array (inline-array-class)
|
||||
()
|
||||
((data entity-links :inline :dynamic :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
@@ -220,3 +228,5 @@
|
||||
(defun-extern entity-by-name string entity)
|
||||
(defun-extern entity-by-type type entity-actor)
|
||||
(defun-extern entity-by-aid uint entity)
|
||||
(define-extern reset-actors (function symbol none))
|
||||
(define-extern *spawn-actors* symbol)
|
||||
@@ -5,6 +5,18 @@
|
||||
;; name in dgo: entity-table
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; The *entity-info* table contains some simple information that can be used to
|
||||
;; spawn a process for an entity.
|
||||
;; :ptype the type of the process
|
||||
;; :package the package that must be loaded (not used?)
|
||||
;; :art-group the art that must be loaded
|
||||
;; :pool the pool that the process should be allocated from
|
||||
;; :heap-size the required size for the process heap
|
||||
|
||||
;; At one point, this was much bigger, but got smaller between
|
||||
;; the demo and final build. The entity info is possibly stored somewhere else
|
||||
;; and this may not even be used.
|
||||
|
||||
(define *entity-info*
|
||||
(new 'static 'boxed-array :type entity-info :length 19 :allocated-length 19
|
||||
(new 'static 'entity-info
|
||||
@@ -155,20 +167,24 @@
|
||||
(the-as entity-info
|
||||
(cond
|
||||
((nonzero? (-> arg0 method-table 13))
|
||||
;; we already cached the type in the method table
|
||||
(-> arg0 method-table 13)
|
||||
)
|
||||
(else
|
||||
;; search the table
|
||||
(let ((v1-1 *entity-info*))
|
||||
(dotimes (a1-0 (-> v1-1 length))
|
||||
(when (= arg0 (-> v1-1 a1-0 ptype))
|
||||
(set!
|
||||
(-> arg0 method-table 13)
|
||||
;; found it, cache it in the method table
|
||||
(set! (-> arg0 method-table 13)
|
||||
(the-as function (-> v1-1 a1-0))
|
||||
)
|
||||
(return (-> v1-1 a1-0))
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; didn't find it, cache and return #f
|
||||
(set! (-> arg0 method-table 13) #f)
|
||||
#f
|
||||
)
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
(:methods
|
||||
(new (symbol type process pickup-type float) _type_ 0)
|
||||
(dummy-9 () none 9)
|
||||
(dummy-10 (_type_ symbol) none 10)
|
||||
(reset! (_type_ symbol) none 10)
|
||||
(dummy-11 (_type_) float 11)
|
||||
)
|
||||
)
|
||||
@@ -230,7 +230,7 @@
|
||||
"Create information about target. Not sure why this has stuff like pickup-type."
|
||||
(let ((obj (the-as fact-info-target ((method-of-type fact-info new) allocation type-to-make arg0 arg1 arg2))))
|
||||
(set! (-> obj eco-source) (the-as uint #f))
|
||||
(dummy-10 obj #f)
|
||||
(reset! obj #f)
|
||||
obj
|
||||
)
|
||||
)
|
||||
|
||||
@@ -5,6 +5,130 @@
|
||||
; ;; name in dgo: game-info-h
|
||||
; ;; dgos: GAME, ENGINE
|
||||
|
||||
;; List of each task in the game.
|
||||
;; Each task has a task-control associated with it, see task-control.gc
|
||||
(defenum game-task
|
||||
:type uint8
|
||||
(none 0)
|
||||
(complete 1)
|
||||
(jungle-eggtop 2)
|
||||
(jungle-lurkerm 3)
|
||||
(jungle-tower 4)
|
||||
(jungle-fishgame 5)
|
||||
(jungle-plant 6)
|
||||
(jungle-buzzer 7)
|
||||
(jungle-canyon-end 8)
|
||||
(jungle-temple-door 9)
|
||||
(village1-yakow 10)
|
||||
(village1-mayor-money 11)
|
||||
(village1-uncle-money 12)
|
||||
(village1-oracle-money1 13)
|
||||
(village1-oracle-money2 14)
|
||||
(beach-ecorocks 15)
|
||||
(beach-pelican 16)
|
||||
(beach-flutflut 17)
|
||||
(beach-seagull 18)
|
||||
(beach-cannon 19)
|
||||
(beach-buzzer 20)
|
||||
(beach-gimmie 21)
|
||||
(beach-sentinel 22)
|
||||
(misty-muse 23)
|
||||
(misty-boat 24)
|
||||
(misty-warehouse 25)
|
||||
(misty-cannon 26)
|
||||
(misty-bike 27)
|
||||
(misty-buzzer 28)
|
||||
(misty-bike-jump 29)
|
||||
(misty-eco-challenge 30)
|
||||
(village2-gambler-money 31)
|
||||
(village2-geologist-money 32)
|
||||
(village2-warrior-money 33)
|
||||
(village2-oracle-money1 34)
|
||||
(village2-oracle-money2 35)
|
||||
(swamp-billy 36)
|
||||
(swamp-flutflut 37)
|
||||
(swamp-battle 38)
|
||||
(swamp-tether-1 39)
|
||||
(swamp-tether-2 40)
|
||||
(swamp-tether-3 41)
|
||||
(swamp-tether-4 42)
|
||||
(swamp-buzzer 43)
|
||||
(sunken-platforms 44)
|
||||
(sunken-pipe 45)
|
||||
(sunken-slide 46)
|
||||
(sunken-room 47)
|
||||
(sunken-sharks 48)
|
||||
(sunken-buzzer 49)
|
||||
(sunken-top-of-helix 50)
|
||||
(sunken-spinning-room 51)
|
||||
(rolling-race 52)
|
||||
(rolling-robbers 53)
|
||||
(rolling-moles 54)
|
||||
(rolling-plants 55)
|
||||
(rolling-lake 56)
|
||||
(rolling-buzzer 57)
|
||||
(rolling-ring-chase-1 58)
|
||||
(rolling-ring-chase-2 59)
|
||||
(snow-eggtop 60)
|
||||
(snow-ram 61)
|
||||
(snow-fort 62)
|
||||
(snow-ball 63)
|
||||
(snow-bunnies 64)
|
||||
(snow-buzzer 65)
|
||||
(snow-bumpers 66)
|
||||
(snow-cage 67)
|
||||
(firecanyon-buzzer 68)
|
||||
(firecanyon-end 69)
|
||||
(citadel-sage-green 70)
|
||||
(citadel-sage-blue 71)
|
||||
(citadel-sage-red 72)
|
||||
(citadel-sage-yellow 73)
|
||||
(village3-extra1 74)
|
||||
(village1-buzzer 75)
|
||||
(village2-buzzer 76)
|
||||
(village3-buzzer 77)
|
||||
(cave-gnawers 78)
|
||||
(cave-dark-crystals 79)
|
||||
(cave-dark-climb 80)
|
||||
(cave-robot-climb 81)
|
||||
(cave-swing-poles 82)
|
||||
(cave-spider-tunnel 83)
|
||||
(cave-platforms 84)
|
||||
(cave-buzzer 85)
|
||||
(ogre-boss 86)
|
||||
(ogre-end 87)
|
||||
(ogre-buzzer 88)
|
||||
(lavatube-end 89)
|
||||
(lavatube-buzzer 90)
|
||||
(citadel-buzzer 91)
|
||||
(training-gimmie 92)
|
||||
(training-door 93)
|
||||
(training-climb 94)
|
||||
(training-buzzer 95)
|
||||
(village3-miner-money1 96)
|
||||
(village3-miner-money2 97)
|
||||
(village3-miner-money3 98)
|
||||
(village3-miner-money4 99)
|
||||
(village3-oracle-money1 100)
|
||||
(village3-oracle-money2 101)
|
||||
(firecanyon-assistant 102)
|
||||
(village2-levitator 103)
|
||||
(swamp-arm 104)
|
||||
(village3-button 105)
|
||||
(red-eggtop 106)
|
||||
(lavatube-balls 107)
|
||||
(lavatube-start 108)
|
||||
(intro 109)
|
||||
(ogre-secret 110)
|
||||
(village4-button 111)
|
||||
(finalboss-movies 112)
|
||||
(plunger-lurker-hit 113)
|
||||
(leaving-misty 114)
|
||||
(assistant-village3 115)
|
||||
(max 116)
|
||||
(*unknown* 255))
|
||||
|
||||
;; Game parameters.
|
||||
(deftype game-bank (basic)
|
||||
((life-max-default float :offset-assert 4)
|
||||
(life-start-default float :offset-assert 8)
|
||||
@@ -26,16 +150,18 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; aid
|
||||
(deftype actor-id (uint32)
|
||||
()
|
||||
:flag-assert #x900000004
|
||||
)
|
||||
|
||||
;; the possible state for a level.
|
||||
(deftype level-buffer-state (structure)
|
||||
((name basic :offset-assert 0)
|
||||
(display? symbol :offset-assert 4)
|
||||
(force-vis? symbol :offset-assert 8)
|
||||
(force-inside? symbol :offset-assert 12)
|
||||
((name basic :offset-assert 0) ;; level name
|
||||
(display? symbol :offset-assert 4) ;; should it be drawn?
|
||||
(force-vis? symbol :offset-assert 8) ;; ? should it have its vis loaded?
|
||||
(force-inside? symbol :offset-assert 12) ;; ?
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 9
|
||||
@@ -76,12 +202,15 @@
|
||||
)
|
||||
)
|
||||
|
||||
(define-extern *load-state* load-state)
|
||||
|
||||
;; a game checkpoint
|
||||
(deftype continue-point (basic)
|
||||
((name basic :offset-assert 4)
|
||||
((name string :offset-assert 4)
|
||||
(level basic :offset-assert 8)
|
||||
(flags uint32 :offset-assert 12)
|
||||
(trans vector :inline :offset-assert 16)
|
||||
(quat vector :inline :offset-assert 32)
|
||||
(quat quaternion :inline :offset-assert 32)
|
||||
(camera-trans vector :inline :offset-assert 48)
|
||||
(camera-rot float 9 :offset-assert 64)
|
||||
(load-commands pair :offset-assert 100)
|
||||
@@ -95,84 +224,87 @@
|
||||
:size-assert #x7c
|
||||
:flag-assert #xa0000007c
|
||||
(:methods
|
||||
(dummy-9 () none 9)
|
||||
(debug-draw! (_type_) none 9)
|
||||
)
|
||||
)
|
||||
|
||||
(declare-type entity-perm structure)
|
||||
(declare-type entity-perm-array basic)
|
||||
(declare-type game-save basic)
|
||||
;; Game Info is the full state of the game
|
||||
;; this information can be saved/loaded from a game save.
|
||||
;; also, it must be manually synchronized with entity permanent state in the levels
|
||||
(deftype game-info (basic)
|
||||
((mode symbol :offset-assert 4)
|
||||
(save-name basic :offset-assert 8)
|
||||
(life float :offset-assert 12)
|
||||
(life-max float :offset-assert 16)
|
||||
(money float :offset-assert 20)
|
||||
(money-total float :offset-assert 24)
|
||||
(money-per-level uint8 32 :offset-assert 28)
|
||||
(deaths-per-level uint8 32 :offset-assert 60)
|
||||
(buzzer-total float :offset-assert 92)
|
||||
(fuel float :offset-assert 96)
|
||||
(perm-list entity-perm-array :offset-assert 100)
|
||||
(task-perm-list entity-perm-array :offset-assert 104)
|
||||
(current-continue continue-point :offset-assert 108)
|
||||
(text-ids-seen bit-array :offset-assert 112)
|
||||
(level-opened uint8 32 :offset-assert 116)
|
||||
(hint-control array :offset-assert 148)
|
||||
(task-hint-control array :offset-assert 152)
|
||||
(total-deaths int32 :offset-assert 156)
|
||||
(continue-deaths int32 :offset-assert 160)
|
||||
(fuel-cell-deaths int32 :offset-assert 164)
|
||||
(game-start-time uint64 :offset-assert 168)
|
||||
(continue-time uint64 :offset-assert 176)
|
||||
(death-time uint64 :offset-assert 184)
|
||||
(hit-time uint64 :offset-assert 192)
|
||||
(fuel-cell-pickup-time uint64 :offset-assert 200)
|
||||
(fuel-cell-time array :offset-assert 208)
|
||||
(enter-level-time array :offset-assert 212)
|
||||
(in-level-time array :offset-assert 216)
|
||||
(blackout-time uint64 :offset-assert 224)
|
||||
(letterbox-time uint64 :offset-assert 232)
|
||||
(hint-play-time uint64 :offset-assert 240)
|
||||
(display-text-time uint64 :offset-assert 248)
|
||||
(display-text-handle uint64 :offset-assert 256)
|
||||
(death-movie-tick int32 :offset-assert 264)
|
||||
(want-auto-save symbol :offset-assert 268)
|
||||
(auto-save-proc uint64 :offset-assert 272)
|
||||
(auto-save-status uint32 :offset-assert 280)
|
||||
(auto-save-card int32 :offset-assert 284)
|
||||
(auto-save-which int32 :offset-assert 288)
|
||||
(pov-camera-handle uint64 :offset-assert 296)
|
||||
(other-camera-handle uint64 :offset-assert 304)
|
||||
(death-pos vector-array :offset-assert 312)
|
||||
(dummy basic :offset-assert 316)
|
||||
(auto-save-count int32 :offset-assert 320)
|
||||
((mode symbol :offset-assert 4) ;; can be play/debug
|
||||
(save-name basic :offset-assert 8)
|
||||
(life float :offset-assert 12)
|
||||
(life-max float :offset-assert 16)
|
||||
(money float :offset-assert 20)
|
||||
(money-total float :offset-assert 24)
|
||||
(money-per-level uint8 32 :offset-assert 28)
|
||||
(deaths-per-level uint8 32 :offset-assert 60)
|
||||
(buzzer-total float :offset-assert 92)
|
||||
(fuel float :offset-assert 96)
|
||||
(perm-list entity-perm-array :offset-assert 100) ;; permament storage for entities
|
||||
(task-perm-list entity-perm-array :offset-assert 104) ;; permanent storage for task entities
|
||||
(current-continue continue-point :offset-assert 108)
|
||||
(text-ids-seen bit-array :offset-assert 112)
|
||||
(level-opened uint8 32 :offset-assert 116)
|
||||
(hint-control (array level-hint-control) :offset-assert 148)
|
||||
(task-hint-control array :offset-assert 152)
|
||||
(total-deaths int32 :offset-assert 156)
|
||||
(continue-deaths int32 :offset-assert 160)
|
||||
(fuel-cell-deaths int32 :offset-assert 164)
|
||||
(game-start-time uint64 :offset-assert 168)
|
||||
(continue-time uint64 :offset-assert 176)
|
||||
(death-time uint64 :offset-assert 184)
|
||||
(hit-time uint64 :offset-assert 192)
|
||||
(fuel-cell-pickup-time uint64 :offset-assert 200)
|
||||
(fuel-cell-time (array uint64) :offset-assert 208)
|
||||
(enter-level-time (array uint64) :offset-assert 212)
|
||||
(in-level-time (array uint64) :offset-assert 216)
|
||||
(blackout-time uint64 :offset-assert 224)
|
||||
(letterbox-time uint64 :offset-assert 232)
|
||||
(hint-play-time uint64 :offset-assert 240)
|
||||
(display-text-time uint64 :offset-assert 248)
|
||||
(display-text-handle uint64 :offset-assert 256)
|
||||
(death-movie-tick int32 :offset-assert 264)
|
||||
(want-auto-save symbol :offset-assert 268)
|
||||
(auto-save-proc handle :offset-assert 272)
|
||||
(auto-save-status uint32 :offset-assert 280)
|
||||
(auto-save-card int32 :offset-assert 284)
|
||||
(auto-save-which int32 :offset-assert 288)
|
||||
(pov-camera-handle uint64 :offset-assert 296)
|
||||
(other-camera-handle uint64 :offset-assert 304)
|
||||
(death-pos vector-array :offset-assert 312)
|
||||
(dummy basic :offset-assert 316)
|
||||
(auto-save-count int32 :offset-assert 320)
|
||||
)
|
||||
:method-count-assert 29
|
||||
:size-assert #x144
|
||||
:flag-assert #x1d00000144
|
||||
;; field dummy is a basic loaded with a signed load
|
||||
(:methods
|
||||
(dummy-9 (_type_ symbol symbol string) none 9)
|
||||
(dummy-10 () none 10)
|
||||
(dummy-11 () none 11)
|
||||
(dummy-12 () none 12)
|
||||
(dummy-13 (_type_ uint) entity-perm 13) ; TODO - not totally confirmed
|
||||
(dummy-14 (_type_) none 14)
|
||||
(dummy-15 (_type_) none 15)
|
||||
(dummy-16 () none 16)
|
||||
(dummy-17 (_type_) continue-point 17)
|
||||
(dummy-18 () none 18)
|
||||
(dummy-19 (_type_ continue-point) none 19)
|
||||
(dummy-20 () none 20)
|
||||
(dummy-21 () none 21)
|
||||
(dummy-22 () none 22)
|
||||
(dummy-23 () none 23)
|
||||
(dummy-24 () none 24)
|
||||
(dummy-25 () none 25)
|
||||
(dummy-26 () none 26)
|
||||
(dummy-27 () none 27)
|
||||
(dummy-28 () none 28)
|
||||
)
|
||||
(initialize! (_type_ symbol game-save string) _type_ 9)
|
||||
(adjust (_type_ symbol float handle) float 10)
|
||||
(task-complete? (_type_ game-task) symbol 11)
|
||||
(lookup-entity-perm-by-aid (_type_ uint) entity-perm 12)
|
||||
(get-entity-task-perm (_type_ game-task) entity-perm 13)
|
||||
(copy-perms-from-level! (_type_ level) none 14)
|
||||
(copy-perms-to-level! (_type_ level) none 15)
|
||||
(debug-print (_type_ symbol) _type_ 16)
|
||||
(get-or-create-continue! (_type_) continue-point 17)
|
||||
(get-continue-by-name (_type_ string) continue-point 18)
|
||||
(set-continue! (_type_ basic) continue-point 19)
|
||||
(buzzer-count (_type_ game-task) int 20)
|
||||
(seen-text? (_type_ game-text-id) symbol 21)
|
||||
(mark-text-as-seen (_type_ game-text-id) none 22)
|
||||
(got-buzzer? (_type_ game-task int) symbol 23)
|
||||
(dummy-24 () none 24)
|
||||
(load-game! (_type_ game-save) game-save 25)
|
||||
(clear-text-seen! (_type_ game-text-id) none 26)
|
||||
(get-death-count (_type_ symbol) int 27)
|
||||
(get-health-percent-lost (_type_) float 28)
|
||||
)
|
||||
)
|
||||
|
||||
(define-extern *game-info* game-info)
|
||||
@@ -184,3 +316,5 @@
|
||||
(set! *game-info* temp)
|
||||
)
|
||||
)
|
||||
|
||||
(define-extern game-task->string (function game-task string))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,5 +5,668 @@
|
||||
;; name in dgo: game-save
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
(defconstant SAVE_VERSION 1)
|
||||
|
||||
;; identifier for game save fields
|
||||
(defenum game-save-elt
|
||||
:type uint16
|
||||
(name 100)
|
||||
(base-time 101)
|
||||
(real-time 102)
|
||||
(game-time 103)
|
||||
(integral-time 104)
|
||||
(continue 200)
|
||||
(life 201)
|
||||
(money 202)
|
||||
(money-total 203)
|
||||
(moeny-per-level 204)
|
||||
(buzzer-total 205)
|
||||
(fuel-cell 206)
|
||||
(death-movie-tick 207)
|
||||
(task-list 300)
|
||||
(perm-list 301)
|
||||
(hint-list 303)
|
||||
(text-list 304)
|
||||
(level-open-list 305)
|
||||
(total-deaths 400)
|
||||
(continue-deaths 401)
|
||||
(fuel-cell-deaths 402)
|
||||
(game-start-time 403)
|
||||
(continue-timke 404) ;; typo in game
|
||||
(death-time 405)
|
||||
(hit-time 406)
|
||||
(fuel-cell-pickup-time 407)
|
||||
(continue-time 408)
|
||||
(fuel-cell-time 409)
|
||||
(enter-level-time 410)
|
||||
(deaths-per-level 411)
|
||||
(death-pos 412)
|
||||
(auto-save-count 413)
|
||||
(in-level-time 414)
|
||||
(sfx-volume 500)
|
||||
(music-volume 501)
|
||||
(dialog-volume 502)
|
||||
(language 503)
|
||||
(screenx 504)
|
||||
(screeny 505)
|
||||
(vibration 506)
|
||||
(play-hints 507)
|
||||
(video-mode 508)
|
||||
(aspect-ratio 509)
|
||||
)
|
||||
|
||||
;; the game save is a bunch of "game-save-tag"s
|
||||
;; the elt-type field identifies what it is.
|
||||
;; the data may be stored in one of the user fields, or
|
||||
;; may be stored after the tag itself.
|
||||
;; the count/size fields determine how big it is.
|
||||
|
||||
(deftype game-save-tag (structure)
|
||||
((user-object object 2 :offset-assert 0)
|
||||
(user-uint64 uint64 :offset 0)
|
||||
(user-float0 float :offset 0)
|
||||
(user-float float 2 :offset 0)
|
||||
(user-int32 int32 2 :offset 0)
|
||||
(user-uint32 uint32 2 :offset 0)
|
||||
(user-int16 int16 4 :offset 0)
|
||||
(user-uint16 uint16 4 :offset 0)
|
||||
(user-int8 int8 8 :offset 0)
|
||||
(user-int80 int8 :offset 0)
|
||||
(user-int81 int8 :offset 1)
|
||||
(user-uint8 uint8 8 :offset 0)
|
||||
(elt-count int32 :offset-assert 8)
|
||||
(elt-size uint16 :offset-assert 12)
|
||||
(elt-type game-save-elt :offset-assert 14)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x10
|
||||
:flag-assert #x900000010
|
||||
)
|
||||
|
||||
;; A game-save is a dynamic type that contains the full save.
|
||||
;; it contains common metadata plus all the tags
|
||||
(deftype game-save (basic)
|
||||
((version int32 :offset-assert 4)
|
||||
(allocated-length int32 :offset-assert 8)
|
||||
(length int32 :offset-assert 12)
|
||||
(info-int32 int32 16 :offset-assert 16)
|
||||
(info-int8 int8 64 :offset 16)
|
||||
(level-index int32 :offset 16)
|
||||
(fuel-cell-count float :offset 20)
|
||||
(money-count float :offset 24)
|
||||
(buzzer-count float :offset 28)
|
||||
(completion-percentage float :offset 32)
|
||||
(minute uint8 :offset 36)
|
||||
(hour uint8 :offset 37)
|
||||
(week uint8 :offset 38)
|
||||
(day uint8 :offset 39)
|
||||
(month uint8 :offset 40)
|
||||
(year uint8 :offset 41)
|
||||
(new-game int32 :offset 44)
|
||||
(tag game-save-tag :inline :dynamic :offset-assert 80)
|
||||
)
|
||||
:method-count-assert 12
|
||||
:size-assert #x50
|
||||
:flag-assert #xc00000050
|
||||
(:methods
|
||||
(new (symbol type int) _type_ 0)
|
||||
(save-to-file (_type_ string) _type_ 9)
|
||||
(load-from-file! (_type_ string) _type_ 10)
|
||||
(debug-print (_type_ symbol) _type_ 11)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod asize-of game-save ((obj game-save))
|
||||
"Get the size in memory of the save"
|
||||
(the-as int (+ (-> game-save size) (the-as uint (-> obj allocated-length))))
|
||||
)
|
||||
|
||||
(defmethod new game-save ((allocation symbol) (type-to-make type) (arg0 int))
|
||||
"Allocate a game save. arg0 is the number of bytes for tags."
|
||||
(let ((v0-0 (object-new allocation type-to-make (the-as int (+ (-> type-to-make size) (the-as uint arg0))))))
|
||||
(set! (-> v0-0 version) SAVE_VERSION)
|
||||
(set! (-> v0-0 allocated-length) arg0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
(defun-debug game-save-elt->string ((arg0 game-save-elt))
|
||||
"Convert a game-save-elt to a string"
|
||||
(let ((v1-0 arg0))
|
||||
(cond
|
||||
((= v1-0 (game-save-elt aspect-ratio)) "aspect-ratio")
|
||||
((= v1-0 (game-save-elt video-mode)) "video-mode")
|
||||
((= v1-0 (game-save-elt play-hints)) "play-hints")
|
||||
((= v1-0 (game-save-elt vibration)) "vibration")
|
||||
((= v1-0 (game-save-elt screeny)) "screeny")
|
||||
((= v1-0 (game-save-elt screenx)) "screenx")
|
||||
((= v1-0 (game-save-elt language)) "language")
|
||||
((= v1-0 (game-save-elt dialog-volume)) "dialog-volume")
|
||||
((= v1-0 (game-save-elt music-volume)) "music-volume")
|
||||
((= v1-0 (game-save-elt sfx-volume)) "sfx-volume")
|
||||
((= v1-0 (game-save-elt in-level-time)) "in-level-time")
|
||||
((= v1-0 (game-save-elt auto-save-count)) "auto-save-count")
|
||||
((= v1-0 (game-save-elt death-pos)) "death-pos")
|
||||
((= v1-0 (game-save-elt deaths-per-level)) "deaths-per-level")
|
||||
((= v1-0 (game-save-elt enter-level-time)) "enter-level-time")
|
||||
((= v1-0 (game-save-elt fuel-cell-time)) "fuel-cell-time")
|
||||
((= v1-0 (game-save-elt continue-time)) "continue-time")
|
||||
((= v1-0 (game-save-elt fuel-cell-pickup-time)) "fuel-cell-pickup-time")
|
||||
((= v1-0 (game-save-elt hit-time)) "hit-time")
|
||||
((= v1-0 (game-save-elt death-time)) "death-time")
|
||||
((= v1-0 (game-save-elt continue-timke)) "continue-timke")
|
||||
((= v1-0 (game-save-elt game-start-time)) "game-start-time")
|
||||
((= v1-0 (game-save-elt fuel-cell-deaths)) "fuel-cell-deaths")
|
||||
((= v1-0 (game-save-elt continue-deaths)) "continue-deaths")
|
||||
((= v1-0 (game-save-elt total-deaths)) "total-deaths")
|
||||
((= v1-0 (game-save-elt level-open-list)) "level-open-list")
|
||||
((= v1-0 (game-save-elt text-list)) "text-list")
|
||||
((= v1-0 (game-save-elt hint-list)) "hint-list")
|
||||
((= v1-0 (game-save-elt perm-list)) "perm-list")
|
||||
((= v1-0 (game-save-elt task-list)) "task-list")
|
||||
((= v1-0 (game-save-elt death-movie-tick)) "death-movie-tick")
|
||||
((= v1-0 (game-save-elt fuel-cell)) "fuel-cell")
|
||||
((= v1-0 (game-save-elt buzzer-total)) "buzzer-total")
|
||||
((= v1-0 (game-save-elt moeny-per-level)) "money-per-level")
|
||||
((= v1-0 (game-save-elt money-total)) "money-total")
|
||||
((= v1-0 (game-save-elt money)) "money")
|
||||
((= v1-0 (game-save-elt life)) "life")
|
||||
((= v1-0 (game-save-elt continue)) "continue")
|
||||
((= v1-0 (game-save-elt integral-time)) "integral-time")
|
||||
((= v1-0 (game-save-elt game-time)) "game-time")
|
||||
((= v1-0 (game-save-elt real-time)) "real-time")
|
||||
((= v1-0 (game-save-elt base-time)) "base-time")
|
||||
((= v1-0 (game-save-elt name)) "name")
|
||||
(else "*unknown*")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defun progress-level-index->string ((arg0 int))
|
||||
"Convert an index for a level in the progress menu (not actual data levels)
|
||||
to a string (translated)."
|
||||
(if (< arg0 (-> *level-task-data* length))
|
||||
(lookup-text! *common-text* (-> *level-task-data* arg0 level-name-id) #f)
|
||||
(the-as string #f)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod debug-print game-save ((obj game-save) (detail symbol))
|
||||
"Print a save to #t"
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~Tversion: ~D~%" (-> obj version))
|
||||
(format #t "~Tallocated-length: ~D~%" (-> obj allocated-length))
|
||||
(format #t "~Tlength: ~D~%" (-> obj length))
|
||||
(format #t "~Tlevel-index: ~D~%" (-> obj level-index))
|
||||
(format #t "~Tfuel-cell-count: ~f~%" (-> obj fuel-cell-count))
|
||||
(format #t "~Tmoney-count: ~f~%" (-> obj money-count))
|
||||
(format #t "~Tbuzzer-count: ~f~%" (-> obj buzzer-count))
|
||||
(format #t "~Tcompletion-percentage: ~f~%" (-> obj completion-percentage))
|
||||
(format #t "~Tsave-time: ~x:~x ~x/~x/~x~%"
|
||||
(-> obj hour)
|
||||
(-> obj minute)
|
||||
(-> obj day)
|
||||
(-> obj month)
|
||||
(-> obj year)
|
||||
)
|
||||
(format #t "~Ttag[]: @ #x~X~%" (-> obj tag))
|
||||
|
||||
;; loop through tags
|
||||
(let ((tag (the-as game-save-tag (-> obj tag)))
|
||||
(tag-idx 0)
|
||||
)
|
||||
(while (< (the-as int tag) (the-as int (-> obj tag)))
|
||||
(format #t "~T [~3D] ~-32S [~3D/~3D] ~12D ~8f "
|
||||
tag-idx
|
||||
(game-save-elt->string (-> tag elt-type))
|
||||
(-> tag elt-count)
|
||||
(-> tag elt-size)
|
||||
(-> tag user-uint64)
|
||||
(-> tag user-float))
|
||||
|
||||
;; name/continue are strings
|
||||
(let ((v1-0 (-> tag elt-type)))
|
||||
(if (or (= v1-0 (game-save-elt name)) (= v1-0 (game-save-elt continue)))
|
||||
(format #t "= \"~G\"~%" (&+ (the-as pointer tag) 16))
|
||||
(format #t "~%")
|
||||
)
|
||||
)
|
||||
|
||||
(when detail
|
||||
(let ((v1-4 (-> tag elt-type)))
|
||||
(cond
|
||||
((or (= v1-4 (game-save-elt moeny-per-level)) (= v1-4 (game-save-elt deaths-per-level)))
|
||||
;; per level u8's
|
||||
(dotimes (prog-lev-idx (-> tag elt-count))
|
||||
(let ((lev-name (progress-level-index->string prog-lev-idx)))
|
||||
(if lev-name
|
||||
(format #t " ~-32S: ~D~%"
|
||||
lev-name
|
||||
(-> (the-as (pointer uint8) (&+ (the-as pointer (&-> (the-as (pointer uint8) tag) 16)) prog-lev-idx)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-4 (game-save-elt enter-level-time))
|
||||
;; per level u64's
|
||||
(dotimes (s2-2 (-> tag elt-count))
|
||||
(let ((a2-14 (progress-level-index->string s2-2)))
|
||||
(if a2-14
|
||||
(format #t " ~-32S: ~D~%"
|
||||
a2-14
|
||||
(-> (the-as (pointer uint64) (&+ (&+ (the-as pointer tag) 16) (* s2-2 8))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-4 (game-save-elt in-level-time))
|
||||
(dotimes (s2-3 (-> tag elt-count))
|
||||
(let ((a2-15 (progress-level-index->string s2-3)))
|
||||
(if a2-15
|
||||
(format #t " ~-32S: ~D~%"
|
||||
a2-15
|
||||
(-> (the-as (pointer uint64) (&+ (&+ (the-as pointer tag) 16) (* s2-3 8))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-4 (game-save-elt fuel-cell-time))
|
||||
(dotimes (s2-4 (-> tag elt-count))
|
||||
(let ((a2-16 (game-task->string (the game-task s2-4))))
|
||||
(if a2-16
|
||||
(format #t " ~-32S: ~D~%"
|
||||
a2-16
|
||||
(-> (the-as (pointer uint64) (&+ (&+ (the-as pointer tag) 16) (* s2-4 8))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! tag (the-as game-save-tag
|
||||
(&+ (the-as pointer tag)
|
||||
(logand -16 (+ (* (the-as int (-> tag elt-size)) (-> tag elt-count)) 31))
|
||||
)
|
||||
)
|
||||
)
|
||||
(+! tag-idx 1)
|
||||
)
|
||||
)
|
||||
obj
|
||||
)
|
||||
|
||||
(defmethod inspect game-save ((obj game-save))
|
||||
(debug-print obj #f)
|
||||
)
|
||||
|
||||
;; todo method 24 game-info
|
||||
|
||||
(defmethod load-game! game-info ((obj game-info) (save game-save))
|
||||
"Copy save data from a game-save to a game-info"
|
||||
(let ((save-data (the-as game-save-tag (-> save tag))))
|
||||
;; loop over all tags
|
||||
(while (< (the-as int save-data) (the-as int (+ (+ (-> save length) 76) (the-as int save))))
|
||||
(let ((a0-1 (-> save-data elt-type)))
|
||||
(cond
|
||||
((= a0-1 (game-save-elt sfx-volume))
|
||||
(set! (-> *setting-control* default sfx-volume) (-> save-data user-float0))
|
||||
)
|
||||
((= a0-1 (game-save-elt music-volume))
|
||||
(set! (-> *setting-control* default music-volume) (-> save-data user-float0))
|
||||
)
|
||||
((= a0-1 (game-save-elt dialog-volume))
|
||||
(set! (-> *setting-control* default dialog-volume) (-> save-data user-float0))
|
||||
)
|
||||
((= a0-1 (game-save-elt language))
|
||||
(set! (-> *setting-control* default language) (the-as int (-> 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))
|
||||
)
|
||||
)
|
||||
)
|
||||
(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))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; if we're a new game, set our checkpoint.
|
||||
(when (nonzero? (-> save new-game))
|
||||
(set-continue! obj "game-start")
|
||||
(set! save save)
|
||||
(goto cfg-134)
|
||||
)
|
||||
|
||||
;; loop over all tags
|
||||
(let ((data (the-as game-save-tag (-> save tag))))
|
||||
(while (< (the-as int data) (the-as int (+ (+ (-> save length) 76) (the-as int save))))
|
||||
(let ((v1-7 (-> data elt-type)))
|
||||
(cond
|
||||
((= v1-7 (game-save-elt base-time))
|
||||
;; updating this requires some care to not break things
|
||||
(let ((old-base-frame (-> *display* base-frame-counter)))
|
||||
(set! (-> *display* base-frame-counter) (-> data user-uint64))
|
||||
;; remember the old value
|
||||
(set! (-> *display* old-base-frame-counter) (+ (-> *display* base-frame-counter) -1))
|
||||
(let ((frame-counter-diff (- (-> *display* base-frame-counter) old-base-frame)))
|
||||
|
||||
;; update in-progress counters
|
||||
(if (nonzero? (-> obj blackout-time))
|
||||
(set! (-> obj blackout-time) (+ (-> obj blackout-time) frame-counter-diff))
|
||||
)
|
||||
(if (nonzero? (-> obj letterbox-time))
|
||||
(set! (-> obj letterbox-time) (+ (-> obj letterbox-time) frame-counter-diff))
|
||||
)
|
||||
(if (nonzero? (-> obj hint-play-time))
|
||||
(set! (-> obj hint-play-time) (+ (-> obj hint-play-time) frame-counter-diff))
|
||||
)
|
||||
(if (nonzero? (-> obj display-text-time))
|
||||
(set! (-> obj display-text-time) (+ (-> obj display-text-time) frame-counter-diff))
|
||||
)
|
||||
)
|
||||
)
|
||||
;; vibration may get stuck on if we warp back in time, just kill it
|
||||
(buzz-stop! 0)
|
||||
)
|
||||
|
||||
((= v1-7 (game-save-elt game-time))
|
||||
(set! (-> *display* game-frame-counter) (-> data user-uint64))
|
||||
(set! (-> *display* old-game-frame-counter) (+ (-> *display* game-frame-counter) -1))
|
||||
)
|
||||
((= v1-7 (game-save-elt real-time))
|
||||
(set! (-> *display* real-frame-counter) (-> data user-uint64))
|
||||
(set! (-> *display* old-real-frame-counter) (+ (-> *display* real-frame-counter) -1))
|
||||
)
|
||||
((= v1-7 (game-save-elt integral-time))
|
||||
(set! (-> *display* integral-frame-counter) (-> data user-uint64))
|
||||
(set! (-> *display* old-integral-frame-counter) (+ (-> *display* integral-frame-counter) -1))
|
||||
)
|
||||
((= v1-7 (game-save-elt continue))
|
||||
(format (clear *temp-string*) "~G" (&+ (the-as pointer data) 16))
|
||||
(set-continue! obj *temp-string*)
|
||||
)
|
||||
((= v1-7 (game-save-elt life))
|
||||
(set! (-> obj life) (-> data user-float0))
|
||||
)
|
||||
((= v1-7 (game-save-elt buzzer-total))
|
||||
(set! (-> obj buzzer-total) (-> data user-float0))
|
||||
)
|
||||
((= v1-7 (game-save-elt fuel-cell))
|
||||
(set! (-> obj fuel) (-> data user-float0))
|
||||
)
|
||||
((= v1-7 (game-save-elt death-movie-tick))
|
||||
(set! (-> obj death-movie-tick) (the-as int (-> data user-uint64)))
|
||||
)
|
||||
((= v1-7 (game-save-elt money))
|
||||
(set! (-> obj money) (-> data user-float0))
|
||||
)
|
||||
((= v1-7 (game-save-elt money-total))
|
||||
(set! (-> obj money-total) (-> data user-float0))
|
||||
)
|
||||
((= v1-7 (game-save-elt moeny-per-level))
|
||||
(let ((v1-34 (min 32 (-> data elt-count))))
|
||||
(dotimes (a0-76 v1-34)
|
||||
(set!
|
||||
(-> obj money-per-level a0-76)
|
||||
(-> (the-as (pointer uint8) (&+ (the-as pointer data) 16)) a0-76)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-7 (game-save-elt level-open-list))
|
||||
(let ((v1-38 (min 32 (-> data elt-count))))
|
||||
(dotimes (a0-80 v1-38)
|
||||
(set!
|
||||
(-> obj level-opened a0-80)
|
||||
(-> (the-as (pointer uint8) (&+ (the-as pointer data) 16)) a0-80)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-7 (game-save-elt perm-list))
|
||||
(let ((s3-2 (min (-> data elt-count) (-> obj perm-list allocated-length))))
|
||||
(set! (-> obj perm-list length) s3-2)
|
||||
(dotimes (s2-0 s3-2)
|
||||
(mem-copy!
|
||||
(the-as pointer (-> obj perm-list data s2-0))
|
||||
(&+ (&+ (the-as pointer data) 16) (* s2-0 16))
|
||||
16
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-7 (game-save-elt task-list))
|
||||
(let ((s3-4 (min (-> data elt-count) (-> obj task-perm-list allocated-length))))
|
||||
(set! (-> obj task-perm-list length) s3-4)
|
||||
(dotimes (s2-1 s3-4)
|
||||
(mem-copy!
|
||||
(the-as pointer (-> obj task-perm-list data s2-1))
|
||||
(&+ (&+ (the-as pointer data) 16) (* s2-1 16))
|
||||
16
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-7 (game-save-elt text-list))
|
||||
(let ((v1-61 (/ (logand -8 (+ (-> obj text-ids-seen allocated-length) 7)) 8))
|
||||
(a0-94 (-> data elt-count)))
|
||||
(dotimes (a1-35 v1-61)
|
||||
(cond
|
||||
((>= a1-35 a0-94)
|
||||
(set! (-> obj text-ids-seen bytes a1-35) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
(else
|
||||
(set! (-> obj text-ids-seen bytes a1-35)
|
||||
(-> (the-as (pointer uint8) (&+ (the-as pointer data) 16)) a1-35)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-7 (game-save-elt hint-list))
|
||||
(cond
|
||||
((= (-> obj hint-control length) (-> data elt-count))
|
||||
(let ((v1-65 (&+ (the-as pointer data) 16)))
|
||||
(dotimes (a0-99 (-> data elt-count))
|
||||
(set! (-> obj hint-control a0-99 start-time)
|
||||
(-> (the-as (pointer uint64) (&+ v1-65 (* (* a0-99 4) 8))))
|
||||
)
|
||||
(set! (-> obj hint-control a0-99 last-time-called)
|
||||
(-> (the-as (pointer uint64) (&+ v1-65 (* (+ (* a0-99 4) 1) 8))))
|
||||
)
|
||||
(set! (-> obj hint-control a0-99 num-attempts)
|
||||
(-> (the-as (pointer int8)
|
||||
(&+ (the-as (pointer uint8) v1-65) (+ (* a0-99 32) 16))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set!
|
||||
(-> obj hint-control a0-99 num-success)
|
||||
(-> (the-as (pointer int8)
|
||||
(&+ (the-as (pointer uint8) v1-65) (+ (* a0-99 32) 17))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(format
|
||||
0
|
||||
"WARNING: SAVEGAME: hint control list did not match current, ignoring~%"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-7 (game-save-elt auto-save-count))
|
||||
(set! (-> obj auto-save-count) (the-as int (-> data user-uint64)))
|
||||
)
|
||||
((= v1-7 (game-save-elt total-deaths))
|
||||
(set! (-> obj total-deaths) (the-as int (-> data user-uint64)))
|
||||
)
|
||||
((= v1-7 (game-save-elt continue-deaths))
|
||||
(set! (-> obj continue-deaths) (the-as int (-> data user-uint64)))
|
||||
)
|
||||
((= v1-7 (game-save-elt fuel-cell-deaths))
|
||||
(set! (-> obj fuel-cell-deaths) (the-as int (-> data user-uint64)))
|
||||
)
|
||||
((= v1-7 (game-save-elt game-start-time))
|
||||
(set! (-> obj game-start-time) (-> data user-uint64))
|
||||
)
|
||||
((= v1-7 (game-save-elt continue-time))
|
||||
(set! (-> obj continue-time) (-> data user-uint64))
|
||||
)
|
||||
((= v1-7 (game-save-elt death-time))
|
||||
(set! (-> obj death-time) (-> data user-uint64))
|
||||
)
|
||||
((= v1-7 (game-save-elt hit-time))
|
||||
(set! (-> obj hit-time) (-> data user-uint64))
|
||||
)
|
||||
((= v1-7 (game-save-elt fuel-cell-pickup-time))
|
||||
(set! (-> obj fuel-cell-pickup-time) (-> data user-uint64))
|
||||
)
|
||||
((= v1-7 (game-save-elt deaths-per-level))
|
||||
(let ((v1-79 (min 32 (-> data elt-count))))
|
||||
(dotimes (a0-122 v1-79)
|
||||
(set!
|
||||
(-> obj deaths-per-level a0-122)
|
||||
(-> (the-as (pointer uint8) (&+ (the-as pointer data) 16)) a0-122)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-7 (game-save-elt enter-level-time))
|
||||
(let ((v1-83 (min 32 (-> data elt-count))))
|
||||
(dotimes (a0-126 v1-83)
|
||||
(set! (-> obj enter-level-time a0-126)
|
||||
(-> (the-as (pointer uint64) (&+ (&+ (the-as pointer data) 16) (* a0-126 8))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-7 (game-save-elt in-level-time))
|
||||
(let ((v1-87 (min 32 (-> data elt-count))))
|
||||
(dotimes (a0-130 v1-87)
|
||||
(set! (-> obj in-level-time a0-130)
|
||||
(-> (the-as (pointer uint64) (&+ (&+ (the-as pointer data) 16) (* a0-130 8))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
((= v1-7 (game-save-elt fuel-cell-time))
|
||||
(let ((v1-92 (min 32 (-> data elt-count))))
|
||||
(dotimes (a0-133 v1-92)
|
||||
(set! (-> obj fuel-cell-time a0-133)
|
||||
(-> (the-as (pointer uint64) (&+ (&+ (the-as pointer data) 16) (* a0-133 8))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! data (the-as game-save-tag (&+ (the-as pointer data)
|
||||
(logand -16
|
||||
(+ (* (the-as int (-> data elt-size)) (-> data elt-count)) 31)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; update entity stuff in levels that are active
|
||||
(dotimes (s4-1 (-> *level* length))
|
||||
(let ((a1-68 (-> *level* level s4-1)))
|
||||
(if (= (-> a1-68 status) 'active)
|
||||
(copy-perms-to-level! obj a1-68)
|
||||
)
|
||||
)
|
||||
)
|
||||
;; update tasks
|
||||
(let ((s5-1 2) ;; jungle eggtop
|
||||
(s4-2 115) ;; max - 1
|
||||
)
|
||||
(while (>= (the-as uint s4-2) (the-as uint s5-1))
|
||||
;; calling this will run the function to see if the task is done or not
|
||||
(get-task-status (the-as game-task s5-1))
|
||||
(+! s5-1 1)
|
||||
)
|
||||
)
|
||||
(label cfg-134)
|
||||
save
|
||||
)
|
||||
|
||||
(defmethod save-to-file game-save ((obj game-save) (arg0 string))
|
||||
"Write a game save to a file for debugging"
|
||||
(let ((s5-0 (new 'stack 'file-stream arg0 'write)))
|
||||
(file-stream-write s5-0
|
||||
(&-> obj type)
|
||||
(+ (-> obj type size) (the-as uint (-> obj length)))
|
||||
)
|
||||
(file-stream-close s5-0)
|
||||
)
|
||||
obj
|
||||
)
|
||||
|
||||
(defmethod load-from-file! game-save ((obj game-save) (filename string))
|
||||
(let ((stream (new 'stack 'file-stream filename 'read)))
|
||||
(let ((in-size (file-stream-length stream))
|
||||
(my-size (-> obj allocated-length))
|
||||
)
|
||||
(cond
|
||||
((>= (asize-of obj) in-size)
|
||||
;; thing in file is not bigger than we are, safe to read.
|
||||
(cond
|
||||
((= (file-stream-read stream (&-> obj type) in-size) in-size)
|
||||
;; read success! set the type tag
|
||||
(set! (-> obj type) game-save)
|
||||
)
|
||||
(else
|
||||
;; fail.
|
||||
(format 0 "ERROR: SAVEGAME: save file ~A did not read correctly.~%" stream)
|
||||
(set! (-> obj length) 0)
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
;; file is bigger than we are, just give up because we don't have
|
||||
;; enough room to put the save
|
||||
(format 0 "ERROR: SAVEGAME: save file ~A is too big~%" stream)
|
||||
)
|
||||
)
|
||||
(set! (-> obj allocated-length) my-size)
|
||||
)
|
||||
(when (!= (-> obj version) SAVE_VERSION)
|
||||
;; uh-oh, the version is wrong
|
||||
(format 0 "ERROR: SAVEGAME: save file ~A was version ~d, but only ~d is supported.~%"
|
||||
stream
|
||||
(-> obj version)
|
||||
SAVE_VERSION
|
||||
)
|
||||
(set! (-> obj length) 0)
|
||||
0
|
||||
)
|
||||
(file-stream-close stream)
|
||||
)
|
||||
obj
|
||||
)
|
||||
|
||||
;; TODO sparticle stuff and more
|
||||
|
||||
;; TODO - for credits
|
||||
(define-extern print-game-text (function string font-context symbol int int float)) ; TODO decomp error, this seems correct though
|
||||
|
||||
@@ -131,3 +131,4 @@
|
||||
(defun-extern set-blackout-frames int uint)
|
||||
(defun-extern on symbol process)
|
||||
(defun-extern off int)
|
||||
(define-extern set-master-mode (function symbol none))
|
||||
@@ -36,3 +36,5 @@
|
||||
:size-assert #x4
|
||||
:flag-assert #x900000004
|
||||
)
|
||||
|
||||
(define-extern reset-all-hint-controls (function none))
|
||||
@@ -5,7 +5,21 @@
|
||||
;; name in dgo: task-control-h
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; custom enums
|
||||
;; There are a fixed number of game tasks. Most are just getting a power cell,
|
||||
;; but there are also ones for using the levitator etc.
|
||||
|
||||
;; The list of all tasks is the game-task enum in game-info-h.gc
|
||||
|
||||
;; the task control contains a list of all cstage.
|
||||
;; Each task may have multiple cstages.
|
||||
;; Each cstage corresponds to a game-task and a task-status.
|
||||
|
||||
;; There is a concept of a "current stage" being played, but it may sometimes be invalid (-1).
|
||||
;; it is an index into the task-control list
|
||||
|
||||
;; names from task-status->string function
|
||||
;; the status value will increase.
|
||||
;; some tasks may do their own thing and not use these values.
|
||||
(defenum task-status
|
||||
:type uint64
|
||||
(invalid 0)
|
||||
@@ -16,172 +30,59 @@
|
||||
(need-reminder 5)
|
||||
(need-reward-speech 6)
|
||||
(need-resolution 7)
|
||||
(*unknown* 999999)
|
||||
)
|
||||
|
||||
(defenum game-task
|
||||
;; our names
|
||||
(defenum task-flags
|
||||
:type uint8
|
||||
(none 0)
|
||||
(complete 1)
|
||||
(jungle-eggtop 2)
|
||||
(jungle-lurkerm 3)
|
||||
(jungle-tower 4)
|
||||
(jungle-fishgame 5)
|
||||
(jungle-plant 6)
|
||||
(jungle-buzzer 7)
|
||||
(jungle-canyon-end 8)
|
||||
(jungle-temple-door 9)
|
||||
(village1-yakow 10)
|
||||
(village1-mayor-money 11)
|
||||
(village1-uncle-money 12)
|
||||
(village1-oracle-money1 13)
|
||||
(village1-oracle-money2 14)
|
||||
(beach-ecorocks 15)
|
||||
(beach-pelican 16)
|
||||
(beach-flutflut 17)
|
||||
(beach-seagull 18)
|
||||
(beach-cannon 19)
|
||||
(beach-buzzer 20)
|
||||
(beach-gimmie 21)
|
||||
(beach-sentinel 22)
|
||||
(misty-muse 23)
|
||||
(misty-boat 24)
|
||||
(misty-warehouse 25)
|
||||
(misty-cannon 26)
|
||||
(misty-bike 27)
|
||||
(misty-buzzer 28)
|
||||
(misty-bike-jump 29)
|
||||
(misty-eco-challenge 30)
|
||||
(village2-gambler-money 31)
|
||||
(village2-geologist-money 32)
|
||||
(village2-warrior-money 33)
|
||||
(village2-oracle-money1 34)
|
||||
(village2-oracle-money2 35)
|
||||
(swamp-billy 36)
|
||||
(swamp-flutflut 37)
|
||||
(swamp-battle 38)
|
||||
(swamp-tether-1 39)
|
||||
(swamp-tether-2 40)
|
||||
(swamp-tether-3 41)
|
||||
(swamp-tether-4 42)
|
||||
(swamp-buzzer 43)
|
||||
(sunken-platforms 44)
|
||||
(sunken-pipe 45)
|
||||
(sunken-slide 46)
|
||||
(sunken-room 47)
|
||||
(sunken-sharks 48)
|
||||
(sunken-buzzer 49)
|
||||
(sunken-top-of-helix 50)
|
||||
(sunken-spinning-room 51)
|
||||
(rolling-race 52)
|
||||
(rolling-robbers 53)
|
||||
(rolling-moles 54)
|
||||
(rolling-plants 55)
|
||||
(rolling-lake 56)
|
||||
(rolling-buzzer 57)
|
||||
(rolling-ring-chase-1 58)
|
||||
(rolling-ring-chase-2 59)
|
||||
(snow-eggtop 60)
|
||||
(snow-ram 61)
|
||||
(snow-fort 62)
|
||||
(snow-ball 63)
|
||||
(snow-bunnies 64)
|
||||
(snow-buzzer 65)
|
||||
(snow-bumpers 66)
|
||||
(snow-cage 67)
|
||||
(firecanyon-buzzer 68)
|
||||
(firecanyon-end 69)
|
||||
(citadel-sage-green 70)
|
||||
(citadel-sage-blue 71)
|
||||
(citadel-sage-red 72)
|
||||
(citadel-sage-yellow 73)
|
||||
(village3-extra1 74)
|
||||
(village1-buzzer 75)
|
||||
(village2-buzzer 76)
|
||||
(village3-buzzer 77)
|
||||
(cave-gnawers 78)
|
||||
(cave-dark-crystals 79)
|
||||
(cave-dark-climb 80)
|
||||
(cave-robot-climb 81)
|
||||
(cave-swing-poles 82)
|
||||
(cave-spider-tunnel 83)
|
||||
(cave-platforms 84)
|
||||
(cave-buzzer 85)
|
||||
(ogre-boss 86)
|
||||
(ogre-end 87)
|
||||
(ogre-buzzer 88)
|
||||
(lavatube-end 89)
|
||||
(lavatube-buzzer 90)
|
||||
(citadel-buzzer 91)
|
||||
(training-gimmie 92)
|
||||
(training-door 93)
|
||||
(training-climb 94)
|
||||
(training-buzzer 95)
|
||||
(village3-miner-money1 96)
|
||||
(village3-miner-money2 97)
|
||||
(village3-miner-money3 98)
|
||||
(village3-miner-money4 99)
|
||||
(village3-oracle-money1 100)
|
||||
(village3-oracle-money2 101)
|
||||
(firecanyon-assistant 102)
|
||||
(village2-levitator 103)
|
||||
(swamp-arm 104)
|
||||
(village3-button 105)
|
||||
(red-eggtop 106)
|
||||
(lavatube-balls 107)
|
||||
(lavatube-start 108)
|
||||
(intro 109)
|
||||
(ogre-secret 110)
|
||||
(village4-button 111)
|
||||
(finalboss-movies 112)
|
||||
(plunger-lurker-hit 113)
|
||||
(leaving-misty 114)
|
||||
(assistant-village3 115)
|
||||
(max 116)
|
||||
(*unknown* 255))
|
||||
:bitfield #t
|
||||
(closed 0)
|
||||
(has-entity 1)
|
||||
(closed-by-default 2)
|
||||
)
|
||||
|
||||
;; definition of type task-cstage
|
||||
(declare-type task-control basic)
|
||||
|
||||
;; A task-cstage describes
|
||||
(deftype task-cstage (structure)
|
||||
((game-task game-task :offset-assert 0)
|
||||
(status task-status :offset-assert 8)
|
||||
(flags uint8 :offset-assert 16)
|
||||
(condition (function task-control symbol) :offset-assert 20)
|
||||
((game-task game-task :offset-assert 0)
|
||||
(status task-status :offset-assert 8)
|
||||
(flags task-flags :offset-assert 16)
|
||||
(condition (function task-control symbol) :offset-assert 20)
|
||||
)
|
||||
:method-count-assert 16
|
||||
:size-assert #x18
|
||||
:flag-assert #x1000000018
|
||||
(:methods
|
||||
(get-game-task (_type_) uint 9)
|
||||
(get-task-status (_type_) uint 10)
|
||||
(TODO-RENAME-11 (_type_ task-control) symbol 11)
|
||||
(first-flag-bit? (_type_) symbol 12)
|
||||
(third-flag-bit? (_type_) symbol 13)
|
||||
(TODO-RENAME-14 (_type_) int 14)
|
||||
(clear-all-but-first-flag-bit (_type_) int 15)
|
||||
)
|
||||
(get-game-task (_type_) game-task 9)
|
||||
(get-task-status (_type_) task-status 10)
|
||||
(task-available? (_type_ task-control) symbol 11)
|
||||
(closed? (_type_) symbol 12)
|
||||
(closed-by-default? (_type_) symbol 13)
|
||||
(close-task! (_type_) int 14)
|
||||
(open-task! (_type_) int 15)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type task-control
|
||||
(deftype task-control (basic)
|
||||
((current-stage int16 :offset-assert 4)
|
||||
(stage (array task-cstage) :offset-assert 8)
|
||||
((current-stage int16 :offset-assert 4)
|
||||
(stage (array task-cstage) :offset-assert 8)
|
||||
)
|
||||
:method-count-assert 19
|
||||
:size-assert #xc
|
||||
:flag-assert #x130000000c
|
||||
(:methods
|
||||
(current-task (_type_) int 9)
|
||||
(current-status (_type_) int 10)
|
||||
(close-current! (_type_) none 11)
|
||||
(close-status! (_type_ int) int 12)
|
||||
(first-any (_type_ symbol) int 13)
|
||||
(reset! (_type_ symbol symbol) int 14)
|
||||
(closed? (_type_ int int) symbol 15)
|
||||
(get-reminder (_type_ int) int 16)
|
||||
(save-reminder (_type_ int int) int 17) ;; TODO - i believe this is none
|
||||
(exists? (_type_ int int) symbol 18)
|
||||
)
|
||||
(current-task (_type_) int 9)
|
||||
(current-status (_type_) int 10)
|
||||
(close-current! (_type_) none 11)
|
||||
(close-status! (_type_ task-status) int 12)
|
||||
(first-any (_type_ symbol) int 13)
|
||||
(reset! (_type_ symbol symbol) int 14)
|
||||
(closed? (_type_ game-task task-status) symbol 15)
|
||||
(get-reminder (_type_ int) int 16)
|
||||
(save-reminder (_type_ int int) int 17)
|
||||
(exists? (_type_ game-task task-status) symbol 18)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition of type ambient-control
|
||||
@@ -269,4 +170,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(define-extern task-closed? (function int int symbol))
|
||||
(define-extern task-closed? (function game-task task-status symbol))
|
||||
(define-extern get-task-status (function game-task task-status))
|
||||
(define-extern get-task-control (function game-task task-control))
|
||||
(define-extern close-specific-task! (function game-task task-status int))
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -20,19 +20,19 @@
|
||||
)
|
||||
|
||||
(deftype border-plane (basic)
|
||||
((name basic :offset-assert 4)
|
||||
(action basic :offset-assert 8)
|
||||
(slot int8 :offset-assert 12)
|
||||
(trans vector :inline :offset-assert 16)
|
||||
(normal vector :inline :offset-assert 32)
|
||||
((name symbol :offset-assert 4)
|
||||
(action basic :offset-assert 8)
|
||||
(slot int8 :offset-assert 12)
|
||||
(trans vector :inline :offset-assert 16)
|
||||
(normal vector :inline :offset-assert 32)
|
||||
)
|
||||
:method-count-assert 11
|
||||
:size-assert #x30
|
||||
:flag-assert #xb00000030
|
||||
(:methods
|
||||
(dummy-9 () none 9)
|
||||
(dummy-10 () none 10)
|
||||
)
|
||||
(debug-draw! (_type_) none 9)
|
||||
(point-past-plane? (_type_ vector) symbol 10)
|
||||
)
|
||||
)
|
||||
|
||||
(defun-extern quaternion-from-two-vectors-max-angle! quaternion vector vector float quaternion)
|
||||
|
||||
@@ -393,3 +393,4 @@
|
||||
)
|
||||
)
|
||||
|
||||
(define-extern *level-load-list* pair)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
:name "training-start"
|
||||
:level 'training
|
||||
:trans (new 'static 'vector :x -5393626.5 :y 28072.346 :z 4332472.5 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.9995 :w 0.0297)
|
||||
:quat (new 'static 'quaternion :y 0.9995 :w 0.0297)
|
||||
:camera-trans (new 'static 'vector :x -5426915.0 :y 45930.906 :z 4353156.0 :w 1.0)
|
||||
:camera-rot
|
||||
(new 'static 'array float 9 -0.5571 0.0 -0.8304 0.1264 0.9883 -0.0848 0.8207 -0.1522 -0.5506)
|
||||
@@ -52,7 +52,7 @@
|
||||
:level 'training
|
||||
:flags #x4
|
||||
:trans (new 'static 'vector :x -5383524.0 :y 28019.098 :z 4360302.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.084 :w 0.9964)
|
||||
:quat (new 'static 'quaternion :y 0.084 :w 0.9964)
|
||||
:camera-trans
|
||||
(new 'static 'vector :x -5366765.0 :y 45646.234 :z 4325889.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.9057 0.0 0.4238 -0.0666 0.9875 0.1424 -0.4186 -0.1572 0.8944)
|
||||
@@ -78,7 +78,7 @@
|
||||
:level 'training
|
||||
:flags #x404
|
||||
:trans (new 'static 'vector :x -5393740.5 :y 28259.533 :z 4360945.5 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.9993 :w 0.0359)
|
||||
:quat (new 'static 'quaternion :y 0.9993 :w 0.0359)
|
||||
:camera-trans (new 'static 'vector :x -5434444.5 :y 47050.344 :z 4372832.5 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.3536 0.0 -0.9353 0.1315 0.99 -0.0497 0.926 -0.1406 -0.35)
|
||||
:load-commands
|
||||
@@ -134,7 +134,7 @@
|
||||
:name "village1-hut"
|
||||
:level 'village1
|
||||
:trans (new 'static 'vector :x -638860.06 :y 139319.7 :z 769990.6 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.9889 :w -0.148)
|
||||
:quat (new 'static 'quaternion :y -0.9889 :w -0.148)
|
||||
:camera-trans (new 'static 'vector :x -668114.1 :y 164536.31 :z 828633.06 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.8947 0.0 -0.4464 0.1082 0.9701 -0.2169 0.4331 -0.2424 -0.868)
|
||||
:load-commands '()
|
||||
@@ -149,7 +149,7 @@
|
||||
:level 'village1
|
||||
:flags #x24
|
||||
:trans (new 'static 'vector :x -518468.8 :y 189424.03 :z 868568.7 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.591 :w 0.8066)
|
||||
:quat (new 'static 'quaternion :y 0.591 :w 0.8066)
|
||||
:camera-trans (new 'static 'vector :x -559109.3 :y 200461.92 :z 826073.06 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.7221 0.0 -0.6917 -0.0517 0.9972 -0.054 0.6897 0.0747 0.7201)
|
||||
:load-commands '()
|
||||
@@ -164,7 +164,7 @@
|
||||
:level 'village1
|
||||
:flags #x804
|
||||
:trans (new 'static 'vector :x -518468.8 :y 189424.03 :z 868568.7 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.591 :w 0.8066)
|
||||
:quat (new 'static 'quaternion :y 0.591 :w 0.8066)
|
||||
:camera-trans (new 'static 'vector :x -559109.3 :y 200461.92 :z 826073.06 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.7221 0.0 -0.6917 -0.0517 0.9972 -0.054 0.6897 0.0747 0.7201)
|
||||
:load-commands '()
|
||||
@@ -179,7 +179,7 @@
|
||||
:level 'village1
|
||||
:flags #x40
|
||||
:trans (new 'static 'vector :x -542529.1 :y 189424.03 :z 847101.94 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.1717 :w -0.9851)
|
||||
:quat (new 'static 'quaternion :y -0.1717 :w -0.9851)
|
||||
:camera-trans (new 'static 'vector :x -559085.2 :y 202996.53 :z 826054.25 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.7868 0.0 -0.6171 0.0775 0.992 0.0989 0.6122 -0.1257 0.7806)
|
||||
:load-commands '()
|
||||
@@ -194,7 +194,7 @@
|
||||
:level 'village1
|
||||
:flags #x10
|
||||
:trans (new 'static 'vector :x 164316.78 :y 15128.576 :z 3390588.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.2339 :w 0.9722)
|
||||
:quat (new 'static 'quaternion :y -0.2339 :w 0.9722)
|
||||
:camera-trans (new 'static 'vector :x 204089.34 :y 36257.793 :z 3358341.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.6381 0.0 0.7699 -0.0938 0.9925 0.0777 -0.7642 -0.1218 0.6333)
|
||||
:load-commands
|
||||
@@ -255,7 +255,7 @@
|
||||
:name "beach-start"
|
||||
:level 'beach
|
||||
:trans (new 'static 'vector :x -504960.22 :y 9477.325 :z -223513.81 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.9486 :w -0.3163)
|
||||
:quat (new 'static 'quaternion :y 0.9486 :w -0.3163)
|
||||
:camera-trans (new 'static 'vector :x -487550.16 :y 28354.15 :z -184211.05 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.9139 0.0 0.4058 -0.0551 0.9907 -0.1241 -0.4021 -0.1358 -0.9054)
|
||||
:load-commands '()
|
||||
@@ -300,7 +300,7 @@
|
||||
:name "jungle-start"
|
||||
:level 'jungle
|
||||
:trans (new 'static 'vector :x 1057631.9 :y 86404.305 :z -647140.56 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.9009 :w -0.4339)
|
||||
:quat (new 'static 'quaternion :y -0.9009 :w -0.4339)
|
||||
:camera-trans (new 'static 'vector :x 1004424.8 :y 111181.82 :z -611527.9 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.5568 0.0 -0.8306 0.201 0.9702 -0.1347 0.8059 -0.2419 -0.5402)
|
||||
:load-commands '()
|
||||
@@ -344,7 +344,7 @@
|
||||
:name "jungle-tower"
|
||||
:level 'jungleb
|
||||
:trans (new 'static 'vector :x 1469510.0 :y -204745.52 :z -959058.3 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.6194 :w -0.785)
|
||||
:quat (new 'static 'quaternion :y -0.6194 :w -0.785)
|
||||
:camera-trans (new 'static 'vector :x 1485298.5 :y -189972.08 :z -936548.75 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.8614 0.0 0.5078 -0.1177 0.9727 -0.1997 -0.4939 -0.2318 -0.8379)
|
||||
:load-commands '()
|
||||
@@ -388,7 +388,7 @@
|
||||
:name "misty-start"
|
||||
:level 'misty
|
||||
:trans (new 'static 'vector :x 164316.78 :y 15128.576 :z 3390588.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.2339 :w 0.9722)
|
||||
:quat (new 'static 'quaternion :y -0.2339 :w 0.9722)
|
||||
:camera-trans (new 'static 'vector :x 204089.34 :y 36257.793 :z 3358341.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.6381 0.0 0.7699 -0.0938 0.9925 0.0777 -0.7642 -0.1218 0.6333)
|
||||
:load-commands
|
||||
@@ -415,7 +415,7 @@
|
||||
:name "misty-silo"
|
||||
:level 'misty
|
||||
:trans (new 'static 'vector :x -672503.0 :y 82131.35 :z 3651465.8 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.0878 :w 0.9961)
|
||||
:quat (new 'static 'quaternion :y 0.0878 :w 0.9961)
|
||||
:camera-trans (new 'static 'vector :x -675754.0 :y 102028.91 :z 3604800.8 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.9975 0.0 -0.0704 0.0086 0.9924 0.1223 0.0698 -0.1226 0.9899)
|
||||
:load-commands
|
||||
@@ -442,7 +442,7 @@
|
||||
:name "misty-bike"
|
||||
:level 'misty
|
||||
:trans (new 'static 'vector :x 302533.44 :y 35901.848 :z 4138967.8 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.2809 :w 0.9597)
|
||||
:quat (new 'static 'quaternion :y -0.2809 :w 0.9597)
|
||||
:camera-trans (new 'static 'vector :x 338476.25 :y 55700.684 :z 4109729.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.6308 0.0 0.7759 -0.096 0.9923 0.078 -0.7699 -0.1237 0.6259)
|
||||
:load-commands
|
||||
@@ -469,7 +469,7 @@
|
||||
:name "misty-backside"
|
||||
:level 'misty
|
||||
:trans (new 'static 'vector :x -304192.72 :y 33270.99 :z 4646525.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.8443 :w -0.5357)
|
||||
:quat (new 'static 'quaternion :y -0.8443 :w -0.5357)
|
||||
:camera-trans (new 'static 'vector :x -346989.78 :y 54377.676 :z 4674685.5 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.5497 0.0 -0.8353 0.1009 0.9926 -0.0664 0.8291 -0.1208 -0.5457)
|
||||
:load-commands
|
||||
@@ -496,7 +496,7 @@
|
||||
:name "misty-silo2"
|
||||
:level 'misty
|
||||
:trans (new 'static 'vector :x -898000.06 :y 98038.17 :z 4162091.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.1102 :w 0.9938)
|
||||
:quat (new 'static 'quaternion :y -0.1102 :w 0.9938)
|
||||
:camera-trans (new 'static 'vector :x -931459.9 :y 118198.68 :z 4196081.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.6605 0.0 -0.7508 0.1086 0.9894 -0.0955 0.7429 -0.1447 -0.6535)
|
||||
:load-commands
|
||||
@@ -553,7 +553,7 @@
|
||||
:name "firecanyon-start"
|
||||
:level 'firecanyon
|
||||
:trans (new 'static 'vector :x -87377.1 :y 126444.75 :z -681697.25 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.9921 :w -0.1246)
|
||||
:quat (new 'static 'quaternion :y 0.9921 :w -0.1246)
|
||||
:camera-trans (new 'static 'vector :x -84559.055 :y 144685.47 :z -641194.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.9976 0.0 0.0688 -0.01 0.9893 -0.1452 -0.068 -0.1456 -0.9869)
|
||||
:load-commands '()
|
||||
@@ -567,7 +567,7 @@
|
||||
:name "firecanyon-end"
|
||||
:level 'firecanyon
|
||||
:trans (new 'static 'vector :x 1360576.1 :y 126976.0 :z -5839533.5 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.1666 :w 0.986)
|
||||
:quat (new 'static 'quaternion :y 0.1666 :w 0.986)
|
||||
:camera-trans (new 'static 'vector :x 1378912.6 :y 144452.81 :z -5872527.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.8847 0.0 0.466 -0.0744 0.9871 0.1414 -0.46 -0.1598 0.8733)
|
||||
:load-commands '()
|
||||
@@ -611,7 +611,7 @@
|
||||
:name "village2-start"
|
||||
:level 'village2
|
||||
:trans (new 'static 'vector :x 1460961.2 :y 108562.02 :z -6161391.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.9917 :w 0.1278)
|
||||
:quat (new 'static 'quaternion :y 0.9917 :w 0.1278)
|
||||
:camera-trans (new 'static 'vector :x 1468018.8 :y 133790.92 :z -6096227.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.9941 0.0 0.1076 -0.0261 0.9699 -0.2418 -0.1044 -0.2432 -0.9643)
|
||||
:load-commands '()
|
||||
@@ -626,7 +626,7 @@
|
||||
:level 'village2
|
||||
:flags #x4
|
||||
:trans (new 'static 'vector :x 1592492.9 :y 91648.0 :z -6328677.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.7469 :w 0.6648)
|
||||
:quat (new 'static 'quaternion :y 0.7469 :w 0.6648)
|
||||
:camera-trans (new 'static 'vector :x 1555766.1 :y 103759.46 :z -6318964.5 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.2562 0.0 -0.9666 -0.0253 0.9996 0.0067 0.9662 0.0262 -0.2561)
|
||||
:load-commands '()
|
||||
@@ -640,7 +640,7 @@
|
||||
:name "village2-dock"
|
||||
:level 'village2
|
||||
:trans (new 'static 'vector :x 1264346.8 :y 19451.494 :z -6833563.5 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.0258 :w 0.9996)
|
||||
:quat (new 'static 'quaternion :y 0.0258 :w 0.9996)
|
||||
:camera-trans (new 'static 'vector :x 1265547.2 :y 34647.656 :z -6862636.5 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.9991 0.0 0.0411 -0.0088 0.9764 0.2155 -0.0401 -0.2156 0.9756)
|
||||
:load-commands '()
|
||||
@@ -684,7 +684,7 @@
|
||||
:name "sunken-start"
|
||||
:level 'sunken
|
||||
:trans (new 'static 'vector :x 2172095.2 :y -591749.94 :z -6721553.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.5083 :w 0.8611)
|
||||
:quat (new 'static 'quaternion :y -0.5083 :w 0.8611)
|
||||
:camera-trans (new 'static 'vector :x 2138871.5 :y -572296.4 :z -6751967.5 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.7575 0.0 -0.6527 0.0858 0.9913 0.0995 0.647 -0.1314 0.7509)
|
||||
:load-commands '()
|
||||
@@ -698,7 +698,7 @@
|
||||
:name "sunken1"
|
||||
:level 'sunken
|
||||
:trans (new 'static 'vector :x 3062988.5 :y -536575.56 :z -6527484.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.5304 :w 0.8477)
|
||||
:quat (new 'static 'quaternion :y 0.5304 :w 0.8477)
|
||||
:camera-trans (new 'static 'vector :x 3015461.2 :y -515480.38 :z -6546573.5 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.3725 0.0 -0.928 0.1121 0.9926 0.045 0.9212 -0.1208 0.3697)
|
||||
:load-commands '()
|
||||
@@ -712,7 +712,7 @@
|
||||
:name "sunken2"
|
||||
:level 'sunken
|
||||
:trans (new 'static 'vector :x 3133625.5 :y -569343.56 :z -6909587.5 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.9512 :w 0.3083)
|
||||
:quat (new 'static 'quaternion :y -0.9512 :w 0.3083)
|
||||
:camera-trans (new 'static 'vector :x 3170833.2 :y -548244.25 :z -6874378.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.6872 0.0 0.7263 -0.0878 0.9926 -0.0831 -0.721 -0.1209 -0.6822)
|
||||
:load-commands '()
|
||||
@@ -726,7 +726,7 @@
|
||||
:name "sunken-tube1"
|
||||
:level 'sunken
|
||||
:trans (new 'static 'vector :x 2649601.8 :y -569343.56 :z -7132970.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.9936 :w 0.1124)
|
||||
:quat (new 'static 'quaternion :y 0.9936 :w 0.1124)
|
||||
:camera-trans (new 'static 'vector :x 2636150.2 :y -555656.4 :z -7114732.5 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.8024 0.0 -0.5967 0.1721 0.9574 -0.2315 0.5713 -0.2885 -0.7683)
|
||||
:load-commands '()
|
||||
@@ -770,7 +770,7 @@
|
||||
:name "sunkenb-start"
|
||||
:level 'sunkenb
|
||||
:trans (new 'static 'vector :x 2229231.2 :y -1019912.2 :z -6788748.5 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.895 :w 0.446)
|
||||
:quat (new 'static 'quaternion :y 0.895 :w 0.446)
|
||||
:camera-trans (new 'static 'vector :x 2187840.0 :y -998915.7 :z -6759328.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.5786 0.0 -0.8155 0.0992 0.9925 -0.0704 0.8094 -0.1217 -0.5743)
|
||||
:load-commands '((alive "exit-chamber-1"))
|
||||
@@ -784,7 +784,7 @@
|
||||
:name "sunkenb-helix"
|
||||
:level 'sunkenb
|
||||
:trans (new 'static 'vector :x 2466572.8 :y -1838989.2 :z -7299582.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.8841 :w 0.4672)
|
||||
:quat (new 'static 'quaternion :y -0.8841 :w 0.4672)
|
||||
:camera-trans (new 'static 'vector :x 2515616.2 :y -1817888.4 :z -7284843.5 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.2889 0.0 0.9573 -0.1163 0.9925 -0.0351 -0.9502 -0.1214 -0.2867)
|
||||
:load-commands '()
|
||||
@@ -828,7 +828,7 @@
|
||||
:name "swamp-start"
|
||||
:level 'swamp
|
||||
:trans (new 'static 'vector :x 1842537.2 :y 21027.227 :z -7333297.5 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.9933 :w 0.1153)
|
||||
:quat (new 'static 'quaternion :y -0.9933 :w 0.1153)
|
||||
:camera-trans (new 'static 'vector :x 1862529.9 :y 44371.56 :z -7277995.5 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.9403 0.0 0.3402 -0.0814 0.9708 -0.2252 -0.3303 -0.2394 -0.9129)
|
||||
:load-commands
|
||||
@@ -849,7 +849,7 @@
|
||||
:name "swamp-dock1"
|
||||
:level 'swamp
|
||||
:trans (new 'static 'vector :x 1360386.9 :y 5823.693 :z -8218890.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.585 :w -0.811)
|
||||
:quat (new 'static 'quaternion :y -0.585 :w -0.811)
|
||||
:camera-trans (new 'static 'vector :x 1314475.6 :y 26164.838 :z -8234152.5 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.3154 0.0 -0.9489 0.1134 0.9928 0.0376 0.9421 -0.1195 0.3131)
|
||||
:load-commands
|
||||
@@ -870,7 +870,7 @@
|
||||
:name "swamp-cave1"
|
||||
:level 'swamp
|
||||
:trans (new 'static 'vector :x 1553700.5 :y 1835.4176 :z -8258429.5 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.9871 :w -0.1599)
|
||||
:quat (new 'static 'quaternion :y -0.9871 :w -0.1599)
|
||||
:camera-trans (new 'static 'vector :x 1556873.2 :y 22715.598 :z -8208106.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.9982 0.0 0.0596 -0.0072 0.9926 -0.1209 -0.0592 -0.1211 -0.9908)
|
||||
:load-commands
|
||||
@@ -891,7 +891,7 @@
|
||||
:name "swamp-dock2"
|
||||
:level 'swamp
|
||||
:trans (new 'static 'vector :x 1645872.4 :y 36495.77 :z -8427323.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.8294 :w -0.5586)
|
||||
:quat (new 'static 'quaternion :y -0.8294 :w -0.5586)
|
||||
:camera-trans (new 'static 'vector :x 1599338.9 :y 57590.168 :z -8405954.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.418 0.0 -0.9084 0.1106 0.9925 -0.0509 0.9016 -0.1218 -0.4149)
|
||||
:load-commands
|
||||
@@ -912,7 +912,7 @@
|
||||
:name "swamp-cave2"
|
||||
:level 'swamp
|
||||
:trans (new 'static 'vector :x 2037539.2 :y 1103.872 :z -8560013.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.0559 :w 0.9984)
|
||||
:quat (new 'static 'quaternion :y 0.0559 :w 0.9984)
|
||||
:camera-trans (new 'static 'vector :x 1995208.2 :y 21832.908 :z -8586304.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.5516 0.0 -0.834 0.097 0.9932 0.0641 0.8283 -0.1163 0.5479)
|
||||
:load-commands
|
||||
@@ -933,7 +933,7 @@
|
||||
:name "swamp-game"
|
||||
:level 'swamp
|
||||
:trans (new 'static 'vector :x 2612289.2 :y -2047.5905 :z -8315907.5 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.6975 :w 0.7165)
|
||||
:quat (new 'static 'quaternion :y -0.6975 :w 0.7165)
|
||||
:camera-trans (new 'static 'vector :x 2661940.5 :y 20693.81 :z -8317980.5 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.0406 0.0 0.9991 -0.1452 0.9893 0.0059 -0.9885 -0.1453 0.0402)
|
||||
:load-commands
|
||||
@@ -954,7 +954,7 @@
|
||||
:name "swamp-cave3"
|
||||
:level 'swamp
|
||||
:trans (new 'static 'vector :x 2011811.4 :y 3711.7952 :z -7923027.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.5269 :w 0.8499)
|
||||
:quat (new 'static 'quaternion :y -0.5269 :w 0.8499)
|
||||
:camera-trans (new 'static 'vector :x 2053120.4 :y 22242.51 :z -7927784.5 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.1145 0.0 0.9934 -0.1412 0.9898 0.0162 -0.9833 -0.1422 0.1134)
|
||||
:load-commands
|
||||
@@ -1005,7 +1005,7 @@
|
||||
:name "rolling-start"
|
||||
:level 'rolling
|
||||
:trans (new 'static 'vector :x 432272.6 :y 42821.633 :z -6737529.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.545 :w 0.8383)
|
||||
:quat (new 'static 'quaternion :y -0.545 :w 0.8383)
|
||||
:camera-trans (new 'static 'vector :x 494105.8 :y 67237.48 :z -6748524.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.1759 0.0 0.9843 -0.2371 0.9705 0.0423 -0.9553 -0.2409 0.1707)
|
||||
:load-commands '()
|
||||
@@ -1050,7 +1050,7 @@
|
||||
:name "ogre-start"
|
||||
:level 'ogre
|
||||
:trans (new 'static 'vector :x 849775.8 :y 163962.88 :z -7301166.5 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.9931 :w 0.1166)
|
||||
:quat (new 'static 'quaternion :y -0.9931 :w 0.1166)
|
||||
:camera-trans (new 'static 'vector :x 848906.25 :y 185056.88 :z -7249962.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.9998 0.0 -0.0159 0.0019 0.9925 -0.1215 0.0158 -0.1215 -0.9924)
|
||||
:load-commands '()
|
||||
@@ -1064,7 +1064,7 @@
|
||||
:name "ogre-race"
|
||||
:level 'ogre
|
||||
:trans (new 'static 'vector :x 841424.9 :y 163801.1 :z -8205419.5 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.9857 :w 0.168)
|
||||
:quat (new 'static 'quaternion :y -0.9857 :w 0.168)
|
||||
:camera-trans (new 'static 'vector :x 860479.9 :y 183815.38 :z -8162368.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.9145 0.0 0.4045 -0.0497 0.9924 -0.1125 -0.4015 -0.123 -0.9075)
|
||||
:load-commands '()
|
||||
@@ -1078,7 +1078,7 @@
|
||||
:name "ogre-end"
|
||||
:level 'ogre
|
||||
:trans (new 'static 'vector :x 3971233.5 :y 141227.62 :z -13935735.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.8721 :w 0.4892)
|
||||
:quat (new 'static 'quaternion :y -0.8721 :w 0.4892)
|
||||
:camera-trans (new 'static 'vector :x 3997892.2 :y 159604.73 :z -13904449.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.7611 0.0 0.6485 -0.0932 0.9896 -0.1094 -0.6417 -0.1438 -0.7532)
|
||||
:load-commands '()
|
||||
@@ -1122,7 +1122,7 @@
|
||||
:name "village3-start"
|
||||
:level 'village3
|
||||
:trans (new 'static 'vector :x 4468021.5 :y 186608.03 :z -14054268.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.9999 :w 0.005)
|
||||
:quat (new 'static 'quaternion :y 0.9999 :w 0.005)
|
||||
:camera-trans (new 'static 'vector :x 4469439.5 :y 207701.2 :z -14003077.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.9996 0.0 0.0268 -0.0032 0.9925 -0.1216 -0.0266 -0.1216 -0.9922)
|
||||
:load-commands '()
|
||||
@@ -1137,7 +1137,7 @@
|
||||
:level 'village3
|
||||
:flags #x4
|
||||
:trans (new 'static 'vector :x 4549776.0 :y 215375.88 :z -14285922.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.681 :w 0.7322)
|
||||
:quat (new 'static 'quaternion :y 0.681 :w 0.7322)
|
||||
:camera-trans (new 'static 'vector :x 4543255.0 :y 226776.67 :z -14313317.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.8563 0.0 -0.2763 0.0456 0.8875 0.1413 0.2725 -0.1485 0.8446)
|
||||
:load-commands '()
|
||||
@@ -1151,7 +1151,7 @@
|
||||
:name "village3-farside"
|
||||
:level 'village3
|
||||
:trans (new 'static 'vector :x 4423744.0 :y 198723.58 :z -14530641.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.6611 :w 0.7502)
|
||||
:quat (new 'static 'quaternion :y 0.6611 :w 0.7502)
|
||||
:camera-trans (new 'static 'vector :x 4381844.0 :y 218599.83 :z -14551361.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.442 0.0 -0.8969 0.1099 0.9924 0.0541 0.8902 -0.1225 0.4387)
|
||||
:load-commands '()
|
||||
@@ -1197,7 +1197,7 @@
|
||||
:name "snow-start"
|
||||
:level 'snow
|
||||
:trans (new 'static 'vector :x 4256260.0 :y 983713.8 :z -14182752.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.7906 :w -0.6122)
|
||||
:quat (new 'static 'quaternion :y 0.7906 :w -0.6122)
|
||||
:camera-trans (new 'static 'vector :x 4303859.5 :y 1012363.7 :z -14156672.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.4804 0.0 0.877 -0.2049 0.9723 -0.1122 -0.8527 -0.2336 -0.4671)
|
||||
:load-commands '()
|
||||
@@ -1211,7 +1211,7 @@
|
||||
:name "snow-fort"
|
||||
:level 'snow
|
||||
:trans (new 'static 'vector :x 3430875.2 :y 897149.3 :z -13397581.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.0968 :w 0.9952)
|
||||
:quat (new 'static 'quaternion :y 0.0968 :w 0.9952)
|
||||
:camera-trans (new 'static 'vector :x 3428789.8 :y 918241.25 :z -13448724.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.9991 0.0 -0.0419 0.0051 0.9925 0.1216 0.0415 -0.1217 0.9916)
|
||||
:load-commands '()
|
||||
@@ -1225,7 +1225,7 @@
|
||||
:name "snow-flut-flut"
|
||||
:level 'snow
|
||||
:trans (new 'static 'vector :x 2481850.0 :y 1054709.4 :z -13922438.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.8628 :w -0.5055)
|
||||
:quat (new 'static 'quaternion :y 0.8628 :w -0.5055)
|
||||
:camera-trans (new 'static 'vector :x 2497063.0 :y 1069339.9 :z -13900353.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.8224 0.0 0.5688 -0.135 0.9713 -0.1953 -0.5525 -0.2374 -0.7989)
|
||||
:load-commands '()
|
||||
@@ -1239,7 +1239,7 @@
|
||||
:name "snow-pass-to-fort"
|
||||
:level 'snow
|
||||
:trans (new 'static 'vector :x 3751044.8 :y 917612.1 :z -13828696.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.3387 :w -0.9408)
|
||||
:quat (new 'static 'quaternion :y -0.3387 :w -0.9408)
|
||||
:camera-trans (new 'static 'vector :x 3779776.0 :y 933972.8 :z -13845825.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.6061 0.0 0.7953 -0.1493 0.9822 0.1138 -0.7812 -0.1878 0.5953)
|
||||
:load-commands '()
|
||||
@@ -1253,7 +1253,7 @@
|
||||
:name "snow-by-ice-lake"
|
||||
:level 'snow
|
||||
:trans (new 'static 'vector :x 3151164.5 :y 1049638.1 :z -14246464.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.6226 :w 0.7824)
|
||||
:quat (new 'static 'quaternion :y -0.6226 :w 0.7824)
|
||||
:camera-trans (new 'static 'vector :x 3203905.2 :y 1080037.8 :z -14270850.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.4189 0.0 0.9079 -0.2169 0.971 0.1001 -0.8816 -0.2389 0.4068)
|
||||
:load-commands '()
|
||||
@@ -1267,7 +1267,7 @@
|
||||
:name "snow-by-ice-lake-alt"
|
||||
:level 'snow
|
||||
:trans (new 'static 'vector :x 3053335.0 :y 1048927.9 :z -14058945.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.9997 :w 0.022)
|
||||
:quat (new 'static 'quaternion :y 0.9997 :w 0.022)
|
||||
:camera-trans (new 'static 'vector :x 3045845.5 :y 1068868.0 :z -14012568.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.987 0.0 -0.1601 0.0195 0.9924 -0.1207 0.1589 -0.1223 -0.9796)
|
||||
:load-commands '()
|
||||
@@ -1281,7 +1281,7 @@
|
||||
:name "snow-outside-fort"
|
||||
:level 'snow
|
||||
:trans (new 'static 'vector :x 3431014.0 :y 901474.7 :z -13600187.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.0954 :w -0.9954)
|
||||
:quat (new 'static 'quaternion :y -0.0954 :w -0.9954)
|
||||
:camera-trans (new 'static 'vector :x 3429969.0 :y 922565.44 :z -13651353.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.9998 0.0 -0.0196 0.0023 0.9926 0.1213 0.0195 -0.1213 0.9924)
|
||||
:load-commands '()
|
||||
@@ -1295,7 +1295,7 @@
|
||||
:name "snow-outside-cave"
|
||||
:level 'snow
|
||||
:trans (new 'static 'vector :x 3200864.2 :y 907400.4 :z -13676660.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.5867 :w -0.8097)
|
||||
:quat (new 'static 'quaternion :y 0.5867 :w -0.8097)
|
||||
:camera-trans (new 'static 'vector :x 3247600.8 :y 928464.06 :z -13697606.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.4062 0.0 0.9137 -0.1107 0.9926 0.0492 -0.907 -0.1211 0.4032)
|
||||
:load-commands '()
|
||||
@@ -1309,7 +1309,7 @@
|
||||
:name "snow-across-from-flut"
|
||||
:level 'snow
|
||||
:trans (new 'static 'vector :x 2721898.5 :y 1049845.0 :z -13743428.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.7688 :w -0.6394)
|
||||
:quat (new 'static 'quaternion :y -0.7688 :w -0.6394)
|
||||
:camera-trans (new 'static 'vector :x 2712702.5 :y 1070288.5 :z -13791593.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.9554 0.0 -0.2951 0.0343 0.9932 0.1111 0.2931 -0.1163 0.9489)
|
||||
:load-commands '()
|
||||
@@ -1353,7 +1353,7 @@
|
||||
:name "maincave-start"
|
||||
:level 'maincave
|
||||
:trans (new 'static 'vector :x 4420967.0 :y 33006.387 :z -13154230.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.0174 :w -0.9998)
|
||||
:quat (new 'static 'quaternion :y 0.0174 :w -0.9998)
|
||||
:camera-trans (new 'static 'vector :x 4428164.5 :y 54074.164 :z -13204933.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.99 0.0 0.1405 -0.0169 0.9927 0.1192 -0.1395 -0.1204 0.9828)
|
||||
:load-commands '()
|
||||
@@ -1367,7 +1367,7 @@
|
||||
:name "maincave-to-darkcave"
|
||||
:level 'maincave
|
||||
:trans (new 'static 'vector :x 4172175.8 :y 154223.83 :z -12445165.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.2093 :w 0.9778)
|
||||
:quat (new 'static 'quaternion :y -0.2093 :w 0.9778)
|
||||
:camera-trans (new 'static 'vector :x 4193893.2 :y 175317.81 :z -12491520.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.9052 0.0 0.4248 -0.0514 0.9926 0.1096 -0.4217 -0.1211 0.8986)
|
||||
:load-commands '()
|
||||
@@ -1381,7 +1381,7 @@
|
||||
:name "maincave-to-robocave"
|
||||
:level 'maincave
|
||||
:trans (new 'static 'vector :x 4760896.5 :y 44221.234 :z -12409880.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.548 :w 0.8364)
|
||||
:quat (new 'static 'quaternion :y 0.548 :w 0.8364)
|
||||
:camera-trans (new 'static 'vector :x 4745230.0 :y 57869.926 :z -12426885.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.7343 0.0 -0.6788 0.1872 0.9611 0.2026 0.6524 -0.2759 0.7058)
|
||||
:load-commands '()
|
||||
@@ -1425,7 +1425,7 @@
|
||||
:name "darkcave-start"
|
||||
:level 'darkcave
|
||||
:trans (new 'static 'vector :x 3813246.2 :y 129487.664 :z -12114304.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.1439 :w 0.9895)
|
||||
:quat (new 'static 'quaternion :y 0.1439 :w 0.9895)
|
||||
:camera-trans (new 'static 'vector :x 3793301.0 :y 145573.48 :z -12139847.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.7892 0.0 -0.614 0.1178 0.9813 0.1515 0.6026 -0.1919 0.7745)
|
||||
:load-commands '()
|
||||
@@ -1468,7 +1468,7 @@
|
||||
:name "robocave-start"
|
||||
:level 'robocave
|
||||
:trans (new 'static 'vector :x 5208223.5 :y 69697.945 :z -11781496.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.3654 :w -0.9308)
|
||||
:quat (new 'static 'quaternion :y -0.3654 :w -0.9308)
|
||||
:camera-trans (new 'static 'vector :x 5171715.0 :y 90796.85 :z -11817413.0 :w 1.0)
|
||||
:camera-rot
|
||||
(new 'static 'array float 9 0.7006 0.0 -0.7134 0.0864 0.9926 0.0849 0.7082 -0.1212 0.6954)
|
||||
@@ -1483,7 +1483,7 @@
|
||||
:name "robocave-bottom"
|
||||
:level 'robocave
|
||||
:trans (new 'static 'vector :x 5435461.5 :y -97111.24 :z -11588379.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.1086 :w 0.994)
|
||||
:quat (new 'static 'quaternion :y 0.1086 :w 0.994)
|
||||
:camera-trans (new 'static 'vector :x 5409966.5 :y -76017.664 :z -11632764.0 :w 1.0)
|
||||
:camera-rot
|
||||
(new 'static 'array float 9 0.8662 0.0 -0.4996 0.0605 0.9926 0.105 0.4959 -0.1212 0.8598)
|
||||
@@ -1528,7 +1528,7 @@
|
||||
:name "lavatube-start"
|
||||
:level 'lavatube
|
||||
:trans (new 'static 'vector :x 5511317.0 :y 159871.8 :z -14621239.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.3753 :w -0.9268)
|
||||
:quat (new 'static 'quaternion :y -0.3753 :w -0.9268)
|
||||
:camera-trans (new 'static 'vector :x 5510636.5 :y 197720.06 :z -14663128.0 :w 1.0)
|
||||
:camera-rot
|
||||
(new 'static 'array float 9 0.9992 0.0 -0.0386 0.0178 0.8875 0.4603 0.0343 -0.4606 0.8868)
|
||||
@@ -1543,7 +1543,7 @@
|
||||
:name "lavatube-middle"
|
||||
:level 'lavatube
|
||||
:trans (new 'static 'vector :x 9081441.0 :y -3935.8464 :z -14056285.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.7002 :w -0.7139)
|
||||
:quat (new 'static 'quaternion :y -0.7002 :w -0.7139)
|
||||
:camera-trans (new 'static 'vector :x 9055362.0 :y 10606.592 :z -14050822.0 :w 1.0)
|
||||
:camera-rot
|
||||
(new 'static 'array float 9 -0.205 0.0 -0.9787 0.2321 0.9714 -0.0486 0.9508 -0.2371 -0.1991)
|
||||
@@ -1558,7 +1558,7 @@
|
||||
:name "lavatube-after-ribbon"
|
||||
:level 'lavatube
|
||||
:trans (new 'static 'vector :x 9954895.0 :y 390513.06 :z -16548614.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.7485 :w -0.663)
|
||||
:quat (new 'static 'quaternion :y -0.7485 :w -0.663)
|
||||
:camera-trans (new 'static 'vector :x 9923721.0 :y 406466.16 :z -16541633.0 :w 1.0)
|
||||
:camera-rot
|
||||
(new 'static 'array float 9 -0.2191 0.0 -0.9756 0.1906 0.9807 -0.0428 0.9568 -0.1953 -0.2149)
|
||||
@@ -1573,7 +1573,7 @@
|
||||
:name "lavatube-end"
|
||||
:level 'lavatube
|
||||
:trans (new 'static 'vector :x 11479892.0 :y -163656.5 :z -18266490.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.9589 :w -0.2836)
|
||||
:quat (new 'static 'quaternion :y -0.9589 :w -0.2836)
|
||||
:camera-trans (new 'static 'vector :x 11526721.0 :y -143482.47 :z -18257412.0 :w 1.0)
|
||||
:camera-rot
|
||||
(new 'static 'array float 9 -0.3027 0.0 0.953 -0.1235 0.9915 -0.0392 -0.945 -0.1296 -0.3001)
|
||||
@@ -1618,7 +1618,7 @@
|
||||
:name "citadel-start"
|
||||
:level 'citadel
|
||||
:trans (new 'static 'vector :x 11442706.0 :y -142755.84 :z -18869044.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.9992 :w 0.0392)
|
||||
:quat (new 'static 'quaternion :y 0.9992 :w 0.0392)
|
||||
:camera-trans (new 'static 'vector :x 11441183.0 :y -122509.31 :z -18820882.0 :w 1.0)
|
||||
:camera-rot
|
||||
(new 'static 'array float 9 -0.9991 0.0 -0.0411 0.005 0.9925 -0.122 0.0408 -0.1221 -0.9916)
|
||||
@@ -1633,7 +1633,7 @@
|
||||
:name "citadel-entrance"
|
||||
:level 'citadel
|
||||
:trans (new 'static 'vector :x 11443969.0 :y -154216.03 :z -18472782.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.9728 :w 0.2314)
|
||||
:quat (new 'static 'quaternion :y -0.9728 :w 0.2314)
|
||||
:camera-trans (new 'static 'vector :x 11436929.0 :y -134244.36 :z -18426254.0 :w 1.0)
|
||||
:camera-rot
|
||||
(new 'static 'array float 9 -0.9898 0.0 -0.1424 0.0173 0.9925 -0.1207 0.1413 -0.1219 -0.9824)
|
||||
@@ -1649,7 +1649,7 @@
|
||||
:level 'citadel
|
||||
:flags #x4
|
||||
:trans (new 'static 'vector :x 11454895.0 :y -161791.6 :z -18204690.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.7511 :w 0.6601)
|
||||
:quat (new 'static 'quaternion :y 0.7511 :w 0.6601)
|
||||
:camera-trans (new 'static 'vector :x 11406872.0 :y -141278.0 :z -18194638.0 :w 1.0)
|
||||
:camera-rot
|
||||
(new 'static 'array float 9 -0.1989 0.0 -0.98 0.1179 0.9927 -0.0239 0.9728 -0.1203 -0.1974)
|
||||
@@ -1664,7 +1664,7 @@
|
||||
:name "citadel-launch-start"
|
||||
:level 'citadel
|
||||
:trans (new 'static 'vector :x 10827551.0 :y -94047.02 :z -18946718.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.8377 :w -0.546)
|
||||
:quat (new 'static 'quaternion :y 0.8377 :w -0.546)
|
||||
:camera-trans (new 'static 'vector :x 10862150.0 :y -75343.875 :z -18922316.0 :w 1.0)
|
||||
:camera-rot
|
||||
(new 'static 'array float 9 -0.5766 0.0 0.8169 -0.1125 0.9904 -0.0794 -0.8091 -0.1378 -0.5711)
|
||||
@@ -1679,7 +1679,7 @@
|
||||
:name "citadel-launch-end"
|
||||
:level 'citadel
|
||||
:trans (new 'static 'vector :x 11047507.0 :y -81514.086 :z -19495960.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.0292 :w 0.9995)
|
||||
:quat (new 'static 'quaternion :y 0.0292 :w 0.9995)
|
||||
:camera-trans (new 'static 'vector :x 11033498.0 :y -63027.2 :z -19534916.0 :w 1.0)
|
||||
:camera-rot
|
||||
(new 'static 'array float 9 0.9413 0.0 -0.3373 0.0481 0.9897 0.1343 0.3339 -0.1427 0.9317)
|
||||
@@ -1694,7 +1694,7 @@
|
||||
:name "citadel-plat-start"
|
||||
:level 'citadel
|
||||
:trans (new 'static 'vector :x 11443470.0 :y -120194.664 :z -19845628.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.9907 :w -0.1355)
|
||||
:quat (new 'static 'quaternion :y -0.9907 :w -0.1355)
|
||||
:camera-trans (new 'static 'vector :x 11443545.0 :y -99100.266 :z -19794374.0 :w 1.0)
|
||||
:camera-rot
|
||||
(new 'static 'array float 9 -0.9999 0.0 0.0016 -0.0001 0.9926 -0.1207 -0.0015 -0.1207 -0.9926)
|
||||
@@ -1709,7 +1709,7 @@
|
||||
:name "citadel-plat-end"
|
||||
:level 'citadel
|
||||
:trans (new 'static 'vector :x 11269726.0 :y -12132.352 :z -19614712.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.0419 :w 0.9991)
|
||||
:quat (new 'static 'quaternion :y -0.0419 :w 0.9991)
|
||||
:camera-trans (new 'static 'vector :x 11264449.0 :y 7920.8447 :z -19661710.0 :w 1.0)
|
||||
:camera-rot
|
||||
(new 'static 'array float 9 0.9938 0.0 -0.1103 0.0134 0.9924 0.1215 0.1095 -0.1223 0.9864)
|
||||
@@ -1724,7 +1724,7 @@
|
||||
:name "citadel-generator-start"
|
||||
:level 'citadel
|
||||
:trans (new 'static 'vector :x 12138031.0 :y -36900.863 :z -18933304.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.7487 :w 0.6628)
|
||||
:quat (new 'static 'quaternion :y 0.7487 :w 0.6628)
|
||||
:camera-trans (new 'static 'vector :x 12101831.0 :y -19811.123 :z -18933632.0 :w 1.0)
|
||||
:camera-rot
|
||||
(new 'static 'array float 9 0.0093 0.0 -0.9999 0.1678 0.9858 0.0015 0.9857 -0.1678 0.0092)
|
||||
@@ -1739,7 +1739,7 @@
|
||||
:name "citadel-generator-end"
|
||||
:level 'citadel
|
||||
:trans (new 'static 'vector :x 11837483.0 :y -20177.715 :z -19506848.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.3564 :w 0.9342)
|
||||
:quat (new 'static 'quaternion :y -0.3564 :w 0.9342)
|
||||
:camera-trans (new 'static 'vector :x 11872697.0 :y 887.6032 :z -19544198.0 :w 1.0)
|
||||
:camera-rot
|
||||
(new 'static 'array float 9 0.7296 0.0 0.6838 -0.0851 0.9922 0.0908 -0.6785 -0.1245 0.7239)
|
||||
@@ -1754,7 +1754,7 @@
|
||||
:name "citadel-elevator"
|
||||
:level 'citadel
|
||||
:trans (new 'static 'vector :x 11447961.0 :y 234055.27 :z -19169000.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.2351 :w 0.9719)
|
||||
:quat (new 'static 'quaternion :y 0.2351 :w 0.9719)
|
||||
:camera-trans (new 'static 'vector :x 11454465.0 :y 252947.66 :z -19126656.0 :w 1.0)
|
||||
:camera-rot
|
||||
(new 'static 'array float 9 -0.9932 0.0 0.1161 -0.017 0.9892 -0.1454 -0.1148 -0.1464 -0.9825)
|
||||
@@ -1800,7 +1800,7 @@
|
||||
:name "finalboss-start"
|
||||
:level 'finalboss
|
||||
:trans (new 'static 'vector :x 11548456.0 :y 2215872.0 :z -19409498.0 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.7325 :w 0.6807)
|
||||
:quat (new 'static 'quaternion :y 0.7325 :w 0.6807)
|
||||
:camera-trans (new 'static 'vector :x 11513311.0 :y 2234999.5 :z -19435708.0 :w 1.0)
|
||||
:camera-rot
|
||||
(new 'static 'array float 9 0.5883 0.0 -0.8085 0.1074 0.9911 0.0781 0.8014 -0.1328 0.5831)
|
||||
@@ -1817,7 +1817,7 @@
|
||||
:trans
|
||||
(new 'static 'vector :x 12288335.0 :y 1970461.9 :z -19848522.0 :w 1.0)
|
||||
:quat
|
||||
(new 'static 'vector :y -0.5359 :w -0.8442)
|
||||
(new 'static 'quaternion :y -0.5359 :w -0.8442)
|
||||
:camera-trans
|
||||
(new 'static 'vector :x 12265366.0 :y 1984228.5 :z -19842574.0 :w 1.0)
|
||||
:camera-rot
|
||||
@@ -1892,7 +1892,7 @@
|
||||
:level 'demo
|
||||
:flags #x8
|
||||
:trans (new 'static 'vector :x 66396.16 :y 29782.016 :z -919973.5 :w 1.0)
|
||||
:quat (new 'static 'vector :w 1.0)
|
||||
:quat (new 'static 'quaternion :w 1.0)
|
||||
:camera-trans (new 'static 'vector :x 76871.68 :y 55061.707 :z -938752.0 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.8743 0.0 0.4852 -0.2117 0.8997 0.3816 -0.4365 -0.4364 0.7866)
|
||||
:load-commands '()
|
||||
@@ -1936,7 +1936,7 @@
|
||||
:level 'title
|
||||
:flags #x80
|
||||
:trans (new 'static 'vector :x -635598.9 :y 222551.66 :z 710496.25 :w 1.0)
|
||||
:quat (new 'static 'vector :y -0.3323 :w -0.9431)
|
||||
:quat (new 'static 'quaternion :y -0.3323 :w -0.9431)
|
||||
:camera-trans (new 'static 'vector :x -665644.25 :y 250803.0 :z 668470.9 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 0.8129 0.0 -0.5823 0.0958 0.9863 0.1337 0.5744 -0.1645 0.8018)
|
||||
:load-commands '()
|
||||
@@ -1979,7 +1979,7 @@
|
||||
:name "halfpipe"
|
||||
:level 'halfpipe
|
||||
:trans (new 'static 'vector :x -1048.9856 :y -172047.97 :z -212555.78 :w 1.0)
|
||||
:quat (new 'static 'vector :y 0.061 :w 0.9981)
|
||||
:quat (new 'static 'quaternion :y 0.061 :w 0.9981)
|
||||
:camera-trans (new 'static 'vector :x -9941.401 :y -150049.17 :z -159587.94 :w 1.0)
|
||||
:camera-rot (new 'static 'array float 9 -0.979 0.0 -0.2037 0.0545 0.9634 -0.2622 0.1963 -0.2678 -0.9432)
|
||||
:load-commands '()
|
||||
|
||||
@@ -738,7 +738,7 @@
|
||||
(case (-> obj status)
|
||||
(('active 'alive)
|
||||
(format 0 "----------- kill ~A (status ~A)~%" obj (-> obj status))
|
||||
(dummy-14 *game-info*)
|
||||
(copy-perms-from-level! *game-info* obj)
|
||||
(send-event *camera* 'level-deactivate (-> obj name))
|
||||
(send-event *target* 'level-deactivate (-> obj name))
|
||||
(remove-by-param1 *background-draw-engine* (-> obj bsp))
|
||||
@@ -1191,7 +1191,7 @@
|
||||
(set! (-> *load-state* want 1 display?) #f)
|
||||
(set! (-> *load-state* want 1 force-inside?) #f)
|
||||
(if (-> gp-1 info continues)
|
||||
(dummy-19 *game-info* (the-as continue-point (car (-> gp-1 info continues))))
|
||||
(set-continue! *game-info* (the-as continue-point (car (-> gp-1 info continues))))
|
||||
)
|
||||
)
|
||||
(activate-levels! *level*)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
(get-bit (_type_ int) symbol 9)
|
||||
(clear-bit (_type_ int) int 10)
|
||||
(set-bit (_type_ int) int 11)
|
||||
(clear (_type_) _type_ 12)
|
||||
(clear-all! (_type_) _type_ 12)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
0
|
||||
)
|
||||
|
||||
(defmethod clear bit-array ((obj bit-array))
|
||||
(defmethod clear-all! bit-array ((obj bit-array))
|
||||
"Set all bits to zero."
|
||||
(countdown (idx (/ (logand -8 (+ (-> obj allocated-length) 7)) 8))
|
||||
(nop!)
|
||||
|
||||
@@ -49,109 +49,97 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for function draw-title-credits
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defun draw-title-credits ((arg0 float))
|
||||
(when (>= 1.0 arg0)
|
||||
(let* ((s4-0 11)
|
||||
(f30-0 (* arg0 (the float (+ s4-0 -2))))
|
||||
(s5-0 (the int f30-0))
|
||||
(gp-0
|
||||
(new
|
||||
'stack
|
||||
'font-context
|
||||
*font-default-matrix*
|
||||
0
|
||||
0
|
||||
0.0
|
||||
0
|
||||
(the-as uint 3)
|
||||
)
|
||||
)
|
||||
)
|
||||
(let ((f0-3 1.0))
|
||||
)
|
||||
(let ((v1-3 gp-0))
|
||||
(set! (-> v1-3 width) (the float 600))
|
||||
)
|
||||
(let ((v1-4 gp-0))
|
||||
(set! (-> v1-4 height) (the float 10))
|
||||
)
|
||||
(set! (-> gp-0 flags) (the-as uint 38))
|
||||
(let* ((s5-1 (- s5-0 (mod s5-0 3)))
|
||||
(f0-10 (- f30-0 (the float s5-1)))
|
||||
)
|
||||
(when (and (>= s5-1 0) (< s5-1 s4-0))
|
||||
(let ((f30-1 (cond
|
||||
((< f0-10 0.8)
|
||||
0.0
|
||||
)
|
||||
((< f0-10 1.6)
|
||||
(* 160.0 (+ -0.8 f0-10))
|
||||
)
|
||||
((< f0-10 2.2)
|
||||
128.0
|
||||
)
|
||||
(else
|
||||
(* 128.0 (- 1.0 (* 1.25 (+ -2.2 f0-10))))
|
||||
)
|
||||
)
|
||||
(let* ((s4-0 11)
|
||||
(f30-0 (* arg0 (the float (+ s4-0 -2))))
|
||||
(s5-0 (the int f30-0))
|
||||
(gp-0 (new 'stack 'font-context
|
||||
*font-default-matrix*
|
||||
0
|
||||
0
|
||||
0.0
|
||||
0
|
||||
(the-as uint 3)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 origin x) -44.0)
|
||||
(set! (-> gp-0 origin y) 90.0)
|
||||
(dotimes (s4-1 3)
|
||||
(let* ((s2-0 (+ (+ s4-1 3840) s5-1))
|
||||
(s3-0 (dummy-9 *common-text* (the-as uint s2-0) #t))
|
||||
)
|
||||
(when (= s2-0 3841)
|
||||
(let ((v1-18 (scf-get-territory)))
|
||||
(cond
|
||||
((= v1-18 1)
|
||||
(set! s3-0 (dummy-9 *common-text* (the-as uint 3857) #t))
|
||||
)
|
||||
((= v1-18 2)
|
||||
(set! s3-0 (dummy-9 *common-text* (the-as uint 3856) #t))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when s3-0
|
||||
(let ((v1-25 gp-0))
|
||||
(set! (-> v1-25 scale) (-> *title-credits-scale* (+ s5-1 s4-1)))
|
||||
)
|
||||
(print-game-text s3-0 gp-0 #f (the int f30-1) 22)
|
||||
)
|
||||
)
|
||||
(set!
|
||||
(-> gp-0 origin y)
|
||||
(+
|
||||
(-> gp-0 origin y)
|
||||
(the float (-> *title-credits-spacing* (+ s5-1 s4-1)))
|
||||
)
|
||||
)
|
||||
1.0
|
||||
(let ((v1-3 gp-0))
|
||||
(set! (-> v1-3 width) (the float 600))
|
||||
)
|
||||
(let ((v1-4 gp-0))
|
||||
(set! (-> v1-4 height) (the float 10))
|
||||
)
|
||||
(set! (-> gp-0 flags) (the-as uint 38))
|
||||
(let* ((s5-1 (- s5-0 (mod s5-0 3)))
|
||||
(f0-10 (- f30-0 (the float s5-1)))
|
||||
)
|
||||
(when (and (>= s5-1 0) (< s5-1 s4-0))
|
||||
(let ((f30-1 (cond
|
||||
((< f0-10 0.8)
|
||||
0.0
|
||||
)
|
||||
((< f0-10 1.6)
|
||||
(* 160.0 (+ -0.8 f0-10))
|
||||
)
|
||||
((< f0-10 2.2)
|
||||
128.0
|
||||
)
|
||||
(else
|
||||
(* 128.0 (- 1.0 (* 1.25 (+ -2.2 f0-10))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 origin x) -44.0)
|
||||
(set! (-> gp-0 origin y) 90.0)
|
||||
(dotimes (s4-1 3)
|
||||
(let* ((s2-0 (+ (+ s4-1 3840) s5-1))
|
||||
(s3-0 (lookup-text! *common-text* (the-as game-text-id s2-0) #t))
|
||||
)
|
||||
(when (= s2-0 3841)
|
||||
(let ((v1-18 (scf-get-territory)))
|
||||
(cond
|
||||
((= v1-18 1)
|
||||
(set! s3-0 (lookup-text! *common-text* (game-text-id europe) #t))
|
||||
)
|
||||
((= v1-18 2)
|
||||
(set! s3-0 (lookup-text! *common-text* (game-text-id inc) #t))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when s3-0
|
||||
(let ((v1-25 gp-0))
|
||||
(set! (-> v1-25 scale) (-> *title-credits-scale* (+ s5-1 s4-1)))
|
||||
)
|
||||
(print-game-text s3-0 gp-0 #f (the int f30-1) 22)
|
||||
)
|
||||
)
|
||||
(set! (-> gp-0 origin y)
|
||||
(+ (-> gp-0 origin y)
|
||||
(the float (-> *title-credits-spacing* (+ s5-1 s4-1)))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for function draw-end-credits
|
||||
(defun draw-end-credits ((arg0 int))
|
||||
(local-vars (v1-13 int))
|
||||
(let
|
||||
((s4-0
|
||||
(+ (- arg0) (the int (* 1.5 (the float (-> *video-parms* screen-sy)))))
|
||||
)
|
||||
(let ((s4-0 (+ (- arg0) (the int (* 1.5 (the float (-> *video-parms* screen-sy))))))
|
||||
(gp-0 2815)
|
||||
(s3-0 0)
|
||||
(s2-0 #t)
|
||||
(s5-0
|
||||
(new 'stack 'font-context *font-default-matrix* 31 0 0.0 0 (the-as uint 3))
|
||||
)
|
||||
(s5-0 (new 'stack 'font-context *font-default-matrix* 31 0 0.0 0 (the-as uint 3)))
|
||||
)
|
||||
(let ((v1-2 s5-0))
|
||||
(set! (-> v1-2 width) (the float 450))
|
||||
@@ -163,11 +151,10 @@
|
||||
(set! (-> v1-4 scale) 1.0)
|
||||
)
|
||||
(set! (-> s5-0 flags) (the-as uint 39))
|
||||
(while
|
||||
(or s2-0 (and (< s4-0 (- s3-0)) (< (the-as uint gp-0) (the-as uint 3249))))
|
||||
(while (or s2-0 (and (< s4-0 (- s3-0)) (< (the-as uint gp-0) (the-as uint 3249))))
|
||||
(+! s4-0 s3-0)
|
||||
(+! gp-0 1)
|
||||
(let ((a0-8 (dummy-9 *common-text* (the-as uint gp-0) #t)))
|
||||
(let ((a0-8 (lookup-text! *common-text* (the-as game-text-id gp-0) #t)))
|
||||
(if a0-8
|
||||
(set! s3-0 (the int (+ 5.0 (print-game-text a0-8 s5-0 #t 128 20))))
|
||||
(set! s3-0 25)
|
||||
@@ -182,7 +169,7 @@
|
||||
(else
|
||||
(set! (-> s5-0 origin y) (the float s4-0))
|
||||
(while (< (-> s5-0 origin y) (the float (-> *video-parms* screen-sy)))
|
||||
(let ((a0-11 (dummy-9 *common-text* (the-as uint gp-0) #t)))
|
||||
(let ((a0-11 (lookup-text! *common-text* (the-as game-text-id gp-0) #t)))
|
||||
(if a0-11
|
||||
(set! v1-13 (the int (+ 5.0 (print-game-text a0-11 s5-0 #f 128 20))))
|
||||
(set! v1-13 25)
|
||||
@@ -197,6 +184,3 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
)
|
||||
|
||||
(deftype task-info-data (basic)
|
||||
((task-id uint8 :offset-assert 4)
|
||||
(task-name symbol 4 :offset-assert 8)
|
||||
(text-index-when-resolved int32 :offset-assert 24)
|
||||
((task-id game-task :offset-assert 4)
|
||||
(task-name game-text-id 4 :offset-assert 8)
|
||||
(text-index-when-resolved int32 :offset-assert 24)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x1c
|
||||
@@ -35,11 +35,11 @@
|
||||
)
|
||||
|
||||
(deftype level-tasks-info (basic)
|
||||
((level-name-id uint32 :offset-assert 4)
|
||||
(text-group-index int32 :offset-assert 8)
|
||||
(nb-of-tasks int32 :offset-assert 12)
|
||||
(buzzer-task-index int32 :offset-assert 16)
|
||||
(task-info task-info-data 8 :offset-assert 20)
|
||||
((level-name-id game-text-id :offset-assert 4)
|
||||
(text-group-index int32 :offset-assert 8)
|
||||
(nb-of-tasks int32 :offset-assert 12)
|
||||
(buzzer-task-index int32 :offset-assert 16)
|
||||
(task-info task-info-data 8 :offset-assert 20)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x34
|
||||
@@ -47,13 +47,13 @@
|
||||
)
|
||||
|
||||
(deftype game-option (basic)
|
||||
((option-type uint64 :offset-assert 8)
|
||||
(name uint32 :offset-assert 16)
|
||||
(scale basic :offset-assert 20)
|
||||
(param1 float :offset-assert 24)
|
||||
(param2 float :offset-assert 28)
|
||||
(param3 int32 :offset-assert 32)
|
||||
(value-to-modify uint32 :offset-assert 36)
|
||||
((option-type uint64 :offset-assert 8)
|
||||
(name game-text-id :offset-assert 16)
|
||||
(scale basic :offset-assert 20)
|
||||
(param1 float :offset-assert 24)
|
||||
(param2 float :offset-assert 28)
|
||||
(param3 int32 :offset-assert 32)
|
||||
(value-to-modify uint32 :offset-assert 36)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x28
|
||||
@@ -173,3 +173,7 @@
|
||||
|
||||
(defun-extern activate-progress process int int)
|
||||
|
||||
(define-extern *level-task-data* (array level-tasks-info))
|
||||
(define-extern *level-task-data-remap* (array int32))
|
||||
(define-extern get-game-count (function int count-info))
|
||||
(define-extern activate-orb-all (function int int)) ;; maybe in hud?
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,6 +9,190 @@
|
||||
;; Each game string is assigned an ID number.
|
||||
;; This ID is used to lookup the string for the currently selected language.
|
||||
|
||||
(defenum game-text-id
|
||||
:type uint32
|
||||
:bitfield #f
|
||||
(zero 0)
|
||||
(sfx-volume #x10a)
|
||||
(music-volume #x10b)
|
||||
(speech-volume #x10c)
|
||||
(language #x10d)
|
||||
(vibrations #x10e)
|
||||
(play-hints #x10f)
|
||||
(center-screen #x110)
|
||||
(english #x114)
|
||||
(french #x115)
|
||||
(german #x116)
|
||||
(spanish #x117)
|
||||
(italian #x118)
|
||||
(japanese #x119)
|
||||
(aspect-ratio #x125)
|
||||
(video-mode #x126)
|
||||
(game-options #x127)
|
||||
(graphic-options #x128)
|
||||
(sound-options #x129)
|
||||
|
||||
(hidden-power-cell #x12f) ;; why is this here??
|
||||
|
||||
(continue-without-saving #x13f)
|
||||
(back #x13e)
|
||||
(load-game #x14b)
|
||||
(save-game #x14c)
|
||||
(options #x150)
|
||||
(new-game #x15c)
|
||||
(ok #x15e)
|
||||
(exit-demo #x15f)
|
||||
(quit-game #x16f)
|
||||
|
||||
(village1-mayor-money #x200)
|
||||
(vollage1-uncle-money #x201)
|
||||
(village1-yakow-herd #x202)
|
||||
(village1-yakow-return #x203)
|
||||
(village1-oracle #x204)
|
||||
(beach-ecorocks #x205)
|
||||
(beach-flutflut-push #x206)
|
||||
(beach-flutflut-meet #x207)
|
||||
(beach-pelican #x208)
|
||||
(beach-seagull #x209)
|
||||
(beach-cannon #x20a)
|
||||
(beach-buzzer #x20b)
|
||||
(jungle-lurkerm-connect #x20c)
|
||||
(jungle-tower #x20d)
|
||||
(jungle-eggtop #x20e)
|
||||
(jungle-plant #x20f)
|
||||
(jungle-fishgame #x210)
|
||||
(misty-muse-catch #x211)
|
||||
(misty-muse-return #x212)
|
||||
(misty-boat #x213)
|
||||
(misty-cannon #x214)
|
||||
(misty-return-to-pool #x215) ;; task name??
|
||||
(misty-find-transpad #x216) ;; task name?
|
||||
(misty-balloon-lurkers #x217)
|
||||
|
||||
(village1-level-name #x220)
|
||||
(beach-level-name #x221)
|
||||
(jungle-level-name #x222)
|
||||
(misty-level-name #x223)
|
||||
|
||||
(beach-seagull-get #x22e)
|
||||
|
||||
(jungle-lurkerm-unblock #x22f)
|
||||
(jungle-lurkerm-return #x230)
|
||||
|
||||
(MISSING-orb-hint #x233)
|
||||
|
||||
(beach-gimmie #x262)
|
||||
(beach-sentinel #x263)
|
||||
(jungle-canyon-end #x264)
|
||||
(jungle-temple-door #x265)
|
||||
(misty-bike-jump #x266)
|
||||
(misty-eco-challenge #x267)
|
||||
|
||||
(village2-gambler-money #x300)
|
||||
(village2-geologist-money #x301)
|
||||
(village2-warrior-money #x302)
|
||||
(village2-oracle-money #x303)
|
||||
(swamp-tether #x304)
|
||||
|
||||
(swamp-flutflut #x307)
|
||||
|
||||
(swamp-billy #x309)
|
||||
|
||||
(sunken-elevator-raise #x30a)
|
||||
(sunken-elevator-get-to-roof #x30b)
|
||||
(sunken-pipe #x30c)
|
||||
(sunken-climb-tube #x30d) ;; task name?
|
||||
(sunken-pool #x30e) ;; task name?
|
||||
(sunken-platforms #x30f)
|
||||
|
||||
(rolling-moles #x310)
|
||||
(rolling-moles-return #x311)
|
||||
(rolling-robbers #x312)
|
||||
(rolling-race #x313)
|
||||
(rolling-race-return #x314)
|
||||
(rolling-lake #x315)
|
||||
(rolling-plants #x316)
|
||||
|
||||
(unknown-buzzers #x317)
|
||||
|
||||
(village2-level-name #x319)
|
||||
|
||||
(rolling-level-name #x31b)
|
||||
(swamp-level-name #x31c)
|
||||
(sunken-level-name #x31d)
|
||||
(ogre-level-name #x31e)
|
||||
|
||||
(swamp-battle #x321)
|
||||
(sunken-bottom #x322) ;; task name?
|
||||
(reach-center #x323) ;; task name?
|
||||
(rolling-ring-chase-1 #x324)
|
||||
(rolling-ring-chase-2 #x325)
|
||||
|
||||
(village3-miner-money #x400)
|
||||
(village3-oracle-money #x401)
|
||||
(snow-ram-3-left #x402)
|
||||
(snow-ram-2-left #x403)
|
||||
(snow-ram-1-left #x404)
|
||||
(snow-fort #x405)
|
||||
(snow-bunnies #x406)
|
||||
(snow-open-door #x408) ;; task name?
|
||||
|
||||
(cave-robot-climb #x40e)
|
||||
(cave-dark-climb #x40f) ;; destroy crystals
|
||||
|
||||
(cave-gnawers #x410)
|
||||
(cave-dark-crystals #x411)
|
||||
|
||||
(village3-buzzer #x413)
|
||||
|
||||
(village3-level-name #x415)
|
||||
|
||||
(snowy-level-name #x417)
|
||||
|
||||
(cave-level-name #x419)
|
||||
|
||||
(lavatube-level-name #x41b)
|
||||
|
||||
(snow-eggtop #x421)
|
||||
|
||||
(cave-spider-tunnel #x423)
|
||||
(cave-platforms #x424)
|
||||
|
||||
(cave-swing-poles #x426)
|
||||
|
||||
(snow-frozen-crate #x42b) ;; task name?
|
||||
(snow-bumpers #x42c)
|
||||
|
||||
(fire-canyon-end #x500)
|
||||
(fire-canyon-buzzer #x501)
|
||||
|
||||
(fire-canyon-level-name #x50c)
|
||||
|
||||
(ogre-end #x600)
|
||||
(ogre-buzzer #x601)
|
||||
(ogre-boss #x603)
|
||||
|
||||
(lavatube-end #x700)
|
||||
(lavatube-buzzer #x701)
|
||||
|
||||
(citadel-buzzer #x800)
|
||||
(citadel-level-name #x801)
|
||||
(citadel-sage-blue #x802)
|
||||
(citadel-sage-red #x803)
|
||||
(citadel-sage-yellow #x804)
|
||||
(citadel-sage-green #x805)
|
||||
|
||||
(training-gimmie-task-name #x91b)
|
||||
(training-buzzer-task-name #x91c)
|
||||
(training-door-task-name #x91d)
|
||||
(training-climb-task-name #x91e)
|
||||
(training-level-name #x91f)
|
||||
|
||||
(inc #xf10)
|
||||
(europe #xf11)
|
||||
)
|
||||
|
||||
|
||||
;; an individual string.
|
||||
(deftype game-text (structure)
|
||||
((id uint32 :offset-assert 0)
|
||||
@@ -31,8 +215,8 @@
|
||||
:size-assert #x10
|
||||
:flag-assert #xa00000010
|
||||
(:methods
|
||||
(dummy-9 (_type_ uint symbol) string 9)
|
||||
)
|
||||
(lookup-text! (_type_ game-text-id symbol) string 9)
|
||||
)
|
||||
)
|
||||
|
||||
;; todo, need support for array
|
||||
|
||||
@@ -44,6 +44,45 @@
|
||||
|
||||
;; todo method 8
|
||||
;; todo method 9
|
||||
|
||||
(defmethod lookup-text! game-text-info ((obj game-text-info) (arg0 game-text-id) (arg1 symbol))
|
||||
"Look up text by ID. Will return the string.
|
||||
If the ID can't be found, and arg1 is #t, it will return #f,
|
||||
otherwise the temp string UNKNOWN ID <id number>"
|
||||
|
||||
;; binary search for it
|
||||
(let* ((a1-1 0) ;; min
|
||||
(a3-0 (+ (-> obj length) 1)) ;; max
|
||||
(v1-2 (/ (+ a1-1 a3-0) 2)) ;; mid
|
||||
)
|
||||
(let ((t0-0 -1)) ;; last time's lookup
|
||||
(while (and (!= (-> obj data v1-2 id) arg0) (!= v1-2 t0-0)) ;; while we haven't found it/not the same as last time
|
||||
(if (< arg0 (-> obj data v1-2 id))
|
||||
(set! a3-0 v1-2) ;; bisect, right
|
||||
(set! a1-1 v1-2) ;; bisect, left
|
||||
)
|
||||
(set! t0-0 v1-2) ;; remeber last time
|
||||
(set! v1-2 (/ (+ a1-1 a3-0) 2)) ;; midpoint for next time
|
||||
)
|
||||
)
|
||||
(cond
|
||||
((!= (-> obj data v1-2 id) arg0) ;; didn't find it :(
|
||||
(cond
|
||||
(arg1
|
||||
(the-as string #f)
|
||||
)
|
||||
(else
|
||||
(format (clear *temp-string*) "UNKNOWN ID ~D" arg0)
|
||||
*temp-string*
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(-> obj data v1-2 text) ;; found it!
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;; todo text-is-loading
|
||||
;; todo load-game-text-info
|
||||
;; todo load-level-text-files
|
||||
@@ -53,4 +92,4 @@
|
||||
;; todo print-game-text
|
||||
;; todo disable-level-text-file-loading
|
||||
;; todo enable-level-text-file-loading
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user