Commit graph

630 commits

Author SHA1 Message Date
Mathew Velasquez
d41e36c751 Fix minimize crash by sacrificing an unnecessary feature 2016-12-26 20:57:51 -05:00
Vinyl Darkscratch
2733b5ad06 Remove doubled Smooth attribute 2016-12-16 13:15:32 -08:00
Vinyl Darkscratch
b0b024a01a Merge remote-tracking branch 'mathewv/master' 2016-12-15 13:37:16 -08:00
Mathew Velasquez
d47a2241ee Messagebox fix 2016-12-15 05:39:51 -05:00
Vinyl Darkscratch
f8c3862c2e Accommodate for @mathewv's "smooth" implementation 2016-12-14 21:14:42 -08:00
Vinyl Darkscratch
582b750c2b Merge remote-tracking branch 'mathewv/master' 2016-12-14 21:10:23 -08:00
Vinyl Darkscratch
3224d65988 Made paths in script cross-platform friendly
An ending that made me very, VERY teary-eyed, interrupted by an access
denied error…argh, code bugs, why!  >~<  Basically, the path to “My
Games” and the name of the journal’s executable are now defined by
oneshot.cpp and loaded into the Ruby script, so the ending isn’t
interrupted.  Now all that’s left is to compile the journal!
2016-12-14 21:09:33 -08:00
Mathew Velasquez
a0ba40916d Smooth scaling Graphics option 2016-12-14 22:05:53 -05:00
Vinyl Darkscratch
0a1d9c570f Add "smooth" property to graphics module
This is just a simple bind and addition of a “smooth” property in the
graphics module, to fix fatal issue #2
2016-12-14 16:06:40 -08:00
Vinyl Darkscratch
85da9ff7e8 Reorganizing Mac and Linux blocks and commence on retina support 2016-12-13 21:16:33 -08:00
Vinyl Darkscratch
0b7fdbf8e1 Updates for a future Mac build 2016-12-12 22:59:07 -08:00
Mathew Velasquez
aa7818847c Lots of stuff 2016-12-06 23:49:37 -05: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
Mathew Velasquez
0dc872bcea Journal screen stuff 2016-10-13 20:26:01 -04:00
Mathew Velasquez
302ec6dd02 I stopped making commits for a good while. Here's the latest junk. 2016-09-19 13:54:38 -04: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
Mathew Velasquez
82493cd0a0 Added footprints and src_rect to Plane class 2016-04-11 21:33:54 -04:00
Mathew Velasquez
d53ad4b124 Improved internationalization support 2016-04-06 13:45:36 -04:00
Mathew
d0cb19e9d2 Minor config tweaks 2016-03-18 00:25:30 -04:00
Mathew Velasquez
99ae7b35ad Minor engine tweaks
Made OneShot the standard spelling, adjusted keybindings, removed jpeg dependency, and turned vsync on by default
2016-03-11 00:30:20 -05:00
Mathew Velasquez
79fc639b83 Build portability fixes and name input issue fix 2016-03-07 17:14:48 -05:00
Mathew Velasquez
7275291e7d Fixed steam-related freeze and msgbox crash 2016-03-02 20:45:06 -05:00
Mathew Velasquez
1fd808d0af Gutted more unused features 2016-02-29 15:40:10 -05:00
Mathew Velasquez
05d2946280 Replaced initializer list for portability 2016-02-29 04:22:48 -05:00
Mathew Velasquez
546f29f42e Preliminary i18n improvements 2016-02-29 01:41:37 -05:00
Mathew Velasquez
a4de9d9f10 integrated steamshim 2016-02-29 01:22:55 -05:00
Mathew Velasquez
f44138015b Cleaned up config; Fullscreen option now indicates Big Picture 2016-02-28 08:13:29 -05:00
Mathew Velasquez
71867727ab Fixed crashes/weirdness with obscured window code 2016-02-27 22:33:02 -05:00
Mathew Velasquez
df2a32d4f0 Changed OpenGL debugging to a compile time option 2016-02-26 18:33:22 -05:00
Jonas Kulla
5964aa8f76 EventThread: ifdef out broken SDL function on OSX 2016-02-26 18:13:51 -05:00
Jonas Kulla
c16f20527e EventThread: Fix mouse cursor not being hidden 2016-02-26 18:13:51 -05:00
Mathew Velasquez
4be6c0d592 Gutted midi system 2016-02-26 17:03:01 -05: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
Mathew Velasquez
b63b3ba8f3 Renamed save data to .dat for easier Steam cloud integration 2016-02-18 18:23:16 -05:00
Mathew Velasquez
ae82a61ca7 Fix build on Ubuntu 2016-02-17 17:37:39 -05:00
Mathew Velasquez
21fcc9e19c Basic Steamworks API support 2016-02-17 17:16:22 -05:00
Mathew Velasquez
2df5fd29de Renamed $DEBUG to $debug to avoid verbose mode.
Also made GL debug functions print less stuff.
2016-02-17 17:14:16 -05:00
Mathew Velasquez
ba0203169e Added obscured/scratched window puzzle 2016-02-17 17:14:16 -05:00
Mathew
90cf07c825 Linked to debugMode option, gutted RTP config 2016-01-05 14:50:18 -05:00
Mathew
dd8bbcad97 Fixed username detection bug 2016-01-05 14:50:18 -05:00
Mathew Velasquez
b625d2e891 Renamed Scripts.rxdata to xScripts.rxdata so that editor won't overwrite scripts 2016-01-05 14:50:18 -05:00
Mathew Velasquez
da948348ac Consistent, proper CJK support 2016-01-05 14:50:18 -05:00
Mathew Velasquez
fe65d7dd29 HACK to fix text rendering 2016-01-05 14:50:18 -05:00
Mathew Velasquez
5ff71744b5 Rudimentary map wrapping added 2016-01-05 14:50:18 -05:00
Mathew Velasquez
2e474a5dc4 Removed dataPathOrg/App config options, changed example config 2016-01-05 14:50:18 -05:00
Mathew Velasquez
6384696bcf Tweaked configuration options 2016-01-05 14:50:18 -05:00
Mathew Velasquez
a702d9639b Raise exception on FileSystem::openReadRaw 2016-01-05 14:50:18 -05:00
Mathew Velasquez
10f3419ac6 Maps no longer wrap at edges, but display blank tiles 2016-01-05 14:50:18 -05:00
Mathew Velasquez
1deef29c1a removed all traces of INI_ENCODING 2016-01-05 14:50:17 -05:00
Mathew Velasquez
10e0aaabd1 fixed OS X build 2016-01-05 14:50:17 -05:00
Mathew Velasquez
1c5d4c2645 added SDL controller support 2016-01-05 14:50:17 -05:00
Mathew Velasquez
3c6cef9aeb overhauled input symbols to be more gamepad-friendly 2016-01-05 14:50:17 -05:00
Mathew Velasquez
3d2d1a9150 Manually rebased over latest mkxp commit. Some features, such as lighting, are not reimplemented yet. 2016-01-05 14:50:17 -05: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
Mook
8e411cbcfe Graphics: Stub out play_movie
Some people are using it to detect the RGSS version.
2015-10-30 08:01:36 -07:00
Jonas Kulla
7bf6eca362 EventThread: Comment out unneeded SDL2 constants 2015-07-26 23:56:50 +02:00
Jonas Kulla
4d97a17c44 TilemapVX: Ensure legs of out-of-view table tiles are drawn 2015-07-21 12:13:25 +02:00
Jonas Kulla
7017ca1c53 Use static lifetime for constant array 2015-07-21 12:13:25 +02:00
Jonas Kulla
30465691ae Tilemap: Fix map viewport calculation
Calculation was completely off as it didn't take into
account the imposed viewport origin.

All in all, similar fixes as the previous ones to TilemapVX.
2015-07-21 12:13:25 +02:00
Jonas Kulla
dd7545fcf2 TilemapVX: Clean up the horrible map viewport calculation code
Also rename "offset" to "origin" which makes a lot more sense
for ox/oy attributes.
2015-07-21 12:13:24 +02:00
Jonas Kulla
5aaeb0206c Remove some stuff that was accidentally committed 2015-07-21 12:13:24 +02:00
Jonas Kulla
9a3dd2d554 Config: Enable smoothScaling by default
There's really no reason not to.
2015-07-21 12:13:24 +02:00
Jonas Kulla
384249c31a Unify float literals to use f suffix and avoid double promotions
I might have missed some.
2015-07-21 12:13:24 +02:00
Jonas Kulla
d1ee507ec4 Vec2i, IntRect: Add unequal operator 2015-07-21 12:13:24 +02:00
Jonas Kulla
fe6799d00b TilemapVX: Fix map viewport calculation 2015-07-10 04:58:28 +02:00
Jonas Kulla
fe709b6010 Use vector math 2015-07-10 04:51:29 +02:00
Jonas Kulla
54c1107f19 FileSystem: Fix file lookup if unrelated files with same name exist
Before, even though we did match all possible extensions,
we only took the first match and tried opening it.
If we were looking for a .png image, but there was an unrelated
.txt file with the same name (as it actually happens in RTPs),
we would potentially see the .txt first, try opening it,
and fail alltogether, even though the image file existed.

Now we try opening all matching files until we find one that
we can parse.

This fixes #101.
2015-07-09 15:38:50 +02:00
Jonas Kulla
533e69275a Constify 2015-07-09 14:53:59 +02:00
Jonas Kulla
5382cc11a3 MidiSource: Close source SDL_RWops before throwing error 2015-07-09 12:38:04 +02:00
Jonas Kulla
9acdd206f6 Vec4: Rename 'xyzHasEffect()' to something that makes sense 2015-07-07 16:07:04 +02:00
Jonas Kulla
6e176a454c Constify 2015-07-07 16:06:45 +02:00
Jonas Kulla
afab51279e Graphics: Fix viewport color/flash effectiveness calculation
Fixes #121.
2015-07-07 16:06:11 +02:00
Jonas Kulla
61849a9158 GLMeta: Eliminate redundant parameter 2015-07-07 15:25:48 +02:00
Jonas Kulla
2d31d08fa6 Add some general fixes from #111 found by @chosenofbear 2015-06-18 07:21:55 +02:00
Jonas Kulla
6380a93cec Graphics: Fix ::transition() "filename" default value
The default value is an empty string, which triggers the simple
transition. Passing null is not legal (and wasn't possible in
mkxp from Ruby side anyway).

Fixes #108.
2015-06-10 13:30:26 +02:00
Jonas Kulla
d5bacf50f5 TileAtlasVX: Fix table extents being covered by below tiles
Fixes the appearance of tables in VX, which place table
tiles on the same layer as ground tiles.
2015-05-31 20:58:05 +02:00
Jonas Kulla
e4bc08e972 Fix for old, broken OpenAL-Soft headers
See 4219b91bbb
2015-05-26 01:40:53 +02:00
Jonas Kulla
e72bced0f7 'snprintf()' guarantees null termination of buffer
Thanks @cremno.
2015-03-27 08:21:47 +01:00
Jonas Kulla
794e86d0ab AudioStream: Prevent MeWatch from restarting fully faded out stream 2015-03-22 09:06:29 +01:00
Jonas Kulla
7260c467b8 AudioStream: Clarify thread-safe usage of stream flags 2015-03-22 08:42:43 +01:00
Jonas Kulla
5379511d95 Bitmap: Fix vertical alignment for some letters with outline 2015-03-04 23:34:56 +01:00
Jonas Kulla
91c9bfd0f4 Fix compilation failure inside OSX ifdef block 2015-02-26 19:44:05 +01:00
Jonas Kulla
7393f7e951 Config: Add "execName" to specify ini and rgssad filenames 2015-02-19 02:23:23 +01:00
Jonas Kulla
531441d4e3 Make audio asset decoding failures non-fatal
Matches RMXP behavior. This is also useful in case midi files
are to be played, but fluidsynth isn't available.
2015-02-17 02:09:55 +01:00
Jonas Kulla
0f91bdefea Fix indentation 2015-02-17 01:48:05 +01:00
Jonas Kulla
44eaaf5985 FileSystem: Change file lookup to match all extensions
Previously, file lookup (ie. extension supplementing) would only
try out a few predetermined extensions based on the asset type.
This was not accurate in regard to RMXP's behavior, which will
happily match "some_asset" against "some_asset.abcef" and try
to open it.

Some games make use of this quirk and rename their ogg audio files
to "*.dat" or similar to thwart users from copying them.

This change also makes it easier to read arbitrary formats
supported by SDL_image without modifying mkxp.
2015-02-17 01:42:11 +01:00
Jonas Kulla
87462fd7b0 Use more explicit vector math via method overloads 2015-02-10 17:04:00 +01:00
Jonas Kulla
a4b1be1da5 Remove superfluous lines 2015-02-10 15:53:58 +01:00
Jonas Kulla
c328ebee04 Typo 2015-02-10 15:53:12 +01:00
Jonas Kulla
713ea07558 SDL hints need to be set before initialization 2015-02-10 15:51:33 +01:00
Jonas Kulla
b2631d4c23 Bitmap: Fix scaled blit from mega surface to texture
SDL's default blend mode for surfaces (SDL_BLENDMODE_BLEND)
renders the source surface unusable for further use.
2015-02-10 15:34:42 +01:00
Jonas Kulla
4864f63c6c Sprite: Fix visibility calculation
The previous code assumed the scene origin to always be 0,0.
2015-02-04 15:17:45 +01:00
Jonas Kulla
e339964076 MidiSource: Fix some channels being mute after looping 2015-01-22 13:13:57 +01:00
Jonas Kulla
fa0459ad93 Fix code formatting 2015-01-15 11:09:12 +01:00
Jonas Kulla
74f8c91bf4 Oops 2015-01-15 09:05:51 +01:00
Jonas Kulla
7cbe1eef94 Graphics: Improve transition "vague" parameter accuracy 2015-01-15 08:26:33 +01:00
Jonas Kulla
f6604a88b8 sdl-util.h: Consider physical filesystem when opening raw files
This is necessary so games stored on external SD cards can be
run under Android.
2015-01-15 08:11:01 +01:00