Commit Graph

19 Commits

Author SHA1 Message Date
Jonas Kulla 2ba9f6589b Merge pull request #57 from cremno/mri-use-rb_type_p-instead-of-rb_type
MRI: use RB_TYPE_P() instead of rb_type()
2014-08-30 03:56:37 +02:00
cremno 173ee07959 get rid of INIT_TYPE() / initType()
A function to initialize rb_data_type_t variables is not needed.

Also fix a FIXME (WindowVX's name is now "Window") on the way.
2014-08-29 21:01:53 +02:00
cremno 0203e28436 use rb_data_type_t instead rb_data_type_struct
For some reason the struct tag and typedef name differ and
nobody uses rb_data_type_struct.
2014-08-29 14:13:40 +02:00
cremno 70c40fe530 MRI: use RB_TYPE_P() instead of rb_type()
Just a very small optimization.
2014-08-29 13:11:39 +02:00
Jonas Kulla e858bbdcf5 Lift 'Disposable' concept from core into bindings
Instead of replicating the RGSS Disposable interface in C++
and merely binding it, redefine the 'disposed' state as the
entire core object being deleted (and the binding object's
private pointer being null).

This makes the behavior more accurate in regard to RMXP.
It is now for example possible to subclass disposable classes
and access their 'dispose'/'disposed?' methods without
initializing the base class first (because the internal pointer
is simply null before initialization). Accessing any other
base methods will still raise an exception.

There are some quirks and irregular behavior in RMXP; eg.
most nullable bitmap attributes of disposable classes
(Sprite, Plane etc.) can still be queried afterwards, but
some cannot (Tilemap#tileset), and disposing certain
attributes crashes RMXP entirely (Tilemap#autotiles[n]).
mkxp tries to behave as close possible, but will be more
lenient some circumstances.

To the core, disposed bitmap attributes will look
identically to null, which slightly diverges from RMXP
(where they're treated as still existing, but aren't drawn).
The Disposable interface has been retained containing a
single signal, for the binding to inform core when
objects are disposed (so active attributes can be set to null).
2014-08-09 21:21:38 +02:00
Jonas Kulla 64f1e32fdc Input: Implement RGSS3 functionality in bindings
Ie. using symbols instead of Input:: constants to query
button states.
2014-02-03 15:04:57 +01:00
Jonas Kulla a0a27889a3 Merge #8 2014-01-02 00:11:57 +01:00
Jonas Kulla 1bacceddf0 Spacing 2014-01-01 12:59:40 +01:00
Edward Rudd 4a817f45e5 wrap not check in parenthesis so the check is done correctly. 2013-12-31 16:26:10 -05:00
Edward Rudd 2572a05e8b safely print errors by explicitly specifying a format string 2013-12-31 16:25:38 -05:00
Jonas Kulla 9759e52b3c Exception: Constructor now takes printf style arguments 2013-12-29 18:05:11 +01:00
Jonas Kulla 2adf8ab265 Transition from QtCore to stdc++ / STL / boost
This looks like a pretty major change, but in reality,
80% of it is just renames of types and corresponding
methods.

The config parsing code has been completely replaced
with a boost::program_options based version. This
means that the config file format slightly changed
(checkout the updated README).

I still expect there to be bugs / unforseen events.
Those should be fixed in follow up commits.

Also, finally reverted back to using pkg-config to
locate and link libruby. Yay for less hacks!
2013-12-29 13:59:26 +01:00
Jonas Kulla c504a383ba MRI-Binding: Optimize RB_ARG_END vaarg guard
It's enough to check this only in debug mode.
Make this an empty define in release mode.
2013-12-20 11:29:12 +01:00
Jonas Kulla d7ceff91a2 MRI-Binding: Deduplicate code 2013-12-20 10:22:01 +01:00
Jonas Kulla cb6f73f7df Rename 'GlobalState' to 'SharedState' to avoid confusion with GLState
This was particularly nasty with the shorthand macros
'gState' and 'glState'. The former is now 'shState'.
2013-10-09 12:30:33 +02:00
Jonas Kulla 4ff563725b Make 'rb_get_args()' va_arg passing safer by introducing a termination marker
What can I say. I made a pact with the devil, and paid dearly.
Almost a whole day's worth of debugging, actually. Not again.

If this turns out to be slow we can always optimize the critical
parts (with no variable param count) later, or completely remove it.
2013-09-27 04:49:48 +02:00
Jonas Kulla f81e20cc68 Raise exception on too big textures 2013-09-03 15:22:00 +02:00
Jonas Kulla 57a8f772c8 Remove leftover junk 2013-09-01 16:39:22 +02:00
Jonas Kulla ff25887f41 Initial commit 2013-09-01 16:27:21 +02:00