mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-11 12:39:48 -04:00
Fix the rest of the water projections
This commit is contained in:
@@ -300,11 +300,19 @@ int daGrdWater_c::Draw() {
|
||||
J3DTexMtxInfo* mtxInfo = &material->getTexGenBlock()->getTexMtx(0)->getTexMtxInfo();
|
||||
if (mtxInfo != NULL) {
|
||||
Mtx afStack_50;
|
||||
|
||||
#if TARGET_PC
|
||||
C_MTXLightPerspective(afStack_50, dComIfGd_getView()->fovy, dComIfGd_getView()->aspect,
|
||||
1.0f, 1.0f, dusk::getSettings().game.useWaterProjectionOffset ? -0.01f : 0.0f, 0.0f);
|
||||
#else
|
||||
C_MTXLightPerspective(afStack_50, dComIfGd_getView()->fovy, dComIfGd_getView()->aspect,
|
||||
1.0f, 1.0f, -0.01f, 0.0f);
|
||||
#endif
|
||||
|
||||
#if WIDESCREEN_SUPPORT
|
||||
mDoGph_gInf_c::setWideZoomLightProjection(afStack_50);
|
||||
#endif
|
||||
|
||||
mtxInfo->setEffectMtx(afStack_50);
|
||||
modelData2->simpleCalcMaterial(0, (MtxP)j3dDefaultMtx);
|
||||
}
|
||||
|
||||
@@ -371,8 +371,14 @@ int daLv3Water_c::Draw() {
|
||||
texMtxInfo = &material->getTexGenBlock()->getTexMtx(0)->getTexMtxInfo();
|
||||
if (texMtxInfo != NULL) {
|
||||
Mtx lightProjMtx;
|
||||
|
||||
#if TARGET_PC
|
||||
C_MTXLightPerspective(lightProjMtx, dComIfGd_getView()->fovy,
|
||||
dComIfGd_getView()->aspect, 1.0f, 1.0f, dusk::getSettings().game.useWaterProjectionOffset ? -0.01f : 0.0f, 0.0f);
|
||||
#else
|
||||
C_MTXLightPerspective(lightProjMtx, dComIfGd_getView()->fovy,
|
||||
dComIfGd_getView()->aspect, 1.0f, 1.0f, -0.01f, 0.0f);
|
||||
#endif
|
||||
|
||||
#if WIDESCREEN_SUPPORT
|
||||
mDoGph_gInf_c::setWideZoomLightProjection(lightProjMtx);
|
||||
|
||||
@@ -197,7 +197,14 @@ int daLv3Water2_c::Draw() {
|
||||
texMtxInfo = &btkMaterial->getTexGenBlock()->getTexMtx(0)->getTexMtxInfo();
|
||||
if(texMtxInfo) {
|
||||
Mtx lightProjMtx;
|
||||
C_MTXLightPerspective(lightProjMtx, dComIfGd_getView()->fovy, dComIfGd_getView()->aspect, 1.0f, 1.0f, -0.01f, 0);
|
||||
|
||||
#if TARGET_PC
|
||||
C_MTXLightPerspective(lightProjMtx, dComIfGd_getView()->fovy,
|
||||
dComIfGd_getView()->aspect, 1.0f, 1.0f, dusk::getSettings().game.useWaterProjectionOffset ? -0.01f : 0.0f, 0);
|
||||
#else
|
||||
C_MTXLightPerspective(lightProjMtx, dComIfGd_getView()->fovy,
|
||||
dComIfGd_getView()->aspect, 1.0f, 1.0f, -0.01f, 0);
|
||||
#endif
|
||||
|
||||
#if WIDESCREEN_SUPPORT
|
||||
mDoGph_gInf_c::setWideZoomLightProjection(lightProjMtx);
|
||||
|
||||
@@ -27,8 +27,15 @@ static int daObj_Lv3waterB_Draw(obj_lv3WaterB_class* i_this) {
|
||||
J3DTexMtxInfo* tex_mtx_info = &material_p->getTexGenBlock()->getTexMtx(0)->getTexMtxInfo();
|
||||
if (tex_mtx_info != NULL) {
|
||||
Mtx m;
|
||||
|
||||
#if TARGET_PC
|
||||
C_MTXLightPerspective(m, dComIfGd_getView()->fovy, dComIfGd_getView()->aspect, 1.0f, 1.0f,
|
||||
dusk::getSettings().game.useWaterProjectionOffset ? -0.015f : 0.0f, 0.0f);
|
||||
#else
|
||||
C_MTXLightPerspective(m, dComIfGd_getView()->fovy, dComIfGd_getView()->aspect, 1.0f,
|
||||
1.0f, -0.015f, 0.0f);
|
||||
#endif
|
||||
|
||||
#if WIDESCREEN_SUPPORT
|
||||
mDoGph_gInf_c::setWideZoomLightProjection(m);
|
||||
#endif
|
||||
|
||||
@@ -313,8 +313,15 @@ int daObjRotStair_c::Draw() {
|
||||
J3DTexMtxInfo* texMtxInfo = &material->getTexGenBlock()->getTexMtx(0)->getTexMtxInfo();
|
||||
if (texMtxInfo != NULL) {
|
||||
Mtx lightMtx;
|
||||
|
||||
#if TARGET_PC
|
||||
C_MTXLightPerspective(lightMtx, dComIfGd_getView()->fovy,
|
||||
dComIfGd_getView()->aspect, 1.0f, 1.0f, dusk::getSettings().game.useWaterProjectionOffset ? -0.01f : 0.0f, 0);
|
||||
#else
|
||||
C_MTXLightPerspective(lightMtx, dComIfGd_getView()->fovy,
|
||||
dComIfGd_getView()->aspect, 1.0f, 1.0f, -0.01f, 0);
|
||||
#endif
|
||||
|
||||
#if WIDESCREEN_SUPPORT
|
||||
mDoGph_gInf_c::setWideZoomLightProjection(lightMtx);
|
||||
#endif
|
||||
|
||||
@@ -36,8 +36,15 @@ static int daObj_Tp_Draw(obj_tp_class* i_this) {
|
||||
&material->getTexGenBlock()->getTexMtx(0)->getTexMtxInfo();
|
||||
if (texMtxInfo != NULL) {
|
||||
Mtx lightProjMtx;
|
||||
|
||||
#if TARGET_PC
|
||||
C_MTXLightPerspective(lightProjMtx, dComIfGd_getView()->fovy,
|
||||
dComIfGd_getView()->aspect, 1.0f, 1.0f, dusk::getSettings().game.useWaterProjectionOffset ? -0.01f : 0.0f, 0);
|
||||
#else
|
||||
C_MTXLightPerspective(lightProjMtx, dComIfGd_getView()->fovy,
|
||||
dComIfGd_getView()->aspect, 1.0f, 1.0f, -0.01f, 0);
|
||||
#endif
|
||||
|
||||
#if WIDESCREEN_SUPPORT
|
||||
mDoGph_gInf_c::setWideZoomLightProjection(lightProjMtx);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user