Commit graph

10 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
23e9f6cb1c Move the GFX_LOCK/GFX_UNLOCK call for disposing into disposable.h.
It's currently not (much of) a problem because few or no games use multiple threads, but I believe that ruby can run its garbage collector while the GVL is released, which means that Graphics.update and Graphics.wait are currently not thread safe.

Moving the call to GFX_LOCK into dispose() should fix this.
2024-06-02 01:51:59 -05:00
Wayward Heart
67926b17f5 Use signals to dispose of the children of Viewports in RGSS1
The weak references method was throwing errors if the object id had already been recycled
2024-01-11 10:57:00 -06:00
Amaryllis Kulla
fae7fa9c4e
Update ancurio's copyright notice (#29) 2023-10-04 15:07:34 -04:00
Struma
959e983884 Remove collected sprite IDs from their viewports 2023-05-08 23:38:54 -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
63b40053ac Prevent relevant functions from stepping over Graphics.update when threading 2021-06-04 14:29:45 -04:00
Struma
2fd585393d the not-so-great warning purge 2021-02-22 01:22:26 -05:00
Struma
f719c27f57 Move RGSS1 viewport elements to new parent when 'viewport=' is called 2021-02-10 00:04:34 -05:00
Inori
7f3a548755 Remove mruby and null bindings 2019-07-31 08:47:44 -04:00
Renamed from binding-mri/disposable-binding.h (Browse further)