Memory.cs 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742
  1. using Microsoft.Xna.Framework;
  2. using Microsoft.Xna.Framework.Content;
  3. using Microsoft.Xna.Framework.Graphics;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.IO;
  7. using System.Linq;
  8. using System.Threading.Tasks;
  9. #pragma warning disable CS0649
  10. namespace FF8
  11. {
  12. public static class Memory
  13. {
  14. //monogame
  15. public static GraphicsDeviceManager graphics;
  16. public static SpriteBatch spriteBatch;
  17. public static ContentManager content;
  18. public static bool IsActive = true;
  19. public static Font font;
  20. public static Task InitTask;
  21. //public static Texture2D[] iconsTex;
  22. public static Cards Cards;
  23. public static Faces Faces;
  24. public static Icons Icons;
  25. public static Strings Strings;
  26. public static Kernel_bin Kernel_Bin;
  27. public static Texture2D shadowTexture;
  28. public static VertexPositionTexture[] shadowGeometry;
  29. public enum ScaleMode
  30. {
  31. /// <summary>
  32. /// scale object to have the same height as viewport
  33. /// </summary>
  34. FitVertical,
  35. /// <summary>
  36. /// scale object to have the same width as viewport
  37. /// </summary>
  38. FitHorizontal,
  39. /// <summary>
  40. /// Same as FitVertical unless width is too large, then it becomes FitHorizontal
  41. /// </summary>
  42. FitBoth,
  43. /// <summary>
  44. /// fill the entire viewport
  45. /// </summary>
  46. Stretch
  47. }
  48. public static Point Center => new Point(graphics.GraphicsDevice.Viewport.Width / 2, graphics.GraphicsDevice.Viewport.Height / 2);
  49. public const ScaleMode _scaleMode = ScaleMode.Stretch;
  50. public static Vector2 Scale(float Width = PreferredViewportWidth, float Height = PreferredViewportHeight, ScaleMode scaleMode = _scaleMode, int targetX = 0, int targetY = 0)
  51. {
  52. if (targetX == 0)
  53. targetX = graphics.GraphicsDevice.Viewport.Width;
  54. if (targetY == 0)
  55. targetY = graphics.GraphicsDevice.Viewport.Height;
  56. float h = targetX / Width;
  57. float v = targetY / Height;
  58. switch (scaleMode)
  59. {
  60. #pragma warning disable CS0162 // Unreachable code detected
  61. case ScaleMode.FitHorizontal:
  62. return new Vector2(h, h);
  63. case ScaleMode.FitVertical:
  64. return new Vector2(v, v);
  65. case ScaleMode.FitBoth:
  66. return (v * Width > targetX)? new Vector2(h, h): new Vector2(v, v);
  67. case ScaleMode.Stretch:
  68. default:
  69. return new Vector2(h, v);
  70. #pragma warning restore CS0162 // Unreachable code detected
  71. }
  72. }
  73. //original resolution I am working on, therefore if user scales it we need to propertially scale everything
  74. public const int PreferredViewportWidth = 1280;
  75. public const int PreferredViewportHeight = 720;
  76. public static GameTime gameTime;
  77. private static ushort prevmusic = 0;
  78. private static ushort currmusic = 0;
  79. /// <summary>
  80. /// Stores current savestate. When you save this is wrote. When you load this is replaced.
  81. /// </summary>
  82. private static Saves.Data _state = new Saves.Data();
  83. public static ushort MusicIndex
  84. {
  85. get
  86. {
  87. if (dicMusic.Count > 0)
  88. {
  89. while ((prevmusic > currmusic || prevmusic == ushort.MinValue && currmusic == ushort.MaxValue) &&
  90. !dicMusic.ContainsKey(currmusic))
  91. {
  92. if (dicMusic.Keys.Max() < currmusic)
  93. {
  94. currmusic = dicMusic.Keys.Max();
  95. }
  96. else
  97. {
  98. currmusic--;
  99. }
  100. }
  101. while (dicMusic.Count > 0 && prevmusic < currmusic && !dicMusic.ContainsKey(currmusic))
  102. {
  103. if (dicMusic.Keys.Max() < currmusic)
  104. {
  105. currmusic = dicMusic.Keys.Min();
  106. }
  107. else
  108. {
  109. currmusic++;
  110. }
  111. }
  112. return currmusic;
  113. }
  114. else return 0;
  115. }
  116. set
  117. {
  118. prevmusic = currmusic;
  119. currmusic = value;
  120. }
  121. }
  122. public static string[] musices;
  123. public static readonly Dictionary<ushort, List<string>> dicMusic = new Dictionary<ushort, List<string>>(); //ogg and sgt files have same 3 digit prefix.
  124. public static void SpriteBatchStartStencil(SamplerState ss = null) => spriteBatch.Begin(SpriteSortMode.BackToFront, BlendState.Opaque, ss, graphics.GraphicsDevice.DepthStencilState);
  125. public static void SpriteBatchStartAlpha(SamplerState ss = null, Matrix? tm = null) => spriteBatch.Begin(sortMode: SpriteSortMode.Deferred, blendState: BlendState.AlphaBlend, samplerState: ss ?? SamplerState.PointClamp, transformMatrix: tm);
  126. public static void SpriteBatchEnd() => spriteBatch.End();
  127. public static readonly BlendState blendState_BasicAdd = new BlendState()
  128. {
  129. ColorSourceBlend = Blend.SourceColor,
  130. ColorDestinationBlend = Blend.DestinationColor,
  131. ColorBlendFunction = BlendFunction.Add,
  132. AlphaSourceBlend = Blend.SourceAlpha,
  133. AlphaDestinationBlend = Blend.DestinationAlpha,
  134. AlphaBlendFunction = BlendFunction.Add
  135. };
  136. public static readonly BlendState blendState_forceDraw = new BlendState()
  137. {
  138. ColorSourceBlend = Blend.SourceColor,
  139. ColorDestinationBlend = Blend.SourceColor,
  140. ColorBlendFunction = BlendFunction.Add,
  141. AlphaSourceBlend = Blend.SourceAlpha,
  142. AlphaDestinationBlend = Blend.DestinationAlpha,
  143. AlphaBlendFunction = BlendFunction.Add,
  144. };
  145. public static int module = MODULE_OVERTURE_DEBUG;
  146. public static string FF8DIR => GameLocation.Current.DataPath;
  147. public static string FF8DIRdata { get; private set; }
  148. public static string FF8DIRdata_lang { get; private set; }
  149. public static void InitTaskMethod()
  150. {
  151. Memory.font = new Font(); //this initializes the fonts and drawing system- holds fonts in-memory
  152. Memory.Strings = new Strings();
  153. Kernel_Bin = new Kernel_bin();
  154. Memory.Cards = new Cards();
  155. Memory.Faces = new Faces();
  156. Memory.Icons = new Icons();
  157. Saves.Init(); //loads all savegames from steam or cd2000 directories. first come first serve.
  158. InitStrings();
  159. Module_main_menu_debug.Init();
  160. }
  161. public static void Init(GraphicsDeviceManager graphics, SpriteBatch spriteBatch, ContentManager content)
  162. {
  163. FF8DIRdata = Extended.GetUnixFullPath(Path.Combine(FF8DIR, "Data"));
  164. string testdir = Extended.GetUnixFullPath(Path.Combine(FF8DIRdata, "lang-en"));
  165. FF8DIRdata_lang = Directory.Exists(testdir) ? testdir : FF8DIRdata;
  166. Memory.graphics = graphics;
  167. Memory.spriteBatch = spriteBatch;
  168. Memory.content = content;
  169. Memory.FieldHolder.FieldMemory = new int[1024];
  170. FF8String.Init();
  171. InitTask = new Task(InitTaskMethod);
  172. InitTask.Start();
  173. }
  174. /// <summary>
  175. /// If true by the end of Update() will skip the next Draw()
  176. /// </summary>
  177. public static bool SuppressDraw { get; set; }
  178. public static bool IsMouseVisible { get; set; } = false;
  179. public static Saves.Data State
  180. {
  181. get => _state; set
  182. {
  183. _state = value;
  184. _state.Loadtime = Memory.gameTime.TotalGameTime;
  185. }
  186. }
  187. #region modules
  188. public const int MODULE_BATTLE = 3;
  189. public const int MODULE_FIELD = 5;
  190. public const int MODULE_FIELD_DEBUG = -5;
  191. public const int MODULE_BATTLE_DEBUG = -3;
  192. public const int MODULE_MOVIETEST = -9;
  193. public const int MODULE_OVERTURE_DEBUG = -12;
  194. public const int MODULE_MAINMENU_DEBUG = -13;
  195. public const int MODULE_WORLD_DEBUG = -17;
  196. public const int MODULE_FACE_TEST = -20;
  197. public const int MODULE_ICON_TEST = -21;
  198. public const int MODULE_CARD_TEST = -22;
  199. #endregion modules
  200. #region battleProvider
  201. /// <summary>
  202. /// Active battle encounter. Set by field or battle module. You shouldn't change it in-battle.
  203. /// </summary>
  204. public static int battle_encounter = 0;
  205. /// <summary>
  206. /// Battle music pointer. Set by SETBATTLEMUSIC in field module or by world module. Default=6
  207. /// </summary>
  208. public static int SetBattleMusic = 6;
  209. public static Init_debugger_battle.Encounter[] encounters;
  210. #endregion battleProvider
  211. #region MusicDataMidi
  212. public static Dictionary<ushort, string> Songssgt = new Dictionary<ushort, string>()
  213. {
  214. {0, "Lose" },
  215. {1, "Win" },
  216. {2, "Open" },
  217. {3, "Combat" },
  218. {4, "Run" },
  219. {5, "Battle" },
  220. {6, "Funsui" },
  221. {7, "End" },
  222. {8, "Antenna" },
  223. {9, "Waiting" },
  224. {10, "Ante " },
  225. {11, "Wind" },
  226. {12, "Crab" },
  227. {13, "Battle2" },
  228. {14, "Friend2" },
  229. {15, "Fuan2" },
  230. {16, "March2" },
  231. {17, "Land" },
  232. {18, "Julia" },
  233. {19, "Waltz" },
  234. {20, "Friend " },
  235. {21, "Dungeon" },
  236. {22, "Pianosolo" },
  237. {23, "Parade" },
  238. {24, "March1" },
  239. {25, "Secret" },
  240. {26, "Garden" },
  241. {27, "Fuan " },
  242. {28, "Polka2" },
  243. {29, "Anthem" },
  244. {30, "FlangChorus" },
  245. {31, "DubChorus" },
  246. {32, "SoloChorus" },
  247. {33, "FemaleChorus" },
  248. {34, "Chorus" },
  249. {35, "M7F5" },
  250. {36, "Sorceress" },
  251. {37, "Reet" },
  252. {38, "Soyo" },
  253. {39, "Rouka" },
  254. {40, "Night" },
  255. {41, "Field" },
  256. {42, "Guitar" },
  257. {43, "Concert" },
  258. {44, "Sea" },
  259. {45, "Silent" },
  260. {46, "Resistance" },
  261. {47, "Kaiso" },
  262. {48, "Horizon" },
  263. {49, "Master" },
  264. {50, "Battle2" },
  265. {51, "Rinoa" },
  266. {52, "Trabia" },
  267. {53, "Horizon2" },
  268. {54, "Truth" },
  269. {55, "Prison" },
  270. {56, "GalbadiaGarden" },
  271. {57, "Timber" },
  272. {58, "Galbadia " },
  273. {59, "Pinchi" },
  274. {60, "Scene1" },
  275. {61, "Pub" },
  276. {62, "Bat3" },
  277. {63, "Stage" },
  278. {64, "Choco" },
  279. {65, "White" },
  280. {66, "Majomv" },
  281. {67, "Musho" },
  282. {68, "Missile" },
  283. {69, "Speech" },
  284. {70, "Card" },
  285. {71, "Gomon" },
  286. {72, "Soto" },
  287. {73, "Majobat" },
  288. {74, "Train" },
  289. {75, "Garden2" },
  290. {76, "Bossbat2" },
  291. {77, "LastDungeon" },
  292. {78, "Gafly" },
  293. {79, "Demo" },
  294. {80, "Spy" },
  295. {81, "VoiceDeChocobo" },
  296. {82, "Salt" },
  297. {83, "Alien" },
  298. {84, "Sekichu" },
  299. {85, "Esta" },
  300. {86, "Moonmv" },
  301. {87, "Mdmotor" },
  302. {88, "Moonmv2" },
  303. {89, "Fly" },
  304. {90, "BossBat1" },
  305. {91, "Rag1" },
  306. {92, "Rag2" },
  307. {93, "LastBoss" },
  308. {94, "Lastwhite" },
  309. {95, "Lasbl" },
  310. {96, "Keisho" },
  311. {97, "Compression" },
  312. };
  313. #endregion MusicDataMidi
  314. #region MusicDataOGG
  315. public static Dictionary<ushort, FF8String> Songsogg;
  316. private static void InitStrings()
  317. {
  318. Songsogg = new Dictionary<ushort, FF8String>()
  319. {
  320. {0,"Lose" },
  321. {1,"The Winner" },
  322. {4,"Never Look Back" },
  323. {5,"Don't Be Afraid" },
  324. {7,"Dead End" },
  325. {8,"Starting Up" },
  326. {9,"Intruders" },
  327. {12,"Don't Be Afraid (X-ATM092)" },
  328. {13,"Force Your Way" },
  329. {14,"FITHOS LUSEC WECOS VINOSEC (No Intro)" },
  330. {15,"Unrest" },
  331. {16,"The Stage is Set" },
  332. {17,"The Landing" },
  333. {18,"Love Grows" },
  334. {19,"Waltz for the Moon" },
  335. {20,"Ami" },
  336. {21,"Find Your Way" },
  337. {22,"Julia" },
  338. {23,"FITHOS LUSEC WECOS VINOSEC" },
  339. {24,"SeeD" },
  340. {25,"Tell Me" },
  341. {26,"Balamb GARDEN" },
  342. {27,"Fear" },
  343. {28,"Dance with the Balamb-Fish" },
  344. {29,"Cactus Jack" },
  345. {35,"The Mission" },
  346. {36,"SUCCESSION OF WITCHES" },
  347. {41,"Blue Fields" },
  348. {42,"Breezy" },
  349. {43,"Concert" },
  350. {46,"Timber Owls" },
  351. {47,"Fragments of Memories" },
  352. {48,"Fisherman's Horizon" },
  353. {49,"Heresy" },
  354. {51,"My Mind" },
  355. {52,"Where I Belong" },
  356. {53,"Starting Up (Looped)" },
  357. {54,"Truth" },
  358. {55,"Trust Me" },
  359. {56,"Galbadia GARDEN" },
  360. {57,"Martial Law" },
  361. {58,"Under Her Control" },
  362. {59,"Only a Plank Between One and Perdition" },
  363. {60,"Junction" },
  364. {61,"Roses and Wine" },
  365. {62,"The Man with the Machine Gun" },
  366. {63,"A Sacrifice" },
  367. {64,"ODEKA ke Chocobo" },
  368. {65,"Drifting" },
  369. {66,"Wounded" },
  370. {67,"Jailed" },
  371. {68,"Retaliation" },
  372. {69,"The Oath" },
  373. {70,"Shuffle or Boogie" },
  374. {71,"Rivals" },
  375. {72,"Blue Sky" },
  376. {73,"Premonition" },
  377. {75,"Galbadia GARDEN (No Intro)" },
  378. {76,"Maybe I'm a Lion" },
  379. {77,"The Castle" },
  380. {78,"Movin'" },
  381. {79,"Overture" },
  382. {80,"The Spy" },
  383. {81,"Mods de Chocobo" },
  384. {82,"The Salt Flats" },
  385. {83,"The Residents" },
  386. {84,"Lunatic Pandora" },
  387. {85,"Silence and Motion" },
  388. {86,"Tears of the Moon" },
  389. {88,"Tears of the Moon (Alternate)" },
  390. {89,"Ride On" },
  391. {90,"The Legendary Beast" },
  392. {91,"Slide Show Part 1" },
  393. {92,"Slide Show Part 2" },
  394. {93,"The Extreme" },
  395. {96,"The Successor" },
  396. {97,"Compression of Time" },
  397. {99,"The Landing (No Intro)" },
  398. {512,"The Loser" },
  399. {513,"Eyes on Me" },
  400. {514,"Irish Jig (Concert)" },
  401. {515,"Eyes on Me (Concert)" },
  402. {516,"Movin' (No Intro)" },
  403. {517,"The Landing (Alternate)" },
  404. {518,"The Landing (Alternate - No Intro)" },
  405. {519,"Galbadia GARDEN (Alternate)" },
  406. };
  407. DrawPointMagic = new Dictionary<byte, FF8String>()
  408. {
  409. {0, "Cure - Balamb Garden courtyard"},
  410. {1, "Blizzard - Balamb Garden training center"},
  411. {2, "Full-Life - Balamb Garden MD level"},
  412. {3, "Esuna - Balamb Garden library next to the book shelf"},
  413. {4, "Demi - Balamb Garden cafeteria (only during Garden Riot)"},
  414. {5, "Bio - Balamb Garden B2 floor"},
  415. {6, "Thunder - Balamb outside junk shop"},
  416. {7, "Cure - Balamb harbor"},
  417. {8, "Fire - Fire Cavern"},
  418. {9, "Silence - Dollet town square"},
  419. {10, "Blind - Dollet Communications Tower"},
  420. {11, "Scan - Timber Pub Aurora back alley"},
  421. {12, "Cure - Timber outside the pub"},
  422. {13, "Blizzaga - Timber Maniacs Building left room"},
  423. {14, "Haste - Galbadia Garden lobby"},
  424. {15, "Life - Galbadia Garden changing rooms"},
  425. {16, "Shell - Galbadia Garden courtyard"},
  426. {17, "Protect - Galbadia Garden ice rink"},
  427. {18, "Double - Galbadia Garden auditorium"},
  428. {19, "Aura - Outside Galbadia Garden during Garden war"},
  429. {20, "Cure - Timber forests in a Laguna dream"},
  430. {21, "Water - Timber forests in a Laguna dream"},
  431. {22, "Thundara - Deling City park"},
  432. {23, "Zombie - Deling City Sewers"},
  433. {24, "Esuna - Deling City Sewers"},
  434. {25, "Bio - Deling City Sewers"},
  435. {26, "Fira"},
  436. {27, "Berserk - D-District Prison Floor 9 - right cell"},
  437. {28, "Thundaga - D-District Prison Floor 11 - right cell"},
  438. {29, "Aero - Outside D-District Prison"},
  439. {30, "Blizzara - Missile Base - control room"},
  440. {31, "Blind - Missile Base room with G-Soldiers who ask to deliver a message"},
  441. {32, "Full-Life - Missile Base - silo room"},
  442. {33, "Drain - Winhill road south from town square"},
  443. {34, "Dispel - Winhill town square"},
  444. {35, "Curaga - Winhill Laguna's room in the dream"},
  445. {36, "Reflect - Winhill east road"},
  446. {37, "Protect - Tomb of the Unknown King - outside"},
  447. {38, "Float - Tomb of the Unknown King - north room"},
  448. {39, "Cura - Tomb of the Unknown King - east room"},
  449. {40, "Haste - Fishermans Horizon abandoned train station"},
  450. {41, "Shell - Fishermans Horizon junk shop"},
  451. {42, "Regen - Fishermans Horizon overlooking the sun panel"},
  452. {43, "Full-Life - Fishermans Horizon Master Fisherman's fishing spot"},
  453. {44, "Ultima - Fishermans Horizon mayor's house"},
  454. {45, "Thundaga - Great Salt Lake past the dinosaur skeleton"},
  455. {46, "Meteor - Great Salt Lake dinosaur skeleton"},
  456. {47, "Curaga - Esthar city streets near city entrance"},
  457. {48, "Blizzard - Esthar outside palace"},
  458. {49, "Quake - Esthar outside Odine's Lab"},
  459. {50, "Tornado - Esthar shopping mall"},
  460. {51, "Double - Esthar Odine's Lab in a Laguna dream"},
  461. {52, "Pain"},
  462. {53, "Flare - Esthar Odine's Lab in a Laguna dream"},
  463. {54, "Stop - Sorceress Memorial"},
  464. {55, "Stop"},
  465. {56, "Life - Tears' Point entrance"},
  466. {57, "Reflect - Tears' Point middle"},
  467. {58, "Death - Lunatic Pandora Laboratory in a Laguna dream"},
  468. {59, "Holy - Lunatic Pandora near Elevator #1"},
  469. {60, "Silence - Lunatic Pandora"},
  470. {61, "Ultima - Lunatic Pandora"},
  471. {62, "Confuse"},
  472. {63, "Break - Lunatic Pandora on the way to fight Adel"},
  473. {64, "Meteor - Lunatic Pandora entrance"},
  474. {65, "Curaga - Lunatic Pandora elevator room"},
  475. {66, "Slow"},
  476. {67, "Curaga - Edea's Orphanage"},
  477. {68, "Flare"},
  478. {69, "Holy"},
  479. {70, "Sleep - Centra Excavation Site"},
  480. {71, "Confuse - Centra Excavation Site"},
  481. {72, "Aero - Centra Ruins right ladder after the lift"},
  482. {73, "Drain - Centra Ruins platform after the first staircase"},
  483. {74, "Pain - Centra Ruins next to the dome"},
  484. {75, "Thundaga - Trabia Garden in front of the statue"},
  485. {76, "Zombie - Trabia Garden cemetery"},
  486. {77, "Aura - Trabia Garden stage"},
  487. {78, "Ultima - Shumi Village - above ground"},
  488. {79, "Blizzaga - Shumi Village - outside elder's house"},
  489. {80, "Firaga - Shumi Village workshop"},
  490. {81, "Tornado"},
  491. {82, "Holy - White SeeD Ship"},
  492. {83, "Cura - Ragnarok room with a red Propagator"},
  493. {84, "Life - Ragnarok hangar upstairs"},
  494. {85, "Full-Life - Ragnarok room with save point"},
  495. {86, "Dispel - Deep Sea Research Center second level"},
  496. {87, "Esuna - Deep Sea Research Center secret room"},
  497. {88, "Triple - Deep Sea Research Center third screen on the way to Ultima Weapon's lair"},
  498. {89, "Ultima - Deep Sea Research Center fifth screen on the way to Ultima Weapon's lair"},
  499. {90, "Meltdown - Lunar Base room before the escape pods"},
  500. {91, "Meteor - Lunar Base Ellone's room"},
  501. {92, "Haste"},
  502. {93, "Slow"},
  503. {94, "Curaga"},
  504. {95, "Life"},
  505. {96, "Stop"},
  506. {97, "Regen"},
  507. {98, "Double"},
  508. {99, "Triple"},
  509. {100, "Flare - Ultimecia Castle outside"},
  510. {101, "Curaga - Ultimecia Castle storage room"},
  511. {102, "Cura - Ultimecia Castle passageway"},
  512. {103, "Scan"},
  513. {104, "Esuna"},
  514. {105, "Slow - Ultimecia Castle courtyard"},
  515. {106, "Dispel - Ultimecia Castle chapel"},
  516. {107, "Stop - Ultimecia Castle clock tower"},
  517. {108, "Life"},
  518. {109, "Flare"},
  519. {110, "Aura - Ultimecia Castle wine cellar"},
  520. {111, "Holy - Ultimecia Castle treasure room"},
  521. {112, "Meteor"},
  522. {113, "Meltdown - Ultimecia Castle art gallery"},
  523. {114, "Ultima - Ultimecia Castle armory"},
  524. {115, "Full-Life - Ultimecia Castle prison"},
  525. {116, "Triple"},
  526. {117, "Fire"},
  527. {118, "Fire"},
  528. {119, "Fire"},
  529. {120, "Fire"},
  530. {121, "Fire"},
  531. {122, "Fire"},
  532. {123, "Fire"},
  533. {124, "Fire"},
  534. {125, "Fire"},
  535. {126, "Fire"},
  536. {127, "Fire"},
  537. {128, "Cure"},
  538. {129, "Esuna"},
  539. {130, "Thunder"},
  540. {131, "Fira"},
  541. {132, "Thundara"},
  542. {133, "Blizzara"},
  543. {134, "Blizzard"},
  544. {135, "Fire"},
  545. {136, "Cure"},
  546. {137, "Water"},
  547. {138, "Cura"},
  548. {139, "Esuna"},
  549. {140, "Scan"},
  550. {141, "Shell"},
  551. {142, "Haste"},
  552. {143, "Aero"},
  553. {144, "Bio"},
  554. {145, "Life"},
  555. {146, "Demi"},
  556. {147, "Protect"},
  557. {148, "Holy"},
  558. {149, "Thundaga"},
  559. {150, "Stop"},
  560. {151, "Firaga"},
  561. {152, "Regen"},
  562. {153, "Blizzaga"},
  563. {154, "Confuse"},
  564. {155, "Flare"},
  565. {156, "Dispel"},
  566. {157, "Slow"},
  567. {158, "Quake"},
  568. {159, "Curaga"},
  569. {160, "Tornado"},
  570. {161, "Full-Life"},
  571. {162, "Reflect"},
  572. {163, "Aura"},
  573. {164, "Quake"},
  574. {165, "Double"},
  575. {166, "Break"},
  576. {167, "Meteor"},
  577. {168, "Ultima"},
  578. {169, "Triple"},
  579. {170, "Confuse"},
  580. {171, "Blind"},
  581. {172, "Quake"},
  582. {173, "Sleep"},
  583. {174, "Silence"},
  584. {175, "Flare"},
  585. {176, "Death"},
  586. {177, "Drain"},
  587. {178, "Pain"},
  588. {179, "Berserk"},
  589. {180, "Float"},
  590. {181, "Zombie"},
  591. {182, "Meltdown"},
  592. {183, "Ultima"},
  593. {184, "Tornado"},
  594. {185, "Quake"},
  595. {186, "Meteor"},
  596. {187, "Holy"},
  597. {188, "Flare"},
  598. {189, "Aura"},
  599. {190, "Ultima"},
  600. {191, "Triple"},
  601. {192, "Full-Life"},
  602. {193, "Tornado"},
  603. {194, "Quake"},
  604. {195, "Meteor"},
  605. {196, "Holy"},
  606. {197, "Flare"},
  607. {198, "Aura"},
  608. {199, "Ultima"},
  609. {200, "Triple"},
  610. {201, "Full-Life"},
  611. {202, "Tornado"},
  612. {203, "Quake"},
  613. {204, "Meteor"},
  614. {205, "Holy"},
  615. {206, "Flare"},
  616. {207, "Aura"},
  617. {208, "Ultima"},
  618. {209, "Triple"},
  619. {210, "Full-Life"},
  620. {211, "Ultima"},
  621. {212, "Meteor"},
  622. {213, "Holy"},
  623. {214, "Flare"},
  624. {215, "Aura"},
  625. {216, "Ultima"},
  626. {217, "Triple"},
  627. {218, "Full-Life"},
  628. {219, "Meteor"},
  629. {220, "Holy"},
  630. {221, "Triple"},
  631. {222, "Aura"},
  632. {223, "Ultima"},
  633. {224, "Triple"},
  634. {225, "Full-Life"},
  635. {226, "Meteor"},
  636. {227, "Holy"},
  637. {228, "Flare"},
  638. {229, "Aura"},
  639. {230, "Ultima"},
  640. {231, "Triple"},
  641. {232, "Full-Life"},
  642. {233, "Meteor"},
  643. {234, "Triple"},
  644. {235, "Flare"},
  645. {236, "Aura"},
  646. {237, "Ultima"},
  647. {238, "Triple"},
  648. {239, "Full-Life"},
  649. {240, "Meteor"},
  650. {241, "Holy"},
  651. {242, "Flare"},
  652. {243, "Aura"},
  653. {244, "Ultima"},
  654. {245, "Blizzard"},
  655. {246, "Cure"},
  656. {247, "Dispel"},
  657. {248, "Confuse"},
  658. {249, "Meteor"},
  659. {250, "Double"},
  660. {251, "Aura"},
  661. {252, "Holy"},
  662. {253, "Flare"},
  663. {254, "Ultima"},
  664. {255, "Scan"}
  665. };
  666. }
  667. #endregion MusicDataOGG
  668. #region DrawPointMagic
  669. public static Dictionary<byte, FF8String> DrawPointMagic;
  670. public static Random random;
  671. #endregion DrawPointMagic
  672. public static class Archives
  673. {
  674. public static string A_BATTLE = Extended.GetUnixFullPath(Path.Combine(FF8DIRdata_lang, "battle"));
  675. public static string A_FIELD = Extended.GetUnixFullPath(Path.Combine(FF8DIRdata_lang, "field"));
  676. public static string A_MAGIC = Extended.GetUnixFullPath(Path.Combine(FF8DIRdata_lang, "magic"));
  677. public static string A_MAIN = Extended.GetUnixFullPath(Path.Combine(FF8DIRdata_lang, "main"));
  678. public static string A_MENU = Extended.GetUnixFullPath(Path.Combine(FF8DIRdata_lang, "menu"));
  679. public static string A_WORLD = Extended.GetUnixFullPath(Path.Combine(FF8DIRdata_lang, "world"));
  680. public const string B_FileList = ".fl";
  681. public const string B_FileIndex = ".fi";
  682. public const string B_FileArchive = ".fs";
  683. }
  684. public static class FieldHolder
  685. {
  686. //public static string[] MapList;
  687. public static ushort FieldID = 161;
  688. public static string[] fields;
  689. public static int[] FieldMemory;
  690. }
  691. }
  692. }