Commit graph

128 commits

Author SHA1 Message Date
刘皓
5048efe1b4
Merge branch 'dev' into libretro 2025-07-03 22:09:46 -04:00
Splendide Imaginarius
75f9caadbb Fix misspelling of "occurred" 2025-07-03 22:31:40 +00:00
刘皓
b7b5e23e18
Implement system bindings in libretro builds 2025-06-03 23:06:05 -04:00
刘皓
79199ccd7a
Allow json5pp to report syntax errors and bad casts even with -fno-exceptions 2025-05-17 22:57:31 -04:00
刘皓
2f589e1cf4
Fix compilation errors in binding/ in standalone builds 2025-05-17 17:21:51 -04:00
刘皓
b9bb3535ae
Use vcs_tag to get Git version instead of run_command
This way Meson will automatically keep the Git hash updated as you make
new Git commits, rather than forcing you to reconfigure the build again
every time you make a new commit to keep the commit hash updated.
2025-02-01 17:28:52 -05:00
刘皓
835795a0c6
Use different Ruby command-line arguments in libretro builds
I've decided to stop gambling with ways to make `-e` not crash Ruby on
startup in libretro builds (see commit
1473416a5a for context). Making Ruby load
a dummy script seems to work better.
2025-01-19 11:56:47 -05:00
刘皓
1473416a5a
Fix crashes when starting up libretro Ruby sandbox (hopefully)
Guys, I think I'm going insane. Every time I build the libretro Ruby
sandbox with a different version of Ruby, or even when I build Ruby at a
different path on my computer, there's some chance that the builds
produced with that version of Ruby and/or that path on my computer
result in Ruby crashing on startup in libretro builds. I've been
tweaking these command-line arguments that are passed to Ruby for a
while now, and I *think* these are the correct ones that will stop Ruby
from crashing.
2025-01-17 01:23:18 -05:00
Splendide Imaginarius
711f9a4553
Merge pull request #158 from Nathan-MV/plugin-script
Some checks failed
Automatic Build / Ubuntu 22.04 x86_64 (push) Failing after 5s
Automatic Build / Ubuntu 22.04 arm64 (push) Failing after 3s
Automatic Build / Ubuntu 22.04 armv6 (push) Failing after 3s
Automatic Build / Ubuntu 22.04 armv7 (push) Failing after 2s
Automatic Build / Ubuntu 22.04 power8le (push) Failing after 2s
Automatic Build / Ubuntu 22.04 armv7-neon (push) Failing after 2s
Automatic Build / Ubuntu 22.04 power9le (push) Failing after 2s
Automatic Build / Ubuntu 22.04 riscv64 (push) Failing after 2s
Automatic Build / Ubuntu 22.04 s390x (push) Failing after 2s
Automatic Build / Windows (push) Has been cancelled
Automatic Build / macOS (push) Has been cancelled
Postload Scripts
2024-10-26 19:41:41 +00:00
Nathan-MV
17f9ec9c19 postload scripts 2024-10-26 14:24:32 +00:00
Nathan-MV
f27018912c fix conflicts with #207 2024-09-29 11:51:23 +00:00
Snowdream
d4bf2123a9 T++ CSVs do not have headers, don't try to read 'em 2024-09-29 11:43:30 +00:00
Snowdream
ab2f477031 Correctly parse CSVs with newlines within quoted strings 2024-09-29 11:43:30 +00:00
Snowdream
7c066151ff Add a function to parse CSV files to multidimensional arrays. 2024-09-29 11:43:30 +00:00
Wayward Heart
99ad4fa636 Throw exceptions for Resets and Exits instead of directly raising.
While this does close small memory leaks, this is mostly for threading reasons. We're not supposed to call rb_raise with the gvl released, and calling rb_raise prevents GFX_UNLOCK from being called, which would cause problems for any games that want to call graphical operations in multiple threads should the user reset.

We're also now calling Graphics.__reset__ and Audio.__reset__ via eval instead of directly calling the functions, in case a game wants to hook them.
2024-08-02 09:26:51 -05:00
Wayward Heart
a73f9ccc1f Prevent memory leaks from rb_raise
rb_raise calls longjmp, which bypasses C++ destructors, and also keeps the error for catch blocks from being unallocated if passed by reference, which we do for exceptions.

Some of the calls I left can still jump out of try blocks, which you're not supposed to do, but there shouldn't be any objects with destructors initialized at those points so it's probably fine.
2024-08-02 09:26:51 -05:00
Wayward Heart
9e8132ba25 Don't hang if the user closes the game while it's still initializing 2024-01-22 08:16:32 -06:00
Amaryllis Kulla
fae7fa9c4e
Update ancurio's copyright notice (#29) 2023-10-04 15:07:34 -04:00
Riley Pierce
0a28d4cf3c
add system.file_exist? (#19)
binding to the internal filesystem.exists, a less janky way of checking if a file exists in the path cache
2023-08-01 03:28:08 -04:00
Struma
39f7cb45b7 Adjust error messages for script load failure 2023-05-21 19:48:33 -04:00
Struma
fa0e60b7fc Add git hash to System::VERSION
I don't really plan on putting out another "release tag" anytime soon,
so the hash for the current git commit is being added to the version string
to help tell the difference between one build and the other.
2023-05-19 08:49:32 -04:00
Struma
0072c19371 Multiple changes
+ Time is now measured in fractions of a second, not microseconds
+ Viewports in RGSS1 will now only retain weak references to their children
+ Invalid Sprite bitmaps found during Graphics.update will be treated as null
+ Bitmap#mega? and Bitmap#animated? are properly rescued
2023-05-03 23:00:06 -04:00
Struma
c62a8dfd3a emplace bad 2023-04-12 22:53:18 -04:00
Struma
e91c470ea0 make config code slightly more readable 2023-04-12 22:28:03 -04:00
Struma
745dc3854f fix loading settings from json erasing other things set within the same session 2023-04-12 21:03:32 -04:00
Splendide Imaginarius
963bd856cf
Update JIT for Ruby v3.1.0+ (#7)
* Fix MJIT options for Ruby v3.1.0+

* Support YJIT
2023-03-03 08:56:23 -05:00
Zorua
368534fd1d Automatically load Zlib again, the right way 2022-12-21 05:18:52 -05:00
Snowdream
be88ebef2b Don't try to load zlib by default anymore
This really only works in 3.0+ it seems.
2022-07-16 20:16:18 -04:00
Struma
8f018fdb30 Change CONFIG to CFG
last minute thought I had, in order to try and avoid
conflicts with any other global constants that happen
to be called "CONFIG". Also looks nice next to "ENV".
2022-07-05 03:25:13 -04:00
Struma
0131abd4dd Add ability to change configuration from Ruby
- `System.config` has become `CONFIG.to_hash`
- `CONFIG[]` can be used to look up settings
- `CONFIG[]=` can be used to add/change settings
- When reading settings, user settings are preferred over defaults
- Changes are immediately stored in the user settings file
2022-07-05 03:16:44 -04:00
Struma
f839001be9 Finish moving to GameController API, other stuff
Namely:
- moved raw input states from System to Input
- Input.raw_key_states returns Array<Boolean> now
- the Joystick hash has become an entire module
- added manual input handling for controller buttons
- Raw controller states for both buttons and axes can be polled
- mouse and raw keys are now captured between Input updates
2022-07-04 04:53:52 -04:00
Struma
a0da0df6ef SharedFontState: Add 'defaultFontFamily' property
5e3907c7f8
2022-07-03 03:23:28 -04:00
Struma
64dad2ad27 Good enough to release (?) 2022-01-23 18:29:08 -05:00
Struma
56ef0ed900 allow enabling/disabling certain options through env 2022-01-23 08:21:59 -05:00
Struma
950e62dff1 make reloads after using System.un/mount optional
Also, use rb_bool_arg more often.
2022-01-20 19:50:46 -05:00
Struma
558942d8e7 Merge branch 'dev' into 'fix-windows-console'
# Conflicts:
#   src/config.cpp
2022-01-17 04:18:57 +00:00
Joni Savolainen
6d9c144b65 Open Windows standard file descriptors before initializing Ruby 2022-01-16 14:34:55 +02:00
Joni Savolainen
e2ba8d4398 Revert "Allow queuing Debug prints"
This reverts commit ac778db752.
2022-01-16 13:21:40 +02:00
Struma
c2ebb1d234 fix System::VERSION returning macro name
Yes, I'm an idiot for not noticing, but it's fixed now.
2022-01-15 17:21:26 -05:00
Joni Savolainen
ac778db752 Allow queuing Debug prints 2022-01-15 11:05:45 +02:00
Joni Savolainen
c2deb233e0 Set up Windows console during MRI init 2022-01-15 08:55:22 +02:00
Struma
59d326ef4a Remove basically pointless build options 2021-10-14 05:28:32 -04:00
Struma
e9fdf46d49 Include Ruby standard library by default on macOS 2021-08-28 04:53:04 -04:00
Struma
d8c4351b60 rename String.guess to String.to_utf8 2021-08-12 00:35:19 -04:00
Struma
1e054ade0e Add String.guess, String.guess! 2021-08-11 01:56:03 -04:00
Struma
20878a4d70 Freeze System::CONFIG 2021-06-25 22:07:18 -04:00
Struma
9920de87f8 Make json config accessible from System::CONFIG 2021-06-22 18:32:39 -04:00
Struma
6c08073610 Set Ruby's ARGV based on the command line 2021-06-22 09:38:23 -04:00
Struma
3626ac072f Make the window title a gettable property 2021-06-11 14:26:14 -04:00
Struma
95e17244fd Remove Windows API emulation 2021-06-08 19:02:15 -04:00