# -*- coding: utf-8 -*- # Extraido e limpo do blob original (fix_stex_pc.py) durante a organizacao do projeto. # Caminhos absolutos para GOGVersion/VitaBuild estao embutidos no script. """ REVERT the broken bulk stex fix. What fix_all_stex.py did INCORRECTLY: The correct Godot 3 StreamTexture WebP format is: [28:32] = b'WEBP' <- Godot prefix [32:36] = b'RIFF' <- start of actual RIFF WebP data ← CORRECT, not a bug! [36:N] = rest of RIFF WebP fix_all_stex.py saw 'RIFF' at [32:36] and inserted a size field, producing: [28:32] = b'WEBP' [32:36] = numeric_size <- WRONG insertion [36:40] = b'RIFF' <- RIFF WebP pushed +4 bytes This broke PC (WebPDecodeRGBA receives garbage before 'RIFF'). This script detects and removes the incorrectly inserted size field, restoring all files to the original working format. """ import struct, os import_dir = r'C:\Users\wolff\Documents\SDKVita\Dome Keeper.v5.0.4\GOGVersion\VitaBuild\.import' RIFF_BYTES = b'RIFF' RIFF_AS_INT = struct.unpack('