Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Distribution skeleton
- Loading branch information
Showing
12 changed files
with
112 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,10 @@ | |
*.lisp-temp | ||
|
||
# emacs junk | ||
\#* | ||
*~ | ||
.\#* | ||
|
||
# build | ||
build/ | ||
|
||
# system dependent junk | ||
local/ | ||
|
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
'(:engine | ||
(:systems (mortar-combat::mortar-combat) | ||
:log-level :debug) | ||
:assets "assets/") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
'(:engine | ||
(:systems (mortar-combat::mortar-combat)) | ||
:assets "assets/") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
(ge.dist:descriptor :mortar-combat | ||
:base-directory "../" | ||
:entry-function (:mortar-combat main) | ||
:assets ("mortar-combat.conf.lisp" | ||
"run.sh" | ||
"run.bat" | ||
"assets/")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@echo off | ||
set WORK_DIR=%~dp0 | ||
set PATH=%WORK_DIR%lib\;%PATH% | ||
|
||
start /d "%WORK_DIR%" mortar-combat.bin mortar-combat.conf.lisp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
WORK_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
case $OSTYPE in | ||
linux*) | ||
export LD_LIBRARY_PATH="$WORK_DIR/lib/" | ||
export ALSOFT_DRIVERS="-jack,$ALSOFT_DRIVERS" | ||
;; | ||
darwin*) | ||
export DYLD_LIBRARY_PATH="$WORK_DIR/lib/" | ||
;; | ||
esac | ||
|
||
cd $WORK_DIR | ||
./mortar-combat.bin mortar-combat.conf.lisp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
(in-package :mortar-combat) | ||
|
||
|
||
(defvar *main-latch* (mt:make-latch)) | ||
|
||
|
||
(defclass mortar-combat (enableable generic-system) | ||
((scene :initform nil)) | ||
(:default-initargs :depends-on '(graphics-system | ||
physics-system | ||
audio-system))) | ||
|
||
|
||
(definline mortar-combat () | ||
(engine-system 'mortar-combat)) | ||
|
||
|
||
(defun scenegraph-flow () | ||
(scenegraph | ||
(transform-node))) | ||
|
||
|
||
(defmethod initialize-system :after ((this mortar-combat)) | ||
(with-slots (scene) this | ||
(register-resource-loader (make-resource-loader (asset-path "font.brf"))) | ||
(run (>> (-> ((host)) () | ||
(setf (viewport-title) "Mortar Combat") | ||
(setf (viewport-size) (vec2 800 600))) | ||
(-> ((physics)) () | ||
(setf (gravity) (vec3 0.0 -9.81 0.0))) | ||
(scenegraph-flow) | ||
(instantly (scenegraph-root) | ||
(setf scene (make-scene (make-pass-chain (make-simulation-pass) | ||
(make-rendering-pass)) | ||
scenegraph-root))) | ||
(concurrently () | ||
(let (looped-flow) | ||
(setf looped-flow (>> (scene-processing-flow scene) | ||
(instantly () | ||
(when (enabledp this) | ||
(run looped-flow))))) | ||
(run looped-flow))))))) | ||
|
||
|
||
(defun start (configuration-path) | ||
(startup configuration-path (uiop:pathname-directory-pathname configuration-path))) | ||
|
||
|
||
(defun stop () | ||
(shutdown)) | ||
|
||
|
||
(defun main (args) | ||
(start (merge-pathnames (second args) (uiop:getcwd))) | ||
(mt:wait-for-latch *main-latch*)) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(in-package :mortar-combat) | ||
|
||
|
||
(defun asset-path (file) | ||
(merge-pathnames file (merge-working-pathname (property :assets "assets/")))) |