X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=irrlicht%2Fbindings%2Fscene.scm;fp=irrlicht%2Fbindings%2Fscene.scm;h=2cf4568ae623c9f6708fb18936385401eb4a31f6;hb=84886d64879f76a593b79327836b5d251d23af53;hp=0000000000000000000000000000000000000000;hpb=44d3c48c52a16aadadbf51f97be0938dcb9a3010;p=guile-irrlicht.git diff --git a/irrlicht/bindings/scene.scm b/irrlicht/bindings/scene.scm new file mode 100644 index 0000000..2cf4568 --- /dev/null +++ b/irrlicht/bindings/scene.scm @@ -0,0 +1,91 @@ +;;; guile-irrlicht --- FFI bindings for Irrlicht Engine +;;; Copyright (C) 2019 Javier Sancho +;;; +;;; This file is part of guile-irrlicht. +;;; +;;; Guile-irrlicht is free software; you can redistribute it and/or modify +;;; it under the terms of the GNU Lesser General Public License as +;;; published by the Free Software Foundation; either version 3 of the +;;; License, or (at your option) any later version. +;;; +;;; Guile-irrlicht 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 Lesser General Public +;;; License along with guile-irrlicht. If not, see +;;; . + + +(define-module (irrlicht bindings scene) + #:use-module (system foreign)) + +(define cirr (dynamic-link "libCIrrlicht")) + +;; irr_scene_EMD2_ANIMATION_TYPE enum +(define-public EMAT_STAND 0) +(define-public EMAT_RUN 1) +(define-public EMAT_ATTACK 2) +(define-public EMAT_PAIN_A 3) +(define-public EMAT_PAIN_B 4) +(define-public EMAT_PAIN_C 5) +(define-public EMAT_JUMP 6) +(define-public EMAT_FLIP 7) +(define-public EMAT_SALUTE 8) +(define-public EMAT_FALLBACK 9) +(define-public EMAT_WAVE 10) +(define-public EMAT_POINT 11) +(define-public EMAT_CROUCH_STAND 12) +(define-public EMAT_CROUCH_WALK 13) +(define-public EMAT_CROUCH_ATTACK 14) +(define-public EMAT_CROUCH_PAIN 15) +(define-public EMAT_CROUCH_DEATH 16) +(define-public EMAT_DEATH_FALLBACK 17) +(define-public EMAT_DEATH_FALLFORWARD 18) +(define-public EMAT_DEATH_FALLBACKSLOW 19) +(define-public EMAT_BOOM 20) +(define-public EMAT_COUNT 21) + +;; Scene functions +(define-public add-animated-mesh-scene-node + (pointer->procedure + '* + (dynamic-func "irr_scene_addAnimatedMeshSceneNode" cirr) + (list '* '* '* int '* '* '* int))) + +(define-public add-camera-scene-node + (pointer->procedure + '* + (dynamic-func "irr_scene_addCameraSceneNode" cirr) + (list '* '* '* '* int int))) + +(define-public draw-all + (pointer->procedure + void + (dynamic-func "irr_scene_drawAll" cirr) + (list '*))) + +(define-public get-mesh + (pointer->procedure + '* + (dynamic-func "irr_scene_getMesh" cirr) + (list '* '*))) + +(define-public set-material-flag-am + (pointer->procedure + void + (dynamic-func "irr_scene_setMaterialFlagAM" cirr) + (list '* int int))) + +(define-public set-material-texture-am + (pointer->procedure + void + (dynamic-func "irr_scene_setMaterialTextureAM" cirr) + (list '* int '*))) + +(define-public set-md2-animation + (pointer->procedure + void + (dynamic-func "irr_scene_setMD2Animation" cirr) + (list '* int)))