Make sure everything is committed

This commit is contained in:
Joseph Ferano 2026-09-07 08:00:13 +07:00
parent 93debc3c6e
commit 3e8ba200cd
10 changed files with 78 additions and 9 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@
/target/
/.clj-kondo/
/.lsp/
*.fasl

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -0,0 +1,55 @@
(:texture-path "source-assets/Sprout Lands Premium/Objects/Mushrooms, Flowers, Stones.png"
:selected-cells ((0 0)
(0 1)
(0 2)
(0 3)
(0 4)
(0 5)
(0 6)
(0 10)
(1 0)
(1 1)
(1 2)
(1 3)
(1 4)
(1 5)
(1 6)
(1 7)
(1 8)
(1 9)
(1 10)
(1 11)
(2 0)
(2 1)
(2 2)
(2 3)
(2 6)
(2 7)
(2 8)
(2 9)
(2 10)
(2 11)
(3 0)
(3 1)
(3 2)
(3 3)
(3 4)
(3 5)
(3 6)
(3 7)
(3 8)
(3 9)
(3 10)
(3 11)
(4 0)
(4 1)
(4 2)
(4 3)
(4 4)
(4 5)
(4 6)
(4 7)
(4 8)
(4 9)
(4 10)
(4 11)))

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

1
game-config.data Normal file
View File

@ -0,0 +1 @@
(:foo :bar)

13
siam-farmer.asd Normal file
View File

@ -0,0 +1,13 @@
#+sbcl
(eval-when (:compile-toplevel :load-toplevel :execute)
;; raylib hands back floats that trip SBCL's FP traps otherwise.
(sb-int:set-floating-point-modes :traps nil))
(asdf:defsystem #:siam-farmer
:description "Tile-based farming game"
:author "Joseph Ferano"
:depends-on (#:cl-raylib #:livesupport)
:serial t
:pathname "src"
:components ((:file "engine")
(:file "game")))

View File

@ -51,17 +51,16 @@
;;; -------------------------------------------------------------------- grid
(declaim (ftype (function (fixnum fixnum) fixnum) idx)
(inline idx))
;; (declaim (ftype (function (fixnum fixnum) fixnum) idx)
;; (inline idx))
(defun idx (row col)
(declare (optimize (speed 3) (safety 0)))
(* (+ (* row +cols+) col) +stride+))
(declaim (ftype (function (row-index col-index) fixnum) test-idx))
(defun test-idx (row col bump)
(declare (optimize (speed 3) (safety 0)))
(let ((i (idx row col)))
(+ i bump)))
;; (declaim (ftype (function (row-index col-index) fixnum) test-idx))
;; (defun test-idx (row col bump)
;; (declare (optimize (speed 3) (safety 0)))
;; (let ((i (idx row col)))
;; (+ i bump)))
(defun tile-at (game layer row col)
"Returns (values atlas-id tile-row tile-col). atlas-id is -1 when empty."
@ -129,7 +128,7 @@
:dst-rects (compute-tileset-rects tiles))))
(defun init-game ()
(let ((tileset-path "source-assets/Sprout Lands Premium/Tilesets/ground tiles/New tiles/")
(let ((tileset-path "assets/")
(game (make-instance 'game)))
(setf (layers game)
(coerce (loop repeat +num-layers+ collect (e:make-int-grid +grid-len+ -1))