Commit Graph

19 Commits

Author SHA1 Message Date
Ancurio f3b4ab62a5 Update copyright notice 2021-09-24 06:30:55 +02:00
Jonas Kulla e4558c9dfb Use FS::openReadRaw() where ext supplementing makes no sense
Specifically, in places where the full filename is always supplied,
eg. when reading .rxdata type files.
2015-07-09 12:58:01 +02:00
Jonas Kulla b39964a49a MRI: Make error handling during script load more robust 2014-12-31 18:52:20 +01:00
Jonas Kulla 3a29385df0 MRI: load_data: Catch exceptions and pass onto ruby 2014-09-13 07:26:42 +02:00
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 70c40fe530 MRI: use RB_TYPE_P() instead of rb_type()
Just a very small optimization.
2014-08-29 13:11:39 +02:00
cremno f06769b434 MRI: some minor optimizations 2014-01-24 22:30:19 +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 f067e0eff8 MRI-Binding: Reduce number of object allocations
Previously, wrapped instances of mkxp core classes were
stored as RData ivars inside the actual object. This turned
out to be pointless as RData objects themselves are perfectly
valid objects that can carry ivars and have parent classes.
Therefore, the RData objects are now exposed directly to
the user scripts, effectively halving the amount of object
allocations.
2013-10-30 10:06:24 +01:00
cremno 8c45a5b11e follow-up: style adjustments (see GH-2) 2013-10-22 15:24:55 +02:00
cremno 071ad5d961 MRI: changes to mkxp's Marshal::load monkey patch
- force string encoding to UTF-8 only when it's ASCII-8BIT (force only valid UTF-8 strings in future?)

- support original Marshal::load proc (2nd arg)
2013-10-22 13:45:57 +02:00
Jonas Kulla aa786e268d Remove unused code 2013-10-20 21:04:30 +02:00
Jonas Kulla 27341dc95d MRI-Binding: Enforce UTF-8 strings in 'Marshal::load()' via aux proc
We override 'Marshal::load()' via alias and call it with
a custom auxiliary proc in the alias which sets the encoding
of all demarshalled strings to UTF-8. The case where a user
himself provided a proc to 'load()' is not implemented.

This is definitely a better solution than patching the ruby
source tree. Thanks to github.com/cremno for hints and help!
2013-10-20 20:54:56 +02: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 e42e6398cb Add FIXME 2013-09-10 04:21:57 +02:00
Jonas Kulla ff25887f41 Initial commit 2013-09-01 16:27:21 +02:00