summaryrefslogtreecommitdiff
path: root/src/client
Commit message (Collapse)AuthorAge
* 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.
* Allow escaping of texture names when passed as an argument to a modifiersfan52016-09-14
|
* Also support X11 icon for minetest copies installed via make install (#4407)est312016-08-20
| | | Fixes #4323.
* Add an [opacity:<r> texture modifier. Makes the base image transparent ↵Thomas--S2016-08-12
| | | | according to the given ratio. r must be between 0 and 255. 0 means totally transparent. 255 means totally opaque. Useful for texture overlaying.
* Add zoom, tweakable with zoom_fov, default key: Z (like optifine)Esteban I. Ruiz Moreno2016-08-10
|
* Finally set a window icon on X11est312016-07-05
| | | | | | | | | | Since the creation of minetest, it had no window icon on X11. Now we have one. The misc/minetest-xorg-icon-128.png file is a rendering of the misc/minetest.svg file with inkscape, created with something like: inkscape -z -e misc/minetest-xorg-icon-128.png -w 128 -h 128 misc/minetest.svg
* Remove top left minetest watermarkest312016-07-03
| | | | | | | | Move version information into the window caption. On popular player request. Fixes #4209.
* Initial Gamepad supportest312016-06-03
| | | | | | | Adds initial ingame gamepad support to minetest. Full Formspec support is not implemented yet and can be added by a later change.
* Input related generalisationsest312016-06-03
| | | | | * Move key types into own file * Use Generalized input methods in game.cpp
* Add colored text (not only colored chat).Ekdohibs2016-05-31
| | | | | Add documentation, move files to a proper place and avoid memory leaks. Make it work with most kind of texts, and allow backgrounds too.
* Colored chat working as expected for both freetype and non-freetype builds. ↵TriBlade92016-05-31
| | | | @nerzhul improvements * Add unit tests * Fix coding style * move guiChatConsole.hpp to client/
* Tell irrlicht if we handle a key or not.est312016-05-26
| | | | | | | | | We can remove the function in MtNativeActivity now as it serves precisely that purpose: to tell irrlicht that we handled the esc key. TODO for later: * Perhaps try to find a more performant container than KeyList
* Add [resize texture modifier Resizes the texture to the given dimensions.SmallJoker2016-05-09
|