Fix camera_class view member

This commit is contained in:
LagoLunatic
2026-08-17 23:24:18 -04:00
parent a01d1af37b
commit a1c70c7ede
39 changed files with 235 additions and 234 deletions
+2 -1
View File
@@ -6,8 +6,9 @@
typedef struct leafdraw_method_class leafdraw_method_class;
class camera_class : public view_class {
class camera_class {
public:
/* 0x000 */ view_class view;
/* 0x210 */ create_tag_class draw_tag;
/* 0x224 */ leafdraw_method_class* mpMtd;
/* 0x228 */ u8 field_0x228[4];
+13 -13
View File
@@ -21,35 +21,35 @@ inline void fopCamM_SetAngleZ(camera_class* i_camera, s16 angleZ) {
}
inline void fopCamM_SetNear(camera_class* i_this, f32 near) {
i_this->mNear = near;
i_this->view.mNear = near;
}
inline void fopCamM_SetFar(camera_class* i_this, f32 far) {
i_this->mFar = far;
i_this->view.mFar = far;
}
inline void fopCamM_SetFovy(camera_class* i_this, f32 fovy) {
i_this->mFovy = fovy;
i_this->view.mFovy = fovy;
}
inline void fopCamM_SetAspect(camera_class* i_this, f32 aspect) {
i_this->mAspect = aspect;
i_this->view.mAspect = aspect;
}
inline void fopCamM_SetEye(camera_class* i_this, f32 x, f32 y, f32 z) {
i_this->mLookat.mEye.set(x, y, z);
i_this->view.mLookat.mEye.set(x, y, z);
}
inline void fopCamM_SetCenter(camera_class* i_this, f32 x, f32 y, f32 z) {
i_this->mLookat.mCenter.set(x, y, z);
i_this->view.mLookat.mCenter.set(x, y, z);
}
inline void fopCamM_SetUp(camera_class* i_this, f32 x, f32 y, f32 z) {
i_this->mLookat.mUp.set(x, y, z);
i_this->view.mLookat.mUp.set(x, y, z);
}
inline void fopCamM_SetBank(camera_class* i_this, s16 bank) {
i_this->mBank = bank;
i_this->view.mBank = bank;
}
inline void fopCamM_SetPrm1(camera_class* i_this, int prm1) {
@@ -77,24 +77,24 @@ inline s16 fopCamM_GetAngleZ(camera_class* i_camera) {
}
inline f32 fopCamM_GetFovy(camera_class* i_camera) {
return i_camera->mFovy;
return i_camera->view.mFovy;
}
inline cXyz* fopCamM_GetEye_p(camera_class* i_camera) {
return &i_camera->mLookat.mEye;
return &i_camera->view.mLookat.mEye;
}
inline cXyz* fopCamM_GetCenter_p(camera_class* i_camera) {
return &i_camera->mLookat.mCenter;
return &i_camera->view.mLookat.mCenter;
}
inline cXyz* fopCamM_GetUp_p(camera_class* i_camera) {
return &i_camera->mLookat.mUp;
return &i_camera->view.mLookat.mUp;
}
inline s16 fopCamM_GetBank(camera_class* i_camera) {
return i_camera->mBank;
return i_camera->view.mBank;
}
fpc_ProcID fopCamM_Create(int i_cameraIdx, s16 pProcName, void* i_append);
+5 -5
View File
@@ -1297,8 +1297,8 @@ static void wind_set(bdk_class* i_this, cXyz* param2) {
}
}
camera = (camera_process_class*)dComIfGp_getCamera(0);
vec2 = actor->eyePos - camera->mLookat.mEye;
wind_se_pos = actor->eyePos + (camera->mLookat.mEye - actor->eyePos) * 0.8f;
vec2 = actor->eyePos - camera->view.mLookat.mEye;
wind_se_pos = actor->eyePos + (camera->view.mLookat.mEye - actor->eyePos) * 0.8f;
mDoAud_seStart(JA_SE_CM_DK_WIND, &wind_se_pos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(actor)));
}
@@ -3120,9 +3120,9 @@ static void demo_camera(bdk_class* i_this) {
camera->mCamera.SetTrimSize(2);
camera_process_class* pCamera = dComIfGp_getCamera(0);
i_this->m25A8 = pCamera->mLookat.mEye;
local_104.x = pCamera->mLookat.mEye.x - i_this->m1150.x;
local_104.z = pCamera->mLookat.mEye.z - i_this->m1150.z;
i_this->m25A8 = pCamera->view.mLookat.mEye;
local_104.x = pCamera->view.mLookat.mEye.x - i_this->m1150.x;
local_104.z = pCamera->view.mLookat.mEye.z - i_this->m1150.z;
i_this->m25C0.y = cM_atan2s(local_104.x, local_104.z);
+1 -1
View File
@@ -53,7 +53,7 @@ static BOOL daBdkobj_Draw(bdkobj_class* i_this) {
#if VERSION > VERSION_DEMO
if (i_this->m298 < 2) {
cXyz vec = (a_this->current.pos - dComIfGp_getCamera(0)->mLookat.mEye);
cXyz vec = (a_this->current.pos - dComIfGp_getCamera(0)->view.mLookat.mEye);
if (vec.abs() > REG8_F(10) + 300.0f) {
mDoExt_modelUpdateDL(model);
}
+1 -1
View File
@@ -532,7 +532,7 @@ static void part_draw(bgn_class* i_this, part_s* param_2) {
param_2->mPartTevStr.mFogStartZ = param_2->mPartTevStr.mFogStartZ + param_2->m0CC;
}
camera_process_class* camera = (camera_process_class*)dComIfGp_getCamera(0);
local_38 = param_2->m224 - camera->mLookat.mEye;
local_38 = param_2->m224 - camera->view.mLookat.mEye;
if (local_38.abs() > l_HIO.m008 * param_2->m0F4) {
g_env_light.setLightTevColorType(model, &param_2->mPartTevStr);
if ((actor->health <= 2) && (param_2 == &i_this->mTailParts[BGN_TAIL_MAX - 1])) {
+1 -1
View File
@@ -49,7 +49,7 @@ static BOOL daBita_Draw(bita_class* i_this) {
static void mode_normal(bita_class* i_this) {
if (btd != NULL) {
if (btd->m6E16 >= 100) {
cXyz delta = dComIfGp_getCamera(0)->mLookat.mEye - i_this->current.pos;
cXyz delta = dComIfGp_getCamera(0)->view.mLookat.mEye - i_this->current.pos;
if (delta.abs() < 1500.0f) {
fopAcM_delete(i_this);
}
+6 -6
View File
@@ -3827,14 +3827,14 @@ static void waki_set(bk_class* i_this) {
dPnt* pnt;
int pnt_idx;
sp2C = camera->mLookat.mCenter - camera->mLookat.mEye;
sp2C = camera->view.mLookat.mCenter - camera->view.mLookat.mEye;
cXyz sp20;
s16 r27_1 = cM_atan2s(sp2C.x, sp2C.z);
pnt = i_this->ppd->m_points;
for (int i = 0; i < i_this->ppd->m_num; i++, pnt++) {
sp2C.x = pnt->m_position.x - camera->mLookat.mEye.x;
sp2C.y = pnt->m_position.y - camera->mLookat.mEye.y;
sp2C.z = pnt->m_position.z - camera->mLookat.mEye.z;
sp2C.x = pnt->m_position.x - camera->view.mLookat.mEye.x;
sp2C.y = pnt->m_position.y - camera->view.mLookat.mEye.y;
sp2C.z = pnt->m_position.z - camera->view.mLookat.mEye.z;
cMtx_YrotS(*calc_mtx, -r27_1);
MtxPosition(&sp2C, &sp20);
if (sp20.z < 0.0f) {
@@ -4074,8 +4074,8 @@ static void demo_camera(bk_class* i_this) {
camera->mCamera.SetTrimSize(1);
i_this->m1234 = 51;
r3 = dComIfGp_getCamera(0);
i_this->m1238 = r3->mLookat.mEye;
i_this->m1244 = r3->mLookat.mCenter;
i_this->m1238 = r3->view.mLookat.mEye;
i_this->m1244 = r3->view.mLookat.mCenter;
i_this->m1260 = 55.0f;
i_this->m1236 = 0;
// Fall-through
+4 -4
View File
@@ -1175,8 +1175,8 @@ void demo_camera(bmd_class* i_this) {
}
i_this->mB74++;
camera_process_class* camera2 = dComIfGp_getCamera(0);
i_this->mB7C = camera2->mLookat.mEye;
i_this->mB88 = camera2->mLookat.mCenter;
i_this->mB7C = camera2->view.mLookat.mEye;
i_this->mB88 = camera2->view.mLookat.mCenter;
local_44 = player_actor->current.pos - i_this->mB7C;
i_this->mB96 = cM_atan2s(local_44.x, local_44.z);
camera->mCamera.Stop();
@@ -1428,8 +1428,8 @@ void demo_camera(bmd_class* i_this) {
}
i_this->mB74++;
camera_process_class* camera2 = dComIfGp_getCamera(0);
i_this->mB7C = camera2->mLookat.mEye;
i_this->mB88 = camera2->mLookat.mCenter;
i_this->mB7C = camera2->view.mLookat.mEye;
i_this->mB88 = camera2->view.mLookat.mCenter;
camera->mCamera.Stop();
camera->mCamera.SetTrimSize(2);
i_this->mB9C = 55.0f;
+1 -1
View File
@@ -123,7 +123,7 @@ void Env_c::proc(const cXyz& param_1) {
mPntLight.mPower = field_0x50 * 1500.0f;
mPntWind.mStrength = field_0x50;
f32 temp = param_1.abs(camera->mLookat.mEye);
f32 temp = param_1.abs(camera->view.mLookat.mEye);
if(temp < 1500.0f) {
temp2 = 1.0f - (temp * (1.0f / 1500.0f));
+1 -1
View File
@@ -899,7 +899,7 @@ bool daBomb_c::procExplode() {
mPntLight.mPower = f31 * field_0x778;
mPntWind.mStrength = field_0x778;
f32 temp = current.pos.abs(camera->mLookat.mEye);
f32 temp = current.pos.abs(camera->view.mLookat.mEye);
if(temp < f31) {
temp2 = 1.0f - (temp / f31);
+2 -2
View File
@@ -850,7 +850,7 @@ static BOOL daBridge_Execute(bridge_class* i_this) {
camera_process_class* pCam = dComIfGp_getCamera(0);
s32 i;
cXyz eyeDir = i_this->actor.current.pos - pCam->mLookat.mEye;
cXyz eyeDir = i_this->actor.current.pos - pCam->view.mLookat.mEye;
cXyz spCC;
if (i_this->m033C != 0) {
@@ -858,7 +858,7 @@ static BOOL daBridge_Execute(bridge_class* i_this) {
}
if (eyeDir.abs() > 5000.0f) {
spCC = pCam->mLookat.mCenter - pCam->mLookat.mEye;
spCC = pCam->view.mLookat.mCenter - pCam->view.mLookat.mEye;
s16 atan = cM_atan2s(spCC.x, spCC.z);
cMtx_YrotS(*calc_mtx, -atan);
MtxPosition(&eyeDir, &spCC);
+4 -4
View File
@@ -2091,10 +2091,10 @@ static void demo_camera(btd_class* i_this) {
}
i_this->m6E3C = REG0_F(12) + 50.0f;
camera2 = dComIfGp_getCamera(0);
i_this->m6E1C.x = dComIfGp_getCamera(0)->mLookat.mEye.x;
i_this->m6E1C.y = camera2->mLookat.mEye.y;
i_this->m6E1C.z = camera2->mLookat.mEye.z;
i_this->m6E28 = camera2->mLookat.mCenter;
i_this->m6E1C.x = dComIfGp_getCamera(0)->view.mLookat.mEye.x;
i_this->m6E1C.y = camera2->view.mLookat.mEye.y;
i_this->m6E1C.z = camera2->view.mLookat.mEye.z;
i_this->m6E28 = camera2->view.mLookat.mCenter;
camera->mCamera.Stop();
camera->mCamera.SetTrimSize(2);
break;
+4 -4
View File
@@ -1459,8 +1459,8 @@ static void demo_camera(bwd_class* i_this) {
}
i_this->m3C1E++;
camera2 = dComIfGp_getCamera(0);
i_this->m3C28 = camera2->mLookat.mEye;
i_this->m3C34 = camera2->mLookat.mCenter;
i_this->m3C28 = camera2->view.mLookat.mEye;
i_this->m3C34 = camera2->view.mLookat.mCenter;
camera->mCamera.Stop();
camera->mCamera.SetTrimSize(2);
i_this->m3C20 = 0;
@@ -1648,8 +1648,8 @@ static void demo_camera(bwd_class* i_this) {
i_this->m3C22 = 0;
i_this->m3C48 = 55.0f;
camera2 = dComIfGp_getCamera(0);
i_this->m3C28 = camera2->mLookat.mEye;
i_this->m3C34 = camera2->mLookat.mCenter;
i_this->m3C28 = camera2->view.mLookat.mEye;
i_this->m3C34 = camera2->view.mLookat.mCenter;
i_this->m3C44 = 0.0f;
player2->changeOriginalDemo();
set_pos.x = actor->current.pos.x - 100.0f;
+2 -2
View File
@@ -1945,8 +1945,8 @@ void demo_camera(fganon_class* i_this) {
camera2 = dComIfGp_getCamera(0);
i_this->mB5C = camera2->mLookat.mEye;
i_this->mB68 = camera2->mLookat.mCenter;
i_this->mB5C = camera2->view.mLookat.mEye;
i_this->mB68 = camera2->view.mLookat.mCenter;
a_this->shape_angle.y = fopAcM_searchPlayerAngleY(a_this);
}
+12 -12
View File
@@ -557,13 +557,13 @@ static fopAc_ac_c* search_target(himo2_class* i_this, cXyz param_2) {
if (f4 < f31) {
cXyz sp24;
camera_process_class* camera = dComIfGp_getCamera(0);
sp24.x = param_2.x - camera->mLookat.mEye.x;
sp24.y = param_2.y - camera->mLookat.mEye.y;
sp24.z = param_2.z - camera->mLookat.mEye.z;
sp24.x = param_2.x - camera->view.mLookat.mEye.x;
sp24.y = param_2.y - camera->view.mLookat.mEye.y;
sp24.z = param_2.z - camera->view.mLookat.mEye.z;
cXyz sp18;
sp18.x = r28->current.pos.x - camera->mLookat.mEye.x;
sp18.y = r28->current.pos.y - camera->mLookat.mEye.y;
sp18.z = r28->current.pos.z - camera->mLookat.mEye.z;
sp18.x = r28->current.pos.x - camera->view.mLookat.mEye.x;
sp18.y = r28->current.pos.y - camera->view.mLookat.mEye.y;
sp18.z = r28->current.pos.z - camera->view.mLookat.mEye.z;
r21 = (s16)cM_atan2s(sp24.x, sp24.z);
r21 = (s16)cM_atan2s(sp18.x, sp18.z) - r21;
if (r21 < 0) {
@@ -876,9 +876,9 @@ static void new_himo2_move(himo2_class* i_this) {
i_this->m02A0 = REG0_S(9) + 10;
i_this->m02A2 = 3;
camera2 = dComIfGp_getCamera(0);
f28 = i_this->m2524.x - camera2->mLookat.mEye.x;
f27 = i_this->m2524.y - camera2->mLookat.mEye.y;
f26_3 = i_this->m2524.z - camera2->mLookat.mEye.z;
f28 = i_this->m2524.x - camera2->view.mLookat.mEye.x;
f27 = i_this->m2524.y - camera2->view.mLookat.mEye.y;
f26_3 = i_this->m2524.z - camera2->view.mLookat.mEye.z;
sp130.z = REG0_F(15) * 100.0f + 1000.0f;
if (std::sqrtf(SQUARE(f28) + SQUARE(f27) + SQUARE(f26_3)) > sp130.z) {
r24_2 = cM_atan2s(f28, f26_3);
@@ -888,9 +888,9 @@ static void new_himo2_move(himo2_class* i_this) {
sp130.x = 0.0f;
sp130.y = 0.0f;
MtxPosition(&sp130, &sp124);
i_this->m2524.x = camera2->mLookat.mEye.x + sp124.x;
i_this->m2524.y = camera2->mLookat.mEye.y + sp124.y;
i_this->m2524.z = camera2->mLookat.mEye.z + sp124.z;
i_this->m2524.x = camera2->view.mLookat.mEye.x + sp124.x;
i_this->m2524.y = camera2->view.mLookat.mEye.y + sp124.y;
i_this->m2524.z = camera2->view.mLookat.mEye.z + sp124.z;
}
himo2_s* phVar18 = i_this->m0310;
if (r30 != 0) {
+2 -2
View File
@@ -25,7 +25,7 @@ void draw_SUB(ks_class* i_this) {
J3DModel* pBodyModel = i_this->mpBodyMorf->getModel();
J3DModel* pEyeModel = i_this->mpEyeMorf->getModel();
cXyz local_24 = dComIfGp_getCamera(0)->mLookat.mEye - actor->current.pos;
cXyz local_24 = dComIfGp_getCamera(0)->view.mLookat.mEye - actor->current.pos;
int iVar3 = cM_atan2s(local_24.x, local_24.z);
int iVar4 = (s16)-cM_atan2s(local_24.y, std::sqrtf(SQUARE(local_24.x) + SQUARE(local_24.z)));
@@ -70,7 +70,7 @@ static BOOL daKS_Draw(ks_class* i_this) {
fopAc_ac_c* actor = &i_this->actor;
#if VERSION > VERSION_DEMO
cXyz local_24 = actor->current.pos - dComIfGp_getCamera(0)->mLookat.mEye;
cXyz local_24 = actor->current.pos - dComIfGp_getCamera(0)->view.mLookat.mEye;
if (local_24.abs() < REG0_F(10) + 100.0f) {
return TRUE;
}
+1 -1
View File
@@ -56,7 +56,7 @@ static void setEffectMtx(fopAc_ac_c* a_this, J3DModelData* modelData, float scal
cXyz& eyePos = a_this->eyePos;
camera_class* camera = dCam_getCamera();
cXyz look_dir = eyePos - camera->mLookat.mEye;
cXyz look_dir = eyePos - camera->view.mLookat.mEye;
cXyz light_dir;
dKyr_get_vectle_calc(&a_this->tevStr.mLightPosWorld, &eyePos, &light_dir);
+2 -2
View File
@@ -19,12 +19,12 @@ cXyz get_check_pos(kytag00_class* i_this) {
camera_process_class * pCamera = (camera_process_class*)dComIfGp_getCamera(0);
fopAc_ac_c * pPlayer = dComIfGp_getPlayer(0);
f32 cameraDist = actor->current.pos.abs(pCamera->mLookat.mEye);
f32 cameraDist = actor->current.pos.abs(pCamera->view.mLookat.mEye);
f32 playerDist = actor->current.pos.abs(pPlayer->current.pos);
if (dComIfGp_event_runCheck() && i_this->mMode == 0) {
if (cameraDist < playerDist) {
ret = pCamera->mLookat.mEye;
ret = pCamera->view.mLookat.mEye;
} else {
ret = pPlayer->current.pos;
}
+7 -7
View File
@@ -86,20 +86,20 @@ static BOOL daKytag05_Execute(kytag05_class* a_this) {
}
}
if((camera->mLookat.mEye.z > 1445.0f || player->current.pos.z > 1445.0f) &&
(camera->mLookat.mEye.x > 520.0f || player->current.pos.x > 520.0f)){
if(camera->mLookat.mEye.z > 2100.0f || player->current.pos.z > 2100.0f) {
if((camera->view.mLookat.mEye.z > 1445.0f || player->current.pos.z > 1445.0f) &&
(camera->view.mLookat.mEye.x > 520.0f || player->current.pos.x > 520.0f)){
if(camera->view.mLookat.mEye.z > 2100.0f || player->current.pos.z > 2100.0f) {
dKyw_evt_wind_set(0, 0x61A8);
} else if(camera->mLookat.mEye.z > 1970.0f || player->current.pos.z > 1970.0f) {
} else if(camera->view.mLookat.mEye.z > 1970.0f || player->current.pos.z > 1970.0f) {
dKyw_evt_wind_set(0, 0x4E20);
} else {
dKyw_evt_wind_set(0, 0x4650);
}
} else if(camera->mLookat.mEye.z < -4085.0f || player->current.pos.z < -4085.0f) {
} else if(camera->view.mLookat.mEye.z < -4085.0f || player->current.pos.z < -4085.0f) {
dKyw_evt_wind_set(0, -0x3E80);
} else if(camera->mLookat.mEye.z < -3108.0f || player->current.pos.z < -3108.0f) {
} else if(camera->view.mLookat.mEye.z < -3108.0f || player->current.pos.z < -3108.0f) {
dKyw_evt_wind_set(0, -0x4B00);
} else if(camera->mLookat.mEye.z < -1412.0f || player->current.pos.z < -1412.0f) {
} else if(camera->view.mLookat.mEye.z < -1412.0f || player->current.pos.z < -1412.0f) {
dKyw_evt_wind_set(0, -0x32C8);
}
+2 -2
View File
@@ -3308,8 +3308,8 @@ static void mo2_demo_camera(mo2_class* i_this) {
camera->SetTrimSize(1);
i_this->m2A1D = 0x33;
camera2 = dComIfGp_getCamera(0);
i_this->m2A20 = camera2->mLookat.mEye;
i_this->m2A2C = camera2->mLookat.mCenter;
i_this->m2A20 = camera2->view.mLookat.mEye;
i_this->m2A2C = camera2->view.mLookat.mCenter;
i_this->m2A44 = 55.0f;
i_this->m2A1E = 0;
// Fall-through
+1 -1
View File
@@ -1718,7 +1718,7 @@ BOOL daNpc_Rsh1_c::_execute() {
}
#endif
cXyz center = dComIfGp_getCamera(0)->mLookat.mCenter;
cXyz center = dComIfGp_getCamera(0)->view.mLookat.mCenter;
cXyz lookat_diff = center - current.pos;
f32 lookat_dist = lookat_diff.abs();
+1 -1
View File
@@ -605,7 +605,7 @@ void daObjDoguu_c::setEffectMtx(const cXyz* i_pos, float i_scale) {
float scale = 1.0f /i_scale;
camera_class* camera = dCam_getCamera();
cXyz lookDir = *i_pos - camera->mLookat.mEye;
cXyz lookDir = *i_pos - camera->view.mLookat.mEye;
cXyz lightDir;
cXyz refl;
+1 -1
View File
@@ -478,7 +478,7 @@ void daObjIce_c::setEffectMtx() {
#endif
camera_class* camera = dCam_getCamera();
sp2C = *eye - camera->mLookat.mEye;
sp2C = *eye - camera->view.mLookat.mEye;
dKyr_get_vectle_calc(&tevStr.mLightPosWorld, eye, &sp20);
C_VECHalfAngle(&sp2C, &sp20, &sp14);
C_MTXLookAt(sp98, &cXyz::Zero, &cXyz::BaseY, &sp14);
+1 -1
View File
@@ -325,7 +325,7 @@ void daObjZouk::Act_c::setEffectMtx(const cXyz* pos, f32 scaleMag) {
f32 inv = 1.0f / scaleMag;
camera_class * camera = dCam_getCamera();
cXyz lookDir = *pos - camera->mLookat.mEye;
cXyz lookDir = *pos - camera->view.mLookat.mEye;
cXyz lightDir;
cXyz refl;
+1 -1
View File
@@ -239,7 +239,7 @@ void action_dousa(pw_class* i_this) {
}
break;
case 11:
dKyr_get_vectle_calc(&i_this->current.pos, &camera->mLookat.mEye, &camfwd);
dKyr_get_vectle_calc(&i_this->current.pos, &camera->view.mLookat.mEye, &camfwd);
i_this->mActorPlace.pos.x = i_this->m2CC.x + camfwd.x * 150.0f;
i_this->mActorPlace.pos.y = i_this->m2CC.y;
i_this->mActorPlace.pos.z = i_this->m2CC.z + camfwd.z * 150.0f;
+2 -2
View File
@@ -2565,8 +2565,8 @@ static void demo_camera(tn_class* i_this) {
i_this->m14F8 = 0x33;
camera_process_class* r3 = dComIfGp_getCamera(0);
i_this->mCameraEyePos = r3->mLookat.mEye;
i_this->mCenterPos = r3->mLookat.mCenter;
i_this->mCameraEyePos = r3->view.mLookat.mEye;
i_this->mCenterPos = r3->view.mLookat.mCenter;
i_this->m1514 = 55.0f;
i_this->m14FA = 0;
}
+2 -2
View File
@@ -155,8 +155,8 @@ BOOL daVrbox2_color_set(vrbox2_class* i_this) {
windPow = 0.6f;
}
eyePosXZ = pCamera->mLookat.mEye;
centerPosXZ = pCamera->mLookat.mCenter;
eyePosXZ = pCamera->view.mLookat.mEye;
centerPosXZ = pCamera->view.mLookat.mCenter;
eyePosXZ.y = 0.0f;
centerPosXZ.y = 0.0f;
+1 -1
View File
@@ -260,7 +260,7 @@ void daWindTag_c::set_wind_se_sub(u32, cXyz* pos) {
void daWindTag_c::set_wind_se() {
f32 radius = scale.x * mData[mType * 2];
camera_process_class* camera = dComIfGp_getCamera(0);
lookat_class* lookat = &camera->mLookat;
lookat_class* lookat = &camera->view.mLookat;
cM3dGCps cps;
cM3dGSph camSph;
+13 -13
View File
@@ -5502,15 +5502,15 @@ static bool camera_draw(camera_process_class* i_this) {
int trim_height = body->mTrimHeight;
window->setScissor(0.0f, trim_height, mDoMch_render_c::getFbWidth(), mDoMch_render_c::getEfbHeight() - trim_height * 2.0f);
C_MTXPerspective(i_this->mProjMtx, i_this->mFovy, i_this->mAspect, i_this->mNear, i_this->mFar);
mDoMtx_lookAt(i_this->mViewMtx, &i_this->mLookat.mEye, &i_this->mLookat.mCenter, &i_this->mLookat.mUp, i_this->mBank);
C_MTXPerspective(i_this->view.mProjMtx, i_this->view.mFovy, i_this->view.mAspect, i_this->view.mNear, i_this->view.mFar);
mDoMtx_lookAt(i_this->view.mViewMtx, &i_this->view.mLookat.mEye, &i_this->view.mLookat.mCenter, &i_this->view.mLookat.mUp, i_this->view.mBank);
j3dSys.setViewMtx(i_this->mViewMtx);
cMtx_inverse(i_this->mViewMtx, i_this->mInvViewMtx);
mDoAud_getCameraInfo(&i_this->mLookat.mEye, j3dSys.mViewMtx, camera_id);
j3dSys.setViewMtx(i_this->view.mViewMtx);
cMtx_inverse(i_this->view.mViewMtx, i_this->view.mInvViewMtx);
mDoAud_getCameraInfo(&i_this->view.mLookat.mEye, j3dSys.mViewMtx, camera_id);
dBgS_GndChk gndchk;
gndchk.SetPos(&i_this->mLookat.mEye);
gndchk.SetPos(&i_this->view.mLookat.mEye);
f32 ground_y = dComIfG_Bgsp()->GroundCross(&gndchk);
if (ground_y != -G_CM3D_F_INF) {
@@ -5518,20 +5518,20 @@ static bool camera_draw(camera_process_class* i_this) {
mDoAud_setCameraGroupInfo(dComIfG_Bgsp()->GetGrpSoundId(gndchk));
Vec spDC;
spDC.x = i_this->mLookat.mEye.x;
spDC.x = i_this->view.mLookat.mEye.x;
spDC.y = ground_y;
spDC.z = i_this->mLookat.mEye.z;
spDC.z = i_this->view.mLookat.mEye.z;
mDoAud_zelAudio_c::getInterface()->setCameraPolygonPos(&spDC);
} else {
mDoAud_zelAudio_c::getInterface()->setCameraPolygonPos(NULL);
}
MTXCopy(i_this->mViewMtx, i_this->mViewMtxNoTrans);
i_this->mViewMtxNoTrans[0][3] = 0.0f;
i_this->mViewMtxNoTrans[1][3] = 0.0f;
i_this->mViewMtxNoTrans[2][3] = 0.0f;
cMtx_concatProjView(i_this->mProjMtx, i_this->mViewMtx, i_this->mProjViewMtx);
MTXCopy(i_this->view.mViewMtx, i_this->view.mViewMtxNoTrans);
i_this->view.mViewMtxNoTrans[0][3] = 0.0f;
i_this->view.mViewMtxNoTrans[1][3] = 0.0f;
i_this->view.mViewMtxNoTrans[2][3] = 0.0f;
cMtx_concatProjView(i_this->view.mProjMtx, i_this->view.mViewMtx, i_this->view.mProjViewMtx);
body->Draw();
+10 -10
View File
@@ -267,16 +267,16 @@ void dDemo_actor_c::JSGSetTextureAnimationFrame(f32 v) {
}
/* 80069D10-80069D44 .text getView__Fv */
camera_process_class* getView() {
view_class* getView() {
if (dComIfGp_getWindowNum() == 0)
return NULL;
return dComIfGp_getCamera(dComIfGp_getWindow(0)->getCameraID());
return &dComIfGp_getCamera(dComIfGp_getWindow(0)->getCameraID())->view;
}
/* 80069D44-80069D78 .text JSGGetProjectionNear__14dDemo_camera_cCFv */
f32 dDemo_camera_c::JSGGetProjectionNear() const {
camera_process_class* view = getView();
view_class* view = getView();
if (view == NULL)
return 0.0f;
return view->mNear;
@@ -290,7 +290,7 @@ void dDemo_camera_c::JSGSetProjectionNear(f32 v) {
/* 80069D8C-80069DC0 .text JSGGetProjectionFar__14dDemo_camera_cCFv */
f32 dDemo_camera_c::JSGGetProjectionFar() const {
camera_process_class* view = getView();
view_class* view = getView();
if (view == NULL)
return 1.0f;
return view->mFar;
@@ -304,7 +304,7 @@ void dDemo_camera_c::JSGSetProjectionFar(f32 v) {
/* 80069DD4-80069E08 .text JSGGetProjectionFovy__14dDemo_camera_cCFv */
f32 dDemo_camera_c::JSGGetProjectionFovy() const {
camera_process_class* view = getView();
view_class* view = getView();
if (view == NULL)
return 60.0f;
return view->mFovy;
@@ -318,7 +318,7 @@ void dDemo_camera_c::JSGSetProjectionFovy(f32 v) {
/* 80069E1C-80069E50 .text JSGGetProjectionAspect__14dDemo_camera_cCFv */
f32 dDemo_camera_c::JSGGetProjectionAspect() const {
camera_process_class* view = getView();
view_class* view = getView();
if (view == NULL)
return (4.0f/3.0f);
return view->mAspect;
@@ -332,7 +332,7 @@ void dDemo_camera_c::JSGSetProjectionAspect(f32 v) {
/* 80069E64-80069EC0 .text JSGGetViewPosition__14dDemo_camera_cCFP3Vec */
void dDemo_camera_c::JSGGetViewPosition(Vec* dst) const {
camera_process_class* view = getView();
view_class* view = getView();
if (view == NULL) {
dst->x = 0.0f;
dst->y = 0.0f;
@@ -349,7 +349,7 @@ void dDemo_camera_c::JSGSetViewPosition(const Vec& v) {
/* 80069EE8-80069F48 .text JSGGetViewUpVector__14dDemo_camera_cCFP3Vec */
void dDemo_camera_c::JSGGetViewUpVector(Vec* dst) const {
camera_process_class* view = getView();
view_class* view = getView();
if (view == NULL) {
dst->x = 0.0f;
dst->y = 1.0f;
@@ -366,7 +366,7 @@ void dDemo_camera_c::JSGSetViewUpVector(const Vec& v) {
/* 80069F70-80069FD0 .text JSGGetViewTargetPosition__14dDemo_camera_cCFP3Vec */
void dDemo_camera_c::JSGGetViewTargetPosition(Vec* dst) const {
camera_process_class* view = getView();
view_class* view = getView();
if (view == NULL) {
dst->x = 0.0f;
dst->y = 0.0f;
@@ -383,7 +383,7 @@ void dDemo_camera_c::JSGSetViewTargetPosition(const Vec& v) {
/* 80069FF8-8006A050 .text JSGGetViewRoll__14dDemo_camera_cCFv */
f32 dDemo_camera_c::JSGGetViewRoll() const {
camera_process_class* view = getView();
view_class* view = getView();
if (view == NULL)
return 0.0f;
return cM_sht2d(view->mBank);
+1 -1
View File
@@ -2079,7 +2079,7 @@ void dDlst_texSpecmapST(const cXyz* pos, const dKy_tevstr_c* tevStr, J3DModelDat
f32 inv = 1.0f / scale;
camera_class * camera = dCam_getCamera();
cXyz lookDir = *pos - camera->mLookat.mEye;
cXyz lookDir = *pos - camera->view.mLookat.mEye;
cXyz refl;
cXyz lightDir;
+14 -14
View File
@@ -595,13 +595,13 @@ void dScnKy_env_light_c::setSunpos() {
sp8.z = std::cosf(DEG2RAD(var_f1)) * -48000.0f;
if (dComIfGp_event_runCheck() == FALSE || g_env_light.mInitAnimTimer != 0) {
mSunPos.x = camera_p->mLookat.mEye.x + sp8.x;
mSunPos.y = camera_p->mLookat.mEye.y - sp8.y;
mSunPos.z = camera_p->mLookat.mEye.z + sp8.z;
mSunPos.x = camera_p->view.mLookat.mEye.x + sp8.x;
mSunPos.y = camera_p->view.mLookat.mEye.y - sp8.y;
mSunPos.z = camera_p->view.mLookat.mEye.z + sp8.z;
mMoonPos.x = camera_p->mLookat.mEye.x - sp8.x;
mMoonPos.y = camera_p->mLookat.mEye.y + sp8.y;
mMoonPos.z = camera_p->mLookat.mEye.z - sp8.z;
mMoonPos.x = camera_p->view.mLookat.mEye.x - sp8.x;
mMoonPos.y = camera_p->view.mLookat.mEye.y + sp8.y;
mMoonPos.z = camera_p->view.mLookat.mEye.z - sp8.z;
}
}
@@ -2474,12 +2474,12 @@ void dKy_setLight() {
fopAc_ac_c* pPlayer = dComIfGp_getPlayer(0);
cXyz camfwd;
MtxP viewMtx = j3dSys.getViewMtx();
dKyr_get_vectle_calc(&pCamera->mLookat.mEye, &pCamera->mLookat.mCenter, &camfwd);
dKyr_get_vectle_calc(&pCamera->view.mLookat.mEye, &pCamera->view.mLookat.mCenter, &camfwd);
// light
{
dKy_setLight__Status& stts = lightStatusPt[0];
stts.mPos2 = pCamera->mLookat.mEye;
stts.mPos2 = pCamera->view.mLookat.mEye;
if (pPlayer != NULL) {
dKy_light_influence_id(pPlayer->current.pos, 0);
}
@@ -2534,7 +2534,7 @@ void dKy_setLight() {
f32 power = dKy_eflight_influence_power(eflight);
f32 v;
if (power > 0.0f) {
v = dKy_eflight_influence_distance(pCamera->mLookat.mEye, eflight) / power;
v = dKy_eflight_influence_distance(pCamera->view.mLookat.mEye, eflight) / power;
} else {
v = 1.0f;
}
@@ -2934,7 +2934,7 @@ void dKy_Itemgetcol_chg_move() {
}
cXyz camfwd;
dKyr_get_vectle_calc(&camera->mLookat.mEye, &camera->mLookat.mCenter, &camfwd);
dKyr_get_vectle_calc(&camera->view.mLookat.mEye, &camera->view.mLookat.mCenter, &camfwd);
f32 cam_distXZ = std::sqrtf(camfwd.x*camfwd.x + camfwd.z*camfwd.z);
s16 angle = cM_atan2s(camfwd.x, camfwd.z) - offsAngle;
camfwd.x = cM_scos(0) * cM_ssin(angle);
@@ -3181,8 +3181,8 @@ void dKy_Sound_set(cXyz pos, int p2, fpc_ProcID p3, int p4) {
camera_process_class* camera = (camera_process_class*)dComIfGp_getCamera(0);
BOOL ret = FALSE;
f32 newDist = pos.abs(camera->mLookat.mEye);
f32 curDist = dKy_getEnvlight().mSound.field_0x0.abs(camera->mLookat.mEye);
f32 newDist = pos.abs(camera->view.mLookat.mEye);
f32 curDist = dKy_getEnvlight().mSound.field_0x0.abs(camera->view.mLookat.mEye);
if (newDist < curDist) {
if (curDist < 1500.0f) {
@@ -3657,7 +3657,7 @@ cXyz dKy_get_moon_pos() {
/* 80197614-80197668 .text dKy_get_hokuto_pos__Fv */
cXyz dKy_get_hokuto_pos() {
const Vec & eyePos = dComIfGp_getCamera(0)->mLookat.mEye;
const Vec & eyePos = dComIfGp_getCamera(0)->view.mLookat.mEye;
cXyz pos;
pos.x = eyePos.x + 10300.0f;
pos.y = eyePos.y + 13450.0f;
@@ -3667,7 +3667,7 @@ cXyz dKy_get_hokuto_pos() {
/* 80197668-801976BC .text dKy_get_orion_pos__Fv */
cXyz dKy_get_orion_pos() {
const Vec & eyePos = dComIfGp_getCamera(0)->mLookat.mEye;
const Vec & eyePos = dComIfGp_getCamera(0)->view.mLookat.mEye;
cXyz pos;
pos.x = eyePos.x + -9400.0f;
pos.y = eyePos.y + 22500.0f;
+73 -73
View File
@@ -53,10 +53,10 @@ void dKyr_get_vectle_calc(cXyz* param_0, cXyz* param_1, cXyz* param_2) {
/* 8008ABB4-8008AC64 .text dKy_set_eyevect_calc__FP12camera_classP3Vecff */
void dKy_set_eyevect_calc(camera_class* i_camera, Vec* param_1, f32 param_2, f32 param_3) {
cXyz tmp;
get_vectle_calc(&i_camera->mLookat.mEye, &i_camera->mLookat.mCenter, &tmp);
param_1->x = i_camera->mLookat.mEye.x + tmp.x * param_2;
param_1->y = (i_camera->mLookat.mEye.y + tmp.y * param_3) - 200.0f;
param_1->z = i_camera->mLookat.mEye.z + tmp.z * param_2;
get_vectle_calc(&i_camera->view.mLookat.mEye, &i_camera->view.mLookat.mCenter, &tmp);
param_1->x = i_camera->view.mLookat.mEye.x + tmp.x * param_2;
param_1->y = (i_camera->view.mLookat.mEye.y + tmp.y * param_3) - 200.0f;
param_1->z = i_camera->view.mLookat.mEye.z + tmp.z * param_2;
}
/* 8008AC64-8008AD60 .text dKy_set_eyevect_calc2__FP12camera_classP3Vecff */
@@ -64,19 +64,19 @@ void dKy_set_eyevect_calc2(camera_class* i_camera, Vec* param_1, f32 param_2, f3
cXyz tmp;
DOUBLE_POS pos;
pos.x = i_camera->mLookat.mCenter.x - i_camera->mLookat.mEye.x;
pos.x = i_camera->view.mLookat.mCenter.x - i_camera->view.mLookat.mEye.x;
if (param_3 != 0.0f) {
pos.y = i_camera->mLookat.mCenter.y - i_camera->mLookat.mEye.y;
pos.y = i_camera->view.mLookat.mCenter.y - i_camera->view.mLookat.mEye.y;
} else {
pos.y = 0.0f;
}
pos.z = i_camera->mLookat.mCenter.z - i_camera->mLookat.mEye.z;
pos.z = i_camera->view.mLookat.mCenter.z - i_camera->view.mLookat.mEye.z;
vectle_calc(&pos, &tmp);
param_1->x = i_camera->mLookat.mEye.x + tmp.x * param_2;
param_1->y = i_camera->mLookat.mEye.y + tmp.y * param_3;
param_1->z = i_camera->mLookat.mEye.z + tmp.z * param_2;
param_1->x = i_camera->view.mLookat.mEye.x + tmp.x * param_2;
param_1->y = i_camera->view.mLookat.mEye.y + tmp.y * param_3;
param_1->z = i_camera->view.mLookat.mEye.z + tmp.z * param_2;
if (param_3 == 0.0f) {
param_1->y = 0.0f;
@@ -135,9 +135,9 @@ void dKyr_kamome_move() {
if (pWind->mKamomeEff[i].mTimer == 0) {
pWind->mKamomeEff[i].mAngleY = cM_rndFX(0xFFFF);
pWind->mKamomeEff[i].mAngleX = cM_rndFX(0xFFFF);
newPos.x = pCamera->mLookat.mEye.x + cM_ssin(pWind->mKamomeEff[i].mAngleY) * 7000.0f;
newPos.x = pCamera->view.mLookat.mEye.x + cM_ssin(pWind->mKamomeEff[i].mAngleY) * 7000.0f;
newPos.y = 4500.0f;
newPos.z = pCamera->mLookat.mEye.z + cM_scos(pWind->mKamomeEff[i].mAngleY) * 7000.0f;
newPos.z = pCamera->view.mLookat.mEye.z + cM_scos(pWind->mKamomeEff[i].mAngleY) * 7000.0f;
pWind->mKamomeEff[i].mPos.set(newPos);
pWind->mKamomeEff[i].mAngleYSpeed = cM_rndFX(1.0f);
pWind->mKamomeEff[i].mScale = 0.0f;
@@ -176,9 +176,9 @@ void dKyr_kamome_move() {
newTarget.y = std::fabsf(cM_ssin(pWind->mKamomeEff[i].mAngleX) * 3200.0f);
newTarget.z = cM_scos(pWind->mKamomeEff[i].mAngleY) * 7000.0f;
newPos.x = pCamera->mLookat.mEye.x + newTarget.x;
newPos.x = pCamera->view.mLookat.mEye.x + newTarget.x;
newPos.y = newTarget.y + 4800.0f;
newPos.z = pCamera->mLookat.mEye.z + newTarget.z;
newPos.z = pCamera->view.mLookat.mEye.z + newTarget.z;
pWind->mKamomeEff[i].mPos.set(newPos);
pWind->mKamomeEff[i].mpEmitter->setGlobalTranslation(pWind->mKamomeEff[i].mPos);
@@ -427,7 +427,7 @@ void dKyr_wind_move() {
// so much stuff is missing in here
fVar14 = fVar27 * (s32)(i / 30);
f32 distance = pos.getSquareDistance(pCamera->mLookat.mEye) / 200.0f;
f32 distance = pos.getSquareDistance(pCamera->view.mLookat.mEye) / 200.0f;
if (distance > 1.0f) {
distance = 1.0f;
}
@@ -501,7 +501,7 @@ void dKyr_lenzflare_move() {
pLenzPkt->mAngleDeg *= S2DEG_CONSTANT;
pLenzPkt->mAngleDeg += 180.0f;
dKyr_get_vectle_calc(&pCamera->mLookat.mEye, &pCamera->mLookat.mCenter, &camFwd);
dKyr_get_vectle_calc(&pCamera->view.mLookat.mEye, &pCamera->view.mLookat.mCenter, &camFwd);
f32 size = sunDirSmth.abs(camFwd) * 350.0f + 250.0f;
@@ -533,16 +533,16 @@ void dKyr_sun_move() {
u32 stType = dStage_stagInfo_GetSTType(dComIfGp_getStageStagInfo());
cXyz lightDir;
if (dKy_getEnvlight().mBaseLightInfluence.mColor.r == 0 && stType != dStageType_MISC_e) {
dKyr_get_vectle_calc(&pCamera->mLookat.mEye, &dKy_getEnvlight().mBaseLightInfluence.mPos, &lightDir);
dKyr_get_vectle_calc(&pCamera->view.mLookat.mEye, &dKy_getEnvlight().mBaseLightInfluence.mPos, &lightDir);
} else {
dKyr_get_vectle_calc(&pCamera->mLookat.mEye, &dKy_getEnvlight().mSunPos2, &lightDir);
dKyr_get_vectle_calc(&pCamera->view.mLookat.mEye, &dKy_getEnvlight().mSunPos2, &lightDir);
}
pSunPkt->mPos[0].x = pCamera->mLookat.mEye.x + lightDir.x * 8000.0f;
pSunPkt->mPos[0].y = pCamera->mLookat.mEye.y + lightDir.y * 8000.0f;
pSunPkt->mPos[0].z = pCamera->mLookat.mEye.z + lightDir.z * 8000.0f;
pSunPkt->mPos[0].x = pCamera->view.mLookat.mEye.x + lightDir.x * 8000.0f;
pSunPkt->mPos[0].y = pCamera->view.mLookat.mEye.y + lightDir.y * 8000.0f;
pSunPkt->mPos[0].z = pCamera->view.mLookat.mEye.z + lightDir.z * 8000.0f;
f32 horizonY = (pSunPkt->mPos[0].y - pCamera->mLookat.mEye.y) / 8000.0f;
f32 horizonY = (pSunPkt->mPos[0].y - pCamera->view.mLookat.mEye.y) / 8000.0f;
if (horizonY < 0.0f)
horizonY = 0.0f;
if (horizonY >= 1.0f)
@@ -677,7 +677,7 @@ void dKyr_sun_move() {
}
if (dKyr_moon_arrival_check()) {
f32 alpha = (pSunPkt->mPos[0].y - pCamera->mLookat.mEye.y) / -8000.0f;
f32 alpha = (pSunPkt->mPos[0].y - pCamera->view.mLookat.mEye.y) / -8000.0f;
alpha *= alpha;
alpha *= 6.0f;
if (alpha > 1.0f)
@@ -693,8 +693,8 @@ void dKyr_rain_init() {
camera_process_class * pCamera = (camera_process_class*)dComIfGp_getCamera(0);
g_env_light.mpRainPacket->mpTxSnow01 = (u8*)dComIfG_getObjectRes("Always", dRes_INDEX_ALWAYS_I8_TX_SNOW01_e);
g_env_light.mpRainPacket->mpTxRingAHalf = (u8*)dComIfG_getObjectRes("Always", dRes_INDEX_ALWAYS_BTI_TXA_RING_A_32HAFE_e);
g_env_light.mpRainPacket->mCamEyePos = pCamera->mLookat.mEye;
g_env_light.mpRainPacket->mCamCenterPos = pCamera->mLookat.mCenter;
g_env_light.mpRainPacket->mCamEyePos = pCamera->view.mLookat.mEye;
g_env_light.mpRainPacket->mCamCenterPos = pCamera->view.mLookat.mCenter;
g_env_light.mpRainPacket->mCenterDeltaMul = 0.0f;
g_env_light.mpRainPacket->field_0x3700 = 0.0f;
g_env_light.mpRainPacket->mSibukiAlpha = 0.0f;
@@ -712,7 +712,7 @@ void dKyr_rain_init() {
/* 8008D0B4-8008D0DC .text rain_bg_chk__FP19dKankyo_rain_Packeti */
void rain_bg_chk(dKankyo_rain_Packet* pPkt, int idx) {
pPkt->mEff[idx].field_0x30 = dComIfGp_getCamera(0)->mLookat.mCenter.y + -800.0f;
pPkt->mEff[idx].field_0x30 = dComIfGp_getCamera(0)->view.mLookat.mCenter.y + -800.0f;
}
/* 8008D0DC-8008D53C .text overhead_bg_chk__Fv */
@@ -722,7 +722,7 @@ bool overhead_bg_chk() {
dBgS_ObjGndChk_All gndChk;
dBgS_RoofChk roofChk;
cXyz pos = pCamera->mLookat.mEye;
cXyz pos = pCamera->view.mLookat.mEye;
pos.y += 50.0f;
roofChk.SetPos(pos);
@@ -731,7 +731,7 @@ bool overhead_bg_chk() {
pos.y += 10000.0f;
gndChk.SetPos(&pos);
if (dComIfG_Bgsp()->GroundCross(&gndChk) > (pCamera->mLookat.mEye.y + 50.0f))
if (dComIfG_Bgsp()->GroundCross(&gndChk) > (pCamera->view.mLookat.mEye.y + 50.0f))
ret = true;
return ret;
@@ -746,11 +746,11 @@ bool forward_overhead_bg_chk(cXyz* pPos, f32 dist) {
dBgS_RoofChk roofChk;
cXyz pos;
cXyz lookDir;
dKyr_get_vectle_calc(&pCamera->mLookat.mEye, &pCamera->mLookat.mCenter, &lookDir);
pos.x = pCamera->mLookat.mEye.x + lookDir.x * dist;
pos.y = pCamera->mLookat.mEye.y + lookDir.y * dist;
pos.z = pCamera->mLookat.mEye.z + lookDir.z * dist;
pos.y = pCamera->mLookat.mEye.y + 50.f;
dKyr_get_vectle_calc(&pCamera->view.mLookat.mEye, &pCamera->view.mLookat.mCenter, &lookDir);
pos.x = pCamera->view.mLookat.mEye.x + lookDir.x * dist;
pos.y = pCamera->view.mLookat.mEye.y + lookDir.y * dist;
pos.z = pCamera->view.mLookat.mEye.z + lookDir.z * dist;
pos.y = pCamera->view.mLookat.mEye.y + 50.f;
*pPos = pos;
roofChk.SetPos(pos);
@@ -760,7 +760,7 @@ bool forward_overhead_bg_chk(cXyz* pPos, f32 dist) {
pos.y += 10000.0f;
gndChk.SetPos(&pos);
if (dComIfG_Bgsp()->GroundCross(&gndChk) > (pCamera->mLookat.mEye.y + 50.0f))
if (dComIfG_Bgsp()->GroundCross(&gndChk) > (pCamera->view.mLookat.mEye.y + 50.0f))
ret = true;
return ret;
@@ -812,9 +812,9 @@ void dKyr_rain_move() {
}
if (rain_packet->mRainCount != 0) {
dKyr_get_vectle_calc(&camera->mLookat.mCenter, &rain_packet->mCamCenterPos, &spB4);
dKyr_get_vectle_calc(&camera->view.mLookat.mCenter, &rain_packet->mCamCenterPos, &spB4);
var_f30 = rain_packet->mCamEyePos.abs(camera->mLookat.mEye);
var_f30 = rain_packet->mCamEyePos.abs(camera->view.mLookat.mEye);
if (var_f30 > 10.0f) {
var_f30 = (var_f30 - 10.0f) / 50.0f;
@@ -825,9 +825,9 @@ void dKyr_rain_move() {
var_f30 = 0.0f;
}
rain_packet->mCamEyePos = camera->mLookat.mEye;
rain_packet->mCamEyePos = camera->view.mLookat.mEye;
var_f29 = rain_packet->mCamCenterPos.abs(camera->mLookat.mCenter);
var_f29 = rain_packet->mCamCenterPos.abs(camera->view.mLookat.mCenter);
if (var_f29 > 10.0f) {
var_f29 = (var_f29 - 10.0f) / 50.0f;
if (var_f29 > 1.0f) {
@@ -845,7 +845,7 @@ void dKyr_rain_move() {
cLib_addCalc(&rain_packet->mCenterDelta.x, spB4.x, 0.2f, 0.1f, 0.01f);
cLib_addCalc(&rain_packet->mCenterDelta.y, spB4.y, 0.2f, 0.1f, 0.01f);
cLib_addCalc(&rain_packet->mCenterDelta.z, spB4.z, 0.2f, 0.1f, 0.01f);
rain_packet->mCamCenterPos = camera->mLookat.mCenter;
rain_packet->mCamCenterPos = camera->view.mLookat.mCenter;
dKy_set_eyevect_calc2(camera, &spFC, 700.0f, 600.0f);
spD8.x = spD8.y = spD8.z = 0.0f;
@@ -1006,9 +1006,9 @@ void dKyr_rain_move() {
cXyz sp80;
f32 sp10 = 800.0f;
sp80 = spC0;
sp80.y = camera->mLookat.mEye.y;
sp80.y = camera->view.mLookat.mEye.y;
if (camera->mLookat.mEye.abs(sp80) < sp10) {
if (camera->view.mLookat.mEye.abs(sp80) < sp10) {
var_f31 *= rain_packet->mOverheadFade * 1.0f;
}
}
@@ -1241,7 +1241,7 @@ void dKyr_snow_init() {
for (u32 i = 0; i < ARRAY_SIZE(g_env_light.mpSnowPacket->mEff); i++)
g_env_light.mpSnowPacket->mEff[i].mStatus = 0;
g_env_light.mpSnowPacket->mEffCount = 0;
g_env_light.mpSnowPacket->mOldEyePos = pCamera->mLookat.mEye;
g_env_light.mpSnowPacket->mOldEyePos = pCamera->view.mLookat.mEye;
}
}
@@ -1377,9 +1377,9 @@ void wave_move() {
d0.x = d0.y = d0.z = 0.0f;
deltaXZ.x = pCamera->mLookat.mCenter.x - pCamera->mLookat.mEye.x;
deltaXZ.x = pCamera->view.mLookat.mCenter.x - pCamera->view.mLookat.mEye.x;
deltaXZ.y = 0.0f;
deltaXZ.z = pCamera->mLookat.mCenter.z - pCamera->mLookat.mEye.z;
deltaXZ.z = pCamera->view.mLookat.mCenter.z - pCamera->view.mLookat.mEye.z;
vectle_calc(&deltaXZ, &vectle);
pPkt->mSkewDir = cM3d_VectorProduct2d(0.0f, 0.0f, -windPowVec2.x, -windPowVec2.z, vectle.x, vectle.z);
@@ -1462,7 +1462,7 @@ void wave_move() {
}
if (g_env_light.mWaveChan.mWaveFlatInter > 0.0f) {
newPos3 = pCamera->mLookat.mEye;
newPos3 = pCamera->view.mLookat.mEye;
newPos3.y = pos.y;
f32 dist = pos.abs(newPos3);
@@ -1509,7 +1509,7 @@ void wave_move() {
newPos2.x = pPkt->mEff[i].mBasePos.x + pPkt->mEff[i].mPos.x;
newPos2.y = pPkt->mEff[i].mBasePos.y + pPkt->mEff[i].mPos.y;
newPos2.z = pPkt->mEff[i].mBasePos.z + pPkt->mEff[i].mPos.z;
f32 dist = newPos2.abs(pCamera->mLookat.mEye);
f32 dist = newPos2.abs(pCamera->view.mLookat.mEye);
if (dist < 0.0f)
dist = 0.0f;
f32 alphaTarget = 1.0f - (dist / (2.0f * g_env_light.mWaveChan.mWaveSpawnDist));
@@ -1671,7 +1671,7 @@ void cloud_shadow_move() {
pos.y = pPkt->mEff[i].mBasePos.y + pPkt->mEff[i].mPos.y;
pos.z = pPkt->mEff[i].mBasePos.z + pPkt->mEff[i].mPos.z;
pPkt->mEff[i].mSize = pPkt->mEff[i].mInitialSize + ((pos.abs(pCamera->mLookat.mEye) - 1000.0f) / 2000.0f) * 1.5f * pPkt->mEff[i].mInitialSize + (40.0f * cM_ssin(pPkt->mEff[i].mAnimCounter));
pPkt->mEff[i].mSize = pPkt->mEff[i].mInitialSize + ((pos.abs(pCamera->view.mLookat.mEye) - 1000.0f) / 2000.0f) * 1.5f * pPkt->mEff[i].mInitialSize + (40.0f * cM_ssin(pPkt->mEff[i].mAnimCounter));
f32 distCenter = pos.abs(center);
if (distCenter < 0.0f)
@@ -1786,15 +1786,15 @@ void snap_sunmoon_proc(cXyz* pPos, int type) {
if (dComIfGp_checkPlayerStatus1(0, daPyStts1_PICTO_BOX_AIM_e)) {
cXyz pos;
pos.x = (pPos->x - pCamera->mLookat.mEye.x);
pos.y = (pPos->y - pCamera->mLookat.mEye.y);
pos.z = (pPos->z - pCamera->mLookat.mEye.z);
pos.x = (pPos->x - pCamera->view.mLookat.mEye.x);
pos.y = (pPos->y - pCamera->view.mLookat.mEye.y);
pos.z = (pPos->z - pCamera->view.mLookat.mEye.z);
pos.x *= 10.0f;
pos.y *= 10.0f;
pos.z *= 10.0f;
pos.x += pCamera->mLookat.mEye.x;
pos.y += pCamera->mLookat.mEye.y;
pos.z += pCamera->mLookat.mEye.z;
pos.x += pCamera->view.mLookat.mEye.x;
pos.y += pCamera->view.mLookat.mEye.y;
pos.z += pCamera->view.mLookat.mEye.z;
snapObj.SetGeoSph(pos, 8000.0f);
if (type == 9)
@@ -1847,13 +1847,13 @@ void dKyr_drawSun(Mtx drawMtx, cXyz* pPos, GXColor& reg0, u8** pImg) {
moonPos2 = *pPos;
} else {
moonPos.x = -(pPos->x - pCamera->mLookat.mEye.x);
moonPos.y = -(pPos->y - pCamera->mLookat.mEye.y);
moonPos.z = -(pPos->z - pCamera->mLookat.mEye.z);
moonPos.x = -(pPos->x - pCamera->view.mLookat.mEye.x);
moonPos.y = -(pPos->y - pCamera->view.mLookat.mEye.y);
moonPos.z = -(pPos->z - pCamera->view.mLookat.mEye.z);
moonPos2.x = moonPos.x + pCamera->mLookat.mEye.x;
moonPos2.y = moonPos.y + pCamera->mLookat.mEye.y;
moonPos2.z = moonPos.z + pCamera->mLookat.mEye.z;
moonPos2.x = moonPos.x + pCamera->view.mLookat.mEye.x;
moonPos2.y = moonPos.y + pCamera->view.mLookat.mEye.y;
moonPos2.z = moonPos.z + pCamera->view.mLookat.mEye.z;
}
int dayofweek = dKy_get_dayofweek();
@@ -1925,7 +1925,7 @@ void dKyr_drawSun(Mtx drawMtx, cXyz* pPos, GXColor& reg0, u8** pImg) {
f32 dayscale[7] = { 1.0f, 0.83f, 0.6f, 0.6f, 0.6f, 0.6f, 0.83f, };
snap_sunmoon_proc(&moonPos2, texidx);
dKyr_get_vectle_calc(&pCamera->mLookat.mEye, &pCamera->mLookat.mCenter, &camfwd);
dKyr_get_vectle_calc(&pCamera->view.mLookat.mEye, &pCamera->view.mLookat.mCenter, &camfwd);
f32 cam_distXZ = std::sqrtf(camfwd.x*camfwd.x + camfwd.z*camfwd.z);
f32 cam_theta = std::atan2f(camfwd.x, camfwd.z);
@@ -2029,7 +2029,7 @@ void dKyr_drawSun(Mtx drawMtx, cXyz* pPos, GXColor& reg0, u8** pImg) {
f32 sun_theta = std::atan2f(sunPos.x, sunPos.z);
f32 sun_phi = std::atan2f(sunPos.y, sun_distXZ);
dKyr_get_vectle_calc(&pCamera->mLookat.mEye, &pCamera->mLookat.mCenter, &camfwd);
dKyr_get_vectle_calc(&pCamera->view.mLookat.mEye, &pCamera->view.mLookat.mCenter, &camfwd);
f32 cam_distXZ = std::sqrtf(camfwd.x*camfwd.x + camfwd.z*camfwd.z);
f32 cam_theta = std::atan2f(camfwd.x, camfwd.z);
@@ -2534,7 +2534,7 @@ void dKyr_drawRain(Mtx drawMtx, u8** pImg) {
p.y = pPkt->mEff[i].mBasePos.y + pPkt->mEff[i].mPos.y;
p.z = pPkt->mEff[i].mBasePos.z + pPkt->mEff[i].mPos.z;
f32 dist = p.abs(pCamera->mLookat.mEye);
f32 dist = p.abs(pCamera->view.mLookat.mEye);
dist = dist / 1500.0f + 0.1f;
if (dist > 1.0f)
dist = 1.0f;
@@ -2628,7 +2628,7 @@ void dKyr_drawSibuki(Mtx drawMtx, u8** pImg) {
cXyz eyevect, camDir;
dKy_set_eyevect_calc(pCamera, &eyevect, 7000.0f, 4000.0f);
dKyr_get_vectle_calc(&pCamera->mLookat.mEye, &pCamera->mLookat.mCenter, &camDir);
dKyr_get_vectle_calc(&pCamera->view.mLookat.mEye, &pCamera->view.mLookat.mCenter, &camDir);
f32 alphaFade;
if (camDir.y > 0.0f) {
@@ -3147,9 +3147,9 @@ void dKyr_drawStar(Mtx drawMtx, u8** pImg) {
rot = 0;
}
spBC.x = camera->mLookat.mEye.x;
spBC.y = camera->mLookat.mEye.y;
spBC.z = camera->mLookat.mEye.z;
spBC.x = camera->view.mLookat.mEye.x;
spBC.y = camera->view.mLookat.mEye.y;
spBC.z = camera->view.mLookat.mEye.z;
f32 sp34 = -1.0f;
int sp30 = 0;
@@ -3303,7 +3303,7 @@ void drawWave(Mtx drawMtx, u8** pImg) {
return;
}
f32 rot = cM_sht2d(pCamera->mBank);
f32 rot = cM_sht2d(pCamera->view.mBank);
j3dSys.reinitGX();
GXSetClipMode(GX_CLIP_ENABLE);
@@ -3601,9 +3601,9 @@ void dKyr_thunder_move() {
if (cM_rndF(1.0f) < 0.007f) {
pThunder->mState = 11;
} else if (cM_rndF(1.0f) < 0.005f && g_env_light.mThunderEff.mMode < 10) {
pThunder->mLightInfluence.mPos.x = pCamera->mLookat.mEye.x;
pThunder->mLightInfluence.mPos.y = pCamera->mLookat.mEye.y;
pThunder->mLightInfluence.mPos.z = pCamera->mLookat.mEye.z;
pThunder->mLightInfluence.mPos.x = pCamera->view.mLookat.mEye.x;
pThunder->mLightInfluence.mPos.y = pCamera->view.mLookat.mEye.y;
pThunder->mLightInfluence.mPos.z = pCamera->view.mLookat.mEye.z;
pThunder->mLightInfluence.mColor.r = 0;
pThunder->mLightInfluence.mColor.g = 0;
pThunder->mLightInfluence.mColor.b = 0;
@@ -3646,9 +3646,9 @@ void dKyr_thunder_move() {
if (pThunder->mState != 0) {
if (pThunder->mState < 10) {
pThunder->mLightInfluence.mPos.x = pCamera->mLookat.mEye.x;
pThunder->mLightInfluence.mPos.y = pCamera->mLookat.mEye.y + 150.0f;
pThunder->mLightInfluence.mPos.z = pCamera->mLookat.mEye.z;
pThunder->mLightInfluence.mPos.x = pCamera->view.mLookat.mEye.x;
pThunder->mLightInfluence.mPos.y = pCamera->view.mLookat.mEye.y + 150.0f;
pThunder->mLightInfluence.mPos.z = pCamera->view.mLookat.mEye.z;
pThunder->mLightInfluence.mColor.r = (u8)(pThunder->mFlashTimer * 0.2f * 180.0f);
pThunder->mLightInfluence.mColor.g = (u8)(pThunder->mFlashTimer * 0.2f * 235.0f);
pThunder->mLightInfluence.mColor.b = (u8)(pThunder->mFlashTimer * 0.2f * 255.0f);
+1 -1
View File
@@ -785,7 +785,7 @@ void wether_move_vrkumo() {
if (strcmp(dComIfGp_getStartStageName(), "sea") == 0 &&
dComIfGp_roomControl_getStayNo() == 9)
{
if (camera_p->mLookat.mEye.abs(r09o) < 2500.0f) {
if (camera_p->view.mLookat.mEye.abs(r09o) < 2500.0f) {
g_env_light.mVrkumoStrength = 1.0f;
}
}
+4 -4
View File
@@ -155,7 +155,7 @@ cPhs_State dThunder_c::create() {
mScale.y = size * (f30 + f1);
mScale.z = 1.0f;
dKyr_get_vectle_calc(&pCamera->mLookat.mEye, &pCamera->mLookat.mCenter, &fwd);
dKyr_get_vectle_calc(&pCamera->view.mLookat.mEye, &pCamera->view.mLookat.mCenter, &fwd);
f32 distXZ = std::sqrtf(fwd.x * fwd.x + fwd.z * fwd.z);
s16 rotX = cM_atan2s(fwd.x, fwd.z);
@@ -172,9 +172,9 @@ cPhs_State dThunder_c::create() {
rot.z = cM_scos(rotY) * cM_scos(rotX);
f32 baseXZ = cM_rndF(offs.x);
mPos.x = pCamera->mLookat.mEye.x + fwd.x * 100000.0f + rot.x * baseXZ;
mPos.y = pCamera->mLookat.mEye.y + cM_rndFX(offs.y);
mPos.z = pCamera->mLookat.mEye.z + fwd.z * 100000.0f + rot.z * baseXZ;
mPos.x = pCamera->view.mLookat.mEye.x + fwd.x * 100000.0f + rot.x * baseXZ;
mPos.y = pCamera->view.mLookat.mEye.y + cM_rndFX(offs.y);
mPos.z = pCamera->view.mLookat.mEye.z + fwd.z * 100000.0f + rot.z * baseXZ;
if (cM_rndF(1.0f) < 0.3f) {
#if VERSION == VERSION_DEMO
+6 -6
View File
@@ -51,12 +51,12 @@ void menu_vrbox_set() {
camera_process_class * pCamera = dComIfGp_getCamera(0);
pCamera->mLookat.mEye.x = 9377.0f;
pCamera->mLookat.mEye.y = 0.0f;
pCamera->mLookat.mEye.z = 7644.0f;
pCamera->mLookat.mCenter.x = 4300.0f;
pCamera->mLookat.mCenter.y = 4200.0f;
pCamera->mLookat.mCenter.z = 1000.0f;
pCamera->view.mLookat.mEye.x = 9377.0f;
pCamera->view.mLookat.mEye.y = 0.0f;
pCamera->view.mLookat.mEye.z = 7644.0f;
pCamera->view.mLookat.mCenter.x = 4300.0f;
pCamera->view.mLookat.mCenter.y = 4200.0f;
pCamera->view.mLookat.mCenter.z = 1000.0f;
g_env_light.mWind.mWindPower = 0.7f;
+3 -3
View File
@@ -1753,7 +1753,7 @@ bool dSnap_Obj::ChkCamCull() const {
if (!(field_0x1b & 1) && mCullAngle != 0x7FFF) {
// TODO: is this VECSubtract supposed to be an inline? dSnap_Obj::GetLen?
cXyz sp8;
VECSubtract(&dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0))->mLookat.mEye, &mCenter, &sp8);
VECSubtract(&dComIfGp_getCamera(dComIfGp_getPlayerCameraID(0))->view.mLookat.mEye, &mCenter, &sp8);
s16 angle = cM_atan2s(sp8.x, sp8.z);
if (cLib_distanceAngleS(angle, mAngleY) > mCullAngle) {
return true;
@@ -1930,8 +1930,8 @@ void dSnap_packet::ClearAlphaBuffer() {
GXPosition3s16(0x1D4, 0x149, -0x005);
GXPosition3s16(0x0AE, 0x149, -0x005);
view_class* view = dComIfGp_getCamera(dComIfGp_getWindow(0)->getCameraID());
GXSetProjection(view->mProjMtx, GX_PERSPECTIVE);
camera_process_class* view = dComIfGp_getCamera(dComIfGp_getWindow(0)->getCameraID());
GXSetProjection(view->view.mProjMtx, GX_PERSPECTIVE);
}
/* 800CE4A8-800CE610 .text Judge__12dSnap_packetFv */
+2 -2
View File
@@ -1380,10 +1380,10 @@ void fopAcM_cancelCarryNow(fopAc_ac_c* i_this) {
BOOL fopAcM_viewCutoffCheck(fopAc_ac_c* actor, f32 param_2) {
if (param_2 > 0.0f) {
camera_process_class* camera = dComIfGp_getCamera(0);
cXyz delta = (camera->mLookat.mEye - actor->eyePos);
cXyz delta = (camera->view.mLookat.mEye - actor->eyePos);
if (delta.abs() > param_2) {
dBgS_LinChk linChk;
linChk.Set(&camera->mLookat.mEye, &actor->eyePos, actor);
linChk.Set(&camera->view.mLookat.mEye, &actor->eyePos, actor);
return dComIfG_Bgsp()->LineCross(&linChk);
}
}
+25 -25
View File
@@ -1615,7 +1615,7 @@ bool mDoGph_Painter() {
camera_process_class* camera = (camera_process_class*)dComIfGp_getCamera(cameraID);
if (camera != NULL) {
dComIfGd_imageDrawShadow(camera->mViewMtx);
dComIfGd_imageDrawShadow(camera->view.mViewMtx);
view_port_class viewport_crop;
view_port_class* viewport_p = window->getViewPort();
@@ -1633,9 +1633,9 @@ bool mDoGph_Painter() {
GXSetViewport(viewport_p->mXOrig, viewport_p->mYOrig, viewport_p->mWidth, viewport_p->mHeight, viewport_p->mNearZ, viewport_p->mFarZ);
GXSetScissor(viewport_p->mXOrig, viewport_p->mYOrig, viewport_p->mWidth, viewport_p->mHeight);
JPADrawInfo jpaDrawInfo(camera->mViewMtx, 45.0f, 1.218f);
jpaDrawInfo.setFovy(camera->mFovy);
jpaDrawInfo.setAspect(camera->mAspect);
JPADrawInfo jpaDrawInfo(camera->view.mViewMtx, 45.0f, 1.218f);
jpaDrawInfo.setFovy(camera->view.mFovy);
jpaDrawInfo.setAspect(camera->view.mAspect);
#if VERSION > VERSION_DEMO
BOOL isTower9 = FALSE;
@@ -1643,11 +1643,11 @@ bool mDoGph_Painter() {
isTower9 = TRUE;
#endif
dComIfGp_setCurrentWindow(window);
dComIfGp_setCurrentView(camera);
dComIfGp_setCurrentView(&camera->view);
dComIfGp_setCurrentViewport(viewport_p);
GXSetProjection(camera->mProjMtx, GX_PERSPECTIVE);
GXSetProjection(camera->view.mProjMtx, GX_PERSPECTIVE);
PPCSync();
j3dSys.setViewMtx(camera->mViewMtx);
j3dSys.setViewMtx(camera->view.mViewMtx);
dKy_setLight();
dComIfGd_drawOpaListSky();
dComIfGd_drawXluListSky();
@@ -1657,17 +1657,17 @@ bool mDoGph_Painter() {
GXSetClipMode(GX_CLIP_ENABLE);
dComIfGd_drawOpaListBG();
dComIfGd_drawShadow(camera->mViewMtx);
dComIfGd_drawAlphaModel(camera->mViewMtx);
drawAlphaBuffer(camera, dComIfGd_getAlphaModelColor());
dComIfGd_drawShadow(camera->view.mViewMtx);
dComIfGd_drawAlphaModel(camera->view.mViewMtx);
drawAlphaBuffer(&camera->view, dComIfGd_getAlphaModelColor());
if (dComIfGd_getLightModelNum() != 0) {
#if VERSION == VERSION_DEMO
clearAlphaBuffer(camera);
clearAlphaBuffer(&camera->view);
#else
clearAlphaBuffer(camera, 0);
clearAlphaBuffer(&camera->view, 0);
#endif
dComIfGd_drawLightModel(camera->mViewMtx);
drawAlphaBuffer(camera, dComIfGd_getLightModelColor());
dComIfGd_drawLightModel(camera->view.mViewMtx);
drawAlphaBuffer(&camera->view, dComIfGd_getLightModelColor());
}
if (!mDoGph_gInf_c::isMonotone()) {
@@ -1680,9 +1680,9 @@ bool mDoGph_Painter() {
if (dComIfGd_getSpotModelNum() != 0)
#if VERSION == VERSION_DEMO
clearAlphaBuffer(camera);
clearAlphaBuffer(&camera->view);
#else
clearAlphaBuffer(camera, dComIfGd_getSpotModelColor().a);
clearAlphaBuffer(&camera->view, dComIfGd_getSpotModelColor().a);
#endif
if (!dMenu_flag() && !dPa_control_c::isStatus(0x01))
@@ -1700,8 +1700,8 @@ bool mDoGph_Painter() {
dComIfGp_particle_drawP1(&jpaDrawInfo);
JPADrawInfo windDrawInfo(dPa_control_c::getWindViewMatrix(), 45.0f, 1.218f);
windDrawInfo.setFovy(camera->mFovy);
windDrawInfo.setAspect(camera->mAspect);
windDrawInfo.setFovy(camera->view.mFovy);
windDrawInfo.setAspect(camera->view.mAspect);
dComIfGp_particle_drawWind(&windDrawInfo);
dComIfGp_particle_drawToon(&jpaDrawInfo);
@@ -1720,9 +1720,9 @@ bool mDoGph_Painter() {
#endif
if (dComIfGd_getSpotModelNum() != 0) {
dComIfGd_drawAlphaModel(camera->mViewMtx);
dComIfGd_drawSpotModel(camera->mViewMtx);
drawSpot(camera);
dComIfGd_drawAlphaModel(camera->view.mViewMtx);
dComIfGd_drawSpotModel(camera->view.mViewMtx);
drawSpot(&camera->view);
}
#if VERSION == VERSION_DEMO
@@ -1734,8 +1734,8 @@ bool mDoGph_Painter() {
dComIfGd_drawXluListMaskOff();
if (!dMenu_flag()) {
motionBlure(camera);
drawDepth(camera, viewport_p, dComIfGp_getCamZoomForcus(cameraID));
motionBlure(&camera->view);
drawDepth(&camera->view, viewport_p, dComIfGp_getCamZoomForcus(cameraID));
dComIfGp_particle_drawProjection(&jpaDrawInfo);
GXSetClipMode(GX_CLIP_ENABLE);
@@ -1751,9 +1751,9 @@ bool mDoGph_Painter() {
if (mDoGph_gInf_c::isMonotone()) {
#if VERSION == VERSION_DEMO
clearAlphaBuffer(camera);
clearAlphaBuffer(&camera->view);
#else
clearAlphaBuffer(camera, 0);
clearAlphaBuffer(&camera->view, 0);
#endif
dComIfGd_drawOpaListP0();
dComIfGd_drawOpaListP1();