;;-*-Lisp-*-
(in-package goal)

;; name: hud-classes.gc
;; name in dgo: hud-classes
;; dgos: ENGINE, GAME

;; DECOMP BEGINS

(defmethod draw ((this hud-map))
  (set-hud-piece-position!
    (-> this sprites 1)
    (the int (+ 492.0 (* 140.0 (-> this offset))))
    (the int (+ 281.0 (* 140.0 (-> this offset))))
    )
  (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 1)) 11 -11)
  (set! (-> this sprites 0 color w)
        (the int (+ 70.0 (* 70.0 (sin (* 182.04445 (the float (-> this values 1 current)))))))
        )
  (set! (-> *minimap* color y)
        (the int (- 96.0 (* 32.0 (sin (* 182.04445 (the float (-> this values 1 current)))))))
        )
  (set! (-> *minimap* color z)
        (the int (- 96.0 (* 32.0 (sin (* 182.04445 (the float (-> this values 1 current)))))))
        )
  (set! (-> this sprites 0 scale-x) 1.0)
  (set! (-> this sprites 0 scale-y) 1.0)
  (when (>= (-> *setting-control* user-current race-minimap) 0)
    (set! (-> this sprites 0 scale-x) 0.0)
    (set! (-> this sprites 0 scale-y) 0.0)
    (set! (-> this sprites 1 scale-x) 0.0)
    (set! (-> this sprites 1 scale-y) 0.0)
    )
  (let ((t9-5 (method-of-type hud draw)))
    (t9-5 this)
    )
  (cond
    ((< (-> *setting-control* user-current race-minimap) 0)
     (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf))
                                  (bucket-id progress)
                                  )
       (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 2 -3)
       (draw-1 *minimap* s4-0 (the-as vector4w (-> this sprites 2)) #t)
       )
     )
    ((zero? (-> *setting-control* user-current race-minimap))
     (let ((s5-1 (level-get *level* 'stadiumb)))
       (when (and s5-1 (= (-> s5-1 status) 'active))
         (set-race-texture
           *minimap*
           (lookup-texture-by-id (new 'static 'texture-id :index #x10 :page #xc25))
           16837.018
           s5-1
           )
         (set-race-corner *minimap* -1609044.0 -2978676.8)
         (with-dma-buffer-add-bucket ((s4-2 (-> *display* frames (-> *display* on-screen) global-buf))
                                      (bucket-id progress)
                                      )
           (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 10 -15)
           (draw-sprite2 *minimap* s4-2 (the-as vector4w (-> this sprites 2)) #t)
           )
         )
       )
     )
    ((= (-> *setting-control* user-current race-minimap) 1)
     (let ((s5-3 (level-get *level* 'stadiumc)))
       (when (and s5-3 (= (-> s5-3 status) 'active))
         (set-race-corner *minimap* -951910.4 -3694182.5)
         (set-race-texture
           *minimap*
           (lookup-texture-by-id (new 'static 'texture-id :index #x1 :page #xd17))
           13907.148
           s5-3
           )
         (with-dma-buffer-add-bucket ((s4-4 (-> *display* frames (-> *display* on-screen) global-buf))
                                      (bucket-id progress)
                                      )
           (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 20 -8)
           (draw-sprite2 *minimap* s4-4 (the-as vector4w (-> this sprites 2)) #t)
           )
         )
       )
     )
    ((= (-> *setting-control* user-current race-minimap) 2)
     (let ((s5-5 (level-get *level* 'stadiumd)))
       (when (and s5-5 (= (-> s5-5 status) 'active))
         (set-race-corner *minimap* -1862860.8 -3283353.5)
         (set-race-texture
           *minimap*
           (lookup-texture-by-id (new 'static 'texture-id :index #x1 :page #xd18))
           18255.871
           s5-5
           )
         (with-dma-buffer-add-bucket ((s4-6 (-> *display* frames (-> *display* on-screen) global-buf))
                                      (bucket-id progress)
                                      )
           (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 1)) 10 -8)
           (draw-sprite2 *minimap* s4-6 (the-as vector4w (-> this sprites 2)) #t)
           )
         )
       )
     )
    ((= (-> *setting-control* user-current race-minimap) 3)
     0
     )
    )
  0
  (none)
  )

(defmethod update-values ((this hud-map))
  (cond
    ((update! *minimap*)
     (logior! (-> this flags) (hud-flags show))
     (let ((t9-1 (method-of-type hud update-values)))
       (t9-1 this)
       )
     )
    (else
      (send-event this 'force-hide)
      )
    )
  (when (not (paused?))
    ;; og:preserve-this high fps fix
    (let ((v1-10 (* DISPLAY_FPS_RATIO 8)))
      (if (and (< (-> this values 1 target) 270) (< 270 (+ (-> this values 1 target) v1-10)))
          (set! (-> this values 1 target) 270)
          )
      (if (or (-> *game-info* wanted-flash) (!= (-> this values 1 target) 270))
          (set! (-> this values 1 target) (mod (+ (-> this values 1 target) v1-10) 360))
          )
      )
    )
  0
  (none)
  )

(defmethod init-callback ((this hud-map))
  (set! (-> this gui-id)
        (add-process *gui-control* this (gui-channel hud-lower-right) (gui-action hidden) (-> this name) 81920.0 0)
        )
  (set! (-> this sprites 0 tex) (get-texture hud-mapring-alarm-01 level-default-minimap))
  (set! (-> this sprites 0 scale-x) 1.2)
  (set! (-> this sprites 0 scale-y) 1.2)
  (set! (-> this sprites 0 flags) (the-as uint 4))
  (set! (-> this sprites 0 pos z) #xffff00)
  (set! (-> this sprites 1 tex) (get-texture hud-mapring-01 level-default-minimap))
  (set! (-> this sprites 1 scale-x) 0.85)
  (set! (-> this sprites 1 scale-y) 0.85)
  (set! (-> this sprites 1 flags) (the-as uint 4))
  (set! (-> this sprites 1 pos z) #xffff00)
  (set! (-> this values 0 current) 0)
  (update! *minimap*)
  0
  (none)
  )

(defmethod draw ((this hud-health))
  (set-hud-piece-position!
    (-> this sprites 8)
    (the int (+ (* -130.0 (-> this offset)) (if (= (-> *setting-control* user-default aspect-ratio) 'aspect4x3)
                                                20.0
                                                30.0
                                                )
                )
         )
    (the int (+ 306.0 (* 130.0 (-> this offset))))
    )
  (set-as-offset-from! (-> this sprites 9) (the-as vector4w (-> this sprites 8)) 40 0)
  (set-as-offset-from! (-> this sprites 10) (the-as vector4w (-> this sprites 8)) 0 40)
  (set-as-offset-from! (-> this sprites 11) (the-as vector4w (-> this sprites 8)) 40 40)
  (set-as-offset-from! (-> this sprites 12) (the-as vector4w (-> this sprites 8)) 2 32)
  (set-as-offset-from! (-> this sprites 13) (the-as vector4w (-> this sprites 8)) 7 60)
  (set-as-offset-from! (-> this sprites 14) (the-as vector4w (-> this sprites 8)) 40 60)
  (set-as-offset-from! (-> this sprites 15) (the-as vector4w (-> this sprites 8)) 63 32)
  (set-as-offset-from! (-> this sprites 16) (the-as vector4w (-> this sprites 8)) 63 16)
  (set-as-offset-from! (-> this sprites 17) (the-as vector4w (-> this sprites 8)) 41 4)
  (set-as-offset-from! (-> this sprites 18) (the-as vector4w (-> this sprites 8)) 6 4)
  (set-as-offset-from! (-> this sprites 19) (the-as vector4w (-> this sprites 8)) 2 17)
  (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 8)) 40 40)
  (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 8)) 40 40)
  (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites 8)) 40 40)
  (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 8)) 40 40)
  (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites 8)) 40 40)
  (set-as-offset-from! (-> this sprites 5) (the-as vector4w (-> this sprites 8)) 40 40)
  (set-as-offset-from! (-> this sprites 6) (the-as vector4w (-> this sprites 8)) 40 40)
  (set-as-offset-from! (-> this sprites 7) (the-as vector4w (-> this sprites 8)) 40 40)
  (set-as-offset-from! (-> this sprites 21) (the-as vector4w (-> this sprites 8)) 25 25)
  (let ((v1-12
          (+ (the int (* 127.0 (sin (* 182.04445 (the float (* (-> *display* game-clock frame-counter) 2)))))) 127)
          )
        )
    (set! (-> this sprites 1 color x) v1-12)
    (set! (-> this sprites 1 color y) v1-12)
    (set! (-> this sprites 1 color z) v1-12)
    )
  (set! (-> this sprites 3 color x) (-> this sprites 1 color x))
  (set! (-> this sprites 5 color x) (-> this sprites 1 color x))
  (set! (-> this sprites 7 color x) (-> this sprites 1 color x))
  (set! (-> this sprites 3 color y) (-> this sprites 1 color y))
  (set! (-> this sprites 5 color y) (-> this sprites 1 color y))
  (set! (-> this sprites 7 color y) (-> this sprites 1 color y))
  (set! (-> this sprites 3 color z) (-> this sprites 1 color z))
  (set! (-> this sprites 5 color z) (-> this sprites 1 color z))
  (set! (-> this sprites 7 color z) (-> this sprites 1 color z))
  (let ((f30-1 (the float (-> this values 2 current))))
    (if (= f30-1 100.0)
        (set! (-> this sprites 21 tex) (get-texture hud-darksymbol-lit-01 level-default-minimap))
        (set! (-> this sprites 21 tex) (get-texture hud-darksymbol-01 level-default-minimap))
        )
    (cond
      ((< 75.0 f30-1)
       (set! (-> this sprites 0 angle) (* 182.04445 (- 180.0 (* 3.6 (+ -75.0 f30-1)))))
       (set! (-> this sprites 2 angle) 32768.0)
       (set! (-> this sprites 4 angle) 49152.0)
       (set! (-> this sprites 6 angle) 0.0)
       )
      ((< 50.0 f30-1)
       (set! (-> this sprites 0 angle) 32768.0)
       (set! (-> this sprites 2 angle) (* 182.04445 (- 270.0 (* 3.6 (+ -50.0 f30-1)))))
       (set! (-> this sprites 4 angle) 49152.0)
       (set! (-> this sprites 6 angle) 0.0)
       )
      ((< 25.0 f30-1)
       (set! (-> this sprites 0 angle) 32768.0)
       (set! (-> this sprites 2 angle) 49152.0)
       (set! (-> this sprites 4 angle) (* 182.04445 (- (* 3.6 (+ -25.0 f30-1)))))
       (set! (-> this sprites 6 angle) 0.0)
       )
      (else
        (set! (-> this sprites 0 angle) 32768.0)
        (set! (-> this sprites 2 angle) 49152.0)
        (set! (-> this sprites 4 angle) 0.0)
        (set! (-> this sprites 6 angle) (* 182.04445 (- 90.0 (* 3.6 f30-1))))
        )
      )
    )
  (let ((v1-55 (-> this values 0 current))
        (a0-25 12)
        )
    (while (< a0-25 20)
      (set! (-> this sprites a0-25 scale-x) (if (> v1-55 0)
                                                1.0
                                                0.0
                                                )
            )
      (+! a0-25 1)
      (+! v1-55 -10)
      )
    )
  ((method-of-type hud draw) this)
  0
  (none)
  )

(defmethod update-values ((this hud-health))
  (set! (-> this values 0 target) (the int (* 10.0 (-> *target* fact health))))
  (set! (-> this values 1 target) (the-as int (-> *target* fact health-pickup-time)))
  (set! (-> this values 2 target) (mod (the int (+ 0.5 (-> *target* game eco-pill-dark))) 100))
  (set! (-> this values 3 target) (the-as int (-> *target* fact eco-pill-dark-pickup-time)))
  (if (and (zero? (-> this values 2 target)) (!= (-> *target* game eco-pill-dark) 0.0))
      (set! (-> this values 2 target) 100)
      )
  ((method-of-type hud update-values) this)
  0
  (none)
  )

(defmethod init-callback ((this hud-health))
  (set! (-> this gui-id)
        (add-process *gui-control* this (gui-channel hud-lower-left-1) (gui-action hidden) (-> this name) 81920.0 0)
        )
  (set! (-> this sprites 0 tex) (get-texture hud-transparent-01 level-default-minimap))
  (set! (-> this sprites 0 pos z) #xfffff1)
  (set! (-> this sprites 0 scale-x) 8.0)
  (set! (-> this sprites 0 scale-y) 8.0)
  (set! (-> this sprites 1 tex) (get-texture hud-darkmeterpie level-default-minimap))
  (set! (-> this sprites 1 angle) 32768.0)
  (set! (-> this sprites 1 pos z) #xfffff0)
  (set! (-> this sprites 2 tex) (get-texture hud-transparent-01 level-default-minimap))
  (set! (-> this sprites 2 pos z) #xfffff3)
  (set! (-> this sprites 2 scale-x) 8.0)
  (set! (-> this sprites 2 scale-y) 8.0)
  (set! (-> this sprites 3 tex) (get-texture hud-darkmeterpie level-default-minimap))
  (set! (-> this sprites 3 angle) 49152.0)
  (set! (-> this sprites 3 pos z) #xfffff2)
  (set! (-> this sprites 4 tex) (get-texture hud-transparent-01 level-default-minimap))
  (set! (-> this sprites 4 pos z) #xfffff5)
  (set! (-> this sprites 4 scale-x) 8.0)
  (set! (-> this sprites 4 scale-y) 8.0)
  (set! (-> this sprites 5 tex) (get-texture hud-darkmeterpie level-default-minimap))
  (set! (-> this sprites 5 angle) 0.0)
  (set! (-> this sprites 5 pos z) #xfffff4)
  (set! (-> this sprites 6 tex) (get-texture hud-transparent-01 level-default-minimap))
  (set! (-> this sprites 6 pos z) #xfffff7)
  (set! (-> this sprites 6 scale-x) 8.0)
  (set! (-> this sprites 6 scale-y) 8.0)
  (set! (-> this sprites 7 tex) (get-texture hud-darkmeterpie level-default-minimap))
  (set! (-> this sprites 7 angle) 16384.0)
  (set! (-> this sprites 7 pos z) #xfffff6)
  (set! (-> this sprites 8 tex) (get-texture hud-health-01 level-default-minimap))
  (set! (-> this sprites 9 tex) (get-texture hud-health-02 level-default-minimap))
  (set! (-> this sprites 10 tex) (get-texture hud-health-03 level-default-minimap))
  (set! (-> this sprites 11 tex) (get-texture hud-health-04 level-default-minimap))
  (set! (-> this sprites 12 tex) (get-texture hud-health-bar-lit-02 level-default-minimap))
  (set! (-> this sprites 12 flags) (the-as uint 3))
  (set! (-> this sprites 12 scale-x) 0.9)
  (set! (-> this sprites 12 scale-y) 1.0)
  (set! (-> this sprites 13 tex) (get-texture hud-health-bar-lit level-default-minimap))
  (set! (-> this sprites 13 flags) (the-as uint 3))
  (set! (-> this sprites 13 scale-x) 0.9)
  (set! (-> this sprites 13 scale-y) 1.0)
  (set! (-> this sprites 14 tex) (get-texture hud-health-bar-lit level-default-minimap))
  (set! (-> this sprites 14 flags) (the-as uint 2))
  (set! (-> this sprites 14 scale-x) 0.9)
  (set! (-> this sprites 14 scale-y) 1.0)
  (set! (-> this sprites 15 tex) (get-texture hud-health-bar-lit-02 level-default-minimap))
  (set! (-> this sprites 15 flags) (the-as uint 2))
  (set! (-> this sprites 15 scale-x) 0.9)
  (set! (-> this sprites 15 scale-y) 1.0)
  (set! (-> this sprites 16 tex) (get-texture hud-health-bar-lit-02 level-default-minimap))
  (set! (-> this sprites 16 scale-x) 0.9)
  (set! (-> this sprites 16 scale-y) 1.0)
  (set! (-> this sprites 17 tex) (get-texture hud-health-bar-lit level-default-minimap))
  (set! (-> this sprites 17 scale-x) 0.9)
  (set! (-> this sprites 17 scale-y) 1.0)
  (set! (-> this sprites 18 tex) (get-texture hud-health-bar-lit level-default-minimap))
  (set! (-> this sprites 18 flags) (the-as uint 1))
  (set! (-> this sprites 18 scale-x) 0.9)
  (set! (-> this sprites 18 scale-y) 1.0)
  (set! (-> this sprites 19 tex) (get-texture hud-health-bar-lit-02 level-default-minimap))
  (set! (-> this sprites 19 flags) (the-as uint 1))
  (set! (-> this sprites 19 scale-x) 0.9)
  (set! (-> this sprites 19 scale-y) 1.0)
  (set! (-> this sprites 21 tex) (get-texture hud-darksymbol-01 level-default-minimap))
  0
  (none)
  )

(defmethod draw ((this hud-dark-eco-symbol))
  (let ((v1-0 (process-by-name "hud-health" *active-pool*))
        (f30-0 (-> this offset))
        )
    (if (and v1-0 (< (-> (the-as hud-health v1-0) offset) f30-0))
        (set! f30-0 (-> (the-as hud-health v1-0) offset))
        )
    (set-hud-piece-position!
      (the-as hud-sprite (-> this sprites))
      (if (= (-> *setting-control* user-default aspect-ratio) 'aspect4x3)
          (the int (+ 13.0 (* -130.0 f30-0)))
          (the int (+ 25.0 (* -130.0 f30-0)))
          )
      (the int (+ 299.0 (* 130.0 f30-0)))
      )
    (cond
      ((or (= (-> this values 2 target) 100) (= (-> *target* game eco-pill-dark) 100.0))
       (set! (-> this sprites 0 tex) (get-texture hud-darkjak-head-01 level-default-minimap))
       (set-hud-piece-position!
         (the-as hud-sprite (-> this sprites))
         (if (= (-> *setting-control* user-default aspect-ratio) 'aspect4x3)
             (the int (+ 13.0 (* -130.0 f30-0)))
             (the int (+ 25.0 (* -130.0 f30-0)))
             )
         (the int (+ 299.0 (* 130.0 f30-0)))
         )
       (set! (-> this sprites 0 scale-x) 1.5)
       (set! (-> this sprites 0 scale-y) 1.5)
       (let ((v1-31
               (+ (the int (* 15.0 (sin (* 182.04445 (the float (* (-> *display* game-clock frame-counter) 4)))))) 160)
               )
             )
         (set! (-> this sprites 0 color x) v1-31)
         (set! (-> this sprites 0 color y) v1-31)
         (set! (-> this sprites 0 color z) v1-31)
         )
       )
      (else
        (set! (-> this sprites 0 tex) (get-texture hud-jak-head-01 level-default-minimap))
        (set-hud-piece-position!
          (the-as hud-sprite (-> this sprites))
          (if (= (-> *setting-control* user-default aspect-ratio) 'aspect4x3)
              (the int (+ 29.0 (* -130.0 f30-0)))
              (the int (+ 36.0 (* -130.0 f30-0)))
              )
          (the int (+ 315.0 (* 130.0 f30-0)))
          )
        (set! (-> this sprites 0 scale-x) 1.0)
        (set! (-> this sprites 0 scale-y) 1.0)
        (set! (-> this sprites 0 color x) 128)
        (set! (-> this sprites 0 color y) 128)
        (set! (-> this sprites 0 color z) 128)
        )
      )
    )
  ((method-of-type hud draw) this)
  0
  (none)
  )

(defmethod update-values ((this hud-dark-eco-symbol))
  (set! (-> this values 0 target) (the int (* 10.0 (-> *target* fact health))))
  (set! (-> this values 1 target) (the-as int (-> *target* fact health-pickup-time)))
  (set! (-> this values 2 target) (mod (the int (+ 0.5 (-> *target* game eco-pill-dark))) 100))
  (set! (-> this values 3 target) (the-as int (-> *target* fact eco-pill-dark-pickup-time)))
  (if (and (or (and (zero? (-> this values 2 target)) (!= (-> *target* game eco-pill-dark) 0.0))
               (focus-test? *target* dark)
               )
           (and (not (focus-test? *target* indax)) (-> *setting-control* user-current darkjak))
           )
      (set! (-> this values 2 target) 100)
      )
  (if (= (-> this values 2 target) 100)
      (+! (-> this values 4 target) 1)
      )
  ((method-of-type hud update-values) this)
  0
  (none)
  )

(defmethod init-callback ((this hud-dark-eco-symbol))
  (set! (-> this gui-id)
        (add-process *gui-control* this (gui-channel hud-lower-left-2) (gui-action hidden) (-> this name) 81920.0 0)
        )
  (set! (-> this sprites 0 tex) (get-texture hud-jak-head-01 level-default-minimap))
  (set! (-> this sprites 0 scale-x) 1.5)
  (set! (-> this sprites 0 scale-y) 1.5)
  0
  (none)
  )

(define *hud-skullgem* (the-as (pointer hud-skullgem) #f))

(defmethod draw ((this hud-skullgem))
  (set-hud-piece-position!
    (the-as hud-sprite (-> this icons 0 pos))
    (the int (+ 60.0 (* -130.0 (-> this offset))))
    150
    )
  (set-as-offset-from!
    (the-as hud-sprite (-> this sprites))
    (the-as vector4w (-> this icons 0 pos))
    (if (= (-> *setting-control* user-default aspect-ratio) 'aspect4x3)
        -27
        -35
        )
    20
    )
  (set! (-> this sprites 0 scale-x) (if (= (-> *setting-control* user-default aspect-ratio) 'aspect4x3)
                                        0.86
                                        1.1
                                        )
        )
  (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current))
  (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this icons 0 pos)) 0 45)
  ((method-of-type hud draw) this)
  0
  (none)
  )

(defmethod update-values ((this hud-skullgem))
  (set! (-> this values 0 target) (the int (-> *target* game gem)))
  ((method-of-type hud update-values) this)
  0
  (none)
  )

(defmethod init-callback ((this hud-skullgem))
  (set! (-> this gui-id)
        (add-process *gui-control* this (gui-channel hud-center-left) (gui-action hidden) (-> this name) 81920.0 0)
        )
  (hud-create-icon this 0 (the-as int (art-group-get-by-name *level* "skel-gem" (the-as (pointer uint32) #f))))
  (set! (-> this icons 0 scale-x) 0.025)
  (set! (-> this icons 0 scale-y) 0.035)
  (set! (-> this sprites 0 tex) (get-texture hud-egg-glow level-default-minimap))
  (set! (-> this sprites 0 scale-x) 0.86)
  (set! (-> this sprites 0 scale-y) 1.05)
  (set! (-> this sprites 0 pos z) #xfff9ff)
  (alloc-string-if-needed this 0)
  (set! (-> this strings 0 flags) (font-flags kerning middle large))
  (set! (-> this strings 0 scale) 0.5)
  0
  (none)
  )

(defmethod draw ((this hud-skill))
  (set-hud-piece-position!
    (the-as hud-sprite (-> this icons 0 pos))
    (the int (+ 60.0 (* -130.0 (-> this offset))))
    270
    )
  (set-as-offset-from!
    (the-as hud-sprite (-> this sprites))
    (the-as vector4w (-> this icons 0 pos))
    (if (= (-> *setting-control* user-default aspect-ratio) 'aspect4x3)
        -19
        -25
        )
    -39
    )
  (set! (-> this sprites 0 scale-x) (if (= (-> *setting-control* user-default aspect-ratio) 'aspect4x3)
                                        0.62
                                        0.77
                                        )
        )
  (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current))
  (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this icons 0 pos)) 0 -5)
  (when (not (paused?))
    (let ((s5-1 (new 'stack-no-clear 'quaternion)))
      (quaternion-axis-angle! s5-1 0.0 1.0 0.0 364.0889)
      (quaternion*! (-> this icons 0 icon 0 root quat) s5-1 (-> this icons 0 icon 0 root quat))
      )
    )
  ((method-of-type hud draw) this)
  0
  (none)
  )

(defmethod update-values ((this hud-skill))
  (set! (-> this values 0 target) (the int (-> *target* game skill)))
  ((method-of-type hud update-values) this)
  0
  (none)
  )

(defmethod init-callback ((this hud-skill))
  (set! (-> this gui-id)
        (add-process *gui-control* this (gui-channel hud-middle-left) (gui-action hidden) (-> this name) 81920.0 0)
        )
  (hud-create-icon
    this
    0
    (the-as int (art-group-get-by-name *level* "skel-skill" (the-as (pointer uint32) #f)))
    )
  (set! (-> this icons 0 scale-x) 0.009)
  (set! (-> this icons 0 scale-y) -0.018)
  (set! (-> this sprites 0 tex) (get-texture hud-egg-glow level-default-minimap))
  (set! (-> this sprites 0 scale-x) 0.62)
  (set! (-> this sprites 0 scale-y) 1.34)
  (set! (-> this sprites 0 pos z) #xfff9ff)
  (alloc-string-if-needed this 0)
  (set! (-> this strings 0 flags) (font-flags kerning middle large))
  (set! (-> this strings 0 scale) 0.5)
  (logior! (-> this values 0 flags) 1)
  0
  (none)
  )

(defmethod update-value-callback ((this hud-skill) (arg0 int) (arg1 int))
  (if (> arg1 0)
      (sound-play "skill-pickup" :pitch 0.5)
      )
  0
  (none)
  )

(defmethod draw ((this hud-score))
  (set-hud-piece-position!
    (the-as hud-sprite (-> this sprites))
    (the int (+ 480.0 (* 130.0 (-> this offset))))
    140
    )
  (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current))
  (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -12 8)
  ((method-of-type hud draw) this)
  0
  (none)
  )

(defmethod update-values ((this hud-score))
  (set! (-> this values 0 target) (the int (-> *game-info* score)))
  ((method-of-type hud update-values) this)
  0
  (none)
  )

(defmethod init-callback ((this hud-score))
  (set! (-> this gui-id)
        (add-process *gui-control* this (gui-channel hud-center-right) (gui-action hidden) (-> this name) 81920.0 0)
        )
  (logior! (-> this flags) (hud-flags show))
  (set! (-> this sprites 0 tex) (get-texture hud-scoreboard-01 level-default-minimap))
  (set! (-> this sprites 0 scale-x) 1.5)
  (set! (-> this strings 0 scale) 0.5)
  (set! (-> this sprites 0 flags) (the-as uint 4))
  (alloc-string-if-needed this 0)
  (set! (-> this strings 0 flags) (font-flags kerning right large))
  (set! (-> this strings 0 color) (font-color red))
  0
  (none)
  )

(defmethod draw ((this hud-timer))
  (set-hud-piece-position!
    (the-as hud-sprite (-> this sprites))
    264
    (the int (+ 50.0 (* -100.0 (-> this offset))))
    )
  (format (clear (-> this strings 0 text)) "~1,'0D" (/ (-> this values 0 current) 10))
  (format (clear (-> this strings 1 text)) "~1,'0D" (mod (-> this values 0 current) 10))
  (format (clear (-> this strings 2 text)) ":")
  (format (clear (-> this strings 3 text)) "~1,'0D" (/ (-> this values 1 current) 10))
  (format (clear (-> this strings 4 text)) "~1,'0D" (mod (-> this values 1 current) 10))
  (let ((s5-5 20)
        (s4-0 -42)
        )
    (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) s4-0 -24)
    (let ((s4-1 (+ s4-0 s5-5)))
      (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) s4-1 -24)
      (let ((s4-2 (+ s4-1 16)))
        (set-as-offset-from! (the-as hud-sprite (-> this strings 2 pos)) (the-as vector4w (-> this sprites)) s4-2 -24)
        (let ((s4-3 (+ s4-2 16)))
          (set-as-offset-from! (the-as hud-sprite (-> this strings 3 pos)) (the-as vector4w (-> this sprites)) s4-3 -24)
          (let ((a2-13 (+ s4-3 s5-5)))
            (set-as-offset-from!
              (the-as hud-sprite (-> this strings 4 pos))
              (the-as vector4w (-> this sprites))
              a2-13
              -24
              )
            )
          )
        )
      )
    )
  ((method-of-type hud draw) this)
  0
  (none)
  )

(defmethod update-values ((this hud-timer))
  (set! (-> this values 0 target) (/ (-> *game-info* timer) #x4650))
  (set! (-> this values 1 target) (/ (mod (-> *game-info* timer) #x4650) 300))
  (let ((v1-8 (abs (- (-> this values 1 target) (-> this values 2 target)))))
    (when (> v1-8 0)
      (set! (-> this values 2 target) (-> this values 1 target))
      (if (and (< (-> this values 0 target) 1) (< (-> this values 1 target) 10))
          (sound-play "timer-warn")
          (sound-play "timer-beep")
          )
      )
    )
  (logclear! (-> this flags) (hud-flags disable))
  ((method-of-type hud update-values) this)
  0
  (none)
  )

(defmethod init-callback ((this hud-timer))
  (set! (-> this gui-id)
        (add-process *gui-control* this (gui-channel hud-upper-center) (gui-action hidden) (-> this name) 81920.0 0)
        )
  (logior! (-> this flags) (hud-flags show))
  (set! (-> this sprites 0 tex) (get-texture hud-timerboard-01 level-default-minimap))
  (set! (-> this sprites 0 flags) (the-as uint 8))
  (set! (-> this sprites 0 scale-x) 2.2)
  (set! (-> this sprites 0 scale-y) 2.0)
  (dotimes (s5-0 5)
    (alloc-string-if-needed this s5-0)
    (set! (-> this strings s5-0 scale) 0.8)
    (set! (-> this strings s5-0 flags) (font-flags kerning middle large))
    (set! (-> this strings s5-0 color) (font-color green))
    )
  (set! (-> this values 2 target) (-> this values 1 target))
  0
  (none)
  )

(defmethod draw ((this hud-big-score))
  (set-hud-piece-position!
    (the-as hud-sprite (-> this sprites))
    264
    (the int (+ 50.0 (* -100.0 (-> this offset))))
    )
  (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current))
  (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) -7 -24)
  ((method-of-type hud draw) this)
  0
  (none)
  )

(defmethod update-values ((this hud-big-score))
  (set! (-> this values 0 target) (the int (-> *game-info* score)))
  ((method-of-type hud update-values) this)
  0
  (none)
  )

(defmethod init-callback ((this hud-big-score))
  (set! (-> this gui-id)
        (add-process *gui-control* this (gui-channel hud-upper-center) (gui-action hidden) (-> this name) 81920.0 0)
        )
  (logior! (-> this flags) (hud-flags show))
  (set! (-> this sprites 0 tex) (get-texture hud-timerboard-01 level-default-minimap))
  (set! (-> this sprites 0 flags) (the-as uint 8))
  (set! (-> this sprites 0 scale-x) 2.7)
  (set! (-> this sprites 0 scale-y) 2.0)
  (alloc-string-if-needed this 0)
  (set! (-> this strings 0 scale) 0.8)
  (set! (-> this strings 0 flags) (font-flags kerning middle large))
  (set! (-> this strings 0 color) (font-color green))
  0
  (none)
  )

(defmethod draw ((this hud-goal))
  (set-hud-piece-position!
    (the-as hud-sprite (-> this sprites))
    (the int (+ 65.0 (* -130.0 (-> this offset))))
    70
    )
  (format (clear (-> this strings 0 text)) "~D" (-> this values 0 current))
  (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8)
  (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 0 -40)
  ((method-of-type hud draw) this)
  0
  (none)
  )

(defmethod update-values ((this hud-goal))
  (set! (-> this values 0 target) (the int (-> *game-info* goal)))
  ((method-of-type hud update-values) this)
  0
  (none)
  )

(defmethod init-callback ((this hud-goal))
  (set! (-> this gui-id)
        (add-process *gui-control* this (gui-channel hud-upper-left) (gui-action hidden) (-> this name) 81920.0 0)
        )
  (logior! (-> this flags) (hud-flags show))
  (set! (-> this sprites 0 tex) (get-texture hud-scoreboard-01 level-default-minimap))
  (set! (-> this sprites 0 scale-x) 1.2)
  (set! (-> this sprites 0 flags) (the-as uint 8))
  (alloc-string-if-needed this 0)
  (set! (-> this strings 0 scale) 0.5)
  (set! (-> this strings 0 flags) (font-flags kerning middle large))
  (set! (-> this strings 0 color) (font-color red))
  (alloc-string-if-needed this 1)
  (set! (-> this strings 1 scale) 0.75)
  (set! (-> this strings 1 flags) (font-flags kerning middle large))
  (set! (-> this strings 1 color) (font-color red))
  (let ((s5-0 format)
        (gp-1 (clear (-> this strings 1 text)))
        (s4-0 "~S")
        )
    (format (clear *temp-string*) (lookup-text! *common-text* (text-id highscore-text-goal) #f))
    (s5-0 gp-1 s4-0 *temp-string*)
    )
  0
  (none)
  )

(defmethod draw ((this hud-miss))
  (set-hud-piece-position!
    (the-as hud-sprite (-> this sprites))
    (the int (+ 448.0 (* 130.0 (-> this offset))))
    70
    )
  (format (clear (-> this strings 0 text)) "~D/~D" (-> this values 0 current) (-> this values 1 current))
  (let ((s5-1 format)
        (s4-0 (clear (-> this strings 1 text)))
        (s3-0 "~S")
        )
    (format (clear *temp-string*) (lookup-text! *common-text* (text-id miss) #f))
    (s5-1 s4-0 s3-0 *temp-string*)
    )
  (set-as-offset-from! (the-as hud-sprite (-> this strings 0 pos)) (the-as vector4w (-> this sprites)) 0 -8)
  (set-as-offset-from! (the-as hud-sprite (-> this strings 1 pos)) (the-as vector4w (-> this sprites)) 0 -40)
  ((method-of-type hud draw) this)
  0
  (none)
  )

(defmethod update-values ((this hud-miss))
  (set! (-> this values 0 target) (the int (-> *game-info* miss)))
  (set! (-> this values 1 target) (the int (-> *game-info* miss-max)))
  ((method-of-type hud update-values) this)
  0
  (none)
  )

(defmethod init-callback ((this hud-miss))
  (set! (-> this gui-id)
        (add-process *gui-control* this (gui-channel hud-upper-right) (gui-action hidden) (-> this name) 81920.0 0)
        )
  (logior! (-> this flags) (hud-flags show))
  (set! (-> this sprites 0 tex) (get-texture hud-scoreboard-01 level-default-minimap))
  (set! (-> this sprites 0 scale-x) 1.2)
  (set! (-> this sprites 0 flags) (the-as uint 8))
  (alloc-string-if-needed this 0)
  (set! (-> this strings 0 scale) 0.5)
  (set! (-> this strings 0 flags) (font-flags kerning middle large))
  (set! (-> this strings 0 color) (font-color red))
  (alloc-string-if-needed this 1)
  (set! (-> this strings 1 scale) 0.75)
  (set! (-> this strings 1 flags) (font-flags kerning middle large))
  (set! (-> this strings 1 color) (font-color red))
  0
  (none)
  )

(defmethod draw ((this hud-progress))
  (with-pp
    (let ((f0-0 (if (process-by-name "hud-timer" *active-pool*)
                    65.0
                    35.0
                    )
                )
          )
      (seek! (-> this sprites 2 scale-y) f0-0 (* 2.0 (-> pp clock time-adjust-ratio)))
      )
    (set-hud-piece-position!
      (the-as hud-sprite (-> this sprites))
      256
      (the int (+ (* -100.0 (-> this offset)) (-> this sprites 2 scale-y)))
      )
    (set-as-offset-from!
      (-> this sprites 1)
      (the-as vector4w (-> this sprites))
      (+ (the int (* 0.09 (the float (-> this values 0 current)))) -42)
      0
      )
    ((method-of-type hud draw) this)
    0
    (none)
    )
  )

(defmethod update-values ((this hud-progress))
  (set! (-> this values 0 target) (the int (* 1000.0 (-> *game-info* distance))))
  (logclear! (-> this flags) (hud-flags disable))
  ((method-of-type hud update-values) this)
  0
  (none)
  )

(defmethod init-callback ((this hud-progress))
  (set! (-> this gui-id)
        (add-process *gui-control* this (gui-channel hud-upper-center-2) (gui-action hidden) (-> this name) 81920.0 0)
        )
  (logior! (-> this flags) (hud-flags show))
  (set! (-> this sprites 0 tex) (get-texture hud-progress-meter-01 level-default-minimap))
  (set! (-> this sprites 0 flags) (the-as uint 8))
  (set! (-> this sprites 0 scale-x) 1.2)
  (set! (-> this sprites 0 scale-y) 1.2)
  (set! (-> this sprites 1 tex) (get-texture hud-progress-meter-arrow-01 level-default-minimap))
  (set! (-> this sprites 1 flags) (the-as uint 8))
  (set! (-> this sprites 1 scale-x) 1.8)
  (set! (-> this sprites 1 scale-y) 1.8)
  (set! (-> this sprites 2 scale-y) (if (process-by-name "hud-timer" *active-pool*)
                                        65.0
                                        35.0
                                        )
        )
  0
  (none)
  )

(defmethod draw ((this hud-gun))
  (local-vars (s3-0 int) (sv-16 int) (sv-32 dma-buffer))
  (let ((s4-0 0)
        (s5-0 0)
        )
    0
    (let ((s2-0 20))
      (cond
        ((= (-> this values 0 current) 1)
         (set! (-> this sprites 0 tex) (get-texture hud-gun-yellow-01 level-default-minimap))
         (set! (-> this sprites 6 tex) (get-texture hud-gun-yellow-shell-01 level-default-minimap))
         (set! (-> this sprites 0 scale-x) 1.1)
         (set! (-> this sprites 0 scale-y) 1.5)
         (set! (-> this sprites 1 scale-x) 0.0)
         (set! s5-0 -3)
         (set! s3-0 (the int (-> *FACT-bank* ammo-yellow-max)))
         )
        ((= (-> this values 0 current) 4)
         (set! (-> this sprites 0 tex) (get-texture hud-gun-purple-01 level-default-minimap))
         (set! (-> this sprites 6 tex) (get-texture hud-gun-purple-shell-01 level-default-minimap))
         (set! (-> this sprites 0 scale-x) 1.8)
         (set! (-> this sprites 0 scale-y) 1.6)
         (set! (-> this sprites 1 scale-x) 0.0)
         (set! s4-0 14)
         (set! s3-0 (the int (-> *FACT-bank* ammo-dark-max)))
         (set! s2-0 10)
         )
        ((= (-> this values 0 current) 3)
         (set! (-> this sprites 0 tex) (get-texture hud-gun-blue-01 level-default-minimap))
         (set! (-> this sprites 1 tex) (get-texture hud-gun-blue-02 level-default-minimap))
         (set! (-> this sprites 6 tex) (get-texture hud-gun-blue-shell-01 level-default-minimap))
         (set! (-> this sprites 0 scale-x) 1.4)
         (set! (-> this sprites 0 scale-y) 1.4)
         (set! (-> this sprites 1 scale-x) 1.4)
         (set! (-> this sprites 1 scale-y) 1.4)
         (set! s4-0 43)
         (set! s5-0 6)
         (set! s3-0 (the int (-> *FACT-bank* ammo-blue-max)))
         )
        (else
          (set! (-> this sprites 0 tex) (get-texture hud-gun-red-01 level-default-minimap))
          (set! (-> this sprites 6 tex) (get-texture hud-gun-red-shell-01 level-default-minimap))
          (set! (-> this sprites 0 scale-x) 1.8)
          (set! (-> this sprites 0 scale-y) 1.6)
          (set! (-> this sprites 1 scale-x) 0.0)
          (set! s4-0 14)
          (set! s5-0 -2)
          (set! s3-0 (the int (-> *FACT-bank* ammo-red-max)))
          (set! s2-0 10)
          )
        )
      (if (logtest? (-> *game-info* features) (game-feature gun-upgrade-ammo))
          (set! s3-0 (* s3-0 2))
          )
      (set-hud-piece-position!
        (the-as hud-sprite (-> this sprites))
        (- (the int (+ 507.0 (* 130.0 (-> this offset)))) s4-0)
        (the int (+ (- 25.0 (the float s5-0)) (* -100.0 (-> this offset))))
        )
      (let ((f30-0 1.0))
        (cond
          ((zero? (-> this values 0 current))
           (set! f30-0 0.0)
           (set! (-> this strings 0 pos 0) 0)
           (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -3 0)
           )
          (else
            (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites)) -4 11)
            (set-as-offset-from!
              (the-as hud-sprite (-> this strings 0 pos))
              (the-as vector4w (-> this sprites))
              (+ s4-0 -70)
              (+ s5-0 18)
              )
            (set-as-offset-from! (-> this sprites 6) (the-as vector4w (-> this sprites)) (+ s4-0 -68) (+ (if (= s2-0 20)
                                                                                                             98
                                                                                                             73
                                                                                                             )
                                                                                                         s5-0
                                                                                                         )
                                 )
            (set! (-> this sprites 6 scale-x) 1.0)
            (let ((s0-0 (mod (-> this values 1 current) s2-0)))
              (if (and (zero? s0-0) (nonzero? (-> this values 1 current)))
                  (set! s0-0 s2-0)
                  )
              (set! sv-32 (-> *display* frames (-> *display* on-screen) global-buf))
              (let ((s1-0 (-> sv-32 base)))
                (set! sv-16 0)
                (while (< sv-16 s2-0)
                  (if (= sv-16 s0-0)
                      (set! (-> this sprites 6 tex) (get-texture hud-gun-empty-shell-01 level-default-minimap))
                      )
                  (draw (-> this sprites 6) sv-32 (-> this level))
                  (+! (-> this sprites 6 pos y) -5)
                  (if (= sv-16 (+ (/ s2-0 2) -1))
                      (set-as-offset-from! (-> this sprites 6) (the-as vector4w (-> this sprites)) (+ s4-0 -83) (+ (if (= s2-0 20)
                                                                                                                       98
                                                                                                                       73
                                                                                                                       )
                                                                                                                   s5-0
                                                                                                                   )
                                           )
                      )
                  (set! sv-16 (+ sv-16 1))
                  )
                (let ((a3-5 (-> sv-32 base)))
                  (let ((v1-67 (the-as dma-packet (-> sv-32 base))))
                    (set! (-> v1-67 dma) (new 'static 'dma-tag :id (dma-tag-id next)))
                    (set! (-> v1-67 vif0) (new 'static 'vif-tag))
                    (set! (-> v1-67 vif1) (new 'static 'vif-tag))
                    (set! (-> sv-32 base) (the-as pointer (&+ v1-67 16)))
                    )
                  (dma-bucket-insert-tag
                    (-> *display* frames (-> *display* on-screen) bucket-group)
                    (bucket-id progress)
                    s1-0
                    (the-as (pointer dma-tag) a3-5)
                    )
                  )
                )
              )
            )
          )
        (set! (-> this sprites 6 scale-x) 0.0)
        (set! (-> this sprites 2 scale-x)
              (if (and (logtest? (-> *target* game features) (game-feature gun))
                       (-> *setting-control* user-current gun)
                       (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-blue))
                                 (-> *target* game features)
                                 )
                       )
                  f30-0
                  0.0
                  )
              )
        (set! (-> this sprites 3 scale-x)
              (if (and (logtest? (-> *target* game features) (game-feature gun))
                       (and (-> *setting-control* user-current gun)
                            (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-dark))
                                      (-> *target* game features)
                                      )
                            )
                       )
                  f30-0
                  0.0
                  )
              )
        (set! (-> this sprites 4 scale-x)
              (if (and (logtest? (-> *target* game features) (game-feature gun))
                       (and (-> *setting-control* user-current gun)
                            (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-red))
                                      (-> *target* game features)
                                      )
                            )
                       )
                  f30-0
                  0.0
                  )
              )
        (set! (-> this sprites 5 scale-x)
              (if (and (logtest? (-> *target* game features) (game-feature gun))
                       (and (-> *setting-control* user-current gun)
                            (logtest? (logand (-> *setting-control* user-current features) (game-feature gun-yellow))
                                      (-> *target* game features)
                                      )
                            )
                       )
                  f30-0
                  0.0
                  )
              )
        )
      )
    (format (clear (-> this strings 0 text)) "~D/~D" (-> this values 1 current) s3-0)
    (set-as-offset-from! (-> this sprites 2) (the-as vector4w (-> this sprites)) (+ s4-0 -110) (+ s5-0 18))
    (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites)) (+ s4-0 -36) (+ s5-0 19))
    (set-as-offset-from! (-> this sprites 4) (the-as vector4w (-> this sprites)) (+ s4-0 -78) (+ s5-0 7))
    (set-as-offset-from! (-> this sprites 5) (the-as vector4w (-> this sprites)) (+ s4-0 -78) (+ s5-0 37))
    )
  ((method-of-type hud draw) this)
  0
  (none)
  )

(defmethod update-values ((this hud-gun))
  (cond
    ((focus-test? *target* gun)
     (set! (-> this values 0 target) (the-as int (-> *target* gun gun-type)))
     (set! (-> this values 1 target) (the int (get-gun-ammo (-> *target* fact))))
     (logclear! (-> this flags) (hud-flags disable))
     (logior! (-> this flags) (hud-flags show))
     )
    (else
      (logior! (-> this flags) (hud-flags disable))
      (logclear! (-> this flags) (hud-flags show))
      (send-event this 'hide)
      )
    )
  ((method-of-type hud update-values) this)
  0
  (none)
  )

(defmethod init-callback ((this hud-gun))
  (set! (-> this gui-id)
        (add-process *gui-control* this (gui-channel hud-upper-right) (gui-action hidden) (-> this name) 81920.0 0)
        )
  (set! (-> this sprites 0 flags) (the-as uint 4))
  (set! (-> this sprites 2 tex) (get-texture hud-arrow-left-01 level-default-minimap))
  (set! (-> this sprites 3 tex) (get-texture hud-arrow-right-01 level-default-minimap))
  (set! (-> this sprites 4 tex) (get-texture hud-arrow-top-01 level-default-minimap))
  (set! (-> this sprites 5 tex) (get-texture hud-arrow-down-01 level-default-minimap))
  (alloc-string-if-needed this 0)
  (set! (-> this strings 0 flags) (font-flags kerning middle large))
  (set! (-> this strings 0 scale) 0.5)
  (logior! (-> this flags) (hud-flags disable))
  0
  (none)
  )

(defmethod draw ((this hud-samos-young))
  (set-hud-piece-position!
    (-> this sprites 2)
    (the int (+ 30.0 (* -130.0 (-> this offset))))
    (the int (+ 30.0 (* -100.0 (-> this offset))))
    )
  (set! (-> this sprites 0 angle) (* 182.04445 (the float (- 270 (/ (* 90 (-> this values 0 current)) 100)))))
  (set-as-offset-from! (the-as hud-sprite (-> this sprites)) (the-as vector4w (-> this sprites 2)) 40 16)
  (set-as-offset-from! (-> this sprites 1) (the-as vector4w (-> this sprites 2)) 1 16)
  (set-as-offset-from! (-> this sprites 3) (the-as vector4w (-> this sprites 2)) 7 5)
  ((method-of-type hud draw) this)
  0
  (none)
  )

(defmethod update-values ((this hud-samos-young))
  (set! (-> this values 0 target) (the int (* 100.0 (-> *game-info* bot-health 0))))
  ((method-of-type hud update-values) this)
  0
  (none)
  )

(defmethod init-callback ((this hud-samos-young))
  (set! (-> this gui-id)
        (add-process *gui-control* this (gui-channel hud-upper-left) (gui-action hidden) (-> this name) 81920.0 0)
        )
  (logior! (-> this flags) (hud-flags show))
  (set! (-> this sprites 0 tex) (get-texture hud-transparent-01 level-default-minimap))
  (set! (-> this sprites 0 scale-x) 12.0)
  (set! (-> this sprites 0 scale-y) 11.2)
  (set! (-> this sprites 0 pos z) #xfffff2)
  (set! (-> this sprites 1 tex) (get-texture hud-npcring-bar-01 level-default-minimap))
  (set! (-> this sprites 1 pos z) #xfffff0)
  (set! (-> this sprites 2 tex) (get-texture hud-npcring-01 level-default-minimap))
  (set! (-> this sprites 2 pos z) #xffffff)
  (set! (-> this sprites 3 tex)
        (lookup-texture-by-name "hud-samos-young-head-01" (the-as string #f) (the-as (pointer texture-page) #f))
        )
  (set! (-> this sprites 3 scale-x) 0.8)
  (set! (-> this sprites 3 scale-y) 0.8)
  (set! (-> this sprites 3 pos z) #xffffff)
  0
  (none)
  )

(defun activate-hud ((arg0 target))
  (process-spawn hud-dark-eco-symbol :init hud-init-by-other :to arg0)
  (process-spawn hud-health :init hud-init-by-other :to arg0)
  (process-spawn hud-map :init hud-init-by-other :to arg0)
  (set! *hud-skullgem* (process-spawn hud-skullgem :init hud-init-by-other :to arg0))
  (process-spawn hud-skill :init hud-init-by-other :to arg0)
  (process-spawn hud-gun :init hud-init-by-other :to arg0)
  0
  (none)
  )
