1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-11-11 20:35:25 +01:00

Move client code from nodedef.h/cpp (#16615)

This commit is contained in:
cx384
2025-11-08 21:49:01 +01:00
committed by GitHub
parent 232c833af4
commit 98295cf839
27 changed files with 880 additions and 789 deletions

View File

@@ -7,6 +7,7 @@
#include "camera.h"
#include "client.h"
#include "mapblock.h" // getNodeBlockPos
#include "node_visuals.h"
#include "settings.h"
#include "shader.h"
#include "client/renderingengine.h"
@@ -414,12 +415,13 @@ void Minimap::blitMinimapPixelsToImageSurface(
} else if (overlay.name.empty() && tile.has_color) {
tilecolor = tile.color;
} else {
mmpixel->n.getColor(f, &tilecolor);
f.visuals->getColor(mmpixel->n.param2, &tilecolor);
}
// Multiply with pre-generated "color of texture"
tilecolor.setRed(tilecolor.getRed() * f.minimap_color.getRed() / 255);
tilecolor.setGreen(tilecolor.getGreen() * f.minimap_color.getGreen() / 255);
tilecolor.setBlue(tilecolor.getBlue() * f.minimap_color.getBlue() / 255);
video::SColor &minimap_color = f.visuals->minimap_color;
tilecolor.setRed(tilecolor.getRed() * minimap_color.getRed() / 255);
tilecolor.setGreen(tilecolor.getGreen() * minimap_color.getGreen() / 255);
tilecolor.setBlue(tilecolor.getBlue() * minimap_color.getBlue() / 255);
tilecolor.setAlpha(240);
map_image->setPixel(x, data->mode.map_size - z - 1, tilecolor);