| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
With the cloud API, the cloud_height setting has become obsolete
and replaceable by a mod. It, and supporting code, can be
removed.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
* 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
|
|
|
|
|
| |
Prevents normal drawtype nodes having transparency.
Avoids clients cheating by using 'x-ray' texture packs with transparent textures.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
| |
(#5957)
This also changes threadProc's signature, since C++11 supports arbitrary
thread function signatures.
|
| |
|
|
|
|
|
| |
Minetest does not have 'run'.
Automatic forwards is very often used while flying or swimming, so a general
word is more suitable.
|
|
|
|
| |
* Fix event LINT & remove default constructor/destructors
* remove compat code & modernize autolock header
|
| |
|
| |
|
|
|
| |
fixes #1811
|
|
|
|
|
|
|
|
|
|
| |
* 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)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This commit adds node overlays, which are tiles that are drawn on top of
other tiles.
|
|
|
|
| |
* Also remove 2 non declared but defined functions
* Make some functions around const ref changes const
|
|
|
|
| |
Put accessed members that are needed by updateFastFaceRow()
all in the same cacheline.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
There was no bug here (as I checked for negativeness),
however it's good to get rid of warnings.
|
|
|
|
|
|
| |
* 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
|
|
|
|
| |
Bonus: make CI happy with the last rules fix
|
|
|
| |
Fix some headers style and remove them from whitelist
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
| |
You can't join most servers with a 'guest####' player name anyway so
it's only logical to remove them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
```
|
|
|
|
| |
Allows colorizing of textures using a color multiplication method.
|
|
|
|
|
|
| |
- Increase ContentFeatures serialization version
- Color property and palettes for nodes
- paramtype2 = "color", "colored facedir" or "colored wallmounted"
|
|
|
|
|
|
|
|
| |
"[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.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Fixes #4323.
|
|
|
|
| |
according to the given ratio. r must be between 0 and 255. 0 means totally transparent. 255 means totally opaque. Useful for texture overlaying.
|
| |
|