#include <libguile.h>
#include "animated-mesh-md2.h"
-irr::scene::EMD2_ANIMATION_TYPE
+
+using namespace irr;
+
+
+scene::EMD2_ANIMATION_TYPE
scm_to_md2_animation_type (SCM md2_animation_type)
{
char* flag = scm_to_utf8_stringn (scm_symbol_to_string (md2_animation_type), NULL);
if (!strcmp (flag, "stand"))
{
- return irr::scene::EMAT_STAND;
+ return scene::EMAT_STAND;
}
else if (!strcmp (flag, "run"))
{
- return irr::scene::EMAT_RUN;
+ return scene::EMAT_RUN;
}
else if (!strcmp (flag, "attack"))
{
- return irr::scene::EMAT_ATTACK;
+ return scene::EMAT_ATTACK;
}
else if (!strcmp (flag, "pain-a"))
{
- return irr::scene::EMAT_PAIN_A;
+ return scene::EMAT_PAIN_A;
}
else if (!strcmp (flag, "pain-b"))
{
- return irr::scene::EMAT_PAIN_B;
+ return scene::EMAT_PAIN_B;
}
else if (!strcmp (flag, "pain-c"))
{
- return irr::scene::EMAT_PAIN_C;
+ return scene::EMAT_PAIN_C;
}
else if (!strcmp (flag, "jump"))
{
- return irr::scene::EMAT_JUMP;
+ return scene::EMAT_JUMP;
}
else if (!strcmp (flag, "flip"))
{
- return irr::scene::EMAT_FLIP;
+ return scene::EMAT_FLIP;
}
else if (!strcmp (flag, "salute"))
{
- return irr::scene::EMAT_SALUTE;
+ return scene::EMAT_SALUTE;
}
else if (!strcmp (flag, "fallback"))
{
- return irr::scene::EMAT_FALLBACK;
+ return scene::EMAT_FALLBACK;
}
else if (!strcmp (flag, "wave"))
{
- return irr::scene::EMAT_WAVE;
+ return scene::EMAT_WAVE;
}
else if (!strcmp (flag, "point"))
{
- return irr::scene::EMAT_POINT;
+ return scene::EMAT_POINT;
}
else if (!strcmp (flag, "crouch-stand"))
{
- return irr::scene::EMAT_CROUCH_STAND;
+ return scene::EMAT_CROUCH_STAND;
}
else if (!strcmp (flag, "crouch-walk"))
{
- return irr::scene::EMAT_CROUCH_WALK;
+ return scene::EMAT_CROUCH_WALK;
}
else if (!strcmp (flag, "crouch-attack"))
{
- return irr::scene::EMAT_CROUCH_ATTACK;
+ return scene::EMAT_CROUCH_ATTACK;
}
else if (!strcmp (flag, "crouch-pain"))
{
- return irr::scene::EMAT_CROUCH_PAIN;
+ return scene::EMAT_CROUCH_PAIN;
}
else if (!strcmp (flag, "crouch-death"))
{
- return irr::scene::EMAT_CROUCH_DEATH;
+ return scene::EMAT_CROUCH_DEATH;
}
else if (!strcmp (flag, "death-fallback"))
{
- return irr::scene::EMAT_DEATH_FALLBACK;
+ return scene::EMAT_DEATH_FALLBACK;
}
else if (!strcmp (flag, "death-fallforward"))
{
- return irr::scene::EMAT_DEATH_FALLFORWARD;
+ return scene::EMAT_DEATH_FALLFORWARD;
}
else if (!strcmp (flag, "death-fallbackslow"))
{
- return irr::scene::EMAT_DEATH_FALLBACKSLOW;
+ return scene::EMAT_DEATH_FALLBACKSLOW;
}
else if (!strcmp (flag, "boom"))
{
- return irr::scene::EMAT_BOOM;
+ return scene::EMAT_BOOM;
}
else
{
#include "box3d.h"
#include "gsubr.h"
#include "vector3d.h"
-#include "wrapped.h"
-extern "C" {
- void
- init_box3d (void)
- {
- init_box3d_type ();
- DEFINE_GSUBR ("box3d-add-internal-point!", 2, 0, 0, box3d_add_internal_point);
- DEFINE_GSUBR ("box3d-reset!", 2, 0, 0, box3d_reset);
- DEFINE_GSUBR ("make-box3d", 0, 0, 0, make_box3d);
- }
+using namespace irr;
- DEFINE_WRAPPED_TYPE (irr::core::aabbox3df*, "box3d",
- init_box3d_type, box3d_p,
- wrap_box3d, unwrap_box3d);
- SCM
- box3d_add_internal_point (SCM box3d,
- SCM point)
- {
- irr::core::aabbox3df* aabbox = unwrap_box3d (box3d);
- aabbox->addInternalPoint (scm_to_vector3df (point));
- return SCM_UNSPECIFIED;
- }
+SCM
+irr_core_aabbox3d_addInternalPoint (SCM box3d,
+ SCM point)
+{
+ ((core::aabbox3df*)scm_to_pointer (box3d))->addInternalPoint (scm_to_vector3df (point));
+ return SCM_UNSPECIFIED;
+}
- SCM
- box3d_reset (SCM box3d,
- SCM init_value)
- {
- irr::core::aabbox3df* aabbox = unwrap_box3d (box3d);
- aabbox->reset (scm_to_vector3df (init_value));
- return SCM_UNSPECIFIED;
- }
- SCM
- make_box3d ()
+SCM
+irr_core_aabbox3d_make ()
+{
+ core::aabbox3df* aabbox = new core::aabbox3df ();
+ return scm_from_pointer ((void*)aabbox, NULL);
+}
+
+
+SCM
+irr_core_aabbox3d_reset (SCM box3d,
+ SCM init_value)
+{
+ ((core::aabbox3df*)scm_to_pointer (box3d))->reset (scm_to_vector3df (init_value));
+ return SCM_UNSPECIFIED;
+}
+
+
+extern "C" {
+
+ void
+ init_box3d (void)
{
- irr::core::aabbox3df* aabbox = new irr::core::aabbox3df ();
- return wrap_box3d (aabbox);
+ DEFINE_GSUBR ("irr_core_aabbox3d_addInternalPoint", 2, 0, 0,
+ irr_core_aabbox3d_addInternalPoint);
+ DEFINE_GSUBR ("irr_core_aabbox3d_make", 0, 0, 0,
+ irr_core_aabbox3d_make);
+ DEFINE_GSUBR ("irr_core_aabbox3d_reset", 2, 0, 0,
+ irr_core_aabbox3d_reset);
}
}