-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
91 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
@echo off | ||
:: Paths | ||
set INPUT_FILE=anims.dmp | ||
set OUTPUT_FILE=animscache.dmp | ||
set OFFSET=0x1030000 | ||
|
||
copy "%INPUT_FILE%" "%OUTPUT_FILE%" | ||
|
||
:: Convert OFFSET from hex to decimal | ||
for /f "tokens=1 delims=" %%i in ('powershell -command "[convert]::ToInt64('%OFFSET%',16)"') do set DEC_OFFSET=%%i | ||
|
||
:: Set an optimized block size (e.g., 1/16th of a MB = 65536 bytes) | ||
set BLOCK_SIZE=65536 | ||
|
||
:: Calculate the number of blocks to skip | ||
set /a SKIP_BLOCKS=%DEC_OFFSET% / %BLOCK_SIZE% | ||
|
||
echo Truncating %OUTPUT_FILE% to start at offset %OFFSET% (decimal: %DEC_OFFSET%), using block size %BLOCK_SIZE%... | ||
|
||
:: Use dd with larger block size | ||
dd if=%OUTPUT_FILE% of=tmp_%OUTPUT_FILE% bs=%BLOCK_SIZE% skip=%SKIP_BLOCKS% | ||
|
||
if %ERRORLEVEL%==0 ( | ||
echo Truncation successful. Replacing original file... | ||
move /y tmp_%OUTPUT_FILE% %OUTPUT_FILE% | ||
echo %OUTPUT_FILE% has been updated. | ||
) else ( | ||
echo Truncation failed. | ||
del tmp_%OUTPUT_FILE% | ||
) | ||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.