void ReadTagData(Blam.Cache.CacheFileGen3 cf, int hs_scripts_offset, int hs_globals_offset, int hs_nodes_offset) { //hs_scripts = new TagInterface.Block<Blam.HaloReach.Tags.hs_scripts_block>(null, 0); hs_globals = new TagInterface.Block <Blam.Halo3.Tags.hs_globals_block>(null, 0); Scripts.InteropReadTagData(cf, sncr_hs_scripts, scnr_offset + hs_scripts_offset, hs_globals, scnr_offset + hs_globals_offset); hs_nodes = new TagInterface.Block <Blam.Halo3.Tags.syntax_datum_block>(null, 0); Scripts.InteropReadNodes(cf, scnr_offset + hs_nodes_offset, hs_nodes); }
public void DumpScriptGraphs(Blam.Cache.CacheFileGen3 cf, System.IO.StreamWriter sw) { var node_interop = Scripting.ScriptNode.FromBlock(hs_nodes); var scripts_interop = Scripting.ScriptBlock.FromBlock(sncr_hs_scripts); var globals_interop = Scripting.GlobalsBlock.FromBlock(hs_globals); //foreach (var g in globals_interop) g.PostprocessNodes(node_interop); //foreach (var s in scripts_interop) s.PostprocessNodes(node_interop); foreach (var g in globals_interop) { g.DumpGraph(sw, strings_pool); } foreach (var s in scripts_interop) { s.DumpGraph(sw, strings_pool); } }
protected ScenarioScriptInteropGen3(Blam.Cache.CacheFileGen3 cf, TI.IBlock hs_scripts, int hs_string_constants_offset, int hs_scripts_offset, int hs_globals_offset, int hs_nodes_offset) { scnr_offset = -1; foreach (var ci in cf.Index) { // The scenario's group tag has never changed so this check is OK if (!ci.IsEmpty && ci.GroupTag.ID == Blam.Halo3.TagGroups.scnr.ID) { scnr_offset = ci.Offset; } } sncr_hs_scripts = hs_scripts; ReadStringData(cf, hs_string_constants_offset); ReadTagData(cf, hs_scripts_offset, hs_globals_offset, hs_nodes_offset); }
void ReadStringData(Blam.Cache.CacheFileGen3 cf, int hs_string_constants_offset) { Scripts.InteropReadStringData(cf, scnr_offset + hs_string_constants_offset, out strings_pool, 0xCD); }