void ScriptingHeadersToStream(Import import)
		{
			string name;
			uint base_address = OwnerState.Definition.MemoryInfo.BaseAddress;

			if ((Head.ScriptFunctionsCount = import.ScriptFunctions.Count) > 0)
			{
				Head.ScriptFunctionsAddress = base_address + MemoryStream.PositionUnsigned;
				// allocate script functions pointers
				foreach (Import.ScriptFunction sc in import.ScriptFunctions.Values)
				{
					name = sc.ToString();
					AddLocationFixup(name, MemoryStream);
					MemoryStream.Write(uint.MinValue);
				}

				AlignMemoryStream(Compiler.kDefaultAlignment);
			}

			if ((Head.ScriptGlobalsCount = import.ScriptGlobals.Count) > 0)
			{
				Head.ScriptGlobalsAddress = base_address + MemoryStream.PositionUnsigned;
				// allocate script global pointers
				foreach (Import.ScriptGlobal sc in import.ScriptGlobals.Values)
				{
					name = sc.ToString();
					AddLocationFixup(name, MemoryStream);
					MemoryStream.Write(uint.MinValue);
				}

				AlignMemoryStream(Compiler.kDefaultAlignment);
			}
		}
			public void Reset(Import.ScriptGlobal def) { glob = def; }
			public ScriptGlobal(Import.ScriptGlobal def) { glob = def; }
			public void Reset(Import.ScriptFunction def) { func = def; }
			public ScriptFunction(Import.ScriptFunction def) { func = def; }
		void ScriptingDefinitionsToStream(Import import)
		{
			if (Head.ScriptFunctionsCount > 0)
			{
				var sfunc = new ScriptFunction();
				foreach (Import.ScriptFunction sc in import.ScriptFunctions.Values)
				{
					sfunc.Reset(sc);
					sfunc.Write(MemoryStream);
				}
			}

			if (Head.ScriptGlobalsCount > 0)
			{
				var sglob = new ScriptGlobal();
				foreach (Import.ScriptGlobal sc in import.ScriptGlobals.Values)
				{
					sglob.Reset(sc);
					sglob.Write(MemoryStream);
				}
			}
		}
		void ScriptingToStream(Import import)
		{
			ScriptingHeadersToStream(import);
			ScriptingDefinitionsToStream(import);
		}
Esempio n. 8
0
			public void Reset(Import.TagGroup def) { tagGroup = def; }
Esempio n. 9
0
			public TagGroup(Import.TagGroup def)	{ tagGroup = def; }
Esempio n. 10
0
			public TagBlock(Import.TagBlock def)	{ tagBlock = def; }
Esempio n. 11
0
			public void Reset(Import.TagBlock def) { tagBlock = def; }
Esempio n. 12
0
		internal override IField ConstructField(Import.Field def)
		{
			return new Field(def);
		}
Esempio n. 13
0
			public Field(Import.Field def)	{ field = def; }
Esempio n. 14
0
			public void Reset(Import.Field def) { field = def; }