Commit graph

66 commits

Author SHA1 Message Date
ZakatTeamI2P
b4703792c1 AAAAAAAAAAAAAAAAAAAAAAAA 2026-03-30 21:13:57 +04:00
ZakatTeamI2P
ce6fe42cd9 filesystem.cpp changes for SDL3 2026-03-30 19:15:27 +04:00
Pera Pisar
28face2167 Linux changes (#62)
* Added RPATH to executable; lowercased name; fixed MRIVERSION option; made it look like an actual executable

* Silencing some compiler warnings

* Getting rid of journal binding header, fixing bugs with the Niko binding and synchronizing the two

* Journal update to fix several bugs

* Fix libpng warning by running mogrify on shrimp.png

* Improved automation of the Linux build

* Improved some aspects of wallpaper handling

* Bump default Ruby version to 2.5
2019-04-21 03:50:20 -07:00
Eliza Velasquez
c096f6f020 Fix October bug 2018-10-13 18:49:57 +00:00
Eliza Velasquez
4a0cb0b453 Fix physfs & ruby bugs and build for steam 2018-10-11 00:24:41 +00:00
Vinyl Darkscratch
65b9854d83 Style fix 2018-10-07 11:13:20 -07:00
Vinyl Darkscratch
eb995df65a Add case-insensitive search for fonts folder 2018-10-07 11:12:39 -07:00
Vinyl Darkscratch
65dc6bf7d0 Revert PhysFS changes 2018-10-02 19:25:10 -07:00
Vinyl Darkscratch
6066975d92 Rename function 2018-10-02 13:41:06 -07:00
Vinyl Darkscratch
220de0c33c Merge remote-tracking branch 'origin/linux' 2018-10-02 11:25:30 -07:00
Vinyl Darkscratch
b19153a6d3 Merge remote-tracking branch 'elizagamedev/master' 2018-10-02 11:24:39 -07:00
Carsten Teibes
9e5877b350 Adapt RGSS archivers and filesystem to physfs 3.0 API 2018-09-27 06:34:39 +00:00
KockaAdmiralac
1890afabbb
Remove unused code 2018-06-16 09:53:42 +02:00
Vinyl Darkscratch
8921e23ba5 Merge remote-tracking branch 'MKXP/master' into new-mkxp 2018-03-06 18:43:36 -08:00
Jonas Kulla
9f44ee5068 FileSystem: Fix while termination condition 2018-01-22 10:54:21 +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
Carsten Teibes
d427df0c2b Adapt RGSS archivers and filesystem to physfs 3.0 API 2017-10-12 14:27:19 +02:00
Vinyl Darkscratch
dba5f7cee4 Implement cmake's BundleUtilities 2017-10-11 23:30:03 -07:00
Jonas Kulla
0f9b5f274a Filesystem: Search for "Fonts/" with case-insensitivity 2017-03-08 16:30:07 +01:00
Vinyl Darkscratch
85da9ff7e8 Reorganizing Mac and Linux blocks and commence on retina support 2016-12-13 21:16:33 -08:00
Mathew Velasquez
da948348ac Consistent, proper CJK support 2016-01-05 14:50:18 -05:00
Mathew Velasquez
a702d9639b Raise exception on FileSystem::openReadRaw 2016-01-05 14:50:18 -05: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
e72bced0f7 'snprintf()' guarantees null termination of buffer
Thanks @cremno.
2015-03-27 08:21:47 +01:00
Jonas Kulla
91c9bfd0f4 Fix compilation failure inside OSX ifdef block 2015-02-26 19:44: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
4fb94aaf10 FileSystem: Add fallback to wrapped SDL_RWops if normal mounting fails
Makes it easy to mount archives on Android residing in "assets/".
2015-01-02 14:50:14 +01:00
Jonas Kulla
17efcbbbbd tl;dr: I fucking suck at coding (fix double free)
MRI: Filesystem: A garbage collected SDL_RWops file handle
will call close on itself even if 'close' was explicitly
called on it on the script side before.
2014-09-23 17:26:30 +02:00
Jonas Kulla
757a1d5e39 Load fluidsynth entrypoints dynamically (and make them optional)
This removes the static dependency on fluidsynth being present
at buildtime (even headers aren't needed anymore).

Even though midi is a default format for the RPG XP/VX series,
it has fallen more and more out of use, with VX Ace completely
abandoning it from the RTP and making ogg vorbis the de facto
standard. Midi support is kept for legacy reasons, but isn't
encouraged. On top of all this, fluidsynth together with glib
is a heavy dependency that often times won't even be used.
Making it optional at build time is an attempt to unify and
keep build config fragmentation low.

In RGSS3, fluidsynth / midi is not initialized at all by
default, but rather on demand when either a midi track is
played back or Audio.setup_midi is called.
2014-09-09 00:08:32 +02:00
Jonas Kulla
3da785b293 FileSystem: RGSS2 means ogg vorbis support is always available 2014-08-30 12:00:56 +02:00
Mathew
f89216368d NFD filename translation on OS X 2014-08-19 10:57:03 -04:00
Jonas Kulla
751fdc599e Audio: Add MIDI format playback support
This adds a new dependency with libfuildsynth. MIDI support
is built by default, but can be disabled if not desired.

All RTP songs should work well, but there are known problems
with other files (see README). Also, the pitch shift implementation
is somewhat poor and doesn't match RMXP (at least subjectively).

A soundfont is not included and must be provided by
the user themself.
2014-08-02 06:42:55 +02:00
Jonas Kulla
2f831aea60 RGSSAD: Add RGSS3 archive reader
Everything except the entry table parsing is the same as RGSS1.
2014-07-24 02:45:20 +02:00
Jonas Kulla
6726493ee7 RGSSAD: Add RGSS2 archive reader
Exactly the same as RGSS1 but different file extension.
Also remove some redundant strings.
2014-07-23 23:05:24 +02:00
Jonas Kulla
1ecdd9f980 filesystem.cpp: Split out RGSSAD parts 2014-07-23 22:57:39 +02:00
Jonas Kulla
06b218d5d7 Don't rely on non-standard typedef (thanks @ntzrmtthihu777) 2014-06-08 06:59:35 +02:00
Jonas Kulla
66fe932a8e Remove useless code 2014-05-21 18:11:31 +02:00
Jonas Kulla
32bb18d93f Spacing 2014-05-21 18:10:14 +02:00
Jonas Kulla
1ef6e04520 Font: Overhaul font asset discovery
Previously, any font names requested by RGSS would be translated
directly to filenames by lowercasing and replacing spaces with
underscores (and finally doing some extension substitution).
To make this whole thing work smoother as well as get closer to
how font discovery is done in VX, we now scan the "Fonts/" folder
at startup and index all present font assets by their family name;
now, if an "Open Sans" font is present in "Fonts/", it will be
used regardless of filename.

Font assets with "Regular" style are preferred, but in their
absence, mkxp will make use of any other style it can find for
the respective family. This is not the exact same behavior as
VX, but it should cover 95% of use cases.

Previously, one could substitute fonts via filenames, ie. to
substitute "Arial" with "Open Sans", one would just rename
"OpenSans.ttf" to "arial.ttf" and put it in "Fonts/". With the
above change, this is no longer possible. As an alternative, one
can now explicitly specify font family substitutions via mkxp.conf;
eg. for the above case, one would add

fontSub=Arial>Open Sans

to the configuration file. Multiple such rules can be specified.

In the process, I also added the ability to provide
'Font.(default_)name' with an array of font families to search
for the first existing one instead of a plain string.
This makes the behavior closer to RMXP; however, it doesn't
work 100% the same: when a reference to the 'Font.name' array is
held and additional strings are added to it without re-assignig
the array to 'Font.name', those will be ignored.
2014-04-16 13:37:22 +02:00
Jonas Kulla
31626c9acc Spacing 2014-04-16 13:06:16 +02:00
Jonas Kulla
316457b988 Refactoring 2014-01-16 04:19:22 +01:00
Jonas Kulla
91efcfa06d FileSystem: More stringent RGSSAD header checks 2014-01-16 01:06:59 +01:00
Jonas Kulla
bbb9bff239 FileSystem: Fix path cache for mounted zip archives 2014-01-15 01:51:56 +01:00
Jonas Kulla
f14a379ee9 FileSystem: Trim redundant error message on ENOENT
MRI adds the "No such file or directory - " itself;
I guess we can just emulate this behavior everywhere else.
2014-01-15 01:47:16 +01:00
Jonas Kulla
64cb4ee4f1 Use stdint types 2014-01-15 01:43:46 +01:00
Jonas Kulla
1bacceddf0 Spacing 2014-01-01 12:59:40 +01:00
Jonas Kulla
ce7bf97dd4 FileSystem: Make path caching optional via config
Because Windows has case insensitive paths, this should
be turned on (which it is by default) for maximum
compatibility. Can be turned off as an optimization
(this will speed up startup a little depending on the
number of game assets).
2014-01-01 07:13:35 +01:00
Jonas Kulla
2adf8ab265 Transition from QtCore to stdc++ / STL / boost
This looks like a pretty major change, but in reality,
80% of it is just renames of types and corresponding
methods.

The config parsing code has been completely replaced
with a boost::program_options based version. This
means that the config file format slightly changed
(checkout the updated README).

I still expect there to be bugs / unforseen events.
Those should be fixed in follow up commits.

Also, finally reverted back to using pkg-config to
locate and link libruby. Yay for less hacks!
2013-12-29 13:59:26 +01:00
Jonas Kulla
231e38ae8e Replace QVector, QList with std::vector, std::list
An exception is made of TexPool, which will need a
bit more testing before transitioning to std containers.

Also replace 'int' with 'size_t' where it is used only
as an array index.
2013-12-26 20:18:33 +01:00
Jonas Kulla
99cbb4d594 FileSystem: Remove useless code 2013-12-20 07:38:29 +01:00