Commit Graph

27 Commits

Author SHA1 Message Date
Jonas Kulla f25d2db63c MRI-Binding: Add RGSS3 '__FILE__' variant 2014-04-15 11:54:22 +02:00
cremno 95c112bbe4 MRI: add option to use a script's name as filename 2014-04-11 18:11:32 +02:00
cremno 8bc17a9a98 MRI: less `strlen` calls, use custom script's filename 2014-04-11 17:13:25 +02:00
cremno f6ec364632 MRI: rewrite script eval
- set __FILE__ (RGSS 1 and 2)
 - set Ruby string encoding to UTF-8
   instead of using a magic comment
2014-04-10 14:00:05 +02:00
cremno 06b877a78c MRI: don't set $0 (see #24) 2014-04-10 02:14:25 +02:00
cremno 4e0262d2a7 MRI: fix $RGSS_SCRIPTS 2014-04-10 01:16:31 +02:00
cremno f8b87eb188 MRI: don't manually peform GC 2014-04-09 23:45:24 +02:00
cremno 804a697c03 MRI: add $RGSS_SCRIPTS 2014-04-09 22:36:56 +02:00
cremno f06769b434 MRI: some minor optimizations 2014-01-24 22:30:19 +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 5b4e512dc6 ulong isn't defined anywhere (maybe on linux it is.. but not standard on OS X) 2013-12-31 16:24:56 -05:00
Jonas Kulla 7f4e58fd6e MRI-Binding: Don't memcpy script data before deflating
I think the reason this was originally done was some
issue with ruby's GC where it would wrongfully sweep
the script array variable on the C stack.

This change should speed up startup a little.
2013-12-29 14:55:49 +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 231e38ae8e Replace QVector, QList with std::vector, std::list
An exception is made of TexPool, which will need a
bit more testing before transitioning to std containers.

Also replace 'int' with 'size_t' where it is used only
as an array index.
2013-12-26 20:18:33 +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 ef2430e0c3 Sanitize #include statements
The general rule I'm aiming for is to <> include
system wide / installed paths / generally everything
that's outside the git managed source tree (this means
mruby paths too!), and "" include everything else,
ie. local mkxp headers.

The only current exception are the mri headers, which
all have './' at their front as to not clash with
system wide ruby headers. I'm leaving them be for now
until I can come up with a better general solution.
2013-12-04 17:48:37 +01:00
Jonas Kulla 30507d2f6f MRI-Binding: Enforce UTF-8 string encoding 2013-10-19 18:57:34 +02:00
Jonas Kulla d5bc71f7ba MRI-Binding: Add 'System.puts()' for console printing 2013-10-19 15:54:21 +02:00
Jonas Kulla 39436ad231 Fix up SDL2 include paths
Using "SDL2/SDL_xxx.h" instead of "SDL_xxx.h" caused
the include paths provided by pkg-config to be ignored,
and headers from a standard include path to be used instead.
2013-10-13 23:21:34 +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 6fef49f42a Cosmetic fixes 2013-10-08 06:05:06 +02:00
Jonas Kulla a108843069 Add 'System.data_directory()' for save files etc.
Just a small wrapper around SDL2's GetPrefPath()
2013-10-08 06:04:21 +02:00
Jonas Kulla ce70b6dc95 Fix a heavy memory corruption in p()/print()
If you free locally allocated ruby objects
you're gonna have a BAAAD time
2013-10-06 10:19:31 +02:00
Jonas Kulla 73812e957e Clean up unused code 2013-09-03 14:39:11 +02:00
Jonas Kulla 88041a2395 Check if RMXP script pack path was read from Game.ini 2013-09-01 16:36:11 +02:00
Jonas Kulla ff25887f41 Initial commit 2013-09-01 16:27:21 +02:00