mirror of
https://github.com/zeldaret/tp
synced 2026-09-01 17:49:58 -04:00
d_camera / m_Do_ext / d_particle + minor various wip (#210)
This commit is contained in:
@@ -314,7 +314,7 @@ bool cM3d_Cross_AabCyl(const cM3dGAab* pAab, const cM3dGCyl* pCyl) {
|
||||
|
||||
/* 80268BB4-80268C5C 2634F4 00A8+00 0/0 2/2 0/0 .text cM3d_Cross_AabSph__FPC8cM3dGAabPC8cM3dGSph
|
||||
*/
|
||||
#ifdef NON_MATCHING
|
||||
#ifdef NONMATCHING
|
||||
bool cM3d_Cross_AabSph(const cM3dGAab* pAab, const cM3dGSph* pSph) {
|
||||
f32 radius = pSph->GetR();
|
||||
if (pAab->GetMinX() > pSph->GetC().GetX() + radius) { // addition registers are flipped
|
||||
@@ -346,7 +346,7 @@ asm bool cM3d_Cross_AabSph(cM3dGAab const* param_0, cM3dGSph const* param_1) {
|
||||
|
||||
/* 80268C5C-80268ED4 26359C 0278+00 3/3 0/0 0/0 .text
|
||||
* cM3d_Check_LinLin__FPC8cM3dGLinPC8cM3dGLinPfPf */
|
||||
#ifdef NON_MATCHING
|
||||
#ifdef NONMATCHING
|
||||
int cM3d_Check_LinLin(const cM3dGLin* pLinA, const cM3dGLin* pLinB, f32* pFloatA, f32* pFloatB) {
|
||||
Vec linAVec;
|
||||
Vec linBVec;
|
||||
@@ -425,7 +425,7 @@ static bool cM3d_CrossInfLineVsInfPlane_proc(f32 pFloatA, f32 pFloatB, const Vec
|
||||
|
||||
/* 80268F34-80269050 263874 011C+00 3/3 1/1 0/0 .text
|
||||
* cM3d_Cross_LinPla__FPC8cM3dGLinPC8cM3dGPlaP3Vecbb */
|
||||
#ifdef NON_MATCHING
|
||||
#ifdef NONMATCHING
|
||||
bool cM3d_Cross_LinPla(const cM3dGLin* pLine, const cM3dGPla* pPlane, Vec* pVecOut, bool pBoolA,
|
||||
bool pBoolB) {
|
||||
f32 startVal = pPlane->getPlaneFunc(&pLine->GetStartP());
|
||||
|
||||
@@ -11,10 +11,6 @@ extern "C" static void cPhs_UnCompleate__FP30request_of_phase_process_class();
|
||||
extern "C" static void cPhs_Compleate__FP30request_of_phase_process_class();
|
||||
extern "C" static void cPhs_Next__FP30request_of_phase_process_class();
|
||||
|
||||
//
|
||||
// External References:
|
||||
//
|
||||
|
||||
//
|
||||
// Declarations:
|
||||
//
|
||||
@@ -22,14 +18,14 @@ extern "C" static void cPhs_Next__FP30request_of_phase_process_class();
|
||||
/* 80266624-80266630 000C+00 s=1 e=2 z=0 None .text
|
||||
* cPhs_Reset__FP30request_of_phase_process_class */
|
||||
void cPhs_Reset(request_of_phase_process_class* pPhase) {
|
||||
pPhase->mPhaseStep = 0;
|
||||
pPhase->id = cPhs_ZERO_e;
|
||||
}
|
||||
|
||||
/* 80266630-80266640 0010+00 s=0 e=3 z=0 None .text
|
||||
* cPhs_Set__FP30request_of_phase_process_classPPFPv_i */
|
||||
void cPhs_Set(request_of_phase_process_class* pPhase, cPhs__Handler* pHandlerTable) {
|
||||
pPhase->mpHandlerTable = pHandlerTable;
|
||||
pPhase->mPhaseStep = 0;
|
||||
pPhase->id = cPhs_ZERO_e;
|
||||
}
|
||||
|
||||
/* 80266640-80266668 0028+00 s=1 e=0 z=0 None .text
|
||||
@@ -50,15 +46,15 @@ int cPhs_Compleate(request_of_phase_process_class* pPhase) {
|
||||
*/
|
||||
int cPhs_Next(request_of_phase_process_class* pPhase) {
|
||||
if (const cPhs__Handler* handlerTable = pPhase->mpHandlerTable) {
|
||||
pPhase->mPhaseStep++;
|
||||
cPhs__Handler handler = handlerTable[pPhase->mPhaseStep];
|
||||
pPhase->id++;
|
||||
cPhs__Handler handler = handlerTable[pPhase->id];
|
||||
|
||||
// Double null check here actually matters for emitted assembly.
|
||||
// Wee old compilers.
|
||||
if (handler == NULL || handler == NULL) {
|
||||
return cPhs_Compleate(pPhase);
|
||||
} else {
|
||||
return 1;
|
||||
return cPhs_ONE_e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,35 +63,33 @@ int cPhs_Next(request_of_phase_process_class* pPhase) {
|
||||
|
||||
/* 802666D8-802667AC 00D4+00 s=1 e=3 z=0 None .text cPhs_Do__FP30request_of_phase_process_classPv
|
||||
*/
|
||||
#if NON_MATCHING
|
||||
#ifdef NONMATCHING
|
||||
int cPhs_Do(request_of_phase_process_class* pPhase, void* pUserData) {
|
||||
if (const cPhs__Handler* pHandlerTable = pPhase->mpHandlerTable) {
|
||||
// the load of pUserData seems to be slightly scrambled..
|
||||
const cPhs__Handler pHandler = pHandlerTable[pPhase->mPhaseStep];
|
||||
const cPhs__Handler pHandler = pHandlerTable[pPhase->id];
|
||||
const int newStep = pHandler(pUserData);
|
||||
|
||||
switch (newStep) {
|
||||
case 1:
|
||||
case cPhs_ONE_e:
|
||||
return cPhs_Next(pPhase);
|
||||
case 2: {
|
||||
case cPhs_TWO_e:
|
||||
const int step2 = cPhs_Next(pPhase);
|
||||
return step2 == 1 ? 2 : cPhs_COMPLEATE_e;
|
||||
}
|
||||
return step2 == cPhs_ONE_e ? cPhs_TWO_e : cPhs_COMPLEATE_e;
|
||||
case cPhs_COMPLEATE_e:
|
||||
return cPhs_Compleate(pPhase);
|
||||
case 3: {
|
||||
case cPhs_UNK3_e:
|
||||
cPhs_UnCompleate(pPhase);
|
||||
return 3;
|
||||
}
|
||||
return cPhs_UNK3_e;
|
||||
case cPhs_ERROR_e:
|
||||
cPhs_UnCompleate(pPhase);
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
return newStep;
|
||||
} else {
|
||||
return cPhs_Compleate(pPhase);
|
||||
}
|
||||
|
||||
return cPhs_Compleate(pPhase);
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
|
||||
Reference in New Issue
Block a user