Commit Graph

57 Commits

Author SHA1 Message Date
Varun Patil f20d7a43b1 Remove main update loop 2020-05-04 22:51:21 +05:30
Varun Patil 8c5db3a401 Make changes for Emscripten 2020-05-04 13:13:57 +05:30
Jonas Kulla 947974cac6 Config: Properly use windowTitle everywhere instead of game.title 2017-12-12 17:57:02 +01:00
Jonas Kulla 7d9a85dbbd Config: Add entry to override the game window title 2017-12-11 00:48:35 +01:00
Jonas Kulla 006f701fec Config: Add "enableBlitting" entry to toggle GL_EXT_framebuffer_blit 2017-04-23 14:32:11 +02:00
Jonas Kulla e4079d5738 Fix build on OSX after 60e967e3b7 2017-04-08 19:13:31 +02:00
Marty Plummer 60e967e3b7 Add icon and resource files for windows
Signed-off-by: Marty Plummer <ntzrmtthihu777@gmail.com>
2017-03-09 08:24:13 +01:00
Jonas Kulla 6349146e01 main: Only set window icon on Linux
OSX carries high-resolution icons in its bundles, and windows uses
windres to embed .ico files, so don't interfere with those.
2017-03-04 11:04:02 +01:00
Jonas Kulla 713ea07558 SDL hints need to be set before initialization 2015-02-10 15:51:33 +01:00
Jonas Kulla 012d87d05a Disable accelerometer joystick emulation on Android 2015-01-15 07:21:07 +01:00
Jonas Kulla 146e0294b4 Add option to fix the framerate to the native screen refresh rate
Useful on mobile devices where using non-standard framerates
looks absolutely horrible and screen refresh rates vary highly.
2015-01-03 18:58:13 +01:00
Jonas Kulla 3411435138 Factor out some thread communication code (window size, bindings) 2015-01-02 01:41:23 +01:00
Jonas Kulla 5974d05380 Create OpenAL device in main() and store in RGSSThreadData 2014-12-31 18:52:21 +01:00
Jonas Kulla 3596fc568d main.cpp: Immediately query the actual window size after creation 2014-12-31 18:52:21 +01:00
Jonas Kulla fcfa079e7b Perform chdir(gameFolder) early in main() 2014-12-31 18:52:20 +01:00
Jonas Kulla 03a6c657c4 main.cpp: Always display errors in a message box 2014-12-31 18:52:20 +01:00
David Salvisberg 6829ddc09f Removed store keybindings from main, since it now already gets stored onAccept. 2014-12-28 06:06:28 +01:00
Jonas Kulla c1aab96454 Rename src/debuglogger -> src/gl-debug 2014-11-29 17:51:37 +01:00
Jonas Kulla 5979c5f778 Add placeholder application icon 2014-11-29 17:30:53 +01:00
Jonas Kulla 5094f5c7c1 Add minor assert 2014-10-16 09:10:27 +02:00
Jonas Kulla dd73db2e9d Introduce F1 menu to reconfigure key bindings at runtime 2014-10-11 20:48:44 +02:00
Jonas Kulla d223d83cbf Implement F12 game reset (MRI only)
Can be disabled with "enableReset=false".

While at it, also replace the flakey volatile bool flags
with proper atomics.
2014-09-26 06:25:47 +02:00
Jonas Kulla 6d414c0777 Print RGSS version on startup 2014-08-29 03:16:12 +02:00
Jonas Kulla 3bcf995832 Add option to turn off switching into executable dir on startup 2014-08-02 09:30:17 +02:00
Jonas Kulla 5640c3d04b Print RGSS thread error message to console 2014-07-19 02:59:05 +02:00
Jonas Kulla c5f18ee535 Print SDL error message if window creation fails 2014-07-14 06:22:49 +02:00
Jonas Kulla 6c481e5eb8 Eliminate GLEW dependency
GL entrypoint resolution is now done manually. This has a couple
immediate benefits, such as not having to retrieve hundreds of
functions pointers that we'll never use. It's also nice to have
an exact overview of all the entrypoints used by mkxp.

This change allows mkxp to run fine with core contexts, not sure
how relevant that is going to be in the future.

What's noteworthy is that  _all_ entrypoints, even the ones core
in 1.1 and guaranteed to be in every libGL, are resolved
dynamically.
This has the added benefit of not having to link directly against
libGL anymore, which also cleans up the output of `ldd` quite
a bit (SDL2 loads most system deps dynamically at runtime).

GL headers are still required at build time.
2014-06-13 18:46:45 +02:00
Jonas Kulla d09f4a1bae Typo 2014-05-21 18:08:31 +02:00
Jonas Kulla 20e323c699 Config: Parse from command line options on top of config file
Any options that are not arrays (ie. RTP paths) specified
as command line options will override entries in mkxp.conf.

The syntax is: --<option>=<value>
2014-01-13 00:06:34 +01:00
Jonas Kulla 5f16eef273 EventThread: Properly allocate SDL user event codes 2014-01-02 02:22:10 +01:00
Edward Rudd 5b4f0b239c add config option to set the window icon 2014-01-01 16:52:07 -05:00
Edward Rudd c6bd61d2de code style fixes 2014-01-01 11:01:05 -05: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
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 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
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 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 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 94911b61a6 Revert "Always request OpenGL Core profile"
This reverts commit 34d4103111.

Turns out we need at least GLSL 1.50, for which we'd
have to throw our OpenGL 2.0 compatibility in the water.
Nope, not yet.
2013-10-16 00:04:01 +02:00
Jonas Kulla 1e98413a7e Init: Print various GL implementation strings 2013-10-15 23:19:52 +02:00
Jonas Kulla bf5e80dd6a Init: Check for OpenGL 2.0 and destroy context on error 2013-10-15 19:35:03 +02:00
Jonas Kulla 2a83cfc1e1 Init: glClear the window as early as possible 2013-10-14 03:03:31 +02:00
Jonas Kulla caccee5db2 Fix up glew include paths 2013-10-14 02:22:34 +02:00
Jonas Kulla 39436ad231 Fix up SDL2 include paths
Using "SDL2/SDL_xxx.h" instead of "SDL_xxx.h" caused
the include paths provided by pkg-config to be ignored,
and headers from a standard include path to be used instead.
2013-10-13 23:21:34 +02:00
Jonas Kulla 8b9c501249 Remove useless SDL_Init() flag 2013-10-13 23:07:40 +02:00
Jonas Kulla cb6f73f7df Rename 'GlobalState' to 'SharedState' to avoid confusion with GLState
This was particularly nasty with the shorthand macros
'gState' and 'glState'. The former is now 'shState'.
2013-10-09 12:30:33 +02:00
Jonas Kulla 34d4103111 Always request OpenGL Core profile 2013-10-08 06:29:05 +02:00
Jonas Kulla bb70c39811 Ensure SDL_image and SDL_ttf initialize correctly 2013-10-02 13:50:58 +02:00
Jonas Kulla 0f58852e2b Remove GL_ARB_imaging requirement
Mesa doesn't have it, and I'm not sure it really
serves any purpose at all.
2013-10-02 13:35:14 +02:00