2024-02-25 14:46:47 +00:00
|
|
|
#pragma once
|
2023-06-20 04:33:09 +00:00
|
|
|
|
|
|
|
#include "StarImage.hpp"
|
|
|
|
#include "StarWorldTiles.hpp"
|
|
|
|
#include "StarEntityRenderingTypes.hpp"
|
|
|
|
#include "StarSkyRenderData.hpp"
|
|
|
|
#include "StarParallax.hpp"
|
|
|
|
#include "StarParticle.hpp"
|
|
|
|
#include "StarWeatherTypes.hpp"
|
|
|
|
#include "StarEntity.hpp"
|
2023-06-29 00:11:19 +00:00
|
|
|
#include "StarThread.hpp"
|
2024-03-19 14:53:34 +00:00
|
|
|
#include "StarCellularLighting.hpp"
|
2023-06-20 04:33:09 +00:00
|
|
|
|
|
|
|
namespace Star {
|
|
|
|
|
|
|
|
struct EntityDrawables {
|
|
|
|
EntityHighlightEffect highlightEffect;
|
|
|
|
Map<EntityRenderLayer, List<Drawable>> layers;
|
|
|
|
};
|
|
|
|
|
2024-03-19 14:53:34 +00:00
|
|
|
|
2023-06-20 04:33:09 +00:00
|
|
|
struct WorldRenderData {
|
|
|
|
void clear();
|
|
|
|
|
|
|
|
WorldGeometry geometry;
|
|
|
|
|
|
|
|
Vec2I tileMinPosition;
|
|
|
|
RenderTileArray tiles;
|
|
|
|
Vec2I lightMinPosition;
|
2024-03-19 14:53:34 +00:00
|
|
|
Lightmap lightMap;
|
2023-06-20 04:33:09 +00:00
|
|
|
|
|
|
|
List<EntityDrawables> entityDrawables;
|
2023-07-03 08:31:12 +00:00
|
|
|
List<Particle> const* particles;
|
2023-06-20 04:33:09 +00:00
|
|
|
|
|
|
|
List<OverheadBar> overheadBars;
|
|
|
|
List<Drawable> nametags;
|
|
|
|
|
|
|
|
List<Drawable> backgroundOverlays;
|
|
|
|
List<Drawable> foregroundOverlays;
|
|
|
|
|
|
|
|
List<ParallaxLayer> parallaxLayers;
|
|
|
|
|
|
|
|
SkyRenderData skyRenderData;
|
|
|
|
|
|
|
|
bool isFullbright = false;
|
|
|
|
float dimLevel = 0.0f;
|
|
|
|
Vec3B dimColor;
|
|
|
|
};
|
|
|
|
|
|
|
|
inline void WorldRenderData::clear() {
|
2023-07-03 08:31:12 +00:00
|
|
|
tiles.resize({0, 0}); // keep reserved
|
2023-06-20 04:33:09 +00:00
|
|
|
|
|
|
|
entityDrawables.clear();
|
2023-07-03 08:31:12 +00:00
|
|
|
particles = nullptr;
|
2023-06-20 04:33:09 +00:00
|
|
|
overheadBars.clear();
|
|
|
|
nametags.clear();
|
|
|
|
backgroundOverlays.clear();
|
|
|
|
foregroundOverlays.clear();
|
|
|
|
parallaxLayers.clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|