Skip to content

Commit

Permalink
Rearrange resource dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
borodust committed Dec 10, 2017
1 parent ce0a0d9 commit fc2fac9
Show file tree
Hide file tree
Showing 46 changed files with 358 additions and 353 deletions.
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ Experimental **bod**acious **g**ame **e**ngine written in **C**ommon **L**isp.
passes (rendering, simulation, etc); graphics-oriented, physics-oriented, transformation,
animation, generic model and other types of nodes. See `cl-bodge/scenegraph`.

* ***Assets***

Engine's universal Bodge Resource File and various external formats parsing and loading: images,
audio, fonts, meshes, skeletons, animations, etc. See `cl-bodge/assets`

* ***Distribution***

Utilites for packaging application for shipping across different OSes: lisp image dumping,
Expand All @@ -96,10 +91,6 @@ Experimental **bod**acious **g**ame **e**ngine written in **C**ommon **L**isp.
[Chicken](https://www.youtube.com/watch?v=ypZP4SNQOv8)
* SDF-based text rendering: [Hello text](https://www.youtube.com/watch?v=8q_ssF4eEQQ)
* GUI and [Text editing](https://www.youtube.com/watch?v=T5nCKKGj1J0)
* Ball-Z game written for
[Autumn 2016 Lisp Game Jam](https://itch.io/jam/autumn-2016-lisp-game-jam/rate/99353):
[Ball-Z](https://www.youtube.com/watch?v=noVtO2H9hSY)
* [Mortar Combat](https://vimeo.com/214584286) game for [Spring 2017 Lisp Game Jam](https://itch.io/jam/lisp-game-jam-2017-easy-mode)

Also, check out [trivial-gamekit](https://github.com/borodust/trivial-gamekit) to get started
with `cl-bodge` bit by bit.
Expand Down
7 changes: 3 additions & 4 deletions animation/packages.lisp
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
(in-package :cl-bodge.asdf)


(defpackage :cl-bodge.animation
(:nicknames :ge.ani)
(:use :cl :cl-bodge.utils :cl-bodge.engine :cl-bodge.graphics)
Expand All @@ -18,4 +15,6 @@
make-animation-channel
current-frame-of
play-animation
keyframed))
keyframed

parse-keyframe-animation))
17 changes: 17 additions & 0 deletions animation/resources.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
(in-package :cl-bodge.animation)


(defun parse-keyframe-animation (chunk)
(unless (null chunk)
(make-keyframe-animation
(loop for seq in (ge.rsc:children-of chunk)
for bone-id = (ge.rsc:keyframe-sequence-bone seq)
unless (null bone-id)
collect (cons bone-id
(make-keyframe-sequence
(loop for frame in (ge.rsc:children-of seq)
collect (destructuring-bind (timestamp rot transl scale) frame
(make-keyframe timestamp
:rotation (sequence->quat rot)
:translation (sequence->vec3 transl)
:scale (sequence->vec3 scale))))))))))
31 changes: 0 additions & 31 deletions assets/animation.lisp

This file was deleted.

67 changes: 0 additions & 67 deletions assets/font.lisp

This file was deleted.

43 changes: 0 additions & 43 deletions assets/mesh.lisp

This file was deleted.

8 changes: 5 additions & 3 deletions assets/packages.lisp
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
(in-package :cl-bodge.asdf)


(ge.util:define-package :cl-bodge.assets
(:nicknames :ge.as)
(:use :cl :cl-bodge.utils :cl-bodge.engine :bodge-sndfile :cl-bodge.resources)
(:export mount-container

children-of

define-sdf-font
build-sdf-font


mesh-asset-mesh
mesh-asset-transform
mesh-asset-bones

load-ogg-vorbis-audio
load-png-image

keyframe-sequence-bone

font-atlas-resource-name
font-resource-name))
26 changes: 0 additions & 26 deletions assets/skeleton.lisp

This file was deleted.

5 changes: 1 addition & 4 deletions audio/packages.lisp
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
(in-package :cl-bodge.asdf)


(defpackage :cl-bodge.audio
(cl:defpackage :cl-bodge.audio
(:use :cl :cl-bodge.engine :cl-bodge.utils :cl-muth)
(:nicknames :ge.snd)
(:export audio-system
Expand Down
6 changes: 1 addition & 5 deletions canvas/packages.lisp
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
(in-package :cl-bodge.asdf)


(defpackage :cl-bodge.canvas
(cl:defpackage :cl-bodge.canvas
(:nicknames :ge.vg)
(:use :cl :cl-bodge.engine :cl-bodge.utils :cl-bodge.graphics :bodge-autowrap :bodge-plus-c)
(:export make-canvas
Expand Down Expand Up @@ -38,7 +35,6 @@
reset-canvas-transform

register-font-face
font-container-data
make-font
with-font
draw-text))
5 changes: 1 addition & 4 deletions canvas/text.lisp
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
(in-package :cl-bodge.canvas)


(defgeneric font-container-data (container))


(defvar *active-font* nil)


Expand All @@ -27,7 +24,7 @@


(defun register-font-face (name font-container &optional (canvas *canvas*))
(let ((data (font-container-data font-container)))
(let ((data (ge.rsc:font-container-data font-container)))
(let ((font-face-id (%nvg:find-font (handle-value-of canvas) (namestring name))))
(if (< font-face-id 0)
(let* ((f-data (static-vectors:make-static-vector (length data) :initial-contents data))
Expand Down
Loading

0 comments on commit fc2fac9

Please sign in to comment.