Exemplo n.º 1
0
		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);
			}
		}
Exemplo n.º 2
0
			public void Reset(Import.ScriptGlobal def) { glob = def; }
Exemplo n.º 3
0
			public ScriptGlobal(Import.ScriptGlobal def) { glob = def; }
Exemplo n.º 4
0
			public void Reset(Import.ScriptFunction def) { func = def; }
Exemplo n.º 5
0
			public ScriptFunction(Import.ScriptFunction def) { func = def; }
Exemplo n.º 6
0
		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);
				}
			}
		}
Exemplo n.º 7
0
		void ScriptingToStream(Import import)
		{
			ScriptingHeadersToStream(import);
			ScriptingDefinitionsToStream(import);
		}
Exemplo n.º 8
0
			public void Reset(Import.TagGroup def) { tagGroup = def; }
Exemplo n.º 9
0
			public TagGroup(Import.TagGroup def)	{ tagGroup = def; }
Exemplo n.º 10
0
			public TagBlock(Import.TagBlock def)	{ tagBlock = def; }
Exemplo n.º 11
0
			public void Reset(Import.TagBlock def) { tagBlock = def; }
Exemplo n.º 12
0
		internal override IField ConstructField(Import.Field def)
		{
			return new Field(def);
		}
Exemplo n.º 13
0
			public Field(Import.Field def)	{ field = def; }
Exemplo n.º 14
0
			public void Reset(Import.Field def) { field = def; }