mirror of https://github.com/ZDoom/qzdoom.git
parent
8e636b8abf
commit
038d3cc820
|
@ -328,7 +328,7 @@ void DIntermissionScreenText::Drawer ()
|
||||||
size_t count;
|
size_t count;
|
||||||
int c;
|
int c;
|
||||||
const FRemapTable *range;
|
const FRemapTable *range;
|
||||||
|
|
||||||
// draw some of the text onto the screen
|
// draw some of the text onto the screen
|
||||||
int rowheight = SmallFont->GetHeight () + (gameinfo.gametype & (GAME_DoomStrifeChex) ? 3 : -1);
|
int rowheight = SmallFont->GetHeight () + (gameinfo.gametype & (GAME_DoomStrifeChex) ? 3 : -1);
|
||||||
bool scale = (CleanXfac != 1 || CleanYfac != 1);
|
bool scale = (CleanXfac != 1 || CleanYfac != 1);
|
||||||
|
@ -336,7 +336,7 @@ void DIntermissionScreenText::Drawer ()
|
||||||
int cx = mTextX;
|
int cx = mTextX;
|
||||||
int cy = mTextY;
|
int cy = mTextY;
|
||||||
const char *ch = mText;
|
const char *ch = mText;
|
||||||
|
|
||||||
count = (mTicker - mTextDelay) / mTextSpeed;
|
count = (mTicker - mTextDelay) / mTextSpeed;
|
||||||
range = SmallFont->GetColorTranslation (mTextColor);
|
range = SmallFont->GetColorTranslation (mTextColor);
|
||||||
|
|
||||||
|
@ -392,7 +392,7 @@ void DIntermissionScreenCast::Init(FIntermissionAction *desc, bool first)
|
||||||
mName = static_cast<FIntermissionActionCast*>(desc)->mName;
|
mName = static_cast<FIntermissionActionCast*>(desc)->mName;
|
||||||
mClass = PClass::FindClass(static_cast<FIntermissionActionCast*>(desc)->mCastClass);
|
mClass = PClass::FindClass(static_cast<FIntermissionActionCast*>(desc)->mCastClass);
|
||||||
if (mClass != NULL) mDefaults = GetDefaultByType(mClass);
|
if (mClass != NULL) mDefaults = GetDefaultByType(mClass);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mDefaults = NULL;
|
mDefaults = NULL;
|
||||||
caststate = NULL;
|
caststate = NULL;
|
||||||
|
@ -489,7 +489,7 @@ int DIntermissionScreenCast::Ticker ()
|
||||||
|
|
||||||
if (--casttics > 0 && caststate != NULL)
|
if (--casttics > 0 && caststate != NULL)
|
||||||
return 0; // not time to change state yet
|
return 0; // not time to change state yet
|
||||||
|
|
||||||
if (caststate == NULL || caststate->GetTics() == -1 || caststate->GetNextState() == NULL ||
|
if (caststate == NULL || caststate->GetTics() == -1 || caststate->GetNextState() == NULL ||
|
||||||
(caststate->GetNextState() == caststate && castdeath))
|
(caststate->GetNextState() == caststate && castdeath))
|
||||||
{
|
{
|
||||||
|
@ -506,7 +506,7 @@ int DIntermissionScreenCast::Ticker ()
|
||||||
PlayAttackSound();
|
PlayAttackSound();
|
||||||
castframes++;
|
castframes++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (castframes == 12 && !castdeath)
|
if (castframes == 12 && !castdeath)
|
||||||
{
|
{
|
||||||
// go into attack frame
|
// go into attack frame
|
||||||
|
@ -533,7 +533,7 @@ int DIntermissionScreenCast::Ticker ()
|
||||||
}
|
}
|
||||||
PlayAttackSound();
|
PlayAttackSound();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (castattacking)
|
if (castattacking)
|
||||||
{
|
{
|
||||||
if (castframes == 24 || caststate == mDefaults->SeeState )
|
if (castframes == 24 || caststate == mDefaults->SeeState )
|
||||||
|
@ -544,7 +544,7 @@ int DIntermissionScreenCast::Ticker ()
|
||||||
caststate = mDefaults->SeeState;
|
caststate = mDefaults->SeeState;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
casttics = caststate->GetTics();
|
casttics = caststate->GetTics();
|
||||||
if (casttics == -1)
|
if (casttics == -1)
|
||||||
casttics = 15;
|
casttics = 15;
|
||||||
|
@ -555,7 +555,7 @@ void DIntermissionScreenCast::Drawer ()
|
||||||
{
|
{
|
||||||
spriteframe_t* sprframe;
|
spriteframe_t* sprframe;
|
||||||
FTexture* pic;
|
FTexture* pic;
|
||||||
|
|
||||||
Super::Drawer();
|
Super::Drawer();
|
||||||
|
|
||||||
const char *name = mName;
|
const char *name = mName;
|
||||||
|
@ -568,13 +568,13 @@ void DIntermissionScreenCast::Drawer ()
|
||||||
name,
|
name,
|
||||||
DTA_CleanNoMove, true, TAG_DONE);
|
DTA_CleanNoMove, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// draw the current frame in the middle of the screen
|
// draw the current frame in the middle of the screen
|
||||||
if (caststate != NULL)
|
if (caststate != NULL)
|
||||||
{
|
{
|
||||||
int castsprite;
|
int castsprite;
|
||||||
|
|
||||||
if (!(mDefaults->flags4 & MF4_NOSKIN) &&
|
if (!(mDefaults->flags4 & MF4_NOSKIN) &&
|
||||||
mDefaults->SpawnState != NULL && caststate->sprite == mDefaults->SpawnState->sprite &&
|
mDefaults->SpawnState != NULL && caststate->sprite == mDefaults->SpawnState->sprite &&
|
||||||
mClass->IsDescendantOf(RUNTIME_CLASS(APlayerPawn)) &&
|
mClass->IsDescendantOf(RUNTIME_CLASS(APlayerPawn)) &&
|
||||||
skins != NULL)
|
skins != NULL)
|
||||||
|
@ -695,6 +695,7 @@ DIntermissionController::DIntermissionController(FIntermissionDescriptor *Desc,
|
||||||
mDeleteDesc = DeleteDesc;
|
mDeleteDesc = DeleteDesc;
|
||||||
mIndex = 0;
|
mIndex = 0;
|
||||||
mAdvance = false;
|
mAdvance = false;
|
||||||
|
mSentAdvance = false;
|
||||||
mScreen = NULL;
|
mScreen = NULL;
|
||||||
mFirst = true;
|
mFirst = true;
|
||||||
mGameState = state;
|
mGameState = state;
|
||||||
|
@ -712,7 +713,7 @@ bool DIntermissionController::NextPage ()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mScreen != NULL)
|
if (mScreen != NULL)
|
||||||
{
|
{
|
||||||
bg = mScreen->GetBackground(&fill);
|
bg = mScreen->GetBackground(&fill);
|
||||||
mScreen->Destroy();
|
mScreen->Destroy();
|
||||||
|
@ -765,7 +766,7 @@ bool DIntermissionController::Responder (event_t *ev)
|
||||||
const char *cmd = Bindings.GetBind (ev->data1);
|
const char *cmd = Bindings.GetBind (ev->data1);
|
||||||
|
|
||||||
if (cmd != NULL && !stricmp (cmd, "toggleconsole"))
|
if (cmd != NULL && !stricmp (cmd, "toggleconsole"))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mScreen->mTicker < 2) return false; // prevent some leftover events from auto-advancing
|
if (mScreen->mTicker < 2) return false; // prevent some leftover events from auto-advancing
|
||||||
|
@ -883,11 +884,11 @@ void F_StartIntermission(FName seq, BYTE state)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
bool F_Responder (event_t* ev)
|
bool F_Responder (event_t* ev)
|
||||||
{
|
{
|
||||||
if (DIntermissionController::CurrentIntermission != NULL)
|
if (DIntermissionController::CurrentIntermission != NULL)
|
||||||
{
|
{
|
||||||
return DIntermissionController::CurrentIntermission->Responder(ev);
|
return DIntermissionController::CurrentIntermission->Responder(ev);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -898,11 +899,11 @@ bool F_Responder (event_t* ev)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
void F_Ticker ()
|
void F_Ticker ()
|
||||||
{
|
{
|
||||||
if (DIntermissionController::CurrentIntermission != NULL)
|
if (DIntermissionController::CurrentIntermission != NULL)
|
||||||
{
|
{
|
||||||
DIntermissionController::CurrentIntermission->Ticker();
|
DIntermissionController::CurrentIntermission->Ticker();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -916,7 +917,7 @@ void F_Drawer ()
|
||||||
{
|
{
|
||||||
if (DIntermissionController::CurrentIntermission != NULL)
|
if (DIntermissionController::CurrentIntermission != NULL)
|
||||||
{
|
{
|
||||||
DIntermissionController::CurrentIntermission->Drawer();
|
DIntermissionController::CurrentIntermission->Drawer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -931,7 +932,7 @@ void F_EndFinale ()
|
||||||
{
|
{
|
||||||
if (DIntermissionController::CurrentIntermission != NULL)
|
if (DIntermissionController::CurrentIntermission != NULL)
|
||||||
{
|
{
|
||||||
DIntermissionController::CurrentIntermission->Destroy();
|
DIntermissionController::CurrentIntermission->Destroy();
|
||||||
DIntermissionController::CurrentIntermission = NULL;
|
DIntermissionController::CurrentIntermission = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue