Skip to content

Commit

Permalink
miniSphere 5.1.0
Browse files Browse the repository at this point in the history
A few small API additions and some bug fixes.  Merry Christmas!
:christmas_tree: :gift:
  • Loading branch information
fatcerberus committed Dec 25, 2017
1 parent bc0270e commit e86751f
Show file tree
Hide file tree
Showing 25 changed files with 106 additions and 34 deletions.
9 changes: 5 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
miniSphere Changelog
====================

v5.1.0 - TBD
------------
v5.1.0 - December 25, 2017
--------------------------

* Adds `JobToken#suspend()` and `JobToken#resume()` methods to allow games to
* Adds `JobToken#pause()` and `JobToken#resume()` methods to allow games to
pause and resume Dispatch jobs at any time.
* Adds `Thread#pause()` and `Thread.resume()` methods.
* Adds `Thread#pause()` and `Thread#resume()` methods.
* Adds `index.mjs` to the list of filenames recognized by the module loader.
* Adds a new predefined color, `Color.StankyBean`.
* Optimizes Surface and Texture size properties: `.width` and `.height` are now
cached as own properties of the object after the first access.
* Fixes a bug where `Sphere.restart()` causes some things to be rendered in
Expand Down
13 changes: 13 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
Release Notes
=============

miniSphere 5.1
--------------

* Your game can now suspend and resume recurring Dispatch jobs using the new
`JobToken#pause()` and `JobToken#resume()` APIs. Suspended jobs keep the
event loop alive but won't be executed again until they are resumed.

* `Thread` objects now have `.pause()` and `.resume()` methods as well.
Pausing a thread suspends its update and input jobs, but not its render job.
This allows you to pause updates for an entity while still allowing it to be
visible on-screen.


miniSphere 5.0
--------------

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
X.X.X
5.1.0
9 changes: 8 additions & 1 deletion dep/include/ChakraCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ typedef unsigned short WCHAR;

#if (defined(_MSC_VER) && _MSC_VER <= 1900) || (!defined(_MSC_VER) && __cplusplus <= 199711L) // !C++11
typedef unsigned short uint16_t;
#else
#include <stdint.h>
#endif

/// <summary>
Expand Down Expand Up @@ -443,7 +445,12 @@ typedef unsigned short uint16_t;
/// Calling <c>JsSetException</c> will also dispatch the exception to the script debugger
/// (if any) giving the debugger a chance to break on the exception.
/// </summary>
JsRuntimeAttributeDispatchSetExceptionsToDebugger = 0x00000040
JsRuntimeAttributeDispatchSetExceptionsToDebugger = 0x00000040,
/// <summary>
/// Disable Failfast fatal error on OOM
/// </summary>
JsRuntimeAttributeDisableFatalOnOOM = 0x00000080,

} JsRuntimeAttributes;

/// <summary>
Expand Down
36 changes: 29 additions & 7 deletions dep/include/ChakraCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -792,14 +792,36 @@ CHAKRA_API
_In_ JsValueRef object2,
_Out_ bool *result);

/// <summary>
/// Creates a new object (with prototype) that stores some external data.
/// </summary>
/// <remarks>
/// Requires an active script context.
/// </remarks>
/// <param name="data">External data that the object will represent. May be null.</param>
/// <param name="finalizeCallback">
/// A callback for when the object is finalized. May be null.
/// </param>
/// <param name="prototype">Prototype object or nullptr.</param>
/// <param name="object">The new object.</param>
/// <returns>
/// The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.
/// </returns>
CHAKRA_API
JsCreateExternalObjectWithPrototype(
_In_opt_ void *data,
_In_opt_ JsFinalizeCallback finalizeCallback,
_In_ JsValueRef prototype,
_Out_ JsValueRef *object);

/// <summary>
/// Gets an object's property.
/// </summary>
/// <remarks>
/// Requires an active script context.
/// </remarks>
/// <param name="object">The object that contains the property.</param>
/// <param name="key">The key (JavascriptString) to the property.</param>
/// <param name="key">The key (JavascriptString or JavascriptSymbol) to the property.</param>
/// <param name="value">The value of the property.</param>
/// <returns>
/// The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.
Expand All @@ -817,7 +839,7 @@ CHAKRA_API
/// Requires an active script context.
/// </remarks>
/// <param name="object">The object that contains the property.</param>
/// <param name="key">The key (JavascriptString) to the property.</param>
/// <param name="key">The key (JavascriptString or JavascriptSymbol) to the property.</param>
/// <param name="value">The new value of the property.</param>
/// <param name="useStrictRules">The property set should follow strict mode rules.</param>
/// <returns>
Expand All @@ -837,7 +859,7 @@ CHAKRA_API
/// Requires an active script context.
/// </remarks>
/// <param name="object">The object that may contain the property.</param>
/// <param name="key">The key (JavascriptString) to the property.</param>
/// <param name="key">The key (JavascriptString or JavascriptSymbol) to the property.</param>
/// <param name="hasProperty">Whether the object (or a prototype) has the property.</param>
/// <returns>
/// The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.
Expand All @@ -855,7 +877,7 @@ CHAKRA_API
/// Requires an active script context.
/// </remarks>
/// <param name="object">The object that has the property.</param>
/// <param name="key">The key (JavascriptString) to the property.</param>
/// <param name="key">The key (JavascriptString or JavascriptSymbol) to the property.</param>
/// <param name="propertyDescriptor">The property descriptor.</param>
/// <param name="result">Whether the property was defined.</param>
/// <returns>
Expand All @@ -875,7 +897,7 @@ CHAKRA_API
/// Requires an active script context.
/// </remarks>
/// <param name="object">The object that contains the property.</param>
/// <param name="key">The key (JavascriptString) to the property.</param>
/// <param name="key">The key (JavascriptString or JavascriptSymbol) to the property.</param>
/// <param name="useStrictRules">The property set should follow strict mode rules.</param>
/// <param name="result">Whether the property was deleted.</param>
/// <returns>
Expand All @@ -895,7 +917,7 @@ CHAKRA_API
/// Requires an active script context.
/// </remarks>
/// <param name="object">The object that has the property.</param>
/// <param name="key">The key (JavascriptString) to the property.</param>
/// <param name="key">The key (JavascriptString or JavascriptSymbol) to the property.</param>
/// <param name="propertyDescriptor">The property descriptor.</param>
/// <returns>
/// The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.
Expand All @@ -913,7 +935,7 @@ CHAKRA_API
/// Requires an active script context.
/// </remarks>
/// <param name="object">The object that may contain the property.</param>
/// <param name="key">The key (JavascriptString) to the property.</param>
/// <param name="key">The key (JavascriptString or JavascriptSymbol) to the property.</param>
/// <param name="hasOwnProperty">Whether the object has the non-inherited property.</param>
/// <returns>
/// The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.
Expand Down
6 changes: 3 additions & 3 deletions dep/include/ChakraCoreVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

// ChakraCore version number definitions (used in ChakraCore binary metadata)
#define CHAKRA_CORE_MAJOR_VERSION 1
#define CHAKRA_CORE_MINOR_VERSION 8
#define CHAKRA_CORE_PATCH_VERSION 2
#define CHAKRA_CORE_MINOR_VERSION 9
#define CHAKRA_CORE_PATCH_VERSION 0
#define CHAKRA_CORE_VERSION_RELEASE_QFE 0 // Redundant with PATCH_VERSION. Keep this value set to 0.

// -------------
Expand Down Expand Up @@ -54,7 +54,7 @@
// * Does not add anything to the file description

// ChakraCore RELEASE and PRERELEASE flags
#define CHAKRA_CORE_VERSION_RELEASE 1
#define CHAKRA_CORE_VERSION_RELEASE 0
#define CHAKRA_CORE_VERSION_PRERELEASE 0

// Chakra RELEASE flag
Expand Down
Binary file modified dep/lib/x86_64/libChakraCore.so
Binary file not shown.
2 changes: 1 addition & 1 deletion manpages/cell.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH CELL 1 "xxxx-xx-xx" "miniSphere-X.X.X" "Sphere Game Development Kit"
.TH CELL 1 "2017-12-25" "miniSphere-5.1.0" "Sphere Game Development Kit"
.SH NAME
cell \- Sphere v2 game compiler and packager
.SH SYNOPSIS
Expand Down
2 changes: 1 addition & 1 deletion manpages/minisphere.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH MINISPHERE 1 "xxxx-xx-xx" "miniSphere-X.X.X" "miniSphere JS Game Engine"
.TH MINISPHERE 1 "2017-12-25" "miniSphere-5.1.0" "miniSphere JS Game Engine"
.SH NAME
minisphere \- lightweight JavaScript-powered game engine
.SH SYNOPSIS
Expand Down
2 changes: 1 addition & 1 deletion manpages/spherun.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH SPHERUN 1 "xxxx-xx-xx" "miniSphere-X.X.X" "Sphere Game Development Kit"
.TH SPHERUN 1 "2017-12-25" "miniSphere-5.1.0" "Sphere Game Development Kit"
.SH NAME
spherun \- run a Sphere game in a dev-friendly environment
.SH SYNOPSIS
Expand Down
2 changes: 1 addition & 1 deletion manpages/ssj.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH SSJ 1 "xxxx-xx-xx" "miniSphere-X.X.X" "Sphere Game Development Kit"
.TH SSJ 1 "2017-12-25" "miniSphere-5.1.0" "Sphere Game Development Kit"
.SH NAME
ssj \- the JavaScript debugger for miniSphere
.SH SYNOPSIS
Expand Down
Binary file modified msvs/cell.rc
Binary file not shown.
9 changes: 8 additions & 1 deletion msvs/include/ChakraCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ typedef unsigned short WCHAR;

#if (defined(_MSC_VER) && _MSC_VER <= 1900) || (!defined(_MSC_VER) && __cplusplus <= 199711L) // !C++11
typedef unsigned short uint16_t;
#else
#include <stdint.h>
#endif

/// <summary>
Expand Down Expand Up @@ -443,7 +445,12 @@ typedef unsigned short uint16_t;
/// Calling <c>JsSetException</c> will also dispatch the exception to the script debugger
/// (if any) giving the debugger a chance to break on the exception.
/// </summary>
JsRuntimeAttributeDispatchSetExceptionsToDebugger = 0x00000040
JsRuntimeAttributeDispatchSetExceptionsToDebugger = 0x00000040,
/// <summary>
/// Disable Failfast fatal error on OOM
/// </summary>
JsRuntimeAttributeDisableFatalOnOOM = 0x00000080,

} JsRuntimeAttributes;

/// <summary>
Expand Down
36 changes: 29 additions & 7 deletions msvs/include/ChakraCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -792,14 +792,36 @@ CHAKRA_API
_In_ JsValueRef object2,
_Out_ bool *result);

/// <summary>
/// Creates a new object (with prototype) that stores some external data.
/// </summary>
/// <remarks>
/// Requires an active script context.
/// </remarks>
/// <param name="data">External data that the object will represent. May be null.</param>
/// <param name="finalizeCallback">
/// A callback for when the object is finalized. May be null.
/// </param>
/// <param name="prototype">Prototype object or nullptr.</param>
/// <param name="object">The new object.</param>
/// <returns>
/// The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.
/// </returns>
CHAKRA_API
JsCreateExternalObjectWithPrototype(
_In_opt_ void *data,
_In_opt_ JsFinalizeCallback finalizeCallback,
_In_ JsValueRef prototype,
_Out_ JsValueRef *object);

/// <summary>
/// Gets an object's property.
/// </summary>
/// <remarks>
/// Requires an active script context.
/// </remarks>
/// <param name="object">The object that contains the property.</param>
/// <param name="key">The key (JavascriptString) to the property.</param>
/// <param name="key">The key (JavascriptString or JavascriptSymbol) to the property.</param>
/// <param name="value">The value of the property.</param>
/// <returns>
/// The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.
Expand All @@ -817,7 +839,7 @@ CHAKRA_API
/// Requires an active script context.
/// </remarks>
/// <param name="object">The object that contains the property.</param>
/// <param name="key">The key (JavascriptString) to the property.</param>
/// <param name="key">The key (JavascriptString or JavascriptSymbol) to the property.</param>
/// <param name="value">The new value of the property.</param>
/// <param name="useStrictRules">The property set should follow strict mode rules.</param>
/// <returns>
Expand All @@ -837,7 +859,7 @@ CHAKRA_API
/// Requires an active script context.
/// </remarks>
/// <param name="object">The object that may contain the property.</param>
/// <param name="key">The key (JavascriptString) to the property.</param>
/// <param name="key">The key (JavascriptString or JavascriptSymbol) to the property.</param>
/// <param name="hasProperty">Whether the object (or a prototype) has the property.</param>
/// <returns>
/// The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.
Expand All @@ -855,7 +877,7 @@ CHAKRA_API
/// Requires an active script context.
/// </remarks>
/// <param name="object">The object that has the property.</param>
/// <param name="key">The key (JavascriptString) to the property.</param>
/// <param name="key">The key (JavascriptString or JavascriptSymbol) to the property.</param>
/// <param name="propertyDescriptor">The property descriptor.</param>
/// <param name="result">Whether the property was defined.</param>
/// <returns>
Expand All @@ -875,7 +897,7 @@ CHAKRA_API
/// Requires an active script context.
/// </remarks>
/// <param name="object">The object that contains the property.</param>
/// <param name="key">The key (JavascriptString) to the property.</param>
/// <param name="key">The key (JavascriptString or JavascriptSymbol) to the property.</param>
/// <param name="useStrictRules">The property set should follow strict mode rules.</param>
/// <param name="result">Whether the property was deleted.</param>
/// <returns>
Expand All @@ -895,7 +917,7 @@ CHAKRA_API
/// Requires an active script context.
/// </remarks>
/// <param name="object">The object that has the property.</param>
/// <param name="key">The key (JavascriptString) to the property.</param>
/// <param name="key">The key (JavascriptString or JavascriptSymbol) to the property.</param>
/// <param name="propertyDescriptor">The property descriptor.</param>
/// <returns>
/// The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.
Expand All @@ -913,7 +935,7 @@ CHAKRA_API
/// Requires an active script context.
/// </remarks>
/// <param name="object">The object that may contain the property.</param>
/// <param name="key">The key (JavascriptString) to the property.</param>
/// <param name="key">The key (JavascriptString or JavascriptSymbol) to the property.</param>
/// <param name="hasOwnProperty">Whether the object has the non-inherited property.</param>
/// <returns>
/// The code <c>JsNoError</c> if the operation succeeded, a failure code otherwise.
Expand Down
Binary file modified msvs/lib/ChakraCore.dll
Binary file not shown.
Binary file modified msvs/lib/ChakraCore.lib
Binary file not shown.
Binary file modified msvs/lib64/ChakraCore.dll
Binary file not shown.
Binary file modified msvs/lib64/ChakraCore.lib
Binary file not shown.
Binary file modified msvs/minisphere.rc
Binary file not shown.
Binary file modified msvs/ssj.rc
Binary file not shown.
2 changes: 1 addition & 1 deletion setup/minisphere.iss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
; solution configurations.
#define AppName "miniSphere"
#define AppPublisher "Fat Cerberus"
#define AppVersion3 "X.X.X"
#define AppVersion3 "5.1.0"

; to create a bundle with Sphere Studio, copy the Sphere Studio binaries
; into msw/ide/ before building the installer.
Expand Down
2 changes: 1 addition & 1 deletion src/minisphere/pegasus.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#include "xoroshiro.h"

#define API_VERSION 2
#define API_LEVEL 1
#define API_LEVEL 2

enum file_op
{
Expand Down
2 changes: 1 addition & 1 deletion src/plugin/PluginMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class PluginMain : IPluginMain
{
public string Name { get; } = "miniSphere Support";
public string Description { get; } = "Provides support for the miniSphere toolchain.";
public string Version { get; } = "X.X.X";
public string Version { get; } = "5.1.0";
public string Author { get; } = "Fat Cerberus";

internal PluginConf Conf { get; private set; }
Expand Down
4 changes: 2 additions & 2 deletions src/plugin/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: AssemblyFileVersion("0.0.0.0")]
[assembly: AssemblyVersion("5.1.0.2639")]
[assembly: AssemblyFileVersion("5.1.0.2639")]
2 changes: 1 addition & 1 deletion src/shared/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#ifndef SPHERE__VERSION_H__INCLUDED
#define SPHERE__VERSION_H__INCLUDED

#define SPHERE_VERSION "X.X.X"
#define SPHERE_VERSION "5.1.0"

#define SPHERE_ENGINE_NAME "miniSphere"
#define SPHERE_COMPILER_NAME "Cell"
Expand Down

0 comments on commit e86751f

Please sign in to comment.