Skip to content

Commit

Permalink
Merge branch 'master' into uniformbuffers
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed Aug 19, 2018
2 parents b03add8 + fad406c commit e977011
Show file tree
Hide file tree
Showing 55 changed files with 313 additions and 356 deletions.
15 changes: 8 additions & 7 deletions src/actor.h
Expand Up @@ -403,6 +403,7 @@ enum ActorFlag8
MF8_INSCROLLSEC = 0x00000002, // actor is partially inside a scrolling sector
MF8_BLOCKASPLAYER = 0x00000004, // actor is blocked by player-blocking lines even if not a player
MF8_DONTFACETALKER = 0x00000008, // don't alter the angle to face the player in conversations
MF8_HITOWNER = 0x00000010, // projectile can hit the actor that fired it
};

// --- mobj.renderflags ---
Expand Down Expand Up @@ -1140,7 +1141,7 @@ class AActor : public DThinker
uint8_t WeaveIndexZ;
int skillrespawncount;
int TIDtoHate; // TID of things to hate (0 if none)
FNameNoInit Species; // For monster families
FName Species; // For monster families
TObjPtr<AActor*> alternative; // (Un)Morphed actors stored here. Those with the MF_UNMORPHED flag are the originals.
TObjPtr<AActor*> tracer; // Thing being chased/attacked for tracers
TObjPtr<AActor*> master; // Thing which spawned this one (prevents mutual attacks)
Expand Down Expand Up @@ -1183,12 +1184,12 @@ class AActor : public DThinker
line_t *BlockingLine; // Line that blocked the last move

int PoisonDamage; // Damage received per tic from poison.
FNameNoInit PoisonDamageType; // Damage type dealt by poison.
FName PoisonDamageType; // Damage type dealt by poison.
int PoisonDuration; // Duration left for receiving poison damage.
int PoisonPeriod; // How often poison damage is applied. (Every X tics.)

int PoisonDamageReceived; // Damage received per tic from poison.
FNameNoInit PoisonDamageTypeReceived; // Damage type received by poison.
FName PoisonDamageTypeReceived; // Damage type received by poison.
int PoisonDurationReceived; // Duration left for receiving poison damage.
int PoisonPeriodReceived; // How often poison damage is applied. (Every X tics.)
TObjPtr<AActor*> Poisoner; // Last source of received poison damage.
Expand Down Expand Up @@ -1228,13 +1229,13 @@ class AActor : public DThinker
int32_t Mass;
int16_t PainChance;
int PainThreshold;
FNameNoInit DamageType;
FNameNoInit DamageTypeReceived;
FName DamageType;
FName DamageTypeReceived;
double DamageFactor;
double DamageMultiply;

FNameNoInit PainType;
FNameNoInit DeathType;
FName PainType;
FName DeathType;
PClassActor *TeleFogSourceType;
PClassActor *TeleFogDestType;
int RipperLevel;
Expand Down
2 changes: 1 addition & 1 deletion src/c_console.cpp
Expand Up @@ -1807,7 +1807,7 @@ struct TabData
FName TabName;

TabData()
: UseCount(0)
: UseCount(0), TabName(NAME_None)
{
}

Expand Down
8 changes: 3 additions & 5 deletions src/d_netinfo.cpp
Expand Up @@ -756,7 +756,7 @@ void D_ReadUserInfoStrings (int pnum, uint8_t **stream, bool update)
const char *breakpt;
FString value;
bool compact;
FName keyname;
FName keyname = NAME_None;
unsigned int infotype = 0;

if (*ptr++ != '\\')
Expand Down Expand Up @@ -925,8 +925,6 @@ void WriteUserInfo(FSerializer &arc, userinfo_t &info)

void ReadUserInfo(FSerializer &arc, userinfo_t &info, FString &skin)
{
FName name;
FBaseCVar **cvar;
UCVarValue val;
const char *key;
const char *str;
Expand All @@ -938,8 +936,8 @@ void ReadUserInfo(FSerializer &arc, userinfo_t &info, FString &skin)
while ((key = arc.GetKey()))
{
arc.StringPtr(nullptr, str);
name = key;
cvar = info.CheckKey(name);
FName name = key;
FBaseCVar **cvar = info.CheckKey(name);
if (cvar != NULL && *cvar != NULL)
{
switch (name)
Expand Down
180 changes: 90 additions & 90 deletions src/d_player.h
Expand Up @@ -141,7 +141,7 @@ class APlayerPawn : public AActor
double SideMove1, SideMove2;
FTextureID ScoreIcon;
int SpawnMask;
FNameNoInit MorphWeapon;
FName MorphWeapon;
double AttackZOffset; // attack height, relative to player center
double UseRange; // [NS] Distance at which player can +use
double AirCapacity; // Multiplier for air supply underwater.
Expand All @@ -155,10 +155,10 @@ class APlayerPawn : public AActor
double ViewBob;

// Former class properties that were moved into the object to get rid of the meta class.
FNameNoInit SoundClass; // Sound class
FNameNoInit Face; // Doom status bar face (when used)
FNameNoInit Portrait;
FNameNoInit Slot[10];
FName SoundClass; // Sound class
FName Face; // Doom status bar face (when used)
FName Portrait;
FName Slot[10];
double HexenArmor[5];
uint8_t ColorRangeStart; // Skin color range
uint8_t ColorRangeEnd;
Expand Down Expand Up @@ -372,7 +372,7 @@ void WriteUserInfo(FSerializer &arc, userinfo_t &info);
class player_t
{
public:
player_t();
player_t() = default;
~player_t();
player_t &operator= (const player_t &p);

Expand All @@ -384,117 +384,117 @@ class player_t
void SetLogText (const char *text);
void SendPitchLimits() const;

APlayerPawn *mo;
uint8_t playerstate;
ticcmd_t cmd;
APlayerPawn *mo = nullptr;
uint8_t playerstate = 0;
ticcmd_t cmd = {};
usercmd_t original_cmd;
uint32_t original_oldbuttons;

userinfo_t userinfo; // [RH] who is this?

PClassActor *cls; // class of associated PlayerPawn
PClassActor *cls = nullptr; // class of associated PlayerPawn

float DesiredFOV; // desired field of vision
float FOV; // current field of vision
double viewz; // focal origin above r.z
double viewheight; // base height above floor for viewz
double deltaviewheight; // squat speed.
double bob; // bounded/scaled total velocity
float DesiredFOV = 0; // desired field of vision
float FOV = 0; // current field of vision
double viewz = 0; // focal origin above r.z
double viewheight = 0; // base height above floor for viewz
double deltaviewheight = 0; // squat speed.
double bob = 0; // bounded/scaled total velocity

// killough 10/98: used for realistic bobbing (i.e. not simply overall speed)
// mo->velx and mo->vely represent true velocity experienced by player.
// This only represents the thrust that the player applies himself.
// This avoids anomalies with such things as Boom ice and conveyors.
DVector2 Vel;
DVector2 Vel = { 0,0 };

bool centering;
uint8_t turnticks;
bool centering = false;
uint8_t turnticks = 0;


bool attackdown;
bool usedown;
uint32_t oldbuttons;
int health; // only used between levels, mo->health
bool attackdown = false;
bool usedown = false;
uint32_t oldbuttons = false;
int health = 0; // only used between levels, mo->health
// is used during levels

int inventorytics;
uint8_t CurrentPlayerClass; // class # for this player instance

int frags[MAXPLAYERS]; // kills of other players
int fragcount; // [RH] Cumulative frags for this player
int lastkilltime; // [RH] For multikills
uint8_t multicount;
uint8_t spreecount; // [RH] Keep track of killing sprees
uint16_t WeaponState;

AWeapon *ReadyWeapon;
AWeapon *PendingWeapon; // WP_NOCHANGE if not changing
TObjPtr<DPSprite*> psprites; // view sprites (gun, etc)

int cheats; // bit flags
int timefreezer; // Player has an active time freezer
short refire; // refired shots are less accurate
short inconsistant;
bool waiting;
int killcount, itemcount, secretcount; // for intermission
int damagecount, bonuscount;// for screen flashing
int hazardcount; // for delayed Strife damage
int hazardinterval; // Frequency of damage infliction
FName hazardtype; // Damage type of last hazardous damage encounter.
int poisoncount; // screen flash for poison damage
FName poisontype; // type of poison damage to apply
FName poisonpaintype; // type of Pain state to enter for poison damage
TObjPtr<AActor*> poisoner; // NULL for non-player actors
TObjPtr<AActor*> attacker; // who did damage (NULL for floors)
int extralight; // so gun flashes light up areas
short fixedcolormap; // can be set to REDCOLORMAP, etc.
short fixedlightlevel;
int morphTics; // player is a chicken/pig if > 0
PClassActor *MorphedPlayerClass; // [MH] (for SBARINFO) class # for this player instance when morphed
int MorphStyle; // which effects to apply for this player instance when morphed
PClassActor *MorphExitFlash; // flash to apply when demorphing (cache of value given to P_MorphPlayer)
TObjPtr<AWeapon*> PremorphWeapon; // ready weapon before morphing
int chickenPeck; // chicken peck countdown
int jumpTics; // delay the next jump for a moment
bool onground; // Identifies if this player is on the ground or other object

int respawn_time; // [RH] delay respawning until this tic
TObjPtr<AActor*> camera; // [RH] Whose eyes this player sees through

int air_finished; // [RH] Time when you start drowning

FName LastDamageType; // [RH] For damage-specific pain and death sounds

TObjPtr<AActor*> MUSINFOactor; // For MUSINFO purposes
int8_t MUSINFOtics;

bool settings_controller; // Player can control game settings.
int8_t crouching;
int8_t crouchdir;
int inventorytics = 0;
uint8_t CurrentPlayerClass = 0; // class # for this player instance

int frags[MAXPLAYERS] = {}; // kills of other players
int fragcount = 0; // [RH] Cumulative frags for this player
int lastkilltime = 0; // [RH] For multikills
uint8_t multicount = 0;
uint8_t spreecount = 0; // [RH] Keep track of killing sprees
uint16_t WeaponState = 0;

AWeapon *ReadyWeapon = nullptr;
AWeapon *PendingWeapon = nullptr; // WP_NOCHANGE if not changing
TObjPtr<DPSprite*> psprites = nullptr; // view sprites (gun, etc)

int cheats = 0; // bit flags
int timefreezer = 0; // Player has an active time freezer
short refire = 0; // refired shots are less accurate
short inconsistant = 0;
bool waiting = 0;
int killcount = 0, itemcount = 0, secretcount = 0; // for intermission
int damagecount = 0, bonuscount = 0;// for screen flashing
int hazardcount = 0; // for delayed Strife damage
int hazardinterval = 0; // Frequency of damage infliction
FName hazardtype = NAME_None; // Damage type of last hazardous damage encounter.
int poisoncount = 0; // screen flash for poison damage
FName poisontype = NAME_None; // type of poison damage to apply
FName poisonpaintype = NAME_None; // type of Pain state to enter for poison damage
TObjPtr<AActor*> poisoner = nullptr; // NULL for non-player actors
TObjPtr<AActor*> attacker = nullptr; // who did damage (NULL for floors)
int extralight = 0; // so gun flashes light up areas
short fixedcolormap = 0; // can be set to REDCOLORMAP, etc.
short fixedlightlevel = 0;
int morphTics = 0; // player is a chicken/pig if > 0
PClassActor *MorphedPlayerClass = nullptr; // [MH] (for SBARINFO) class # for this player instance when morphed
int MorphStyle = 0; // which effects to apply for this player instance when morphed
PClassActor *MorphExitFlash = nullptr; // flash to apply when demorphing (cache of value given to P_MorphPlayer)
TObjPtr<AWeapon*> PremorphWeapon = nullptr; // ready weapon before morphing
int chickenPeck = 0; // chicken peck countdown
int jumpTics = 0; // delay the next jump for a moment
bool onground = 0; // Identifies if this player is on the ground or other object

int respawn_time = 0; // [RH] delay respawning until this tic
TObjPtr<AActor*> camera = nullptr; // [RH] Whose eyes this player sees through

int air_finished = 0; // [RH] Time when you start drowning

FName LastDamageType = NAME_None; // [RH] For damage-specific pain and death sounds

TObjPtr<AActor*> MUSINFOactor = nullptr; // For MUSINFO purposes
int8_t MUSINFOtics = 0;

bool settings_controller = false; // Player can control game settings.
int8_t crouching = 0;
int8_t crouchdir = 0;

//Added by MC:
TObjPtr<DBot*> Bot;
TObjPtr<DBot*> Bot = nullptr;

float BlendR; // [RH] Final blending values
float BlendG;
float BlendB;
float BlendA;
float BlendR = 0; // [RH] Final blending values
float BlendG = 0;
float BlendB = 0;
float BlendA = 0;

FString LogText; // [RH] Log for Strife

DAngle MinPitch; // Viewpitch limits (negative is up, positive is down)
DAngle MaxPitch;
DAngle MinPitch = 0.; // Viewpitch limits (negative is up, positive is down)
DAngle MaxPitch = 0.;

double crouchfactor;
double crouchoffset;
double crouchviewdelta;
double crouchfactor = 0;
double crouchoffset = 0;
double crouchviewdelta = 0;

FWeaponSlots weapons;

// [CW] I moved these here for multiplayer conversation support.
TObjPtr<AActor*> ConversationNPC, ConversationPC;
DAngle ConversationNPCAngle;
bool ConversationFaceTalker;
TObjPtr<AActor*> ConversationNPC = nullptr, ConversationPC = nullptr;
DAngle ConversationNPCAngle = 0.;
bool ConversationFaceTalker = false;

double GetDeltaViewHeight() const
{
Expand Down
4 changes: 2 additions & 2 deletions src/decallib.cpp
Expand Up @@ -1037,8 +1037,8 @@ FDecalLib::FTranslation *FDecalLib::GenerateTranslation (uint32_t start, uint32_
}

FDecalBase::FDecalBase ()
: Name(NAME_None)
{
Name = NAME_None;
}

FDecalBase::~FDecalBase ()
Expand Down Expand Up @@ -1152,8 +1152,8 @@ const FDecalTemplate *FDecalGroup::GetDecal () const
}

FDecalAnimator::FDecalAnimator (const char *name)
: Name(name)
{
Name = name;
}

FDecalAnimator::~FDecalAnimator ()
Expand Down
4 changes: 2 additions & 2 deletions src/dobjtype.h
Expand Up @@ -58,8 +58,8 @@ class PClass
uint8_t *Meta = nullptr; // Per-class static script data
unsigned Size = sizeof(DObject);
unsigned MetaSize = 0;
FName TypeName;
FName SourceLumpName;
FName TypeName = NAME_None;
FName SourceLumpName = NAME_None;
bool bRuntimeClass = false; // class was defined at run-time, not compile-time
bool bDecorateClass = false; // may be subject to some idiosyncracies due to DECORATE backwards compatibility
bool bAbstract = false;
Expand Down
2 changes: 1 addition & 1 deletion src/doomdata.h
Expand Up @@ -373,7 +373,7 @@ struct FMapThing
uint32_t RenderStyle;
int FloatbobPhase;
int friendlyseeblocks;
FNameNoInit arg0str;
FName arg0str;
};


Expand Down
2 changes: 1 addition & 1 deletion src/edata.cpp
Expand Up @@ -120,7 +120,7 @@ struct EDSector

int damageamount;
int damageinterval;
FNameNoInit damagetype;
FName damagetype;
uint8_t leaky;
uint8_t leakyadd;
uint8_t leakyremove;
Expand Down

0 comments on commit e977011

Please sign in to comment.