//---------------------------------
	void PostProcessor::postProcess()
	{
		if ( (getObjectFlags() & Loader::ANIMATION_LIST_FLAG) != 0 )
		{
			createMissingAnimationLists();
		}

		if ( (getObjectFlags() & Loader::EFFECT_FLAG) != 0 )
		{
			writeEffects();
		}

		if ( (getObjectFlags() & Loader::LIGHT_FLAG) != 0 )
		{
			writeLights();
		}

		if ( (getObjectFlags() & Loader::CAMERA_FLAG) != 0 )
		{
			writeCameras();
		}

		if ( (getObjectFlags() & Loader::CONTROLLER_FLAG) != 0 )
		{
			createAndWriteSkinControllers();
			writeMorphControllers();
		}

		if ( (getObjectFlags() & Loader::VISUAL_SCENES_FLAG) != 0 )
		{
			writeVisualScenes();
		}

		if ( (getObjectFlags() & Loader::LIBRARY_NODES_FLAG) != 0 )
		{
			writeLibraryNodes();
		}

		if ( (getObjectFlags() & Loader::ANIMATION_LIST_FLAG) != 0 )
		{
			writeAnimationLists();
		}

		if ( (getObjectFlags() & Loader::FORMULA_FLAG) != 0 )
		{
			linkAndWriteFormulas();
		}

		if ( (getObjectFlags() & Loader::KINEMATICS_FLAG) != 0 )
		{
			createAndWriteKinematicsScene();
		}
	}
Ejemplo n.º 2
0
int TURD::save(GFFFile &gff, uint32 top)
{
	uint32 list, sct;

	if(gff.writeVar(top, NWN_VAR_INT32, "ModMapNumAreas", mapnumareas))
		return ERR(gff);
	if(gff.writeVar(top, NWN_VAR_UINT32, "TURD_CalendarDay", calendarday))
		return ERR(gff);
	if(gff.writeVar(top, NWN_VAR_UINT32, "TURD_TimeOfDay", timeofday))
		return ERR(gff);
	if(gff.writeVar(top, NWN_VAR_UINT32, "TURD_PlayerID", playerid))
		return ERR(gff);
	if(gff.writeVar(top, NWN_VAR_UINT32, "TURD_AreaId", areaid)) return ERR(gff);
	if(gff.writeFloat(top, "TURD_PositionX", x)) return ERR(gff);
	if(gff.writeFloat(top, "TURD_PositionY", y)) return ERR(gff);
	if(gff.writeFloat(top, "TURD_PositionZ", z)) return ERR(gff);
	if(gff.writeFloat(top, "TURD_OrientatX", dirx)) return ERR(gff);
	if(gff.writeFloat(top, "TURD_OrientatY", diry)) return ERR(gff);
	if(gff.writeFloat(top, "TURD_OrientatZ", dirz)) return ERR(gff);
	if(gff.writeExoString(top, "TURD_CommntyName", commntyname)) return ERR(gff);
	if(gff.writeExoLocString(top, "TURD_FirstName", firstname)) return ERR(gff);
	if(gff.writeExoLocString(top, "TURD_LastName", lastname)) return ERR(gff);
	if(!variables.empty())
	{
		if(gff.writeList(list, top, "VarTable")) return ERR(gff);
		if(variables.save(gff, list)) return ERR(variables);
	}
	if(gff.writeData(top, "Mod_MapAreasData", mapareasdata, false))
		return ERR(gff);
	if(gff.writeList(list, top, "TURD_PersonalRep")) return ERR(gff);
	for(uint32 i=0;i<preputations.size();i++)
	{
		if(gff.writeListStruct(sct, list)) return ERR(gff);
		if(gff.writeSetId(sct, 47787)) return ERR(gff);
		if(gff.writeVar(sct, NWN_VAR_UINT8, "TURD_PR_Decays",
					preputations[i].decays))
			return ERR(gff);
		if(gff.writeVar(sct, NWN_VAR_INT32, "TURD_PR_Amount",
					preputations[i].amount))
			return ERR(gff);
		if(gff.writeVar(sct, NWN_VAR_INT32, "TURD_PR_Duration",
					preputations[i].duration))
			return ERR(gff);
		if(gff.writeVar(sct, NWN_VAR_UINT32, "TURD_PR_Day", preputations[i].day))
			return ERR(gff);
		if(gff.writeVar(sct, NWN_VAR_UINT32, "TURD_PR_Time", preputations[i].time))
			return ERR(gff);
		if(gff.writeVar(sct, NWN_VAR_UINT32, "TURD_PR_ObjId",
					preputations[i].objectid))
			return ERR(gff);
	}
	if(gff.writeList(list, top, "TURD_RepList")) return ERR(gff);
	for(uint32 i=0;i<reputations.size();i++)
	{
		if(gff.writeListStruct(sct, list)) return ERR(gff);
		if(gff.writeSetId(sct, 43962)) return ERR(gff);
		if(gff.writeVar(sct, NWN_VAR_INT32, "TURD_RepAmount", reputations[i]))
			return ERR(gff);
	}
	if(gff.writeList(list, top, "Mod_MapDataList")) return ERR(gff);
	for(uint32 i=0;i<mapdatas.size();i++)
	{
		if(gff.writeListStruct(sct, list)) return ERR(gff);
		if(gff.writeSetId(sct, 0)) return ERR(gff);
		if(gff.writeData(sct, "Mod_MapData", mapdatas[i], false)) return ERR(gff);
	}
	if(writeEffects(gff, top)) return errcode;
	return errcode = 0;
}