mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-04 17:25:30 +01:00
7295b6c88cbadb188871162d4d76e7c50faef9d1
SColor.h contains many functions which are unused and/or perform linear operations on non-linear 8 bit sRGB color values, such as the plus operator and `SColor::getInterpolated()`, and there is no documentation about missing gamma correction. Some of these functions are not called or called only once: * `getAverage(s16 color)`: Unused * `SColor::getLightness()`: Unused * `SColor::getAverage()`: Claims to determine a color's average intensity but calculates something significantly different since SColor represents non-linear sRGB values. * `SColor::getInterpolated_quadratic()`: Claims to interpolate between colors but uses the sRGB color space, which is neither physically nor perceptually linear. * `SColorf::getInterpolated_quadratic()`: Unused * `SColorf::setColorComponentValue()`: Unused Removing or inlining these functions can simplify the code and documenting gamma-incorrect operations can reduce confusion about what the functions do. This commit does the following: * Remove the above-mentioned unused functions * Inline `SColor::getAverage()` into `CIrrDeviceLinux::TextureToMonochromeCursor()` * Rename `SColor::getLuminance()` into `SColor::getBrightness()` since it does not determine a color's luminance but calculates something which differs significantly from physical luminance since SColor represents non-linear sRGB values. * Inline `SColor::getInterpolated_quadratic()` into `GameUI::update()`, where it is only used for the alpha value calculation for fading * Document gamma-incorrect behaviour in docstrings
Luanti (formerly Minetest)
Luanti is a free open-source voxel game engine with easy modding and game creation.
Copyright (C) 2010-2024 Perttu Ahola celeron55@gmail.com and contributors (see source file comments and the version control log)
Table of Contents
- Further Documentation
- Default Controls
- Paths
- Configuration File
- Command-line Options
- Compiling
- Docker
- Version Scheme
Further documentation
- Website: https://www.luanti.org/
- Wiki: https://wiki.minetest.net/
- Forum: https://forum.luanti.org/
- GitHub: https://github.com/minetest/minetest/
- Developer documentation
- doc/ directory of source distribution
Default controls
All controls are re-bindable using settings. Some can be changed in the key config dialog in the settings tab.
| Button | Action |
|---|---|
| Move mouse | Look around |
| W, A, S, D | Move |
| Space | Jump/move up |
| Shift | Sneak/move down |
| Q | Drop itemstack |
| Shift + Q | Drop single item |
| Left mouse button | Dig/punch/use |
| Right mouse button | Place/use |
| Shift + right mouse button | Build (without using) |
| I | Inventory menu |
| Mouse wheel | Select item |
| 0-9 | Select item |
| Z | Zoom (needs zoom privilege) |
| T | Chat |
| / | Command |
| Esc | Pause menu/abort/exit (pauses only singleplayer game) |
| + | Increase view range |
| - | Decrease view range |
| K | Enable/disable fly mode (needs fly privilege) |
| J | Enable/disable fast mode (needs fast privilege) |
| H | Enable/disable noclip mode (needs noclip privilege) |
| E | Aux1 (Move fast in fast mode. Games may add special features) |
| C | Cycle through camera modes |
| V | Cycle through minimap modes |
| Shift + V | Change minimap orientation |
| F1 | Hide/show HUD |
| F2 | Hide/show chat |
| F3 | Disable/enable fog |
| F4 | Disable/enable camera update (Mapblocks are not updated anymore when disabled, disabled in release builds) |
| F5 | Cycle through debug information screens |
| F6 | Cycle through profiler info screens |
| F10 | Show/hide console |
| F12 | Take screenshot |
Paths
Locations:
bin- Compiled binariesshare- Distributed read-only datauser- User-created modifiable data
Where each location is on each platform:
- Windows .zip / RUN_IN_PLACE source:
bin=binshare=.user=.
- Windows installed:
bin=C:\Program Files\Minetest\bin (Depends on the install location)share=C:\Program Files\Minetest (Depends on the install location)user=%APPDATA%\Minetestor%MINETEST_USER_PATH%
- Linux installed:
bin=/usr/binshare=/usr/share/minetestuser=~/.minetestor$MINETEST_USER_PATH
- macOS:
bin=Contents/MacOSshare=Contents/Resourcesuser=Contents/Useror~/Library/Application Support/minetestor$MINETEST_USER_PATH
Worlds can be found as separate folders in: user/worlds/
Configuration file
- Default location:
user/minetest.conf - This file is created by closing Luanti for the first time.
- A specific file can be specified on the command line:
--config <path-to-file> - A run-in-place build will look for the configuration file in
location_of_exe/../minetest.confand alsolocation_of_exe/../../minetest.conf
Command-line options
- Use
--help
Compiling
Docker
Version scheme
We use major.minor.patch since 5.0.0-dev. Prior to that we used 0.major.minor.
- Major is incremented when the release contains breaking changes, all other numbers are set to 0.
- Minor is incremented when the release contains new non-breaking features, patch is set to 0.
- Patch is incremented when the release only contains bugfixes and very minor/trivial features considered necessary.
Since 5.0.0-dev and 0.4.17-dev, the dev notation refers to the next release,
i.e.: 5.0.0-dev is the development version leading to 5.0.0.
Prior to that we used previous_version-dev.
Description
Languages
C++
81.2%
Lua
9.2%
C
5.5%
Java
2%
CMake
0.9%
Other
1.2%