Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove pfVirtualCam1 Effect Plate. #684

Merged
merged 1 commit into from
Jul 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions Sources/Plasma/FeatureLib/pfCamera/plVirtualCamNeu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ plVirtualCam1::plVirtualCam1()
// set initial view position
fOutputPos.Set(100,100,100);
fOutputPOA.Set(0,0,0);
fEffectPlate = nil;
fFreezeCounter = 0;
fFadeCounter = 0;
fX = fY = 0.5f;
Expand All @@ -178,8 +177,6 @@ plVirtualCam1::plVirtualCam1()
// camLog = plStatusLogMgr::GetInstance().CreateStatusLog(40, "Camera", plStatusLog::kFilledBackground | plStatusLog::kDeleteForMe | plStatusLog::kDontWriteFile | plStatusLog::kAlignToTop);
#endif

ICreatePlate();

foutLog = nil;
#ifndef PLASMA_EXTERNAL_RELEASE
// only open log file if logging is on
Expand Down Expand Up @@ -213,8 +210,6 @@ plVirtualCam1::~plVirtualCam1()
delete((plCameraModifier1*)pKey->GetObjectPtr())->GetBrain();
pKey->GetObjectPtr()->UnRegisterAs(kDefaultCameraMod1_KEY);
}
if (fEffectPlate)
plPlateManager::Instance().DestroyPlate(fEffectPlate);
}

// for saving camera stack
Expand Down Expand Up @@ -461,30 +456,6 @@ plCameraModifier1* plVirtualCam1::GetCurrentStackCamera()
return nil;
}

void plVirtualCam1::ICreatePlate()
{
int x, y;


fEffectPlate = nil;

// +0.01 to deal with the half-pixel antialiasing stuff
plPlateManager::Instance().CreatePlate( &fEffectPlate, 0, 0, 2.01, 2.01 );

// hack for now--create a black layer that we will animate the opacity on
plMipmap *ourMip = fEffectPlate->CreateMaterial( 16, 16, true );
for( y = 0; y < ourMip->GetHeight(); y++ )
{
uint32_t *pixels = ourMip->GetAddr32( 0, y );
for( x = 0; x < ourMip->GetWidth(); x++ )
pixels[ x ] = 0xff000000;
}
if( fEffectPlate == nil )
ICreatePlate();
fEffectPlate->SetVisible( false );
}


void plVirtualCam1::SetCutNextTrans()
{
SetFlags(kCutNextTrans);
Expand All @@ -502,16 +473,12 @@ void plVirtualCam1::SetRender(bool render)
#ifdef STATUS_LOG
camLog->AddLine("Virtual Camera Render Updates Enabled");
#endif
if (fEffectPlate)
fEffectPlate->SetVisible(false);
}
else
{
#ifdef STATUS_LOG
camLog->AddLine("Virtual Camera Render Updates Disabled");
#endif
if (fEffectPlate)
fEffectPlate->SetVisible(true);
}


Expand Down
2 changes: 0 additions & 2 deletions Sources/Plasma/FeatureLib/pfCamera/plVirtualCamNeu.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ class plVirtualCam1 : public hsKeyedObject
void FinishTransition();
void SetRender(bool render);
void IHandleCameraStatusLog(plCameraModifier1* pMod, int action);
void ICreatePlate();
void FreezeOutput(int frames) { fFreezeCounter = frames; } // I hate this and I hate myself for doing it
void UnFadeAvatarIn(int frames) { fFadeCounter = frames; } // ditto
void FirstPersonOverride();
Expand All @@ -212,7 +211,6 @@ class plVirtualCam1 : public hsKeyedObject
hsVector3 fOutputUp;
int fTransPos;
plDebugInputInterface* fCameraDriveInterface;
plPlate* fEffectPlate;
FILE* foutLog;
plCameraVec fCameraStack;
int fFreezeCounter;
Expand Down