Commit Graph

19 Commits

Author SHA1 Message Date
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
Jonas Kulla f1df97551c FileSystem: Add "otf" to recognized font extensions 2013-12-15 10:19:22 +01:00
Jonas Kulla 8c6648f47e Use std algorithm functions 2013-12-08 13:19:22 +01:00
Jonas Kulla ef2430e0c3 Sanitize #include statements
The general rule I'm aiming for is to <> include
system wide / installed paths / generally everything
that's outside the git managed source tree (this means
mruby paths too!), and "" include everything else,
ie. local mkxp headers.

The only current exception are the mri headers, which
all have './' at their front as to not clash with
system wide ruby headers. I'm leaving them be for now
until I can come up with a better general solution.
2013-12-04 17:48:37 +01:00
Jonas Kulla 64f35071ab Audio: Replace SFML solution by using OpenAL directly
This is a major change in the Audio module that comes with
many changes throughout the codebase and dependency list.
The main gist is that we're finally nuking the last pieces
of SFML from the project. sfml-audio brought with itself
unneeded and big dependencies (libsndfile, libvorbisenc)
while at the same time limiting the amount of audio formats
mkxp can support (eg. we now get mp3 for free, and wma/midi
can be implemented by extending SDL_sound directly).

The increased control gained by interfacing with OpenAL directly
will also allow for easy integration of a dedicated audio
stretcher (librubberband), as well as enable us to implement
looped ogg vorbis (via the 'LOOPSTART'/'LOOPLENGTH' tags),
as required by RGSS2, in the future.

The FileSystem class has had its SFML parts removed.
Aditionally, audio file extensions to be supplemented are
now automatically detected based on how SDL_sound was
built (ie. if no mp3 support was built, mkxp won't try
to look for *.mp3 files). The final used extension
can be optionally returned by 'openRead' calls so
SDL_sound and SDL2_image can immediately choose the
right decoder.

The OpenAL context is created and destroyed in main.cpp
along side the GL context.
2013-11-30 12:00:11 +01:00
Jonas Kulla 06f5a06f67 Filesystem: Optimize RGSSAD file enumeration
Finally got around to nuking that ugly pile of shit that was
previously there for PhysFS file enumeration because filepath
cache generation with unencrypted game files + archive + RTP
has started taking around 6 seconds. Thank $DEITY.
2013-11-01 08:24:14 +01:00
Jonas Kulla 10b3e04dee Add config entry "allowSymlinks" 2013-10-20 22:38:46 +02:00
Jonas Kulla 41675859dd Actually destroy duplicated PHYSFS_Io instance on close
Fixes crash after loading about a hundred maps
2013-10-06 05:11:22 +02:00
Jonas Kulla 958af38442 Optimize archive reading
This should be almost as fast as reading unencrypted
files from disk now. I also don't see any possible further
optimizations, so this is probably as fast as it gets.
2013-10-04 07:52:40 +02:00
Jonas Kulla 4ddc487f17 Fix a critical bug with seeking in archives
Also, other small cleanups on the way.
2013-10-03 22:09:35 +02:00
Jonas Kulla 73d5cb5bad Comment out unsupported audio formats 2013-10-01 02:28:46 +02:00
Jonas Kulla 408864339f Implement case insensitive path resolution 2013-09-30 21:20:29 +02:00
Jonas Kulla d1bfc1e50c Properly free RWops associated with Font objects 2013-09-10 04:19:45 +02:00
Jonas Kulla 689a31580c Beautify constant 2013-09-04 17:03:00 +02:00
Jonas Kulla 4a945f8d6c Null PhysFS handle after closing 2013-09-04 13:32:11 +02:00
Jonas Kulla 0253b6ed2b Use C99 integer types instead of Qt's 2013-09-04 13:30:14 +02:00
Jonas Kulla ff25887f41 Initial commit 2013-09-01 16:27:21 +02:00