Commit Graph

94 Commits (master)

Author SHA1 Message Date
Brandon b41251ac77 Merge remote-tracking branch 'minetest/master' 2017-07-01 12:11:57 -05:00
Brandon a2d83f3128 Merge remote-tracking branch 'minetest/master' 2017-07-01 11:54:00 -05: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
Loïc Blot 76be103a91 C++11 patchset 9: move hardcoded init parameters to class definitions (part 1) (#5984)
* C++11 patchset 9: move hardcoded init parameters to class definitions

C++11 introduced the possibility to define the default values directly in class definitions, do it on current code

Also remove some unused attributes

* CollisionInfo::bouncy
* collisionMoveResult::collides_xy
* collisionMoveResult::standing_on_unloaded
* Clouds::speed

* More constructor cleanups + some variables removal

* remove only write guiFormSpecMenu::m_old_tooltip
* move header included inside defintions in genericobject.h
* remove some unused since years exception classes
* remove unused & empty debug_stacks_init
* remove unused & empty content_nodemeta_serialize_legacy
* remove forgotten useless bool (bouncy) in collision.cpp code
2017-06-16 11:25:52 +02:00
QrchackOfficial 5cc8ad946e Remove superfluous pointer null checks 2017-06-10 21:04:47 -04:00
Loïc Blot a98baef5e4 C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821) 2017-06-04 21:00:04 +02:00
SmallJoker 7a2b9df970 Tooltips: Unify the tooltip[] and list[] description tooltip display functions (#5848)
* Tooltips: Unify the tooltip[] and list[] description tooltip display functions
2017-06-03 08:55:26 +02:00
Brandon 811c22d1d6 Merge remote-tracking branch 'minetest/master' 2017-05-29 20:02:46 -05:00
SmallJoker d99b6fed55 Time: Change old `u32` timestamps to 64-bit (#5818)
MacOSX build fix + cleanups
2017-05-26 14:03:36 +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
Loïc Blot a7e131f53e Fix various points reported by cppcheck (#5656)
* Fix various performance issues reported by cppcheck + code style (CI)

* Make CI happy with code style on master
* guiFileSelectMenu: remove useless includes
* some performance fixes pointed by cppcheck
* remove some useless casts
* TextDest: remove unused setFormSpec function

* Fix various iterator post-increment reported by cppcheck
2017-04-25 10:21:42 +02:00
Brandon 3ee16f7ffa Merge remote-tracking branch 'minetest/master' 2017-04-22 12:56:49 -05:00
Loic Blot 3e71c8f482
Fixing warning pointed by @sfan5 and clang and cleanup guiFileSelectMenu
* Also pass clang-format on guiFileSelectMenu.h and remove it from whitelist
2017-04-22 00:51:56 +02:00
Loïc Blot dc0e9097d3 Fix various performance issues reported by cppcheck + code style (CI) (#5635)
* Make CI happy with code style on master
* guiFileSelectMenu: remove useless includes
* some performance fixes pointed by cppcheck
* remove some useless casts
* TextDest: remove unused setFormSpec function
2017-04-21 23:40:48 +02:00
Loïc Blot 370354cc87 Fix various performance issues reported by cppcheck (#5628)
* Also remove 1 non declared but defined functions
2017-04-21 10:06:08 +02:00
Loïc Blot f98bbe193e Fix various copy instead of const ref reported by cppcheck (part 3) (#5616)
* Also remove 2 non declared but defined functions
* Make some functions around const ref changes const
2017-04-20 00:12:52 +02:00
Loïc Blot 3c4ac70348 Refactor Game class (part 2) (#5422)
* showPauseMenu is now part of game
* remove many flags parameters passed to game functions, use the member.
* rename VolatileRunFlags to GameUIFlags (this will permit to share structure with client and CSM
* updatePointedThing: remove pointer ref, we already have the pointer in rundata
* move some attributes outside of VolatileRunFlags after renaming, to game class
* rename statustext to m_statustext
* make some const variables static
* All those changes permit to reduce a little bit function class cost and will permit to interface CSM with some interesting Game flags
* Expose GameUIFlags to client
* Client now have GameUIFlags parameter and setters for other classes
* Fix minimap show/hide in Lua because we now have access to the real flag
2017-03-19 13:18:52 +01:00
red-001 c42c53fccf [CSM] Add local formspecs. (#5094) 2017-03-13 23:56:05 +01:00
adelcoding1 6de83a2756 FormSpec: Add position and anchor elements (#5284) 2017-03-04 10:46:55 +01:00
Brandon 8ce248b281 Merge remote-tracking branch 'minetest/master'
Conflicts:
	src/defaultsettings.cpp
	src/environment.cpp
	src/game.cpp
	src/itemdef.cpp
	src/map.cpp
	src/server.h
2017-02-11 21:10:04 -06:00
Loic Blot 430d3b28e4 Cleanup some header inclusions to improve compilation times 2017-01-11 15:53:56 +01:00
Ner'zhul 8e7449e092 Environment & IGameDef code refactoring (#4985)
* Environment code refactoring
* Cleanup includes & class declarations in client & server environment to improve build speed
* ServerEnvironment::m_gamedef is now a pointer to Server instead of IGameDef, permitting to cleanup many casts.
* Cleanup IGameDef
  * Move ITextureSource* IGameDef::getTextureSource() to Client only.
  * Also move ITextureSource *IGameDef::tsrc() helper
  * drop getShaderSource, getSceneManager, getSoundManager & getCamera abstract call
  * drop unused emerge() call
  * cleanup server unused functions (mentionned before)
* Drop one unused parameter from ContentFeatures::updateTextures
* move checkLocalPrivilege to Client
* Remove some unnecessary casts
* create_formspec_menu: remove IWritableTextureSource pointer, as client already knows it
* Fix some comments
* Change required IGameDef to Server/Client pointers
* Previous change that game.cpp sometimes calls functions with Client + InventoryManager + IGameDef in same functions but it's the same objects
* Remove duplicate Client pointer in GUIFormSpecMenu::GUIFormSpecMenu
* drop ClientMap::sectorWasDrawn which is unused
2017-01-09 20:39:22 +01:00
Brandon 4cb44572a5 Merge remote-tracking branch 'minetest/master'
Conflicts:
	doc/lua_api.txt
	src/client.h
	src/content_sao.cpp
	src/environment.cpp
	src/environment.h
	src/keycode.cpp
	src/map.cpp
	src/network/clientpackethandler.cpp
	src/particles.cpp
	src/particles.h
	src/script/lua_api/l_particles.cpp
	src/server.cpp
	src/server.h
	src/serverobject.cpp
	src/serverobject.h
	src/threading/thread.h
2016-10-29 15:09:28 -05:00
rubenwardy 067766eec2 Fix backwards compatibility issue introduced by close_on_enter 2016-10-08 18:58:28 +02:00
Loic Blot 155288ee98 use unordered containers where possible (patch 4 on X)
Also remove some unused parameters/functions
2016-10-06 22:37:26 +02:00
rubenwardy 077b6cfa21 Formspec: Add container[] and container_end[] elements 2016-10-03 01:53:13 +01:00
Brandon f440ae1b2c Merge remote-tracking branch 'minetest/master'
Conflicts:
	src/guiKeyChangeMenu.cpp
2016-08-30 16:33:41 -05:00
rubenwardy 78ff5c1936 Fix background formspec elements from interfering with each other
Fixes #4397
2016-08-29 01:15:31 +01:00
rubenwardy e10fee0001 Allow fields to choose whether they close on enter press 2016-08-27 13:05:01 +01:00
rubenwardy 4330c63ea4 Submit name of field on enter key press 2016-08-27 13:02:45 +01:00
Brandon 55925444eb Merge remote-tracking branch 'minetest/master'
Conflicts:
	src/environment.cpp
	src/game.cpp
	src/guiFormSpecMenu.h
	src/mapgen.h
2016-07-08 19:14:22 -05:00
Brandon 3c64860b41 Merge remote-tracking branch 'minetest/master'
Conflicts:
	src/CMakeLists.txt
	src/game.cpp
	src/script/lua_api/l_util.h
2016-06-03 13:22:39 -05:00
est31 2060fd9cbe Initial Gamepad support
Adds initial ingame gamepad support to minetest.

Full Formspec support is not implemented yet and
can be added by a later change.
2016-06-03 19:42:57 +02:00
Ekdohibs 14ef2b445a Add colored text (not only colored chat).
Add documentation, move files to a proper place and avoid memory leaks.
Make it work with most kind of texts, and allow backgrounds too.
2016-05-31 17:34:29 +02:00
Brandon ff154d490a Merge remote-tracking branch 'minetest/master' 2016-05-20 21:51:46 -05:00
Ekdohibs 4d9dbceb39 Run unescape_enriched *after* unescape_string.
Doing it the other way round was a mistake, since it breaks
minetest.formspec_escape with escape sequences that contain
special characters.
2016-05-07 08:33:21 +02:00
Ekdohibs d5c3db9c41 Make dropdowns show the string that was their argument.
This makes it work even if it contains escape sequences,
which didn't work before.
2016-05-07 08:33:21 +02:00
Brandon 2b8a3729c0 Merge remote-tracking branch 'minetest/master'
Conflicts:
	builtin/game/misc.lua
	builtin/settingtypes.txt
	doc/lua_api.txt
	minetest.conf.example
	src/client.cpp
	src/defaultsettings.cpp
	src/environment.cpp
	src/guiFormSpecMenu.cpp
	src/guiFormSpecMenu.h
	src/hud.cpp
	src/hud.h
	src/itemdef.cpp
	src/pathfinder.cpp
	src/script/lua_api/l_util.cpp
	src/server.h
	src/wieldmesh.cpp
	src/wieldmesh.h
2016-05-04 22:29:15 -05:00
Ekdohibs 48939df9a5 Escape more strings: formspecs, item descriptions, infotexts...
Also, change the escape character to the more standard \x1b
Thus, it can be used in the future for translation or colored text,
for example.
2016-04-24 03:54:11 +10:00
RealBadAngel 5ca48a35a6 Formspec: recreate item_image_button pressed state for its image and label 2016-02-13 02:35:52 +01:00
est31 bd43933828 Remove unused 'm_selection_active' field
Thanks @ExcaliburZero for noticing. Fixes #3698.
2016-02-13 01:46:12 +01:00
RealBadAngel baa7c8f8ad FormSpec: Add StaticTextSpec and superimpose over item image buttons 2016-02-09 03:03:55 -05:00
RealBadAngel 6cd2b3b445 Use meshes to display inventory items 2016-02-07 19:51:55 +01:00
RealBadAngel 3c4c7f777e Use meshes to display inventory items 2016-02-01 02:48:25 +01:00
est31 c977fbd928 Add list-rings
Adds list-rings, a method to implement item sending between inventories via shift-click.
Nice insider feature: a ring consisting of a single inventory list serves as nice clean-up method.
Also adds them to minimal game, and the standard inventory.
Craft output slots are not supported.
2015-06-16 14:51:26 +02:00
Ilya Zhuravlev b6387b4e0f Use utf-8 in formspecs 2015-06-13 19:49:55 +02:00
kwolekr da34a2b33e Replace instances of std::map<std::string, std::string> with StringMap
Also, clean up surrounding code style
Replace by-value parameter passing with const refs when possible
Fix post-increment of iterators
2015-05-19 16:10:49 -04:00
Craig Robbins de6d5ce2cd Disable double-click -> ESC translation for main menu 2015-03-14 23:41:42 +10:00
ngosang dd2bb950be Fix Exit to OS button focus in Pause Menu 2015-02-10 21:23:16 +10:00
Loic Blot a704c04f00 Network Layer 7 rework (Packet handling)
* Move networkcode to a dedicated directory
* Rename clientserver.h to network/networkprotocol.h (Better name) and sanitize some includes
* Create object NetworkPacket
  * It stores command (opcode) and data separated
  * It also stores peer_id
  * Data reading can be done by using a streaming interface
* Change packet routing analysis
  * Remove old conditional analysis
  * Now uses function pointed analysis and add connection state ({Client,Server}::handlers)
  * Connection state permit to categorize condition to handle before analyze packets
  * Create a handler for depreciated messages, instead of duplicating code
2015-02-10 20:04:08 +10:00