- cleanup

This commit is contained in:
Christoph Oelckers 2016-09-19 01:07:51 +02:00
parent a5628518c1
commit 718614a820
9 changed files with 1517 additions and 1272 deletions

View file

@ -1124,6 +1124,7 @@ set (PCH_SOURCES
po_man.cpp
portal.cpp
r_utility.cpp
serializer.cpp
sc_man.cpp
st_stuff.cpp
statistics.cpp
@ -1414,6 +1415,7 @@ source_group("Games\\Strife Game" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DI
source_group("Intermission" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/intermission/.+")
source_group("Math" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/math/.+")
source_group("Menu" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/menu/.+")
source_group("RapidJSON" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/rapidjson/.+")
source_group("Render Core\\Render Headers" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/r_.+\\.h$")
source_group("Render Core\\Render Sources" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/r_.+\\.cpp$")
source_group("Render Data\\Resource Headers" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/r_data/.+\\.h$")

View file

@ -416,6 +416,8 @@ public:
template<class U> friend inline FArchive &operator<<(FArchive &arc, TObjPtr<U> &o);
template<class U> friend inline void GC::Mark(TObjPtr<U> &obj);
template<class U> friend FSerializer &Serialize(FSerializer &arc, const char *key, TObjPtr<U> &value, TObjPtr<U> *);
friend class DObject;
};

View file

@ -375,6 +375,9 @@ void PClassActor::InitializeNativeDefaults()
else
{
memset (Defaults, 0, Size);
// Non-DECORATE properties that must be set.
((AActor*)Defaults)->DamageMultiply = 1.; // fixme: Make this a DECORATE property.
((AActor*)Defaults)->ConversationRoot = -1;
}
}

File diff suppressed because it is too large Load diff

View file

@ -4118,7 +4118,6 @@ AActor *AActor::StaticSpawn (PClassActor *type, const DVector3 &pos, replace_t a
actor->touching_sectorlist = NULL; // NULL head of sector list // phares 3/13/98
if (G_SkillProperty(SKILLP_FastMonsters) && actor->GetClass()->FastSpeed >= 0)
actor->Speed = actor->GetClass()->FastSpeed;
actor->DamageMultiply = 1.;
// set subsector and/or block links
actor->LinkToWorld (SpawningMapThing);

View file

@ -2174,7 +2174,7 @@ void AAmbientSound::Tick ()
loop = CHAN_LOOP;
}
if (ambient->sound != 0)
if (ambient->sound != FSoundID(0))
{
// The second argument scales the ambient sound's volume.
// 0 and 100 are normal volume. The maximum volume level

View file

@ -3021,7 +3021,7 @@ CCMD (cachesound)
for (int i = 1; i < argv.argc(); ++i)
{
FSoundID sfxnum = argv[i];
if (sfxnum != 0)
if (sfxnum != FSoundID(0))
{
S_CacheSound (&S_sfx[sfxnum]);
}

View file

@ -126,6 +126,14 @@ public:
ID = S_FindSound(name.GetChars());
return *this;
}
bool operator !=(FSoundID other) const
{
return ID != other.ID;
}
bool operator !=(int other) const
{
return ID != other;
}
operator int() const
{
return ID;

1255
src/serializer.cpp Normal file

File diff suppressed because it is too large Load diff