private static void CheckAll(string command) { foreach (var item in map.items) { SceneIndex sceneIndex = item.sceneIndex; SceneData scene = save.scenes[(int)sceneIndex]; string check = "\t[ ]"; if (item.CheckWord(scene.GetChestWord(), scene.GetCollectableWord())) { check = "\t[x]"; } check += " " + item.ToString(); Console.WriteLine(check); } }
private static void PrintScene(string command) { string pos = command.Remove(0, "print ".Length); try { int index = int.Parse(pos); SceneData scene = save.scenes[index]; Console.WriteLine("\t" + scene.index.ToString()); Console.WriteLine("\t " + scene.GetChestWord().ToString("X8")); Console.WriteLine("\t " + scene.GetCollectableWord().ToString("X8")); } catch (Exception e) { Console.WriteLine(e.ToString()); } }
public OOTSaveFile(byte[] bytes) { this.bytes = bytes; naviCounter = BitConverter.ToUInt16(bytes, NAVI_ADDRESS); //read scenes for (int i = 0; i < SCENE_COUNT; i++) { SceneIndex index = (SceneIndex)i; scenes[i] = new SceneData(index, bytes); } Array.Copy(bytes, EVENT_CHECK_ADDRESS, event_chk_table, 0, EVENT_CHECK_LENGTH); SwapEdian(event_chk_table); Array.Copy(bytes, ITEM_GET_ADDRESS, item_get_table, 0, ITEM_GET_TABLE_LENGTH); SwapEdian(item_get_table); Array.Copy(bytes, INF_ADDRESS, inf_table, 0, INF_LENGTH); SwapEdian(inf_table); }
private static void CheckScene(string command) { string pos = command.Remove(0, "check ".Length); try { int index = int.Parse(pos); SceneData scene = save.scenes[index]; string[] chests; int collCount; bool check = scene.CheckScene(map, out chests, out collCount); Console.WriteLine(scene.index + ": " + check.ToString()); foreach (var chest in chests) { Console.WriteLine("\t" + chest); } } catch (Exception e) { Console.WriteLine(e.ToString()); } }