REDRIVER2/src_rebuild/GAME/ASM/RNDRASM.MIP
Ilya Shurumov c40d40bd22 - added sources rebuilt with TDR and partially decompiled intro sequence
- moved necessary data to new sources
- running intro with TOMB5 HLE emulator
2020-03-28 03:25:35 +06:00

163 lines
4.7 KiB
Plaintext

// WARNING: This file's extension ('.MIP') indicates that it may not have been a C or C++ file.
// It should contain Ghidra's best effort at decompiling the machine language to C,
// but TDR does not currently attempt to handle assembly language or other non-C/C++ code differently,
// so any decompiled code below may not reflect the original project source code for this file.
// If the source file is from a library, you should replace it with the original library version of the file.
// Otherwise, manual reconstruction of the code may be required,
// Especially if the original source code was assembly language which used hardware features inaccessible to C.
#include "THISDUST.H"
#include "RNDRASM.H"
// autogenerated function stub:
// void texture_pages() /* texture_pages method signature is not contained in the debug symbol data. This is likely either a library function or the game was compiled without debug symbols. Please refer to the TDR documentation for additional guidance. */
void texture_pages()
{ // line 28, offset 0x0009c574
/* begin block 1 */
// Start line: 57
/* end block 1 */
// End Line: 58
return null;
}
// autogenerated function stub:
// void texture_cluts() /* texture_cluts method signature is not contained in the debug symbol data. This is likely either a library function or the game was compiled without debug symbols. Please refer to the TDR documentation for additional guidance. */
void texture_cluts()
{ // line 30, offset 0x0009c674
/* begin block 1 */
// Start line: 61
/* end block 1 */
// End Line: 62
/* begin block 2 */
// Start line: 62
/* end block 2 */
// End Line: 63
return null;
}
// decompiled code
// original method signature:
// void Apply_InvCameraMatrixAndSetMatrix() /* Apply_InvCameraMatrixAndSetMatrix method signature is not contained in the debug symbol data. This is likely either a library function or the game was compiled without debug symbols. Please refer to the TDR documentation for additional guidance. */
// line 271, offset 0x000419a8
/* begin block 1 */
// Start line: 543
/* end block 1 */
// End Line: 544
/* begin block 2 */
// Start line: 544
/* end block 2 */
// End Line: 545
/* begin block 3 */
// Start line: 545
/* end block 3 */
// End Line: 546
/* begin block 4 */
// Start line: 546
/* end block 4 */
// End Line: 547
int Apply_InvCameraMatrixAndSetMatrix(int *param_1,undefined4 *param_2)
{
undefined4 uVar1;
int iVar2;
int iVar3;
int iVar4;
iVar2 = getCopControlWord(2,0xa800);
iVar3 = getCopControlWord(2,0xb000);
iVar4 = getCopControlWord(2,0xb800);
setCopReg(2,0x4800,(*param_1 - iVar2) * 0x10000 >> 0x10);
setCopReg(2,0x5000,(param_1[1] - iVar3) * 0x10000 >> 0x10);
setCopReg(2,0x5800,(param_1[2] - iVar4) * 0x10000 >> 0x10);
copFunction(2,0x4de012);
setCopControlWord(2,0,*param_2);
setCopControlWord(2,0x800,param_2[1]);
setCopControlWord(2,0x1000,param_2[2]);
setCopControlWord(2,0x1800,param_2[3]);
setCopControlWord(2,0x2000,param_2[4]);
iVar3 = getCopReg(2,0x4800);
uVar1 = getCopReg(2,0x5000);
iVar2 = getCopReg(2,0x5800);
setCopControlWord(2,0x2800,iVar3);
setCopControlWord(2,0x3000,uVar1);
setCopControlWord(2,0x3800,iVar2);
iVar3 = iVar3 >> 1;
if (iVar3 < 0) {
return iVar2 - iVar3;
}
return iVar2 + iVar3;
}
// decompiled code
// original method signature:
// void Apply_InvCameraMatrixSetTrans() /* Apply_InvCameraMatrixSetTrans method signature is not contained in the debug symbol data. This is likely either a library function or the game was compiled without debug symbols. Please refer to the TDR documentation for additional guidance. */
// line 327, offset 0x00041a50
/* begin block 1 */
// Start line: 655
/* end block 1 */
// End Line: 656
/* begin block 2 */
// Start line: 656
/* end block 2 */
// End Line: 657
/* begin block 3 */
// Start line: 657
/* end block 3 */
// End Line: 658
/* begin block 4 */
// Start line: 658
/* end block 4 */
// End Line: 659
/* begin block 5 */
// Start line: 659
/* end block 5 */
// End Line: 660
int Apply_InvCameraMatrixSetTrans(int *param_1)
{
undefined4 uVar1;
int iVar2;
int iVar3;
int iVar4;
iVar2 = getCopControlWord(2,0xa800);
iVar3 = getCopControlWord(2,0xb000);
iVar4 = getCopControlWord(2,0xb800);
setCopReg(2,0x4800,(*param_1 - iVar2) * 0x10000 >> 0x10);
setCopReg(2,0x5000,(param_1[1] - iVar3) * 0x10000 >> 0x10);
setCopReg(2,0x5800,(param_1[2] - iVar4) * 0x10000 >> 0x10);
copFunction(2,0x4de012);
iVar3 = getCopReg(2,0x4800);
uVar1 = getCopReg(2,0x5000);
iVar2 = getCopReg(2,0x5800);
setCopControlWord(2,0x2800,iVar3);
setCopControlWord(2,0x3000,uVar1);
setCopControlWord(2,0x3800,iVar2);
iVar3 = iVar3 >> 1;
if (iVar3 < 0) {
return iVar2 - iVar3;
}
return iVar2 + iVar3;
}