Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
50 lines (40 sloc) 1.77 KB
Using SDL on Windows Systems
============================
By default OpenDUNE on Windows uses WinAPI, so it doesn't require any
other library to run on Windows.
However, it is possible using SDL libraries to improve the experience
of gameplaying, being able to toggle fullscreen or zooming in/out the
window size.
Settings for Compiling
----------------------
You can edit generate.vbs script to preconfigure Visual Studio
project files (re)creation. Set at line 33:
graph_config = "SDL"
or
graph_config = "SDL2"
Saving and launching vbscript you will obtain new VS project files
with correct included to solution files list.
Then follow the steps below.
Compiling SDL 1.2
-----------------
After setting up SDL 1.2 libraries, to successfully compile on MSVC,
going to Project Properties (All Configurations):
- on C/C++=>Preprocessor, set WITH_SDL into Preprocessor Definitions
- if you did not put "#undef main" directive on opendune.c source, go
on Linker=>System and set /SUBSYSTEM:WINDOWS or /SUBSYSTEM:CONSOLE
(to define entry point on main for SDL)
- on Linker=>Command Line, set /FORCE:MULTIPLE on Additional Options
(to avoid 'multiple definitions' problems)
Compiling SDL 2.0
-----------------
After setting up SDL 2.0 libraries, to successfully compile on MSVC,
going to Project Properties (All Configurations):
- on C/C++=>Preprocessor, set WITH_SDL2 into Preprocessor Definitions
- if you did not put "#undef main" directive on opendune.c source, go
on Linker=>System and set /SUBSYSTEM:WINDOWS or /SUBSYSTEM:CONSOLE
(to define entry point on main for SDL)
Additional Features
-------------------
While playing OpenDUNE, you can press F11 (or Alt+Enter) to toggle
fullscreen, or press +/- keys to zoom in/out window size, maintaining
original ratio resolution.