;;-*-Lisp-*-
(in-package goal)
(bundles "ENGINE.CGO" "GAME.CGO")
(require "kernel/gkernel-h.gc")
(require "engine/engine/connect.gc")

;; Allocate some engines.

(defconstant MATRIX_ENGINE_AMOUNT (* 1024 PROCESS_HEAP_MULT))

;; engine for drawing level backgrounds.
(define *background-draw-engine* (new 'global 'engine 'draw 10))

;; The matrix engine is not actually an engine, but instead an array of handles to processes that
;; need to have their joint math done and bones updated.
(define *matrix-engine* (new 'global 'boxed-array handle MATRIX_ENGINE_AMOUNT))

(set! (-> *matrix-engine* length) 0)

;; the camera engine contains all currently running camera entities.
(define *camera-engine* (new 'global 'engine 'camera-eng 128))

;; the debug engine is rarely used, but it allows you to add code to the debug hook for a process.
(if *debug-segment* (define *debug-engine* (new 'debug 'engine 'debug 512)))
