From: Javier Sancho Date: Fri, 15 May 2020 05:58:25 +0000 (+0200) Subject: add-camera-scene-node-fps! X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=2cb9ebb90bdf488128d5443f0e26ae22cd41d3fa;p=guile-irrlicht.git add-camera-scene-node-fps! --- diff --git a/irrlicht.scm b/irrlicht.scm index b347841..2807ec8 100644 --- a/irrlicht.scm +++ b/irrlicht.scm @@ -30,6 +30,7 @@ #:duplicates (merge-generics) #:re-export (add-animated-mesh-scene-node! add-camera-scene-node! + add-camera-scene-node-fps! add-file-archive! add-octree-scene-node! add-static-text! diff --git a/irrlicht/irr.scm b/irrlicht/irr.scm index b1ffdcc..2c88358 100644 --- a/irrlicht/irr.scm +++ b/irrlicht/irr.scm @@ -40,3 +40,10 @@ (irr-class #:init-value "IEventReceiver")) (export ) + + +;; SKeyMap +(define-class () + (irr-class #:init-value "SKeyMap")) + +(export ) diff --git a/irrlicht/scene.scm b/irrlicht/scene.scm index 0d0618f..260bf9b 100644 --- a/irrlicht/scene.scm +++ b/irrlicht/scene.scm @@ -85,6 +85,29 @@ id make-active)))) +(define-method (add-camera-scene-node-fps! (scene-manager ) . rest) + (let-keywords rest #f + ((parent (make )) + (rotate-speed 100) + (move-speed 0.5) + (id -1) + (key-map-array (make )) + (key-map-size 0) + (no-vertical-movement #f) + (jump-speed 0) + (invert-mouse #f) + (make-active #t)) + (let ((addCameraSceneNodeFPS (get-irrlicht-proc "addCameraSceneNodeFPS" + scene-manager parent))) + (make + #:irr-pointer + (addCameraSceneNodeFPS scene-manager #:parent parent #:rotate-speed rotate-speed + #:move-speed move-speed #:id id #:key-map-array key-map-array + #:key-map-size key-map-size + #:no-vertical-movement no-vertical-movement + #:jump-speed jump-speed #:invert-mouse invert-mouse + #:make-active make-active))))) + (define-method (add-octree-scene-node! (scene-manager ) (mesh ) . rest) @@ -124,8 +147,8 @@ scene-manager filename))) -(export add-animated-mesh-scene-node! add-camera-scene-node! add-octree-scene-node! - draw-all get-mesh) +(export add-animated-mesh-scene-node! add-camera-scene-node! + add-camera-scene-node-fps! add-octree-scene-node! draw-all get-mesh) ;; ISceneNode