Commit graph

1073 commits

Author SHA1 Message Date
Splendide Imaginarius
d2d46b282e
Merge pull request #152 from Eblo/movie-audio-termination-bugfix
Check for audioThreadTermReq in movie audio thread
2024-08-30 13:08:29 +00:00
Splendide Imaginarius
1462dc9623
Merge pull request #204 from Splendide-Imaginarius/mkxp-z-fps
Remove framerate restrictions
2024-08-01 23:49:06 +00:00
Splendide Imaginarius
68a508b027
Merge pull request #205 from Splendide-Imaginarius/mkxp-z-mouse-hires
Fix mouse position in hires mode
2024-07-29 12:54:36 +00:00
Splendide Imaginarius
de4740d973 Fix mouse position in hires mode 2024-07-29 02:51:45 +00:00
Splendide Imaginarius
568abc7b26 Remove framerate restrictions
If game devs want to use framerates outside of Enterbrain's arbitrary
restrictions, there's no reason for us to prevent it. Same reason we
don't restrict the resolution.

Fixes https://github.com/mkxp-z/mkxp-z/issues/64
2024-07-29 01:16:21 +00:00
Splendide Imaginarius
084e80b38c Allow symlinks by default
PhysicsFS supports disabling symlinks, but this is intended for
environments where scripts are sandboxed. Since mkxp-z runs Ruby code
unsandboxed, this doesn't yield any practical security benefit for us.
2024-07-28 21:52:50 +00:00
Splendide Imaginarius
3376730416
Merge pull request #198 from Splendide-Imaginarius/mkxp-z-memory-leak-fix
Fix memory leak when disposing a high-res Bitmap
2024-07-15 23:57:26 +00:00
Splendide Imaginarius
83647b947d Fix memory leak when disposing a high-res Bitmap 2024-07-02 22:52:15 +00:00
Wayward Heart
9221cc7ec2 Fix major memory leak in Bitmap::initFromSurface
c89f3d5bd7 accidentally completely removed the call to free the surface when successfully creating a texture.
2024-06-02 02:02:31 -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
477162d1d3 Ensure that fonts for hires bitmaps get deleted. 2024-06-02 01:51:59 -05:00
Wayward Heart
65aab17dba Release resources if we error in the Bitmap constructor. 2024-06-02 01:51:59 -05:00
Splendide Imaginarius
8fcd6dd605
Merge pull request #182 from Splendide-Imaginarius/mkxp-z-lanczos-sprite-alpha-log
Refactor smooth sprite scaling
2024-04-30 03:06:26 +00:00
Splendide Imaginarius
c12f00c537
Merge pull request #164 from WaywardHeart/snapToBitmap-composite
Graphics::snapToBitmap needs to call p->screen.composite()
2024-04-29 20:55:21 +00:00
Splendide Imaginarius
b42c13a8ca
Merge pull request #163 from WaywardHeart/hang-on-close
Don't hang if the user closes the game while it's still initializing
2024-04-29 20:53:00 +00:00
Splendide Imaginarius
89801da619
Merge pull request #149 from WaywardHeart/viewportDisposablesRGSS1
Use signals to dispose of the children of Viewports in RGSS1
2024-04-29 20:51:10 +00:00
Splendide Imaginarius
7907822a1b Refactor smooth sprite scaling
This implements some of the logic for non-simple sprite scaling, and also
adds debug logging for the remaining missing logic.
2024-04-29 13:27:42 +00:00
Splendide Imaginarius
fc7a55f0b9
Merge pull request #181 from Splendide-Imaginarius/mkxp-z-expensive-log
Log expensive optional operations
2024-04-29 12:59:55 +00:00
Splendide Imaginarius
e929cfb7c7
Merge pull request #98 from WaywardHeart/transparent-blitting
Enable transparent blitting from megatextures.
2024-04-29 12:55:43 +00:00
Splendide Imaginarius
325a49666d Log expensive optional operations
Path caching and atlas dumping incur a nontrivial performance hit, so it's
useful to log that they're happening so that users are reminded to disable
them if they were enabled accidentally.
2024-04-10 22:48:49 +00:00
Splendide Imaginarius
1ed5101d6f Don't dump lores atlas if in hires mode
The lores atlas is empty in this scenario.
2024-04-10 22:46:41 +00:00
Splendide Imaginarius
a15e4aff14
Merge pull request #178 from Splendide-Imaginarius/mkxp-z-sprite-lanczos
Implement smooth scaling for simple sprites
2024-04-02 03:44:55 +00:00
Wayward Heart
8b14894b6f Fix blitting with negative dimensions 2024-03-24 07:47:58 -05:00
Wayward Heart
cf762c77f1 Only draw text to the hires bitmap when Hires mode is enabled 2024-03-24 07:47:58 -05:00
Wayward Heart
46d9095129 Use gl.unpack_subimage when blitting megasurfaces to textures when available 2024-03-24 07:47:58 -05:00
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
Splendide Imaginarius
ef822d1806
Merge pull request #177 from Splendide-Imaginarius/mkxp-z-lanczos-blitting
Don't use framebuffer blitting if shader-based interpolation is needed
2024-03-22 02:52:40 +00:00
Splendide Imaginarius
eca31207cd Don't use framebuffer blitting if shader-based interpolation is needed 2024-03-22 00:02:10 +00:00
Splendide Imaginarius
0d54b47040 Fix shState segfault 2024-03-21 21:31:45 +00:00
Splendide Imaginarius
58a3c36a10 Fix Hires mode with default resolution 2024-03-21 06:18:55 +00:00
Splendide Imaginarius
ebcb0e2486 Allow independent upscale/downscale interpolation methods 2024-03-21 03:03:08 +00:00
Splendide Imaginarius
d4c20d7720
Merge pull request #174 from Splendide-Imaginarius/mkxp-z-mipmap
Add mipmap scaling
2024-03-18 11:46:03 +00:00
Splendide Imaginarius
a7841e978b
Merge pull request #168 from Splendide-Imaginarius/mkxp-z-lanczos-short-circuit-part1
Graphics: short-circuit shader interpolation
2024-03-18 10:27:14 +00:00
Splendide Imaginarius
fcb36d22fb Add mipmap scaling
Yields a substantial quality improvement when the window is much smaller
than the rendered resolution.
2024-03-18 02:02:55 +00:00
Splendide Imaginarius
47030733c8
Merge pull request #128 from Splendide-Imaginarius/mkxp-z-s32
Support S32 audio sample formats
2024-03-17 03:52:21 +00:00
Splendide Imaginarius
4658487bb7
Merge pull request #86 from Eblo/graphics-transition-fps-bugfix
Graphics.transition average FPS bugfix
2024-03-17 03:49:10 +00:00
Splendide Imaginarius
37f40ab887 Graphics: short-circuit shader interpolation
Boosts framerate from ~35fps to ~95fps in the Lanzcos short-circuit case.
2024-01-24 00:06:40 +00:00
Wayward Heart
0a8b24a5ec Graphics::snapToBitmap needs to call p->screen.composite() 2024-01-22 09:32:57 -06: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
Splendide Imaginarius
999514d860
Merge pull request #82 from WaywardHeart/fix-missized-blits
Shrink missized blits
2024-01-22 09:35:55 +00:00
Eblo
a11a581a01
Check for audioThreadTermReq in movie audio thread 2024-01-13 21:16:20 -05:00
Splendide Imaginarius
936d768e4f Add xBRZ shader 2024-01-13 05:53:09 +00: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
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