mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-26 13:51:15 +00:00
- scrolling endings (e.g. Bunny and Demon) implemented.
SVN r2888 (finale)
This commit is contained in:
parent
cc475bdd10
commit
7ef87064d7
4 changed files with 56 additions and 27 deletions
|
@ -247,11 +247,6 @@ int DIntermissionScreenText::Responder (event_t *ev)
|
||||||
return Super::Responder(ev);
|
return Super::Responder(ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
int DIntermissionScreenText::Ticker ()
|
|
||||||
{
|
|
||||||
return Super::Ticker();
|
|
||||||
}
|
|
||||||
|
|
||||||
void DIntermissionScreenText::Drawer ()
|
void DIntermissionScreenText::Drawer ()
|
||||||
{
|
{
|
||||||
Super::Drawer();
|
Super::Drawer();
|
||||||
|
@ -359,25 +354,67 @@ void DIntermissionScreenCast::Drawer ()
|
||||||
void DIntermissionScreenScroller::Init(FIntermissionAction *desc, bool first)
|
void DIntermissionScreenScroller::Init(FIntermissionAction *desc, bool first)
|
||||||
{
|
{
|
||||||
Super::Init(desc, first);
|
Super::Init(desc, first);
|
||||||
|
mFirstPic = mBackground;
|
||||||
mSecondPic = TexMan.CheckForTexture(static_cast<FIntermissionActionScroller*>(desc)->mSecondPic, FTexture::TEX_MiscPatch);
|
mSecondPic = TexMan.CheckForTexture(static_cast<FIntermissionActionScroller*>(desc)->mSecondPic, FTexture::TEX_MiscPatch);
|
||||||
mScrollDelay = static_cast<FIntermissionActionScroller*>(desc)->mScrollDelay;
|
mScrollDelay = static_cast<FIntermissionActionScroller*>(desc)->mScrollDelay;
|
||||||
mScrollTime = static_cast<FIntermissionActionScroller*>(desc)->mScrollTime;
|
mScrollTime = static_cast<FIntermissionActionScroller*>(desc)->mScrollTime;
|
||||||
mScrollDir = static_cast<FIntermissionActionScroller*>(desc)->mScrollDir;
|
mScrollDir = static_cast<FIntermissionActionScroller*>(desc)->mScrollDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DIntermissionScreenScroller::Responder (event_t *ev)
|
|
||||||
{
|
|
||||||
return Super::Responder(ev);
|
|
||||||
}
|
|
||||||
|
|
||||||
int DIntermissionScreenScroller::Ticker ()
|
|
||||||
{
|
|
||||||
return Super::Ticker();
|
|
||||||
}
|
|
||||||
|
|
||||||
void DIntermissionScreenScroller::Drawer ()
|
void DIntermissionScreenScroller::Drawer ()
|
||||||
{
|
{
|
||||||
Super::Drawer();
|
FTexture *tex = TexMan[mFirstPic];
|
||||||
|
FTexture *tex2 = TexMan[mSecondPic];
|
||||||
|
if (mTicker >= mScrollDelay && mTicker < mScrollDelay + mScrollTime && tex != NULL && tex2 != NULL)
|
||||||
|
{
|
||||||
|
|
||||||
|
int fwidth = tex->GetScaledWidth();
|
||||||
|
int fheight = tex->GetScaledHeight();
|
||||||
|
|
||||||
|
double xpos1 = 0, ypos1 = 0, xpos2 = 0, ypos2 = 0;
|
||||||
|
|
||||||
|
switch (mScrollDir)
|
||||||
|
{
|
||||||
|
case SCROLL_Up:
|
||||||
|
ypos1 = double(mTicker - mScrollDelay) * fheight / mScrollTime;
|
||||||
|
ypos2 = ypos1 - fheight;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SCROLL_Down:
|
||||||
|
ypos1 = -double(mTicker - mScrollDelay) * fheight / mScrollTime;
|
||||||
|
ypos2 = ypos1 + fheight;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SCROLL_Left:
|
||||||
|
default:
|
||||||
|
xpos1 = double(mTicker - mScrollDelay) * fwidth / mScrollTime;
|
||||||
|
xpos2 = xpos1 - fwidth;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SCROLL_Right:
|
||||||
|
xpos1 = -double(mTicker - mScrollDelay) * fwidth / mScrollTime;
|
||||||
|
xpos2 = xpos1 + fwidth;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
screen->DrawTexture (tex, xpos1, ypos1,
|
||||||
|
DTA_VirtualWidth, fwidth,
|
||||||
|
DTA_VirtualHeight, fheight,
|
||||||
|
DTA_Masked, false,
|
||||||
|
TAG_DONE);
|
||||||
|
screen->DrawTexture (tex2, xpos2, ypos2,
|
||||||
|
DTA_VirtualWidth, fwidth,
|
||||||
|
DTA_VirtualHeight, fheight,
|
||||||
|
DTA_Masked, false,
|
||||||
|
TAG_DONE);
|
||||||
|
|
||||||
|
screen->FillBorder (NULL);
|
||||||
|
mBackground = mSecondPic;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Super::Drawer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -218,7 +218,6 @@ public:
|
||||||
DIntermissionScreenText() {}
|
DIntermissionScreenText() {}
|
||||||
virtual void Init(FIntermissionAction *desc, bool first);
|
virtual void Init(FIntermissionAction *desc, bool first);
|
||||||
virtual int Responder (event_t *ev);
|
virtual int Responder (event_t *ev);
|
||||||
virtual int Ticker ();
|
|
||||||
virtual void Drawer ();
|
virtual void Drawer ();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -243,6 +242,7 @@ class DIntermissionScreenScroller : public DIntermissionScreen
|
||||||
{
|
{
|
||||||
DECLARE_CLASS (DIntermissionScreenScroller, DIntermissionScreen)
|
DECLARE_CLASS (DIntermissionScreenScroller, DIntermissionScreen)
|
||||||
|
|
||||||
|
FTextureID mFirstPic;
|
||||||
FTextureID mSecondPic;
|
FTextureID mSecondPic;
|
||||||
int mScrollDelay;
|
int mScrollDelay;
|
||||||
int mScrollTime;
|
int mScrollTime;
|
||||||
|
@ -252,8 +252,6 @@ public:
|
||||||
|
|
||||||
DIntermissionScreenScroller() {}
|
DIntermissionScreenScroller() {}
|
||||||
virtual void Init(FIntermissionAction *desc, bool first);
|
virtual void Init(FIntermissionAction *desc, bool first);
|
||||||
virtual int Responder (event_t *ev);
|
|
||||||
virtual int Ticker ();
|
|
||||||
virtual void Drawer ();
|
virtual void Drawer ();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -638,7 +638,7 @@ FName FMapInfoParser::ParseEndGame()
|
||||||
{
|
{
|
||||||
FIntermissionActionScroller *bunny = new FIntermissionActionScroller;
|
FIntermissionActionScroller *bunny = new FIntermissionActionScroller;
|
||||||
bunny->mSecondPic = newSeq.PicName2;
|
bunny->mSecondPic = newSeq.PicName2;
|
||||||
bunny->mScrollDir = SCROLL_Right;
|
bunny->mScrollDir = SCROLL_Left;
|
||||||
bunny->mScrollDelay = 230;
|
bunny->mScrollDelay = 230;
|
||||||
bunny->mScrollTime = 640;
|
bunny->mScrollTime = 640;
|
||||||
bunny->mDuration = 1130;
|
bunny->mDuration = 1130;
|
||||||
|
|
|
@ -35,7 +35,7 @@ Intermission Inter_Bunny
|
||||||
{
|
{
|
||||||
Scroller
|
Scroller
|
||||||
{
|
{
|
||||||
ScrollDirection = Right
|
ScrollDirection = Left
|
||||||
Background = "PFUB1"
|
Background = "PFUB1"
|
||||||
Background2 = "PFUB2"
|
Background2 = "PFUB2"
|
||||||
Music = "$MUSIC_BUNNY"
|
Music = "$MUSIC_BUNNY"
|
||||||
|
@ -56,42 +56,36 @@ Intermission TheEnd
|
||||||
}
|
}
|
||||||
Image
|
Image
|
||||||
{
|
{
|
||||||
Draw = "END0", 108, 68
|
|
||||||
Draw = "END1", 108, 68
|
Draw = "END1", 108, 68
|
||||||
Time = -5
|
Time = -5
|
||||||
Sound = "weapons/pistol"
|
Sound = "weapons/pistol"
|
||||||
}
|
}
|
||||||
Image
|
Image
|
||||||
{
|
{
|
||||||
Draw = "END0", 108, 68
|
|
||||||
Draw = "END2", 108, 68
|
Draw = "END2", 108, 68
|
||||||
Time = -5
|
Time = -5
|
||||||
Sound = "weapons/pistol"
|
Sound = "weapons/pistol"
|
||||||
}
|
}
|
||||||
Image
|
Image
|
||||||
{
|
{
|
||||||
Draw = "END0", 108, 68
|
|
||||||
Draw = "END3", 108, 68
|
Draw = "END3", 108, 68
|
||||||
Time = -5
|
Time = -5
|
||||||
Sound = "weapons/pistol"
|
Sound = "weapons/pistol"
|
||||||
}
|
}
|
||||||
Image
|
Image
|
||||||
{
|
{
|
||||||
Draw = "END0", 108, 68
|
|
||||||
Draw = "END4", 108, 68
|
Draw = "END4", 108, 68
|
||||||
Time = -5
|
Time = -5
|
||||||
Sound = "weapons/pistol"
|
Sound = "weapons/pistol"
|
||||||
}
|
}
|
||||||
Image
|
Image
|
||||||
{
|
{
|
||||||
Draw = "END0", 108, 68
|
|
||||||
Draw = "END5", 108, 68
|
Draw = "END5", 108, 68
|
||||||
Time = -5
|
Time = -5
|
||||||
Sound = "weapons/pistol"
|
Sound = "weapons/pistol"
|
||||||
}
|
}
|
||||||
Image
|
Image
|
||||||
{
|
{
|
||||||
Draw = "END0", 108, 68
|
|
||||||
Draw = "END6", 108, 68
|
Draw = "END6", 108, 68
|
||||||
Time = -5
|
Time = -5
|
||||||
Sound = "weapons/pistol"
|
Sound = "weapons/pistol"
|
||||||
|
|
Loading…
Reference in a new issue