summaryrefslogtreecommitdiff
path: root/src/client
Commit message (Collapse)AuthorAge
* Optimize headers (part 2) (#6272)Loïc Blot2017-08-18
| | | | | | | | | | | | | | * 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
* C++ modernize: Pragma once (#6264)Loïc Blot2017-08-17
| | | | * Migrate cpp headers to pragma once
* Cleanup various headers to reduce compilation times (#6255)Loïc Blot2017-08-16
| | | | * Cleanup various headers to reduce compilation times
* Modernize client code (#6250)Loïc Blot2017-08-15
| | | | | | | | * 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
* Remove cloud_height settingBen Deutsch2017-08-12
| | | | | | With the cloud API, the cloud_height setting has become obsolete and replaceable by a mod. It, and supporting code, can be removed.
* Fix error not printed to console when no name is providedJuozas2017-08-09
| | | | | | | | 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.
* Fix crash when using --go in command lineJuozas Pocius2017-08-03
|
* Make direct item selection keys freely bindableWuzzy2017-07-30
|
* TileLayer: use shared_ptr for FrameSpec vector (#6171)Loïc Blot2017-07-26
| | | | | | | | | | | | * TileLayer: use shared_ptr for vector framespec This reduce memory copy of TileLayer from (4 to 16) * FrameSpec where FrameSpec = (sizeof(int) + 3 * sizeof(ptr)) to int + sizeof(ptr) Callgrind difference Before: https://lut.im/RGkiJqQb8T/LeQIEXpAuRzfl7gd.png After: https://lut.im/bcqmwee1xu/cTwtptY5tRuS9lp0.png * Fix one push_back to use vector::emplace_back & optimize inclusions
* Fog effect when camera is inside cloudBen Deutsch2017-07-05
| | | | | | | | | | | | | | | | | | 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
* Irrlicht cleanup: cleanup various object to use RenderingEngine (#6088)Loïc Blot2017-07-02
| | | | | | | | | | | * Irrlicht cleanup: cleanup various object to use RenderingEngine * CAO doesn't need scenemanager in addToScene * Camera doesn't need VideoDriver pointer or SceneManager in constructor * Hud doesn't need driver & scene manager in constructor * Hud doesn't need scenemanager pointer * Tile.h doesn't need IrrlichtDevice header (just SMaterial) * WieldMeshSceneNode: only take scene, we always use scene root node as parent
* Tile material: Add 'TILE_MATERIAL_OPAQUE', use for drawtype 'NDT_NORMAL'stujones112017-07-01
| | | | | Prevents normal drawtype nodes having transparency. Avoids clients cheating by using 'x-ray' texture packs with transparent textures.
* Isolate irrlicht references and use a singleton (#6041)Loïc Blot2017-06-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* C++11 cleanup on constructors dir client (#6012)Vincent Glize2017-06-21
| | | | * C++11 cleanup on constructors dir client
* Cpp11 initializers 2 (#5999)Loïc Blot2017-06-17
| | | | | | | | | | * 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
* Remove threads.h and replace its definitions with their C++11 equivalents ↵ShadowNinja2017-06-11
| | | | | | (#5957) This also changes threadProc's signature, since C++11 supports arbitrary thread function signatures.
* Remove superfluous pointer null checksQrchackOfficial2017-06-10
|
* Autorun: Change to 'autoforward' (#5926)Paramat2017-06-08
| | | | | Minetest does not have 'run'. Automatic forwards is very often used while flying or swimming, so a general word is more suitable.
* Use C++11 mutexes only (remove compat code) (#5922)Loïc Blot2017-06-06
| | | | * Fix event LINT & remove default constructor/destructors * remove compat code & modernize autolock header
* C++11 patchset 2: remove util/cpp11.h and util/cpp11_container.h (#5821)Loïc Blot2017-06-04
|
* Snake case for screen options in minetest.conf (#5792)Vincent Glize2017-06-03
|
* Do not create dummy normalmaps (#4180)you2017-05-19
| | | fixes #1811
* Move KeyList & InputHandler from game.h to client/inputhandler.h (#5752)Loïc Blot2017-05-13
| | | | | | | | | | * 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)
* Add configurable key bindings for hotbar scrolling, and for changing volume.Wuzzy2017-05-06
|
* Reorder TileLayer. (#5638)Auke Kok2017-04-29
| | | | | | | | | | | | | | Despite the split of TileSpec into TileDef and TileLayer, the TileLayer struct is still 66 bytes large, and doesn't fit in a single cacheline. I'm moving the color member to cacheline 2, in the hope that it is less used and the compiler loads all the hot members in a single cacheline instead. Only color sits now in cacheline 2, all the other members are in cacheline 1. Note: is_color is probably rarely set, most nodes will likely not use hardware coloring, but this may change in the future. Ideally, this class is shrunk to 64 bytes.
* Clean up getTime helpersShadowNinja2017-04-28
| | | | | | 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.
* Soft node overlay (#5186)Dániel Juhász2017-04-21
| | | | This commit adds node overlays, which are tiles that are drawn on top of other tiles.
* Fix various copy instead of const ref reported by cppcheck (part 3) (#5616)Loïc Blot2017-04-20
| | | | * Also remove 2 non declared but defined functions * Make some functions around const ref changes const
* Reorder TileSpec. (#5591)Auke Kok2017-04-18
| | | | Put accessed members that are needed by updateFastFaceRow() all in the same cacheline.
* Fix always using the xbox layout (reported by coverity).Ekdohibs2017-04-18
|
* Remove an unused variable in Android BuildLoic Blot2017-04-17
|
* Android progressbar fix (#5601)Loïc Blot2017-04-16
| | | | | | | | | | | | | | | | | * Fix progressbar for Android Fixes #5599 Fixed #5403 * draw_load_screen: use texturesource this permits to unify texture loading code * scale progress bar * Add gl version check for GL_OES_texture_npot. This fixed the texture on loading screen * Remove two sanity checks pointed by @celeron55 * sfan5 comments + android ratio fixes
* Hardware coloring for itemstacksDániel Juhász2017-04-08
| | | | | | | | | | Adds the possibility to colorize item stacks based on their metadata. In the item/node definition you can specify palette (an image file) and color (fallback color if the item has no palette or metadata). Then you can add palette_index to the metadata. Dropped itemstacks with different colors do not merge.
* Fix signed/unsigned conversion warningrubenwardy2017-04-07
| | | | | There was no bug here (as I checked for negativeness), however it's good to get rid of warnings.
* Add Joystick type detection and Xbox controller supportrubenwardy2017-04-06
| | | | | | * 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
* LINT: Switch whitelist check from egrep to awkLoïc Blot2017-04-06
| | | | Bonus: make CI happy with the last rules fix
* Clang-format: trivial fix on some headers (#5495)Loïc Blot2017-04-01
| | | Fix some headers style and remove them from whitelist
* Windows: Set window icon (#5486)adrido2017-03-30
|
* Change command prefix to "." and add "help" command.red-0012017-03-26
|
* Tile.cpp: Fix MSVC build broken by 072bbbaSmallJoker2017-03-24
|
* Some performance optimizations (#5424)Loïc Blot2017-03-22
| | | | | | | | | | | | | | | | | | | * Some performance optimizations This is globally removing some memory useless copy * use a const ref return on std::string Settings::get to prevent data copy on getters which doesn't need to copy it * pass some stack created strings to static const as they are not modified anywhere * Camera: return nametags per const ref instead of a list pointer, we only need to read it * INodeDefManager: getAll should be a result ref writer instead of a return copy * INodeDefManager: getAlias should return a const std::string ref * Minimap: unroll a Scolor creation in blitMinimapPixersToImageRadar to prvent many variable construct/destruct which are unneeded (we rewrite the content in the loop) * CNodeDefManager::updateAliases: prevent a idef getall copy * Profiler: constness * rollback_interface: create real_name later, and use const ref * MapBlockMesh updateFastFaceRow: unroll TileSpec next_tile, which has a cost of 1.8% CPU due to variable allocation/destruction, * MapBlockMesh updateFastFaceRow: copy next_tile to tile only if it's a different tilespec * MapBlockMesh updateFastFaceRow: use memcpy to copy next_lights to lights to do it in a single cpu operation
* Fix a small regression caused by e2ad76f.red-0012017-02-16
|
* No longer auto-generate a 'guest####' player name when name is emptyred-0012017-02-09
| | | | | You can't join most servers with a 'guest####' player name anyway so it's only logical to remove them.
* Prevent SIGFPE on entity tile loading issue. (#5178)Auke Kok2017-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | While experimenting with entities I ran into this unresolvable error where the server is sending some texture that the client crashes on. The crash prevents the client from ever reconnecting, resulting in a server that has to use clearobjects. We shouldn't crash but just ignore the object and move on. ``` 0x00000000004dc0de in TextureSource::generateImagePart (this=this@entry=0x7118eb0, part_of_name="[applyfiltersformesh", baseimg=@0x7fffffffbe98: 0x9f1b010) at /home/sofar/git/minetest/src/client/tile.cpp:1744 1744 u32 xscale = scaleto / dim.Width; (gdb) bt #0 0x00000000004dc0de in TextureSource::generateImagePart (this=this@entry=0x7118eb0, part_of_name="[applyfiltersformesh", baseimg=@0x7fffffffbe98: 0x9f1b010) at /home/sofar/git/minetest/src/client/tile.cpp:1744 ``` After reconnecting, the client now can connect without issues and displays an error message: ``` ERROR[Main]: generateImagePart(): Illegal 0 dimension for part_of_name="[applyfiltersformesh", cancelling. ERROR[Main]: generateImage(): Failed to generate "[applyfiltersformesh" ERROR[Main]: Irrlicht: Invalid size of image for OpenGL Texture. ```
* Add multiply texture modifiersapier2017-01-30
| | | | Allows colorizing of textures using a color multiplication method.
* Add hardware node coloring. Includes:Dániel Juhász2017-01-23
| | | | | | - Increase ContentFeatures serialization version - Color property and palettes for nodes - paramtype2 = "color", "colored facedir" or "colored wallmounted"
* Added "[sheet" to the texture special commands.Luke Puchner-Hardman2017-01-02
| | | | | | | | "[sheet:WxH:X,Y" assumes the base image is a tilesheet with W*H tiles on it and crops to the tile at position X,Y. Basically it works like "[verticalframe" but in 2D. For testing, I combined the four default_chest images into one.
* Move TileAnimation code to seperate filesfan52017-01-02
|
* Irrlicht 1.9 supportsfan52016-12-26
|
* Add an [invert:<mode> texture modifierThomas--S2016-09-15
| | | | | | Inverts the given channels of the base image. Mode may contain the characters "r", "g", "b", "a". Only the channels that are mentioned in the mode string will be inverted.