Unverified Commit 712abdd5 authored by Rob Loach's avatar Rob Loach Committed by GitHub
Browse files

Merge pull request #259 from libretro/dev

0.22.2
parents f45a2918 86e70ab4
......@@ -4,7 +4,12 @@ All notable changes to [ChaiLove](https://github.com/RobLoach/ChaiLove) will be
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 - 2018-05-06
### Fixes
- Documentation
## 0.22.1 - 2018-05-06
### Fixes
- Removed `Http()` due to cross-platform incompatibility
## 0.22.0 - 2018-05-06
......
......@@ -23,7 +23,7 @@ PROJECT_NAME = "ChaiLove API"
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = "0.21.0"
PROJECT_NUMBER = "0.22.2"
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
......
......@@ -47,9 +47,9 @@
#define SRC_CHAILOVE_H_
#define CHAILOVE_VERSION_MAJOR 0
#define CHAILOVE_VERSION_MINOR 21
#define CHAILOVE_VERSION_PATCH 0
#define CHAILOVE_VERSION_STRING "0.21.0"
#define CHAILOVE_VERSION_MINOR 22
#define CHAILOVE_VERSION_PATCH 2
#define CHAILOVE_VERSION_STRING "0.22.2"
#include "SDL.h"
#include "libretro.h"
......
......@@ -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();
......
......@@ -19,7 +19,7 @@ namespace love {
*
* @code
* def conf(t) {
* t.version = "0.21.0" // Version of ChaiLove
* t.version = "0.22.2" // Version of ChaiLove
* t.identity = "mygame" // Machine name of your game
* t.window.title = "My Game" // Human-readable name
* t.window.width = 1024 // Game width
......
......@@ -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;
};
......
......@@ -52,7 +52,7 @@ class script {
* t.console = false
*
* // The ChaiLove version this game was made for.
* t.version = "0.21.0"
* t.version = "0.22.2"
*
* // The width and height of the game.
* t.window.width = 1024
......
......@@ -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,9 +14,6 @@ namespace love {
*/
class window {
public:
bool load(const config& conf);
bool unload();
/**
* Gets the window title.
*
......@@ -43,6 +40,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
......
......@@ -15,7 +15,7 @@ def conf(t) {
t.window.width = 460
t.window.height = 320
t.console = true
t.version = "0.21.0"
t.version = "0.22.2"
}
def load() {
......
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