From: Giulio De Stasio Date: Mon, 16 Jan 2023 09:49:00 +0000 (+0100) Subject: inputs.lisp: better input system for mouse X-Git-Url: http://git.osdn.net/view?p=rulp%2Frulp.git;a=commitdiff_plain;h=99720244c4c1b58b7037da88b7bec93d91a45a25 inputs.lisp: better input system for mouse --- diff --git a/Makefile b/Makefile index 4c1a2a6..df901f8 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,12 @@ CL = sbcl OUTPUT = rulp -SYSTEM = $(shell uname -o) -VERSION = 0.0.1 + +# informations for package generation +SYSTEM = $(shell uname -o) +VERSION = $(shell sed -e 's/.*:version\ "\(.*\)"/\1/' -ne '/^[0-9]/p' system.asd) +ARCH = $(shell uname -m) + TOOLS = tools #create the directory -ARCH = $(shell uname -m) # to be autogenerated INSTALL-PATH = $(RPM_BUILD_ROOT)/usr/ SHARE-PATH = $(RPM_BUILD_ROOT)/usr/share/rulp/ LOCAL-PATH = ~/.local/rulp/ diff --git a/core.lisp b/core.lisp index 8e5bd33..f8ef07e 100644 --- a/core.lisp +++ b/core.lisp @@ -1,3 +1,19 @@ +;;;; Ru*** roLeplay Playground virtual tabletop +;;;; Copyright (C) 2022 Zull +;;;; +;;;; This program is free software: you can redistribute it and/or modify +;;;; it under the terms of the GNU General Public License as published by +;;;; the Free Software Foundation, either version 3 of the License, or +;;;; (at your option) any later version. +;;;; +;;;; This program is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;;; GNU General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU General Public License +;;;; along with this program. If not, see . + (in-package :core) (defparameter *screen-width* 1000) @@ -121,27 +137,16 @@ ;; "Ru■■■ Lisp Playground" -(defun start-pipe (mapfile &optional initfile) - (test-correctness-required mapfile "json") - (test-correctness-optional initfile "lisp") - (format t "rulp-~A on ~A-~A~%" - parameters:+rulp-version+ - parameters:+rulp-system+ - parameters:+rulp-type+) - (if initfile (load initfile) (load "init.lisp" :if-does-not-exist nil)) - (setf graphics:+plane+ (create-plane-from-json mapfile)) - (graphics:playground (format nil "RULP start-pipe")) - ) - - (defun repl-pipe (mapfile &optional initfile) - (test-correctness-required mapfile "json") - (test-correctness-optional initfile "lisp") - (format t "rulp-~A on ~A-~A~%" - parameters:+rulp-version+ - parameters:+rulp-system+ - parameters:+rulp-type+) - (if initfile (load initfile) (load "init.lisp" :if-does-not-exist nil)) - (setf graphics:+plane+ (create-plane-from-json mapfile)) - (graphics:playground (format nil "RULP start-pipe")) + (test-correctness-required mapfile "json") + (test-correctness-optional initfile "lisp") + (format t "rulp-~A on ~A-~A~%" + parameters:+rulp-version+ + parameters:+rulp-system+ + parameters:+rulp-type+) + (if initfile (load initfile) (load "init.lisp" :if-does-not-exist nil)) + (setf graphics:+plane+ (create-plane-from-json mapfile)) + (graphics:playground (format nil "RULP over repl")) ) + +(defun start () (repl-pipe "lab/test.json")) diff --git a/data.lisp b/data.lisp index 68d1fc7..2c3dd0a 100644 --- a/data.lisp +++ b/data.lisp @@ -13,6 +13,7 @@ ;;;; ;;;; You should have received a copy of the GNU General Public License ;;;; along with this program. If not, see . + (in-package :core) (defun decode-from-json (json-file) diff --git a/graphics/grid.lisp b/graphics/grid.lisp index 81b5a07..986acef 100644 --- a/graphics/grid.lisp +++ b/graphics/grid.lisp @@ -46,47 +46,57 @@ (setf +is-grid-letters+ nil) (setf +is-grid-letters+ t))) -;;; FIXME: grid renders always from top and not from actual position, grid doesn't move with view -(defmacro grid-render (renderer plane &optional (r 0) (g 0) (b 0)) - `(let ((x-offset (x ,plane)) - (y-offset (y ,plane)) - (x-iterations (/ *window-width* (grid-dimension ,plane))) - (y-iterations (/ *window-height* (grid-dimension ,plane))) +(defmacro grid-render (renderer plane &optional (x 0) (y 0) (w 100) (h 100)) + "renderize a grid in where required" + `(let ((neg-x (* ,x -1)) + (neg-y (* ,y -1)) + (plane-x (x ,plane)) + (plane-y (y ,plane)) + (x-iterations (/ (- ,w ,x) (grid-dimension ,plane))) + (y-iterations (/ (- ,h ,y) (grid-dimension ,plane))) (grid-spacing (grid-dimension ,plane))) - (progn - (sdl2:set-render-draw-color ,renderer ,r ,g ,b 255) - (loop :for i :from 1 :to x-iterations - :do - (sdl2:render-draw-line ,renderer - (+ (* i grid-spacing) x-offset) - y-offset - (+ (* i grid-spacing) x-offset) - (+ *window-height* y-offset)) - ) - (loop :for j :from 1 :to y-iterations - :do - (sdl2:render-draw-line ,renderer - x-offset - (+ (* j grid-spacing) y-offset) - (+ *window-width* x-offset) - (+ (* j grid-spacing) y-offset)) - )) - (sdl2:set-render-draw-color ,renderer 0 0 0 255) - )) + (progn + ;; (sdl2:set-render-draw-color ,renderer ,red ,green ,blue 255) + (loop :for i :from (ceiling (/ neg-x grid-spacing)) :to x-iterations + :do + (sdl2:render-draw-line ,renderer + (+ (* i grid-spacing) plane-x) + (+ plane-y neg-y) + (+ (* i grid-spacing) plane-x) + (+ ,h plane-y neg-y)) + ) + (loop :for j :from (ceiling (/ neg-y grid-spacing)) :to y-iterations + :do + (sdl2:render-draw-line ,renderer + (+ plane-x neg-x) + (+ (* j grid-spacing) plane-y) + (+ plane-x ,w neg-x) + (+ (* j grid-spacing) plane-y)) + )) + (sdl2:set-render-draw-color ,renderer 0 0 0 255) + )) -;;; FIXME: same as grid-render -(defmacro indexes-render (renderer plane &optional (r 0) (g 0) (b 0)) - `(let ((x-offset (x ,plane)) +(defmacro indexes-render (renderer plane &optional (x 0) (y 0) (w 0) (h 0)) + `(let ((neg-x (* ,x -1)) + (neg-y (* ,y -1)) + (x-offset (x ,plane)) (y-offset (y ,plane)) - (x-iterations (/ *window-width* (grid-dimension ,plane))) - (y-iterations (/ *window-height* (grid-dimension ,plane))) + (x-iterations (/ (- ,w ,x) (grid-dimension ,plane))) + (y-iterations (/ (- ,h ,y) (grid-dimension ,plane))) (grid-spacing (grid-dimension ,plane))) - (loop :for k :from 0 :to x-iterations - :do (loop :for l :from 0 :to y-iterations + (loop :for k :from (floor (/ neg-x grid-spacing)) :to x-iterations + :do (loop :for l :from (floor (/ neg-y grid-spacing)) :to y-iterations :do (tr-write (coordinate-to-grid-index (cons l (+ k 1))) (+ x-offset (* k grid-spacing)) (+ y-offset (* l grid-spacing)) (floor (/ grid-spacing 3)) (floor (/ grid-spacing 3)) ,renderer))) + ;; (sdl2:set-render-draw-color ,renderer 0 255 0 100) ; remember to uncomment both + ;; (sdl2:render-fill-rect ,renderer (sdl2:make-rect ,x ,y ,w ,h)) ; test for x y w and h )) + +;;; BUG: the coordinates given to the macros are incorrect. The render-fill-rect test +;;; proven that the coordinates are not faithful of the view point visual. These +;;; coordinate must be adjusted so the (now commented) render-fill-rect line will +;;; always fill all the screen diff --git a/graphics/inputs.lisp b/graphics/inputs.lisp index eeabd4b..7946fd5 100644 --- a/graphics/inputs.lisp +++ b/graphics/inputs.lisp @@ -16,43 +16,67 @@ (in-package :graphics) +;; this functions are changed every frame with the mouse position. This +;; is then used everywhere. This assure syncronization between two functions. +;; The values are stored in a cons and can be exported with (x *mouse-position*) +;; and (y *mouse-position*) +(defparameter *mouse-position* '(0 . 0) + "contains the mouse coordinates in the screen, this is updated by frame") +(defparameter *mouse-previous-position* '(0 . 0) + "contains the mouse coordinates on the previous frame, this is updated by frame +using *mouse-position*. The usefullness of this value is to create velocity") + +(defparameter *is-mouse-hold* nil + "this variable is modified when a button is hold down. This doesn't specifies +which button is being hold.") (defparameter +mode+ '+normal-mode+) -(defgeneric select-entry (x y p) - (:documentation "operate with menues, create them, destroy them and apply them")) +(defun mouse-actions (keybinds) + "given an association list of keybinds it returns the associated element +when the button is pressed" + (loop :for button :in keybinds + :collect (when (sdl2:mouse-state-p (eval (car button))) ; BUG: watch out for this eval + (cdr button)))) + +;; NOTE: this is a frame dependent version, correction is easy when i'll have +;; time deltas. +(defun velocity (actual-point previous-point) + "calculate the delta between two points. This is absolutely frame dependent" + (cons (- (car actual-point) (car previous-point)) + (- (cdr actual-point) (cdr previous-point)))) + +(defun panning (value delta) + "destructive function. It update the value with the given delta. Both value +and delta are coordinate cons (like '(x . y))" + (setf (car value) (+ (car value) (car delta)) + (cdr value) (+ (cdr value) (cdr delta)))) + +;; (defgeneric select-entry (x y p) +;; (:documentation "operate with menues, create them, destroy them and apply them")) ;; (defgeneric key-activate (x y pressed p)) ;; (defmethod key-activate (x y pressed (p plane)) ;; ) -(defgeneric activate (x y pressed p) - (:documentation "given x y and the button pressed it do actions")) +;; (defgeneric activate (x y pressed p) +;; (:documentation "given x y and the button pressed it do actions")) -(defmethod activate (x y pressed (p plane)) - (loop :for key :in *mouse-keybinds* - :do - (when (sdl2:mouse-state-p (eval (car key))) - (apply (cadr key) `(,x ,y ,p)) - ))) +;; (defmethod activate (x y pressed (p plane)) +;; (loop :for key :in *mouse-keybinds* +;; :do +;; (when (sdl2:mouse-state-p (eval (car key))) +;; (apply (cadr key) `(,x ,y ,p)) +;; ))) -(defmethod select-entry (x y (p t)) - "generic version, does nothing" - nil) -(defmethod select-entry (x y (p plane)) - "starts from plane, it search for entities or entries and then redirect -to the correct method" - (select-entry (x y (find-on-plane x y p))) - ) +;; FIXME: this method can be designed non destructively. by just returning the position +;; in the list of the selected entity +(defgeneric select-pointer (coordinate p)) -(defmethod select-entry (x y (p entity)) - "an entity is selected" - ) - -(defmethod select-pointer (x y (p plane)) +(defmethod select-pointer (coordinate (p plane)) "with left button it select and deselect entities the map-gplane contain" - (let ((mouse-point (sdl2:make-rect x y 10 10)) + (let ((mouse-point (sdl2:make-rect (car coordinate) (cdr coordinate) 10 10)) (entities (entities-list p))) (setf *pointer* nil) (loop :for obj :in entities @@ -63,24 +87,17 @@ to the correct method" (setf *pointer* obj-nth))) )) -(defmethod move-entity (x y (p plane)) +(defgeneric move-entity (coordinate p)) + +(defmethod move-entity (coordinate (p plane)) "with right button it move the entity around the plane" (when (numberp *pointer*) (let* ((x-offset (x p)) (y-offset (y p)) - (i-x (floor (/ (- x x-offset) (grid-dimension p)))) - (i-y (floor (/ (- y y-offset) (grid-dimension p)))) + (i-x (floor (/ (- (car coordinate) x-offset) (grid-dimension p)))) + (i-y (floor (/ (- (cdr coordinate) y-offset) (grid-dimension p)))) (object (nth *pointer* (entities-list p)))) (setf (coordinate object) (cons i-x i-y)) ;; (setf (x object) i-x) ;; (setf (y object) i-y) ))) - -;;; procedural solution, find a better version without global variables -(defmethod mouse-view (x y (p plane)) - "update teh mouse-movement-delta" - (setf *mouse-movement-delta* (list (- x (car *previous-mouse-position*)) - (- y (cadr *previous-mouse-position*)))) - (setf *previous-mouse-position* (list x y)) - (format t "mouse-delta ~A~%" *mouse-movement-delta*) - ) diff --git a/graphics/package.lisp b/graphics/package.lisp index 59174c6..7be7b95 100644 --- a/graphics/package.lisp +++ b/graphics/package.lisp @@ -38,13 +38,13 @@ grid square of the entity" ) ;; tr stands for text-rendering -(defparameter *tr-string* "abcdefghijklmnopqrstuvwxyz 0123456789" +(defparameter *tr-string* "abcdefghijklmnopqrstuvwxyz 0123456789-" "This string is used to generate a texture with the alphabet, the software in the text.lisp file will 'write' on the screen selecting squares and using this string again to parse a string variable into coordinate in the texture" ) -(defparameter *alphabet* "abcdefghijklmnopqrstuvwxyz" +(defparameter *alphabet* "abcdefghijklmnopqrstuvwxyz-" "this is used to generate the grid, when the coordinates run out of letters they restart from the beginning" ) @@ -59,19 +59,14 @@ with render-copy") (defconstant +mouse-button-middle+ 2 "this binds the scroll button") (defparameter *mouse-keybinds* (list - '(+mouse-button-left+ select-pointer) - ;; '(+mouse-button-middle+ mouse-view) - '(+mouse-button-right+ move-entity) + '(+mouse-button-left+ nil (select-pointer *mouse-position* +plane+)) + '(+mouse-button-middle+ (panning (coordinate +plane+) (velocity *mouse-position* *mouse-previous-position*))) + '(+mouse-button-right+ nil (move-entity *mouse-position* +plane+)) ) - "This list associate the button presses to a certain action, the action is evaluated -as shown in graphics/input.lisp" + "This is the mouse-keybinds association list. The first value is the button, the second +is the action executed on hold and the third is the action executed on release (if any)" ) -(defparameter *previous-mouse-position* '(0 0)) -(defparameter *mouse-movement-delta* '(0 0) - "this parameter acknowledge saves the difference between the frames in mouse position. -It is used to move the plane around using the mouse") - (defparameter *is-grid* t "Parameter for displaying the grid, when nil it does not display a grid, when t diff --git a/graphics/render.lisp b/graphics/render.lisp index 34139db..dcd34f4 100644 --- a/graphics/render.lisp +++ b/graphics/render.lisp @@ -1,3 +1,19 @@ +;;;; Ru*** roLeplay Playground virtual tabletop +;;;; Copyright (C) 2022 Zull +;;;; +;;;; This program is free software: you can redistribute it and/or modify +;;;; it under the terms of the GNU General Public License as published by +;;;; the Free Software Foundation, either version 3 of the License, or +;;;; (at your option) any later version. +;;;; +;;;; This program is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;;; GNU General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU General Public License +;;;; along with this program. If not, see . + (in-package :graphics) (defgeneric texture (s)) diff --git a/graphics/view.lisp b/graphics/view.lisp index 252d837..4303e4a 100644 --- a/graphics/view.lisp +++ b/graphics/view.lisp @@ -23,6 +23,7 @@ (defmacro with-playground ((window renderer &key (title "RuLP")) &body body) `(sdl2:with-window (,window :title title :w *window-width* :h *window-height* :flags '(:resizable)) + ;; NOTE: here is where you should set the window icon, if there's the method to do that (sdl2:with-renderer (,renderer ,window :index -1 :flags '(:accelerated :presentvsync)) ;later add delta (sdl2-image:init '(:png :jpg)) (sdl2-ttf:init) @@ -34,6 +35,7 @@ ;; FIXME: temporary place (defparameter *viewpoint-offset* '(0 . 0)) (defparameter *viewpoint-zoom* 1) +(defparameter *mouse-previous* '(0 . 0)) ;; renderer exists only inside this function, so you cannot create a texture outside ;; (at least for now), more on this later os @@ -43,14 +45,15 @@ DEBUG-INFO can be used to display the content on screen for test and debug purpo (declare (ignore fps)) (sdl2:with-init (:video) (with-playground (window *renderer* :title title) - (setf *tr-texture* (let* ((font (sdl2-ttf:open-font "media/IBMPlex.ttf" 100)) ;; FIXME: this line throw fault, works anyway + (setf *tr-texture* (let* ((font (sdl2-ttf:open-font "media/IBMPlex.ttf" 100)) ;; FIXME: this crashes the program under windows, throws error on linux but works anyway (font-surface (sdl2-ttf:render-text-solid font *tr-string* 0 0 0 0)) (font-texture (sdl2:create-texture-from-surface *renderer* font-surface))) (sdl2:free-surface font-surface) font-texture)) ;; NOTE: all those variables are binded to +plane+. This should be updated whenever +plane+ is ;; no longer the default plane - (let ((window-texture (sdl2:get-render-target *renderer*)) + (let ((mouse-button-previous nil) + (window-texture (sdl2:get-render-target *renderer*)) (viewpoint-texture (sdl2:create-texture *renderer* (sdl2:get-window-pixel-format window) 2 (width +plane+) (height +plane+)))) (sdl2:with-event-loop (:method :poll) @@ -66,13 +69,44 @@ DEBUG-INFO can be used to display the content on screen for test and debug purpo (when (sdl2:keyboard-state-p :scancode-m) (setf *viewpoint-zoom* (+ *viewpoint-zoom* -0.2))) ) (:mousebuttondown (:x x :y y :state state) -;; BUG: incorporate into input.lisp. This event handler activate once, while i need it to activate when the button is pressed - (loop :for key :in *mouse-keybinds* - :do (when (sdl2:mouse-state-p (eval (car key))) - (apply (cadr key) `(,x ,y ,+plane+)))) - (when +plane+ - (activate x y state +plane+))) + (setf *is-mouse-hold* t) + ) + (:mousebuttonup () + ;; this routine seems identical to the one in idle, instead + ;; of calling the second element of the keybind list it calls + ;; the third element. If there is something there it would + ;; execute a special function for when the mouse is released. + (setf *is-mouse-hold* nil) + (loop :for action :in mouse-button-previous + :do (when (cdr action) (eval (cadr action)))) + (setf mouse-button-previous nil) + ;; what about functions that require a single press? just create + ;; a keybind (+key+ nil (...)) and it will execute just on + ;; release and not on hold + ) + (:windowevent () + ;; bug prevention method. SDL2 can look the :mousebuttonup event + ;; only when the mouse is on the window. This makes press, + ;; alt+tab and release a way to keep the value to t. This + ;; event is a prevention method designed to release the hold + ;; when alt+tab or other window shortcuts are used. + (setf *is-mouse-hold* nil)) + (:multigesture () + ;; same as for windowevent + (setf *is-mouse-hold* nil)) (:idle () + (setf *mouse-previous-position* *mouse-position*) + (multiple-value-bind (x y) (sdl2:mouse-state) + (setf *mouse-position* (cons x y))) + ;; mouse-holding-event + ;; FIXME: absolutely horrible. to be moved inside input.lisp for better functionalities + (when *is-mouse-hold* + (loop :for action :in (mouse-actions *mouse-keybinds*) + :do (when action (eval (car action))) ; FIXME: replace eval with a more safer DSL eval + ) + (setf mouse-button-previous (mouse-actions *mouse-keybinds*)) + ) + ;; trick to avoid functions to change the global draw-color (sdl2:set-render-draw-color *renderer* 0 0 0 255) ;; clear view @@ -82,33 +116,29 @@ DEBUG-INFO can be used to display the content on screen for test and debug purpo (sdl2:set-render-target *renderer* viewpoint-texture) (sdl2:render-clear *renderer*) (render-plane-and-contents *renderer* +plane+) + ;; NOTE: grid-render supports multiple colors for grids + (grid-render *renderer* +plane+ (car *viewpoint-offset*) (cdr *viewpoint-offset*) + (floor (* (width +plane+) *viewpoint-zoom*)) + (floor (* (height +plane+) *viewpoint-zoom*))) + (indexes-render *renderer* +plane+ (car *viewpoint-offset*) (cdr *viewpoint-offset*) + (floor (* (width +plane+) *viewpoint-zoom*)) + (floor (* (height +plane+) *viewpoint-zoom*))) (sdl2:set-render-target *renderer* window-texture) - ;; BUG: this system creates sickness. the viewpoint-texture is updated with some - ;; lag, making it wobbly (sdl2:render-copy *renderer* viewpoint-texture :source-rect nil :dest-rect (sdl2:make-rect (car *viewpoint-offset*) - (cdr *viewpoint-offset*) - (floor (* (width +plane+) *viewpoint-zoom*)) ; NOTE: hardcoded to +plane+, change to dynamic - (floor (* (height +plane+) *viewpoint-zoom*))) + (cdr *viewpoint-offset*) + (floor (* (width +plane+) *viewpoint-zoom*)) ; NOTE: hardcoded to +plane+, change to dynamic + (floor (* (height +plane+) *viewpoint-zoom*))) ) - ;; (when +plane+ - ;; (sdl2:render-copy *renderer* (texture +plane+) - ;; :source-rect (screen-source +plane+) - ;; :dest-rect (screen-destination +plane+ t)) - ;; (loop :for entities :in (entities-list +plane+) - ;; :do - ;; (when (displayp entities) - ;; (sdl2:render-copy *renderer* (texture entities) - ;; :source-rect (screen-source entities) - ;; :dest-rect (screen-destination entities +plane+)))) - ;; ;; Grid creation - ;; (when *is-grid* - ;; (grid-render *renderer* +plane+)) - ;; ;; Indexes creation - ;; (when *is-indexes* - ;; (indexes-render *renderer* +plane+)) - ;; ) + ;; Grid creation + ;; NOTE: grid creation should be done before, so to render on global, but it should be limited with actual viewpoint restrictions + ;; to reduce cycles + ;; (when *is-grid* + ;; (grid-render *renderer* +plane+)) + ;; Indexes creation + ;; (when *is-indexes* + ;; (indexes-render *renderer* +plane+)) ;; pointer section (when *pointer* (sdl2:set-render-draw-color *renderer* 128 250 33 255) @@ -137,4 +167,4 @@ DEBUG-INFO can be used to display the content on screen for test and debug purpo (multiple-value-bind (new-width new-height) (sdl2:get-window-size window) (setf *window-width* new-width) (setf *window-height* new-height))))))) -) + ) diff --git a/layers/models.lisp b/layers/models.lisp index 3e3b312..210d73e 100644 --- a/layers/models.lisp +++ b/layers/models.lisp @@ -1,3 +1,19 @@ +;;;; Ru*** roLeplay Playground virtual tabletop +;;;; Copyright (C) 2022 Zull +;;;; +;;;; This program is free software: you can redistribute it and/or modify +;;;; it under the terms of the GNU General Public License as published by +;;;; the Free Software Foundation, either version 3 of the License, or +;;;; (at your option) any later version. +;;;; +;;;; This program is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;;; GNU General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU General Public License +;;;; along with this program. If not, see . + (in-package :layers) (defgeneric create-entity (m)) diff --git a/layers/package.lisp b/layers/package.lisp index bfeb6cf..89841ba 100644 --- a/layers/package.lisp +++ b/layers/package.lisp @@ -1,3 +1,19 @@ +;;;; Ru*** roLeplay Playground virtual tabletop +;;;; Copyright (C) 2022 Zull +;;;; +;;;; This program is free software: you can redistribute it and/or modify +;;;; it under the terms of the GNU General Public License as published by +;;;; the Free Software Foundation, either version 3 of the License, or +;;;; (at your option) any later version. +;;;; +;;;; This program is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;;; GNU General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU General Public License +;;;; along with this program. If not, see . + (defpackage :layers (:use :cl) (:export screen x y width height rotation path texture surface image-path diff --git a/parameters.lisp b/parameters.lisp index dcaf388..2400c14 100644 --- a/parameters.lisp +++ b/parameters.lisp @@ -1,11 +1,19 @@ -;;; parameters, these are automatically generated in compile time -;;; -;;; when the system is executed with no compilation you will find unknown -;;; in place of the real thing, don't worry, the system is constantly -;;; tested and used in unknow mode -;;; -;;; If you have any trouble compiling just contact me on the project -;;; page osdn.net/projects/rulp/ +;;;; Ru*** roLeplay Playground virtual tabletop +;;;; Copyright (C) 2022 Zull +;;;; +;;;; This program is free software: you can redistribute it and/or modify +;;;; it under the terms of the GNU General Public License as published by +;;;; the Free Software Foundation, either version 3 of the License, or +;;;; (at your option) any later version. +;;;; +;;;; This program is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;;; GNU General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU General Public License +;;;; along with this program. If not, see . + (defpackage parameters (:use :cl) (:export +rulp-version+ +rulp-type+ +rulp-system+ *rulp-share* *rulp-local*)) diff --git a/start.lisp b/start.lisp index 22b4d0f..b425270 100644 --- a/start.lisp +++ b/start.lisp @@ -1,3 +1,3 @@ (load "system.asd") (require :rulp) -(core::start-pipe "lab/test.json") +(core::start) diff --git a/system.asd b/system.asd index 232f58a..740fe7a 100644 --- a/system.asd +++ b/system.asd @@ -22,7 +22,8 @@ :build-operation "program-op" :build-pathname "rulp" :entry-point "core:main" - :depends-on ("sdl2" "sdl2-image" "sdl2-ttf" "cffi-libffi" "alexandria" "cl-cffi-gtk" "clingon" "cl-json") + ;; :depends-on ("sdl2" "sdl2-image" "sdl2-ttf" "cffi-libffi" "alexandria" "clingon" "cl-json") + :depends-on ("sdl2" "sdl2-image" "sdl2-ttf" "alexandria" "clingon" "cl-json") :components ((:file "parameters") (:module "layers" :serial t