Unverified Commit 6d496b0e authored by RobLoach's avatar RobLoach Committed by GitHub
Browse files

0.25.0 (#298)

parent 7b96514e
......@@ -4,14 +4,16 @@ 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.25.0 - Unreleased
## 0.25.0 - 2018-09-08
### Features
- Added Cheat support
- Added .ogg audio support
- `cheatset(index, enabled, code)`
- `cheatreset()`
- Added `.ogg` audio support
### Fixes
- Fix loading save states
- Fix mounting point logic
- Fixed save state loading
- Fixed `love.filesystem.mount()` logic
## 0.24.0 - 2018-09-03
### Features
......
......@@ -28,8 +28,8 @@ ChaiLove is a [libretro](https://www.libretro.com/) core, which can be run throu
Alternatively, you can run the ChaiLove core through RetroArch via the command line:
```
wget https://buildbot.libretro.com/assets/cores/ChaiLove/Floppy%20Bird.chailove
retroarch -L chailove_libretro.so Floppy\ Bird.chailove
wget https://github.com/RobLoach/ChaiLove-FloppyBird/releases/download/0.20.0/FloppyBird.chailove
retroarch -L chailove_libretro.so FloppyBird.chailove
```
## API
......@@ -60,9 +60,11 @@ To run it, execute the following:
retroarch -L chailove_libretro.so main.chai
```
See the [ChaiLove API](https://rawgit.com/libretro/libretro-chailove/docs/) for coverage of all the callbacks and methods in ChaiLove.
## Development
Behind ChaiLove, there's the [documentation](#documentation), [compiling it](#compiling), along with [testing](#testing).
The following are some notes about the development process behind ChaiLove.
### Compiling
......
......@@ -36,7 +36,7 @@ extern "C" {
#endif
void libretro_audio_cb(int16_t left, int16_t right) {
// Nothing?
// Nothing, since we're using libretro-common.
// audio_cb(left, right);
}
......
#include "SoundData.h"
#include <string>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
......
......@@ -2,7 +2,6 @@
#define SRC_LOVE_TYPES_AUDIO_SOUNDDATA_H_
#include <string>
#include "physfs.h"
#include "audio/audio_mixer.h"
namespace love {
......@@ -34,6 +33,8 @@ class SoundData {
* Gets the current volume of the Source.
*
* @return The volume of the source, from 0.0f to 1.0f.
*
* @see setVolume
*/
float getVolume();
......@@ -43,6 +44,8 @@ class SoundData {
* @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.
*
* @see getVolume
*/
SoundData& setVolume(float volume);
......@@ -55,11 +58,15 @@ class SoundData {
/**
* Returns whether the Source will loop.
*
* @see setLooping
*/
bool isLooping();
/**
* Set whether the Source should loop.
*
* @see isLooping
*/
SoundData& setLooping(bool loop);
......
......@@ -25,11 +25,15 @@ class Image {
/**
* Gets the width of the Texture.
*
* @see getHeight
*/
int getWidth();
/**
* Gets the height of the Texture.
*
* @see getWidth
*/
int getHeight();
};
......
......@@ -10,6 +10,8 @@ namespace love {
/**
* Provides an interface to output sound to the user's speakers.
*
* @see love.sound
*/
class audio {
public:
......
......@@ -106,6 +106,8 @@ class filesystem {
* @param archive The archive that was previously mounted with love.filesystem.mount.
*
* @return bool True, when unmounting was a success.
*
* @see mount
*/
bool unmount(const std::string& archive);
......@@ -113,6 +115,8 @@ class filesystem {
* Mounts a zip file or folder in the game's save directory for reading.
*
* @return bool True, when mounting was a success.
*
* @see unmount
*/
bool mount(const std::string& archive, const std::string& mountpoint);
bool mount(const char *archive, const std::string& mountpoint);
......@@ -127,16 +131,25 @@ class filesystem {
/**
* Check whether something is a directory.
*
* @see isFile
* @see isSymlink
*/
bool isDirectory(const std::string& filename);
/**
* Checks whether something is a file.
*
* @see isDirectory
* @see isSymlink
*/
bool isFile(const std::string& filename);
/**
* Checks whether something is a symlink.
*
* @see isDirectory
* @see isFile
*/
bool isSymlink(const std::string& filename);
......@@ -168,6 +181,8 @@ class filesystem {
* @param delimiter ("\n") A string of characters representing what would be considered a new line.
*
* @return A vector array of strings representing all the lines in the given file.
*
* @see read
*/
std::vector<std::string> lines(const std::string& filename, const std::string& delimiter);
std::vector<std::string> lines(const std::string& filename);
......
......@@ -6,6 +6,8 @@
namespace love {
/**
* Allows you to work with fonts.
*
* @see love.graphics.newFont
*/
class font {
public:
......@@ -16,6 +18,8 @@ class font {
* Retrieves whether or not all sub-systems have been loaded.
*
* @return True if the Font sub-system has been loaded.
*
* @see love.graphics.newFont
*/
bool isOpen();
......
......@@ -38,7 +38,7 @@ class window {
* Display a simple message for a certain amount of frames.
*
* @param msg The message text to be displayed.
* @param frames (4000) The amount of frames to display the message.
* @param frames (2800) The amount of frames to display the message.
*
* @return The window system, for method chaining.
*/
......
/**
* Main Test 2
* love.graphics.draw testing
*
* An alternative test with a different file name.
*
* retroarch -L chailove_libretro.so test/main2.chai
* retroarch -L chailove_libretro.so test/love.graphics.draw.chai
*/
global keyPressed = "a";
......
......@@ -74,3 +74,15 @@ def joystickpressed(joystick, button) {
}
}
}
def savestate() {
return to_json([
"currenttest": currenttest
])
}
def loadstate(data) {
var info = from_json(data)
currenttest = info["currenttest"]
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