Commit graph

106 commits

Author SHA1 Message Date
Wayward Heart
7539a2f34b Use SDL_LowerBlitScaled/SDL_SoftStretchLinear instead of SDL_BlitScaled 2024-03-24 07:47:58 -05:00
Wayward Heart
e477007061 Use stretchBlt in drawText 2024-03-24 07:47:58 -05:00
Wayward Heart
c89f3d5bd7 Change the create Bitmap from surface constructor to always take ownership of the surface, and provide an option to leave it as a mega surface 2024-03-24 07:47:58 -05:00
Wayward Heart
bd01e11f56 Fix blitting from megatextures
Code mostly taken from the implementation in Bitmap::drawText
2024-03-24 07:47:57 -05:00
Splendide Imaginarius
1b3d1d96c4
Merge pull request #145 from WaywardHeart/deletedBitmaps
Guard against deleted bitmaps
2024-03-22 06:47:14 +00:00
Splendide Imaginarius
58d7ec8519 Implement smooth scaling for simple sprites 2024-03-22 04:35:06 +00:00
Wayward Heart
35d46e627d Guard against deleted bitmaps
Ruby is not guaranteed to delete bitmaps after any windows, sprites, etc that they are attached to. In the event that the attached object is not deleted before the next call to Graphics.update, this will most likely result in a segfault, as isDisposed() is not guaranteed to return true for a deleted bitmap.

Bitmap::invalid was added in an attempt to guard against this for sprites, but since the bitmap in question is deleted it's not guaranteed that the pointer actually points to null, which made the fix unreliable.
2024-01-10 09:41:00 -06:00
Wayward Heart
43ac2b35a1 Don't clamp Bitmap::blit
Bitmap::stretchBlt handles that now
2024-01-05 07:33:55 -06:00
Wayward Heart
2247f1d9b7 Shrink missized blits 2024-01-05 07:33:55 -06:00
Splendide Imaginarius
7032dccbc7 Add Bitmap constructors that take a TEXFBO or an SDL_Surface
Refactor snapToBitmap to use it, and add ability to dump VX Atlas with it.
2023-11-27 22:47:24 +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
Struma
a8e6338598 Convert solidFonts config option to be an array of fonts 2023-04-12 21:03:32 -04:00
Snowdream
843e54de2e deal with a couple warnings, make sure xcode project still builds 2022-07-22 13:12:29 -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
85fe2b070a miscellaneous garbage 2022-01-23 09:54:33 -05:00
Struma
5855266dab make the terrifying sign-compare warnings go away 2022-01-23 09:31:27 -05:00
Struma
3c7d454dd6 Make Bitmap.to_file work with overlarge bitmaps 2021-08-09 10:42:47 -04:00
Struma
baaa162e2c Remove libsigc++, use sigslot instead 2021-06-14 10:03:56 -04:00
Struma
63b40053ac Prevent relevant functions from stepping over Graphics.update when threading 2021-06-04 14:29:45 -04:00
Struma
ca596cbaf9 cleanup 2021-05-23 21:55:02 -04:00
Struma
023e9a05a7 Adjust GIF decoding loop, again 2021-05-23 11:34:24 -04:00
Struma
fd8bd40260 using gif.decoded_frame as a condition is just a bad idea 2021-05-23 10:40:49 -04:00
Struma
78e823a040 Just iterate through gif frames with a for loop (Fixes #44) 2021-05-20 15:54:18 -04:00
Struma
07548ff9d6 fix infinite loop when gif total frames != decoded frames 2021-05-09 18:19:46 -04:00
Struma
9fa790ab15 Remove extraneous call to glReadPixels 2021-05-08 12:28:30 -04:00
Struma
c7803c8d09 Hook bitmaps into prepareDraw 2021-05-05 04:30:11 -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
260260531d Make bitmap animation functions properly check for disposal 2021-05-04 16:32:31 -04:00
Struma
c97f37349d Fix non-animated bitmap.initialize_copy crash 2021-05-03 20:38:35 -04:00
Struma
7456b5ee67 remove unnecessary buffer allocation 2021-05-03 19:33:24 -04:00
Struma
52dcda6d15 Fix blitting, add optional position arg to Bitmap.snap_to_bitmap 2021-05-03 19:09:36 -04:00
Struma
2b316a933d Edit warning visibility 2021-05-03 15:48:16 -04:00
Struma
4cd35cc3b6 Correctly set bitmap texture for one-frame GIFs 2021-05-03 15:33:55 -04:00
Struma
4ffc89cc7b Round current bitmap frame calculation 2021-05-03 15:15:16 -04:00
Struma
8a3470edc7 Create static bitmap from GIF if it only contains one frame 2021-05-03 13:57:10 -04:00
Struma
664bfb41ba Bitmap.snap_to_bitmap && Bitmap.each_frame 2021-05-03 11:51:39 -04:00
Struma
d6f69db7c9 Limit destination position of Bitmap.add_frame 2021-05-03 10:36:06 -04:00
Struma
31c8dc8367 Raise Ruby errors in Bitmap animation functions 2021-05-03 10:26:45 -04:00
Struma
2fc6731a67 Prevent removing frames from a static bitmap 2021-05-03 02:33:06 -04:00
Struma
09e68345f4 Copy all frames of animated bitmaps 2021-05-03 02:18:03 -04:00
Struma
66de7c1d14 Allow replacing raw data on animated bitmaps 2021-05-02 23:50:16 -04:00
Struma
9c603b329e Change the "your computer belongs in a museum" OpenGL error 2021-05-02 23:19:06 -04:00
Struma
5c2d0ac167 Decode GIF frames within Bitmap constructor 2021-05-02 23:05:36 -04:00
Struma
380bd1d249 Add Bitmap.next_frame + Bitmap.previous_frame 2021-05-02 21:53:55 -04:00
Struma
171147d4d0 Update Bitmap.playing automatically if bitmap isn't looping 2021-05-02 21:17:16 -04:00
Struma
1219fb4ab9 Support manual animation of Bitmaps 2021-05-02 20:36:28 -04:00