If PhysFS fails to open a path, fall back to simple FILE* handles.
Not sure yet if this is a good idea, but from observation
RMXP allows load_data() to operate on paths outside the game
directory as well, so we have to support this.
This was supposed to disappear shortly after To the Moon's release,
but it unfortunately survived a bit longer :)
The status of the mouse cursor being inside / outside the game window
is now properly exposed (in MRI) via MKXP.mouse_in_window.
Make sure that when mkxpRawKeyStates was called, the Input module
will work off of the same queried snapshot of pressed keys
during the next update call.
More accurate behavior, such as Font objects properly inheriting
their name attributes, and centralization of code for picking
the first existing name from a passed string array.
Also centralizes initial default_name population in core.
Note: This currently breaks the mruby binding build.
The default value is an empty string, which triggers the simple
transition. Passing null is not legal (and wasn't possible in
mkxp from Ruby side anyway).
Fixes#108.
This underlines that no reference inside the setter is taken,
and that these attributes are non-nullable.
Also removes a couple of superfluous attribute macros.
As noted, on Viewport dispose, RMXP always calls the core
dispose method for child objects regardless of whether
user scripts override it in sub classes.
Implement this behavior in mkxp to prevent infinite recursion.
This function which was formerly a simple wrapper around
SLD_GetPrefPath() is changed to instead return the directory
assembled from org/app name specified in mkxp.conf, so one
can be sure that both mkxp and user scripts will always write
into the same directory when a custom path is preferred.
This breaks script compatibility.
'System' is way too generic of a name to reserve for mkxp use,
and I have already seen at least one occurance in the wild of
it being used by user scripts.
Ideally, all mkxp RGSS extensions would be moved under this
module, but I feel like the core modules (Input, Graphics etc)
are more safe as users are hesitant to directly extend these.
Either of these would previously crash (same for VX):
tm = Tilemap.new
at = tm.autotiles
tm = nil
GC.start
at[0] = Bitmap.new(1, 1)
tm = Tilemap.new
at = tm.autotiles
tm.dispose
at[0] = Bitmap.new(1, 1)
Funnily, this makes RMXP itself crash too, but crashing is
never acceptable except for possibly resource exhaustion.
The RGSS doesn't do it. But doing it shouldn't be a problem, as it's the
correct way. If a game is broken by this commit (unlikely), then the game
needs to be fixed as silent truncation is highly unlikely to be wanted.
The gist of it is that for Etc and Font props, the assignment
operator (eg. 'sprite.color=') does not take a reference of the
right hand parameter and replaces its previous one with it (this
was the old behavior). Rather, it keeps its internal property
object and copies the parameter object into it by value.
The getter is unchanged; it still returns a reference to the
internal property object.
s = Sprite.new
c = Color.new
s.color = c
p s.color == c # => true
p s.color.object_id == c.object_id # => false (true before)
c = s.color
p s.color.object_id == c.object_id # => true