Skip to content

Commit cd60c44

Browse files
committed
Remove DISABLE_TWINDDLING_ROUTINE directive
The `DISABLE_TWINDDLING_ROUTINE` preprocessor directive and its associated code have been removed from `PvrtcDecoder.cs`. This directive was previously used to conditionally disable the twiddling routine with a simplified calculation. The removal simplifies the codebase by eliminating conditional logic, ensuring the twiddling routine is always executed. The `#else` block containing the twiddling logic remains intact, and the `#endif` directive has been removed as it is no longer necessary.
1 parent 09f605e commit cd60c44

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

AssetRipper.TextureDecoder/Pvrtc/PvrtcDecoder.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
//#define DISABLE_TWINDDLING_ROUTINE
21
#define ASSUME_IMAGE_TILING
32

43
using AssetRipper.TextureDecoder.Rgb;
@@ -180,10 +179,6 @@ private static uint TwiddleUV(uint ySize, uint xSize, uint yPos, uint xPos)
180179
maxValue = yPos;
181180
}
182181

183-
#if DISABLE_TWINDDLING_ROUTINE
184-
// nasty hack to disable twiddling
185-
return (yPos * xSize + xPos);
186-
#else
187182
// step through all the bits in the "minimum" dimension
188183
uint srcBitPos = 1;
189184
uint dstBitPos = 1;
@@ -211,7 +206,6 @@ private static uint TwiddleUV(uint ySize, uint xSize, uint yPos, uint xPos)
211206
maxValue >>= shiftCount;
212207
twiddled |= (maxValue << (2 * shiftCount));
213208
return twiddled;
214-
#endif
215209
}
216210

217211
/// <summary>

0 commit comments

Comments
 (0)