mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
This commit is contained in:
commit
404b326812
28 changed files with 417 additions and 330 deletions
|
@ -388,6 +388,7 @@ enum ActorFlag7
|
|||
MF7_SMASHABLE = 0x04000000, // dies if hitting the floor.
|
||||
MF7_NOSHIELDREFLECT = 0x08000000, // will not be reflected by shields.
|
||||
MF7_FORCEZERORADIUSDMG = 0x10000000, // passes zero radius damage on to P_DamageMobj, this is necessary in some cases where DoSpecialDamage gets overrideen.
|
||||
MF7_NOINFIGHTSPECIES = 0x20000000, // don't start infights with one's own species.
|
||||
};
|
||||
|
||||
// --- mobj.renderflags ---
|
||||
|
|
|
@ -880,7 +880,7 @@ CCMD(linetarget)
|
|||
if (CheckCheatmode () || players[consoleplayer].mo == NULL) return;
|
||||
C_AimLine(&t, false);
|
||||
if (t.linetarget)
|
||||
C_PrintInfo(t.linetarget);
|
||||
C_PrintInfo(t.linetarget, argv.argc() > 1 && atoi(argv[1]) != 0);
|
||||
else
|
||||
Printf("No target found\n");
|
||||
}
|
||||
|
@ -893,7 +893,7 @@ CCMD(info)
|
|||
if (CheckCheatmode () || players[consoleplayer].mo == NULL) return;
|
||||
C_AimLine(&t, true);
|
||||
if (t.linetarget)
|
||||
C_PrintInfo(t.linetarget);
|
||||
C_PrintInfo(t.linetarget, !(argv.argc() > 1 && atoi(argv[1]) == 0));
|
||||
else
|
||||
Printf("No target found. Info cannot find actors that have "
|
||||
"the NOBLOCKMAP flag or have height/radius of 0.\n");
|
||||
|
@ -902,7 +902,7 @@ CCMD(info)
|
|||
CCMD(myinfo)
|
||||
{
|
||||
if (CheckCheatmode () || players[consoleplayer].mo == NULL) return;
|
||||
C_PrintInfo(players[consoleplayer].mo);
|
||||
C_PrintInfo(players[consoleplayer].mo, true);
|
||||
}
|
||||
|
||||
typedef bool (*ActorTypeChecker) (AActor *);
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
#include "c_functions.h"
|
||||
|
||||
void C_PrintInfo(AActor *target)
|
||||
void C_PrintInfo(AActor *target, bool verbose)
|
||||
{
|
||||
if (target->player)
|
||||
Printf("Player=%s, ", target->player->userinfo.GetName());
|
||||
|
@ -47,7 +47,7 @@ void C_PrintInfo(AActor *target)
|
|||
target->GetClass()->TypeName.GetChars(),
|
||||
target->health,
|
||||
target->SpawnHealth());
|
||||
PrintMiscActorInfo(target);
|
||||
if (verbose) PrintMiscActorInfo(target);
|
||||
}
|
||||
|
||||
void C_AimLine(FTranslatedLineTarget *t, bool nonshootable)
|
||||
|
|
|
@ -34,6 +34,6 @@
|
|||
|
||||
void C_PrintInv(AActor *target);
|
||||
void C_AimLine(FTranslatedLineTarget *t, bool nonshootable);
|
||||
void C_PrintInfo(AActor *target);
|
||||
void C_PrintInfo(AActor *target, bool verbose);
|
||||
|
||||
struct FTranslatedLineTarget;
|
|
@ -808,6 +808,10 @@ void D_Display ()
|
|||
{
|
||||
StatusBar->DrawBottomStuff (HUD_AltHud);
|
||||
if (DrawFSHUD || automapactive) DrawHUD();
|
||||
if (players[consoleplayer].camera && players[consoleplayer].camera->player)
|
||||
{
|
||||
StatusBar->DrawCrosshair();
|
||||
}
|
||||
StatusBar->Draw (HUD_AltHud);
|
||||
StatusBar->DrawTopStuff (HUD_AltHud);
|
||||
}
|
||||
|
@ -2705,6 +2709,7 @@ void D_DoomMain (void)
|
|||
// clean up game state
|
||||
ST_Clear();
|
||||
D_ErrorCleanup ();
|
||||
DThinker::DestroyThinkersInList(STAT_STATIC);
|
||||
P_FreeLevelData();
|
||||
P_FreeExtraLevelData();
|
||||
|
||||
|
|
|
@ -422,7 +422,7 @@ void DThinker::DestroyAllThinkers ()
|
|||
|
||||
for (i = 0; i <= MAX_STATNUM; i++)
|
||||
{
|
||||
if (i != STAT_TRAVELLING)
|
||||
if (i != STAT_TRAVELLING && i != STAT_STATIC)
|
||||
{
|
||||
DestroyThinkersInList (Thinkers[i]);
|
||||
DestroyThinkersInList (FreshThinkers[i]);
|
||||
|
|
|
@ -347,6 +347,10 @@ CCMD (weapnext)
|
|||
StatusBar->AttachMessage(new DHUDMessageFadeOut(SmallFont, SendItemUse->GetTag(),
|
||||
1.5f, 0.90f, 0, 0, (EColorRange)*nametagcolor, 2.f, 0.35f), MAKE_ID( 'W', 'E', 'P', 'N' ));
|
||||
}
|
||||
if (SendItemUse != players[consoleplayer].ReadyWeapon)
|
||||
{
|
||||
S_Sound(CHAN_AUTO, "misc/weaponchange", 1.0, ATTN_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
CCMD (weapprev)
|
||||
|
@ -358,6 +362,10 @@ CCMD (weapprev)
|
|||
StatusBar->AttachMessage(new DHUDMessageFadeOut(SmallFont, SendItemUse->GetTag(),
|
||||
1.5f, 0.90f, 0, 0, (EColorRange)*nametagcolor, 2.f, 0.35f), MAKE_ID( 'W', 'E', 'P', 'N' ));
|
||||
}
|
||||
if (SendItemUse != players[consoleplayer].ReadyWeapon)
|
||||
{
|
||||
S_Sound(CHAN_AUTO, "misc/weaponchange", 1.0, ATTN_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
CCMD (invnext)
|
||||
|
@ -367,6 +375,7 @@ CCMD (invnext)
|
|||
if (who == NULL)
|
||||
return;
|
||||
|
||||
auto old = who->InvSel;
|
||||
if (who->InvSel != NULL)
|
||||
{
|
||||
if ((next = who->InvSel->NextInv()) != NULL)
|
||||
|
@ -390,6 +399,10 @@ CCMD (invnext)
|
|||
1.5f, 0.80f, 0, 0, (EColorRange)*nametagcolor, 2.f, 0.35f), MAKE_ID('S','I','N','V'));
|
||||
}
|
||||
who->player->inventorytics = 5*TICRATE;
|
||||
if (old != who->InvSel)
|
||||
{
|
||||
S_Sound(CHAN_AUTO, "misc/invchange", 1.0, ATTN_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
CCMD (invprev)
|
||||
|
@ -399,6 +412,7 @@ CCMD (invprev)
|
|||
if (who == NULL)
|
||||
return;
|
||||
|
||||
auto old = who->InvSel;
|
||||
if (who->InvSel != NULL)
|
||||
{
|
||||
if ((item = who->InvSel->PrevInv()) != NULL)
|
||||
|
@ -420,6 +434,10 @@ CCMD (invprev)
|
|||
1.5f, 0.80f, 0, 0, (EColorRange)*nametagcolor, 2.f, 0.35f), MAKE_ID('S','I','N','V'));
|
||||
}
|
||||
who->player->inventorytics = 5*TICRATE;
|
||||
if (old != who->InvSel)
|
||||
{
|
||||
S_Sound(CHAN_AUTO, "misc/invchange", 1.0, ATTN_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
CCMD (invuseall)
|
||||
|
|
|
@ -427,6 +427,7 @@ void G_InitNew (const char *mapname, bool bTitleLevel)
|
|||
UnlatchCVars ();
|
||||
G_VerifySkill();
|
||||
UnlatchCVars ();
|
||||
DThinker::DestroyThinkersInList(STAT_STATIC);
|
||||
|
||||
if (paused)
|
||||
{
|
||||
|
|
|
@ -1136,10 +1136,6 @@ void DrawHUD()
|
|||
i=DrawAmmo(CPlayer, hudwidth-5, i);
|
||||
if (hud_showweapons) DrawWeapons(CPlayer, hudwidth - 5, i);
|
||||
DrawInventory(CPlayer, 144, hudheight-28);
|
||||
if (CPlayer->camera && CPlayer->camera->player)
|
||||
{
|
||||
StatusBar->DrawCrosshair();
|
||||
}
|
||||
if (idmypos) DrawCoordinates(CPlayer);
|
||||
|
||||
DrawTime();
|
||||
|
|
|
@ -654,6 +654,7 @@ xx(Goodbye)
|
|||
xx(Require)
|
||||
xx(Exclude)
|
||||
xx(Userstring)
|
||||
xx(Sky)
|
||||
|
||||
// Special menus
|
||||
xx(Mainmenu)
|
||||
|
|
|
@ -1124,7 +1124,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_SeekerMissile)
|
|||
PARAM_INT_DEF(chance);
|
||||
PARAM_INT_DEF(distance);
|
||||
|
||||
if ((flags & SMF_LOOK) && (self->tracer == 0) && (pr_seekermissile()<chance))
|
||||
if ((flags & SMF_LOOK) && (self->tracer == nullptr) && (pr_seekermissile()<chance))
|
||||
{
|
||||
self->tracer = P_RoughMonsterSearch (self, distance, true);
|
||||
}
|
||||
|
|
|
@ -1714,6 +1714,9 @@ bool AActor::OkayToSwitchTarget (AActor *other)
|
|||
}
|
||||
}
|
||||
|
||||
if ((flags7 & MF7_NOINFIGHTSPECIES) && GetSpecies() == target->GetSpecies())
|
||||
return false; // Don't fight own species.
|
||||
|
||||
if ((other->flags3 & MF3_NOTARGET) &&
|
||||
(other->tid != TIDtoHate || TIDtoHate == 0) &&
|
||||
!IsHostile (other))
|
||||
|
|
|
@ -111,7 +111,7 @@ void P_BloodSplatter (const DVector3 &pos, AActor *originator, DAngle hitangle);
|
|||
void P_BloodSplatter2 (const DVector3 &pos, AActor *originator, DAngle hitangle);
|
||||
void P_RipperBlood (AActor *mo, AActor *bleeder);
|
||||
int P_GetThingFloorType (AActor *thing);
|
||||
void P_ExplodeMissile (AActor *missile, line_t *explodeline, AActor *target);
|
||||
void P_ExplodeMissile (AActor *missile, line_t *explodeline, AActor *target, bool onsky = false);
|
||||
|
||||
AActor *P_OldSpawnMissile(AActor *source, AActor *owner, AActor *dest, PClassActor *type);
|
||||
AActor *P_SpawnMissile (AActor* source, AActor* dest, PClassActor *type, AActor* owner = NULL);
|
||||
|
|
|
@ -1804,7 +1804,7 @@ bool AActor::Massacre ()
|
|||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void P_ExplodeMissile (AActor *mo, line_t *line, AActor *target)
|
||||
void P_ExplodeMissile (AActor *mo, line_t *line, AActor *target, bool onsky)
|
||||
{
|
||||
if (mo->flags3 & MF3_EXPLOCOUNT)
|
||||
{
|
||||
|
@ -1832,11 +1832,15 @@ void P_ExplodeMissile (AActor *mo, line_t *line, AActor *target)
|
|||
}
|
||||
if (nextstate == NULL) nextstate = mo->FindState(NAME_Death);
|
||||
|
||||
if (line != NULL && line->special == Line_Horizon && !(mo->flags3 & MF3_SKYEXPLODE))
|
||||
if (onsky || (line != NULL && line->special == Line_Horizon))
|
||||
{
|
||||
// [RH] Don't explode missiles on horizon lines.
|
||||
mo->Destroy ();
|
||||
return;
|
||||
if (!(mo->flags3 & MF3_SKYEXPLODE))
|
||||
{
|
||||
// [RH] Don't explode missiles on horizon lines.
|
||||
mo->Destroy();
|
||||
return;
|
||||
}
|
||||
nextstate = mo->FindState(NAME_Death, NAME_Sky);
|
||||
}
|
||||
|
||||
if (line != NULL && cl_missiledecals)
|
||||
|
@ -2557,26 +2561,32 @@ double P_XYMovement (AActor *mo, DVector2 scroll)
|
|||
}
|
||||
explode:
|
||||
// explode a missile
|
||||
if (!(mo->flags3 & MF3_SKYEXPLODE))
|
||||
{
|
||||
bool onsky = false;
|
||||
if (tm.ceilingline &&
|
||||
tm.ceilingline->backsector &&
|
||||
tm.ceilingline->backsector->GetTexture(sector_t::ceiling) == skyflatnum &&
|
||||
mo->Z() >= tm.ceilingline->backsector->ceilingplane.ZatPoint(mo->PosRelative(tm.ceilingline)))
|
||||
{
|
||||
// Hack to prevent missiles exploding against the sky.
|
||||
// Does not handle sky floors.
|
||||
mo->Destroy ();
|
||||
return Oldfloorz;
|
||||
if (!(mo->flags3 & MF3_SKYEXPLODE))
|
||||
{
|
||||
// Hack to prevent missiles exploding against the sky.
|
||||
// Does not handle sky floors.
|
||||
mo->Destroy();
|
||||
return Oldfloorz;
|
||||
}
|
||||
else onsky = true;
|
||||
}
|
||||
// [RH] Don't explode on horizon lines.
|
||||
if (mo->BlockingLine != NULL && mo->BlockingLine->special == Line_Horizon)
|
||||
{
|
||||
mo->Destroy ();
|
||||
return Oldfloorz;
|
||||
if (!(mo->flags3 & MF3_SKYEXPLODE))
|
||||
{
|
||||
mo->Destroy();
|
||||
return Oldfloorz;
|
||||
}
|
||||
else onsky = true;
|
||||
}
|
||||
}
|
||||
P_ExplodeMissile (mo, mo->BlockingLine, BlockingMobj);
|
||||
P_ExplodeMissile (mo, mo->BlockingLine, BlockingMobj, onsky);
|
||||
return Oldfloorz;
|
||||
}
|
||||
else
|
||||
|
@ -2955,15 +2965,20 @@ void P_ZMovement (AActor *mo, double oldfloorz)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (mo->floorpic == skyflatnum && !(mo->flags3 & MF3_SKYEXPLODE))
|
||||
bool onsky = false;
|
||||
if (mo->floorpic == skyflatnum)
|
||||
{
|
||||
// [RH] Just remove the missile without exploding it
|
||||
// if this is a sky floor.
|
||||
mo->Destroy ();
|
||||
return;
|
||||
if (!(mo->flags3 & MF3_SKYEXPLODE))
|
||||
{
|
||||
// [RH] Just remove the missile without exploding it
|
||||
// if this is a sky floor.
|
||||
mo->Destroy();
|
||||
return;
|
||||
}
|
||||
else onsky = true;
|
||||
}
|
||||
P_HitFloor (mo);
|
||||
P_ExplodeMissile (mo, NULL, NULL);
|
||||
P_ExplodeMissile (mo, NULL, NULL, onsky);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -3056,12 +3071,17 @@ void P_ZMovement (AActor *mo, double oldfloorz)
|
|||
{
|
||||
return;
|
||||
}
|
||||
if (mo->ceilingpic == skyflatnum && !(mo->flags3 & MF3_SKYEXPLODE))
|
||||
bool onsky = false;
|
||||
if (mo->ceilingpic == skyflatnum)
|
||||
{
|
||||
mo->Destroy ();
|
||||
return;
|
||||
if (!(mo->flags3 & MF3_SKYEXPLODE))
|
||||
{
|
||||
mo->Destroy();
|
||||
return;
|
||||
}
|
||||
else onsky = true;
|
||||
}
|
||||
P_ExplodeMissile (mo, NULL, NULL);
|
||||
P_ExplodeMissile (mo, NULL, NULL, onsky);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4202,6 +4202,7 @@ void P_Init ()
|
|||
static void P_Shutdown ()
|
||||
{
|
||||
// [ZZ] delete global event handlers
|
||||
DThinker::DestroyThinkersInList(STAT_STATIC);
|
||||
E_Shutdown(false);
|
||||
P_DeinitKeyMessages ();
|
||||
P_FreeLevelData ();
|
||||
|
|
|
@ -466,7 +466,8 @@ static void DoSectorDamage(AActor *actor, sector_t *sec, int amount, FName type,
|
|||
return;
|
||||
}
|
||||
|
||||
P_DamageMobj (actor, NULL, NULL, amount, type);
|
||||
int dflags = (flags & DAMAGE_NO_ARMOR) ? DMG_NO_ARMOR : 0;
|
||||
P_DamageMobj (actor, NULL, NULL, amount, type, dflags);
|
||||
}
|
||||
|
||||
void P_SectorDamage(int tag, int amount, FName type, PClassActor *protectClass, int flags)
|
||||
|
|
|
@ -76,6 +76,7 @@ const double CARRYFACTOR = 3 / 32.;
|
|||
#define DAMAGE_NONPLAYERS 2
|
||||
#define DAMAGE_IN_AIR 4
|
||||
#define DAMAGE_SUBCLASSES_PROTECT 8
|
||||
#define DAMAGE_NO_ARMOR 16
|
||||
|
||||
|
||||
// [RH] If a deathmatch game, checks to see if noexit is enabled.
|
||||
|
|
|
@ -317,6 +317,7 @@ static FFlagDef ActorFlagDefs[]=
|
|||
DEFINE_FLAG(MF7, SMASHABLE, AActor, flags7),
|
||||
DEFINE_FLAG(MF7, NOSHIELDREFLECT, AActor, flags7),
|
||||
DEFINE_FLAG(MF7, FORCEZERORADIUSDMG, AActor, flags7),
|
||||
DEFINE_FLAG(MF7, NOINFIGHTSPECIES, AActor, flags7),
|
||||
|
||||
// Effect flags
|
||||
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
||||
|
|
|
@ -45,6 +45,7 @@ enum
|
|||
STAT_AUTODECAL, // A decal that can be automatically deleted
|
||||
STAT_CORPSEPOINTER, // An entry in Hexen's corpse queue
|
||||
STAT_TRAVELLING, // An actor temporarily travelling to a new map
|
||||
STAT_STATIC, // persistent across maps.
|
||||
|
||||
// Thinkers that do think
|
||||
STAT_FIRST_THINKING=32,
|
||||
|
|
|
@ -363,7 +363,7 @@ bool DCanvas::ParseDrawTextureTags(FTexture *img, double x, double y, DWORD tag,
|
|||
parms->colorOverlay = 0;
|
||||
parms->alphaChannel = false;
|
||||
parms->flipX = false;
|
||||
parms->shadowAlpha = 0;
|
||||
//parms->shadowAlpha = 0;
|
||||
parms->shadowColor = 0;
|
||||
parms->virtWidth = this->GetWidth();
|
||||
parms->virtHeight = this->GetHeight();
|
||||
|
@ -636,7 +636,7 @@ bool DCanvas::ParseDrawTextureTags(FTexture *img, double x, double y, DWORD tag,
|
|||
break;
|
||||
|
||||
case DTA_ShadowAlpha:
|
||||
parms->shadowAlpha = (float)MIN(1., ListGetDouble(tags));
|
||||
//parms->shadowAlpha = (float)MIN(1., ListGetDouble(tags));
|
||||
break;
|
||||
|
||||
case DTA_ShadowColor:
|
||||
|
@ -647,12 +647,12 @@ bool DCanvas::ParseDrawTextureTags(FTexture *img, double x, double y, DWORD tag,
|
|||
boolval = ListGetInt(tags);
|
||||
if (boolval)
|
||||
{
|
||||
parms->shadowAlpha = 0.5;
|
||||
//parms->shadowAlpha = 0.5;
|
||||
parms->shadowColor = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
parms->shadowAlpha = 0;
|
||||
//parms->shadowAlpha = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ struct DrawParms
|
|||
uint32 colorOverlay;
|
||||
INTBOOL alphaChannel;
|
||||
INTBOOL flipX;
|
||||
float shadowAlpha;
|
||||
//float shadowAlpha;
|
||||
int shadowColor;
|
||||
INTBOOL keepratio;
|
||||
INTBOOL masked;
|
||||
|
|
576
src/wi_stuff.cpp
576
src/wi_stuff.cpp
|
@ -59,6 +59,14 @@ CVAR(Bool, wi_showtotaltime, true, CVAR_ARCHIVE)
|
|||
CVAR(Bool, wi_noautostartmap, false, CVAR_USERINFO | CVAR_ARCHIVE)
|
||||
CVAR(Int, wi_autoadvance, 0, CVAR_SERVERINFO)
|
||||
|
||||
// States for the intermission
|
||||
enum EState
|
||||
{
|
||||
NoState = -1,
|
||||
StatCount,
|
||||
ShowNextLoc,
|
||||
LeavingIntermission
|
||||
};
|
||||
|
||||
static const char *WI_Cmd[] = {
|
||||
"Background",
|
||||
|
@ -83,67 +91,8 @@ static const char *WI_Cmd[] = {
|
|||
NULL
|
||||
};
|
||||
|
||||
|
||||
struct FPatchInfo
|
||||
struct FInterBackground
|
||||
{
|
||||
FFont *mFont;
|
||||
FTexture *mPatch;
|
||||
EColorRange mColor;
|
||||
|
||||
void Init(FGIFont &gifont)
|
||||
{
|
||||
if (gifont.color == NAME_Null)
|
||||
{
|
||||
mPatch = TexMan[gifont.fontname]; // "entering"
|
||||
mColor = mPatch == NULL ? CR_UNTRANSLATED : CR_UNDEFINED;
|
||||
mFont = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
mFont = V_GetFont(gifont.fontname);
|
||||
mColor = V_FindFontColor(gifont.color);
|
||||
mPatch = NULL;
|
||||
}
|
||||
if (mFont == NULL)
|
||||
{
|
||||
mFont = BigFont;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
class FIntermissionScreen
|
||||
{
|
||||
public:
|
||||
// States for the intermission
|
||||
enum EState
|
||||
{
|
||||
NoState = -1,
|
||||
StatCount,
|
||||
ShowNextLoc,
|
||||
LeavingIntermission
|
||||
};
|
||||
|
||||
|
||||
enum EValues
|
||||
{
|
||||
// GLOBAL LOCATIONS
|
||||
WI_TITLEY = 2,
|
||||
|
||||
// SINGPLE-PLAYER STUFF
|
||||
SP_STATSX = 50,
|
||||
SP_STATSY = 50,
|
||||
|
||||
SP_TIMEX = 8,
|
||||
SP_TIMEY = (200 - 32),
|
||||
|
||||
// NET GAME STUFF
|
||||
NG_STATSY = 50,
|
||||
};
|
||||
|
||||
|
||||
|
||||
// These animation variables, structures, etc. are used for the
|
||||
// DOOM/Ultimate DOOM intermission screen animations. This is
|
||||
// totally different from any sprite or texture/flat animations
|
||||
|
@ -167,18 +116,6 @@ public:
|
|||
|
||||
};
|
||||
|
||||
// States for single-player
|
||||
enum ESPState
|
||||
{
|
||||
SP_KILLS = 0,
|
||||
SP_ITEMS = 2,
|
||||
SP_SECRET = 4,
|
||||
SP_FRAGS = 6,
|
||||
SP_TIME = 8,
|
||||
};
|
||||
|
||||
static const int SHOWNEXTLOCDELAY = 4; // in seconds
|
||||
|
||||
struct yahpt_t
|
||||
{
|
||||
int x, y;
|
||||
|
@ -188,16 +125,9 @@ public:
|
|||
{
|
||||
int x; // x/y coordinate pair structure
|
||||
int y;
|
||||
char level[9];
|
||||
FString Level;
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// Animation.
|
||||
// There is another anim_t used in p_spec.
|
||||
// (which is why I have renamed this one!)
|
||||
//
|
||||
|
||||
struct in_anim_t
|
||||
{
|
||||
int type; // Made an int so I can use '|'
|
||||
|
@ -206,7 +136,7 @@ public:
|
|||
int data; // ALWAYS: n/a, RANDOM: period deviation (<256)
|
||||
TArray<FTexture*> frames; // actual graphics for frames of animations
|
||||
|
||||
// following must be initialized to zero before use!
|
||||
// following must be initialized to zero before use!
|
||||
int nexttic; // next value of bcnt (used in conjunction with period)
|
||||
int ctr; // next frame number to animate
|
||||
int state; // used by RANDOM and LEVEL when animating
|
||||
|
@ -223,71 +153,21 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
private:
|
||||
TArray<lnode_t> lnodes;
|
||||
TArray<in_anim_t> anims;
|
||||
|
||||
int acceleratestage; // used to accelerate or skip a stage
|
||||
bool playerready[MAXPLAYERS];
|
||||
int me; // wbs->pnum
|
||||
EState state; // specifies current state
|
||||
wbstartstruct_t *wbs; // contains information passed into intermission
|
||||
wbplayerstruct_t* Plrs[MAXPLAYERS]; // wbs->plyr[]
|
||||
int cnt; // used for general timing
|
||||
int bcnt; // used for timing of background animation
|
||||
int cnt_kills[MAXPLAYERS];
|
||||
int cnt_items[MAXPLAYERS];
|
||||
int cnt_secret[MAXPLAYERS];
|
||||
int cnt_frags[MAXPLAYERS];
|
||||
int cnt_deaths[MAXPLAYERS];
|
||||
int cnt_time;
|
||||
int cnt_total_time;
|
||||
int cnt_par;
|
||||
int cnt_pause;
|
||||
int total_frags;
|
||||
int total_deaths;
|
||||
bool noautostartmap;
|
||||
int dofrags;
|
||||
int ng_state;
|
||||
|
||||
//
|
||||
// GRAPHICS
|
||||
//
|
||||
|
||||
FPatchInfo mapname;
|
||||
FPatchInfo finished;
|
||||
FPatchInfo entering;
|
||||
|
||||
int bcnt = 0; // used for timing of background animation
|
||||
TArray<FTexture *> yah; // You Are Here graphic
|
||||
FTexture* splat; // splat
|
||||
FTexture* sp_secret; // "secret"
|
||||
FTexture* kills; // "Kills", "Scrt", "Items", "Frags"
|
||||
FTexture* secret;
|
||||
FTexture* items;
|
||||
FTexture* frags;
|
||||
FTexture* timepic; // Time sucks.
|
||||
FTexture* par;
|
||||
FTexture* sucks;
|
||||
FTexture* killers; // "killers", "victims"
|
||||
FTexture* victims;
|
||||
FTexture* total; // "Total", your face, your dead face
|
||||
FTexture* p; // Player graphic
|
||||
FTexture* lnames[2]; // Name graphics of each level (centered)
|
||||
|
||||
// [RH] Info to dynamically generate the level name graphics
|
||||
FString lnametexts[2];
|
||||
|
||||
FTexture *background;
|
||||
|
||||
bool snl_pointeron = false;
|
||||
|
||||
int player_deaths[MAXPLAYERS];
|
||||
int sp_state;
|
||||
|
||||
//
|
||||
// CODE
|
||||
//
|
||||
FTexture* splat = nullptr; // splat
|
||||
FTexture *background = nullptr;
|
||||
wbstartstruct_t *wbs;
|
||||
public:
|
||||
|
||||
FInterBackground(wbstartstruct_t *wbst)
|
||||
{
|
||||
wbs = wbst;
|
||||
|
||||
};
|
||||
//====================================================================
|
||||
//
|
||||
// Loads the background - either from a single texture
|
||||
|
@ -297,22 +177,23 @@ public:
|
|||
// MAPINFO.
|
||||
//
|
||||
//====================================================================
|
||||
static bool IsExMy(const char * name)
|
||||
bool IsExMy(const char * name)
|
||||
{
|
||||
// Only check for the first 3 episodes. They are the only ones with default intermission scripts.
|
||||
// Level names can be upper- and lower case so use tolower to check!
|
||||
return (tolower(name[0])=='e' && name[1]>='1' && name[1]<='3' && tolower(name[2])=='m');
|
||||
return (tolower(name[0]) == 'e' && name[1] >= '1' && name[1] <= '3' && tolower(name[2]) == 'm');
|
||||
}
|
||||
|
||||
void WI_LoadBackground(bool isenterpic)
|
||||
bool LoadBackground(bool isenterpic)
|
||||
{
|
||||
const char *lumpname = NULL;
|
||||
char buffer[10];
|
||||
in_anim_t an;
|
||||
lnode_t pt;
|
||||
FTextureID texture;
|
||||
bool noautostartmap = false;
|
||||
|
||||
bcnt=0;
|
||||
bcnt = 0;
|
||||
|
||||
texture.SetInvalid();
|
||||
if (isenterpic)
|
||||
|
@ -326,10 +207,10 @@ public:
|
|||
}
|
||||
|
||||
// Try to get a default if nothing specified
|
||||
if (lumpname == NULL || lumpname[0]==0)
|
||||
if (lumpname == NULL || lumpname[0] == 0)
|
||||
{
|
||||
lumpname = NULL;
|
||||
switch(gameinfo.gametype)
|
||||
switch (gameinfo.gametype)
|
||||
{
|
||||
case GAME_Chex:
|
||||
case GAME_Doom:
|
||||
|
@ -342,24 +223,24 @@ public:
|
|||
lumpname = buffer;
|
||||
}
|
||||
}
|
||||
if (!lumpname)
|
||||
if (!lumpname)
|
||||
{
|
||||
if (isenterpic)
|
||||
if (isenterpic)
|
||||
{
|
||||
// One special case needs to be handled here!
|
||||
// If going from E1-E3 to E4 the default should be used, not the exit pic.
|
||||
|
||||
// Not if the exit pic is user defined!
|
||||
if (level.info->ExitPic.IsNotEmpty()) return;
|
||||
if (level.info->ExitPic.IsNotEmpty()) return false;
|
||||
|
||||
// E1-E3 need special treatment when playing Doom 1.
|
||||
if (!(gameinfo.flags & GI_MAPxx))
|
||||
{
|
||||
// not if the last level is not from the first 3 episodes
|
||||
if (!IsExMy(wbs->current)) return;
|
||||
if (!IsExMy(wbs->current)) return false;
|
||||
|
||||
// not if the next level is one of the first 3 episodes
|
||||
if (IsExMy(wbs->next)) return;
|
||||
if (IsExMy(wbs->next)) return false;
|
||||
}
|
||||
}
|
||||
lumpname = "INTERPIC";
|
||||
|
@ -375,22 +256,22 @@ public:
|
|||
lumpname = buffer;
|
||||
}
|
||||
}
|
||||
if (!lumpname)
|
||||
if (!lumpname)
|
||||
{
|
||||
if (isenterpic) return;
|
||||
if (isenterpic) return false;
|
||||
lumpname = "FLOOR16";
|
||||
}
|
||||
break;
|
||||
|
||||
case GAME_Hexen:
|
||||
if (isenterpic) return;
|
||||
if (isenterpic) return false;
|
||||
lumpname = "INTERPIC";
|
||||
break;
|
||||
|
||||
case GAME_Strife:
|
||||
default:
|
||||
// Strife doesn't have an intermission pic so choose something neutral.
|
||||
if (isenterpic) return;
|
||||
if (isenterpic) return false;
|
||||
lumpname = gameinfo.BorderFlat;
|
||||
break;
|
||||
}
|
||||
|
@ -399,7 +280,7 @@ public:
|
|||
{
|
||||
// shouldn't happen!
|
||||
background = NULL;
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
lnodes.Clear();
|
||||
|
@ -408,21 +289,21 @@ public:
|
|||
splat = NULL;
|
||||
|
||||
// a name with a starting '$' indicates an intermission script
|
||||
if (*lumpname!='$')
|
||||
if (*lumpname != '$')
|
||||
{
|
||||
texture = TexMan.CheckForTexture(lumpname, FTexture::TEX_MiscPatch, FTextureManager::TEXMAN_TryAny);
|
||||
}
|
||||
else
|
||||
{
|
||||
int lumpnum=Wads.CheckNumForFullName(lumpname+1, true);
|
||||
if (lumpnum>=0)
|
||||
int lumpnum = Wads.CheckNumForFullName(lumpname + 1, true);
|
||||
if (lumpnum >= 0)
|
||||
{
|
||||
FScanner sc(lumpnum);
|
||||
while (sc.GetString())
|
||||
{
|
||||
an.Reset();
|
||||
int caseval = sc.MustMatchString(WI_Cmd);
|
||||
switch(caseval)
|
||||
switch (caseval)
|
||||
{
|
||||
case 0: // Background
|
||||
sc.MustGetString();
|
||||
|
@ -448,8 +329,7 @@ public:
|
|||
while (!sc.CheckString("}"))
|
||||
{
|
||||
sc.MustGetString();
|
||||
strncpy(pt.level, sc.String,8);
|
||||
pt.level[8] = 0;
|
||||
pt.Level = sc.String;
|
||||
sc.MustGetNumber();
|
||||
pt.x = sc.Number;
|
||||
sc.MustGetNumber();
|
||||
|
@ -477,7 +357,7 @@ public:
|
|||
case 8: // IfLeaving
|
||||
an.type = ANIM_IFLEAVING;
|
||||
goto readanimation;
|
||||
|
||||
|
||||
case 9: // IfNotLeaving
|
||||
an.type = ANIM_IFNOTLEAVING;
|
||||
goto readanimation;
|
||||
|
@ -502,7 +382,7 @@ public:
|
|||
sc.MustGetString();
|
||||
an.LevelName = sc.String;
|
||||
sc.MustGetString();
|
||||
caseval=sc.MustMatchString(WI_Cmd);
|
||||
caseval = sc.MustMatchString(WI_Cmd);
|
||||
|
||||
default:
|
||||
switch (caseval)
|
||||
|
@ -562,13 +442,14 @@ public:
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
Printf("Intermission script %s not found!\n", lumpname+1);
|
||||
Printf("Intermission script %s not found!\n", lumpname + 1);
|
||||
texture = TexMan.GetTexture("INTERPIC", FTexture::TEX_MiscPatch);
|
||||
}
|
||||
}
|
||||
background=TexMan[texture];
|
||||
background = TexMan[texture];
|
||||
return noautostartmap;
|
||||
}
|
||||
|
||||
//====================================================================
|
||||
|
@ -578,11 +459,12 @@ public:
|
|||
//
|
||||
//====================================================================
|
||||
|
||||
void WI_updateAnimatedBack()
|
||||
void updateAnimatedBack()
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for(i=0;i<anims.Size();i++)
|
||||
bcnt++;
|
||||
for (i = 0; i<anims.Size(); i++)
|
||||
{
|
||||
in_anim_t * a = &anims[i];
|
||||
switch (a->type & ANIM_TYPE)
|
||||
|
@ -590,19 +472,19 @@ public:
|
|||
case ANIM_ALWAYS:
|
||||
if (bcnt >= a->nexttic)
|
||||
{
|
||||
if (++a->ctr >= (int)a->frames.Size())
|
||||
if (++a->ctr >= (int)a->frames.Size())
|
||||
{
|
||||
if (a->data==0) a->ctr = 0;
|
||||
if (a->data == 0) a->ctr = 0;
|
||||
else a->ctr--;
|
||||
}
|
||||
a->nexttic = bcnt + a->period;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case ANIM_PIC:
|
||||
a->ctr = 0;
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -613,11 +495,11 @@ public:
|
|||
//
|
||||
//====================================================================
|
||||
|
||||
void WI_drawBackground()
|
||||
void drawBackground(int state, bool drawsplat, bool snl_pointeron)
|
||||
{
|
||||
unsigned int i;
|
||||
double animwidth=320; // For a flat fill or clear background scale animations to 320x200
|
||||
double animheight=200;
|
||||
double animwidth = 320; // For a flat fill or clear background scale animations to 320x200
|
||||
double animheight = 200;
|
||||
|
||||
if (background)
|
||||
{
|
||||
|
@ -629,20 +511,20 @@ public:
|
|||
// placing the animations precisely where they belong on the base pic
|
||||
animwidth = background->GetScaledWidthDouble();
|
||||
animheight = background->GetScaledHeightDouble();
|
||||
screen->FillBorder (NULL);
|
||||
screen->FillBorder(NULL);
|
||||
screen->DrawTexture(background, 0, 0, DTA_Fullscreen, true, TAG_DONE);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
screen->FlatFill(0, 0, SCREENWIDTH, SCREENHEIGHT, background);
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
screen->Clear(0,0, SCREENWIDTH, SCREENHEIGHT, 0, 0);
|
||||
screen->Clear(0, 0, SCREENWIDTH, SCREENHEIGHT, 0, 0);
|
||||
}
|
||||
|
||||
for(i=0;i<anims.Size();i++)
|
||||
for (i = 0; i<anims.Size(); i++)
|
||||
{
|
||||
in_anim_t * a = &anims[i];
|
||||
level_info_t * li;
|
||||
|
@ -685,28 +567,216 @@ public:
|
|||
break;
|
||||
}
|
||||
if (a->ctr >= 0)
|
||||
screen->DrawTexture(a->frames[a->ctr], a->loc.x, a->loc.y,
|
||||
DTA_VirtualWidthF, animwidth, DTA_VirtualHeightF, animheight, TAG_DONE);
|
||||
screen->DrawTexture(a->frames[a->ctr], a->loc.x, a->loc.y,
|
||||
DTA_VirtualWidthF, animwidth, DTA_VirtualHeightF, animheight, TAG_DONE);
|
||||
}
|
||||
|
||||
if (drawsplat)
|
||||
{
|
||||
for (i = 0; i<lnodes.Size(); i++)
|
||||
{
|
||||
level_info_t * li = FindLevelInfo(lnodes[i].Level);
|
||||
if (li && li->flags & LEVEL_VISITED) drawOnLnode(i, &splat, 1); // draw a splat on taken cities.
|
||||
}
|
||||
}
|
||||
|
||||
// draw flashing ptr
|
||||
if (snl_pointeron && yah.Size())
|
||||
{
|
||||
unsigned int v = MapToIndex(wbs->next);
|
||||
// Draw only if it points to a valid level on the current screen!
|
||||
if (v<lnodes.Size()) drawOnLnode(v, &yah[0], yah.Size());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
//====================================================================
|
||||
//
|
||||
// Draws the splats and the 'You are here' arrows
|
||||
//
|
||||
//====================================================================
|
||||
|
||||
int MapToIndex(const char *map)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < lnodes.Size(); i++)
|
||||
{
|
||||
if (!lnodes[i].Level.CompareNoCase(map))
|
||||
break;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
//====================================================================
|
||||
//
|
||||
// Draws the splats and the 'You are here' arrows
|
||||
//
|
||||
//====================================================================
|
||||
|
||||
void drawOnLnode(int n, FTexture * c[], int numc)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i<numc; i++)
|
||||
{
|
||||
int left;
|
||||
int top;
|
||||
int right;
|
||||
int bottom;
|
||||
|
||||
|
||||
right = c[i]->GetScaledWidth();
|
||||
bottom = c[i]->GetScaledHeight();
|
||||
left = lnodes[n].x - c[i]->GetScaledLeftOffset();
|
||||
top = lnodes[n].y - c[i]->GetScaledTopOffset();
|
||||
right += left;
|
||||
bottom += top;
|
||||
|
||||
if (left >= 0 && right < 320 && top >= 0 && bottom < 200)
|
||||
{
|
||||
screen->DrawTexture(c[i], lnodes[n].x, lnodes[n].y, DTA_320x200, true, TAG_DONE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//====================================================================
|
||||
//
|
||||
// Draws a single character with a shadow
|
||||
//
|
||||
//====================================================================
|
||||
};
|
||||
|
||||
int WI_DrawCharPatch (FFont *font, int charcode, int x, int y, EColorRange translation=CR_UNTRANSLATED, bool nomove=false)
|
||||
struct FPatchInfo
|
||||
{
|
||||
FFont *mFont;
|
||||
FTexture *mPatch;
|
||||
EColorRange mColor;
|
||||
|
||||
void Init(FGIFont &gifont)
|
||||
{
|
||||
int width;
|
||||
font->GetChar(charcode, &width);
|
||||
screen->DrawChar(font, translation, x, y, charcode,
|
||||
nomove ? DTA_CleanNoMove : DTA_Clean, true,
|
||||
DTA_ShadowAlpha, (gameinfo.gametype & GAME_DoomChex) ? 0 : 0.5,
|
||||
TAG_DONE);
|
||||
return x - width;
|
||||
if (gifont.color == NAME_Null)
|
||||
{
|
||||
mPatch = TexMan[gifont.fontname]; // "entering"
|
||||
mColor = mPatch == NULL ? CR_UNTRANSLATED : CR_UNDEFINED;
|
||||
mFont = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
mFont = V_GetFont(gifont.fontname);
|
||||
mColor = V_FindFontColor(gifont.color);
|
||||
mPatch = NULL;
|
||||
}
|
||||
if (mFont == NULL)
|
||||
{
|
||||
mFont = BigFont;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
class FIntermissionScreen
|
||||
{
|
||||
public:
|
||||
|
||||
enum EValues
|
||||
{
|
||||
// GLOBAL LOCATIONS
|
||||
WI_TITLEY = 2,
|
||||
|
||||
// SINGPLE-PLAYER STUFF
|
||||
SP_STATSX = 50,
|
||||
SP_STATSY = 50,
|
||||
|
||||
SP_TIMEX = 8,
|
||||
SP_TIMEY = (200 - 32),
|
||||
|
||||
// NET GAME STUFF
|
||||
NG_STATSY = 50,
|
||||
};
|
||||
|
||||
|
||||
|
||||
// States for single-player
|
||||
enum ESPState
|
||||
{
|
||||
SP_KILLS = 0,
|
||||
SP_ITEMS = 2,
|
||||
SP_SECRET = 4,
|
||||
SP_FRAGS = 6,
|
||||
SP_TIME = 8,
|
||||
};
|
||||
|
||||
static const int SHOWNEXTLOCDELAY = 4; // in seconds
|
||||
|
||||
//
|
||||
// Animation.
|
||||
// There is another anim_t used in p_spec.
|
||||
// (which is why I have renamed this one!)
|
||||
//
|
||||
|
||||
|
||||
FInterBackground *bg;
|
||||
int acceleratestage; // used to accelerate or skip a stage
|
||||
bool playerready[MAXPLAYERS];
|
||||
int me; // wbs->pnum
|
||||
int bcnt;
|
||||
EState state; // specifies current state
|
||||
wbstartstruct_t *wbs; // contains information passed into intermission
|
||||
wbplayerstruct_t* Plrs[MAXPLAYERS]; // wbs->plyr[]
|
||||
int cnt; // used for general timing
|
||||
int cnt_kills[MAXPLAYERS];
|
||||
int cnt_items[MAXPLAYERS];
|
||||
int cnt_secret[MAXPLAYERS];
|
||||
int cnt_frags[MAXPLAYERS];
|
||||
int cnt_deaths[MAXPLAYERS];
|
||||
int cnt_time;
|
||||
int cnt_total_time;
|
||||
int cnt_par;
|
||||
int cnt_pause;
|
||||
int total_frags;
|
||||
int total_deaths;
|
||||
bool noautostartmap;
|
||||
int dofrags;
|
||||
int ng_state;
|
||||
float shadowalpha;
|
||||
|
||||
//
|
||||
// GRAPHICS
|
||||
//
|
||||
|
||||
FPatchInfo mapname;
|
||||
FPatchInfo finished;
|
||||
FPatchInfo entering;
|
||||
|
||||
FTexture* sp_secret; // "secret"
|
||||
FTexture* kills; // "Kills", "Scrt", "Items", "Frags"
|
||||
FTexture* secret;
|
||||
FTexture* items;
|
||||
FTexture* frags;
|
||||
FTexture* timepic; // Time sucks.
|
||||
FTexture* par;
|
||||
FTexture* sucks;
|
||||
FTexture* killers; // "killers", "victims"
|
||||
FTexture* victims;
|
||||
FTexture* total; // "Total", your face, your dead face
|
||||
FTexture* p; // Player graphic
|
||||
FTexture* lnames[2]; // Name graphics of each level (centered)
|
||||
|
||||
// [RH] Info to dynamically generate the level name graphics
|
||||
FString lnametexts[2];
|
||||
|
||||
|
||||
bool snl_pointeron = false;
|
||||
|
||||
int player_deaths[MAXPLAYERS];
|
||||
int sp_state;
|
||||
|
||||
//
|
||||
// CODE
|
||||
//
|
||||
|
||||
|
||||
|
||||
|
||||
//====================================================================
|
||||
//
|
||||
|
@ -744,6 +814,20 @@ public:
|
|||
return maxy;
|
||||
}
|
||||
|
||||
//====================================================================
|
||||
//
|
||||
// Draws a single character with a shadow
|
||||
//
|
||||
//====================================================================
|
||||
|
||||
int WI_DrawCharPatch(FFont *font, int charcode, int x, int y, EColorRange translation = CR_UNTRANSLATED, bool nomove = false)
|
||||
{
|
||||
int width;
|
||||
font->GetChar(charcode, &width);
|
||||
screen->DrawChar(font, translation, x, y, charcode, nomove ? DTA_CleanNoMove : DTA_Clean, true, TAG_DONE);
|
||||
return x - width;
|
||||
}
|
||||
|
||||
//====================================================================
|
||||
//
|
||||
// Draws a level name with the big font
|
||||
|
@ -870,57 +954,6 @@ public:
|
|||
}
|
||||
|
||||
|
||||
//====================================================================
|
||||
//
|
||||
// Draws the splats and the 'You are here' arrows
|
||||
//
|
||||
//====================================================================
|
||||
|
||||
int WI_MapToIndex (const char *map)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < lnodes.Size(); i++)
|
||||
{
|
||||
if (!strnicmp (lnodes[i].level, map, 8))
|
||||
break;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
//====================================================================
|
||||
//
|
||||
// Draws the splats and the 'You are here' arrows
|
||||
//
|
||||
//====================================================================
|
||||
|
||||
void WI_drawOnLnode( int n, FTexture * c[] ,int numc)
|
||||
{
|
||||
int i;
|
||||
for(i=0;i<numc;i++)
|
||||
{
|
||||
int left;
|
||||
int top;
|
||||
int right;
|
||||
int bottom;
|
||||
|
||||
|
||||
right = c[i]->GetScaledWidth();
|
||||
bottom = c[i]->GetScaledHeight();
|
||||
left = lnodes[n].x - c[i]->GetScaledLeftOffset();
|
||||
top = lnodes[n].y - c[i]->GetScaledTopOffset();
|
||||
right += left;
|
||||
bottom += top;
|
||||
|
||||
if (left >= 0 && right < 320 && top >= 0 && bottom < 200)
|
||||
{
|
||||
screen->DrawTexture (c[i], lnodes[n].x, lnodes[n].y, DTA_320x200, true, TAG_DONE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//====================================================================
|
||||
//
|
||||
// Draws a number.
|
||||
|
@ -1090,8 +1123,6 @@ public:
|
|||
|
||||
void WI_updateNoState ()
|
||||
{
|
||||
WI_updateAnimatedBack();
|
||||
|
||||
if (acceleratestage)
|
||||
{
|
||||
cnt = 0;
|
||||
|
@ -1135,13 +1166,11 @@ public:
|
|||
state = ShowNextLoc;
|
||||
acceleratestage = 0;
|
||||
cnt = SHOWNEXTLOCDELAY * TICRATE;
|
||||
WI_LoadBackground(true);
|
||||
bg->LoadBackground(true);
|
||||
}
|
||||
|
||||
void WI_updateShowNextLoc ()
|
||||
{
|
||||
WI_updateAnimatedBack();
|
||||
|
||||
if (!--cnt || acceleratestage)
|
||||
WI_initNoState();
|
||||
else
|
||||
|
@ -1150,26 +1179,7 @@ public:
|
|||
|
||||
void WI_drawShowNextLoc(void)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
WI_drawBackground();
|
||||
|
||||
if (splat)
|
||||
{
|
||||
for (i=0 ; i<lnodes.Size() ; i++)
|
||||
{
|
||||
level_info_t * li = FindLevelInfo (lnodes[i].level);
|
||||
if (li && li->flags & LEVEL_VISITED) WI_drawOnLnode(i, &splat,1); // draw a splat on taken cities.
|
||||
}
|
||||
}
|
||||
|
||||
// draw flashing ptr
|
||||
if (snl_pointeron && yah.Size())
|
||||
{
|
||||
unsigned int v = WI_MapToIndex (wbs->next);
|
||||
// Draw only if it points to a valid level on the current screen!
|
||||
if (v<lnodes.Size()) WI_drawOnLnode (v, &yah[0], yah.Size());
|
||||
}
|
||||
bg->drawBackground(state, true, snl_pointeron);
|
||||
|
||||
// draws which level you are entering..
|
||||
WI_drawEL ();
|
||||
|
@ -1239,8 +1249,6 @@ public:
|
|||
bool stillticking;
|
||||
bool autoskip = WI_autoSkip();
|
||||
|
||||
WI_updateAnimatedBack();
|
||||
|
||||
if ((acceleratestage || autoskip) && ng_state != 6)
|
||||
{
|
||||
acceleratestage = 0;
|
||||
|
@ -1350,7 +1358,7 @@ public:
|
|||
player_t *sortedplayers[MAXPLAYERS];
|
||||
|
||||
// draw animated background
|
||||
WI_drawBackground();
|
||||
bg->drawBackground(state, false, false);
|
||||
|
||||
y = WI_drawLF();
|
||||
|
||||
|
@ -1491,8 +1499,6 @@ public:
|
|||
bool stillticking;
|
||||
bool autoskip = WI_autoSkip();
|
||||
|
||||
WI_updateAnimatedBack ();
|
||||
|
||||
if ((acceleratestage || autoskip) && ng_state != 10)
|
||||
{
|
||||
acceleratestage = 0;
|
||||
|
@ -1656,7 +1662,7 @@ public:
|
|||
FTexture *readyico = TexMan.FindTexture("READYICO");
|
||||
|
||||
// draw animated background
|
||||
WI_drawBackground();
|
||||
bg->drawBackground(state, false, false);
|
||||
|
||||
y = WI_drawLF();
|
||||
|
||||
|
@ -1786,8 +1792,6 @@ public:
|
|||
|
||||
void WI_updateStats ()
|
||||
{
|
||||
WI_updateAnimatedBack ();
|
||||
|
||||
if (acceleratestage && sp_state != 10)
|
||||
{
|
||||
acceleratestage = 0;
|
||||
|
@ -1908,8 +1912,8 @@ public:
|
|||
lh = IntermissionFont->GetHeight() * 3 / 2;
|
||||
|
||||
// draw animated background
|
||||
WI_drawBackground();
|
||||
|
||||
bg->drawBackground(state, false, false);
|
||||
|
||||
WI_drawLF();
|
||||
|
||||
if (gameinfo.gametype & GAME_DoomChex)
|
||||
|
@ -2099,12 +2103,15 @@ public:
|
|||
if (li) lnametexts[1] = li->LookupLevelName();
|
||||
else lnametexts[1] = "";
|
||||
|
||||
WI_LoadBackground(false);
|
||||
bg = new FInterBackground(wbs);
|
||||
noautostartmap = bg->LoadBackground(false);
|
||||
}
|
||||
|
||||
void WI_unloadData ()
|
||||
{
|
||||
// [RH] The texture data gets unloaded at pre-map time, so there's nothing to do here
|
||||
if (bg != nullptr) delete bg;
|
||||
bg = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2165,6 +2172,7 @@ static FIntermissionScreen WI_Screen;
|
|||
|
||||
void WI_Ticker()
|
||||
{
|
||||
WI_Screen.bg->updateAnimatedBack();
|
||||
WI_Screen.WI_Ticker();
|
||||
}
|
||||
|
||||
|
|
|
@ -1566,6 +1566,23 @@ TXT_COMM0 = "Incoming Message";
|
|||
TXT_COMM1 = "Incoming Message from BlackBird";
|
||||
|
||||
|
||||
AMMO_CLIP = "Bullets";
|
||||
AMMO_SHELLS = "Shotgun Shells";
|
||||
AMMO_ROCKETS = "Rockets";
|
||||
AMMO_CELLS = "Energy Cells";
|
||||
AMMO_GOLDWAND = "Wand Crystals";
|
||||
AMMO_CROSSBOW = "Ethereal Arrows";
|
||||
AMMO_BLASTER = "Claw Orbs";
|
||||
AMMO_MACE = "Mace Spheres";
|
||||
AMMO_SKULLROD = "Hellstaff Runes";
|
||||
AMMO_PHOENIXROD = "Flame Orbs";
|
||||
AMMO_MANA1 = "Blue Mana";
|
||||
AMMO_MANA2 = "Green Mana";
|
||||
$ifgame(chex) AMMO_CLIP = "Mini Zorch Charge";
|
||||
$ifgame(chex) AMMO_SHELLS = "Large Zorcher Charge";
|
||||
$ifgame(chex) AMMO_ROCKETS = "Propulsor Charge";
|
||||
$ifgame(chex) AMMO_CELLS = "Phasing Zorcher Charge";
|
||||
|
||||
// Menu Strings
|
||||
|
||||
// Main Menu
|
||||
|
|
|
@ -230,7 +230,6 @@ class Actor : Thinker native
|
|||
native deprecated double ScaleX;
|
||||
native deprecated double ScaleY;
|
||||
|
||||
//int ConversationRoot; // THe root of the current dialogue;
|
||||
//FStrifeDialogueNode *Conversation; // [RH] The dialogue to show when this actor is used.;
|
||||
|
||||
|
||||
|
@ -368,7 +367,7 @@ class Actor : Thinker native
|
|||
native Vector3 PosRelative(sector sec);
|
||||
|
||||
native void HandleSpawnFlags();
|
||||
native void ExplodeMissile(line lin = null, Actor target = null);
|
||||
native void ExplodeMissile(line lin = null, Actor target = null, bool onsky = false);
|
||||
native void RestoreDamage();
|
||||
native int SpawnHealth();
|
||||
native void SetDamage(int dmg);
|
||||
|
|
|
@ -353,6 +353,7 @@ class Thinker : Object native
|
|||
STAT_AUTODECAL, // A decal that can be automatically deleted
|
||||
STAT_CORPSEPOINTER, // An entry in Hexen's corpse queue
|
||||
STAT_TRAVELLING, // An actor temporarily travelling to a new map
|
||||
STAT_STATIC,
|
||||
|
||||
// Thinkers that do think
|
||||
STAT_FIRST_THINKING=32,
|
||||
|
|
|
@ -10,6 +10,7 @@ class Clip : Ammo
|
|||
Ammo.BackpackAmount 10;
|
||||
Ammo.BackpackMaxAmount 400;
|
||||
Inventory.Icon "CLIPA0";
|
||||
Tag "$AMMO_CLIP";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
@ -48,6 +49,7 @@ class RocketAmmo : Ammo
|
|||
Ammo.BackpackAmount 1;
|
||||
Ammo.BackpackMaxAmount 100;
|
||||
Inventory.Icon "ROCKA0";
|
||||
Tag "$AMMO_ROCKETS";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
@ -86,6 +88,7 @@ class Cell : Ammo
|
|||
Ammo.BackpackAmount 20;
|
||||
Ammo.BackpackMaxAmount 600;
|
||||
Inventory.Icon "CELLA0";
|
||||
Tag "$AMMO_CELLS";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
@ -124,6 +127,7 @@ class Shell : Ammo
|
|||
Ammo.BackpackAmount 4;
|
||||
Ammo.BackpackMaxAmount 100;
|
||||
Inventory.Icon "SHELA0";
|
||||
Tag "$AMMO_SHELLS";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
|
@ -11,6 +11,7 @@ Class GoldWandAmmo : Ammo
|
|||
Ammo.BackpackAmount 10;
|
||||
Ammo.BackpackMaxAmount 200;
|
||||
Inventory.Icon "INAMGLD";
|
||||
Tag "$AMMO_GOLDWAND";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
@ -48,6 +49,7 @@ Class CrossbowAmmo : Ammo
|
|||
Ammo.BackpackAmount 5;
|
||||
Ammo.BackpackMaxAmount 100;
|
||||
Inventory.Icon "INAMBOW";
|
||||
Tag "$AMMO_CROSSBOW";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
@ -85,6 +87,7 @@ Class MaceAmmo : Ammo
|
|||
Ammo.BackpackAmount 20;
|
||||
Ammo.BackpackMaxAmount 300;
|
||||
Inventory.Icon "INAMLOB";
|
||||
Tag "$AMMO_MACE";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
@ -123,6 +126,7 @@ Class BlasterAmmo : Ammo
|
|||
Ammo.BackpackAmount 10;
|
||||
Ammo.BackpackMaxAmount 400;
|
||||
Inventory.Icon "INAMBST";
|
||||
Tag "$AMMO_BLASTER";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
@ -161,6 +165,7 @@ Class SkullRodAmmo : Ammo
|
|||
Ammo.BackpackAmount 20;
|
||||
Ammo.BackpackMaxAmount 400;
|
||||
Inventory.Icon "INAMRAM";
|
||||
Tag "$AMMO_SKULLROD";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
@ -199,6 +204,7 @@ Class PhoenixRodAmmo : Ammo
|
|||
Ammo.BackpackAmount 1;
|
||||
Ammo.BackpackMaxAmount 40;
|
||||
Inventory.Icon "INAMPNX";
|
||||
Tag "$AMMO_PHOENIXROD";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
|
@ -13,6 +13,7 @@ class Mana1 : Ammo
|
|||
+FLOATBOB
|
||||
Inventory.Icon "MAN1I0";
|
||||
Inventory.PickupMessage "$TXT_MANA_1";
|
||||
Tag "$AMMO_MANA1";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
@ -37,6 +38,7 @@ class Mana2 : Ammo
|
|||
+FLOATBOB
|
||||
Inventory.Icon "MAN2G0";
|
||||
Inventory.PickupMessage "$TXT_MANA_2";
|
||||
Tag "$AMMO_MANA2";
|
||||
}
|
||||
States
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue