2020-10-26 21:08:24 -04:00
|
|
|
;;-*-Lisp-*-
|
2020-09-04 14:44:23 -04:00
|
|
|
(in-package goal)
|
|
|
|
|
|
|
|
;; name: fact-h.gc
|
|
|
|
;; name in dgo: fact-h
|
|
|
|
;; dgos: GAME, ENGINE
|
|
|
|
|
2021-02-28 18:05:07 -05:00
|
|
|
;; NOT FINISHED
|
|
|
|
|
|
|
|
(deftype fact-bank (basic)
|
2021-05-12 21:45:36 -04:00
|
|
|
((eco-level-max float :offset-assert 4)
|
|
|
|
(eco-single-inc float :offset-assert 8)
|
|
|
|
(eco-full-inc float :offset-assert 12)
|
2021-02-28 18:05:07 -05:00
|
|
|
(eco-single-timeout uint64 :offset-assert 16) ; usec
|
|
|
|
(eco-full-timeout uint64 :offset-assert 24) ; usec
|
|
|
|
(dummy uint64 :offset-assert 32) ; usec
|
2021-05-12 21:45:36 -04:00
|
|
|
(health-max-default float :offset-assert 40)
|
|
|
|
(health-single-inc float :offset-assert 44)
|
|
|
|
(eco-pill-max-default float :offset-assert 48)
|
|
|
|
(health-small-inc float :offset-assert 52)
|
|
|
|
(buzzer-max-default float :offset-assert 56)
|
|
|
|
(buzzer-single-inc float :offset-assert 60)
|
|
|
|
(suck-bounce-dist float :offset-assert 64) ; meters
|
|
|
|
(suck-suck-dist float :offset-assert 68) ; meters
|
|
|
|
(default-pill-inc float :offset-assert 72)
|
2021-02-28 18:05:07 -05:00
|
|
|
)
|
|
|
|
:method-count-assert 9
|
|
|
|
:size-assert #x4c
|
|
|
|
:flag-assert #x90000004c
|
|
|
|
)
|
|
|
|
|
2021-05-12 21:45:36 -04:00
|
|
|
(define *FACT-bank* (new 'static 'fact-bank
|
|
|
|
:eco-level-max 2.0
|
|
|
|
:eco-single-inc 1.0
|
|
|
|
:eco-full-inc 5.0
|
|
|
|
:eco-single-timeout (seconds 5)
|
|
|
|
:eco-full-timeout (seconds 20)
|
|
|
|
:dummy (seconds 15)
|
|
|
|
:health-max-default 3.0
|
|
|
|
:health-single-inc 1.0
|
|
|
|
:eco-pill-max-default 50.0
|
|
|
|
:health-small-inc 1.0
|
|
|
|
:buzzer-max-default 7.0
|
|
|
|
:buzzer-single-inc 1.0
|
|
|
|
:suck-bounce-dist (meters 18)
|
|
|
|
:suck-suck-dist (meters 7.5)
|
|
|
|
)
|
2021-02-28 18:05:07 -05:00
|
|
|
)
|
|
|
|
|
2021-05-06 19:00:30 -04:00
|
|
|
(defenum pickup-type
|
|
|
|
(none)
|
|
|
|
(eco-yellow)
|
|
|
|
(eco-red)
|
|
|
|
(eco-blue)
|
|
|
|
(eco-green)
|
|
|
|
(money)
|
|
|
|
(fuel-cell)
|
|
|
|
(eco-pill)
|
|
|
|
(buzzer)
|
|
|
|
(eco-pill-random)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defun pickup-type->string ((arg0 pickup-type))
|
|
|
|
(case arg0
|
2021-05-25 16:36:36 -04:00
|
|
|
(((pickup-type eco-pill-random)) "eco-pill-random")
|
|
|
|
(((pickup-type buzzer)) "buzzer")
|
|
|
|
(((pickup-type eco-pill)) "eco-pill")
|
|
|
|
(((pickup-type fuel-cell)) "fuel-cell")
|
|
|
|
(((pickup-type money)) "money")
|
|
|
|
(((pickup-type eco-green)) "eco-green")
|
|
|
|
(((pickup-type eco-blue)) "eco-blue")
|
|
|
|
(((pickup-type eco-red)) "eco-red")
|
|
|
|
(((pickup-type eco-yellow)) "eco-yellow")
|
|
|
|
(((pickup-type none)) "none")
|
2021-05-06 19:00:30 -04:00
|
|
|
(else "*unknown*")
|
|
|
|
)
|
2021-02-28 18:05:07 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
(deftype fact-info (basic)
|
2021-05-06 19:00:30 -04:00
|
|
|
((process process :offset-assert 4)
|
|
|
|
(pickup-type pickup-type :offset-assert 8)
|
2021-02-28 18:05:07 -05:00
|
|
|
(pickup-amount float :offset-assert 12)
|
|
|
|
(pickup-spawn-amount float :offset-assert 16)
|
|
|
|
(options uint64 :offset-assert 24)
|
|
|
|
(fade-time uint64 :offset-assert 32)
|
|
|
|
)
|
|
|
|
:method-count-assert 12
|
|
|
|
:size-assert #x28
|
|
|
|
:flag-assert #xc00000028
|
|
|
|
(:methods
|
2021-05-06 19:00:30 -04:00
|
|
|
(new (symbol type process pickup-type float) _type_ 0)
|
2021-02-28 18:05:07 -05:00
|
|
|
(dummy-9 () none 9)
|
2021-05-12 21:45:36 -04:00
|
|
|
(dummy-10 (_type_ symbol) none 10)
|
|
|
|
(dummy-11 (_type_) float 11)
|
2021-02-28 18:05:07 -05:00
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
(deftype fact-info-target (fact-info)
|
|
|
|
((eco-type int32 :offset-assert 40)
|
|
|
|
(eco-level float :offset-assert 44)
|
|
|
|
(eco-pickup-time uint64 :offset-assert 48)
|
2021-05-12 21:45:36 -04:00
|
|
|
(eco-timeout uint64 :offset-assert 56) ;; usec
|
2021-02-28 18:05:07 -05:00
|
|
|
(health float :offset-assert 64)
|
|
|
|
(health-max float :offset-assert 68)
|
|
|
|
(buzzer float :offset-assert 72)
|
|
|
|
(buzzer-max float :offset-assert 76)
|
|
|
|
(eco-pill float :offset-assert 80)
|
|
|
|
(eco-pill-max float :offset-assert 84)
|
|
|
|
(health-pickup-time uint64 :offset-assert 88)
|
|
|
|
(eco-source uint64 :offset-assert 96)
|
|
|
|
(eco-source-time uint64 :offset-assert 104)
|
|
|
|
(money-pickup-time uint64 :offset-assert 112)
|
|
|
|
(buzzer-pickup-time uint64 :offset-assert 120)
|
|
|
|
(fuel-cell-pickup-time uint64 :offset-assert 128)
|
|
|
|
(eco-pill-pickup-time uint64 :offset-assert 136)
|
|
|
|
)
|
|
|
|
:method-count-assert 12
|
|
|
|
:size-assert #x90
|
|
|
|
:flag-assert #xc00000090
|
2021-05-12 21:45:36 -04:00
|
|
|
(:methods
|
|
|
|
(new (symbol type process pickup-type float) _type_ 0)
|
|
|
|
)
|
2021-02-28 18:05:07 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
(deftype fact-info-enemy (fact-info)
|
|
|
|
((speed float :offset-assert 40)
|
2021-05-12 21:45:36 -04:00
|
|
|
(idle-distance float :offset-assert 44) ; meters
|
|
|
|
(notice-top float :offset-assert 48) ; meters
|
|
|
|
(notice-bottom float :offset-assert 52) ; meters
|
|
|
|
(cam-horz float :offset-assert 56) ; meters
|
|
|
|
(cam-vert float :offset-assert 60) ; meters
|
|
|
|
(cam-notice-dist float :offset-assert 64) ; meters
|
2021-02-28 18:05:07 -05:00
|
|
|
)
|
|
|
|
:method-count-assert 12
|
|
|
|
:size-assert #x44
|
|
|
|
:flag-assert #xc00000044
|
2021-05-12 21:45:36 -04:00
|
|
|
(:methods
|
|
|
|
(new (symbol type process pickup-type float) _type_ 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
(defmethod dummy-11 fact-info ((obj fact-info))
|
|
|
|
0.0
|
2021-02-28 18:05:07 -05:00
|
|
|
)
|