/**
* Ambient Sound Source, gamma version. Features:
*
- * - "rounded rectancle" geometry with position, dimension and
- * "rounding radius" (extending in all directions) of a 100%
- * volume area, adjustable maximum volume, inverse square
+ * - "rounded rectancle" geometry with position, dimension and
+ * "rounding radius" (extending in all directions) of a 100%
+ * volume area, adjustable maximum volume, inverse square
* falloff outside area.
- *
+ *
* - degenerates gracefully to a disc for dimension=0
- *
+ *
* - parameters:
*
* x, y position
* distance_bias high = big "100% disc"
* silence_distance defaults reasonably.
* sample sample to be played back in loop mode
- *
- * basti_
+ *
+ * basti_
*/
#ifndef __AMBIENT_SOUND_H__
#include "resources.hpp"
#include "player.hpp"
#include "script_interface.hpp"
+#include "scripting/ambient_sound.hpp"
class SoundSource;
-class AmbientSound : public GameObject, public ScriptInterface
+class AmbientSound : public GameObject, public ScriptInterface, public Scripting::AmbientSound
{
public:
AmbientSound(const lisp::Lisp& lisp);
{
return position;
}
+
+ // --- Scripting Interface ---
+
+ void set_pos(float x, float y);
+ float get_pos_x();
+ float get_pos_y();
+
protected:
virtual void hit(Player& player);
virtual void update(float time);
float distance_factor; /// distance scaling
float distance_bias; /// 100% volume disc radius
- float silence_distance; /// not implemented yet
+ float silence_distance; /// not implemented yet
float maximumvolume; /// maximum volume
float targetvolume; /// how loud we want to be
};
#endif
-