1 ;;; guile-irrlicht --- FFI bindings for Irrlicht Engine
2 ;;; Copyright (C) 2019 Javier Sancho <jsf@jsancho.org>
4 ;;; This file is part of guile-irrlicht.
6 ;;; Guile-irrlicht is free software; you can redistribute it and/or modify
7 ;;; it under the terms of the GNU Lesser General Public License as
8 ;;; published by the Free Software Foundation; either version 3 of the
9 ;;; License, or (at your option) any later version.
11 ;;; Guile-irrlicht is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 ;;; General Public License for more details.
16 ;;; You should have received a copy of the GNU Lesser General Public
17 ;;; License along with guile-irrlicht. If not, see
18 ;;; <http://www.gnu.org/licenses/>.
21 (define-module (irrlicht bindings scene)
22 #:use-module (system foreign)
23 #:use-module (irrlicht util foreign))
25 ;; irr_scene_EMD2_ANIMATION_TYPE enum
26 (define-public EMAT_STAND 0)
27 (define-public EMAT_RUN 1)
28 (define-public EMAT_ATTACK 2)
29 (define-public EMAT_PAIN_A 3)
30 (define-public EMAT_PAIN_B 4)
31 (define-public EMAT_PAIN_C 5)
32 (define-public EMAT_JUMP 6)
33 (define-public EMAT_FLIP 7)
34 (define-public EMAT_SALUTE 8)
35 (define-public EMAT_FALLBACK 9)
36 (define-public EMAT_WAVE 10)
37 (define-public EMAT_POINT 11)
38 (define-public EMAT_CROUCH_STAND 12)
39 (define-public EMAT_CROUCH_WALK 13)
40 (define-public EMAT_CROUCH_ATTACK 14)
41 (define-public EMAT_CROUCH_PAIN 15)
42 (define-public EMAT_CROUCH_DEATH 16)
43 (define-public EMAT_DEATH_FALLBACK 17)
44 (define-public EMAT_DEATH_FALLFORWARD 18)
45 (define-public EMAT_DEATH_FALLBACKSLOW 19)
46 (define-public EMAT_BOOM 20)
47 (define-public EMAT_COUNT 21)
50 (define-foreign add-animated-mesh-scene-node
51 '* "irr_scene_addAnimatedMeshSceneNode" (list '* '* '* int '* '* '* int))
53 (define-foreign add-camera-scene-node
54 '* "irr_scene_addCameraSceneNode" (list '* '* '* '* int int))
56 (define-foreign add-camera-scene-node-fps
57 '* "irr_scene_addCameraSceneNodeFPS" (list '* '* float float int '* int int float int int))
59 (define-foreign add-custom-scene-node
60 '* "irr_scene_addCustomSceneNode" (list '* '* int '* '* '* '* '* '* '*))
62 (define-foreign add-octree-scene-node
63 '* "irr_scene_addOctreeSceneNode" (list '* '* '* int int int))
65 (define-foreign draw-all
66 void "irr_scene_drawAll" (list '*))
68 (define-foreign get-mesh
69 '* "irr_scene_getMesh" (list '* '*))
71 (define-foreign get-root-scene-node
72 '* "irr_scene_getRootSceneNode" (list '*))
74 (define-foreign set-material-flag
75 void "irr_scene_setMaterialFlag" (list '* int int))
77 (define-foreign set-material-texture
78 void "irr_scene_setMaterialTexture" (list '* int '*))
80 (define-foreign set-md2-animation
81 void "irr_scene_setMD2Animation" (list '* int))
83 (define-foreign set-position
84 void "irr_scene_setPosition" (list '* '*))