mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-02-27 21:50:47 +00:00
Merge branch 'master' of https://github.com/coelckers/gzdoom
This commit is contained in:
commit
fd056f26fd
26 changed files with 428 additions and 328 deletions
|
@ -389,6 +389,7 @@ enum ActorFlag7
|
||||||
MF7_SMASHABLE = 0x04000000, // dies if hitting the floor.
|
MF7_SMASHABLE = 0x04000000, // dies if hitting the floor.
|
||||||
MF7_NOSHIELDREFLECT = 0x08000000, // will not be reflected by shields.
|
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_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 ---
|
// --- mobj.renderflags ---
|
||||||
|
|
|
@ -880,7 +880,7 @@ CCMD(linetarget)
|
||||||
if (CheckCheatmode () || players[consoleplayer].mo == NULL) return;
|
if (CheckCheatmode () || players[consoleplayer].mo == NULL) return;
|
||||||
C_AimLine(&t, false);
|
C_AimLine(&t, false);
|
||||||
if (t.linetarget)
|
if (t.linetarget)
|
||||||
C_PrintInfo(t.linetarget);
|
C_PrintInfo(t.linetarget, argv.argc() > 1 && atoi(argv[1]) != 0);
|
||||||
else
|
else
|
||||||
Printf("No target found\n");
|
Printf("No target found\n");
|
||||||
}
|
}
|
||||||
|
@ -893,7 +893,7 @@ CCMD(info)
|
||||||
if (CheckCheatmode () || players[consoleplayer].mo == NULL) return;
|
if (CheckCheatmode () || players[consoleplayer].mo == NULL) return;
|
||||||
C_AimLine(&t, true);
|
C_AimLine(&t, true);
|
||||||
if (t.linetarget)
|
if (t.linetarget)
|
||||||
C_PrintInfo(t.linetarget);
|
C_PrintInfo(t.linetarget, !(argv.argc() > 1 && atoi(argv[1]) == 0));
|
||||||
else
|
else
|
||||||
Printf("No target found. Info cannot find actors that have "
|
Printf("No target found. Info cannot find actors that have "
|
||||||
"the NOBLOCKMAP flag or have height/radius of 0.\n");
|
"the NOBLOCKMAP flag or have height/radius of 0.\n");
|
||||||
|
@ -902,7 +902,7 @@ CCMD(info)
|
||||||
CCMD(myinfo)
|
CCMD(myinfo)
|
||||||
{
|
{
|
||||||
if (CheckCheatmode () || players[consoleplayer].mo == NULL) return;
|
if (CheckCheatmode () || players[consoleplayer].mo == NULL) return;
|
||||||
C_PrintInfo(players[consoleplayer].mo);
|
C_PrintInfo(players[consoleplayer].mo, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef bool (*ActorTypeChecker) (AActor *);
|
typedef bool (*ActorTypeChecker) (AActor *);
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
#include "c_functions.h"
|
#include "c_functions.h"
|
||||||
|
|
||||||
void C_PrintInfo(AActor *target)
|
void C_PrintInfo(AActor *target, bool verbose)
|
||||||
{
|
{
|
||||||
if (target->player)
|
if (target->player)
|
||||||
Printf("Player=%s, ", target->player->userinfo.GetName());
|
Printf("Player=%s, ", target->player->userinfo.GetName());
|
||||||
|
@ -47,7 +47,7 @@ void C_PrintInfo(AActor *target)
|
||||||
target->GetClass()->TypeName.GetChars(),
|
target->GetClass()->TypeName.GetChars(),
|
||||||
target->health,
|
target->health,
|
||||||
target->SpawnHealth());
|
target->SpawnHealth());
|
||||||
PrintMiscActorInfo(target);
|
if (verbose) PrintMiscActorInfo(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
void C_AimLine(FTranslatedLineTarget *t, bool nonshootable)
|
void C_AimLine(FTranslatedLineTarget *t, bool nonshootable)
|
||||||
|
|
|
@ -34,6 +34,6 @@
|
||||||
|
|
||||||
void C_PrintInv(AActor *target);
|
void C_PrintInv(AActor *target);
|
||||||
void C_AimLine(FTranslatedLineTarget *t, bool nonshootable);
|
void C_AimLine(FTranslatedLineTarget *t, bool nonshootable);
|
||||||
void C_PrintInfo(AActor *target);
|
void C_PrintInfo(AActor *target, bool verbose);
|
||||||
|
|
||||||
struct FTranslatedLineTarget;
|
struct FTranslatedLineTarget;
|
|
@ -811,6 +811,10 @@ void D_Display ()
|
||||||
{
|
{
|
||||||
StatusBar->DrawBottomStuff (HUD_AltHud);
|
StatusBar->DrawBottomStuff (HUD_AltHud);
|
||||||
if (DrawFSHUD || automapactive) DrawHUD();
|
if (DrawFSHUD || automapactive) DrawHUD();
|
||||||
|
if (players[consoleplayer].camera && players[consoleplayer].camera->player)
|
||||||
|
{
|
||||||
|
StatusBar->DrawCrosshair();
|
||||||
|
}
|
||||||
StatusBar->Draw (HUD_AltHud);
|
StatusBar->Draw (HUD_AltHud);
|
||||||
StatusBar->DrawTopStuff (HUD_AltHud);
|
StatusBar->DrawTopStuff (HUD_AltHud);
|
||||||
}
|
}
|
||||||
|
|
|
@ -449,7 +449,13 @@ DEFINE_EVENT_LOOPER(WorldLightning)
|
||||||
DEFINE_EVENT_LOOPER(WorldTick)
|
DEFINE_EVENT_LOOPER(WorldTick)
|
||||||
|
|
||||||
// declarations
|
// declarations
|
||||||
IMPLEMENT_CLASS(DStaticEventHandler, false, false);
|
IMPLEMENT_CLASS(DStaticEventHandler, false, true);
|
||||||
|
|
||||||
|
IMPLEMENT_POINTERS_START(DStaticEventHandler)
|
||||||
|
IMPLEMENT_POINTER(next)
|
||||||
|
IMPLEMENT_POINTER(prev)
|
||||||
|
IMPLEMENT_POINTERS_END
|
||||||
|
|
||||||
IMPLEMENT_CLASS(DEventHandler, false, false);
|
IMPLEMENT_CLASS(DEventHandler, false, false);
|
||||||
IMPLEMENT_CLASS(DBaseEvent, false, false)
|
IMPLEMENT_CLASS(DBaseEvent, false, false)
|
||||||
IMPLEMENT_CLASS(DRenderEvent, false, false)
|
IMPLEMENT_CLASS(DRenderEvent, false, false)
|
||||||
|
|
|
@ -76,7 +76,7 @@ void E_SerializeEvents(FSerializer& arc);
|
||||||
|
|
||||||
class DStaticEventHandler : public DObject // make it a part of normal GC process
|
class DStaticEventHandler : public DObject // make it a part of normal GC process
|
||||||
{
|
{
|
||||||
DECLARE_CLASS(DStaticEventHandler, DObject)
|
DECLARE_CLASS(DStaticEventHandler, DObject);
|
||||||
HAS_OBJECT_POINTERS
|
HAS_OBJECT_POINTERS
|
||||||
public:
|
public:
|
||||||
DStaticEventHandler()
|
DStaticEventHandler()
|
||||||
|
|
|
@ -348,6 +348,10 @@ CCMD (weapnext)
|
||||||
StatusBar->AttachMessage(new DHUDMessageFadeOut(SmallFont, SendItemUse->GetTag(),
|
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' ));
|
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)
|
CCMD (weapprev)
|
||||||
|
@ -359,6 +363,10 @@ CCMD (weapprev)
|
||||||
StatusBar->AttachMessage(new DHUDMessageFadeOut(SmallFont, SendItemUse->GetTag(),
|
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' ));
|
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)
|
CCMD (invnext)
|
||||||
|
@ -368,6 +376,7 @@ CCMD (invnext)
|
||||||
if (who == NULL)
|
if (who == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
auto old = who->InvSel;
|
||||||
if (who->InvSel != NULL)
|
if (who->InvSel != NULL)
|
||||||
{
|
{
|
||||||
if ((next = who->InvSel->NextInv()) != NULL)
|
if ((next = who->InvSel->NextInv()) != NULL)
|
||||||
|
@ -391,6 +400,10 @@ CCMD (invnext)
|
||||||
1.5f, 0.80f, 0, 0, (EColorRange)*nametagcolor, 2.f, 0.35f), MAKE_ID('S','I','N','V'));
|
1.5f, 0.80f, 0, 0, (EColorRange)*nametagcolor, 2.f, 0.35f), MAKE_ID('S','I','N','V'));
|
||||||
}
|
}
|
||||||
who->player->inventorytics = 5*TICRATE;
|
who->player->inventorytics = 5*TICRATE;
|
||||||
|
if (old != who->InvSel)
|
||||||
|
{
|
||||||
|
S_Sound(CHAN_AUTO, "misc/invchange", 1.0, ATTN_NONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CCMD (invprev)
|
CCMD (invprev)
|
||||||
|
@ -400,6 +413,7 @@ CCMD (invprev)
|
||||||
if (who == NULL)
|
if (who == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
auto old = who->InvSel;
|
||||||
if (who->InvSel != NULL)
|
if (who->InvSel != NULL)
|
||||||
{
|
{
|
||||||
if ((item = who->InvSel->PrevInv()) != NULL)
|
if ((item = who->InvSel->PrevInv()) != NULL)
|
||||||
|
@ -421,6 +435,10 @@ CCMD (invprev)
|
||||||
1.5f, 0.80f, 0, 0, (EColorRange)*nametagcolor, 2.f, 0.35f), MAKE_ID('S','I','N','V'));
|
1.5f, 0.80f, 0, 0, (EColorRange)*nametagcolor, 2.f, 0.35f), MAKE_ID('S','I','N','V'));
|
||||||
}
|
}
|
||||||
who->player->inventorytics = 5*TICRATE;
|
who->player->inventorytics = 5*TICRATE;
|
||||||
|
if (old != who->InvSel)
|
||||||
|
{
|
||||||
|
S_Sound(CHAN_AUTO, "misc/invchange", 1.0, ATTN_NONE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CCMD (invuseall)
|
CCMD (invuseall)
|
||||||
|
|
|
@ -1136,10 +1136,6 @@ void DrawHUD()
|
||||||
i=DrawAmmo(CPlayer, hudwidth-5, i);
|
i=DrawAmmo(CPlayer, hudwidth-5, i);
|
||||||
if (hud_showweapons) DrawWeapons(CPlayer, hudwidth - 5, i);
|
if (hud_showweapons) DrawWeapons(CPlayer, hudwidth - 5, i);
|
||||||
DrawInventory(CPlayer, 144, hudheight-28);
|
DrawInventory(CPlayer, 144, hudheight-28);
|
||||||
if (CPlayer->camera && CPlayer->camera->player)
|
|
||||||
{
|
|
||||||
StatusBar->DrawCrosshair();
|
|
||||||
}
|
|
||||||
if (idmypos) DrawCoordinates(CPlayer);
|
if (idmypos) DrawCoordinates(CPlayer);
|
||||||
|
|
||||||
DrawTime();
|
DrawTime();
|
||||||
|
|
|
@ -67,7 +67,8 @@ DMenu *CreateMessageBoxMenu(DMenu *parent, const char *message, int messagemode,
|
||||||
{
|
{
|
||||||
auto c = PClass::FindClass("MessageBoxMenu");
|
auto c = PClass::FindClass("MessageBoxMenu");
|
||||||
auto p = c->CreateNew();
|
auto p = c->CreateNew();
|
||||||
VMValue params[] = { p, parent, FString(message), messagemode, playsound, action.GetIndex(), reinterpret_cast<void*>(handler) };
|
const FString msg = '$' == message[0] ? GStrings(message + 1) : message;
|
||||||
|
VMValue params[] = { p, parent, msg, messagemode, playsound, action.GetIndex(), reinterpret_cast<void*>(handler) };
|
||||||
|
|
||||||
auto f = dyn_cast<PFunction>(c->Symbols.FindSymbol("Init", false));
|
auto f = dyn_cast<PFunction>(c->Symbols.FindSymbol("Init", false));
|
||||||
GlobalVMStack.Call(f->Variants[0].Implementation, params, countof(params), nullptr, 0);
|
GlobalVMStack.Call(f->Variants[0].Implementation, params, countof(params), nullptr, 0);
|
||||||
|
|
|
@ -654,6 +654,7 @@ xx(Goodbye)
|
||||||
xx(Require)
|
xx(Require)
|
||||||
xx(Exclude)
|
xx(Exclude)
|
||||||
xx(Userstring)
|
xx(Userstring)
|
||||||
|
xx(Sky)
|
||||||
|
|
||||||
// Special menus
|
// Special menus
|
||||||
xx(Mainmenu)
|
xx(Mainmenu)
|
||||||
|
|
|
@ -1715,6 +1715,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) &&
|
if ((other->flags3 & MF3_NOTARGET) &&
|
||||||
(other->tid != TIDtoHate || TIDtoHate == 0) &&
|
(other->tid != TIDtoHate || TIDtoHate == 0) &&
|
||||||
!IsHostile (other))
|
!IsHostile (other))
|
||||||
|
|
|
@ -112,7 +112,7 @@ void P_BloodSplatter (const DVector3 &pos, AActor *originator, DAngle hitangle);
|
||||||
void P_BloodSplatter2 (const DVector3 &pos, AActor *originator, DAngle hitangle);
|
void P_BloodSplatter2 (const DVector3 &pos, AActor *originator, DAngle hitangle);
|
||||||
void P_RipperBlood (AActor *mo, AActor *bleeder);
|
void P_RipperBlood (AActor *mo, AActor *bleeder);
|
||||||
int P_GetThingFloorType (AActor *thing);
|
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_OldSpawnMissile(AActor *source, AActor *owner, AActor *dest, PClassActor *type);
|
||||||
AActor *P_SpawnMissile (AActor* source, AActor* dest, PClassActor *type, AActor* owner = NULL);
|
AActor *P_SpawnMissile (AActor* source, AActor* dest, PClassActor *type, AActor* owner = NULL);
|
||||||
|
|
|
@ -5277,20 +5277,22 @@ bool P_UseTraverse(AActor *usething, const DVector2 &start, const DVector2 &end,
|
||||||
// [RH] Check for things to talk with or use a puzzle item on
|
// [RH] Check for things to talk with or use a puzzle item on
|
||||||
if (!in->isaline)
|
if (!in->isaline)
|
||||||
{
|
{
|
||||||
if (usething == in->d.thing)
|
AActor * const mobj = in->d.thing;
|
||||||
|
|
||||||
|
if (mobj == usething)
|
||||||
continue;
|
continue;
|
||||||
// Check thing
|
// Check thing
|
||||||
|
|
||||||
// Check for puzzle item use or USESPECIAL flag
|
// Check for puzzle item use or USESPECIAL flag
|
||||||
// Extended to use the same activationtype mechanism as BUMPSPECIAL does
|
// Extended to use the same activationtype mechanism as BUMPSPECIAL does
|
||||||
if (in->d.thing->flags5 & MF5_USESPECIAL || in->d.thing->special == UsePuzzleItem)
|
if (mobj->flags5 & MF5_USESPECIAL || mobj->special == UsePuzzleItem)
|
||||||
{
|
{
|
||||||
if (P_ActivateThingSpecial(in->d.thing, usething))
|
if (P_ActivateThingSpecial(mobj, usething))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
IFVIRTUALPTR(usething, AActor, Used)
|
IFVIRTUALPTR(mobj, AActor, Used)
|
||||||
{
|
{
|
||||||
VMValue params[] = { usething, in->d.thing };
|
VMValue params[] = { mobj, usething };
|
||||||
int ret;
|
int ret;
|
||||||
VMReturn vret(&ret);
|
VMReturn vret(&ret);
|
||||||
GlobalVMStack.Call(func, params, 2, &vret, 1);
|
GlobalVMStack.Call(func, params, 2, &vret, 1);
|
||||||
|
|
|
@ -1805,7 +1805,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)
|
if (mo->flags3 & MF3_EXPLOCOUNT)
|
||||||
{
|
{
|
||||||
|
@ -1833,11 +1833,15 @@ void P_ExplodeMissile (AActor *mo, line_t *line, AActor *target)
|
||||||
}
|
}
|
||||||
if (nextstate == NULL) nextstate = mo->FindState(NAME_Death);
|
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.
|
if (!(mo->flags3 & MF3_SKYEXPLODE))
|
||||||
mo->Destroy ();
|
{
|
||||||
return;
|
// [RH] Don't explode missiles on horizon lines.
|
||||||
|
mo->Destroy();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
nextstate = mo->FindState(NAME_Death, NAME_Sky);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (line != NULL && cl_missiledecals)
|
if (line != NULL && cl_missiledecals)
|
||||||
|
@ -2558,26 +2562,32 @@ double P_XYMovement (AActor *mo, DVector2 scroll)
|
||||||
}
|
}
|
||||||
explode:
|
explode:
|
||||||
// explode a missile
|
// explode a missile
|
||||||
if (!(mo->flags3 & MF3_SKYEXPLODE))
|
bool onsky = false;
|
||||||
{
|
|
||||||
if (tm.ceilingline &&
|
if (tm.ceilingline &&
|
||||||
tm.ceilingline->backsector &&
|
tm.ceilingline->backsector &&
|
||||||
tm.ceilingline->backsector->GetTexture(sector_t::ceiling) == skyflatnum &&
|
tm.ceilingline->backsector->GetTexture(sector_t::ceiling) == skyflatnum &&
|
||||||
mo->Z() >= tm.ceilingline->backsector->ceilingplane.ZatPoint(mo->PosRelative(tm.ceilingline)))
|
mo->Z() >= tm.ceilingline->backsector->ceilingplane.ZatPoint(mo->PosRelative(tm.ceilingline)))
|
||||||
{
|
{
|
||||||
// Hack to prevent missiles exploding against the sky.
|
if (!(mo->flags3 & MF3_SKYEXPLODE))
|
||||||
// Does not handle sky floors.
|
{
|
||||||
mo->Destroy ();
|
// Hack to prevent missiles exploding against the sky.
|
||||||
return Oldfloorz;
|
// Does not handle sky floors.
|
||||||
|
mo->Destroy();
|
||||||
|
return Oldfloorz;
|
||||||
|
}
|
||||||
|
else onsky = true;
|
||||||
}
|
}
|
||||||
// [RH] Don't explode on horizon lines.
|
// [RH] Don't explode on horizon lines.
|
||||||
if (mo->BlockingLine != NULL && mo->BlockingLine->special == Line_Horizon)
|
if (mo->BlockingLine != NULL && mo->BlockingLine->special == Line_Horizon)
|
||||||
{
|
{
|
||||||
mo->Destroy ();
|
if (!(mo->flags3 & MF3_SKYEXPLODE))
|
||||||
return Oldfloorz;
|
{
|
||||||
|
mo->Destroy();
|
||||||
|
return Oldfloorz;
|
||||||
|
}
|
||||||
|
else onsky = true;
|
||||||
}
|
}
|
||||||
}
|
P_ExplodeMissile (mo, mo->BlockingLine, BlockingMobj, onsky);
|
||||||
P_ExplodeMissile (mo, mo->BlockingLine, BlockingMobj);
|
|
||||||
return Oldfloorz;
|
return Oldfloorz;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2956,15 +2966,20 @@ void P_ZMovement (AActor *mo, double oldfloorz)
|
||||||
}
|
}
|
||||||
else
|
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 (!(mo->flags3 & MF3_SKYEXPLODE))
|
||||||
// if this is a sky floor.
|
{
|
||||||
mo->Destroy ();
|
// [RH] Just remove the missile without exploding it
|
||||||
return;
|
// if this is a sky floor.
|
||||||
|
mo->Destroy();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else onsky = true;
|
||||||
}
|
}
|
||||||
P_HitFloor (mo);
|
P_HitFloor (mo);
|
||||||
P_ExplodeMissile (mo, NULL, NULL);
|
P_ExplodeMissile (mo, NULL, NULL, onsky);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3057,12 +3072,17 @@ void P_ZMovement (AActor *mo, double oldfloorz)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mo->ceilingpic == skyflatnum && !(mo->flags3 & MF3_SKYEXPLODE))
|
bool onsky = false;
|
||||||
|
if (mo->ceilingpic == skyflatnum)
|
||||||
{
|
{
|
||||||
mo->Destroy ();
|
if (!(mo->flags3 & MF3_SKYEXPLODE))
|
||||||
return;
|
{
|
||||||
|
mo->Destroy();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else onsky = true;
|
||||||
}
|
}
|
||||||
P_ExplodeMissile (mo, NULL, NULL);
|
P_ExplodeMissile (mo, NULL, NULL, onsky);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -467,7 +467,8 @@ static void DoSectorDamage(AActor *actor, sector_t *sec, int amount, FName type,
|
||||||
return;
|
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)
|
void P_SectorDamage(int tag, int amount, FName type, PClassActor *protectClass, int flags)
|
||||||
|
|
|
@ -77,6 +77,7 @@ const double CARRYFACTOR = 3 / 32.;
|
||||||
#define DAMAGE_NONPLAYERS 2
|
#define DAMAGE_NONPLAYERS 2
|
||||||
#define DAMAGE_IN_AIR 4
|
#define DAMAGE_IN_AIR 4
|
||||||
#define DAMAGE_SUBCLASSES_PROTECT 8
|
#define DAMAGE_SUBCLASSES_PROTECT 8
|
||||||
|
#define DAMAGE_NO_ARMOR 16
|
||||||
|
|
||||||
|
|
||||||
// [RH] If a deathmatch game, checks to see if noexit is enabled.
|
// [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, SMASHABLE, AActor, flags7),
|
||||||
DEFINE_FLAG(MF7, NOSHIELDREFLECT, AActor, flags7),
|
DEFINE_FLAG(MF7, NOSHIELDREFLECT, AActor, flags7),
|
||||||
DEFINE_FLAG(MF7, FORCEZERORADIUSDMG, AActor, flags7),
|
DEFINE_FLAG(MF7, FORCEZERORADIUSDMG, AActor, flags7),
|
||||||
|
DEFINE_FLAG(MF7, NOINFIGHTSPECIES, AActor, flags7),
|
||||||
|
|
||||||
// Effect flags
|
// Effect flags
|
||||||
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
||||||
|
@ -916,7 +917,7 @@ void InitThingdef()
|
||||||
fieldptr = new PField("gametic", TypeSInt32, VARF_Native | VARF_Static | VARF_ReadOnly, (intptr_t)&gametic);
|
fieldptr = new PField("gametic", TypeSInt32, VARF_Native | VARF_Static | VARF_ReadOnly, (intptr_t)&gametic);
|
||||||
Namespaces.GlobalNamespace->Symbols.AddSymbol(fieldptr);
|
Namespaces.GlobalNamespace->Symbols.AddSymbol(fieldptr);
|
||||||
|
|
||||||
fieldptr = new PField("demoplayback", TypeSInt32, VARF_Native | VARF_Static | VARF_ReadOnly, (intptr_t)&demoplayback);
|
fieldptr = new PField("demoplayback", TypeBool, VARF_Native | VARF_Static | VARF_ReadOnly, (intptr_t)&demoplayback);
|
||||||
Namespaces.GlobalNamespace->Symbols.AddSymbol(fieldptr);
|
Namespaces.GlobalNamespace->Symbols.AddSymbol(fieldptr);
|
||||||
|
|
||||||
fieldptr = new PField("BackbuttonTime", TypeSInt32, VARF_Native | VARF_Static, (intptr_t)&BackbuttonTime);
|
fieldptr = new PField("BackbuttonTime", TypeSInt32, VARF_Native | VARF_Static, (intptr_t)&BackbuttonTime);
|
||||||
|
|
|
@ -567,7 +567,7 @@ bool DCanvas::ParseDrawTextureTags(FTexture *img, double x, double y, DWORD tag,
|
||||||
parms->colorOverlay = 0;
|
parms->colorOverlay = 0;
|
||||||
parms->alphaChannel = false;
|
parms->alphaChannel = false;
|
||||||
parms->flipX = false;
|
parms->flipX = false;
|
||||||
parms->shadowAlpha = 0;
|
//parms->shadowAlpha = 0;
|
||||||
parms->shadowColor = 0;
|
parms->shadowColor = 0;
|
||||||
parms->virtWidth = this->GetWidth();
|
parms->virtWidth = this->GetWidth();
|
||||||
parms->virtHeight = this->GetHeight();
|
parms->virtHeight = this->GetHeight();
|
||||||
|
@ -840,7 +840,7 @@ bool DCanvas::ParseDrawTextureTags(FTexture *img, double x, double y, DWORD tag,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DTA_ShadowAlpha:
|
case DTA_ShadowAlpha:
|
||||||
parms->shadowAlpha = (float)MIN(1., ListGetDouble(tags));
|
//parms->shadowAlpha = (float)MIN(1., ListGetDouble(tags));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DTA_ShadowColor:
|
case DTA_ShadowColor:
|
||||||
|
@ -851,12 +851,12 @@ bool DCanvas::ParseDrawTextureTags(FTexture *img, double x, double y, DWORD tag,
|
||||||
boolval = ListGetInt(tags);
|
boolval = ListGetInt(tags);
|
||||||
if (boolval)
|
if (boolval)
|
||||||
{
|
{
|
||||||
parms->shadowAlpha = 0.5;
|
//parms->shadowAlpha = 0.5;
|
||||||
parms->shadowColor = 0;
|
parms->shadowColor = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
parms->shadowAlpha = 0;
|
//parms->shadowAlpha = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -162,7 +162,7 @@ struct DrawParms
|
||||||
uint32 colorOverlay;
|
uint32 colorOverlay;
|
||||||
INTBOOL alphaChannel;
|
INTBOOL alphaChannel;
|
||||||
INTBOOL flipX;
|
INTBOOL flipX;
|
||||||
float shadowAlpha;
|
//float shadowAlpha;
|
||||||
int shadowColor;
|
int shadowColor;
|
||||||
INTBOOL keepratio;
|
INTBOOL keepratio;
|
||||||
INTBOOL masked;
|
INTBOOL masked;
|
||||||
|
|
567
src/wi_stuff.cpp
567
src/wi_stuff.cpp
|
@ -60,6 +60,14 @@ CVAR(Bool, wi_showtotaltime, true, CVAR_ARCHIVE)
|
||||||
CVAR(Bool, wi_noautostartmap, false, CVAR_USERINFO | CVAR_ARCHIVE)
|
CVAR(Bool, wi_noautostartmap, false, CVAR_USERINFO | CVAR_ARCHIVE)
|
||||||
CVAR(Int, wi_autoadvance, 0, CVAR_SERVERINFO)
|
CVAR(Int, wi_autoadvance, 0, CVAR_SERVERINFO)
|
||||||
|
|
||||||
|
// States for the intermission
|
||||||
|
enum EState
|
||||||
|
{
|
||||||
|
NoState = -1,
|
||||||
|
StatCount,
|
||||||
|
ShowNextLoc,
|
||||||
|
LeavingIntermission
|
||||||
|
};
|
||||||
|
|
||||||
static const char *WI_Cmd[] = {
|
static const char *WI_Cmd[] = {
|
||||||
"Background",
|
"Background",
|
||||||
|
@ -84,67 +92,8 @@ static const char *WI_Cmd[] = {
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct FInterBackground
|
||||||
struct FPatchInfo
|
|
||||||
{
|
{
|
||||||
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
|
// These animation variables, structures, etc. are used for the
|
||||||
// DOOM/Ultimate DOOM intermission screen animations. This is
|
// DOOM/Ultimate DOOM intermission screen animations. This is
|
||||||
// totally different from any sprite or texture/flat animations
|
// totally different from any sprite or texture/flat animations
|
||||||
|
@ -168,18 +117,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
|
struct yahpt_t
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
|
@ -189,16 +126,9 @@ public:
|
||||||
{
|
{
|
||||||
int x; // x/y coordinate pair structure
|
int x; // x/y coordinate pair structure
|
||||||
int y;
|
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
|
struct in_anim_t
|
||||||
{
|
{
|
||||||
int type; // Made an int so I can use '|'
|
int type; // Made an int so I can use '|'
|
||||||
|
@ -207,7 +137,7 @@ public:
|
||||||
int data; // ALWAYS: n/a, RANDOM: period deviation (<256)
|
int data; // ALWAYS: n/a, RANDOM: period deviation (<256)
|
||||||
TArray<FTexture*> frames; // actual graphics for frames of animations
|
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 nexttic; // next value of bcnt (used in conjunction with period)
|
||||||
int ctr; // next frame number to animate
|
int ctr; // next frame number to animate
|
||||||
int state; // used by RANDOM and LEVEL when animating
|
int state; // used by RANDOM and LEVEL when animating
|
||||||
|
@ -224,71 +154,21 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private:
|
||||||
TArray<lnode_t> lnodes;
|
TArray<lnode_t> lnodes;
|
||||||
TArray<in_anim_t> anims;
|
TArray<in_anim_t> anims;
|
||||||
|
int bcnt = 0; // used for timing of background animation
|
||||||
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;
|
|
||||||
|
|
||||||
TArray<FTexture *> yah; // You Are Here graphic
|
TArray<FTexture *> yah; // You Are Here graphic
|
||||||
FTexture* splat; // splat
|
FTexture* splat = nullptr; // splat
|
||||||
FTexture* sp_secret; // "secret"
|
FTexture *background = nullptr;
|
||||||
FTexture* kills; // "Kills", "Scrt", "Items", "Frags"
|
wbstartstruct_t *wbs;
|
||||||
FTexture* secret;
|
public:
|
||||||
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
|
|
||||||
//
|
|
||||||
|
|
||||||
|
FInterBackground(wbstartstruct_t *wbst)
|
||||||
|
{
|
||||||
|
wbs = wbst;
|
||||||
|
|
||||||
|
};
|
||||||
//====================================================================
|
//====================================================================
|
||||||
//
|
//
|
||||||
// Loads the background - either from a single texture
|
// Loads the background - either from a single texture
|
||||||
|
@ -298,22 +178,23 @@ public:
|
||||||
// MAPINFO.
|
// 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.
|
// 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!
|
// 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;
|
const char *lumpname = NULL;
|
||||||
char buffer[10];
|
char buffer[10];
|
||||||
in_anim_t an;
|
in_anim_t an;
|
||||||
lnode_t pt;
|
lnode_t pt;
|
||||||
FTextureID texture;
|
FTextureID texture;
|
||||||
|
bool noautostartmap = false;
|
||||||
|
|
||||||
bcnt=0;
|
bcnt = 0;
|
||||||
|
|
||||||
texture.SetInvalid();
|
texture.SetInvalid();
|
||||||
if (isenterpic)
|
if (isenterpic)
|
||||||
|
@ -327,10 +208,10 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to get a default if nothing specified
|
// Try to get a default if nothing specified
|
||||||
if (lumpname == NULL || lumpname[0]==0)
|
if (lumpname == NULL || lumpname[0] == 0)
|
||||||
{
|
{
|
||||||
lumpname = NULL;
|
lumpname = NULL;
|
||||||
switch(gameinfo.gametype)
|
switch (gameinfo.gametype)
|
||||||
{
|
{
|
||||||
case GAME_Chex:
|
case GAME_Chex:
|
||||||
case GAME_Doom:
|
case GAME_Doom:
|
||||||
|
@ -343,24 +224,24 @@ public:
|
||||||
lumpname = buffer;
|
lumpname = buffer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!lumpname)
|
if (!lumpname)
|
||||||
{
|
{
|
||||||
if (isenterpic)
|
if (isenterpic)
|
||||||
{
|
{
|
||||||
// One special case needs to be handled here!
|
// One special case needs to be handled here!
|
||||||
// If going from E1-E3 to E4 the default should be used, not the exit pic.
|
// If going from E1-E3 to E4 the default should be used, not the exit pic.
|
||||||
|
|
||||||
// Not if the exit pic is user defined!
|
// 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.
|
// E1-E3 need special treatment when playing Doom 1.
|
||||||
if (!(gameinfo.flags & GI_MAPxx))
|
if (!(gameinfo.flags & GI_MAPxx))
|
||||||
{
|
{
|
||||||
// not if the last level is not from the first 3 episodes
|
// 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
|
// 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";
|
lumpname = "INTERPIC";
|
||||||
|
@ -376,22 +257,22 @@ public:
|
||||||
lumpname = buffer;
|
lumpname = buffer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!lumpname)
|
if (!lumpname)
|
||||||
{
|
{
|
||||||
if (isenterpic) return;
|
if (isenterpic) return false;
|
||||||
lumpname = "FLOOR16";
|
lumpname = "FLOOR16";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GAME_Hexen:
|
case GAME_Hexen:
|
||||||
if (isenterpic) return;
|
if (isenterpic) return false;
|
||||||
lumpname = "INTERPIC";
|
lumpname = "INTERPIC";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GAME_Strife:
|
case GAME_Strife:
|
||||||
default:
|
default:
|
||||||
// Strife doesn't have an intermission pic so choose something neutral.
|
// Strife doesn't have an intermission pic so choose something neutral.
|
||||||
if (isenterpic) return;
|
if (isenterpic) return false;
|
||||||
lumpname = gameinfo.BorderFlat;
|
lumpname = gameinfo.BorderFlat;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -400,7 +281,7 @@ public:
|
||||||
{
|
{
|
||||||
// shouldn't happen!
|
// shouldn't happen!
|
||||||
background = NULL;
|
background = NULL;
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
lnodes.Clear();
|
lnodes.Clear();
|
||||||
|
@ -409,21 +290,21 @@ public:
|
||||||
splat = NULL;
|
splat = NULL;
|
||||||
|
|
||||||
// a name with a starting '$' indicates an intermission script
|
// a name with a starting '$' indicates an intermission script
|
||||||
if (*lumpname!='$')
|
if (*lumpname != '$')
|
||||||
{
|
{
|
||||||
texture = TexMan.CheckForTexture(lumpname, FTexture::TEX_MiscPatch, FTextureManager::TEXMAN_TryAny);
|
texture = TexMan.CheckForTexture(lumpname, FTexture::TEX_MiscPatch, FTextureManager::TEXMAN_TryAny);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int lumpnum=Wads.CheckNumForFullName(lumpname+1, true);
|
int lumpnum = Wads.CheckNumForFullName(lumpname + 1, true);
|
||||||
if (lumpnum>=0)
|
if (lumpnum >= 0)
|
||||||
{
|
{
|
||||||
FScanner sc(lumpnum);
|
FScanner sc(lumpnum);
|
||||||
while (sc.GetString())
|
while (sc.GetString())
|
||||||
{
|
{
|
||||||
an.Reset();
|
an.Reset();
|
||||||
int caseval = sc.MustMatchString(WI_Cmd);
|
int caseval = sc.MustMatchString(WI_Cmd);
|
||||||
switch(caseval)
|
switch (caseval)
|
||||||
{
|
{
|
||||||
case 0: // Background
|
case 0: // Background
|
||||||
sc.MustGetString();
|
sc.MustGetString();
|
||||||
|
@ -449,8 +330,7 @@ public:
|
||||||
while (!sc.CheckString("}"))
|
while (!sc.CheckString("}"))
|
||||||
{
|
{
|
||||||
sc.MustGetString();
|
sc.MustGetString();
|
||||||
strncpy(pt.level, sc.String,8);
|
pt.Level = sc.String;
|
||||||
pt.level[8] = 0;
|
|
||||||
sc.MustGetNumber();
|
sc.MustGetNumber();
|
||||||
pt.x = sc.Number;
|
pt.x = sc.Number;
|
||||||
sc.MustGetNumber();
|
sc.MustGetNumber();
|
||||||
|
@ -478,7 +358,7 @@ public:
|
||||||
case 8: // IfLeaving
|
case 8: // IfLeaving
|
||||||
an.type = ANIM_IFLEAVING;
|
an.type = ANIM_IFLEAVING;
|
||||||
goto readanimation;
|
goto readanimation;
|
||||||
|
|
||||||
case 9: // IfNotLeaving
|
case 9: // IfNotLeaving
|
||||||
an.type = ANIM_IFNOTLEAVING;
|
an.type = ANIM_IFNOTLEAVING;
|
||||||
goto readanimation;
|
goto readanimation;
|
||||||
|
@ -503,7 +383,7 @@ public:
|
||||||
sc.MustGetString();
|
sc.MustGetString();
|
||||||
an.LevelName = sc.String;
|
an.LevelName = sc.String;
|
||||||
sc.MustGetString();
|
sc.MustGetString();
|
||||||
caseval=sc.MustMatchString(WI_Cmd);
|
caseval = sc.MustMatchString(WI_Cmd);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
switch (caseval)
|
switch (caseval)
|
||||||
|
@ -563,13 +443,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);
|
texture = TexMan.GetTexture("INTERPIC", FTexture::TEX_MiscPatch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
background=TexMan[texture];
|
background = TexMan[texture];
|
||||||
|
return noautostartmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
//====================================================================
|
//====================================================================
|
||||||
|
@ -579,11 +460,12 @@ public:
|
||||||
//
|
//
|
||||||
//====================================================================
|
//====================================================================
|
||||||
|
|
||||||
void WI_updateAnimatedBack()
|
void updateAnimatedBack()
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
for(i=0;i<anims.Size();i++)
|
bcnt++;
|
||||||
|
for (i = 0; i<anims.Size(); i++)
|
||||||
{
|
{
|
||||||
in_anim_t * a = &anims[i];
|
in_anim_t * a = &anims[i];
|
||||||
switch (a->type & ANIM_TYPE)
|
switch (a->type & ANIM_TYPE)
|
||||||
|
@ -591,19 +473,19 @@ public:
|
||||||
case ANIM_ALWAYS:
|
case ANIM_ALWAYS:
|
||||||
if (bcnt >= a->nexttic)
|
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--;
|
else a->ctr--;
|
||||||
}
|
}
|
||||||
a->nexttic = bcnt + a->period;
|
a->nexttic = bcnt + a->period;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ANIM_PIC:
|
case ANIM_PIC:
|
||||||
a->ctr = 0;
|
a->ctr = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -614,11 +496,11 @@ public:
|
||||||
//
|
//
|
||||||
//====================================================================
|
//====================================================================
|
||||||
|
|
||||||
void WI_drawBackground()
|
void drawBackground(int state, bool drawsplat, bool snl_pointeron)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
double animwidth=320; // For a flat fill or clear background scale animations to 320x200
|
double animwidth = 320; // For a flat fill or clear background scale animations to 320x200
|
||||||
double animheight=200;
|
double animheight = 200;
|
||||||
|
|
||||||
if (background)
|
if (background)
|
||||||
{
|
{
|
||||||
|
@ -630,20 +512,20 @@ public:
|
||||||
// placing the animations precisely where they belong on the base pic
|
// placing the animations precisely where they belong on the base pic
|
||||||
animwidth = background->GetScaledWidthDouble();
|
animwidth = background->GetScaledWidthDouble();
|
||||||
animheight = background->GetScaledHeightDouble();
|
animheight = background->GetScaledHeightDouble();
|
||||||
screen->FillBorder (NULL);
|
screen->FillBorder(NULL);
|
||||||
screen->DrawTexture(background, 0, 0, DTA_Fullscreen, true, TAG_DONE);
|
screen->DrawTexture(background, 0, 0, DTA_Fullscreen, true, TAG_DONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
screen->FlatFill(0, 0, SCREENWIDTH, SCREENHEIGHT, background);
|
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];
|
in_anim_t * a = &anims[i];
|
||||||
level_info_t * li;
|
level_info_t * li;
|
||||||
|
@ -686,28 +568,216 @@ public:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (a->ctr >= 0)
|
if (a->ctr >= 0)
|
||||||
screen->DrawTexture(a->frames[a->ctr], a->loc.x, a->loc.y,
|
screen->DrawTexture(a->frames[a->ctr], a->loc.x, a->loc.y,
|
||||||
DTA_VirtualWidthF, animwidth, DTA_VirtualHeightF, animheight, TAG_DONE);
|
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;
|
if (gifont.color == NAME_Null)
|
||||||
font->GetChar(charcode, &width);
|
{
|
||||||
screen->DrawChar(font, translation, x, y, charcode,
|
mPatch = TexMan[gifont.fontname]; // "entering"
|
||||||
nomove ? DTA_CleanNoMove : DTA_Clean, true,
|
mColor = mPatch == NULL ? CR_UNTRANSLATED : CR_UNDEFINED;
|
||||||
DTA_ShadowAlpha, (gameinfo.gametype & GAME_DoomChex) ? 0 : 0.5,
|
mFont = NULL;
|
||||||
TAG_DONE);
|
}
|
||||||
return x - width;
|
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
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//====================================================================
|
//====================================================================
|
||||||
//
|
//
|
||||||
|
@ -745,6 +815,20 @@ public:
|
||||||
return maxy;
|
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
|
// Draws a level name with the big font
|
||||||
|
@ -871,57 +955,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.
|
// Draws a number.
|
||||||
|
@ -1134,7 +1167,7 @@ public:
|
||||||
state = ShowNextLoc;
|
state = ShowNextLoc;
|
||||||
acceleratestage = 0;
|
acceleratestage = 0;
|
||||||
cnt = SHOWNEXTLOCDELAY * TICRATE;
|
cnt = SHOWNEXTLOCDELAY * TICRATE;
|
||||||
WI_LoadBackground(true);
|
bg->LoadBackground(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WI_updateShowNextLoc ()
|
void WI_updateShowNextLoc ()
|
||||||
|
@ -1147,26 +1180,7 @@ public:
|
||||||
|
|
||||||
void WI_drawShowNextLoc(void)
|
void WI_drawShowNextLoc(void)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
bg->drawBackground(state, true, snl_pointeron);
|
||||||
|
|
||||||
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());
|
|
||||||
}
|
|
||||||
|
|
||||||
// draws which level you are entering..
|
// draws which level you are entering..
|
||||||
WI_drawEL ();
|
WI_drawEL ();
|
||||||
|
@ -1345,7 +1359,7 @@ public:
|
||||||
player_t *sortedplayers[MAXPLAYERS];
|
player_t *sortedplayers[MAXPLAYERS];
|
||||||
|
|
||||||
// draw animated background
|
// draw animated background
|
||||||
WI_drawBackground();
|
bg->drawBackground(state, false, false);
|
||||||
|
|
||||||
y = WI_drawLF();
|
y = WI_drawLF();
|
||||||
|
|
||||||
|
@ -1649,7 +1663,7 @@ public:
|
||||||
FTexture *readyico = TexMan.FindTexture("READYICO");
|
FTexture *readyico = TexMan.FindTexture("READYICO");
|
||||||
|
|
||||||
// draw animated background
|
// draw animated background
|
||||||
WI_drawBackground();
|
bg->drawBackground(state, false, false);
|
||||||
|
|
||||||
y = WI_drawLF();
|
y = WI_drawLF();
|
||||||
|
|
||||||
|
@ -1899,8 +1913,8 @@ public:
|
||||||
lh = IntermissionFont->GetHeight() * 3 / 2;
|
lh = IntermissionFont->GetHeight() * 3 / 2;
|
||||||
|
|
||||||
// draw animated background
|
// draw animated background
|
||||||
WI_drawBackground();
|
bg->drawBackground(state, false, false);
|
||||||
|
|
||||||
WI_drawLF();
|
WI_drawLF();
|
||||||
|
|
||||||
if (gameinfo.gametype & GAME_DoomChex)
|
if (gameinfo.gametype & GAME_DoomChex)
|
||||||
|
@ -2090,12 +2104,15 @@ public:
|
||||||
if (li) lnametexts[1] = li->LookupLevelName();
|
if (li) lnametexts[1] = li->LookupLevelName();
|
||||||
else lnametexts[1] = "";
|
else lnametexts[1] = "";
|
||||||
|
|
||||||
WI_LoadBackground(false);
|
bg = new FInterBackground(wbs);
|
||||||
|
noautostartmap = bg->LoadBackground(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WI_unloadData ()
|
void WI_unloadData ()
|
||||||
{
|
{
|
||||||
// [RH] The texture data gets unloaded at pre-map time, so there's nothing to do here
|
// [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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2156,7 +2173,7 @@ static FIntermissionScreen WI_Screen;
|
||||||
|
|
||||||
void WI_Ticker()
|
void WI_Ticker()
|
||||||
{
|
{
|
||||||
WI_Screen.WI_updateAnimatedBack();
|
WI_Screen.bg->updateAnimatedBack();
|
||||||
WI_Screen.WI_Ticker();
|
WI_Screen.WI_Ticker();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1566,6 +1566,23 @@ TXT_COMM0 = "Incoming Message";
|
||||||
TXT_COMM1 = "Incoming Message from BlackBird";
|
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
|
// Menu Strings
|
||||||
|
|
||||||
// Main Menu
|
// Main Menu
|
||||||
|
|
|
@ -230,7 +230,6 @@ class Actor : Thinker native
|
||||||
native deprecated double ScaleX;
|
native deprecated double ScaleX;
|
||||||
native deprecated double ScaleY;
|
native deprecated double ScaleY;
|
||||||
|
|
||||||
//int ConversationRoot; // THe root of the current dialogue;
|
|
||||||
//FStrifeDialogueNode *Conversation; // [RH] The dialogue to show when this actor is used.;
|
//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 Vector3 PosRelative(sector sec);
|
||||||
|
|
||||||
native void HandleSpawnFlags();
|
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 void RestoreDamage();
|
||||||
native int SpawnHealth();
|
native int SpawnHealth();
|
||||||
native void SetDamage(int dmg);
|
native void SetDamage(int dmg);
|
||||||
|
|
|
@ -10,6 +10,7 @@ class Clip : Ammo
|
||||||
Ammo.BackpackAmount 10;
|
Ammo.BackpackAmount 10;
|
||||||
Ammo.BackpackMaxAmount 400;
|
Ammo.BackpackMaxAmount 400;
|
||||||
Inventory.Icon "CLIPA0";
|
Inventory.Icon "CLIPA0";
|
||||||
|
Tag "$AMMO_CLIP";
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -48,6 +49,7 @@ class RocketAmmo : Ammo
|
||||||
Ammo.BackpackAmount 1;
|
Ammo.BackpackAmount 1;
|
||||||
Ammo.BackpackMaxAmount 100;
|
Ammo.BackpackMaxAmount 100;
|
||||||
Inventory.Icon "ROCKA0";
|
Inventory.Icon "ROCKA0";
|
||||||
|
Tag "$AMMO_ROCKETS";
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -86,6 +88,7 @@ class Cell : Ammo
|
||||||
Ammo.BackpackAmount 20;
|
Ammo.BackpackAmount 20;
|
||||||
Ammo.BackpackMaxAmount 600;
|
Ammo.BackpackMaxAmount 600;
|
||||||
Inventory.Icon "CELLA0";
|
Inventory.Icon "CELLA0";
|
||||||
|
Tag "$AMMO_CELLS";
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -124,6 +127,7 @@ class Shell : Ammo
|
||||||
Ammo.BackpackAmount 4;
|
Ammo.BackpackAmount 4;
|
||||||
Ammo.BackpackMaxAmount 100;
|
Ammo.BackpackMaxAmount 100;
|
||||||
Inventory.Icon "SHELA0";
|
Inventory.Icon "SHELA0";
|
||||||
|
Tag "$AMMO_SHELLS";
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,6 +11,7 @@ Class GoldWandAmmo : Ammo
|
||||||
Ammo.BackpackAmount 10;
|
Ammo.BackpackAmount 10;
|
||||||
Ammo.BackpackMaxAmount 200;
|
Ammo.BackpackMaxAmount 200;
|
||||||
Inventory.Icon "INAMGLD";
|
Inventory.Icon "INAMGLD";
|
||||||
|
Tag "$AMMO_GOLDWAND";
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -48,6 +49,7 @@ Class CrossbowAmmo : Ammo
|
||||||
Ammo.BackpackAmount 5;
|
Ammo.BackpackAmount 5;
|
||||||
Ammo.BackpackMaxAmount 100;
|
Ammo.BackpackMaxAmount 100;
|
||||||
Inventory.Icon "INAMBOW";
|
Inventory.Icon "INAMBOW";
|
||||||
|
Tag "$AMMO_CROSSBOW";
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -85,6 +87,7 @@ Class MaceAmmo : Ammo
|
||||||
Ammo.BackpackAmount 20;
|
Ammo.BackpackAmount 20;
|
||||||
Ammo.BackpackMaxAmount 300;
|
Ammo.BackpackMaxAmount 300;
|
||||||
Inventory.Icon "INAMLOB";
|
Inventory.Icon "INAMLOB";
|
||||||
|
Tag "$AMMO_MACE";
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -123,6 +126,7 @@ Class BlasterAmmo : Ammo
|
||||||
Ammo.BackpackAmount 10;
|
Ammo.BackpackAmount 10;
|
||||||
Ammo.BackpackMaxAmount 400;
|
Ammo.BackpackMaxAmount 400;
|
||||||
Inventory.Icon "INAMBST";
|
Inventory.Icon "INAMBST";
|
||||||
|
Tag "$AMMO_BLASTER";
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -161,6 +165,7 @@ Class SkullRodAmmo : Ammo
|
||||||
Ammo.BackpackAmount 20;
|
Ammo.BackpackAmount 20;
|
||||||
Ammo.BackpackMaxAmount 400;
|
Ammo.BackpackMaxAmount 400;
|
||||||
Inventory.Icon "INAMRAM";
|
Inventory.Icon "INAMRAM";
|
||||||
|
Tag "$AMMO_SKULLROD";
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -199,6 +204,7 @@ Class PhoenixRodAmmo : Ammo
|
||||||
Ammo.BackpackAmount 1;
|
Ammo.BackpackAmount 1;
|
||||||
Ammo.BackpackMaxAmount 40;
|
Ammo.BackpackMaxAmount 40;
|
||||||
Inventory.Icon "INAMPNX";
|
Inventory.Icon "INAMPNX";
|
||||||
|
Tag "$AMMO_PHOENIXROD";
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,6 +13,7 @@ class Mana1 : Ammo
|
||||||
+FLOATBOB
|
+FLOATBOB
|
||||||
Inventory.Icon "MAN1I0";
|
Inventory.Icon "MAN1I0";
|
||||||
Inventory.PickupMessage "$TXT_MANA_1";
|
Inventory.PickupMessage "$TXT_MANA_1";
|
||||||
|
Tag "$AMMO_MANA1";
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
@ -37,6 +38,7 @@ class Mana2 : Ammo
|
||||||
+FLOATBOB
|
+FLOATBOB
|
||||||
Inventory.Icon "MAN2G0";
|
Inventory.Icon "MAN2G0";
|
||||||
Inventory.PickupMessage "$TXT_MANA_2";
|
Inventory.PickupMessage "$TXT_MANA_2";
|
||||||
|
Tag "$AMMO_MANA2";
|
||||||
}
|
}
|
||||||
States
|
States
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue