コード例 #1
0
ファイル: CIPLEntry_PATH_Node.cpp プロジェクト: X-Seti/KGM
void			CIPLEntry_PATH_Node::unserialize(void)
{
	CDataReader *pDataReader = CDataReader::getInstance();

	if (getLatestPathGroup() == nullptr)
	{
		// path node found before path group
		throw EXCEPTION_INVALID_DATA_ORDER;
	}

	switch (pDataReader->getLineTokens().size())
	{
	case 12:
		CIPLEntry_PATH::unserialize();

		setFormatType(0);
		setFormatGames(GAME_FLAG_GTA_VC);

		m_uiNodeType = pDataReader->readTokenUint32();
		m_uiNextNode = pDataReader->readTokenUint32();
		m_uiIsCrossRoad = pDataReader->readTokenUint32();
		m_vecPosition = pDataReader->readTokenVector3D() / 16.0f;
		m_fMedian = pDataReader->readTokenFloat32();
		m_uiLeftLaneCount = pDataReader->readTokenUint32();
		m_uiRightLaneCount = pDataReader->readTokenUint32();
		m_uiSpeedLimit = pDataReader->readTokenUint32();
		m_uiFlags = pDataReader->readTokenUint32();
		m_fSpawnRate = pDataReader->readTokenFloat32();
		break;
	}

	getLatestPathGroup()->addEntry(this);
}
コード例 #2
0
ファイル: CIPLEntry_JUMP.cpp プロジェクト: X-Seti/KGM
void			CIPLEntry_JUMP::unserialize(void)
{
    CDataReader *pDataReader = CDataReader::getInstance();

    switch (pDataReader->getLineTokens().size())
    {
    case 16:
        setFormatType(0);
        setFormatGames(GAME_FLAG_GTA_SA);

        m_vecStartLowerPosition = pDataReader->readTokenVector3D();
        m_vecStartUpperPosition = pDataReader->readTokenVector3D();
        m_vecTargetLowerPosition = pDataReader->readTokenVector3D();
        m_vecTargetUpperPosition = pDataReader->readTokenVector3D();
        m_vecCameraPosition = pDataReader->readTokenVector3D();
        m_uiReward = pDataReader->readTokenUint32();
        break;
    default:
        throw EXCEPTION_UNKNOWN_FORMAT_TYPE;
    }
}
コード例 #3
0
ファイル: CIPLEntry_PICK.cpp プロジェクト: X-Seti/KGM
void			CIPLEntry_PICK::unserialize(void)
{
	CDataReader *pDataReader = CDataReader::getInstance();

	switch (pDataReader->getLineTokens().size())
	{
	case 4:
		setFormatType(0);
		setFormatGames(GAME_FLAG_GTA_SA);

		m_uiWeaponId = pDataReader->readTokenUint32();
		m_vecPosition = pDataReader->readTokenVector3D();
		break;
	default:
		throw EXCEPTION_UNKNOWN_FORMAT_TYPE;
	}
}
コード例 #4
0
ファイル: CIPLEntry_TCYC.cpp プロジェクト: X-Seti/KGM
void			CIPLEntry_TCYC::unserialize(void)
{
	CDataReader *pDataReader = CDataReader::getInstance();

	switch (pDataReader->getLineTokens().size())
	{
	case 11:
		setFormatType(0);
		setFormatGames(GAME_FLAG_GTA_SA);

		m_vecPositionLower = pDataReader->readTokenVector3D();
		m_vecPositionUpper = pDataReader->readTokenVector3D();
		m_uiUnknown1 = pDataReader->readTokenUint32();
		m_uiWeatherId = pDataReader->readTokenUint32();
		m_iBrightness = pDataReader->readTokenInt32();
		m_uiTime = pDataReader->readTokenUint32();
		m_uiDrawDistance = pDataReader->readTokenUint32();
		break;
	default:
		throw EXCEPTION_UNKNOWN_FORMAT_TYPE;
	}
}