gamebase mmebervar cleanups. mPacked in particular is likely to geta followup for other cleaning.

This commit is contained in:
Azaezel 2018-03-28 23:41:47 -05:00
parent 317cd9151a
commit 7064b41506
18 changed files with 38 additions and 38 deletions

View file

@ -396,7 +396,7 @@ void DebrisData::packData(BitStream* stream)
if( stream->writeFlag( explosion ) )
{
stream->writeRangedU32(packed? SimObjectId((uintptr_t)explosion):
stream->writeRangedU32(mPacked ? SimObjectId((uintptr_t)explosion):
explosion->getId(),DataBlockObjectIdFirst,DataBlockObjectIdLast);
}

View file

@ -412,7 +412,7 @@ void ParticleEmitterData::packData(BitStream* stream)
#if defined(AFX_CAP_PARTICLE_POOLS)
if (stream->writeFlag(pool_datablock))
{
stream->writeRangedU32(packed ? SimObjectId((uintptr_t)pool_datablock) : pool_datablock->getId(), DataBlockObjectIdFirst, DataBlockObjectIdLast);
stream->writeRangedU32(mPacked ? SimObjectId((uintptr_t)pool_datablock) : pool_datablock->getId(), DataBlockObjectIdFirst, DataBlockObjectIdLast);
stream->write(pool_index);
stream->writeFlag(pool_depth_fade);
stream->writeFlag(pool_radial_fade);

View file

@ -127,13 +127,13 @@ IMPLEMENT_CALLBACK( GameBase, setControl, void, ( bool controlled ), ( controlle
GameBaseData::GameBaseData()
{
category = "";
packed = false;
mCategory = "";
mPacked = false;
}
GameBaseData::GameBaseData(const GameBaseData& other, bool temp_clone) : SimDataBlock(other, temp_clone)
{
packed = other.packed;
category = other.category;
mPacked = other.mPacked;
mCategory = other.mCategory;
//mReloadSignal = other.mReloadSignal; // DO NOT copy the mReloadSignal member.
}
@ -158,7 +158,7 @@ void GameBaseData::initPersistFields()
{
addGroup("Scripting");
addField( "category", TypeCaseString, Offset( category, GameBaseData ),
addField( "category", TypeCaseString, Offset(mCategory, GameBaseData ),
"The group that this datablock will show up in under the \"Scripted\" "
"tab in the World Editor Library." );
@ -171,14 +171,14 @@ bool GameBaseData::preload(bool server, String &errorStr)
{
if (!Parent::preload(server, errorStr))
return false;
packed = false;
mPacked = false;
return true;
}
void GameBaseData::unpackData(BitStream* stream)
{
Parent::unpackData(stream);
packed = true;
mPacked = true;
}
//----------------------------------------------------------------------------

View file

@ -91,8 +91,8 @@ private:
public:
bool packed;
StringTableEntry category;
bool mPacked;
StringTableEntry mCategory;
// Signal triggered when this datablock is modified.
// GameBase objects referencing this datablock notify with this signal.

View file

@ -808,7 +808,7 @@ void ShapeBaseData::packData(BitStream* stream)
if( stream->writeFlag( debris != NULL ) )
{
stream->writeRangedU32(packed? SimObjectId((uintptr_t)debris):
stream->writeRangedU32(mPacked? SimObjectId((uintptr_t)debris):
debris->getId(),DataBlockObjectIdFirst,DataBlockObjectIdLast);
}

View file

@ -1019,7 +1019,7 @@ void ShapeBaseImageData::packData(BitStream* stream)
// Write the projectile datablock
if (stream->writeFlag(projectile))
stream->writeRangedU32(packed? SimObjectId((uintptr_t)projectile):
stream->writeRangedU32(mPacked ? SimObjectId((uintptr_t)projectile):
projectile->getId(),DataBlockObjectIdFirst,DataBlockObjectIdLast);
stream->writeFlag(cloakable);
@ -1050,7 +1050,7 @@ void ShapeBaseImageData::packData(BitStream* stream)
if( stream->writeFlag( casing ) )
{
stream->writeRangedU32(packed? SimObjectId((uintptr_t)casing):
stream->writeRangedU32(mPacked ? SimObjectId((uintptr_t)casing):
casing->getId(),DataBlockObjectIdFirst,DataBlockObjectIdLast);
}
@ -1139,7 +1139,7 @@ void ShapeBaseImageData::packData(BitStream* stream)
if (stream->writeFlag(s.emitter))
{
stream->writeRangedU32(packed? SimObjectId((uintptr_t)s.emitter):
stream->writeRangedU32(mPacked ? SimObjectId((uintptr_t)s.emitter):
s.emitter->getId(),DataBlockObjectIdFirst,DataBlockObjectIdLast);
stream->write(s.emitterTime);

View file

@ -244,7 +244,7 @@ void FlyingVehicleData::packData(BitStream* stream)
{
if (stream->writeFlag(sound[i]))
{
SimObjectId writtenId = packed ? SimObjectId((uintptr_t)sound[i]) : sound[i]->getId();
SimObjectId writtenId = mPacked ? SimObjectId((uintptr_t)sound[i]) : sound[i]->getId();
stream->writeRangedU32(writtenId, DataBlockObjectIdFirst, DataBlockObjectIdLast);
}
}
@ -253,7 +253,7 @@ void FlyingVehicleData::packData(BitStream* stream)
{
if (stream->writeFlag(jetEmitter[j]))
{
SimObjectId writtenId = packed ? SimObjectId((uintptr_t)jetEmitter[j]) : jetEmitter[j]->getId();
SimObjectId writtenId = mPacked ? SimObjectId((uintptr_t)jetEmitter[j]) : jetEmitter[j]->getId();
stream->writeRangedU32(writtenId, DataBlockObjectIdFirst,DataBlockObjectIdLast);
}
}

View file

@ -362,14 +362,14 @@ void HoverVehicleData::packData(BitStream* stream)
for (S32 i = 0; i < MaxSounds; i++)
if (stream->writeFlag(sound[i]))
stream->writeRangedU32(packed? SimObjectId((uintptr_t)sound[i]):
stream->writeRangedU32(mPacked ? SimObjectId((uintptr_t)sound[i]):
sound[i]->getId(),DataBlockObjectIdFirst,DataBlockObjectIdLast);
for (S32 j = 0; j < MaxJetEmitters; j++)
{
if (stream->writeFlag(jetEmitter[j]))
{
SimObjectId writtenId = packed ? SimObjectId((uintptr_t)jetEmitter[j]) : jetEmitter[j]->getId();
SimObjectId writtenId = mPacked ? SimObjectId((uintptr_t)jetEmitter[j]) : jetEmitter[j]->getId();
stream->writeRangedU32(writtenId, DataBlockObjectIdFirst,DataBlockObjectIdLast);
}
}

View file

@ -277,7 +277,7 @@ void VehicleData::packData(BitStream* stream)
stream->write(body.friction);
for (i = 0; i < Body::MaxSounds; i++)
if (stream->writeFlag(body.sound[i]))
stream->writeRangedU32(packed? SimObjectId((uintptr_t)body.sound[i]):
stream->writeRangedU32(mPacked ? SimObjectId((uintptr_t)body.sound[i]):
body.sound[i]->getId(),DataBlockObjectIdFirst,
DataBlockObjectIdLast);

View file

@ -477,7 +477,7 @@ void WheeledVehicleData::packData(BitStream* stream)
Parent::packData(stream);
if (stream->writeFlag(tireEmitter))
stream->writeRangedU32(packed? SimObjectId((uintptr_t)tireEmitter):
stream->writeRangedU32(mPacked ? SimObjectId((uintptr_t)tireEmitter):
tireEmitter->getId(),DataBlockObjectIdFirst,DataBlockObjectIdLast);
for (S32 i = 0; i < MaxSounds; i++)

View file

@ -184,7 +184,7 @@ void afxEffectGroupData::packData(BitStream* stream)
stream->write(timing.fade_in_time);
stream->write(timing.fade_out_time);
pack_fx(stream, fx_list, packed);
pack_fx(stream, fx_list, mPacked);
}
void afxEffectGroupData::unpackData(BitStream* stream)

View file

@ -380,7 +380,7 @@ void afxEffectWrapperData::packData(BitStream* stream)
{
Parent::packData(stream);
writeDatablockID(stream, effect_data, packed);
writeDatablockID(stream, effect_data, mPacked);
stream->writeString(effect_name);
@ -419,7 +419,7 @@ void afxEffectWrapperData::packData(BitStream* stream)
stream->write(scale_factor);
// modifiers
pack_mods(stream, xfm_modifiers, packed);
pack_mods(stream, xfm_modifiers, mPacked);
mathWrite(*stream, forced_bbox);
stream->write(update_forced_bbox);

View file

@ -157,7 +157,7 @@ void afxEffectronData::packData(BitStream* stream)
stream->write(duration);
stream->write(n_loops);
pack_fx(stream, fx_list, packed);
pack_fx(stream, fx_list, mPacked);
}
void afxEffectronData::unpackData(BitStream* stream)

View file

@ -326,15 +326,15 @@ void afxMagicSpellData::packData(BitStream* stream)
stream->writeFlag(do_move_interrupts);
stream->write(move_interrupt_speed);
writeDatablockID(stream, missile_db, packed);
writeDatablockID(stream, missile_db, mPacked);
stream->write(launch_on_server_signal);
stream->write(primary_target_types);
pack_fx(stream, casting_fx_list, packed);
pack_fx(stream, launch_fx_list, packed);
pack_fx(stream, delivery_fx_list, packed);
pack_fx(stream, impact_fx_list, packed);
pack_fx(stream, linger_fx_list, packed);
pack_fx(stream, casting_fx_list, mPacked);
pack_fx(stream, launch_fx_list, mPacked);
pack_fx(stream, delivery_fx_list, mPacked);
pack_fx(stream, impact_fx_list, mPacked);
pack_fx(stream, linger_fx_list, mPacked);
}
void afxMagicSpellData::unpackData(BitStream* stream)

View file

@ -230,9 +230,9 @@ void afxSelectronData::packData(BitStream* stream)
stream->write(obj_type_style);
stream->write(obj_type_mask);
pack_fx(stream, main_fx_list, packed);
pack_fx(stream, select_fx_list, packed);
pack_fx(stream, deselect_fx_list, packed);
pack_fx(stream, main_fx_list, mPacked);
pack_fx(stream, select_fx_list, mPacked);
pack_fx(stream, deselect_fx_list, mPacked);
}
void afxSelectronData::unpackData(BitStream* stream)

View file

@ -116,7 +116,7 @@ void afxSpellBookData::packData(BitStream* stream)
stream->write(pages_per_book);
for (S32 i = 0; i < pages_per_book*spells_per_page; i++)
writeDatablockID(stream, rpg_spells[i], packed);
writeDatablockID(stream, rpg_spells[i], mPacked);
}
void afxSpellBookData::unpackData(BitStream* stream)

View file

@ -176,8 +176,8 @@ void afxT3DLightBaseData::packData(BitStream* stream)
stream->write( mAnimState.animationPhase );
stream->write( mFlareScale );
writeDatablockID(stream, mAnimationData, packed);
writeDatablockID(stream, mFlareData, packed);
writeDatablockID(stream, mAnimationData, mPacked);
writeDatablockID(stream, mFlareData, mPacked);
}
void afxT3DLightBaseData::unpackData(BitStream* stream)

View file

@ -235,7 +235,7 @@ void afxPhraseEffectData::packData(BitStream* stream)
stream->writeString(on_trig_cmd);
pack_fx(stream, fx_list, packed);
pack_fx(stream, fx_list, mPacked);
}
void afxPhraseEffectData::unpackData(BitStream* stream)