diff --git a/doc/portability.md b/doc/portability.md index 3478a0abd..5254c3131 100644 --- a/doc/portability.md +++ b/doc/portability.md @@ -1,49 +1,32 @@ Although most of the code is platform-independent, some per-platform functionality is required. -By default I try to automatically define appropriate backends for your system in `Core.h`. Define ```CC_BUILD_MANUAL``` to disable this. +By default `Core.h` tries to automatically define appropriate backends for your system. Define ```CC_BUILD_MANUAL``` to disable this. ## Before you start -* IEEE floating support is required. (Can be emulated in software, but will affect performance) -* int must be 32-bits. 32-bit addressing (or more) is required. +* IEEE floating-point support is required. (Can be emulated in software, but will affect performance) +* The `int` data type must be 32-bits. +* 32-bit addressing (or more) is required. * Support for 8/16/32/64 integer types is required. (your compiler must support 64-bit arithmetic) * At least around 2 MB of RAM is required at a minimum * At least 128 kb for main thread stack size -In other words, the codebase can theroetically be ported to any modern-ish hardware, but not stuff like a UNIVAC machine, the SuperFX chip on the SNES, or an 8-bit microcontroller. +In summary, the codebase can theroetically be ported to any modern-ish hardware, but not stuff like a UNIVAC machine, the SuperFX chip on the SNES, or an 8-bit microcontroller. ## Supported platforms -**Note:** Some of these machines are just virtual machines. Should still work on real hardware though. #### Tier 1 support -These platforms are regularly tested on and have executables automatically compiled for. (see buildbot.sh) +These platforms are regularly tested on and have executables automatically compiled for. -|Platform|Machine|Notes| +|Platform|Testing|Support| |--------|-------|-----| -|Windows x86/x64 | Windows 7 | -|macOS x86/x64 | macOS 10.12 | -|Linux x86/x64 | Xubuntu 14 | -|Web client | Chrome | +|Windows x86/x64 | Mostly tested on 7+ | Should work in all Windows versions +|macOS x86/x64 | Mostly tested on 10.12 | Should work in all macOS versions since 10.3 +|Linux x86/x64 | Mostly tested on Linux Mint | Should work in most Linux distributions +|Web client | Mostly tested in Chrome | Should work in all browsers with WebGL (including IE) + +Note: Updating doesn't work properly in Windows 95 or Windows 98 #### Tier 2 support -These machines are far less frequently tested on, but are otherwise same as tier 1 support. - -|Platform|Machine|Notes| -|--------|-------|-----| -|Windows x86 | Windows 2000 | -|Windows x86 | 98 + KernelEX | Updating doesn't work -|Windows x64 | Windows 10 | -|ReactOS | ReactOS | -|Linux x64 | Arch linux | -|Linux x64 | Linux Mint | -|Linux x64 | Kubuntu | -|Linux x64 | Debian | -|Linux x64 | Fedora | -|Linux x86/x64 | Lubuntu | -|Web client | Firefox | -|Web client | Safari | -|Web client | Edge | Cursor doesn't seem to disappear - -#### Tier 3 support The game has been compiled and run on these platforms before. It may or may not still compile for them. I don't really test these platforms at all, only when I suspect some changes to the code might impact them. @@ -64,8 +47,8 @@ I don't really test these platforms at all, only when I suspect some changes to ## Porting -Listed below are the requirements for implementing each platform-dependent file. -You should try to take advantage of existing backends when porting to other platforms. +Listed below are the requirements for implementing each platform-dependent file.
+When porting to other platforms, you should try to leverage existing backends when possible.
Only cross platform backends are listed below. ### Platform @@ -93,8 +76,8 @@ Create a window, show a dialog window, set window contents, keyboard/mouse input Also monitor size, clipboard, cursor, raw relative mouse movement (optional) Define: -- ```CC_BUILD_X11``` - Use X11/XLib (unix-ish) (glX) -- ```CC_BUILD_SDL``` - Use SDL library (SDL) +- ```DEFAULT_WIN_BACKEND CC_WIN_BACKEND_X11 ``` - Use X11/XLib (unix-ish) (glX) +- ```DEFAULT_WIN_BACKEND CC_WIN_BACKEND_SDL2``` - Use SDL2 library (SDL2) If using OpenGL, also OpenGL context management @@ -112,24 +95,24 @@ posix note: Register access is highly dependent on OS and architecture. Play multiple audio streams with varying sample rates Define: -- ```CC_BUILD_OPENAL``` - use OpenAL +- ```DEFAULT_AUD_BACKEND CC_AUD_BACKEND_OPENAL``` - use OpenAL - ```CC_BUILD_NOAUDIO``` - stub audio implementation (silent) ### 3D Graphics Texturing, depth buffer, alpha, etc (See Graphics.h for full list) Define: -- ```CC_BUILD_D3D9``` - Use Direct3D9 -- ```CC_BUILD_GL``` - Use OpenGL (1.5/1.2 + ARB_VERTEX_BUFFER_OBJECT) -- ```CC_BUILD_GL11``` - Use OpenGL 1.1 features only -- ```CC_BUILD_GLMODERN``` - Use modern OpenGL shaders -- ```CC_BUILD_GLES``` - Makes these shaders compatible with OpenGL ES +- ```DEFAULT_GFX_BACKEND CC_GFX_BACKEND_GL1``` - Use legacy OpenGL (1.5/1.2 + ARB_VERTEX_BUFFER_OBJECT) + - ```CC_BUILD_GL11``` - Use OpenGL 1.1 features only +- ```DEFAULT_GFX_BACKEND CC_GFX_BACKEND_GL2``` - Use modern OpenGL shaders + - ```CC_BUILD_GLES``` - Makes these shaders compatible with OpenGL ES +- ```DEFAULT_GFX_BACKEND CC_GFX_BACKEND_SOFTGPU``` - Use built in software rasteriser ### HTTP HTTP, HTTPS, and setting request/getting response headers Define: -- ```CC_BUILD_HTTPCLIENT``` - use built in simple HTTP backend -- ```CC_BUILD_CURL``` - use libcurl for HTTP +- ```DEFAULT_NET_BACKEND CC_NET_BACKEND_BUILTIN``` - use built in simple HTTP backend +- ```DEFAULT_NET_BACKEND CC_NET_BACKEND_LIBCURL``` - use libcurl for HTTP Supporting connection reuse is highly recommended. (but not required)