Commit Graph

77 Commits

Author SHA1 Message Date
sfan5 033128d8dc Show better description to users when std::bad_alloc happens 2023-09-13 13:58:59 +02:00
Desour f47b00426a Revert "Get rid of guiroot"
This reverts commit 45e7a80057.
2023-08-24 22:14:44 +02:00
Desour 7e4dccb3b5 Revert "Get rid of global guienv variable"
This reverts commit 16da954bd7.
2023-08-24 22:14:44 +02:00
Desour 16da954bd7 Get rid of global guienv variable
(It can already be accessed via the renderingengine.)
2023-08-14 18:13:47 +02:00
Desour 45e7a80057 Get rid of guiroot
The guienvironment already provides a root gui element, we don't need to add another one.
(For CGUIEnvironment, the env itself is the root element.)
2023-08-14 18:13:47 +02:00
SmallJoker 128d22e6ee
GUI: Automatic scaling of checkboxes and scrollbars (#13666)
Mainly helpful on high-DPI screens or when 'gui_scaling' is changed
2023-07-17 20:46:15 +02:00
ROllerozxa d71872af23
Fix texture paths for system-installed builds
* window icon
* custom touchscreen checkbox sprites
2023-07-03 20:31:03 +02:00
DS c91182e1b3
Move the platform-dependent stuff in renderingengine.cpp to irrlicht (#13348) 2023-06-11 14:17:39 +02:00
Desour 67068cfaf4 Get rid of wgettext 2023-04-08 20:17:50 +02:00
numzero d6be6682ec Drop dependency on IrrCompileConfig
The only remaining thing is IRRLICHT_SDK_VERSION via irrlicht.h
2023-03-01 09:06:23 +01:00
ROllerozxa 390b5caaaa
Fix crash on Android with IrrlichtMt9 (#13123)
Caused by mouse control
2023-01-08 14:04:17 +01:00
ndren 62ee02b8ba
Set and unset relative mouse mode where necessary (#12636)
* Set and unset relative mouse mode where necessary

Co-authored-by: sfan5 <sfan5@live.de>
2022-12-24 09:38:30 +01:00
Herman Semenov 038da00e79
Code optimizations / refactor (#12704)
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
Co-authored-by: sfan5 <sfan5@live.de>
2022-09-06 11:21:09 +01:00
rubenwardy 03d86ea0b4
Add register dialog to separate login/register (#12185)
New users find Minetest's account system confusing.
This change moves username/password to a new dialog,
with login and register buttons added to the Join Game tab.

The old registration confirmation dialog is removed in
favour of the new dialog.

Fixes #8138
2022-06-05 17:47:38 +02:00
ShadowNinja 5683bb76cc Fix compiler warnings 2022-04-08 14:55:21 +01:00
sfan5 5eb45e1ea0
Restore pass-through of direction keys (#11924)
This moves relevant code into the PlayerControl class and gets rid of separate keyPressed variable.
2022-01-09 18:46:36 +01:00
TheBrokenRail 3dcf9e963e
Touch UI support for desktop builds (#10729) 2021-09-26 18:04:09 +02:00
Wuzzy 51bf4a6e26
Perform some quality assurance for translation strings (#11375) 2021-06-23 17:35:50 +01:00
sfan5 edf098db63 Drop --videomodes, fullscreen_bpp and high_precision_fpu settings
These have been pointless for a while.
2021-06-16 17:41:34 +02:00
savilli 673c29f7ea
Fix client crash on when con::PeerNotFoundException is thrown (#11286) 2021-05-24 19:40:35 +02:00
Loic Blot 258101a910 refacto: RenderingEngine is now better hidden
* No more access to the singleton instance from everywhere (RenderingEngine::get_instance dropped)
* RenderingEngine::get_timer_time is now non static
* RenderingEngine::draw_menu_scene is now non static
* RenderingEngine::draw_scene is now non static
* RenderingEngine::{initialize,finalize} are now non static
* RenderingEngine::run is now non static
* RenderingEngine::getWindowSize now have a static helper. It was mandatory to hide the global get_instance access
2021-05-03 19:49:19 +02:00
sfan5 1e4913cd76
Irrlicht support code maintenance 2021-03-31 13:15:47 +02:00
SmallJoker 2760371d8e Settings: Purge getDefault, clean FontEngine 2021-01-29 17:32:35 +01:00
rubenwardy 67aa75d444
Use JSON for favorites, move server list code to Lua (#10085)
Co-authored-by: sfan5 <sfan5@live.de>
2021-01-22 15:08:57 +00:00
SmallJoker e5725dfb8e
Allow starting local server using --go again (#10229) 2020-07-29 23:20:01 +02:00
SmallJoker 4fa1e03f68
Cleanup ClientLauncher structure (#10160)
Remove duplicated variables and unify the startup data into a new (inherited) struct.
2020-07-14 19:10:37 +02:00
Loïc Blot f1a05d0f71
Fix broken client if openal cannot be opened (#9804) 2020-05-05 08:38:18 +02:00
random-geek fc566e2e10 Fix cloud color in loading screen and main menu (#8174) 2019-02-04 19:11:02 +00:00
Kevin Abrams b7eb81fed9 Add command line option to load password from file (#7832) 2018-12-18 20:15:14 +01:00
stujones11 3b11288989 Android: Improve UI scaling on smaller high-density displays (#7834)
* Android: Improve UI scaling on smaller high-density displays
2018-11-18 11:31:19 +01:00
thoughtjigs 3d516079eb Provide Xorg/net wm process ID (#7445)
Adding support for _NET_WM_PID as defined in Extended Window Manager Hints
Move verbose messaging to setupXorgTopLevelWindow method as Xorg messages should only occur when running in Xorg env.
Irrlicht returns the XDisplay as a void* and XWindow as an unsigned long so reinterpret those as the appropriate type. Also fixed a spaces for tab formating issue
2018-06-17 10:41:07 +02:00
nOOb3167 376ed5cd3c Sound: fix static initialization order dependency by not having one (#7168)
Ensure singleton is reset
2018-03-29 21:43:57 +02:00
nOOb3167 9293d8e271 Global initialization of sound using SoundManagerGlobal (#7063)
* Global initialization of sound using SoundManagerGlobal
2018-03-23 15:31:43 +01:00
stujones11 22a891a925
Android build fixes for c++11 2018-03-11 16:56:27 +01:00
Vitaliy 20a85d76d9 Move files to subdirectories (#6599)
* Move files around
2017-11-08 23:56:20 +01:00
Loïc Blot c7160cb629 Network cleanup (#6302)
* Cleanup network headers

* Move peerhandler to a specific header to reduce compilation times
* Move socket.cpp/h to network folder

* More work

* Network code cleanups

* Move socket.{cpp,h} to network folder
* Move Address object to network/address.{cpp,h}
* Move network exceptions to network/networkexceptions.h
* Client: use unique_ptr for Connection
* Server/ClientIface: use shared_ptr for Connection

* Format fixes

* Remove socket.cpp socket.h from clang-format whitelist

* Also fix NetworkPacket code style & make it under clang-format
2017-08-24 08:28:54 +02:00
Loïc Blot fd3afbced5 Optimize headers (part 2) (#6272)
* Optimize headers (part 2)

* less debug.h in headers
* less remoteplayer.h for everybody

* Cleanup (part 2)

* camera.h: mesh.h
* mapgen.h: mapnode.h
* serverenvironment.h: mapblock.h
* nodedef.h: shader.h
2017-08-18 19:25:07 +02:00
Loïc Blot 9dd0f952e0 Modernize client code (#6250)
* Various code style fixes
* Use range based for loops
* Use empty instead of empty objects
* Use C++11 default keyword for trivial constructors and destructors
* Drop some useless casts
* Use emplace_back instead of push_back to improve performance of some vectors push
2017-08-15 20:30:30 +02:00
Ben Deutsch 9ef9c72e5a Remove cloud_height setting
With the cloud API, the cloud_height setting has become obsolete
and replaceable by a mod. It, and supporting code, can be
removed.
2017-08-12 19:37:53 +01:00
Juozas 837328fbac Fix error not printed to console when no name is provided
When minetest is launched, if there was no nameprovided in
configuration or parameters, the game would not show any error in
console. if the --go parameter was also prowided, the game would
exit without an error. This is undesired behavior, so this merged
commit add the missing function that displays the missing error
message in console.
2017-08-09 02:04:06 +01:00
Ben Deutsch 6bedb6de40 Fog effect when camera is inside cloud
Fixes issue #3576

* Clouds now take camera position as 3D, not 2D

* Cloud grid filling extracted to gridFilled method

* Clouds detect whether camera is inside cloud

* Camera in cloud changes fog by overriding sky colors
  with cloud color

* Sun, moon and stars can be temporarily disabled
  with setBodiesVisible

* Disabling fog also disables all "inside cloud" behaviors
2017-07-05 15:39:49 +02:00
Loïc Blot b3a36f7378 Isolate irrlicht references and use a singleton (#6041)
* Add Device3D class which will contain IrrlichtDevice interface

move getSupportedVideoDrivers to Device3D

Add Device3D singleton & use it in various places

Rename Device3D to Rendering engine & add helper functions to various device pointers

More singleton work

RenderingEngine owns draw_load_screen

move draw functions to RenderingEngine

Reduce IrrlichtDevice exposure and guienvironment

RenderingEngine: Expose get_timer_time() to remove device from guiEngine

Make irrlichtdevice & scene manager less exposed

* Code style fixes

* Move porting::getVideoDriverName, getVideoDriverFriendlyName, getDisplayDensity, getDisplaySize to RenderingEngine

Fix XORG_USED macro -> RenderingEngine + create_engine_device from RenderingEngine constructor directly

* enum paralax => enum parallax
2017-06-26 20:11:17 +02:00
Vincent Glize af3badf7a9 C++11 cleanup on constructors dir client (#6012)
* C++11 cleanup on constructors dir client
2017-06-21 08:04:45 +02:00
Loïc Blot 8f7785771b Cpp11 initializers 2 (#5999)
* C++11 patchset 10: continue cleanup on constructors

* Drop obsolete bool MainMenuData::enable_public (setting is called with cURL in server loop)

* More classes cleanup

* More classes cleanup + change NULL tests to boolean tests
2017-06-17 19:11:28 +02:00
QrchackOfficial 5cc8ad946e Remove superfluous pointer null checks 2017-06-10 21:04:47 -04:00
Loïc Blot d4c0f91275 Use C++11 mutexes only (remove compat code) (#5922)
* Fix event LINT & remove default constructor/destructors
* remove compat code & modernize autolock header
2017-06-06 16:29:28 +02:00
Vincent Glize dd0a058e1f Snake case for screen options in minetest.conf (#5792) 2017-06-03 22:02:07 +02:00
Loïc Blot 9b8ca3a746 Move KeyList & InputHandler from game.h to client/inputhandler.h (#5752)
* Move KeyList & InputHandler from game.h to client/inputhandler.h

We have a header for inputs, move inputhandler class & related keylist object to it

Also introduce a cpp file for MyEventReceiver::OnEvent function in inputhandler.h because a so huge function doesn't needs to be inlined

* Pass clang-format on inputhandler.{cpp,h} (compatible)
2017-05-13 11:05:16 +02:00
ShadowNinja b662a4577d Clean up getTime helpers
This increases size of the getTime return values to 64 bits.
It also removes the TimeGetter classes since the getTime functions
are now very precise.
2017-04-28 14:43:18 -04:00
rubenwardy bce0d458d8 Add Joystick type detection and Xbox controller support
* Add joystick type detection (with joystick_type setting to override it)
* Fix multiple joysticks from interfering with each other by only reading from one (add joystick_id setting)
* Add support for Xbox controllers
2017-04-06 20:58:52 -07:00