summaryrefslogtreecommitdiff
path: root/src/game.cpp
Commit message (Collapse)AuthorAge
* Fix more GCC 8.1 warnings ↵Loïc Blot2018-05-28
| | | | | | | | | |   1   master  Fix 3 warnings reported by GCC 8.1 of the following type ```src/client/gameui.cpp:191:43: warning: « void* memset(void*, int, size_t) » effacement d'un objet du type non trivial « struct GameUI::Flags »; use assignment or value-initialization instead [-Wclass-memaccess] memset(&m_flags, 0, sizeof(GameUI::Flags)); ```
* Camera: Improve subpixel movement (#7319)SmallJoker2018-05-12
|
* Fix invisible chat error messages (#7289)Vincent Glize2018-05-01
|
* [clang-tidy] Promote some performance-* as a coding error (#7194)Loïc Blot2018-04-04
| | | | | | | * Promote performance-type-promotion-in-math-fn as a coding error * Promote performance-faster-string-find too (which is not problematic currently) * Same for performance-implicit-cast-in-loop * Fix remaining tidy points
* Fix last performance-type-promotion-in-math-fn problemsLoic Blot2018-04-04
|
* Client eventmanager refactor (#7179)Loïc Blot2018-03-30
| | | | | | | | | | | | | | | | | | | | | * Drop EventManager from GameDef & do some client cleanups * EventManager is only used by Client. Don't expose it on Server & GameDef for nothing * Drop Client::event() in favor of direct calls to getEventManager * Cleanup some event put from new + put to put(new) * MtEvent: add Type(u8) enum * This will enhance event performance & ensure stricter type * Drop MtEvent::checkIs (unused) * clang-tidy reported fixes * Code style * Move event_manager.h to the client directory as it's only used by client Add EventManager unittests + switch to unordered_map as order is not important here Drop a unused function
* Add formspec theming using prepended stringsAndrew Ward2018-03-28
|
* Cleanup sound manager class (#7158)Loïc Blot2018-03-24
| | | | | | | | | | * Cleanup sound manager client * Use some const refs * Use auto on iterators * Drop unused parameters * Move sound_openal.* to client folder * Move sound.cpp + OnDemandSoundFetcher to client/ folder + reorganize includes properly
* Global initialization of sound using SoundManagerGlobal (#7063)nOOb31672018-03-23
| | | | * Global initialization of sound using SoundManagerGlobal
* Android build fixes for c++11stujones112018-03-11
|
* Node definition manager refactor (#7016)Dániel Juhász2018-02-10
| | | | | | | | | * Rename IWritableNodeDefManager to NodeDefManager * Make INodeDefManager functions const * Use "const *NodeDefManager" instead of "*INodeDefManager" * Remove unused INodeDefManager class * Merge NodeDefManager and CNodeDefManager * Document NodeDefManager
* Switch F3 to use 'enable_fog' settingThomasMonroe3142018-02-08
|
* [CSM] HUD Fix not updating server HUDs caused by 4f688d5SmallJoker2018-01-26
|
* Fix issues with earlier CSM HUD commit (#6940)red-0012018-01-26
| | | The CSM HUD PR caused some strange behavior including aborts due to parts of it using some slightly hacky code, the event refactor changing how events are processed and a minor oversight.
* Game refactor [4/X]: keycache is now owned by InputHandlerLoic Blot2018-01-20
| | | | | | * Make InputHandler own the key cache * Add a helper function InputHandler::cancelPressed to avoid multiple similar calls in game.cpp * Move RandomInputHandler::step definition into cpp file
* Game refactor [3/X]: Move keycache to inputhandlerLoic Blot2018-01-20
|
* Game refactor [2/X]: Various moves (profilergraph, nodePlacementPrediction, ↵Loic Blot2018-01-20
| | | | | | | | create_formspec_menu) * Move profilergraph to dedicated files * Move nodePlacementPrediction to Game class * Rename create_formspec_menu to GUIFormSpecMenu::create
* Game/Input refactor [1/X]: make RealInputHandler handle joystick inputs with ↵Loic Blot2018-01-20
| | | | | | | standard input Joystick input is a RealInputHandler only usage, make it intelligent and handle the joystick with keyboard direct. This permits to remove many getters in game which should be owned by RealInputHandler
* Add confirmation on new player registration (#6849)Muhammad Rifqi Priyo Susanto2018-01-13
| | | | | | | | | | | | | | * Attempt to add registration confirmation Using SRP auth mechanism, if server sent AUTH_MECHANISM_FIRST_SRP that means the player isn't exist. Also tell player about the server and chosen username. Local game has localhost as IP address of the server. Add RenderingEngine::draw_menu_scene() to draw GUI and clouds background. aborted -> connection_aborted * Rewrite information message text Client::promptConfirmRegister() -> Client::promptConfirmRegistration()
* Don't recalculate statustext initial color everytime & review fixesLoic Blot2018-01-05
|
* GameUI refactor (part 7/7): Finish to include profiler things to GameUILoic Blot2018-01-05
| | | | | | | | | Other changes: * Add GameUI clarification comment * Move force_fog_off & disable_camera_update flags from GameUI to Game, it's not UI related * Properly init GameUI::Flags * Move toggleChat toggleHud & toggleProfiler to GameUI * Add gameui.cpp to LINT whitelist
* GameUI refactor (part 6/X): Move Game::guitext_profiler & ↵Loic Blot2018-01-05
| | | | | | | showStatusTextSimple to GameUI class Other enhancements: * Move showStatusTextSimple to GameUI class & rename to showTranslatedStatusText
* GameUI refactor (part 5/X): Move Game::guitext_chat to GameUI classLoic Blot2018-01-05
| | | | | | Other enhancements: * Move update_profiler_gui to Game class * Move updateChat to Game class
* GameUI refactor (part 4/X): Move Game::guitext_status, Game::m_statustext, ↵Loic Blot2018-01-05
| | | | | | | | GameRunData::statustext_time to GameUI class Other enhancements: * Simplify setStatusText to showStatusText, as it shows the label too (preventing almost every setStatusText to call setStatusTextTime(0) * Add unittests
* GameUI refactor (part 3/X): Move Game::guitext2, Game::guitext_info, ↵Loic Blot2018-01-05
| | | | | | | | Game::infotext to GameUI class Other enhancements: * Drop unused GameRunData::time_of_day * Little GameUI::update code path optimizations
* GameUI refactor (part 2/X): Move Game::guitext to GameUI + enhancements on ↵Loic Blot2018-01-05
| | | | | | | StaticText Other enhancements: * C++ friendlyness for addStaticText() -> move to static StaticText::add()
* GameUI refactor (part 1/X): GameUI object creation + GameUIFlags move to GameUILoic Blot2018-01-05
| | | | | | | | | | Game class is too huge and has too specialization on various subjects, like UI, formspecs, client, renderer. Start to move UI related things to GameUI object and cleanup them Other improvements: * updateChat: more performance on error messages by remove string copies * Initialize all game class members in definition instead of constructor (with nullptr instead of NULL) * Drop unused Client::show{GameChat,GameHud,Profiler,GameFog} * Add GameUI unittests
* Add check to pause game on lost window focusrubenwardy2017-12-26
|
* Zoom: Add 'disabled by game or mod' messageparamat2017-12-14
|
* Minimap messages: Improve 'disabled by server' messageparamat2017-12-14
|
* CSM fixes: load mods after flavours & add flavour to block mod loading (#6738)Loïc Blot2017-12-11
| | | | | | | | | | | | | | * CSM fixes: load mods after flavours & add flavour to block mod loading * Don't permit to load mods twice * Prepare builtin integrity global algorithm * Add missing doc & use a nicer byteflag for LOAD_CLIENT_MODS flavour * flag typo fix * Invert CSM_FL_LOOKUP_NODES & CSM_FL_LOAD_CLIENT_MODS ids
* F5 debug info: Add colons, use lowercase except for FPS and RTTThomasMonroe3142017-12-10
|
* F5 Debug info: More compact, return to 2 linesparamat2017-11-27
| | | | All data fits on width 960, most useful data still visible on width 800.
* Move files to subdirectories (#6599)Vitaliy2017-11-08
| | | | * Move files around
* Rewrite rendering engine (#6253)Vitaliy2017-10-31
| | | | | | | | | | | | * Clean draw_*() arguments * Split rendering core * Add anaglyph 3D * Interlaced 3D * Drop obsolete methods
* Allow overriding tool capabilities through itemstack metadataraymoo2017-10-29
| | | | | This makes it possible to modify the tool capabilities of individual itemstacks by calling a method on itemstack metadata references.
* don't pass g_settings around, and use it directlyEsteban I. RM2017-10-17
|
* Implement #6096Esteban I. RM2017-10-17
|
* [CSM] Add callback on open inventory (#5793)Vincent Glize2017-10-02
|
* game.cpp: remove dead code for proto v25 compat (#6481)Loïc Blot2017-09-30
| | | Protocol v25 is not supported anymore
* Server: affect bind_addr on constructor instead of start() (#6474)Loïc Blot2017-09-28
| | | bind_addr is already ready when using constructor as we read is.IPv6 from it, instead pass the whole address
* Add mute setting (toggled by the mute key and in the volume menu) (#6415)DTA72017-09-26
| | | | * Add mute setting (toggled by the mute key and in the volume menu)
* Implement client node dig predictionAuke Kok2017-09-11
| | | | | | | | Dig prediction allows clients to remove dug nodes without waiting for server acknowledgement. This patch allows mods to override dig prediction, it can either be turned off or a different "prediction node" can be selected.
* Fix incorrect buffer size calculation on creation of HUD status messagesrubenwardy2017-09-10
| | | | Fixes #6400
* Particles: Do not add digging particles for airlike nodes (#6392)SmallJoker2017-09-08
|
* Make HUD status messages translatable (#5795)Wuzzy2017-09-05
| | | | | | * Make HUD status messages translatable * Make strings in showStatusTextSimple translatable
* Remove DSTACK support (#6346)Loïc Blot2017-08-30
| | | Debugstacks is not useful, we don't really use it, the DebugStack is not pertinent, gdb and lldb are better if we really want to debug.
* Formspec: Add options to set background color and opacity (fullscreen mode + ↵Loïc Blot2017-08-29
| | | | | | | | | | | | default mode) (#5493) * Formspec: Add options to set background color and opacity (fullscreen mode) * Enhance previous comment: Set formspec background when regenerate UI. * This permit to do the calcul only at regen and override it with bgcolor tag * Add a setting for default background color into formspec, separated from fullscreen * Add a little performance gain on formspecs using a const ref instead of copying formspec string
* Clientevent refactor (#6320)Loïc Blot2017-08-28
| | | | | | | | | | * Refactor clientevent structure * Move structure outside of client header * Create client events on heap not stack, this remove the ClientEvent object copy * Use clientEventHandler to route events
* Check item_drop amount clientside (#6242)rubenwardy2017-08-26
|