#include <irrlicht/irrlicht.h>
#include <libguile.h>
-
#include "gsubr.h"
#include "timer.h"
-#include "wrapped.h"
+
+
+using namespace irr;
+
+
+SCM
+ITimer_getTime (SCM timer)
+{
+ return scm_from_uint32 (((ITimer*) scm_to_pointer (timer))->getTime());
+}
+
extern "C" {
void
init_timer (void)
{
- init_timer_type ();
- DEFINE_GSUBR ("get-time", 1, 0, 0, irr_getTime);
- }
-
- DEFINE_WRAPPED_TYPE (irr::ITimer*, "timer",
- init_timer_type, timer_p,
- wrap_timer, unwrap_timer);
-
- SCM
- irr_getTime (SCM wrapped_timer)
- {
- return scm_from_uint32 (unwrap_timer (wrapped_timer)->getTime());
+ DEFINE_GSUBR ("ITimer_getTime", 1, 0, 0, ITimer_getTime);
}
}
#ifndef __GUILE_IRRLICHT_TIMER_H_INCLUDED__
#define __GUILE_IRRLICHT_TIMER_H_INCLUDED__
-#include <irrlicht/irrlicht.h>
-#include <libguile.h>
-#include "wrapped.h"
-
extern "C" {
-
void
init_timer (void);
-
- DECLARE_WRAPPED_TYPE (irr::ITimer*, init_timer_type,
- timer_p, wrap_timer, unwrap_timer);
-
- SCM
- irr_getTime (SCM wrapped_timer);
-
}
#endif