diff options
Diffstat (limited to 'servers/spatial_sound_2d')
-rw-r--r-- | servers/spatial_sound_2d/spatial_sound_2d_server_sw.cpp | 18 | ||||
-rw-r--r-- | servers/spatial_sound_2d/spatial_sound_2d_server_sw.h | 20 |
2 files changed, 19 insertions, 19 deletions
diff --git a/servers/spatial_sound_2d/spatial_sound_2d_server_sw.cpp b/servers/spatial_sound_2d/spatial_sound_2d_server_sw.cpp index a930daf729..33e51eb262 100644 --- a/servers/spatial_sound_2d/spatial_sound_2d_server_sw.cpp +++ b/servers/spatial_sound_2d/spatial_sound_2d_server_sw.cpp @@ -205,7 +205,7 @@ PoolVector<Point2> SpatialSound2DServerSW::room_get_bounds(RID p_room) const { return room->bounds; } -void SpatialSound2DServerSW::room_set_transform(RID p_room, const Matrix32& p_transform) { +void SpatialSound2DServerSW::room_set_transform(RID p_room, const Transform2D& p_transform) { if (space_owner.owns(p_room)) p_room=space_owner.get(p_room)->default_room; @@ -228,13 +228,13 @@ void SpatialSound2DServerSW::room_set_transform(RID p_room, const Matrix32& p_tr }*/ } -Matrix32 SpatialSound2DServerSW::room_get_transform(RID p_room) const { +Transform2D SpatialSound2DServerSW::room_get_transform(RID p_room) const { if (space_owner.owns(p_room)) p_room=space_owner.get(p_room)->default_room; Room *room = room_owner.get(p_room); - ERR_FAIL_COND_V(!room,Matrix32()); + ERR_FAIL_COND_V(!room,Transform2D()); return room->transform; } @@ -365,17 +365,17 @@ int SpatialSound2DServerSW::source_get_polyphony(RID p_source) const { } -void SpatialSound2DServerSW::source_set_transform(RID p_source, const Matrix32& p_transform) { +void SpatialSound2DServerSW::source_set_transform(RID p_source, const Transform2D& p_transform) { Source *source = source_owner.get(p_source); ERR_FAIL_COND(!source); source->transform=p_transform; source->transform.orthonormalize(); } -Matrix32 SpatialSound2DServerSW::source_get_transform(RID p_source) const { +Transform2D SpatialSound2DServerSW::source_get_transform(RID p_source) const { Source *source = source_owner.get(p_source); - ERR_FAIL_COND_V(!source,Matrix32()); + ERR_FAIL_COND_V(!source,Transform2D()); return source->transform; } @@ -518,17 +518,17 @@ void SpatialSound2DServerSW::listener_set_space(RID p_listener,RID p_space) { } -void SpatialSound2DServerSW::listener_set_transform(RID p_listener, const Matrix32& p_transform) { +void SpatialSound2DServerSW::listener_set_transform(RID p_listener, const Transform2D& p_transform) { Listener *listener = listener_owner.get(p_listener); ERR_FAIL_COND(!listener); listener->transform=p_transform; listener->transform.orthonormalize(); //must be done.. } -Matrix32 SpatialSound2DServerSW::listener_get_transform(RID p_listener) const { +Transform2D SpatialSound2DServerSW::listener_get_transform(RID p_listener) const { Listener *listener = listener_owner.get(p_listener); - ERR_FAIL_COND_V(!listener,Matrix32()); + ERR_FAIL_COND_V(!listener,Transform2D()); return listener->transform; } diff --git a/servers/spatial_sound_2d/spatial_sound_2d_server_sw.h b/servers/spatial_sound_2d/spatial_sound_2d_server_sw.h index d6c09f50a8..16d2c93e7d 100644 --- a/servers/spatial_sound_2d/spatial_sound_2d_server_sw.h +++ b/servers/spatial_sound_2d/spatial_sound_2d_server_sw.h @@ -80,8 +80,8 @@ class SpatialSound2DServerSW : public SpatialSound2DServer { struct Room : public RID_Data { RID space; - Matrix32 transform; - Matrix32 inverse_transform; + Transform2D transform; + Transform2D inverse_transform; PoolVector<Point2> bounds; RoomReverb reverb; float params[ROOM_PARAM_MAX]; @@ -149,7 +149,7 @@ class SpatialSound2DServerSW : public SpatialSound2DServer { } stream_data; RID space; - Matrix32 transform; + Transform2D transform; float params[SOURCE_PARAM_MAX]; AudioServer::AudioStream *stream; Vector<Voice> voices; @@ -163,7 +163,7 @@ class SpatialSound2DServerSW : public SpatialSound2DServer { struct Listener : public RID_Data { RID space; - Matrix32 transform; + Transform2D transform; float params[LISTENER_PARAM_MAX]; Listener(); @@ -200,8 +200,8 @@ public: virtual void room_set_bounds(RID p_room, const PoolVector<Point2>& p_bounds); virtual PoolVector<Point2> room_get_bounds(RID p_room) const; - virtual void room_set_transform(RID p_room, const Matrix32& p_transform); - virtual Matrix32 room_get_transform(RID p_room) const; + virtual void room_set_transform(RID p_room, const Transform2D& p_transform); + virtual Transform2D room_get_transform(RID p_room) const; virtual void room_set_param(RID p_room, RoomParam p_param, float p_value); @@ -224,8 +224,8 @@ public: virtual void source_set_polyphony(RID p_source,int p_voice_count); virtual int source_get_polyphony(RID p_source) const; - virtual void source_set_transform(RID p_source, const Matrix32& p_transform); - virtual Matrix32 source_get_transform(RID p_source) const; + virtual void source_set_transform(RID p_source, const Transform2D& p_transform); + virtual Transform2D source_get_transform(RID p_source) const; virtual void source_set_param(RID p_source, SourceParam p_param, float p_value); virtual float source_get_param(RID p_source, SourceParam p_param) const; @@ -244,8 +244,8 @@ public: virtual RID listener_create(); virtual void listener_set_space(RID p_listener, RID p_space); - virtual void listener_set_transform(RID p_listener, const Matrix32& p_transform); - virtual Matrix32 listener_get_transform(RID p_listener) const; + virtual void listener_set_transform(RID p_listener, const Transform2D& p_transform); + virtual Transform2D listener_get_transform(RID p_listener) const; virtual void listener_set_param(RID p_listener, ListenerParam p_param, float p_value); virtual float listener_get_param(RID p_listener, ListenerParam p_param) const; |