Commit graph

29 commits

Author SHA1 Message Date
Wayward Heart
130375b6d8 Properly handle uninitialized and reinitialized objects
In RGSS, uninitialized disposable objects (and Fonts, sort of) are technically disposed, and other objects (Tone, Color, Rect, and Table) are created with all values set to 0. It's also possible to reinitialize them, although reinitializing disposables leaks memory.

This commit causes MiniFFI and FileInt objects to improperly raise disposed errors if used while uninitialized, but that feels acceptable to me.
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
477162d1d3 Ensure that fonts for hires bitmaps get deleted. 2024-06-02 01:51:59 -05: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
Snowdream
4e6e291624 Revert adding Bitmap#v_flip/h_flip 2022-07-20 02:56:04 -04:00
Struma
5100ae57e8 Add Bitmap.h_flip and v_flip 2022-07-04 07:35:38 -04:00
Struma
af1924abd9 Suppress Documentation errors for Xcode
There are 14,000 of them and I just don't care.
2021-06-08 03:22:46 -04:00
Struma
63b40053ac Prevent relevant functions from stepping over Graphics.update when threading 2021-06-04 14:29:45 -04:00
Struma
96206f9909 oopsies 2021-05-04 23:35:09 -04:00
Struma
6fe980abc8 Massively improve animation frame timing 2021-05-04 23:32:01 -04:00
Struma
52dcda6d15 Fix blitting, add optional position arg to Bitmap.snap_to_bitmap 2021-05-03 19:09:36 -04:00
Struma
664bfb41ba Bitmap.snap_to_bitmap && Bitmap.each_frame 2021-05-03 11:51:39 -04:00
Struma
31c8dc8367 Raise Ruby errors in Bitmap animation functions 2021-05-03 10:26:45 -04:00
Struma
380bd1d249 Add Bitmap.next_frame + Bitmap.previous_frame 2021-05-02 21:53:55 -04:00
Struma
1219fb4ab9 Support manual animation of Bitmaps 2021-05-02 20:36:28 -04:00
Struma
2c188f944a Fix setting animated bitmap FPS from Ruby 2021-05-02 13:24:46 -04:00
Struma
f98b91ff9a Support animated GIFs 2021-05-01 21:50:39 -04:00
Struma
6f1542ecf9 ruby why are you like this 2020-04-24 07:57:44 -04:00
Struma
f91bc5bf33 Bind Bitmap mega+maxsize detection functions 2020-04-23 04:18:25 -04:00
Struma
94e063c6c0 OLD_RUBY -> RAPI_MAJOR/RAPI_MINOR/RAPI_TEENY/RAPI_FULL 2020-02-26 12:44:37 -05:00
Inori
dd9c0c50f8 add Bitmap.to_file 2019-09-06 18:30:37 -04:00
Inori
f17ab86ac2 Use glReadPixels for Bitmap::getRaw 2019-09-06 16:18:09 -04:00
Inori
3b714579a8 Add Bitmap.raw_data property 2019-09-06 15:09:03 -04:00
Inori
22af5bf0f5 Gifs are just a mistake actually 2019-09-05 21:10:00 -04:00
Inori
9f3e3eacc0 I am still a fool 2019-09-05 18:19:31 -04:00
Inori
5db28c7728 Bind Bitmap.update 2019-09-05 18:17:40 -04:00
Inori
7f3a548755 Remove mruby and null bindings 2019-07-31 08:47:44 -04:00
Renamed from binding-mri/bitmap-binding.cpp (Browse further)