Browse Source

Renamed Source:setRelativePosition and Source:hasRelativePosition to Source:setRelative and Source:isRelative. Updated changelog.

Alex Szpakowski 11 years ago
parent
commit
b57256b3e5

+ 5 - 1
changes.txt

@@ -51,7 +51,7 @@ LOVE 0.9.0 [Baby Inspector]
   * Added Image:getData.
   * Added SoundData:getDuration and SoundData:getSampleCount.
   * Added Source:isPlaying.
-  * Added Source:setRelativePosition and Source:hasRelativePosition.
+  * Added Source:setRelative and Source:isRelative.
   * Added Source:setCone and Source:getCone.
   * Added Source:getChannels.
   * Added new Channels API for love.thread.
@@ -136,6 +136,7 @@ LOVE 0.9.0 [Baby Inspector]
   * Fixed looping support in tracker music formats.
   * Fixed skipping/looping issues when playing streaming audio Sources.
   * Fixed race condition in Source:play.
+  * Fixed WAVE sound playback.
 
   * Moved love's startup to modules/love.
   * Moved window-related functions from love.graphics to love.window.
@@ -145,6 +146,8 @@ LOVE 0.9.0 [Baby Inspector]
   * Renamed love.filesystem.enumerate to love.filesystem.getDirectoryItems.
   * Renamed World:setAllowSleeping to World:setSleepingAllowed.
   * Renamed ChainShape:setPrevVertex to ChainShape:setPreviousVertex.
+  * Renamed Joint:enableMotor to Joint:setMotorEnabled.
+  * Renamed Joint:enableLimit and Joint:isLimitEnabled to Joint:setLimitsEnabled and Joint:hasLimitsEnabled.
   * Renamed t.screen to t.window in love.conf.
   * Renamed love.graphics.setCaption to love.window.setTitle.
   * Renamed PixelEffect to Shader (but now with vertex shaders).
@@ -167,6 +170,7 @@ LOVE 0.9.0 [Baby Inspector]
   * Removed love.graphics.setLine/setPoint.
   * Removed love.graphics.drawq (functionality is merged into love.graphics.draw).
   * Removed SpriteBatch:addq/setq (functionality is merged into SpriteBatch:add/set).
+  * Removed Quad:flip.
   * Removed ParticleSystem:isFull/isEmpty.
   * Removed ParticleSystem:getX/getY.
   * Removed love.graphics.checkMode.

+ 2 - 2
src/modules/audio/Source.h

@@ -83,8 +83,8 @@ public:
 	virtual void setCone(float innerAngle, float outerAngle, float outerVolume) = 0;
 	virtual void getCone(float &innerAngle, float &outerAngle, float &outerVolume) const = 0;
 
-	virtual void setRelativePosition(bool relative) = 0;
-	virtual bool hasRelativePosition() const = 0;
+	virtual void setRelative(bool enable) = 0;
+	virtual bool isRelative() const = 0;
 
 	virtual void setLooping(bool looping) = 0;
 	virtual bool isLooping() const = 0;

+ 4 - 4
src/modules/audio/null/Source.cpp

@@ -149,14 +149,14 @@ void Source::getCone(float &innerAngle, float &outerAngle, float &outerVolume) c
 	outerVolume = coneOuterVolume;
 }
 
-void Source::setRelativePosition(bool relative)
+void Source::setRelative(bool enable)
 {
-	relativePosition = relative;
+	relative = enable;
 }
 
-bool Source::hasRelativePosition() const
+bool Source::isRelative() const
 {
-	return relativePosition;
+	return relative;
 }
 
 void Source::setLooping(bool looping)

+ 3 - 3
src/modules/audio/null/Source.h

@@ -62,8 +62,8 @@ public:
 	virtual void getDirection(float *v) const;
 	virtual void setCone(float innerAngle, float outerAngle, float outerVolume);
 	virtual void getCone(float &innerAngle, float &outerAngle, float &outerVolume) const;
-	virtual void setRelativePosition(bool relative);
-	virtual bool hasRelativePosition() const;
+	virtual void setRelative(bool enable);
+	virtual bool isRelative() const;
 	void setLooping(bool looping);
 	bool isLooping() const;
 	bool isStatic() const;
@@ -86,7 +86,7 @@ private:
 	float coneInnerAngle;
 	float coneOuterAngle;
 	float coneOuterVolume;
-	bool relativePosition;
+	bool relative;
 	bool looping;
 	float minVolume;
 	float maxVolume;

+ 7 - 7
src/modules/audio/openal/Source.cpp

@@ -39,7 +39,7 @@ Source::Source(Pool *pool, love::sound::SoundData *soundData)
 	, valid(false)
 	, pitch(1.0f)
 	, volume(1.0f)
-	, relativePosition(false)
+	, relative(false)
 	, looping(false)
 	, paused(false)
 	, minVolume(0.0f)
@@ -71,7 +71,7 @@ Source::Source(Pool *pool, love::sound::Decoder *decoder)
 	, valid(false)
 	, pitch(1.0f)
 	, volume(1.0f)
-	, relativePosition(false)
+	, relative(false)
 	, looping(false)
 	, paused(false)
 	, minVolume(0.0f)
@@ -429,17 +429,17 @@ void Source::getCone(float &innerAngle, float &outerAngle, float &outerVolume) c
 	outerVolume = cone.outerVolume;
 }
 
-void Source::setRelativePosition(bool relative)
+void Source::setRelative(bool enable)
 {
 	if (valid)
 		alSourcei(source, AL_SOURCE_RELATIVE, relative ? AL_TRUE : AL_FALSE);
 
-	relativePosition = relative;
+	relative = enable;
 }
 
-bool Source::hasRelativePosition() const
+bool Source::isRelative() const
 {
-	return relativePosition;
+	return relative;
 }
 
 void Source::setLooping(bool looping)
@@ -575,7 +575,7 @@ void Source::reset()
 	alSourcef(source, AL_ROLLOFF_FACTOR, rolloffFactor);
 	alSourcef(source, AL_MAX_DISTANCE, maxDistance);
 	alSourcei(source, AL_LOOPING, isStatic() && isLooping() ? AL_TRUE : AL_FALSE);
-	alSourcei(source, AL_SOURCE_RELATIVE, relativePosition ? AL_TRUE : AL_FALSE);
+	alSourcei(source, AL_SOURCE_RELATIVE, relative ? AL_TRUE : AL_FALSE);
 	alSourcei(source, AL_CONE_INNER_ANGLE, cone.innerAngle);
 	alSourcei(source, AL_CONE_OUTER_ANGLE, cone.outerAngle);
 	alSourcef(source, AL_CONE_OUTER_GAIN, cone.outerVolume);

+ 3 - 3
src/modules/audio/openal/Source.h

@@ -80,8 +80,8 @@ public:
 	virtual void getDirection(float *v) const;
 	virtual void setCone(float innerAngle, float outerAngle, float outerVolume);
 	virtual void getCone(float &innerAngle, float &outerAngle, float &outerVolume) const;
-	virtual void setRelativePosition(bool relative);
-	virtual bool hasRelativePosition() const;
+	virtual void setRelative(bool enable);
+	virtual bool isRelative() const;
 	void setLooping(bool looping);
 	bool isLooping() const;
 	bool isStatic() const;
@@ -131,7 +131,7 @@ private:
 	float position[3];
 	float velocity[3];
 	float direction[3];
-	bool relativePosition;
+	bool relative;
 	bool looping;
 	bool paused;
 	float minVolume;

+ 6 - 6
src/modules/audio/wrap_Source.cpp

@@ -211,17 +211,17 @@ int w_Source_getCone(lua_State *L)
 	return 3;
 }
 
-int w_Source_setRelativePosition(lua_State *L)
+int w_Source_setRelative(lua_State *L)
 {
 	Source *t = luax_checksource(L, 1);
-	t->setRelativePosition(luax_toboolean(L, 2));
+	t->setRelative(luax_toboolean(L, 2));
 	return 0;
 }
 
-int w_Source_hasRelativePosition(lua_State *L)
+int w_Source_isRelative(lua_State *L)
 {
 	Source *t = luax_checksource(L, 1);
-	luax_pushboolean(L, t->hasRelativePosition());
+	luax_pushboolean(L, t->isRelative());
 	return 1;
 }
 
@@ -367,8 +367,8 @@ static const luaL_Reg functions[] =
 	{ "setCone", w_Source_setCone },
 	{ "getCone", w_Source_getCone },
 
-	{ "setRelativePosition", w_Source_setRelativePosition },
-	{ "hasRelativePosition", w_Source_hasRelativePosition },
+	{ "setRelative", w_Source_setRelative },
+	{ "isRelative", w_Source_isRelative },
 
 	{ "setLooping", w_Source_setLooping },
 	{ "isLooping", w_Source_isLooping },

+ 2 - 2
src/modules/audio/wrap_Source.h

@@ -49,8 +49,8 @@ int w_Source_setDirection(lua_State *L);
 int w_Source_getDirection(lua_State *L);
 int w_Source_setCone(lua_State *L);
 int w_Source_getCone(lua_State *L);
-int w_Source_setRelativePosition(lua_State *L);
-int w_Source_hasRelativePosition(lua_State *L);
+int w_Source_setRelative(lua_State *L);
+int w_Source_isRelative(lua_State *L);
 int w_Source_setLooping(lua_State *L);
 int w_Source_isLooping(lua_State *L);
 int w_Source_isStopped(lua_State *L);