#include "audio/sound_manager.hpp"
#include "audio/sound_source.hpp"
#include "log.hpp"
+#include "scripting/squirrel_util.hpp"
AmbientSound::AmbientSound(const lisp::Lisp& lisp)
{
+ name="";
position.x = 0;
position.y = 0;
log_warning << "No Position in ambient_sound" << std::endl;
}
+ lisp.get("name" , name);
lisp.get("width" , dimension.x);
lisp.get("height", dimension.y);
{
}
+void
+AmbientSound::expose(HSQUIRRELVM vm, SQInteger table_idx)
+{
+ Scripting::AmbientSound* interface = static_cast<Scripting::AmbientSound*> (this);
+ expose_object(vm, table_idx, interface, name, false);
+}
+
+void
+AmbientSound::unexpose(HSQUIRRELVM vm, SQInteger table_idx)
+{
+ Scripting::unexpose_object(vm, table_idx, name);
+}
+
+void
+AmbientSound::set_pos(float x, float y){
+ position.x = x;
+ position.y = y;
+}
+
+float
+AmbientSound::get_pos_x(){;
+ return position.x;
+}
+
+float
+AmbientSound::get_pos_y(){
+ return position.y;
+}
+
IMPLEMENT_FACTORY(AmbientSound, "ambient_sound");