| Commit message (Collapse) | Author | Age |
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Move version information into the window caption.
On popular player request.
Fixes #4209.
|
|
|
|
|
|
|
| |
Adds initial ingame gamepad support to minetest.
Full Formspec support is not implemented yet and
can be added by a later change.
|
|
|
|
|
| |
* Move key types into own file
* Use Generalized input methods in game.cpp
|
|
|
|
|
| |
Add documentation, move files to a proper place and avoid memory leaks.
Make it work with most kind of texts, and allow backgrounds too.
|
|
|
|
| |
@nerzhul improvements * Add unit tests * Fix coding style * move guiChatConsole.hpp to client/
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
destination alpha"
Fix warnings added by commit 01ae43c48009f816f4649fae2f7f6997452aa6cf
Fixes #3952
|
|
|
|
| |
Also, rework the colorizing code to be more efficient.
|
|
|
|
|
|
|
|
|
|
|
| |
Changes:
* Fix indentation.
* Pass strings by const reference.
* Merge Strfnd and WStrfnd into one class instead of copying them.
* Remove trailing spaces.
* Fix variable names.
* Move to util.
* Other miscellaneous style fixes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix two bugs related to the reconnect feature
introduced by commit
3b50b2766aeb09c9fc0ad0ea07426bb2187df3d7 "Optional reconnect functionality"
1. Set the password to the stored one
Before, we have done the reconnect attempt with a
cleared password, so using the feature would only
work if you had an empty password.
Thanks to @orwell96 for reporting the bug.
2. Reset the reconnect_requested flag after its use
the_game only writes to the reconect_requested flag
if it sets it to true. It never sets it to false.
If the flag is not reset after its use, all "reset"s
to the main menu will look like the server had
requested a reconnect.
|
|
|
|
|
| |
* Sky: rename Box => m_box and inline getBoundingBox
* Uniformize aabbox3d<f32> to aabb3f
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The pageflip mode requires a stereo quadbuffer, and a modern graphic
card. Patch tested with NVidia 3D Vision.
The mini-map is not drawn, but that's what is done for topbottom and
sidebyside modes as well.
Also most of the time the user would prefer the HUD to be off. That's
for the user to decide though, and toggle it manually.
Finally, the interocular distance (aka eye separation) is twice as much
as the "3d_paralax_strength" settings. I find this a strange design
decision. I didn't want to chance this though, since it's how the other
3d modes interpret this settings.
|