Merge pull request #277 from GEEKiDoS/fix-font-build

Fix font generation
This commit is contained in:
Edo 2022-05-15 07:06:00 +01:00 committed by GitHub
commit 05f1270a1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,7 +135,10 @@ namespace Assets
auto* material = builder->getAllocator()->allocate<Game::Material>(); auto* material = builder->getAllocator()->allocate<Game::Material>();
std::memcpy(material, Game::DB_FindXAssetHeader(Game::ASSET_TYPE_MATERIAL, "fonts/gamefonts_pc").material, sizeof(Game::Material)); std::memcpy(material, Game::DB_FindXAssetHeader(Game::ASSET_TYPE_MATERIAL, "fonts/gamefonts_pc").material, sizeof(Game::Material));
material->textureTable = builder->getAllocator()->allocate<Game::MaterialTextureDef>(); auto textureTable = builder->getAllocator()->allocate<Game::MaterialTextureDef>();
std::memcpy(textureTable, material->textureTable, sizeof(Game::MaterialTextureDef));
material->textureTable = textureTable;
material->textureTable->u.image = image; material->textureTable->u.image = image;
material->info.name = fontName; material->info.name = fontName;