Commit graph

257 commits

Author SHA1 Message Date
Jonas Kulla
d93c1280aa Font: Open TTF font as late as possible
This reduces opened fonts that were never going
to be used anyway.
2014-01-04 13:47:00 +01:00
Jonas Kulla
857693d4a1 Font: Fix 'Font#set_name' not actually changing underlying TTF_Font 2014-01-04 13:00:38 +01:00
Jonas Kulla
78f9272e3d Typo 2014-01-04 13:00:04 +01:00
Jonas Kulla
c9423164d4 Font: Adhere to spec and set Font.default_name to "MS PGothic" 2014-01-04 12:58:03 +01:00
Jonas Kulla
a8bff666eb Audio: Don't try to fill and queue null buffer
Fixes skipping audio after interrupting and resuming
the program via eg. a debugger.
2014-01-04 12:28:16 +01:00
Jonas Kulla
3daf805350 Table: Serialize actual table dimensions instead of '3'
This allows savegames created with mkxp to be read with RMXP.
2014-01-02 03:39:22 +01:00
Jonas Kulla
5f16eef273 EventThread: Properly allocate SDL user event codes 2014-01-02 02:22:10 +01:00
Jonas Kulla
0a336ea315 Spacing 2014-01-02 00:17:31 +01:00
Jonas Kulla
a0a27889a3 Merge #8 2014-01-02 00:11:57 +01:00
Edward Rudd
5b4f0b239c add config option to set the window icon 2014-01-01 16:52:07 -05:00
Edward Rudd
a740f7754c add option to choose whether left alt or both alts toggle's fullscreen 2014-01-01 15:56:38 -05:00
Edward Rudd
c6bd61d2de code style fixes 2014-01-01 11:01:05 -05: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
Edward Rudd
a18497ca7b change to exe dir on startup and add some extra guards around boost program option parsing. 2013-12-31 21:03:53 -05:00
Jonas Kulla
3f08b6b3db Remove dead code 2014-01-01 02:13:02 +01:00
Edward Rudd
e87bdb8a95 cleaner approach to handling the viewport bug 2013-12-31 19:56:20 -05:00
Edward Rudd
f42539e02b accept any alt for fullscreen switch 2013-12-31 19:31:29 -05:00
Edward Rudd
1120c60cae fix viewport resizing on screen resize. 2013-12-31 19:31:14 -05:00
Edward Rudd
f8e8d704b5 use copy construction to pass the config along so the main constructor gets run once. 2013-12-31 17:23:15 -05:00
Edward Rudd
f2bb0b2e79 initialize gameFolder to be SDL_GetBasePath() 2013-12-31 17:19:05 -05:00
Edward Rudd
7aa07630e4 can't sizeof an iVar in a static function 2013-12-31 16:32:12 -05:00
Edward Rudd
af70e8c1ff correct ScanRow forward declares 2013-12-31 16:31:24 -05:00
Edward Rudd
eacc143ea0 update extension usage..
nearly all of the previous required extensions are CORE in OpenGL 2.0
the remaining ones need to have fallback checks for ARB vs EXT vs APPLE 
variants..
2013-12-31 16:31:03 -05:00
Edward Rudd
27ae261d0e don't use base name it's destructive to the incoming string which you shouldn't modify as c_str() is const. 2013-12-31 16:27:28 -05:00
Jonas Kulla
f2d2a1886f Shader: Throw on compile/link error, and print info logs
Also let go of the startup debug prints when compiling.
The engine will now tell us properly which shader fails
at which part.
2013-12-30 01:38:47 +01:00
Jonas Kulla
680e407a38 SharedState: Throw exception on errors (and handle them)
First up: throw if chdir(gameFolder) fails.
2013-12-30 01:37:55 +01:00
Jonas Kulla
9759e52b3c Exception: Constructor now takes printf style arguments 2013-12-29 18:05:11 +01:00
Jonas Kulla
d8e22a8b3c Remove unused definition 2013-12-29 14:36:32 +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
01529c5741 Audio: Fix stream not being unlocked on exception 2013-12-28 23:10:43 +01:00
Jonas Kulla
99866fb84c Replace QStack with std::stack 2013-12-27 20:10:01 +01:00
Jonas Kulla
922a16a013 TexPool: Fix wrong total memory consumption calculation
The byte count of textures released into the pool was
erroneously added twice to the total byte count.
2013-12-27 18:46:04 +01:00
Jonas Kulla
fbf02cf2ce Remove Qt style forloop 2013-12-27 06:19:30 +01:00
Jonas Kulla
f3def32461 Constify 2013-12-27 06:11:18 +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
8215bc7e7d Remove useless lines 2013-12-26 15:00:03 +01:00
Jonas Kulla
19bb6c924e Gaphics: Make frame skip a config option
When using something like Valgrind that will run
mkxp 20 times slower than normal, frame skip will
make the redraw loop completely grind to a halt.
Set 'frameSkip' to false in the config to
avert this.
2013-12-21 21:18:20 +01:00
Jonas Kulla
cb36a28b09 Add a very crude screenshot function (press F3)
Files are named after the current date+time (down to seconds),
and written to the gameFolder directory.
2013-12-20 09:17:15 +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
5f290c5b11 Audio: Prevent div-by-zero 2013-12-15 10:12:44 +01:00
Jonas Kulla
8161b00804 Remove unneeded include 2013-12-11 23:52:20 +01:00
Jonas Kulla
3b8484a280 Audio: Silence "unused" errors with latest libvorbisfile 2013-12-11 21:08:40 +01:00
Jonas Kulla
1f2470deb7 Graphics: Fix some RGSS2 bitrot 2013-12-11 21:07:41 +01:00
Jonas Kulla
0035c23641 Shader: Group all shaders in one collective struct
Makes sharedstate.{cpp|h} a lot easier to read, and
adding new shaders a one liner.
2013-12-11 05:22:13 +01:00
Jonas Kulla
8c6648f47e Use std algorithm functions 2013-12-08 13:19:22 +01:00
Jonas Kulla
ef12e96158 Remove completely outdated note 2013-12-08 13:01:59 +01:00
Jonas Kulla
946d778b96 Audio: Fix BGM not starting after ME has ended
A previous commit prevented the MeWatch from
starting a BGM stream that was in stopped state.
However, when a new BGM is loaded while the ME
is still playing, the BGM stream will be stopped
even though we want it to start after the ME
finishes.

Also add some comments trying to explain members
of 'AudioStream' a bit better.
2013-12-08 12:58:39 +01:00
Jonas Kulla
bf712f3738 Graphics: Remove useless and confusing function 2013-12-08 12:57:46 +01:00