forked from OpenDUNE/OpenDUNE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SDL_Win32.txt
49 lines (40 loc) · 1.77 KB
/
SDL_Win32.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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.