Verified Commit 77edbb17 authored by RobLoach's avatar RobLoach
Browse files

0.13.0

parent dec07f5f
......@@ -4,13 +4,14 @@ 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.13.0 - Unreleased
## 0.13.0 - 2017-12-20
### Added
- Documentation
- `math.random()` for float and double numbers
- `math.random()` for int, float and double numbers
### Fixed
- Renamed `mousemove()` callback to `mousemoved()`
- `love.graphics.setDefaultFilter()` flags
## 0.12.0 - 2017-12-13
### Added
......
......@@ -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.12.0"
PROJECT_NUMBER = "0.13.0"
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
......
......@@ -52,9 +52,9 @@
#define SRC_CHAILOVE_H_
#define CHAILOVE_VERSION_MAJOR 0
#define CHAILOVE_VERSION_MINOR 12
#define CHAILOVE_VERSION_MINOR 13
#define CHAILOVE_VERSION_PATCH 0
#define CHAILOVE_VERSION_STRING "0.12.0"
#define CHAILOVE_VERSION_STRING "0.13.0"
#include "SDL.h"
#include "libretro.h"
......
......@@ -223,9 +223,9 @@ graphics& graphics::setDefaultFilter(const std::string& filter) {
std::string graphics::getDefaultFilter() {
switch (m_smooth) {
case 0:
return "linear";
case 1:
return "nearest";
case 1:
return "linear";
}
}
......
love.audio.setVolume(0.5f)
assert_equal(love.audio.getVolume(), 0.5f, "love.audio.getVolume()")
var audio_sound = love.audio.newSource("assets/jump.wav")
audio_sound.play()
......@@ -26,5 +26,7 @@ assert(!filesystem.isFile("notexist.chai"), "filesystem.isFile('notexist.chai')"
assert_not(love.filesystem.isDirectory("keyboard.chai"), "love.filesystem.isDirectory()")
assert_equal(love.filesystem.getDirectoryItems("assets").size(), 1, "love.filesystem.getDirectoryItems()")
var theLines = love.filesystem.lines("filesystem.chai")
assert_equal(theLines[0], "// Filesystem", "love.filesystem.lines()")
assert_equal(love.graphics.getWidth(), 800, "love.graphics.getWidth()")
assert_equal(love.graphics.getHeight(), 600, "love.graphics.getHeight()")
love.graphics.clear()
love.graphics.clear(233, 200, 100)
love.graphics.clear(233, 200, 100, 200)
assert_equal(love.graphics.getDefaultFilter(), "linear", "love.graphics.getDefaultFilter()")
love.graphics.setDefaultFilter("nearest")
assert_equal(love.graphics.getDefaultFilter(), "nearest", "love.graphics.setDefaultFilter()")
assert_not(love.joystick.isDown(0, "right"), "love.joystick.isDown()")
assert_not(love.joystick[0].isDown("right"), "love.joystick[]")
assert_equal(love.joystick.getJoystickCount(), 4, "love.joystick.getJoystickCount()")
......@@ -4,4 +4,4 @@ assert_equal(scancode, 97, "keyboard.getScancodeFromKey()")
var key = love.keyboard.getKeyFromScancode(97)
assert_equal(key, "a", "keyboard.getKeyFromScancode()")
assert_not(love.keyboard.isDown("7"), "love.keyboard.isDown()")
assert_not(love.keyboard.isDown("7"), "love.keyboard.isDown('7')")
......@@ -7,3 +7,5 @@ assert_not(theSound.isLooping(), "SoundData.getLooping()")
theSound.setVolume(0.5f).setLooping(true)
assert_equal(theSound.getVolume(), 0.5f, "SoundData.setVolume()")
assert(theSound.isLooping(), "SoundData.getLooping()")
assert_not(theSound.isPlaying(), "SoundData.isPlaying()")
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