remove maptile pointer from textureset
This commit is contained in:
@@ -159,7 +159,7 @@ MapChunk::MapChunk(MapTile* maintile, BlizzardArchive::ClientFile* f, bool bigAl
|
||||
tmp_chunk_header.nLayers = 0;
|
||||
}
|
||||
|
||||
texture_set = std::make_unique<TextureSet>(this, f, base, maintile, bigAlpha,
|
||||
texture_set = std::make_unique<TextureSet>(this, f, base, bigAlpha,
|
||||
!!header_flags.flags.do_not_fix_alpha_map, mode == tile_mode::uid_fix_all, _context, tmp_chunk_header);
|
||||
|
||||
// - MCVT ----------------------------------------------
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <array>
|
||||
#include <sstream>
|
||||
|
||||
TextureSet::TextureSet (MapChunk* chunk, BlizzardArchive::ClientFile* f, size_t base, MapTile* tile
|
||||
TextureSet::TextureSet (MapChunk* chunk, BlizzardArchive::ClientFile* f, size_t base
|
||||
, bool use_big_alphamaps, bool do_not_fix_alpha_map, bool do_not_convert_alphamaps
|
||||
, Noggit::NoggitRenderContext context, MapChunkHeader const& header)
|
||||
: nTextures(header.nLayers)
|
||||
@@ -34,12 +34,12 @@ TextureSet::TextureSet (MapChunk* chunk, BlizzardArchive::ClientFile* f, size_t
|
||||
{
|
||||
f->read (&tmp_entry_mcly[i], sizeof(ENTRY_MCLY)); // f->read (&_layers_info[i], sizeof(ENTRY_MCLY));
|
||||
|
||||
std::string const& texturefilename = tile->mTextureFilenames[tmp_entry_mcly[i].textureID];
|
||||
std::string const& texturefilename = chunk->mt->mTextureFilenames[tmp_entry_mcly[i].textureID];
|
||||
textures.emplace_back (texturefilename, _context);
|
||||
|
||||
if (tile->_mtxf_entries.contains(texturefilename))
|
||||
if (chunk->mt->_mtxf_entries.contains(texturefilename))
|
||||
{
|
||||
if (tile->_mtxf_entries[texturefilename].use_cubemap)
|
||||
if (chunk->mt->_mtxf_entries[texturefilename].use_cubemap)
|
||||
textures.back().use_cubemap = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ class TextureSet
|
||||
{
|
||||
public:
|
||||
TextureSet() = delete;
|
||||
TextureSet(MapChunk* chunk, BlizzardArchive::ClientFile* f, size_t base, MapTile* tile
|
||||
TextureSet(MapChunk* chunk, BlizzardArchive::ClientFile* f, size_t base
|
||||
, bool use_big_alphamaps, bool do_not_fix_alpha_map, bool do_not_convert_alphamaps
|
||||
, Noggit::NoggitRenderContext context, MapChunkHeader const& header);
|
||||
|
||||
@@ -135,7 +135,6 @@ private:
|
||||
void update_lod_texture_map(); // todo: remove. WHAT?
|
||||
|
||||
MapChunk* _chunk;
|
||||
MapTile* _tile;
|
||||
|
||||
std::vector<scoped_blp_texture_reference> textures;
|
||||
std::array<std::optional<Alphamap>, 3> alphamaps;
|
||||
|
||||
Reference in New Issue
Block a user