mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-15 16:51:31 +00:00
- Added copyright/license headers to a few files.
- Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the proper object type. - Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo. - Removed dobject.err from the repository. It only contained a list of compiler errors for some very old version of dobject.cpp. - Fixed: A_JumpIfCloser was missing a z-check. - Added Blzut3's SBARINFO update #13: - Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp - Rewrote the mug shot system for SBarInfo to allow for scripting and custom states for different means of death. - SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing status bar definitions will now be cleared before the bar is read. - Fixed: When using transparency with bars the new drawing method (bg over fg) didn't work. In the case that the border value is set to 0 it will revert to the old method (fg over bg). - Fixed: drawbar lost any high res information it was given. - Added: ACS command SetMugShotState(str state) which sets the mug shot state for the activating player. - Added: keepoffsets flag to drawbar. When set the offsets in the fg image will also be applied when displaying the bar. SVN r812 (trunk)
This commit is contained in:
parent
02071140a5
commit
5b9073add4
19 changed files with 2969 additions and 2537 deletions
|
@ -1,3 +1,26 @@
|
|||
March 19, 2008 (Changes by Graf Zahl)
|
||||
- Added copyright/license headers to a few files.
|
||||
- Fixed: ACS SetMugShotState needs to check the StatusBar pointer for the
|
||||
proper object type.
|
||||
- Move SBarInfo loading code in d_main.cpp into a static method of DSBarInfo.
|
||||
- Removed dobject.err from the repository. It only contained a list of compiler
|
||||
errors for some very old version of dobject.cpp.
|
||||
- Fixed: A_JumpIfCloser was missing a z-check.
|
||||
- Added Blzut3's SBARINFO update #13:
|
||||
- Split sbarinfo.cpp into two files sbarinfo_display.cpp and sbarinfo_parser.cpp
|
||||
- Rewrote the mug shot system for SBarInfo to allow for scripting and custom
|
||||
states for different means of death.
|
||||
- SBarInfo now loads all SBarInfo lumps instead of just the last one. Clashing
|
||||
status bar definitions will now be cleared before the bar is read.
|
||||
- Fixed: When using transparency with bars the new drawing method (bg over fg)
|
||||
didn't work. In the case that the border value is set to 0 it will revert to
|
||||
the old method (fg over bg).
|
||||
- Fixed: drawbar lost any high res information it was given.
|
||||
- Added: ACS command SetMugShotState(str state) which sets the mug shot state
|
||||
for the activating player.
|
||||
- Added: keepoffsets flag to drawbar. When set the offsets in the fg image will
|
||||
also be applied when displaying the bar.
|
||||
|
||||
March 18, 2008
|
||||
- Fixed the TArray serializer declaration.
|
||||
(Thank you for your warnings, GCC! ;-)
|
||||
|
|
|
@ -2439,14 +2439,9 @@ void D_DoomMain (void)
|
|||
StartScreen->LoadingStatus ("Init game engine", 0x3f);
|
||||
P_Init ();
|
||||
|
||||
|
||||
//SBarInfo support.
|
||||
if(Wads.CheckNumForName("SBARINFO") != -1)
|
||||
{
|
||||
Printf ("ParseSBarInfo: Loading custom status bar definition.\n");
|
||||
SBarInfoScript = new SBarInfo(Wads.GetNumForName("SBARINFO")); //load last SBARINFO lump to avoid clashes
|
||||
atterm(FreeSBarInfoScript);
|
||||
}
|
||||
//end most of the SBarInfo stuff
|
||||
SBarInfo::Load();
|
||||
|
||||
Printf ("D_CheckNetGame: Checking network game status.\n");
|
||||
StartScreen->LoadingStatus ("Checking network game status.", 0x3f);
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
dobject.h(87): Error! E121: col(27) syntax error
|
||||
dobject.h(87): Note! N393: col(27) included from dthinker.h(38)
|
||||
dobject.h(87): Note! N393: col(27) included from actor.h(31)
|
||||
dobject.h(87): Note! N393: col(27) included from dobject.cpp(39)
|
||||
dobject.h(120): Error! E412: col(36) only member functions can be declared 'const' or 'volatile'
|
||||
dobject.h(125): Error! E412: col(9) only member functions can be declared 'const' or 'volatile'
|
||||
dobject.h(128): Error! E204: col(29) 'this' pointer is not defined
|
||||
dobject.h(130): Error! E386: col(30) attempt to use pointer to undefined class
|
||||
dobject.h(130): Note! N638: col(30) 'TypeInfo' defined in: dobject.h(83) (col 8)
|
||||
dobject.h(135): Error! E412: col(9) only member functions can be declared 'const' or 'volatile'
|
||||
dobject.h(136): Error! E386: col(24) attempt to use pointer to undefined class
|
||||
dobject.h(136): Note! N638: col(24) 'TypeInfo' defined in: dobject.h(83) (col 8)
|
||||
dobject.h(136): Error! E204: col(42) 'this' pointer is not defined
|
||||
dobject.h(148): Error! E121: col(1) syntax error
|
||||
dobject.h(299): Error! E275: col(9) the second argument of 'operator delete' must be of type 'size_t'
|
||||
dobject.h(299): Error! E488: col(9) 'operator delete' cannot be overloaded
|
||||
dobject.h(236): Error! E386: col(24) attempt to use pointer to undefined class
|
||||
dobject.h(236): Note! N638: col(24) 'TypeInfo' defined in: dobject.h(83) (col 8)
|
||||
infomacros.h(166): Error! E080: col(2) Actor default lists are only implemented for Visual C++ and GCC
|
||||
actor.h(310): Error! E029: col(37) symbol 'FindType' has not been declared
|
||||
actor.h(315): Error! E386: col(27) attempt to use pointer to undefined class
|
||||
actor.h(315): Note! N638: col(27) 'TypeInfo' defined in: dobject.h(83) (col 8)
|
||||
actor.h(320): Error! E409: col(1) template argument 'T' is not used in the function argument list
|
||||
actor.h(320): Note! N392: col(1) 'T' defined in: actor.h(318) (col 16)
|
||||
actor.h(344): Error! E386: col(52) attempt to use pointer to undefined class
|
||||
actor.h(344): Note! N638: col(52) 'TypeInfo' defined in: dobject.h(83) (col 8)
|
||||
actor.h(617): Error! E029: col(47) symbol 'FindType' has not been declared
|
||||
actor.h(622): Error! E409: col(1) template argument 'T' is not used in the function argument list
|
||||
actor.h(622): Note! N392: col(1) 'T' defined in: actor.h(620) (col 16)
|
||||
d_player.h(31): Error! E059: col(10) unable to open 'a_artifacts.h'
|
||||
p_pspr.h(87): Error! E133: col(43) too many errors: compilation aborted
|
|
@ -1,3 +1,37 @@
|
|||
/*
|
||||
** dobjtype.cpp
|
||||
** Implements the type information class
|
||||
**
|
||||
**---------------------------------------------------------------------------
|
||||
** Copyright 1998-2008 Randy Heit
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions
|
||||
** are met:
|
||||
**
|
||||
** 1. Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** 2. Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in the
|
||||
** documentation and/or other materials provided with the distribution.
|
||||
** 3. The name of the author may not be used to endorse or promote products
|
||||
** derived from this software without specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
**---------------------------------------------------------------------------
|
||||
**
|
||||
*/
|
||||
|
||||
#include "dobject.h"
|
||||
#include "i_system.h"
|
||||
#include "actor.h"
|
||||
|
|
|
@ -1,7 +1,50 @@
|
|||
/*
|
||||
** files.cpp
|
||||
** Implements classes for reading from files or memory blocks
|
||||
**
|
||||
**---------------------------------------------------------------------------
|
||||
** Copyright 1998-2008 Randy Heit
|
||||
** Copyright 2005-2008 Christoph Oelckers
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions
|
||||
** are met:
|
||||
**
|
||||
** 1. Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** 2. Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in the
|
||||
** documentation and/or other materials provided with the distribution.
|
||||
** 3. The name of the author may not be used to endorse or promote products
|
||||
** derived from this software without specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
**---------------------------------------------------------------------------
|
||||
**
|
||||
*/
|
||||
|
||||
#include "files.h"
|
||||
#include "i_system.h"
|
||||
#include "templates.h"
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// FileReader
|
||||
//
|
||||
// reads data from an uncompressed file or part of it
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
FileReader::FileReader ()
|
||||
: File(NULL), Length(0), CloseOnDestruct(false)
|
||||
{
|
||||
|
@ -99,7 +142,14 @@ long FileReader::CalcFileLen() const
|
|||
return endpos;
|
||||
}
|
||||
|
||||
// Now for the zlib wrapper -------------------------------------------------
|
||||
//==========================================================================
|
||||
//
|
||||
// FileReaderZ
|
||||
//
|
||||
// The zlib wrapper
|
||||
// reads data from a ZLib compressed stream
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
FileReaderZ::FileReaderZ (FileReader &file, bool zip)
|
||||
: File(file), SawEOF(false)
|
||||
|
@ -166,6 +216,14 @@ void FileReaderZ::FillBuffer ()
|
|||
Stream.avail_in = numread;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// MemoryReader
|
||||
//
|
||||
// reads data from a block of memory
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
MemoryReader::MemoryReader (const char *buffer, long length)
|
||||
{
|
||||
bufptr=buffer;
|
||||
|
|
|
@ -74,7 +74,6 @@
|
|||
#include "vectors.h"
|
||||
#include "sbarinfo.h"
|
||||
#include "r_translate.h"
|
||||
#include "sbarinfo.h"
|
||||
|
||||
#include "gi.h"
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -8,6 +8,7 @@ class FBarTexture;
|
|||
class FScanner;
|
||||
|
||||
struct SBarInfoCommand; //we need to be able to use this before it is defined.
|
||||
struct MugShotState;
|
||||
|
||||
struct SBarInfoBlock
|
||||
{
|
||||
|
@ -56,6 +57,7 @@ struct SBarInfo
|
|||
int GetGameType() { return gameType; }
|
||||
void ParseSBarInfo(int lump);
|
||||
void ParseSBarInfoBlock(FScanner &sc, SBarInfoBlock &block);
|
||||
void ParseMugShotBlock(FScanner &sc, MugShotState &state);
|
||||
void getCoordinates(FScanner &sc, SBarInfoCommand &cmd); //retrieves the next two arguments as x and y.
|
||||
int getSignedInteger(FScanner &sc); //returns a signed integer.
|
||||
int newImage(const char* patchname);
|
||||
|
@ -64,10 +66,255 @@ struct SBarInfo
|
|||
SBarInfo();
|
||||
SBarInfo(int lumpnum);
|
||||
~SBarInfo();
|
||||
static void Load();
|
||||
};
|
||||
|
||||
extern SBarInfo *SBarInfoScript;
|
||||
|
||||
void FreeSBarInfoScript();
|
||||
|
||||
//Mug Shot scripting structs. All functions are defined in sbarinfo_parser.cpp
|
||||
struct MugShotState;
|
||||
|
||||
struct MugShotFrame
|
||||
{
|
||||
TArray<FString> graphic;
|
||||
int delay;
|
||||
|
||||
MugShotFrame();
|
||||
~MugShotFrame();
|
||||
FTexture *getTexture(FPlayerSkin *skn, int random, int level=0, int direction=0, bool usesLevels=false, bool health2=false, bool healthspecial=false, bool directional=false);
|
||||
};
|
||||
|
||||
|
||||
struct MugShotState
|
||||
{
|
||||
bool usesLevels;
|
||||
bool health2; //health level is the 2nd character from the end.
|
||||
bool healthspecial; //like health2 only the 2nd frame gets the normal health type.
|
||||
bool directional; //faces direction of damage.
|
||||
|
||||
unsigned int position;
|
||||
int time;
|
||||
int random;
|
||||
bool finished;
|
||||
FName state;
|
||||
TArray<MugShotFrame> frames;
|
||||
|
||||
MugShotState();
|
||||
MugShotState(FString name);
|
||||
~MugShotState();
|
||||
void tick();
|
||||
void reset();
|
||||
MugShotFrame getCurrentFrame() { return frames[position]; }
|
||||
FTexture *getCurrentFrameTexture(FPlayerSkin *skn, int level=0, int direction=0) { return getCurrentFrame().getTexture(skn, random, level, direction, usesLevels, health2, healthspecial, directional); }
|
||||
};
|
||||
|
||||
extern TArray<MugShotState> MugShotStates;
|
||||
|
||||
const MugShotState *FindMugShotState(FString state);
|
||||
int FindMugShotStateIndex(FName state);
|
||||
|
||||
// Enums used between the parser and the display
|
||||
enum //statusbar flags
|
||||
{
|
||||
STATUSBARFLAG_FORCESCALED = 1,
|
||||
};
|
||||
|
||||
enum //gametype flags
|
||||
{
|
||||
GAMETYPE_SINGLEPLAYER = 1,
|
||||
GAMETYPE_COOPERATIVE = 2,
|
||||
GAMETYPE_DEATHMATCH = 4,
|
||||
GAMETYPE_TEAMGAME = 8,
|
||||
};
|
||||
|
||||
enum //drawimage flags
|
||||
{
|
||||
DRAWIMAGE_PLAYERICON = 1,
|
||||
DRAWIMAGE_AMMO1 = 2,
|
||||
DRAWIMAGE_AMMO2 = 4,
|
||||
DRAWIMAGE_INVENTORYICON = 8,
|
||||
DRAWIMAGE_TRANSLATABLE = 16,
|
||||
DRAWIMAGE_WEAPONSLOT = 32,
|
||||
DRAWIMAGE_SWITCHABLE_AND = 64,
|
||||
DRAWIMAGE_INVULNERABILITY = 128,
|
||||
DRAWIMAGE_OFFSET_CENTER = 256,
|
||||
DRAWIMAGE_ARMOR = 512,
|
||||
DRAWIMAGE_WEAPONICON = 1024,
|
||||
};
|
||||
|
||||
enum //drawnumber flags
|
||||
{
|
||||
DRAWNUMBER_HEALTH = 1,
|
||||
DRAWNUMBER_ARMOR = 2,
|
||||
DRAWNUMBER_AMMO1 = 4,
|
||||
DRAWNUMBER_AMMO2 = 8,
|
||||
DRAWNUMBER_AMMO = 16,
|
||||
DRAWNUMBER_AMMOCAPACITY = 32,
|
||||
DRAWNUMBER_FRAGS = 64,
|
||||
DRAWNUMBER_INVENTORY = 128,
|
||||
DRAWNUMBER_KILLS = 256,
|
||||
DRAWNUMBER_MONSTERS = 512,
|
||||
DRAWNUMBER_ITEMS = 1024,
|
||||
DRAWNUMBER_TOTALITEMS = 2048,
|
||||
DRAWNUMBER_SECRETS = 4096,
|
||||
DRAWNUMBER_TOTALSECRETS = 8192,
|
||||
DRAWNUMBER_ARMORCLASS = 16384,
|
||||
};
|
||||
|
||||
enum //drawbar flags (will go into special2)
|
||||
{
|
||||
DRAWBAR_HORIZONTAL = 1,
|
||||
DRAWBAR_REVERSE = 2,
|
||||
DRAWBAR_COMPAREDEFAULTS = 4,
|
||||
DRAWBAR_KEEPOFFSETS = 8,
|
||||
};
|
||||
|
||||
enum //drawselectedinventory flags
|
||||
{
|
||||
DRAWSELECTEDINVENTORY_ALTERNATEONEMPTY = 1,
|
||||
DRAWSELECTEDINVENTORY_ARTIFLASH = 2,
|
||||
DRAWSELECTEDINVENTORY_ALWAYSSHOWCOUNTER = 4,
|
||||
};
|
||||
|
||||
enum //drawinventorybar flags
|
||||
{
|
||||
DRAWINVENTORYBAR_ALWAYSSHOW = 1,
|
||||
DRAWINVENTORYBAR_NOARTIBOX = 2,
|
||||
DRAWINVENTORYBAR_NOARROWS = 4,
|
||||
DRAWINVENTORYBAR_ALWAYSSHOWCOUNTER = 8,
|
||||
};
|
||||
|
||||
enum //drawgem flags
|
||||
{
|
||||
DRAWGEM_WIGGLE = 1,
|
||||
DRAWGEM_TRANSLATABLE = 2,
|
||||
DRAWGEM_ARMOR = 4,
|
||||
DRAWGEM_REVERSE = 8,
|
||||
};
|
||||
|
||||
enum //drawshader flags
|
||||
{
|
||||
DRAWSHADER_VERTICAL = 1,
|
||||
DRAWSHADER_REVERSE = 2,
|
||||
};
|
||||
|
||||
enum //drawmugshot flags
|
||||
{
|
||||
DRAWMUGSHOT_XDEATHFACE = 1,
|
||||
DRAWMUGSHOT_ANIMATEDGODMODE = 2,
|
||||
};
|
||||
|
||||
enum //drawkeybar flags
|
||||
{
|
||||
DRAWKEYBAR_VERTICAL = 1,
|
||||
};
|
||||
|
||||
enum //event flags
|
||||
{
|
||||
SBARINFOEVENT_NOT = 1,
|
||||
SBARINFOEVENT_OR = 2,
|
||||
SBARINFOEVENT_AND = 4,
|
||||
};
|
||||
|
||||
enum //Key words
|
||||
{
|
||||
SBARINFO_BASE,
|
||||
SBARINFO_HEIGHT,
|
||||
SBARINFO_INTERPOLATEHEALTH,
|
||||
SBARINFO_INTERPOLATEARMOR,
|
||||
SBARINFO_COMPLETEBORDER,
|
||||
SBARINFO_STATUSBAR,
|
||||
SBARINFO_MUGSHOT,
|
||||
};
|
||||
|
||||
enum //Bar types
|
||||
{
|
||||
STBAR_NONE,
|
||||
STBAR_FULLSCREEN,
|
||||
STBAR_NORMAL,
|
||||
STBAR_AUTOMAP,
|
||||
STBAR_INVENTORY,
|
||||
STBAR_INVENTORYFULLSCREEN,
|
||||
};
|
||||
|
||||
enum //Bar key words
|
||||
{
|
||||
SBARINFO_DRAWIMAGE,
|
||||
SBARINFO_DRAWNUMBER,
|
||||
SBARINFO_DRAWSWITCHABLEIMAGE,
|
||||
SBARINFO_DRAWMUGSHOT,
|
||||
SBARINFO_DRAWSELECTEDINVENTORY,
|
||||
SBARINFO_DRAWINVENTORYBAR,
|
||||
SBARINFO_DRAWBAR,
|
||||
SBARINFO_DRAWGEM,
|
||||
SBARINFO_DRAWSHADER,
|
||||
SBARINFO_DRAWSTRING,
|
||||
SBARINFO_DRAWKEYBAR,
|
||||
SBARINFO_GAMEMODE,
|
||||
SBARINFO_PLAYERCLASS,
|
||||
SBARINFO_WEAPONAMMO,
|
||||
};
|
||||
|
||||
//All this so I can change the mugshot state in ACS...
|
||||
class FBarShader : public FTexture
|
||||
{
|
||||
public:
|
||||
FBarShader(bool vertical, bool reverse);
|
||||
const BYTE *GetColumn(unsigned int column, const Span **spans_out);
|
||||
const BYTE *GetPixels();
|
||||
void Unload();
|
||||
private:
|
||||
BYTE Pixels[512];
|
||||
Span DummySpan[2];
|
||||
};
|
||||
|
||||
class DSBarInfo : public DBaseStatusBar
|
||||
{
|
||||
DECLARE_CLASS(DSBarInfo, DBaseStatusBar)
|
||||
public:
|
||||
DSBarInfo();
|
||||
~DSBarInfo();
|
||||
void Draw(EHudState state);
|
||||
void NewGame();
|
||||
void AttachToPlayer(player_t *player);
|
||||
void Tick();
|
||||
void ReceivedWeapon (AWeapon *weapon);
|
||||
void FlashItem(const PClass *itemtype);
|
||||
void SetMugShotState(const char* stateName, bool waitTillDone=false);
|
||||
private:
|
||||
void doCommands(SBarInfoBlock &block);
|
||||
void DrawGraphic(FTexture* texture, int x, int y, int flags);
|
||||
void DrawString(const char* str, int x, int y, EColorRange translation, int spacing=0);
|
||||
void DrawNumber(int num, int len, int x, int y, EColorRange translation, int spacing=0);
|
||||
void DrawFace(int accuracy, bool xdth, bool animatedgodmode, int x, int y);
|
||||
int updateState(bool xdth, bool animatedgodmode);
|
||||
void DrawInventoryBar(int type, int num, int x, int y, bool alwaysshow,
|
||||
int counterx, int countery, EColorRange translation, bool drawArtiboxes, bool noArrows, bool alwaysshowcounter);
|
||||
void DrawGem(FTexture* chain, FTexture* gem, int value, int x, int y, int padleft, int padright, int chainsize,
|
||||
bool wiggle, bool translate);
|
||||
FRemapTable* getTranslation();
|
||||
|
||||
FImageCollection Images;
|
||||
FPlayerSkin *oldSkin;
|
||||
FFont *drawingFont;
|
||||
FString lastPrefix;
|
||||
MugShotState *currentState;
|
||||
bool weaponGrin;
|
||||
bool damageFaceActive;
|
||||
int lastDamageAngle;
|
||||
int rampageTimer;
|
||||
int oldHealth;
|
||||
int oldArmor;
|
||||
int mugshotHealth;
|
||||
int chainWiggle;
|
||||
int artiflash;
|
||||
unsigned int invBarOffset;
|
||||
FBarShader shader_horz_normal;
|
||||
FBarShader shader_horz_reverse;
|
||||
FBarShader shader_vert_normal;
|
||||
FBarShader shader_vert_reverse;
|
||||
};
|
||||
|
||||
#endif //__SBarInfo_SBAR_H__
|
||||
|
|
1335
src/g_shared/sbarinfo_display.cpp
Normal file
1335
src/g_shared/sbarinfo_display.cpp
Normal file
File diff suppressed because it is too large
Load diff
1076
src/g_shared/sbarinfo_parser.cpp
Normal file
1076
src/g_shared/sbarinfo_parser.cpp
Normal file
File diff suppressed because it is too large
Load diff
|
@ -67,6 +67,7 @@
|
|||
#include "c_bind.h"
|
||||
#include "info.h"
|
||||
#include "r_translate.h"
|
||||
#include "sbarinfo.h"
|
||||
|
||||
extern FILE *Logfile;
|
||||
|
||||
|
@ -5301,6 +5302,7 @@ int DLevelScript::RunScript ()
|
|||
}
|
||||
|
||||
case PCD_GETACTORLIGHTLEVEL:
|
||||
{
|
||||
AActor *actor = SingleActorFromTID(STACK(1), activator);
|
||||
if (actor != NULL)
|
||||
{
|
||||
|
@ -5309,6 +5311,15 @@ int DLevelScript::RunScript ()
|
|||
else STACK(1)=0;
|
||||
break;
|
||||
}
|
||||
|
||||
case PCD_SETMUGSHOTSTATE:
|
||||
if(StatusBar != NULL && StatusBar->IsKindOf(RUNTIME_CLASS(DSBarInfo)))
|
||||
{
|
||||
static_cast<DSBarInfo*>(StatusBar)->SetMugShotState(FBehavior::StaticLookupString(STACK(1)));
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (state == SCRIPT_DivideBy0)
|
||||
|
|
|
@ -547,6 +547,7 @@ public:
|
|||
PCD_CHECKACTORCEILINGTEXTURE,
|
||||
PCD_CHECKACTORFLOORTEXTURE,
|
||||
/*340*/ PCD_GETACTORLIGHTLEVEL,
|
||||
PCD_SETMUGSHOTSTATE,
|
||||
|
||||
PCODE_COMMAND_COUNT
|
||||
};
|
||||
|
|
|
@ -1,3 +1,37 @@
|
|||
/*
|
||||
** p_converstation.cpp
|
||||
** Implements Strife style conversation dialogs
|
||||
**
|
||||
**---------------------------------------------------------------------------
|
||||
** Copyright 2004-2008 Randy Heit
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions
|
||||
** are met:
|
||||
**
|
||||
** 1. Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** 2. Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in the
|
||||
** documentation and/or other materials provided with the distribution.
|
||||
** 3. The name of the author may not be used to endorse or promote products
|
||||
** derived from this software without specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
** IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
** OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
** IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
** NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
**---------------------------------------------------------------------------
|
||||
**
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "actor.h"
|
||||
|
|
|
@ -272,6 +272,7 @@ struct sector_t;
|
|||
|
||||
struct extsector_t
|
||||
{
|
||||
// 3DMIDTEX information
|
||||
struct midtex
|
||||
{
|
||||
struct plane
|
||||
|
@ -281,6 +282,14 @@ struct extsector_t
|
|||
} Floor, Ceiling;
|
||||
} Midtex;
|
||||
|
||||
// linked sectors
|
||||
/*
|
||||
struct linked
|
||||
{
|
||||
TArray<FLinkedSector> Sectors;
|
||||
} Linked;
|
||||
*/
|
||||
|
||||
void Serialize(FArchive &arc);
|
||||
};
|
||||
|
||||
|
|
|
@ -550,7 +550,11 @@ void A_JumpIfCloser(AActor * self)
|
|||
if (target==NULL) return;
|
||||
|
||||
fixed_t dist = fixed_t(EvalExpressionF (StateParameters[index], self) * FRACUNIT);
|
||||
if (index > 0 && P_AproxDistance(self->x-target->x, self->y-target->y) < dist)
|
||||
if (index > 0 && P_AproxDistance(self->x-target->x, self->y-target->y) < dist &&
|
||||
( (self->z > target->z && self->z - (target->z + target->height) < dist) ||
|
||||
(self->z <=target->z && target->z - (self->z + self->height) < dist)
|
||||
)
|
||||
)
|
||||
DoJump(self, CallingState, StateParameters[index+1]);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Version="8,00"
|
||||
Name="updaterevision"
|
||||
ProjectGUID="{6077B7D6-349F-4077-B552-3BC302EF5859}"
|
||||
RootNamespace="updaterevision"
|
||||
|
@ -95,82 +95,6 @@
|
|||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
|
@ -248,6 +172,82 @@
|
|||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
|
||||
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
|
||||
|
|
49
wadsrc/sbarinfo.txt
Normal file
49
wadsrc/sbarinfo.txt
Normal file
|
@ -0,0 +1,49 @@
|
|||
mugshot "Normal", health2
|
||||
{
|
||||
{ST00, ST01, ST02} 17;
|
||||
}
|
||||
|
||||
mugshot "Pain", healthspecial, directional
|
||||
{
|
||||
{TR00, KILL0, TL00} 35;
|
||||
}
|
||||
|
||||
mugshot "Rampage", health
|
||||
{
|
||||
KILL0 1;
|
||||
}
|
||||
|
||||
mugshot "Ouch", health
|
||||
{
|
||||
OUCH0 35;
|
||||
}
|
||||
|
||||
mugshot "Grin", health
|
||||
{
|
||||
EVL0 70;
|
||||
}
|
||||
|
||||
mugshot "God"
|
||||
{
|
||||
GOD0 -1;
|
||||
}
|
||||
|
||||
mugshot "GodAnimated"
|
||||
{
|
||||
{GOD0, GOD1, GOD2} 17;
|
||||
}
|
||||
|
||||
mugshot "Death"
|
||||
{
|
||||
DEAD0 -1;
|
||||
}
|
||||
|
||||
mugshot "XDeath"
|
||||
{
|
||||
XDTH0 10;
|
||||
XDTH1 10;
|
||||
XDTH2 10;
|
||||
XDTH3 10;
|
||||
XDTH4 10;
|
||||
XDTH5 -1;
|
||||
}
|
|
@ -61,6 +61,7 @@ in_htc3.txt in_htc3.txt
|
|||
lockdefs.txt lockdefs.txt
|
||||
teaminfo.txt teaminfo.txt
|
||||
althudcf.txt althudcf.txt
|
||||
sbarinfo.txt sbarinfo.txt
|
||||
|
||||
========
|
||||
# Support lumps
|
||||
|
|
|
@ -3904,11 +3904,15 @@
|
|||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\g_shared\sbarinfo.cpp"
|
||||
RelativePath=".\src\g_shared\sbarinfo.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\g_shared\sbarinfo.h"
|
||||
RelativePath=".\src\g_shared\sbarinfo_display.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\g_shared\sbarinfo_parser.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
|
Loading…
Reference in a new issue