fix or hack fix various issues | Update FlowView.cpp, Action.cpp, and 8 more files...
This commit is contained in:
2
src/external/NodeEditor/src/FlowView.cpp
vendored
2
src/external/NodeEditor/src/FlowView.cpp
vendored
@@ -560,7 +560,7 @@ void FlowView::paintEvent(QPaintEvent *event)
|
||||
return;
|
||||
}
|
||||
|
||||
QCoreApplication::processEvents();
|
||||
//QCoreApplication::processEvents();
|
||||
|
||||
for(auto& pair : _scene->nodes())
|
||||
{
|
||||
|
||||
@@ -736,7 +736,7 @@ void Noggit::Action::registerChunkShadowChange(MapChunk *chunk)
|
||||
return;
|
||||
}
|
||||
|
||||
std::array<uint8_t , 64 * 64> data;
|
||||
std::array<uint8_t, 64 * 64> data;
|
||||
std::memcpy(data.data(), &chunk->_shadow_map, 64 * 64 * sizeof(std::uint8_t));
|
||||
_chunk_shadow_map_pre.emplace_back(std::make_pair(chunk, std::move(data)));
|
||||
}
|
||||
|
||||
@@ -50,22 +50,19 @@ namespace Noggit
|
||||
template<typename... Args>
|
||||
T* emplace (BlizzardArchive::Listfile::FileKey const& file_key, Noggit::NoggitRenderContext context, Args&&... args)
|
||||
{
|
||||
std::scoped_lock const lock(_mutex);
|
||||
auto pair = std::make_pair(context, file_key);
|
||||
//LogDebug << "Emplacing " << normalized << " into context" << context << std::endl;
|
||||
|
||||
{
|
||||
std::scoped_lock const lock(_mutex);
|
||||
|
||||
if ([&] { return _counts[pair]++; }())
|
||||
{
|
||||
return &_elements.at (pair);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
T* const obj ( [&]
|
||||
{
|
||||
std::scoped_lock const lock(_mutex);
|
||||
return &_elements.emplace ( std::piecewise_construct
|
||||
, std::forward_as_tuple (pair)
|
||||
, std::forward_as_tuple (file_key.filepath(), context, args...)
|
||||
@@ -151,7 +148,7 @@ namespace Noggit
|
||||
}
|
||||
|
||||
private:
|
||||
std::map<std::pair<int, BlizzardArchive::Listfile::FileKey>, T> _elements;
|
||||
std::unordered_map<std::pair<int, BlizzardArchive::Listfile::FileKey>, T, pair_hash> _elements;
|
||||
std::unordered_map<std::pair<int, BlizzardArchive::Listfile::FileKey>, std::size_t, pair_hash> _counts;
|
||||
std::mutex mutable _mutex;
|
||||
};
|
||||
|
||||
@@ -18,7 +18,7 @@ GroundEffectDoodadDB gGroundEffectDoodadDB;
|
||||
GroundEffectTextureDB gGroundEffectTextureDB;
|
||||
LiquidTypeDB gLiquidTypeDB;
|
||||
|
||||
void OpenDBs(std:: shared_ptr<BlizzardArchive::ClientData> clientData)
|
||||
void OpenDBs(std::shared_ptr<BlizzardArchive::ClientData> clientData)
|
||||
{
|
||||
gAreaDB.open(clientData);
|
||||
gMapDB.open(clientData);
|
||||
|
||||
@@ -211,7 +211,7 @@ MapChunk::MapChunk(MapTile* maintile, BlizzardArchive::ClientFile* f, bool bigAl
|
||||
}
|
||||
}
|
||||
// - MCSH ----------------------------------------------
|
||||
if(header.ofsShadow && header.sizeShadow)
|
||||
if((header_flags.flags.has_mcsh) && header.ofsShadow && header.sizeShadow)
|
||||
{
|
||||
f->seek(base + header.ofsShadow);
|
||||
f->read(&fourcc, 4);
|
||||
@@ -219,14 +219,14 @@ MapChunk::MapChunk(MapTile* maintile, BlizzardArchive::ClientFile* f, bool bigAl
|
||||
|
||||
assert(fourcc == 'MCSH');
|
||||
|
||||
|
||||
uint8_t compressed_shadow_map[64 * 64 / 8];
|
||||
char compressed_shadow_map[64 * 64 / 8];
|
||||
|
||||
// shadow map 64 x 64
|
||||
f->read(compressed_shadow_map, 0x200);
|
||||
f->read(&compressed_shadow_map, 0x200);
|
||||
f->seekRelative(-0x200);
|
||||
|
||||
uint8_t *p, *c;
|
||||
uint8_t *p;
|
||||
char *c;
|
||||
p = _shadow_map;
|
||||
c = compressed_shadow_map;
|
||||
for (int i = 0; i<64 * 8; ++i)
|
||||
|
||||
@@ -2815,7 +2815,7 @@ void MapView::saveMinimap(MinimapRenderSettings* settings)
|
||||
|
||||
_main_window->statusBar()->addPermanentWidget(cancel_btn);
|
||||
|
||||
connect(this, &MapView::updateProgress, progress, &QProgressBar::setValue);
|
||||
//connect(this, &MapView::updateProgress, progress, &QProgressBar::setValue);
|
||||
|
||||
// setup combined image if necessary
|
||||
if (settings->combined_minimap)
|
||||
|
||||
@@ -123,7 +123,7 @@ MapIndex::MapIndex (const std::string &pBasename, int map_id, World* world,
|
||||
adt_filename << "World\\Maps\\" << basename << "\\" << basename << "_" << i << "_" << j << ".adt";
|
||||
|
||||
mTiles[j][i].tile = nullptr;
|
||||
mTiles[j][i].onDisc = BlizzardArchive::ClientData::existsOnDisk(adt_filename.str());
|
||||
mTiles[j][i].onDisc = Noggit::Application::NoggitApplication::instance()->clientData()->existsOnDisk(adt_filename.str());
|
||||
|
||||
if (mTiles[j][i].onDisc && !(mTiles[j][i].flags & 1))
|
||||
{
|
||||
|
||||
@@ -287,7 +287,7 @@ namespace Noggit::Project
|
||||
project->ClientDatabase = std::make_shared<BlizzardDatabaseLib::BlizzardDatabase>(
|
||||
dbcFileDirectory, dbdFileDirectory, clientBuild);
|
||||
project->ClientData = std::make_shared<BlizzardArchive::ClientData>(
|
||||
project->ClientPath, clientArchiveVersion, clientArchiveLocale, std::string(""));
|
||||
project->ClientPath, clientArchiveVersion, clientArchiveLocale, std::string((projectPath / "export").generic_string()));
|
||||
|
||||
|
||||
return std::make_shared<NoggitProject>(project.value());
|
||||
|
||||
@@ -65,7 +65,7 @@ void TileRender::draw (OpenGL::Scoped::use_program& mcnk_shader
|
||||
|
||||
static constexpr unsigned NUM_SAMPLERS = 11;
|
||||
|
||||
if (!_map_tile->finished)
|
||||
if (!_map_tile->finished.load())
|
||||
[[unlikely]]
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -93,7 +93,6 @@ namespace Noggit::Rendering
|
||||
void updateLightingUniformBlock(bool draw_fog, glm::vec3 const& camera_pos);
|
||||
void updateLightingUniformBlockMinimap(MinimapRenderSettings* settings);
|
||||
|
||||
|
||||
void setupChunkVAO(OpenGL::Scoped::use_program& mcnk_shader);
|
||||
void setupLiquidChunkVAO(OpenGL::Scoped::use_program& water_shader);
|
||||
void setupOccluderBuffers();
|
||||
|
||||
Reference in New Issue
Block a user