Memory.cs 26 KB

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