Verified Commit 53fda24b authored by RobLoach's avatar RobLoach
Browse files

0.22.2

parent 5ea2bdd0
......@@ -5,8 +5,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## 0.22.2 - Development
### Fixes
- Documentation
## 0.22.1 - 2018-05-06
### Fixes
- Removed `Http()` due to cross-platform incompatibility
## 0.22.0 - 2018-05-06
......
......@@ -39,12 +39,12 @@ class SoundData {
~SoundData();
/**
* Plays a source.
* Plays the source.
*/
bool play();
/**
* Stops an audio source.
* Stops the audio source.
*/
bool stop();
......@@ -59,12 +59,16 @@ class SoundData {
/**
* Gets the current volume of the Source.
*
* @return The volume of the source, from 0.0f to 1.0f.
*/
float getVolume();
/**
* Sets the current volume of the Source.
*
* @param volume The volume to set the source at, from 0.0f to 1.0f.
*
* @return The SoundData object iself, to allow for method chaining.
*/
SoundData& setVolume(float volume);
......@@ -86,8 +90,6 @@ class SoundData {
*/
bool pause();
int WAV_HEADER_SIZE = 44;
/**
* Returns whether the Source will loop.
*/
......@@ -97,6 +99,8 @@ class SoundData {
* Set whether the Source should loop.
*/
SoundData& setLooping(bool loop);
int WAV_HEADER_SIZE = 44;
};
} // namespace Audio
......
......@@ -46,11 +46,15 @@ class Joystick {
/**
* Gets whether the Joystick is connected.
*
* @return True if the given joystick is connected.
*/
bool isConnected();
/**
* Gets the joystick's unique identifier.
*
* @return The index number of the Joystick.
*/
int getID();
......
......@@ -116,7 +116,7 @@ class filesystem {
*
* @param name The directory to create.
*
* @return True if the directory was created, false if not.
* @return True if the directory was created, false otherwise.
*/
bool createDirectory(const std::string& name);
......@@ -126,7 +126,7 @@ class filesystem {
* @param name The name (and path) of the file.
* @param data The string data to write to the file.
*
* @return How many bytes to write.
* @return True if the file was written, false otherwise.
*/
bool write(const std::string& name, const std::string& data);
......
......@@ -14,6 +14,8 @@ class font {
/**
* Retrieves whether or not all sub-systems have been loaded.
*
* @return True if the Font sub-system has been loaded.
*/
bool isOpen();
......
......@@ -60,6 +60,9 @@ class graphics {
/**
* Draws a point.
*
* @param x The position on the x-axis.
* @param y The position on the y-axis.
*/
graphics& point(int x, int y);
......@@ -95,19 +98,18 @@ class graphics {
*/
Image* newImage(const std::string& filename);
Font* newFont();
Font* newFont(const std::string& filename);
/**
* Creates a new TrueType font, with the given font size.
*
* @param filename (font) The path to the TrueType .ttf font. When not provided, will return the default font.
* @param filename (default) The path to the TrueType .ttf font. When not provided, will return the default font.
* @param size (12) The size of the font to create.
*
* @return The created TrueType font.
*/
Font* newFont(const std::string& filename, int size);
Font* newFont(const std::string& filename);
Font* newFont();
/**
* Creates a new BMFont with the given spec.
......@@ -150,16 +152,19 @@ class graphics {
/**
* Sets the active drawing color to the given color.
*
* @param red The amount of red.
* @param green The amount of green.
* @param blue The amount of blue.
* @param alpha (255) The amount of alpha.
*/
graphics& setColor(int red, int green, int blue, int alpha);
/**
* Sets the active drawing color to the given color.
*/
graphics& setColor(int red, int green, int blue);
/**
* Gets the current color.
*
* @return The active color.
*/
Color getColor();
......@@ -181,7 +186,6 @@ class graphics {
* @see love.graphics.getBackgroundColor
*/
graphics& setBackgroundColor(int red, int green, int blue, int alpha);
graphics& setBackgroundColor(int red, int green, int blue);
/**
......
......@@ -42,7 +42,7 @@ class joystick {
* @param joystick The joystick to be checked.
* @param button The button to be checked.
*
* @return TRUE if the joystick button is pressed.
* @return True if the joystick button is pressed.
*/
bool isDown(int joystick, int button);
......@@ -52,28 +52,30 @@ class joystick {
* @param joystick The joystick to be checked.
* @param button The button to be checked.
*
* @return TRUE if the joystick button is pressed.
* @return True if the joystick button is pressed.
*/
bool isDown(int joystick, const std::string& button);
int getButtonKey(const std::string& name);
std::string getButtonName(int key);
/**
* Retrieve the given joystick.
*
* ## Example
*
* @code
* if (love.joystick[0].isDown("left")) {
* love.graphics.print("Joystick is pushed LEFT", 100, 100)
* }
* @endcode
*
* @param joystick The joystick to be retrieved.
* @param joystick The joystick index to be retrieved.
*
* @return The joystick of the given player number.
*/
Joystick* operator[](int joystick);
int getButtonKey(const std::string& name);
std::string getButtonName(int key);
private:
std::vector<Joystick*> m_joysticks;
};
......
......@@ -100,10 +100,10 @@ class system {
*/
bool execute(const std::string& command);
bool load(config& t);
std::string m_username;
bool m_usernameInitialized = false;
bool load(config& t);
};
} // namespace love
......
......@@ -24,6 +24,7 @@ class timer {
* @return The current FPS.
*/
int getFPS();
float m_delta = 0.0f;
float m_deltaCounter = 0.0f;
int m_frameCounter = 0;
......
......@@ -14,8 +14,6 @@ namespace love {
*/
class window {
public:
bool load(const config& conf);
bool unload();
/**
* Gets the window title.
......@@ -43,6 +41,9 @@ class window {
*/
void showMessageBox(const std::string& msg, int frames);
void showMessageBox(const std::string& msg);
bool load(const config& conf);
bool unload();
};
} // namespace love
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment