Skip to content

Commit

Permalink
fix function names
Browse files Browse the repository at this point in the history
  • Loading branch information
DubbleClick committed Sep 4, 2024
1 parent b0a20ab commit 6b9bf3a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 23 deletions.
38 changes: 18 additions & 20 deletions SourceFiles/AtexAsm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ void __declspec(naked) AtexSubCode1()
}
}

void AtexSubCode1_Asm(unsigned int a, unsigned int b, unsigned int c)
void AtexSubCode1_Asm(uint32_t* array1, uint32_t* array2, unsigned int count)
{
__asm {
mov ecx, a
mov edx, b
push c
mov ecx, array1
mov edx, array2
push count
call AtexSubCode1
}
}
Expand Down Expand Up @@ -300,16 +300,15 @@ void __declspec(naked) AtexSubCode2()
}
}

void AtexSubCode2_Asm(unsigned int a, unsigned int b, unsigned int c, unsigned int d, unsigned int e,
unsigned int f)
void AtexSubCode2_Asm(uint32_t* outBuffer, uint32_t* dcmpBuffer1, uint32_t* dcmpBuffer2, SImageData* imageData, unsigned int blockCount, unsigned int blockSize)
{
__asm {
mov ecx, a
mov edx, b
push f
push e
push d
push c
mov ecx, outBuffer
mov edx, dcmpBuffer1
push blockSize
push blockCount
push imageData
push dcmpBuffer2
call AtexSubCode2
}
}
Expand Down Expand Up @@ -669,16 +668,15 @@ void __declspec(naked) AtexSubCode3()
}
}

void AtexSubCode3_(unsigned int a, unsigned int b, unsigned int c, unsigned int d, unsigned int e,
unsigned int f)
void AtexSubCode3_Asm(uint32_t* outBuffer, uint32_t* dcmpBuffer1, uint32_t* dcmpBuffer2, SImageData* imageData, unsigned int blockCount, unsigned int blockSize)
{
__asm {
mov ecx, a
mov edx, b
push f
push e
push d
push c
mov ecx, outBuffer
mov edx, dcmpBuffer1
push blockSize
push blockCount
push imageData
push dcmpBuffer2
call AtexSubCode3
}
}
Expand Down
6 changes: 3 additions & 3 deletions SourceFiles/AtexDecompress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ void AtexDecompress(unsigned int* InputBuffer, unsigned int BufferSize, unsigned
if (CompressionCode & 0x10 && ImageData.xres == 256 && ImageData.yres == 256 &&
(ImageFormat == 0x11 || ImageFormat == 0x10))
{
DecompressUnknownAtexRoutine(DcmpBuffer1, DcmpBuffer2, BlockCount);
AtexSubCode1_Asm(DcmpBuffer1, DcmpBuffer2, BlockCount);
}
if (CompressionCode & 1 && ColorDataSize && ! AlphaDataSize && ! AlphaDataSize2)
{
DecompressAtex1Routine(OutBuffer, DcmpBuffer1, DcmpBuffer2, &ImageData, BlockCount, BlockSize);
AtexSubCode2_Asm(OutBuffer, DcmpBuffer1, DcmpBuffer2, &ImageData, BlockCount, BlockSize);
}
if (CompressionCode & 2 && ImageFormat >= 0x10 && ImageFormat <= 0x11)
{
DecompressAtex2Routine(OutBuffer, DcmpBuffer1, DcmpBuffer2, &ImageData, BlockCount, BlockSize);
AtexSubCode3_Asm(OutBuffer, DcmpBuffer1, DcmpBuffer2, &ImageData, BlockCount, BlockSize);
}
if (CompressionCode & 4 && ImageFormat >= 0x12 && ImageFormat <= 0x15)
{
Expand Down

0 comments on commit 6b9bf3a

Please sign in to comment.