Commit graph

382 commits

Author SHA1 Message Date
Daniel Gibson
ba549be284 math.h should #include sys/platform.h
Similar to f317b05
2018-08-20 01:46:37 +02:00
Daniel Gibson
e19de75a99 CD-Key check for internet-games can now be disabled
with ID_ENFORCE_KEY_CLIENT 0

This patch is from Kot-in-Action Creative Artel

Fixes #55
2018-08-20 01:46:37 +02:00
Daniel Gibson
385a1965e7 Guess x/y FOV/aspectratio from resolution
Added r_aspectratio -1 which means "auto" (as new default).
This mode sets fov_x and fov_y according to screen-width/height.
=> No need to set r_aspectratio manually anymore (assuming your display's
   pixels are about square).

The standard aspect ratios can still be enforced as before, though.
2018-08-20 01:46:37 +02:00
Daniel Gibson
20879f6972 List.h needs sys/platform.h for ID_INLINE
Everytime List.h is included in a new file (and sys/platform.h isn't)
there are confusing compiler-errors..
So just #include sys/platform.h in List.h directly, because it uses
ID_INLINE which is defined there
2018-08-20 01:46:37 +02:00
Daniel Gibson
d1527301b0 Use current type for BT_CLOSED enum
doesn't really make a difference code-wise, but removes one compiler warning.
2018-08-20 01:46:37 +02:00
Daniel Gibson
01545faf94 Get rid of some compiler warnings
GCC had shitloads of superfluous warnings wherever List.h and Str.h were
included.. get rid of them by using #pragma GCC diagnostic at some places
in List.h and Str.h.
Also add some casts, initialize some variables for other warnings
2018-08-20 01:46:37 +02:00
Daniel Gibson
a1f72df989 Win32: Statically link libgcc and libstdc++
Else one needs to copy those files from mingw32.. and I see no reason
not to statically link them.
2018-08-20 01:46:37 +02:00
Daniel Gibson
4fc06760aa Fix dedicated server for Windows
* the OpenAL function definitions mustn't include __declspec(dllimport)
  => fixed by pretending to compile OpenAL statically
* glimp.cpp shouldn't be used in dedicated-only mode (as it was already
  the case on Linux and OSX)
  => No special handling for ID_DEDICATED needed in glimp.cpp, as it's not
   used anyway
* add APIENTRY to every gl function in stub_gl.cpp for compatibility
  with windows headers and MSVC
* remove GL/gl.h #include from win_local.h as it's not needed
* in qgl.h, when building dedicated server for windows, redefine WINGDIAPI
  to nothing for SDL_opengl.h #include to get rid off __declspec(dllimport)
  by using #pragma push_macro and pop_macro, because our stub is no dll.

Fixes https://github.com/dhewm/dhewm3/issues/39
2018-08-20 01:46:37 +02:00
Daniel Gibson
ed1ffa8060 Fix several bugs from iodoom3 bugtracker
Apply 94cd0ee5 to d3xp as well.
2018-08-20 01:46:37 +02:00
dhewg
a5f5270f8e Add SDL2 support for the build system
Defaults to off, tree doesn't yet compile with SDL2.
2018-08-20 01:46:36 +02:00
dhewg
68c38d452b cmake: set SDL_BUILDING_LIBRARY for win32 and osx
While that's a lie it makes FindSDL skip SDLmain, which we have
in tree and compile ourselves.
2018-08-20 01:46:36 +02:00
dhewg
2f42541154 Don't link against OpenGL
Dynamically load all symbols at runtime.
This in in preparation for SDL2/OpenGLES.
2018-08-20 01:46:36 +02:00
dhewg
68f3690252 Get rid of glConfig.wgl_extensions_string
Unused and nobody cares.
2018-08-20 01:46:36 +02:00
dhewg
97163cf526 Get rid of GetCardCaps()
Useless now.
2018-08-20 01:46:36 +02:00
dhewg
e3e30a873f Get rid of unused var allowNV30Path 2018-08-20 01:46:36 +02:00
dhewg
4e90fff060 Remove the deprecated arb renderer 2018-08-20 01:46:36 +02:00
dhewg
17d609564a Remove the deprecated nv20 renderer 2018-08-20 01:46:36 +02:00
dhewg
ff99aa9477 Remove the deprecated nv10 renderer 2018-08-20 01:46:36 +02:00
dhewg
3d27d4776c Remove the ATI fragment shader emulation
This was only used by the r200 renderer on OSX.
2018-08-20 01:46:36 +02:00
dhewg
4859d1837b Remove the deprecated r200 renderer 2018-08-20 01:46:36 +02:00
dhewg
eb38c04357 Get rid of precompiled.[h|.cpp]
Both unused, except for the mfc editors, which don't compile anyway.
2018-08-20 01:46:36 +02:00
dhewg
755bffe601 Delete util_stub.cpp
Unused.
2018-08-20 01:46:36 +02:00
dhewg
8275299d7e More logging cleanup 2018-08-20 01:46:36 +02:00
dhewg
17b42bb46e cmake: indent whitespace fixes 2018-08-20 01:46:36 +02:00
dhewg
ffbbcaf726 cmake: Whitespace fixes for consistency 2018-08-20 01:46:36 +02:00
dhewg
9d9ba03b90 cmake: default to build d3xp 2018-08-20 01:46:36 +02:00
dhewg
105aec84e1 cmake: Remove fugly hack to compile 32bit binaries
This doesn't work on multiarch systems. A proper cmake toolchain file
has to be used instead.
2018-08-20 01:46:36 +02:00
dhewg
28ff955897 cmake: Fix error when curl is not found
Set the library name to an empty string to prevent this error:

CMake Error: The following variables are used in this project, but they
are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the
CMake files:
CURL_LIBRARY (ADVANCED)
2018-08-20 01:46:36 +02:00
dhewg
a3456b9004 cmake: Use GNUInstallDirs
Provides configure style overwritable path settings.
Include a fallback for cmake versions without GNUInstallDirs.
2018-08-20 01:46:35 +02:00
dhewg
95c34a8a00 Get rid of the signal handler
SDL covers this via e.g. SDL_QUIT event on ctrl+c.
2018-08-20 01:46:35 +02:00
dhewg
caf580b3ff Get rid of Sys_SetFatalError()
Unnecessary.
2018-08-20 01:46:35 +02:00
dhewg
f6b6f1df97 Correct the cpu type for 64bit msvc 2018-08-20 01:46:35 +02:00
dhewg
f4f8319316 Disable warning 4267 for msvc
Spams the console due to 32bit data types on 64bit.
2018-08-20 01:46:35 +02:00
dhewg
d832144482 Use _exit() in AssertFailed()
Ensure application exit.
2018-08-20 01:46:35 +02:00
dhewg
575668da57 Replace "__asm int 0x03" with __debugbreak()
Fixes compilation with msvc 64bit.
2018-08-20 01:46:35 +02:00
dhewg
d16d3a5534 Only compile msvc style asm with 32bit msvc
The 64bit compiler doesn't support __asm.
2018-08-20 01:46:35 +02:00
dhewg
5c483d3349 Get rid of sysMemoryStats_t
Unused.
2018-08-20 01:46:35 +02:00
dhewg
d75c2654c0 Get rid of empty sys/linux/dedicated.cpp 2018-08-20 01:46:35 +02:00
dhewg
5db94cb6a0 Get rid of win_cpu.cpp
All unused now.
2018-08-20 01:46:35 +02:00
dhewg
49067a82aa Get rid of Sys_FPU_StackIsEmpty()
Same as with Sys_FPU_GetState().
2018-08-20 01:46:35 +02:00
dhewg
16871256f8 Get rid of Sys_FPU_GetState()
This was only implemented with MSVC style asm.
Comments suggest that it was used to help catch invalid FOV calculations,
which were probably only happening with ancient compiler bugs.
2018-08-20 01:46:35 +02:00
dhewg
763791ab24 Get rid of Sys_FPU_EnableExceptions()
No exceptions were ever enabled.
2018-08-20 01:46:35 +02:00
dhewg
4dc111e63f Use a more modern way to set the fpu precision 2018-08-20 01:46:35 +02:00
dhewg
8e323cb4ff Get rid of Sys_FPU_SetRounding()
Unused.
2018-08-20 01:46:35 +02:00
dhewg
2ecfd21427 Use FILENAME_MAX for MAX_OSPATH
Fixes compilation with fucking MSVC.
2018-08-20 01:46:35 +02:00
Andre d
a6834f2f39 Remove (faulty/outdated) video ram detection 2018-08-20 01:46:35 +02:00
dhewg
04bea1b10f Use system zlib 2018-08-20 01:46:35 +02:00
dhewg
d250bf9262 Initial make install target for *nix
cmake fails it, so *nix only.
2018-08-20 01:46:34 +02:00
dhewg
f9ca9c0119 Bump ASYNC_PROTOCOL_MINOR
Due to changed protocol we're not compatible anymore.
2018-08-20 01:46:34 +02:00
dhewg
e85823f8ce Remove all OS specific gamepak code
Useless since there are no gamepaks.
2018-08-20 01:46:34 +02:00