Added some functions for future
This commit is contained in:
@@ -298,6 +298,32 @@ HOOK(texture*, FASTCALL, texture_load_tex_2d, 0x000000014069B8E0,
|
||||
width, height, max_mipmap_level, data_ptr, use_high_anisotropy);
|
||||
}
|
||||
|
||||
bool texture_txp_set_load(txp_set* t, texture*** texs, uint32_t* ids) {
|
||||
if (!t || !texs || !ids)
|
||||
return false;
|
||||
|
||||
size_t count = t->textures.size();
|
||||
*texs = force_malloc<texture*>(count + 1);
|
||||
texture** tex = *texs;
|
||||
for (size_t i = 0; i < count; i++)
|
||||
tex[i] = texture_txp_load(&t->textures[i], texture_id(0, ids[i]));
|
||||
tex[count] = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool texture_txp_set_load(txp_set* t, texture*** texs, texture_id* ids) {
|
||||
if (!t || !texs || !ids)
|
||||
return false;
|
||||
|
||||
size_t count = t->textures.size();
|
||||
*texs = force_malloc<texture*>(count + 1);
|
||||
texture** tex = *texs;
|
||||
for (size_t i = 0; i < count; i++)
|
||||
tex[i] = texture_txp_load(&t->textures[i], ids[i]);
|
||||
tex[count] = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
void texture_patch() {
|
||||
INSTALL_HOOK(texture_load_tex_cube_map);
|
||||
INSTALL_HOOK(texture_load_tex_2d);
|
||||
|
||||
Reference in New Issue
Block a user