Skip to content

Commit 2fa0772

Browse files
isHarryhK0lb3
authored andcommitted
chore!(TextureSwizzler): rename TEXTURE_FORMAT_BLOCK_SIZE_MAP
1 parent 6388ba6 commit 2fa0772

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

UnityPy/export/Texture2DConverter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def image_to_texture2d(
214214

215215
assert platform_blob is not None
216216
gobs_per_block = TextureSwizzler.get_switch_gobs_per_block(platform_blob)
217-
block_size = TextureSwizzler.TEXTUREFORMAT_BLOCK_SIZE_MAP[s_tex_format]
217+
block_size = TextureSwizzler.TEXTURE_FORMAT_BLOCK_SIZE_MAP[s_tex_format]
218218
width, height = TextureSwizzler.get_padded_texture_size(img.width, img.height, *block_size, gobs_per_block)
219219
switch_info = (block_size, gobs_per_block)
220220

@@ -285,7 +285,7 @@ def parse_image_data(
285285

286286
assert platform_blob is not None
287287
gobs_per_block = TextureSwizzler.get_switch_gobs_per_block(platform_blob)
288-
block_size = TextureSwizzler.TEXTUREFORMAT_BLOCK_SIZE_MAP[texture_format]
288+
block_size = TextureSwizzler.TEXTURE_FORMAT_BLOCK_SIZE_MAP[texture_format]
289289
width, height = TextureSwizzler.get_padded_texture_size(width, height, *block_size, gobs_per_block)
290290
image_data = TextureSwizzler.deswizzle(image_data, width, height, *block_size, gobs_per_block)
291291
else:

UnityPy/helpers/TextureSwizzler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def swizzle(
7070

7171

7272
# this should be the amount of pixels that can fit 16 bytes
73-
TEXTUREFORMAT_BLOCK_SIZE_MAP: Dict[TextureFormat, Tuple[int, int]] = {
73+
TEXTURE_FORMAT_BLOCK_SIZE_MAP: Dict[TextureFormat, Tuple[int, int]] = {
7474
TextureFormat.Alpha8: (16, 1), # 1 byte per pixel
7575
TextureFormat.ARGB4444: (8, 1), # 2 bytes per pixel
7676
TextureFormat.RGBA32: (4, 1), # 4 bytes per pixel

0 commit comments

Comments
 (0)