Commit Graph

885 Commits

Author SHA1 Message Date
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 f106e31c6f add missed force32 option 2013-12-31 16:36:00 -05:00
Edward Rudd 7aa07630e4 can't sizeof an iVar in a static function 2013-12-31 16:32:12 -05:00
Edward Rudd 02738be4c5 CMake's GLEW finds parent dir.. not GL subdir. 2013-12-31 16:31:58 -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
Edward Rudd a3c9f53335 GLSL 100 doesn't do automatic type conversions.. (int to float) 2013-12-31 16:26:49 -05:00
Edward Rudd 4a817f45e5 wrap not check in parenthesis so the check is done correctly. 2013-12-31 16:26:10 -05:00
Edward Rudd 2572a05e8b safely print errors by explicitly specifying a format string 2013-12-31 16:25:38 -05:00
Edward Rudd adfbc5bb64 pull in missing include 2013-12-31 16:25:13 -05:00
Edward Rudd 5b4e512dc6 ulong isn't defined anywhere (maybe on linux it is.. but not standard on OS X) 2013-12-31 16:24:56 -05:00
Edward Rudd b1a2569dff add CMake project for easier building 2013-12-31 16:24:14 -05:00
Jonas Kulla 82fb2f6b25 Remove outdated ruby patch 2013-12-30 08:31:56 +01: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 5b736bcfd6 mkxp.pro: Shorten keyword lenght to choose binding
'BINDING=BINDING_MRI' => 'BINDING=MRI'

Also error out if multiple bindings are chosen.
2013-12-29 18:01:57 +01:00
Jonas Kulla 7f4e58fd6e MRI-Binding: Don't memcpy script data before deflating
I think the reason this was originally done was some
issue with ruby's GC where it would wrongfully sweep
the script array variable on the C stack.

This change should speed up startup a little.
2013-12-29 14:55:49 +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 bd63bc9cd2 MRuby-Binding: Make code compile with latest mruby master 2013-12-27 04:36:24 +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 0ea242755e README: Audio pitch is implemented 2013-12-21 23:02:42 +01:00
Jonas Kulla 2538ae4224 README: Typo 2013-12-21 23:01:31 +01:00
Jonas Kulla 8702afedfc README: Mention SDL_sound patches 2013-12-21 21:25:31 +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 c504a383ba MRI-Binding: Optimize RB_ARG_END vaarg guard
It's enough to check this only in debug mode.
Make this an empty define in release mode.
2013-12-20 11:29:12 +01:00
Jonas Kulla d7ceff91a2 MRI-Binding: Deduplicate code 2013-12-20 10:22:01 +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 3a5c4eba52 BltShader: More hacks! Yay!
Seriously, I'm about to kill myself over this..
Not even gonna bother with math-if optimization.
2013-12-20 07:40:34 +01:00
Jonas Kulla 99cbb4d594 FileSystem: Remove useless code 2013-12-20 07:38:29 +01:00
Jonas Kulla 7e943e2803 MRI-Binding: Optimize attribute setters 2013-12-18 17:36:45 +01:00
Jonas Kulla f1df97551c FileSystem: Add "otf" to recognized font extensions 2013-12-15 10:19:22 +01:00
Jonas Kulla 91c5eb1861 MRI-Binding: Fix typo that led to access of freed Color objects
Also fix my moronic variable naming in the InitCopy
functions that let to this mess up in the first place.
2013-12-15 10:18:58 +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