Commit graph

6157 commits

Author SHA1 Message Date
UnknownShadow200
c8cdd41a1b Fix 'save level' being disabled instead of 'load level' in classic mode in multiplayer 2022-02-27 20:44:31 +11:00
UnknownShadow200
463d7cae5d Direct3D9: Try to avoid crashing if unable to allocate vram or memory for managed texture 2022-02-26 23:29:22 +11:00
UnknownShadow200
4377c46826 Direct3D11: Support running out of memory when creating textures (partially)
Failures in mipmap creation, shader resource view creation etc will still cause program exit
2022-02-26 21:38:36 +11:00
UnknownShadow200
4f79864d5e
Merge pull request #934 from UnknownShadow200/GameArgsFix
Support spaces in command line arguments when starting game from launcher
2022-02-26 11:15:30 +11:00
UnknownShadow200
9d4e8d1e2c Also support space in game process command line arguments on unix/android/iOS platform backends 2022-02-26 09:58:37 +11:00
UnknownShadow200
3f7742cc5c Drop Direct3D9Ex support (Direct3D11 backend will eventually provide a superior alternative to Direct3D9 backend) 2022-02-25 20:45:56 +11:00
UnknownShadow200
60a017b951 WIP on supporting spaces for game process command line arguments
Only Windows done so far
2022-02-24 19:23:48 +11:00
UnknownShadow200
8e61dbc18a Android: Try to fix 'unexpected status line' errors with texture packs from dropbox, addresses #933 2022-02-23 23:24:47 +11:00
UnknownShadow200
c4fe212b8b Fix 'Download size' with dropbox texture packs always showing 'Determining..' forever
Fixed on native client to show actual length again by querying X-Dropbox-Content-Length header instead, no such luck for webclient though unfortunately
2022-02-19 23:54:48 +11:00
UnknownShadow200
2a14d1389e Fix disconnectscreen grabbing cursor for a frame when shown (Thanks Igor1_)
e.g fixes if you connecting to server timed out, the cursor was always re-centred
2022-02-18 23:22:35 +11:00
UnknownShadow200
4f80b48fcc Prefer BLOCK_MAX_X over BLOCK_X_COUNT 2022-02-14 23:37:56 +11:00
UnknownShadow200
074eb418e9 macOS: Fix cursor being unmovable if dialog is shown while raw mouse mode is enabled 2022-02-13 20:29:00 +11:00
UnknownShadow200
76c334f3ad SDL: Fix window not being resizable 2022-02-13 12:22:39 +11:00
UnknownShadow200
fc10386ff9 Call Window_DisableRawMouse on all platforms when game is closed, not just webclient (Thanks Igor1_)
Fixes on Windows where if cursor grabbing was enabled and the game window was closed via taskbar preview, the cursor would still be trapped/confined in the region the game window was in before the game was closed
2022-02-12 23:44:16 +11:00
UnknownShadow200
a966f4b11b Windows: Add option for confining cursor to window (Thanks Igor1) 2022-02-11 09:02:53 +11:00
UnknownShadow200
c29130c792 Disconnect immediately after send fails instead of always waiting 30 seconds
Should mostly fix situation where after server is closed, game will should still take up to 30 seconds to actually disconnect, especially for LAN/localhost servers

I tested unplugging ethernet and disconnecting from wifi, then reconnecting a couple of seconds later, and in both cases the game was able to survive connection dropout without being disconnected from the server.
So hopefully this doesn't cause any issues
2022-02-07 23:52:42 +11:00
UnknownShadow200
e63f89ee1b Direct3D11: Improve /client gpuinfo and fix resource leakage 2022-02-05 20:48:13 +11:00
UnknownShadow200
f218c49970 Carbon: Simplify GLContext related code a bit 2022-02-02 21:27:27 +11:00
UnknownShadow200
c3d98109a9 Cocoa: Fix can't exit legacy fullscreen mode 2022-02-01 22:51:44 +11:00
UnknownShadow200
f55cd88cf3 Fix on windows 98 can't connect to any server (Thanks p1glynlol)
This was because 'nameLen' was always set as sizeof(SOCKADDR_STORAGE) instead of sizeof(SOCKADDR) for ipv4 and sizeof(SOCKADDR_STORAGE) for ipv6

While that worked fine on later Windows operating system versions, it did not work on windows 98
2022-02-01 08:54:30 +11:00
UnknownShadow200
8db890639f Cocoa: Try to fix fullscreen not working below macOS 10.7 (Thanks SkatingDoggo) 2022-01-31 12:01:36 +11:00
UnknownShadow200
04637af331 Redesign default block properties to use a table instead (backport from 0.0.23a branch) 2022-01-30 16:29:44 +11:00
UnknownShadow200
607e14a087 Launcher: Assume port 25565 in Direct Connect when no port is given, instead of erroring 2022-01-30 09:53:56 +11:00
UnknownShadow200
cacb52b595 Direct3D11: Fix not running on < windows 7, fix not compiling with mingw
The Direct3D11 backend still won't work pre-windows 7, but at least now the launcher part of ClassiCube will still run (instead of .exe not running at all due to requiring d3d11.dll) so the user can update to Direct3D9/OpenGL build instead
2022-01-29 18:43:54 +11:00
UnknownShadow200
387958dbfe
Merge pull request #929 from UnknownShadow200/IDBRewrite3
Use copied minimal IDBFS implementation and recover from dropped IDBConnection
2022-01-29 11:55:48 +11:00
UnknownShadow200
5f0ed11442 Launcher: Can hide empty servers from list
Checkbox in Options
2022-01-28 09:01:15 +11:00
UnknownShadow200
86b664e05a Launcher: Add nordic theme
Based on colors from nordtheme.com

Also fixes Direct3D11 backend crashing game if other code attempts to create a texture while the context is lost
2022-01-27 12:02:21 +11:00
UnknownShadow200
bbf858e6ab Cocoa: Fixe open file dialog not filtering files in executable compiled by buildbot 2022-01-27 00:07:17 +11:00
UnknownShadow200
1010953830 Direct3D11: Use dummy 1x1 white texture instead of default transparent black texture, when Gfx_BindTexture is called with nil texture ID 2022-01-26 21:23:48 +11:00
UnknownShadow200
87bcdd1e43 Try to fix 'The database connection is closing' issues
Browsers may rarely randomly close the IndexedDB connection, which would prevent the game from being able to save options or maps anymore until the user restarted the game.

With this commit, the game now listens for the 'onclose' event on the IDBConnection for when the connection is unexpectedly closed - and when the 'onclose' event is raised, clears the cached IndexedDB connection global so that the next call to getDB opens a fresh IndexedDB connection.

I tested this by deleting the IndexedDB database in developer tools (which triggered 'onclose' event) and seemed to work fine
2022-01-26 20:52:50 +11:00
UnknownShadow200
8b986b5ccd Integrate minimal IDBFS copied from emscripten directly into interop_web.js 2022-01-26 20:26:03 +11:00
UnknownShadow200
cb0cbf4cb7 Fix files from default.zip when extracted with windows built-in zip decompressor causing a 'File not found or no read permission' when attempting to later add back into a .zip file using windows built-in zip compressor
Previously, only the Central Diretory Records for files had their modification dates set to the current date, while the Local File Records for files had their modification dates left as 0.

Hence when extracting default.zip using windows' built-in zip decompressor, the resulting files would have a modification and creation date of '0'. (aka 10th March 1601)
Unfortunately, attempting to later put these files back into a .zip using windows' built-in zip compressor would fail with an obscure 'File not found or no read permission' error, which was actually due to the modification/creation date of these files being '0'.

This commit changes Local File Records for files to also have their modification set to the current date, which results in files extracted using windows' built-in zip decompressor now having valid modifcation and creation dates, thus bypassing the 'File not found or no read permission' error
2022-01-26 11:40:21 +11:00
UnknownShadow200
7e54209c21 Direct3D11: Survive device resets/removed situation
Now just recreates the device and swapchain instead of crashing
2022-01-25 11:49:17 +11:00
UnknownShadow200
746a902e2e Add file forgot to update 2022-01-23 18:35:46 +11:00
UnknownShadow200
cc375f1082 Launcher: Move background drawing code out from LBackend.c and back into Launcher.c 2022-01-23 18:28:27 +11:00
UnknownShadow200
f03febce99 Launcher: Fix checkbox not adjusting its position when font isn't Arial
Usually this resulted in checkbox being drawn over first 1-2 characters of text
2022-01-23 13:13:26 +11:00
UnknownShadow200
2b0b05358c Launcher: Change DrawBackground to draw to arbitary bitmap 2022-01-23 12:11:46 +11:00
UnknownShadow200
2b55c6fdb8 Make chat input always cover entire width of the game window (like Minecraft) 2022-01-21 08:52:44 +11:00
UnknownShadow200
03e4c19853 Make back buttons always 400 pixels wide like classic 2022-01-21 08:34:36 +11:00
UnknownShadow200
41c13a2a47 Fix crash if the first list menu you open is a menu without a 'load file' button 2022-01-20 23:00:57 +11:00
UnknownShadow200
b60d30a933
Merge pull request #927 from UnknownShadow200/LoadFile-Maps
Add support for loading maps through native open file dialog
2022-01-20 21:09:15 +11:00
UnknownShadow200
fc0397a7ed Move 'Load file' onto its own line 2022-01-20 18:23:21 +11:00
UnknownShadow200
8b88d3e575 Use Zenity to add Linux support 2022-01-19 20:52:36 +11:00
UnknownShadow200
a2e6cedf42 add support to cocoa backend (64bit macOS) 2022-01-19 19:21:37 +11:00
UnknownShadow200
41226b6d67 Improve filter on Windows and webclient 2022-01-19 12:04:53 +11:00
UnknownShadow200
f7561ebb2a Initial 'Load file' map support for Windows
'Load file' opens a file dialog allowing you to load maps from anywhere on disc
2022-01-19 07:48:25 +11:00
UnknownShadow200
f1b2de34d4 Launcher: Add dedicated DrawBackground method to Screens for drawing background launcher of screen/menu
This means that e.g. time isn't wasted with drawing default background, then completely drawing over the top of it with checkresourcescreen's custom background
2022-01-18 11:42:26 +11:00
UnknownShadow200
c83f53ae93 X11: Fix 30 bit depth showing corrupted launcher colors (Thanks colbydray), fixes #642 2022-01-15 12:54:26 +11:00
UnknownShadow200
7ec5c09696 fix linux build not compiling with missing line 2022-01-15 10:10:47 +11:00
UnknownShadow200
308d2ec21d X11: Optimise launcher redrawing for non 24/32 bit depths 2022-01-15 10:04:34 +11:00