Fix clicking links not working on Windows 95/98, improve readme a bit to be clearer about OpenGL 1.1 support and link to WIP compiling with overriden defaults

This commit is contained in:
UnknownShadow200 2023-06-08 22:15:37 +10:00
parent 56e140428f
commit 20277e4dec
4 changed files with 52 additions and 4 deletions

View file

@ -0,0 +1,37 @@
TODO finish this
TODO introduction (explaining platform specific modules)
Two ways
1) Changing the defines in `Core.h`
2) Adding `-DCC_BUILD_MANUAL` to compilation flags and manually defining module backend
Graphics backends
CC_BUILD_GL
CC_BUILD_GLMODERN
CC_BUILD_D3D9
CC_BUILD_3D11
CC_BUILD_GL11
CC_BUILD_GLES
OpenGL context backends
CC_BUILD_EGL
CC_BUILD_WGL
HTTP backends
CC_BUILD_WININET
CC_BUILD_CURL
CC_BUILD_CFNETWORK
CC_BUILD_HTTPCLIENT
Window backends
CC_BUILD_WINGUI
CC_BUILD_X11
CC_BUILD_SDL
Platform backends
CC_BUILD_WIN
CC_BUILD_POSIX
TODO fill in rest

View file

@ -43,10 +43,17 @@ Run ClassiCube.exe, then click Singleplayer at the main menu.
**Multiplayer** **Multiplayer**
Run ClassiCube.exe. You can connect to LAN/locally hosted servers, and classicube.net servers if you have a [ClassiCube account](https://www.classicube.net/). Run ClassiCube.exe. You can connect to LAN/locally hosted servers, and classicube.net servers if you have a [ClassiCube account](https://www.classicube.net/).
###### *Stuck with OpenGL 1.1 due to old graphics hardware?* ##### *Stuck on OpenGL 1.1?*
If you're on Windows, you should first try using the MESA software renderer from [here](http://download.qt.io/development_releases/prebuilt/llvmpipe/windows/). Typically though, this occurs because you have not installed GPU drivers. The most common reason for being stuck on OpenGL 1.1 is non-working GPU drivers - so if possible, you should try either installing or updating the drivers for your GPU.
Otherwise, you will have to [compile the game yourself](#using-visual-studio-command-line). Don't forget to add `-DCC_BUILD_GL11` to the compilation command line so that the compiled game supports OpenGL 1.1. Otherwise:
* On Windows, you can still run the OpenGL build of ClassiCube anyways. (You can try downloading and using the MESA software renderer from [here](http://download.qt.io/development_releases/prebuilt/llvmpipe/windows/) for slightly better performance though)
* On other operating systems, you will have to [compile the game yourself](#Compiling). Don't forget to add `-DCC_BUILD_GL11` to the compilation command line so that the compiled game supports OpenGL 1.1.
# Compiling
*Note: The various instructions below automatically compile ClassiCube with the recommended defaults for the platform. <br>
If you (not recommended) want to override the defaults (e.g. to compile OpenGL build on Windows), see [here](doc/overriding-defaults.md) for details.*
## Compiling - Windows ## Compiling - Windows

View file

@ -100,7 +100,7 @@ struct DeflateState {
cc_uint16 Head[DEFLATE_HASH_SIZE]; cc_uint16 Head[DEFLATE_HASH_SIZE];
cc_uint16 Prev[DEFLATE_BUFFER_SIZE]; cc_uint16 Prev[DEFLATE_BUFFER_SIZE];
/* NOTE: The largest possible value that can get */ /* NOTE: The largest possible value that can get */
/* stored in Head/Prev is DEFLATE_BUFFER_SIZE - 1 */ /* stored in Head/Prev is <= DEFLATE_BUFFER_SIZE */
cc_bool WroteHeader; cc_bool WroteHeader;
}; };
/* Compresses input data using DEFLATE, then writes compressed output to another stream. Write only stream. */ /* Compresses input data using DEFLATE, then writes compressed output to another stream. Write only stream. */

View file

@ -22,6 +22,7 @@
/* === BEGIN shellapi.h === */ /* === BEGIN shellapi.h === */
#define SHELLAPI DECLSPEC_IMPORT #define SHELLAPI DECLSPEC_IMPORT
SHELLAPI HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR operation, LPCWSTR file, LPCWSTR parameters, LPCWSTR directory, INT showCmd); SHELLAPI HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR operation, LPCWSTR file, LPCWSTR parameters, LPCWSTR directory, INT showCmd);
SHELLAPI HINSTANCE WINAPI ShellExecuteA(HWND hwnd, LPCSTR operation, LPCSTR file, LPCSTR parameters, LPCSTR directory, INT showCmd);
/* === END shellapi.h === */ /* === END shellapi.h === */
/* === BEGIN wincrypt.h === */ /* === BEGIN wincrypt.h === */
typedef struct _CRYPTOAPI_BLOB { typedef struct _CRYPTOAPI_BLOB {
@ -637,6 +638,9 @@ cc_result Process_StartOpen(const cc_string* args) {
Platform_EncodeString(&str, args); Platform_EncodeString(&str, args);
res = (cc_uintptr)ShellExecuteW(NULL, NULL, str.uni, NULL, NULL, SW_SHOWNORMAL); res = (cc_uintptr)ShellExecuteW(NULL, NULL, str.uni, NULL, NULL, SW_SHOWNORMAL);
/* Windows 9x always returns "error 0" for ShellExecuteW */
if (res == 0) res = (cc_uintptr)ShellExecuteA(NULL, NULL, str.ansi, NULL, NULL, SW_SHOWNORMAL);
/* MSDN: "If the function succeeds, it returns a value greater than 32. If the function fails, */ /* MSDN: "If the function succeeds, it returns a value greater than 32. If the function fails, */
/* it returns an error value that indicates the cause of the failure" */ /* it returns an error value that indicates the cause of the failure" */
return res > 32 ? 0 : (cc_result)res; return res > 32 ? 0 : (cc_result)res;