mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
work-in-progress texture atlas optimization
This commit is contained in:
parent
949383a2f7
commit
1704badc30
21 changed files with 1496 additions and 271 deletions
|
@ -27,7 +27,8 @@ const char *mineral_filenames[MINERAL_COUNT] =
|
|||
"mineral_iron.png"
|
||||
};
|
||||
|
||||
textureid_t mineral_textures[MINERAL_COUNT] = {0};
|
||||
//textureid_t mineral_textures[MINERAL_COUNT] = {0};
|
||||
std::string mineral_textures[MINERAL_COUNT];
|
||||
|
||||
void init_mineral(IIrrlichtWrapper *irrlicht)
|
||||
{
|
||||
|
@ -35,14 +36,17 @@ void init_mineral(IIrrlichtWrapper *irrlicht)
|
|||
{
|
||||
if(mineral_filenames[i] == NULL)
|
||||
continue;
|
||||
mineral_textures[i] = irrlicht->getTextureId(mineral_filenames[i]);
|
||||
//mineral_textures[i] = irrlicht->getTextureId(mineral_filenames[i]);
|
||||
//mineral_textures[i] = 0;
|
||||
mineral_textures[i] = mineral_filenames[i];
|
||||
}
|
||||
}
|
||||
|
||||
textureid_t mineral_block_texture(u8 mineral)
|
||||
//textureid_t mineral_block_texture(u8 mineral)
|
||||
std::string mineral_block_texture(u8 mineral)
|
||||
{
|
||||
if(mineral >= MINERAL_COUNT)
|
||||
return 0;
|
||||
return "";
|
||||
|
||||
return mineral_textures[mineral];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue