]> git.jsancho.org Git - guile-irrlicht.git/blob - irrlicht/bindings/scene.scm
2cf4568ae623c9f6708fb18936385401eb4a31f6
[guile-irrlicht.git] / irrlicht / bindings / scene.scm
1 ;;; guile-irrlicht --- FFI bindings for Irrlicht Engine
2 ;;; Copyright (C) 2019 Javier Sancho <jsf@jsancho.org>
3 ;;;
4 ;;; This file is part of guile-irrlicht.
5 ;;;
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.
10 ;;;
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.
15 ;;;
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/>.
19
20
21 (define-module (irrlicht bindings scene)
22   #:use-module (system foreign))
23
24 (define cirr (dynamic-link "libCIrrlicht"))
25
26 ;;  irr_scene_EMD2_ANIMATION_TYPE enum
27 (define-public EMAT_STAND                 0)
28 (define-public EMAT_RUN                   1)
29 (define-public EMAT_ATTACK                2)
30 (define-public EMAT_PAIN_A                3)
31 (define-public EMAT_PAIN_B                4)
32 (define-public EMAT_PAIN_C                5)
33 (define-public EMAT_JUMP                  6)
34 (define-public EMAT_FLIP                  7)
35 (define-public EMAT_SALUTE                8)
36 (define-public EMAT_FALLBACK              9)
37 (define-public EMAT_WAVE                 10)
38 (define-public EMAT_POINT                11)
39 (define-public EMAT_CROUCH_STAND         12)
40 (define-public EMAT_CROUCH_WALK          13)
41 (define-public EMAT_CROUCH_ATTACK        14)
42 (define-public EMAT_CROUCH_PAIN          15)
43 (define-public EMAT_CROUCH_DEATH         16)
44 (define-public EMAT_DEATH_FALLBACK       17)
45 (define-public EMAT_DEATH_FALLFORWARD    18)
46 (define-public EMAT_DEATH_FALLBACKSLOW   19)
47 (define-public EMAT_BOOM                 20)
48 (define-public EMAT_COUNT                21)
49
50 ;; Scene functions
51 (define-public add-animated-mesh-scene-node
52   (pointer->procedure
53    '*
54    (dynamic-func "irr_scene_addAnimatedMeshSceneNode" cirr)
55    (list '* '* '* int '* '* '* int)))
56
57 (define-public add-camera-scene-node
58   (pointer->procedure
59    '*
60    (dynamic-func "irr_scene_addCameraSceneNode" cirr)
61    (list '* '* '* '* int int)))
62
63 (define-public draw-all
64   (pointer->procedure
65    void
66    (dynamic-func "irr_scene_drawAll" cirr)
67    (list '*)))
68
69 (define-public get-mesh
70   (pointer->procedure
71    '*
72    (dynamic-func "irr_scene_getMesh" cirr)
73    (list '* '*)))
74
75 (define-public set-material-flag-am
76   (pointer->procedure
77    void
78    (dynamic-func "irr_scene_setMaterialFlagAM" cirr)
79    (list '* int int)))
80
81 (define-public set-material-texture-am
82   (pointer->procedure
83    void
84    (dynamic-func "irr_scene_setMaterialTextureAM" cirr)
85    (list '* int '*)))
86
87 (define-public set-md2-animation
88   (pointer->procedure
89    void
90    (dynamic-func "irr_scene_setMD2Animation" cirr)
91    (list '* int)))