Commit Graph

888 Commits

Author SHA1 Message Date
Jonas Kulla 9733876c01 fluid-fun: Adjust function signature to fluidsynth 2.0
This breaks compilation with FLUID_SHARED against <2.0 versions,
which should be reasonable given that the default mode can still
dynamically load both variants.

Fixes #219.
2021-09-24 06:30:55 +02:00
Luis Caceres eb037a3779 Config: Add case-insensitive ini file parser 2021-09-24 06:30:55 +02:00
Eliza Velasquez b8c3e74275 Fix font enumeration
Currently, the font enumeration callback erroneously stops searching if
it finds any files that aren't fonts. In the case that you have, say, a
desktop.ini or a .DS_Store or a license file, it may prevent all of the
fonts from being loaded. This commit resolves this.
2021-09-24 06:30:55 +02:00
Jonas Kulla b10d22daeb Graphics: Fix transition when new scene has gray tone effect
Rendering the scene may cause PingPong swaps of front / backbuffer,
so don't take references to those buffers until after rendering.

Fixes #199
2021-09-24 06:30:55 +02:00
ReinUsesLisp 7d6fbe637c Config: Set debug editor's debug variables into ruby 2021-09-24 06:30:55 +02:00
Jonas Kulla 1b358a27a0 FileSystem: Fix while termination condition 2021-09-24 06:30:55 +02:00
Jonas Kulla a082074f16 Merge branch 'master' of github.com:ancurio/mkxp 2017-12-12 22:50:10 +01:00
Jonas Kulla 183ebbed65 RGSSAD: Fix parsing of top level directory entries
We were spamming every path into the hash (including the top
level ones) without noticing... oh well.
2017-12-12 22:46:25 +01:00
Jonas Kulla 7902d0942d Filesystem: Properly iterate top level dir entries
"." seemed to have worked in earlier PhysFS versions,
but it was never the correct way.
2017-12-12 22:45:01 +01:00
Jonas Kulla 947974cac6 Config: Properly use windowTitle everywhere instead of game.title 2017-12-12 17:57:02 +01:00
Jonas Kulla 646786ef93 Merge branch 'master' of github.com:ancurio/mkxp 2017-12-11 21:23:03 +01:00
Jonas Kulla 2f81fbbf4b Fix ordering 2017-12-11 00:51:21 +01:00
Jonas Kulla 7d9a85dbbd Config: Add entry to override the game window title 2017-12-11 00:48:35 +01:00
Carsten Teibes d427df0c2b Adapt RGSS archivers and filesystem to physfs 3.0 API 2017-10-12 14:27:19 +02:00
Carsten Teibes b1bdf1e445 Fix CMake build, only use `resource.h` on Windows
This was broken in commit 01e17ed5c6 (move windows specific files).
2017-08-18 22:42:27 +02:00
Carsten Teibes fde6a92197 Fix deprecation warning on build with MRI>2.3
Fixes #158.

The old alias is deprecated since: ruby/ruby@fdb957925f.
2017-08-18 22:41:16 +02:00
Marty Plummer 01e17ed5c6 windows: move windows specific files
Moved the windows-specific files into their own subdir for
cleanliness's sake and mesonbuild organization.

Signed-off-by: Marty Plummer <ntzrmtthihu777@gmail.com>
2017-08-10 21:58:31 +02:00
Jonas Kulla f172f58c74 Sprite: Fix regression with "mirror" attribute
FloatRect::hFlipped() returns a rectangle with negative width,
which was clobbered by the clamping further down.

Regression introduced in 55cec53911.
2017-08-10 21:39:17 +02:00
Jonas Kulla fba20e6294 Sprite: Check for disposed state before accessing bitmap 2017-07-30 23:00:18 +02:00
Marty Plummer f5c30affaa mingw-w64: allow cmake cross-compile
Tested on gentoo with x86_64-w64-mingw32 toolchain and libraries.

Signed-off-by: Marty Plummer <ntzrmtthihu777@gmail.com>
2017-05-25 13:01:11 +02:00
Jonas Kulla 91f042197b Merge branch 'master' of github.com:ancurio/mkxp 2017-05-11 12:53:12 +02:00
Jonas Kulla bd694f9f99 Graphics: Remove superfluous TEXFBOs while reusing existing ones
While the PingPong buffers were always texture-backed, currentScene
and transBuffer used to be backed by renderbuffers, which might have
been more optimized as render targets on older hardware; but since
all buffers in Graphics got switched to being texture backed to allow
blitting via rendering (when hardware blitting isn't available or broken,
eg. on mobile platforms), their reason to exist vanished.

For transBuffer, we can reuse the backbuffer of the PingPong structure,
while currentScene might have been useless from the start.
2017-05-11 12:37:15 +02:00
Jonas Kulla cab453ac3a Graphics: Use proper resizing function for TEXFBOs
Manually resizing the contained TEX objects skips updating the
width/height TEXFBO properties, which GLMeta::blit relies on.
2017-05-11 12:32:56 +02:00
Jonas Kulla ecc4a30997 Merge branch 'master' of github.com:ancurio/mkxp 2017-04-23 14:38:13 +02:00
Jonas Kulla 006f701fec Config: Add "enableBlitting" entry to toggle GL_EXT_framebuffer_blit 2017-04-23 14:32:11 +02:00
Jonas Kulla 1478e1e0f9 Config: Add "maxTextureSize" entry to artificially limit texture sizes 2017-04-23 14:10:54 +02:00
Jonas Kulla 06feafe9ef Add missing include 2017-04-08 20:06:12 +02:00
Jonas Kulla ac98fab32b Merge branch 'master' of github.com:ancurio/mkxp 2017-04-08 19:15:32 +02:00
Jonas Kulla e4079d5738 Fix build on OSX after 60e967e3b7 2017-04-08 19:13:31 +02:00
Jonas Kulla 8f935da48e Merge branch 'master' of github.com:ancurio/mkxp 2017-04-08 18:52:59 +02:00
Jonas Kulla 0481f920b0 Input: Remove ugly [-20,-20] mouse position hack
This was supposed to disappear shortly after To the Moon's release,
but it unfortunately survived a bit longer :)

The status of the mouse cursor being inside / outside the game window
is now properly exposed (in MRI) via MKXP.mouse_in_window.
2017-04-08 18:45:24 +02:00
Jonas Kulla 3ea24bd757 EventThread: Make system cursor visible over black aspect ratio bars
Should be less confusing for the player.
2017-04-08 18:45:24 +02:00
Jonas Kulla 3eb5465c93 Bitmap: Prevent one-pixel squeeze
This likely happens because the game doesn't take the shadow
into account, and specifies the target rectangle one pixel too
narrow.
2017-03-21 10:57:57 +01:00
Jonas Kulla ef06c8eca4 Input: Hack around desync with mkxpRawKeyStates
Make sure that when mkxpRawKeyStates was called, the Input module
will work off of the same queried snapshot of pressed keys
during the next update call.
2017-03-21 10:47:32 +01:00
Marty Plummer 60e967e3b7 Add icon and resource files for windows
Signed-off-by: Marty Plummer <ntzrmtthihu777@gmail.com>
2017-03-09 08:24:13 +01:00
Jonas Kulla 0f9b5f274a Filesystem: Search for "Fonts/" with case-insensitivity 2017-03-08 16:30:07 +01:00
Jonas Kulla 6349146e01 main: Only set window icon on Linux
OSX carries high-resolution icons in its bundles, and windows uses
windres to embed .ico files, so don't interfere with those.
2017-03-04 11:04:02 +01:00
Jonas Kulla c4dd3ffaf6 Config: Use set for preloadScripts
Would probably make sense for all other string vectors too.
2017-03-03 19:37:19 +01:00
Jonas Kulla ea742be6b0 Graphics: Expose "fixed_aspect_ratio" as attribute 2017-03-02 11:56:55 +01:00
Jonas Kulla 85452bf2cf Merge upstream 2017-02-17 19:35:30 +01:00
Jonas Kulla 55cec53911 Sprite: Clamp src_rect to bitmap bounds 2017-02-17 19:29:38 +01:00
Jonas Kulla 541e24f678 Bitmap: Use more accurate HSV-based hue shift algorithm
The previously YIQ-based algorithm turned out to be both slow,
and horribly inaccurate.

Another algorithm based on rotating the color value in the
RGB cube along the diagonal axis was also considered, which was
acceptable in terms of accuracy, and very fast.

In the end, I decided on a HSV-based one, because it is by far
the most accurate one, while still being a tad faster than the
YIQ solution.
Algorithm source: gamedev.stackexchange.com/a/59808/24839

A very simple GPU time benchmark when shifting a 2048^2 bitmap:

         YIQ rot   RGB rot   HSV shift
radeon   13.4 ms   2.8 ms    11.4 ms
intel    13.0 ms   6.0 ms    10.5 ms

radeon: HD 3650 mobility
intel:  N3540 integrated (Baytrail)

However hue shifting has never shown up as a bottleneck before,
so these are more academic.
2016-10-30 08:50:45 +01:00
Jonas Kulla 0ec1fce4ac MRI: Bind Audio.setup_midi 2016-09-12 20:20:56 +02:00
Jonas Kulla d4e09f55bd WindowVX: Fix move() not setting the correct dirty flags 2016-07-27 12:03:45 +02:00
Jonas Kulla e98c2e0535 Bitmap: Don't throw away cached surface in setPixel()
Instead, update the surface with the same change. For many
consecutive getPixel() -> setPixel() calls on the same bitmap,
this avoids calling glReadPixels at every iteration.
2016-07-27 11:59:08 +02:00
Jonas Kulla fdaf6c3611 Bitmap: Split surface pixel address calculation into helper 2016-07-27 11:56:43 +02:00
Jonas Kulla d9f13c39e9 Merge branch 'master' of /home/Ancurio/programming/C++/mkxp 2016-02-25 17:30:01 +01:00
Jonas Kulla 47ef36ca19 EventThread: ifdef out broken SDL function on OSX 2016-02-24 17:55:28 +01:00
Jonas Kulla de74fc1bc3 EventThread: Fix mouse cursor not being hidden 2016-02-24 17:45:55 +01:00
Jonas Kulla 5d776319b5 Font/MRI: Improve handling of (default_)name attributes
More accurate behavior, such as Font objects properly inheriting
their name attributes, and centralization of code for picking
the first existing name from a passed string array.

Also centralizes initial default_name population in core.

Note: This currently breaks the mruby binding build.
2016-01-05 08:47:52 +01:00