mirror of
https://notabug.org/scuti/lib3ddevil1
synced 2025-05-31 14:11:42 +05:30
detour-implementation of texture unpacking
This commit is contained in:
@@ -78,8 +78,8 @@ unsigned int gettexturebatch(
|
||||
}
|
||||
return totaltextures;
|
||||
}
|
||||
|
||||
void gettextures(struct Texture **t,
|
||||
|
||||
void gettextures(unsigned int *t,
|
||||
struct TexturePack *tp,
|
||||
struct TextureBatch **tb,
|
||||
struct TextureBatchDescriptor **bds) {
|
||||
@@ -87,11 +87,11 @@ void gettextures(struct Texture **t,
|
||||
unsigned int j;
|
||||
// k is access to index of textures.
|
||||
unsigned int k = 0;
|
||||
unsigned int offset = 0;
|
||||
unsigned int offset = tp -> firstBatchOffset;
|
||||
for (i = 0; i < tp -> batchNumber; i++) {
|
||||
for (j = 0; j < bds[i] -> texNumber; j++) {
|
||||
printf("texture offsets %x\n", offset + tp -> firstBatchOffset);
|
||||
t[k] = (struct Texture*)tb + offset;
|
||||
printf("texture offsets %x\n", offset);
|
||||
t[k] = offset;
|
||||
offset += bds[i] -> textureSize;
|
||||
k++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user