summaryrefslogtreecommitdiff
path: root/modules/dds/texture_loader_dds.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/dds/texture_loader_dds.cpp')
-rw-r--r--modules/dds/texture_loader_dds.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/modules/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp
index a063942269..059c06c37c 100644
--- a/modules/dds/texture_loader_dds.cpp
+++ b/modules/dds/texture_loader_dds.cpp
@@ -263,14 +263,14 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path,
colsize = 4;
}
- int w = width;
- int h = height;
+ int w2 = width;
+ int h2 = height;
for (uint32_t i = 1; i < mipmaps; i++) {
- w = (w + 1) >> 1;
- h = (h + 1) >> 1;
- size += w * h * info.block_size;
+ w2 = (w2 + 1) >> 1;
+ h2 = (h2 + 1) >> 1;
+ size += w2 * h2 * info.block_size;
}
src_data.resize(size + 256 * colsize);
@@ -432,7 +432,8 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path,
} break;
- default: {}
+ default: {
+ }
}
wb = PoolVector<uint8_t>::Write();