- reviewed and sorted out the remaining parts of g_shared
This commit is contained in:
parent
0b4862480e
commit
25d5b788f5
6 changed files with 333 additions and 68 deletions
|
|
@ -43,6 +43,12 @@ IMPLEMENT_POINTERS_START(DFlashFader)
|
|||
IMPLEMENT_POINTER(ForWho)
|
||||
IMPLEMENT_POINTERS_END
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void DFlashFader::Construct (float r1, float g1, float b1, float a1,
|
||||
float r2, float g2, float b2, float a2,
|
||||
float time, AActor *who, bool terminate)
|
||||
|
|
@ -55,6 +61,12 @@ void DFlashFader::Construct (float r1, float g1, float b1, float a1,
|
|||
Terminate = terminate;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void DFlashFader::OnDestroy ()
|
||||
{
|
||||
if (Terminate) Blends[1][3] = 0.f; // Needed in order to cancel out the secondary fade.
|
||||
|
|
@ -62,6 +74,12 @@ void DFlashFader::OnDestroy ()
|
|||
Super::OnDestroy();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void DFlashFader::Serialize(FSerializer &arc)
|
||||
{
|
||||
Super::Serialize (arc);
|
||||
|
|
@ -71,6 +89,12 @@ void DFlashFader::Serialize(FSerializer &arc)
|
|||
.Array("blends", Blends[0], 8);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void DFlashFader::Tick ()
|
||||
{
|
||||
if (ForWho == NULL || ForWho->player == NULL)
|
||||
|
|
@ -87,6 +111,12 @@ void DFlashFader::Tick ()
|
|||
SetBlend (1.f - (float)RemainingTics / (float)TotalTics);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void DFlashFader::SetBlend (float time)
|
||||
{
|
||||
if (ForWho == NULL || ForWho->player == NULL)
|
||||
|
|
@ -101,6 +131,12 @@ void DFlashFader::SetBlend (float time)
|
|||
player->BlendA = Blends[0][3]*iT + Blends[1][3]*time;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void DFlashFader::Cancel ()
|
||||
{
|
||||
RemainingTics = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue