;;-*-Lisp-*- (in-package goal) ;; definition for method 2 of type level-buffer-state (defmethod print ((this level-buffer-state)) (format #t "#" (-> this name) (-> this display?) (-> this force-vis?) (-> this force-inside?) this ) this ) ;; definition for method 9 of type load-state (defmethod reset! ((this load-state)) (dotimes (v1-0 6) (set! (-> this want v1-0 name) #f) (set! (-> this want v1-0 display?) #f) (set! (-> this want v1-0 force-vis?) #f) (set! (-> this want v1-0 force-inside?) #f) ) (dotimes (v1-3 3) (set! (-> this want-sound v1-3) #f) ) (set! (-> this command-list) '()) (dotimes (v1-7 256) (set! (-> this object-name v1-7) #f) (set! (-> this object-status v1-7) (the-as basic 0)) ) this ) ;; definition for method 11 of type load-state (defmethod want-levels ((this load-state) (arg0 (pointer symbol))) (dotimes (v1-0 6) (dotimes (a2-0 6) (when (= (-> this want v1-0 name) (-> arg0 a2-0)) (set! (-> arg0 a2-0) #f) (goto cfg-8) ) ) (set! (-> this want v1-0 name) #f) (label cfg-8) ) (dotimes (v1-3 6) (when (-> arg0 v1-3) (dotimes (a2-13 6) (when (not (-> this want a2-13 name)) (set! (-> this want a2-13 name) (-> arg0 v1-3)) (set! (-> this want a2-13 display?) #f) (set! (-> this want a2-13 force-vis?) #f) (set! (-> this want a2-13 force-inside?) #f) (goto cfg-19) ) ) ) (label cfg-19) ) (add-borrow-levels this) 0 ) ;; definition for method 12 of type load-state ;; WARN: Return type mismatch int vs none. (defmethod want-sound-banks ((this load-state) (arg0 (pointer symbol))) (dotimes (v1-0 3) (dotimes (a2-0 3) (when (= (-> this want-sound v1-0) (-> arg0 a2-0)) (set! (-> arg0 a2-0) #f) (goto cfg-8) ) ) (set! (-> this want-sound v1-0) #f) (label cfg-8) ) (dotimes (v1-3 3) (when (-> arg0 v1-3) (dotimes (a2-13 3) (when (not (-> this want-sound a2-13)) (set! (-> this want-sound a2-13) (-> arg0 v1-3)) (goto cfg-19) ) ) ) (label cfg-19) ) 0 (none) ) ;; definition for method 13 of type load-state (defmethod want-display-level ((this load-state) (arg0 symbol) (arg1 symbol)) (dotimes (v1-0 6) (when (= (-> this want v1-0 name) arg0) (set! (-> this want v1-0 display?) arg1) (add-borrow-levels this) (return 0) ) ) (if arg1 (format 0 "ERROR: can't display ~A because it isn't loaded~%" arg0) ) 0 ) ;; definition for method 14 of type load-state ;; WARN: Return type mismatch int vs none. (defmethod want-vis-level ((this load-state) (arg0 symbol)) (let ((v1-0 (lookup-level-info arg0))) (if v1-0 (set! arg0 (-> v1-0 name)) ) ) (set! (-> this vis-nick) arg0) 0 (none) ) ;; definition for method 15 of type load-state (defmethod want-force-vis ((this load-state) (arg0 symbol) (arg1 symbol)) (dotimes (v1-0 6) (when (= (-> this want v1-0 name) arg0) (set! (-> this want v1-0 force-vis?) arg1) (return 0) ) ) (format 0 "ERROR: can't force vis on ~A because it isn't loaded~%" arg0) 0 ) ;; definition for method 16 of type load-state ;; WARN: Return type mismatch int vs none. ;; WARN: Function (method 16 load-state) has a return type of none, but the expression builder found a return statement. (defmethod want-force-inside ((this load-state) (arg0 symbol) (arg1 symbol)) (dotimes (v1-0 6) (when (= (-> this want v1-0 name) arg0) (set! (-> this want v1-0 force-inside?) arg1) (return 0) ) ) (format 0 "ERROR: can't force inside on ~A because it isn't loaded~%" arg0) 0 (none) ) ;; definition for method 21 of type load-state ;; WARN: Return type mismatch int vs none. ;; ERROR: Failed load: (set! a0-11 (l.wu (+ a0-10 12))) at op 138 (defmethod add-borrow-levels ((this load-state)) (dotimes (s5-0 6) (let ((a0-1 (-> this want s5-0 name))) (when a0-1 (let ((a0-2 (lookup-level-info a0-1))) (when (= (-> a0-2 memory-mode) (load-buffer-mode borrow)) (set! (-> this want s5-0 name) #f) (set! (-> this want s5-0 display?) #f) (set! (-> this want s5-0 force-vis?) #f) (set! (-> this want s5-0 force-inside?) #f) ) ) ) ) ) (let ((s5-1 (new 'stack 'boxed-array symbol 24))) (set! (-> s5-1 length) 0) (dotimes (s4-0 6) (let ((a0-5 (-> this want s4-0 name))) (when a0-5 (let ((v1-22 (+ (* (-> s5-1 length) 4) (the-as int s5-1)))) (s.w! (+ v1-22 12) a0-5) ) (let ((v1-25 (-> this want s4-0 display?)) (a1-4 (+ (* (+ (-> s5-1 length) 1) 4) (the-as int s5-1))) ) (s.w! (+ a1-4 12) v1-25) ) (let ((v1-28 (-> this want s4-0 force-vis?)) (a1-8 (+ (* (+ (-> s5-1 length) 2) 4) (the-as int s5-1))) ) (s.w! (+ a1-8 12) v1-28) ) (let ((v1-31 (-> this want s4-0 force-inside?)) (a1-12 (+ (* (+ (-> s5-1 length) 3) 4) (the-as int s5-1))) ) (s.w! (+ a1-12 12) v1-31) ) (+! (-> s5-1 length) 4) (let ((v1-34 (lookup-level-info a0-5))) (countdown (a0-6 2) (when (and (-> v1-34 borrow-level a0-6) (< (-> s5-1 length) (-> s5-1 allocated-length))) (let ((a1-21 (-> v1-34 borrow-level a0-6)) (a2-4 (+ (* (-> s5-1 length) 4) (the-as int s5-1))) ) (s.w! (+ a2-4 12) a1-21) ) (let ((a1-25 (if (-> this want s4-0 display?) (-> v1-34 borrow-display? a0-6) ) ) (a2-8 (+ (* (+ (-> s5-1 length) 1) 4) (the-as int s5-1))) ) (s.w! (+ a2-8 12) a1-25) ) (let ((a1-31 (+ (* (+ (-> s5-1 length) 2) 4) (the-as int s5-1)))) (s.w! (+ a1-31 12) #f) ) (let ((a1-35 (+ (* (+ (-> s5-1 length) 3) 4) (the-as int s5-1)))) (s.w! (+ a1-35 12) #f) ) (+! (-> s5-1 length) 4) ) ) ) ) ) ) (dotimes (v1-39 6) (cond ((< (* v1-39 4) (-> s5-1 length)) (set! (-> this want v1-39 name) (the-as symbol (l.wu (+ (* (* v1-39 4) 4) (the-as int s5-1) 12)))) (set! (-> this want v1-39 display?) (the-as symbol (l.wu (+ (* (+ (* v1-39 4) 1) 4) (the-as int s5-1) 12)))) (set! (-> this want v1-39 force-vis?) (the-as symbol (l.wu (+ (* (+ (* v1-39 4) 2) 4) (the-as int s5-1) 12)))) (set! (-> this want v1-39 force-inside?) (the-as symbol (l.wu (+ (* (+ (* v1-39 4) 3) 4) (the-as int s5-1) 12))) ) ) (else (set! (-> this want v1-39 name) #f) (set! (-> this want v1-39 display?) #f) (set! (-> this want v1-39 force-vis?) #f) (set! (-> this want v1-39 force-inside?) #f) ) ) ) ) 0 (none) ) ;; definition for symbol *display-load-commands*, type symbol (define *display-load-commands* #f) ;; definition for method 18 of type load-state (defmethod backup-load-state-and-set-cmds ((this load-state) (arg0 pair)) (dotimes (s4-0 256) (when (-> this object-name s4-0) (format 0 "WARNING: load state somehow aquired object command ~A~%" (-> this object-name s4-0)) (set! (-> this object-name s4-0) #f) ) ) (mem-copy! (&-> *backup-load-state* type) (&-> this type) 2168) (set! (-> *backup-load-state* command-list) '()) (set! (-> this command-list) arg0) 0 ) ;; definition for method 19 of type load-state (defmethod restore-load-state-and-cleanup ((this load-state)) (with-pp (execute-commands-up-to this 100000.0) (dotimes (s5-0 256) (when (-> this object-name s5-0) (let ((a0-3 (entity-by-name (-> this object-name s5-0)))) (set! (-> a0-3 extra perm status) (the-as entity-perm-status (-> this object-status s5-0))) (if (-> a0-3 extra process) (kill! a0-3) ) ) (set! (-> this object-name s5-0) #f) ) ) (let ((s5-1 (new 'stack-no-clear 'inline-array 'level-buffer-state 6))) (dotimes (s4-0 6) ((method-of-type level-buffer-state new) (the-as symbol (-> s5-1 s4-0)) level-buffer-state) ) (dotimes (s4-1 6) (mem-copy! (the-as pointer (-> s5-1 s4-1)) (the-as pointer (-> *load-state* want s4-1)) 16) ) (mem-copy! (&-> this type) (&-> *backup-load-state* type) 2168) (when (!= (-> pp type) scene-player) (dotimes (gp-1 6) (mem-copy! (the-as pointer (-> *load-state* want gp-1)) (the-as pointer (-> s5-1 gp-1)) 16) ) ) ) (add-borrow-levels *load-state*) 0 ) ) ;; definition for method 20 of type load-state (defmethod restore-load-state ((this load-state)) (dotimes (v1-0 256) (if (-> this object-name v1-0) (set! (-> this object-name v1-0) #f) ) ) (mem-copy! (&-> this type) (&-> *backup-load-state* type) 2168) 0 ) ;; definition for method 17 of type load-state ;; WARN: Return type mismatch int vs none. ;; WARN: Function (method 17 load-state) has a return type of none, but the expression builder found a return statement. (defmethod execute-commands-up-to ((this load-state) (arg0 float)) (with-pp (let ((s4-0 (new 'stack 'script-context (process->ppointer pp) pp (the-as vector #f)))) (set! (-> s4-0 load-state) this) (while (not (null? (-> this command-list))) (let ((f0-0 (command-get-float (car (car (-> this command-list))) 0.0)) (s3-0 (cdr (car (-> this command-list)))) ) (if (< arg0 f0-0) (return #f) ) (if *display-load-commands* (format 0 "NOTICE: ~D: ~f: execute command ~A~%" (current-time) f0-0 s3-0) ) (cond ((pair? (car s3-0)) (let ((a1-4 (car s3-0))) (while (not (null? s3-0)) (eval! s4-0 (the-as pair a1-4)) (set! s3-0 (cdr s3-0)) (set! a1-4 (car s3-0)) ) ) ) (else (eval! s4-0 s3-0) ) ) ) (set! (-> this command-list) (cdr (-> this command-list))) ) ) 0 (none) ) ) ;; failed to figure out what this is: (kmemopen global "load-state") ;; definition for symbol *backup-load-state*, type load-state (define *backup-load-state* (new 'global 'load-state)) ;; definition (perm) for symbol *load-state*, type load-state (define-perm *load-state* load-state (new 'global 'load-state)) ;; failed to figure out what this is: (kmemclose)