Commit graph

32 commits

Author SHA1 Message Date
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
Splendide Imaginarius
3ecb09d050 Fold lanczos3Scaling config into smoothScaling
Thanks to Riley Pierce for the suggestion.

Fixes https://github.com/mkxp-z/mkxp-z/issues/73
2023-10-26 18:35:39 +00:00
Splendide Imaginarius
11a1fef1c3 Implement hi-res Bitmap replacement 2023-10-25 15:39:28 +00:00
Amaryllis Kulla
fae7fa9c4e
Update ancurio's copyright notice (#29) 2023-10-04 15:07:34 -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
Zorua
6007c45c8a Add Graphics.display_width & Graphics.display_height 2022-09-24 03:09:53 -04:00
Snowdream
dba559aafb Make Graphics thread-safety optional 2022-07-16 20:16:09 -04:00
Struma
d4dc31af9e Add Graphics.resize_window 2022-07-05 08:42:26 -04:00
Struma
2a7ff4b7f3 Bind new graphics functions ruby-side 2022-07-03 10:01:07 -04:00
Struma
683b5af87e Prevent crashes when closing the window during video playback 2022-01-23 04:03:50 -05:00
Struma
84f95966ea Clean up videos some more, make them skippable
Also, revert a change I made to the button names internally
a long time ago, when the intent behind mkxp-z was possibly going to be
different.
2022-01-23 01:46:13 -05:00
Struma
45c5553619 clean up merge a bit 2022-01-21 00:38:13 -05:00
Eblo
e874f554b3 Catch exceptions for movie playback 2022-01-20 22:03:47 -05:00
Eblo
b4d468f29d Sync audio for movies and add optional volume control 2022-01-20 22:03:47 -05:00
Struma
3124395cf8 Give Graphics.screenshot the correct pointer (fixes #51) 2021-12-20 17:38:17 -05:00
Struma
95e17244fd Remove Windows API emulation 2021-06-08 19:02:15 -04:00
Struma
63b40053ac Prevent relevant functions from stepping over Graphics.update when threading 2021-06-04 14:29:45 -04:00
Struma
fdb86f2ede Do not use GVL on possibly time-consuming functions 2021-06-02 08:42:32 -04:00
Struma
ae9e292a1b add Graphics.average_frame_rate 2021-02-27 08:17:14 -05:00
Struma
02c06be88a Add Ruby-accessible delta clocks (microseconds) 2021-02-25 21:29:21 -05:00
Struma
7db1c1219e Prefix mkxp-z preprocessor definitions with MKXPZ_ 2020-12-31 14:50:07 -05:00
Struma
adeb1b2f88 Add more Essentials overrides 2020-04-23 05:33:00 -04:00
Struma
d7337bce6f Bind Graphics.frameskip property 2020-04-16 05:28:30 -04:00
Inori
cd3626c16f Set macOS deployment target to 10.10 2019-08-31 19:12:54 -04:00
Inori
6b007ed8d9 Implement Graphics.center 2019-08-31 12:55:03 -04:00
Inori
8f6a2d285d Implement Graphics.scale 2019-08-31 00:02:09 -04:00
Inori
9c08249992 Remove 'fix_essentials', add 'use_fakeapi' 2019-08-20 05:21:30 -04:00
Inori
cc02c02d76 Remove unnecessary includes 2019-08-19 09:28:00 -04:00
Inori
28b60eb9fb Add Graphics.screenshot 2019-08-19 08:59:35 -04:00
Inori
fd248709e3 Start working on ScreenResizer 2019-08-03 12:33:35 -04:00
Inori
7f3a548755 Remove mruby and null bindings 2019-07-31 08:47:44 -04:00
Renamed from binding-mri/graphics-binding.cpp (Browse further)