コード例 #1
0
//----------------------------------------------------------------------------
void CurveMesh::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	Polysegment::Save(target);
	PX2_VERSION_SAVE(target);

	target.Write(mNumFullVertices);
	target.Write(mNumSegments);
	target.Write(mLevel);
	target.WriteBool(mAllowDynamicChange);
	target.WritePointer(mOrigVBuffer);
	target.WritePointer(mOrigParams);
	target.WritePointerN(mNumSegments, mSegments);

	if (mCInfo)
	{
		for (int i = 0; i < mNumFullVertices; ++i)
		{
			target.WritePointer(mCInfo[i].Segment);
			target.Write(mCInfo[i].Param);
		}
	}

	PX2_END_DEBUG_STREAM_SAVE(CurveMesh, target);
}
コード例 #2
0
//----------------------------------------------------------------------------
void RawTerrainPage::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	TriMesh::Save(target);

	target.Write(mSize);
	int numVertices = mSize*mSize;
	target.WriteN(numVertices, mHeights);
	target.WriteAggregate(mOrigin);
	target.Write(mSpacing);

	target.WritePointer(mMaterialInstance);
	target.WritePointer(mTextureDefault);
	target.WritePointer(mTexture0);
	target.WritePointer(mTextureAlpha);
	target.WritePointer(mTexture1);
	target.WritePointer(mTexture2);
	target.WritePointer(mTexture3);
	target.WritePointer(mTexture4);
	target.WriteAggregate(mUV01);
	target.WriteAggregate(mUV23);
	target.WriteAggregate(mUV4);
	target.WritePointer(mUV01Float);
	target.WritePointer(mUV23Float);
	target.WritePointer(mUV4Float);

	PX2_END_DEBUG_STREAM_SAVE(RawTerrainPage, target);
}
コード例 #3
0
ファイル: PX2RawTerrain.cpp プロジェクト: ascetic85/Phoenix3d
//----------------------------------------------------------------------------
void RawTerrain::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	Node::Save(target);

	target.WriteEnum(mMode);
	target.Write(mNumRows);
	target.Write(mNumCols);
	target.Write(mSize);
	target.Write(mMinElevation);
	target.Write(mMaxElevation);
	target.Write(mSpacing);
	target.Write(mCameraRow);
	target.Write(mCameraCol);
	target.WritePointer(mVFormat);
	target.WritePointer(mCamera);
	target.WritePointer(mShine);

	for (int row = 0; row < mNumRows; ++row)
	{
		for (int col = 0; col < mNumCols; ++col)
		{
			target.WritePointer(mPages[row][col]);
		}
	}

	PX2_END_DEBUG_STREAM_SAVE(RawTerrain, target);
}
コード例 #4
0
//----------------------------------------------------------------------------
void Object::Save(OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	// 写入Rtti 名称
	target.WriteString(GetRttiType().GetName());

	// 写入Rtti version
	target.Write(TYPE.GetVersion());

	// 写入ID
	target.WriteUniqueID(this);

	//是否有效
	target.WriteBool(mIsEnable);

	// 资源路径
	target.WriteString(mResourcePath);

	// 写入对象名称
	target.WriteString(mName);
	target.Write(mID);

	PX2_END_DEBUG_STREAM_SAVE(Object, target);
}
コード例 #5
0
ファイル: Wm5BspNode.cpp プロジェクト: fishxz/omni-bot
//----------------------------------------------------------------------------
void BspNode::Save (OutStream& target) const
{
    WM5_BEGIN_DEBUG_STREAM_SAVE(target);

    Node::Save(target);

    target.Write(ModelPlane);
    target.Write(mWorldPlane);

    WM5_END_DEBUG_STREAM_SAVE(BspNode, target);
}
コード例 #6
0
//----------------------------------------------------------------------------
void UISizeExtendControl::Save(OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	Controller::Save(target);
	PX2_VERSION_SAVE(target);

	target.Write(mWidthOverHeightPercent);
	target.Write(mOriginHeight);

	PX2_END_DEBUG_STREAM_SAVE(Controller, target);
}
コード例 #7
0
//----------------------------------------------------------------------------
void GroupBuf::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	Buf::Save(target);
	PX2_VERSION_SAVE(target);

	target.Write(mToGroupCharacterID);
	target.Write(mBeforeGroup);

	PX2_END_DEBUG_STREAM_SAVE(GroupBuf, target);
}
コード例 #8
0
ファイル: SimpleSegment.cpp プロジェクト: bhlzlx/WildMagic
//----------------------------------------------------------------------------
void SimpleSegment::Save (OutStream& target) const
{
	WM5_BEGIN_DEBUG_STREAM_SAVE(target);

	CurveSegment::Save(target);

	target.Write(mAmplitude);
	target.Write(mFrequency);
	target.Write(mHeight);

	WM5_END_DEBUG_STREAM_SAVE(CurveSegment, target);
}
コード例 #9
0
ファイル: Wm5Particles.cpp プロジェクト: Kiichi77/WildMagic
//----------------------------------------------------------------------------
void Particles::Save (OutStream& target) const
{
    WM5_BEGIN_DEBUG_STREAM_SAVE(target);

    TriMesh::Save(target);

    target.WriteW(mNumParticles, mPositionSizes);
    target.Write(mSizeAdjust);
    target.Write(mNumActive);

    WM5_END_DEBUG_STREAM_SAVE(Particles, target);
}
コード例 #10
0
ファイル: PX2ClodMesh.cpp プロジェクト: JamShan/Phoenix3D_2.1
//----------------------------------------------------------------------------
void ClodMesh::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	TriMesh::Save(target);
	PX2_VERSION_SAVE(target);

	target.Write(mCurrentRecord);
	target.Write(mTargetRecord);
	target.WritePointer(mRecordArray);

	PX2_END_DEBUG_STREAM_SAVE(ClodMesh, target);
}
コード例 #11
0
ファイル: Wm5SurfacePatch.cpp プロジェクト: fishxz/omni-bot
//----------------------------------------------------------------------------
void SurfacePatch::Save (OutStream& target) const
{
    WM5_BEGIN_DEBUG_STREAM_SAVE(target);

    Object::Save(target);

    target.Write(mUMin);
    target.Write(mUMax);
    target.Write(mVMin);
    target.Write(mVMax);
    target.WriteBool(mRectangular);

    WM5_END_DEBUG_STREAM_SAVE(SurfacePatch, target);
}
コード例 #12
0
ファイル: Wm5OffsetState.cpp プロジェクト: bhlzlx/WildMagic
//----------------------------------------------------------------------------
void OffsetState::Save (OutStream& target) const
{
	WM5_BEGIN_DEBUG_STREAM_SAVE(target);

	Object::Save(target);

	target.WriteBool(FillEnabled);
	target.WriteBool(LineEnabled);
	target.WriteBool(PointEnabled);
	target.Write(Scale);
	target.Write(Bias);

	WM5_END_DEBUG_STREAM_SAVE(OffsetState, target);
}
コード例 #13
0
//----------------------------------------------------------------------------
void OffsetProperty::Save (OutStream& target) const
{
    PX2_BEGIN_DEBUG_STREAM_SAVE(target);

    Object::Save(target);

    target.WriteBool(FillEnabled);
    target.WriteBool(LineEnabled);
    target.WriteBool(PointEnabled);
    target.Write(Scale);
    target.Write(Bias);

    PX2_END_DEBUG_STREAM_SAVE(OffsetProperty, target);
}
コード例 #14
0
//----------------------------------------------------------------------------
void PushTransformController::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	Controller::Save(target);
	PX2_VERSION_SAVE(target);

	target.WriteEnum(mTransType);
	target.Write(mMaxVelocity);
	target.Write(mFriction);
	target.WriteAggregate(mVelocity);

	PX2_END_DEBUG_STREAM_SAVE(PushTransformController, target);
}
コード例 #15
0
ファイル: Wm5Controller.cpp プロジェクト: fishxz/omni-bot
//----------------------------------------------------------------------------
void Controller::Save (OutStream& target) const
{
    WM5_BEGIN_DEBUG_STREAM_SAVE(target);

    Object::Save(target);

    target.WriteEnum(Repeat);
    target.Write(MinTime);
    target.Write(MaxTime);
    target.Write(Phase);
    target.Write(Frequency);
    target.WriteBool(Active);
    target.WritePointer(mObject);

    WM5_END_DEBUG_STREAM_SAVE(Controller, target);
}
コード例 #16
0
//----------------------------------------------------------------------------
void KeyframeController::Save (OutStream& target) const
{
    WM5_BEGIN_DEBUG_STREAM_SAVE(target);

    TransformController::Save(target);

    target.Write(mNumCommonTimes);
    if (mNumCommonTimes > 0)
    {
        target.WriteN(mNumCommonTimes, mCommonTimes);
        target.WriteAggregateW(mNumTranslations, mTranslations);
        target.WriteAggregateW(mNumRotations, mRotations);
        target.WriteW(mNumScales, mScales);
    }
    else
    {
        target.WriteW(mNumTranslations, mTranslationTimes);
        target.WriteAggregateN(mNumTranslations, mTranslations);
        target.WriteW(mNumRotations, mRotationTimes);
        target.WriteAggregateN(mNumRotations, mRotations);
        target.WriteW(mNumScales, mScaleTimes);
        target.WriteN(mNumScales, mScales);
    }

    WM5_END_DEBUG_STREAM_SAVE(KeyframeController, target);
}
コード例 #17
0
ファイル: wad_reader_writer.cpp プロジェクト: evpo/EncryptPad
    EpadResult ExtractFromWad(RandomInStream &in, OutStream &out, std::string &key_file)
    {
        WadMetadata metadata;
        auto result = ExtractWadMetadata(in, in.GetCount(), metadata);
        in.Seek(metadata.payload_offset);

        if(result != EpadResult::Success)
            return result;

        Botan::SecureVector<byte> buffer;
        buffer.resize(metadata.payload_size != 0 ? metadata.payload_size : in.GetCount());
        in.Read(buffer.data(), buffer.size());
        out.Write(buffer.data(), buffer.size());

        key_file.clear();

        if(metadata.key_file_offset != kInvalid)
        {
            key_file.resize(metadata.key_file_size);
            in.Seek(metadata.key_file_offset);
            in.Read(reinterpret_cast<byte *>(&*key_file.begin()), metadata.key_file_size);
        }

        return EpadResult::Success;
    }
コード例 #18
0
ファイル: PX2Scene.cpp プロジェクト: ascetic85/Phoenix3d
//----------------------------------------------------------------------------
void Scene::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	Netable::Save(target);

	target.Write<int>(mSceneID);

	target.WritePointer(mSceneNode);

	const int numActors = (int)mActors.size();
	target.Write(numActors);
	for (int i=0; i<numActors; ++i)
	{
		if (mActors[i])
		{
			target.WritePointer(mActors[i]);
		}
		else
		{
			target.WritePointer((Actor*)0);
		}
	}
	target.WritePointer(mTerrainActor);

	target.WritePointer(mDefaultLight);
	target.WritePointer(mDefaultCameraActor);
	target.WritePointer(mDefaultARActor);

	PX2_END_DEBUG_STREAM_SAVE(Scene, target);
}
コード例 #19
0
//----------------------------------------------------------------------------
void SkinController::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	Controller::Save(target);

	target.Write(mNumVertices);
	target.Write(mNumBones);

	int numWeightsOffsets = mNumVertices*mNumBones;
	target.WriteN(numWeightsOffsets, mWeights[0]);
	target.WriteAggregateN(numWeightsOffsets, mOffsets[0]);

	target.WritePointerN(mNumBones, mBones);

	PX2_END_DEBUG_STREAM_SAVE(SkinController, target);
}
コード例 #20
0
ファイル: Wm5StencilState.cpp プロジェクト: bhlzlx/WildMagic
//----------------------------------------------------------------------------
void StencilState::Save (OutStream& target) const
{
	WM5_BEGIN_DEBUG_STREAM_SAVE(target);

	Object::Save(target);

	target.WriteBool(Enabled);
	target.WriteEnum(Compare);
	target.Write(Reference);
	target.Write(Mask);
	target.Write(WriteMask);
	target.WriteEnum(OnFail);
	target.WriteEnum(OnZFail);
	target.WriteEnum(OnZPass);

	WM5_END_DEBUG_STREAM_SAVE(StencilState, target);
}
コード例 #21
0
//----------------------------------------------------------------------------
void IndexBuffer::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	Buffer::Save(target);

	target.Write(mOffset);

	PX2_END_DEBUG_STREAM_SAVE(IndexBuffer, target);
}
コード例 #22
0
//----------------------------------------------------------------------------
void Polypoint::Save (OutStream& target) const
{
    WM5_BEGIN_DEBUG_STREAM_SAVE(target);

    Visual::Save(target);

    target.Write(mNumPoints);

    WM5_END_DEBUG_STREAM_SAVE(Polypoint, target);
}
コード例 #23
0
ファイル: Wm5SwitchNode.cpp プロジェクト: bazhenovc/WildMagic
//----------------------------------------------------------------------------
void SwitchNode::Save (OutStream& target) const
{
	WM5_BEGIN_DEBUG_STREAM_SAVE(target);

	Node::Save(target);

	target.Write(mActiveChild);

	WM5_END_DEBUG_STREAM_SAVE(SwitchNode, target);
}
コード例 #24
0
//----------------------------------------------------------------------------
void CurveSegment::Save (OutStream& target) const
{
    WM5_BEGIN_DEBUG_STREAM_SAVE(target);

    Object::Save(target);

    target.Write(mUMin);
    target.Write(mUMax);

    WM5_END_DEBUG_STREAM_SAVE(CurveSegment, target);
}
コード例 #25
0
//----------------------------------------------------------------------------
void Polypoint::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	Renderable::Save(target);
	PX2_VERSION_SAVE(target);

	target.Write(mNumPoints);

	PX2_END_DEBUG_STREAM_SAVE(Polypoint, target);
}
コード例 #26
0
//----------------------------------------------------------------------------
void RenderTarget::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	Object::Save(target);
	PX2_VERSION_SAVE(target);

	target.Write(mNumTargets);
	target.Write(mWidth);
	target.Write(mHeight);
	target.Write(mHasMipmaps);
	target.WriteBool(mHasDepthStencil);
	target.WriteBool(mIsOnlyDepth16NoStencil);

	target.WritePointerN(mNumTargets, mColorTextures);
	target.WritePointer(mDepthStencilTexture);
	target.WriteBool(mHasMipmaps);

	PX2_END_DEBUG_STREAM_SAVE(RenderTarget, target);
}
コード例 #27
0
//----------------------------------------------------------------------------
void MorphController::Save (OutStream& target) const
{
    WM5_BEGIN_DEBUG_STREAM_SAVE(target);

    Controller::Save(target);

    target.Write(mNumVertices);
    target.Write(mNumTargets);
    target.Write(mNumKeys);

    int numTotalVertices = mNumVertices*mNumTargets;
    target.WriteAggregateN(numTotalVertices, mVertices[0]);

    target.WriteN(mNumKeys, mTimes);

    int numTotalWeights = mNumKeys*(mNumTargets - 1);
    target.WriteN(numTotalWeights, mWeights[0]);

    WM5_END_DEBUG_STREAM_SAVE(MorphController, target);
}
コード例 #28
0
//----------------------------------------------------------------------------
void LODTerrain::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	Terrain::Save(target);

	target.Write(mPixelTolerance);
	target.WriteBool(mIsCloseAssumption);

	PX2_END_DEBUG_STREAM_SAVE(LODTerrain, target);
}
コード例 #29
0
ファイル: Wm5Polysegment.cpp プロジェクト: fishxz/omni-bot
//----------------------------------------------------------------------------
void Polysegment::Save (OutStream& target) const
{
    WM5_BEGIN_DEBUG_STREAM_SAVE(target);

    Visual::Save(target);

    target.Write(mNumSegments);
    target.WriteBool(mContiguous);

    WM5_END_DEBUG_STREAM_SAVE(Polysegment, target);
}
コード例 #30
0
ファイル: PX2EventAlpha.cpp プロジェクト: ascetic85/Phoenix3d
//----------------------------------------------------------------------------
void ParticleEvent_Alpha::Save (OutStream& target) const
{
	PX2_BEGIN_DEBUG_STREAM_SAVE(target);

	EffectEvent::Save(target);

	target.Write(mAlpha.Value0);
	target.Write(mAlpha.Value1);

	PX2_END_DEBUG_STREAM_SAVE(ParticleEvent_Alpha, target);
}