Verified Commit b3c5f45b authored by RobLoach's avatar RobLoach
Browse files

docs: Update documentation

parent c59c0410
......@@ -4,6 +4,10 @@ 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.17.1 - Unreleased
### Added
## 0.17.0 - Unreleased
### Added
- `love.system.getOS()` now returns actual operating system name
......
......@@ -16,7 +16,7 @@ class math {
* @param min (0.0f) The minimum value.
* @param max (1.0f) The max value.
*
* @return a number between the two given min and max values.
* @return A number between the two given min and max values.
*/
float random(float min, float max);
float random(float max);
......@@ -70,8 +70,6 @@ class math {
*/
float degrees(float rad);
std::string compress(const std::string& str);
/**
* @brief Compresses a string or data using a specific compression level.
*
......@@ -83,6 +81,7 @@ class math {
* @see love.math.decompress
*/
std::string compress(const std::string& str, int level);
std::string compress(const std::string& str);
/**
* @brief Decompresses a compressed string.
......
......@@ -24,7 +24,7 @@ int mouse::getY() {
}
bool mouse::isDown(int button) {
return buttonState[button] != 0;
return m_buttonState[button] != 0;
}
bool mouse::isDown(const std::string& button) {
return isDown(getButtonKey(button));
......@@ -93,9 +93,9 @@ void mouse::update() {
for (int i = RETRO_DEVICE_ID_MOUSE_LEFT; i <= RETRO_DEVICE_ID_MOUSE_BUTTON_5; i++) {
state = ChaiLove::input_state_cb(0, RETRO_DEVICE_MOUSE, 0, i);
if (state != buttonState[i]) {
buttonState[i] = state;
if (buttonState[i] == 0) {
if (state != m_buttonState[i]) {
m_buttonState[i] = state;
if (m_buttonState[i] == 0) {
mousereleased(m_x, m_y, getButtonName(i));
} else {
mousepressed(m_x, m_y, getButtonName(i));
......
......@@ -61,7 +61,7 @@ class mouse {
std::string getButtonName(int button);
int16_t m_x, m_y;
int16_t buttonState[RETRO_DEVICE_ID_MOUSE_BUTTON_5];
int16_t m_buttonState[RETRO_DEVICE_ID_MOUSE_BUTTON_5];
void mousemoved(int x, int y, int dx, int dy);
void mousepressed(int x, int y, const std::string& button);
......
......@@ -15,7 +15,6 @@ bool sound::load() {
}
bool sound::update() {
// Nothing.
return true;
}
......
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