remove shader param debug stuff

This commit is contained in:
momo5502 2016-10-23 19:08:18 +02:00
parent 7748f96b50
commit e077bb0db6

View File

@ -13,9 +13,6 @@ namespace Components
std::map<std::string, Game::XAssetHeader> AssetHandler::TemporaryAssets[Game::XAssetType::ASSET_TYPE_COUNT]; std::map<std::string, Game::XAssetHeader> AssetHandler::TemporaryAssets[Game::XAssetType::ASSET_TYPE_COUNT];
static std::map<std::string, short> techsMain;
static std::map<std::string, short> techsSub;
void AssetHandler::RegisterInterface(IAsset* iAsset) void AssetHandler::RegisterInterface(IAsset* iAsset)
{ {
if (!iAsset) return; if (!iAsset) return;
@ -135,48 +132,6 @@ namespace Components
} }
} }
#if DEBUG
if (type == 9)
{
static Game::MaterialTechniqueSet* technique = nullptr;
auto printTechset = [] (Game::MaterialTechniqueSet* technique, std::map<std::string, short>* _map)
{
for (int i = 0; i < 48; i++)
{
if (technique->techniques[i])
{
for (int j = 0; j < technique->techniques[i]->numPasses; j++)
{
Game::MaterialPass* pass = &technique->techniques[i]->passes[j];
for (int k = 0; k < (pass->argCount1 + pass->argCount2 + pass->argCount3); k++)
{
std::string name = fmt::sprintf("%s:%d.%d.%d_%d", technique->techniques[i]->name, i, j, k, pass->argumentDef[k].type);
if (_map->find(name) != _map->end())
{
OutputDebugStringA(name.data());
}
(*_map)[name] = pass->argumentDef[k].paramID;
}
}
}
}
};
if (FastFiles::Current() == "mp_rust_long")
{
printTechset(asset->materialTechset, &techsMain);
}
else
{
printTechset(asset->materialTechset, &techsSub);
}
}
#endif
if (type == Game::XAssetType::ASSET_TYPE_MATERIAL && name == "wc/codo_ui_viewer_black_decal3"s) if (type == Game::XAssetType::ASSET_TYPE_MATERIAL && name == "wc/codo_ui_viewer_black_decal3"s)
{ {
asset->material->sortKey = 0xE; asset->material->sortKey = 0xE;
@ -373,17 +328,6 @@ namespace Components
Game::Sys_Error(25, reinterpret_cast<char*>(0x724428), Game::DB_GetXAssetTypeName(asset.first), asset.second.data()); Game::Sys_Error(25, reinterpret_cast<char*>(0x724428), Game::DB_GetXAssetTypeName(asset.first), asset.second.data());
} }
for (auto main : techsMain)
{
if (techsSub.find(main.first) != techsSub.end() && main.second != techsSub[main.first])
{
FILE* fp;
fopen_s(&fp, "stuff.txt", "a");
fprintf(fp, "%s: %d %d\n", main.first.data(), main.second & 0xFFFF, techsSub[main.first] & 0xFFFF);
fclose(fp);
}
}
AssetHandler::EmptyAssets.clear(); AssetHandler::EmptyAssets.clear();
} }
}); });