Advertisement
Guest User

Untitled

a guest
Jan 21st, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.73 KB | None | 0 0
  1. void RandomizationOptionMenu(){
  2. int SubscreenShift = -54;
  3. int XLoc = 16;
  4. int Indent = 8;
  5. int ItemState = 3;
  6. int CharacterState = 0;
  7. if(GetCharacterFromFilename() != -1)
  8. CharacterState = 3;
  9. int CurrentChar = 0;
  10. int Textshift = 16;
  11. bool StoryModeSwitch = true;
  12. int Seed1[] = "Seed:";
  13. int Dash[] = "-";
  14. int Seed2[] = "SecondSeed:";
  15. int StartingItem[] = "Starting Spell:";
  16. int CharacterSelection[] = "Character Selection";
  17. int UnmaskCharacter[] = "Unmask";
  18. int Sound[] = "Sound Wave";
  19. int Wind[] = "Wind";
  20. int Magic[] = "Magic Stream";
  21. int RandItem[] = "Randomize";
  22. int SeedPick[] = "Pick from Seed";
  23. int RandPick[] = "Pick Randomly";
  24. int Choose[] = "Pick manually";
  25. int Name[] = "Pick from file name";
  26. int StoryMode[] = "Story Mode:";
  27. int On[] = "On";
  28. int Off[] = "Off";
  29. int Start[] = "Start!";
  30. int Outfit[] = "Outfit";
  31. int Normal[] = "Normal";
  32. int Summer[] = "Beachtime";
  33. int Snow[] = "Snowsuit";
  34. int Olsov[] = "Olsov";
  35. int Gaius[] = "Gaius";
  36. int Soccer[] = "Soccer Uniform";
  37. int Blood[] = "Blood";
  38. bool OutfitOption = false;
  39. int OutfitState = 0;
  40. int MaxOutfit = 0;
  41. int CurrentCharBackup =0;
  42. int CursorPosition = 0; //0 = seed, 1 = Starting Item, 2 = story mode, 3 = characterselect, 4 = unmask, 5 = outfit, 6 = start
  43. bool DisableUp = false;
  44. int StoryModeArray[] = {1,1,1, 1,1,1, 1,1,1, 1,1,1, 0,1,0, 0,0,0, 1,0,1, 0, 1,1,1, 0, 0,0,0,0, 1, 0,1,1,0,0, 0,1,1};
  45. int CursorOffset = -1;
  46. int SeedEntryState = 0;
  47. RAND_FLAGS[RF_SEED_RANDOMIZED] = 1;
  48. int OldX;
  49. int OldY;
  50. int APromptXOffset = -16;
  51. int APromptYOffset = -4;
  52. while(true){
  53. if(CurrentChar != 0){
  54. DrawCharacterInfo(CurrentChar); //The bio and stuff off to the right
  55. }
  56. else{
  57. Tango_ClearSlot(0);
  58. Tango_ClearSlot(1);
  59. Tango_ClearSlot(2);
  60. }
  61.  
  62. Screen->DrawString(2, XLoc, 0 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x0A, -1, TF_NORMAL, Seed1, OP_OPAQUE);
  63. Screen->DrawInteger(2, XLoc + Indent, 10 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, -1, -1, RAND_FLAGS[RF_SEED1], 0, OP_OPAQUE);
  64. Screen->DrawString(2, XLoc+Indent+16, 10 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Dash, OP_OPAQUE);
  65. Screen->DrawInteger(2, XLoc + Indent + 24, 10 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, -1, -1, RAND_FLAGS[RF_SEED2], 0, OP_OPAQUE);
  66.  
  67. // Screen->DrawString(2, XLoc, 30 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x0A, -1, TF_NORMAL, Seed2, OP_OPAQUE);
  68. // Screen->DrawInteger(2, XLoc + Indent, 40 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, -1, -1, RAND_FLAGS[RF_SEED1], 0, OP_OPAQUE);
  69.  
  70. Screen->DrawString(2, XLoc, 30 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x0A, -1, TF_NORMAL, StartingItem, OP_OPAQUE);
  71. if(ItemState == 0)
  72. Screen->DrawString(2, XLoc + Indent, 40 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Sound, OP_OPAQUE);
  73. else if(ItemState == 1)
  74. Screen->DrawString(2, XLoc + Indent, 40 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Wind, OP_OPAQUE);
  75. else if(ItemState == 2)
  76. Screen->DrawString(2, XLoc + Indent, 40 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Magic, OP_OPAQUE);
  77. else if(ItemState == 3)
  78. Screen->DrawString(2, XLoc + Indent, 40 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, RandItem, OP_OPAQUE);
  79.  
  80. Screen->DrawString(2, XLoc, 60 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x0A, -1, TF_NORMAL, StoryMode, OP_OPAQUE);
  81. if(StoryModeSwitch == true)
  82. Screen->DrawString(2, XLoc + Indent, 70 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, On, OP_OPAQUE);
  83. else
  84. Screen->DrawString(2, XLoc + Indent, 70 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Off, OP_OPAQUE);
  85.  
  86. Screen->DrawString(2, XLoc, 90 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x0A, -1, TF_NORMAL, CharacterSelection, OP_OPAQUE);
  87. if(CharacterState == 0)
  88. Screen->DrawString(2, XLoc + Indent, 100 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, SeedPick, OP_OPAQUE);
  89. else if(CharacterState == 1)
  90. Screen->DrawString(2, XLoc + Indent, 100 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, RandPick, OP_OPAQUE);
  91. else if(CharacterState == 2)
  92. Screen->DrawString(2, XLoc + Indent, 100 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Choose, OP_OPAQUE);
  93. else if(CharacterState == 3)
  94. Screen->DrawString(2, XLoc + Indent, 100 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Name, OP_OPAQUE);
  95.  
  96. Screen->DrawTile(2, XLoc + Indent, 110 + SubscreenShift + Textshift, 8697, 2, 2, 7, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE);
  97. if(CurrentChar == 0)
  98. Screen->DrawTile(2, XLoc + Indent + 5, 110 + SubscreenShift + Textshift + 5, 10360, 1, 1, 11, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE);
  99. else if(OutfitState == 0){
  100. if(CurrentChar == 14) //Exception for Sasic
  101. Screen->DrawCombo(2, XLoc + Indent + 5, 110 + SubscreenShift + Textshift + 4, 4107, 1, 1, CharactersCSets[CurrentChar], -1, -1, 0, 0, 0, 0, 0, true, OP_OPAQUE);
  102. else
  103. Screen->DrawCombo(2, XLoc + Indent + 5, 110 + SubscreenShift + Textshift + 4, Characters[CurrentChar], 1, 1, CharactersCSets[CurrentChar], -1, -1, 0, 0, 0, 0, 0, true, OP_OPAQUE);
  104. }
  105. Screen->DrawString(2, XLoc + Indent, 140 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, UnmaskCharacter, OP_OPAQUE);
  106.  
  107. if(OutfitOption){
  108. Screen->DrawString(2, XLoc, 150 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x0A, -1, TF_NORMAL, Outfit, OP_OPAQUE);
  109. Screen->DrawString(2, XLoc+18, 186 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x88, -1, TF_NORMAL, Start, OP_OPAQUE);
  110. }
  111. else
  112. Screen->DrawString(2, XLoc+18, 166 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x88, -1, TF_NORMAL, Start, OP_OPAQUE);
  113.  
  114. if(Link->PressUp && !DisableUp){
  115. Game->PlaySound(5);
  116. if(CursorPosition == 0)
  117. CursorPosition = 6;
  118. else if(CursorPosition == 6 && !OutfitOption)
  119. CursorPosition = 4;
  120. else
  121. CursorPosition--;
  122. }
  123. if(Link->PressDown && !DisableUp){
  124. Game->PlaySound(5);
  125. if(CursorPosition == 6)
  126. CursorPosition = 0;
  127. else if(CursorPosition == 4 && !OutfitOption)
  128. CursorPosition = 6;
  129. else
  130. CursorPosition++;
  131. }
  132. if(CursorPosition == 0){ //Seed
  133. //Put stuff for changing seed here
  134. if(!DisableUp)
  135. Screen->FastCombo(4, XLoc + APromptXOffset, 10 + SubscreenShift + Textshift + CursorOffset + APromptYOffset, 4021, 7, OP_OPAQUE);
  136. else{
  137. if(SeedEntryState == 1){
  138. Screen->DrawTile(3, XLoc, 10 + SubscreenShift + Textshift + CursorOffset, 1536, 1, 1, 4, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE); //Cursor
  139. if(Link->PressUp){
  140. RAND_FLAGS[RF_SEED1]++;
  141. }
  142. if(Link->PressDown){
  143. RAND_FLAGS[RF_SEED1]--;
  144. }
  145. if(Link->PressLeft)
  146. RAND_FLAGS[RF_SEED1]-=10;
  147. if(Link->PressRight)
  148. RAND_FLAGS[RF_SEED1]+=10;
  149. if(RAND_FLAGS[RF_SEED1]>255)
  150. RAND_FLAGS[RF_SEED1]=0;
  151. if(RAND_FLAGS[RF_SEED1]<0)
  152. RAND_FLAGS[RF_SEED1]=255;
  153. if(Link->PressA){
  154. Game->PlaySound(5);
  155. SeedEntryState = 2;
  156. Screen->D[2] = 1;
  157. }
  158. }
  159. if(SeedEntryState == 2 && Screen->D[2] == 0){
  160. Screen->DrawTile(3, XLoc + 24, 10 + SubscreenShift + Textshift + CursorOffset, 1536, 1, 1, 4, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE); //Cursor
  161. if(Link->PressUp){
  162. RAND_FLAGS[RF_SEED2]++;
  163. }
  164. if(Link->PressDown){
  165. RAND_FLAGS[RF_SEED2]--;
  166. }
  167. if(Link->PressLeft)
  168. RAND_FLAGS[RF_SEED2]-=10;
  169. if(Link->PressRight)
  170. RAND_FLAGS[RF_SEED2]+=10;
  171. if(RAND_FLAGS[RF_SEED2]>255)
  172. RAND_FLAGS[RF_SEED2]=0;
  173. if(RAND_FLAGS[RF_SEED2]<0)
  174. RAND_FLAGS[RF_SEED2]=255;
  175. if(Link->PressA){
  176. Game->PlaySound(5);
  177. Screen->D[2] = 1;
  178. if(NewRandomizationCore() == 1){
  179. Screen->Message(2188);
  180. Waitframe();
  181. SeedEntryState = 0;
  182. RAND_FLAGS[RF_SEED1] = OldX;
  183. RAND_FLAGS[RF_SEED2] = OldY;
  184. DisableUp = false;
  185. }
  186. else{
  187. SeedEntryState = 0;
  188. DisableUp = false;
  189. OldX = RAND_FLAGS[RF_SEED1];
  190. OldY = RAND_FLAGS[RF_SEED2];
  191. }
  192. }
  193. }
  194. }
  195. if(SeedEntryState == 0){
  196. Screen->DrawTile(3, XLoc, 10 + SubscreenShift + Textshift + CursorOffset, 1536, 1, 1, 4, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE); //Cursor
  197. }
  198. if(Link->PressA && Screen->D[2] == 0){
  199. Game->PlaySound(5);
  200. DisableUp = true;
  201. SeedEntryState = 1;
  202. CurrentChar = 0; //Hide the character
  203. Screen->D[1] = 0; //Reset the choice
  204. OldX = RAND_FLAGS[RF_SEED1];
  205. OldY = RAND_FLAGS[RF_SEED2];
  206. for(int i = 0; i<SizeOfArray(ItemRandomizationArray); i++){
  207. ItemRandomizationArray[i] = 0;
  208. }
  209. for(int i = 0; i<SizeOfArray(ItemArray); i++){
  210. ItemArray[i] = 0;
  211. }
  212. }
  213.  
  214. }
  215. if(CursorPosition == 1){ //Starting Item
  216. Screen->DrawTile(3, XLoc, 40 + SubscreenShift + Textshift + CursorOffset, 1536, 1, 1, 4, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE); //Cursor
  217. if(Link->PressLeft){
  218. Game->PlaySound(5);
  219. if(ItemState == 0)
  220. ItemState = 3;
  221. else
  222. ItemState--;
  223. }
  224. if(Link->PressRight){
  225. Game->PlaySound(5);
  226. if(ItemState == 3)
  227. ItemState = 0;
  228. else
  229. ItemState++;
  230. }
  231. }
  232. if(CursorPosition == 2){ //StoryMode
  233. Screen->DrawTile(3, XLoc, 70 + SubscreenShift + Textshift + CursorOffset, 1536, 1, 1, 4, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE); //Cursor
  234. if(Link->PressLeft || Link->PressRight){
  235. Game->PlaySound(5);
  236. if(StoryModeSwitch == false){
  237. StoryModeSwitch = true;
  238. if(CurrentChar >0){
  239. if(StoryModeArray[CurrentChar-1] == 0){ //We just turned story mode on and this character lacks a story mode
  240. CurrentChar = 0; //Hide the character
  241. Screen->D[1] = 0; //Reset the choice
  242. }
  243. }
  244. }
  245. else
  246. StoryModeSwitch = false;
  247. }
  248. }
  249. if(CursorPosition == 3){ //Character
  250. Screen->DrawTile(3, XLoc, 100 + SubscreenShift + Textshift + CursorOffset, 1536, 1, 1, 4, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE); //Cursor
  251. if(Link->PressLeft){
  252. CurrentChar = 0; //Hide the character
  253. OutfitState = 0;
  254. OutfitOption = false;
  255. RAND_FLAGS[RF_TRUE_RANDOMIZED_CHARACTER_STORY_BACKUP] = 0;
  256. RAND_FLAGS[RF_TRUE_RANDOMIZED_CHARACTER] = 0;
  257. Screen->D[1] = 0;
  258. Game->PlaySound(5);
  259. if(CharacterState == 0)
  260. CharacterState = 3;
  261. else
  262. CharacterState--;
  263. }
  264. if(Link->PressRight){
  265. CurrentChar = 0; //Hide the character
  266. OutfitState = 0;
  267. OutfitOption = false;
  268. RAND_FLAGS[RF_TRUE_RANDOMIZED_CHARACTER_STORY_BACKUP] = 0;
  269. RAND_FLAGS[RF_TRUE_RANDOMIZED_CHARACTER] = 0;
  270. Screen->D[1] = 0;
  271. Game->PlaySound(5);
  272. if(CharacterState == 3)
  273. CharacterState = 0;
  274. else
  275. CharacterState++;
  276. }
  277. if(CharacterState == 2){ //Choose
  278. if(CurrentChar == 0)
  279. DisableUp = true;
  280. else
  281. DisableUp = false;
  282. Screen->FastCombo(4, XLoc + APromptXOffset, 100 + SubscreenShift + Textshift + CursorOffset + APromptYOffset, 4021, 7, OP_OPAQUE);
  283. if(Link->PressA){
  284. Game->PlaySound(67);
  285. CurrentCharBackup = CurrentChar;
  286. //CurrentChar = CharacterSelect();
  287. Screen->D[0] = 1;
  288. Waitframe();
  289. RunFFCScript(264,0);
  290. }
  291. }
  292. else
  293. DisableUp = false;
  294. }
  295. if(CursorPosition == 4){ //Unmask
  296. Screen->DrawTile(3, XLoc, 140 + SubscreenShift + Textshift + CursorOffset, 1536, 1, 1, 4, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE); //Cursor
  297. Screen->FastCombo(4, XLoc + APromptXOffset, 140 + SubscreenShift + Textshift + CursorOffset + APromptYOffset, 4021, 7, OP_OPAQUE);
  298. if(Link->PressA && CharacterState != 2){
  299. Game->PlaySound(67);
  300. if(CharacterState == 0){ //Pick from seed
  301. if(StoryModeSwitch == true)
  302. CurrentChar = RAND_FLAGS[RF_CHARACTER_STORY_BACKUP];
  303. else
  304. CurrentChar = RAND_FLAGS[RF_CHARACTER];
  305. }
  306. else if(CharacterState == 1){ //Pick randomly
  307. int CharacterSelected;
  308. if(StoryModeSwitch == true){
  309. do{
  310. RAND_FLAGS[RF_TRUE_RANDOMIZED_CHARACTER_STORY_BACKUP] = srand(1,39);
  311. CharacterSelected = RAND_FLAGS[RF_TRUE_RANDOMIZED_CHARACTER_STORY_BACKUP];
  312. }
  313. while(StoryModeArray[CharacterSelected-1] == 0);
  314. CurrentChar = RAND_FLAGS[RF_TRUE_RANDOMIZED_CHARACTER_STORY_BACKUP];
  315. }
  316. else{
  317. do{
  318. RAND_FLAGS[RF_TRUE_RANDOMIZED_CHARACTER] = srand(1,39);
  319. CharacterSelected = RAND_FLAGS[RF_TRUE_RANDOMIZED_CHARACTER];
  320. }
  321. while(CharacterSelected == 22 || CharacterSelected == 16 || CharacterSelected == 17 || CharacterSelected == 18); //No selecting a Reikon character randomly
  322. CurrentChar = RAND_FLAGS[RF_TRUE_RANDOMIZED_CHARACTER];
  323. }
  324. }
  325. else if(CharacterState == 3){ //Pick from file name
  326. CurrentChar = GetCharacterFromFilename();
  327. if(CurrentChar == 0)
  328. Game->PlaySound(6);
  329. }
  330. }
  331. }
  332. if(CursorPosition == 5){ //Outfit
  333. Screen->DrawTile(3, XLoc, 160 + SubscreenShift + Textshift + CursorOffset, 1536, 1, 1, 4, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE); //Cursor
  334. if(Link->PressRight){
  335. Game->PlaySound(5);
  336. if(OutfitState == MaxOutfit)
  337. OutfitState = 0;
  338. else
  339. OutfitState++;
  340. }
  341. if(Link->PressLeft){
  342. Game->PlaySound(5);
  343. if(OutfitState == 0)
  344. OutfitState = MaxOutfit;
  345. else
  346. OutfitState--;
  347. }
  348. }
  349. if(CursorPosition == 6){ //Start
  350. if(!OutfitOption)
  351. Screen->DrawTile(3, XLoc-Indent+18, 166 + SubscreenShift + Textshift + CursorOffset, 1536, 1, 1, 4, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE); //Cursor
  352. else
  353. Screen->DrawTile(3, XLoc-Indent+18, 186 + SubscreenShift + Textshift + CursorOffset, 1536, 1, 1, 4, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE); //Cursor
  354. if(Link->PressA || Link->PressStart){
  355. //Pick starting items.
  356. if(ItemState == 0)
  357. RAND_FLAGS[RF_STARTING_ITEM] = 1; //Start with sound
  358. else if(ItemState == 1)
  359. RAND_FLAGS[RF_STARTING_ITEM] = 0; //Start with wind
  360. else if(ItemState == 2)
  361. RAND_FLAGS[RF_STARTING_ITEM] = 2; //Start with magic stream
  362. if(ItemState == 3)
  363. RAND_FLAGS[RF_STARTING_ITEM] = srand(0,2); //Wind vs Sound vs Magic Steam, randomized regardless of pick to ensure next srand call works. 0 is wind start, 1 is sound start, 2 is magic steam start.
  364. else
  365. int dummy = srand(0,2); //Calling this here just to make sure the srands are consistent.
  366. RAND_FLAGS[RF_STARTING_ITEM_RANDOMIZED] = 0; //This is just set this way to make sure my older system always spawns RF_STARTING_ITEM.
  367. //Pick Story Mode.
  368. if(StoryModeSwitch == true)
  369. RAND_FLAGS[RF_STORY_MODE_ON] = 1;
  370. else
  371. RAND_FLAGS[RF_STORY_MODE_ON] = 0;
  372. //Pick Character.
  373. if(CurrentChar == 0){ //Character has not been unmasked yet
  374. if(CharacterState == 0){ //Pick from seed
  375. if(StoryModeSwitch == true)
  376. CurrentChar = RAND_FLAGS[RF_CHARACTER_STORY_BACKUP];
  377. else
  378. CurrentChar = RAND_FLAGS[RF_CHARACTER];
  379. }
  380. else if(CharacterState == 1){ //Pick Randomly
  381. int CharacterSelected;
  382. if(StoryModeSwitch == true){
  383. do{
  384. RAND_FLAGS[RF_TRUE_RANDOMIZED_CHARACTER_STORY_BACKUP] = srand(1,39);
  385. CharacterSelected = RAND_FLAGS[RF_TRUE_RANDOMIZED_CHARACTER_STORY_BACKUP];
  386. }
  387. while(StoryModeArray[CharacterSelected-1] == 0);
  388. CurrentChar = RAND_FLAGS[RF_TRUE_RANDOMIZED_CHARACTER_STORY_BACKUP];
  389. }
  390. else{
  391. do{
  392. RAND_FLAGS[RF_TRUE_RANDOMIZED_CHARACTER] = srand(1,39);
  393. CharacterSelected = RAND_FLAGS[RF_TRUE_RANDOMIZED_CHARACTER];
  394. }
  395. while(CharacterSelected == 22 || CharacterSelected == 16 || CharacterSelected == 17 || CharacterSelected == 18); //No selecting a Reikon character randomly
  396. CurrentChar = RAND_FLAGS[RF_TRUE_RANDOMIZED_CHARACTER];
  397. }
  398. }
  399. else if(CharacterState == 3){ //Pick from file name
  400. CurrentChar = GetCharacterFromFilename();
  401. if(CurrentChar == 0){ //Filename is not valid, so time to pick from the seed instead
  402. if(StoryModeSwitch == true)
  403. CurrentChar = RAND_FLAGS[RF_CHARACTER_STORY_BACKUP];
  404. else
  405. CurrentChar = RAND_FLAGS[RF_CHARACTER];
  406. }
  407. if(CurrentChar >0){
  408. if(StoryModeArray[CurrentChar-1] == 0){ //That character doesn't have a story mode
  409. RAND_FLAGS[RF_STORY_MODE_ON] = 0;
  410. }
  411. }
  412. }
  413. }
  414. if(CurrentChar > 0){ //Character has now been unmasked
  415. int ring;
  416. if(CurrentChar == 1)
  417. ring = RHONE_RING;
  418. if(CurrentChar == 2)
  419. ring = SEINE_RING;
  420. if(CurrentChar == 3)
  421. ring = LOIRE_RING;
  422. if(CurrentChar == 4)
  423. ring = HITO_RING;
  424. if(CurrentChar == 5)
  425. ring = JACK_RING;
  426. if(CurrentChar == 6)
  427. ring = WILL_RING;
  428. if(CurrentChar == 7)
  429. ring = NAIYA_RING;
  430. if(CurrentChar == 8)
  431. ring = JANDRA_RING;
  432. if(CurrentChar == 9)
  433. ring = TYRE_RING;
  434. if(CurrentChar == 10)
  435. ring = EMILY_RING;
  436. if(CurrentChar == 11)
  437. ring = LUCAS_RING;
  438. if(CurrentChar == 12)
  439. ring = CAELAN_RING;
  440. if(CurrentChar == 13)
  441. ring = FLECT_RING;
  442. if(CurrentChar == 14){
  443. if(OutfitState == 0)
  444. ring = SASIC_RING;
  445. if(OutfitState == 1)
  446. ring = SASIC_RING_2;
  447. if(OutfitState == 2)
  448. ring = SASIC_RING_3;
  449. }
  450. if(CurrentChar == 15)
  451. ring = ZELDA_RING;
  452. if(CurrentChar == 16)
  453. ring = HOLM_RING;
  454. if(CurrentChar == 17)
  455. ring = MIRR_RING;
  456. if(CurrentChar == 18)
  457. ring = HART_RING;
  458. if(CurrentChar == 19)
  459. ring = BASTILLE_RING;
  460. if(CurrentChar == 20)
  461. ring = CHAINED_RING;
  462. if(CurrentChar == 21)
  463. ring = HORIZON_RING;
  464. if(CurrentChar == 22)
  465. ring = VANICE_RING;
  466. if(CurrentChar == 23)
  467. ring = VEN_RING;
  468. if(CurrentChar == 24)
  469. ring = WAN_RING;
  470. if(CurrentChar == 25)
  471. ring = SUE_RING;
  472. if(CurrentChar == 26)
  473. ring = GALE_RING;
  474. if(CurrentChar == 27)
  475. ring = CALAIS_RING;
  476. if(CurrentChar == 28)
  477. ring = ZEPHYR_RING;
  478. if(CurrentChar == 29)
  479. ring = NOTOS_RING;
  480. if(CurrentChar == 30)
  481. ring = BOREAS_RING;
  482. if(CurrentChar == 31)
  483. ring = AUTIMECIA_RING;
  484. if(CurrentChar == 32)
  485. ring = QUINN_RING;
  486. if(CurrentChar == 33)
  487. ring = MATO_RING;
  488. if(CurrentChar == 34){
  489. if(OutfitState == 1)
  490. ring = MILES_RING_2;
  491. else
  492. ring = MILES_RING;
  493. }
  494. if(CurrentChar == 35)
  495. ring = KAVERI_RING;
  496. if(CurrentChar == 36)
  497. ring = AVA_RING;
  498. if(CurrentChar == 37)
  499. ring = XAYA_RING;
  500. if(CurrentChar == 38)
  501. ring = DRACUS_RING;
  502. if(CurrentChar == 39)
  503. ring = LUMEN_RING;
  504. Link->Item[ring] = true;
  505. }
  506. //Outfit
  507. G[G_OUTFIT] = OutfitState;
  508. OutfitCopyTile();
  509. //Autimecia Items
  510. if(Rand(1,28) <=4)
  511. RAND_FLAGS[6] = Choose(72,10,119,70);
  512. else
  513. RAND_FLAGS[6] = Rand(204,227);
  514. do{
  515. if(Rand(1,28) <=4)
  516. RAND_FLAGS[7] = Choose(72,10,119,70);
  517. else
  518. RAND_FLAGS[7] = Rand(204,227);
  519. }
  520. while(RAND_FLAGS[7] == RAND_FLAGS[6]);
  521. do{
  522. if(Rand(1,28) <=4)
  523. RAND_FLAGS[8] = Choose(72,10,119,70);
  524. else
  525. RAND_FLAGS[8] = Rand(204,227);
  526. }
  527. while(RAND_FLAGS[8] == RAND_FLAGS[6] && RAND_FLAGS[8] == RAND_FLAGS[7]);
  528. do{
  529. RAND_FLAGS[RF_AUTIMECIA_SIGNATURE] = Rand(1,39);
  530. }
  531. while(RAND_FLAGS[RF_AUTIMECIA_SIGNATURE] == 31 || RAND_FLAGS[RF_AUTIMECIA_SIGNATURE] == 30 || RAND_FLAGS[RF_AUTIMECIA_SIGNATURE] == 24 || RAND_FLAGS[RF_AUTIMECIA_SIGNATURE] == 25 || RAND_FLAGS[RF_AUTIMECIA_SIGNATURE] == 5 || RAND_FLAGS[RF_AUTIMECIA_SIGNATURE] == 6); //No rolling her own item or duplicate items
  532. //Signature Stuff
  533. SetSpecialAttackMPAtGameInit(); //Now that we've got the character, set up MP costs for their special ability
  534. G[G_SUBPOSITION] = 27; //And set the subscreen selector position.
  535. G[G_LINK_EQUIPB] = 228; //And set the item to B.
  536. //Guaranteed boss fights
  537. if(RAND_FLAGS[RF_STORY_MODE_ON] == 1 && (Link->Item[EMILY_RING] || Link->Item[LUCAS_RING] || Link->Item[CAELAN_RING]))
  538. BossArray[3] = 3;
  539. //Moving the roaming boss for Rivieres
  540. if((Link->Item[RHONE_RING] || Link->Item[SEINE_RING] || Link->Item[LOIRE_RING]) && StoryModeSwitch == true && RAND_FLAGS[RF_ROAMING_BOSS_ONE] == 15){ //No roaming boss in caverns please
  541. RAND_FLAGS[RF_ROAMING_BOSS_ONE] = srand(1,14);
  542. }
  543. int strcmap[] = "Your Seed Is: %i (%i)\n";
  544. printf(strcmap, RAND_FLAGS[RF_SEED1], RAND_FLAGS[RF_SEED2]);
  545. GreatScreenCopyAdventure(); //Now much greater by virtue of being a separate function. Yay, organization!
  546. __Tango_SlotDefs[17] = 0;
  547. SetSignatureString();
  548. Tango_ClearSlot(0);
  549. Tango_ClearSlot(1);
  550. Tango_ClearSlot(2);
  551. return;
  552. }
  553. }
  554. while(Screen->D[0] == 1){
  555. Waitframe();
  556. }
  557. if(Screen->D[0] > 1){
  558. Tango_ClearSlot(0);
  559. Tango_ClearSlot(1);
  560. Tango_ClearSlot(2);
  561. if(Screen->D[1] != 0)
  562. CurrentChar = Screen->D[1];
  563. for(int i = Screen->D[0]; i >0; i--){
  564. BlackScreen();
  565. NoInputWaitframes(1);
  566. }
  567. Screen->D[0] = 0;
  568. }
  569. Screen->D[2] = 0;
  570. if(CurrentChar >0){
  571. if(StoryModeArray[CurrentChar-1] == 0 && StoryModeSwitch == true){
  572. StoryModeSwitch = false;
  573. }
  574. }
  575.  
  576. if(CurrentChar == 0){ //No character selected
  577. MaxOutfit = 0;
  578. OutfitState = 0;
  579. OutfitOption = false;
  580. }
  581. else if(CurrentChar == 10){ //Emily
  582. OutfitOption = true;
  583. MaxOutfit = 2;
  584. if(OutfitState == 0)
  585. Screen->DrawString(2, XLoc + Indent, 160 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Normal, OP_OPAQUE);
  586. else if(OutfitState == 1){
  587. Screen->DrawString(2, XLoc + Indent, 160 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Summer, OP_OPAQUE);
  588. Screen->DrawCombo(2, XLoc + Indent + 5, 110 + SubscreenShift + Textshift + 4, 4362, 1, 1, CharactersCSets[CurrentChar], -1, -1, 0, 0, 0, 0, 0, true, OP_OPAQUE);
  589. }
  590. else if(OutfitState == 2){
  591. Screen->DrawString(2, XLoc + Indent, 160 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Snow, OP_OPAQUE);
  592. Screen->DrawCombo(2, XLoc + Indent + 5, 110 + SubscreenShift + Textshift + 4, 4363, 1, 1, CharactersCSets[CurrentChar], -1, -1, 0, 0, 0, 0, 0, true, OP_OPAQUE);
  593. }
  594. }
  595. else if(CurrentChar == 11){ //Lucas
  596. OutfitOption = true;
  597. MaxOutfit = 2;
  598. if(OutfitState == 0)
  599. Screen->DrawString(2, XLoc + Indent, 160 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Normal, OP_OPAQUE);
  600. else if(OutfitState == 1){
  601. Screen->DrawString(2, XLoc + Indent, 160 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Summer, OP_OPAQUE);
  602. Screen->DrawCombo(2, XLoc + Indent + 5, 110 + SubscreenShift + Textshift + 4, 4364, 1, 1, CharactersCSets[CurrentChar], -1, -1, 0, 0, 0, 0, 0, true, OP_OPAQUE);
  603. }
  604. else if(OutfitState == 2){
  605. Screen->DrawString(2, XLoc + Indent, 160 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Snow, OP_OPAQUE);
  606. Screen->DrawCombo(2, XLoc + Indent + 5, 110 + SubscreenShift + Textshift + 4, 4365, 1, 1, CharactersCSets[CurrentChar], -1, -1, 0, 0, 0, 0, 0, true, OP_OPAQUE);
  607. }
  608. }
  609. else if(CurrentChar == 12){ //Caelan
  610. OutfitOption = true;
  611. MaxOutfit = 2;
  612. if(OutfitState == 0)
  613. Screen->DrawString(2, XLoc + Indent, 160 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Normal, OP_OPAQUE);
  614. else if(OutfitState == 1){
  615. Screen->DrawString(2, XLoc + Indent, 160 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Summer, OP_OPAQUE);
  616. Screen->DrawCombo(2, XLoc + Indent + 5, 110 + SubscreenShift + Textshift + 4, 4366, 1, 1, CharactersCSets[CurrentChar], -1, -1, 0, 0, 0, 0, 0, true, OP_OPAQUE);
  617. }
  618. else if(OutfitState == 2){
  619. Screen->DrawString(2, XLoc + Indent, 160 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Snow, OP_OPAQUE);
  620. Screen->DrawCombo(2, XLoc + Indent + 5, 110 + SubscreenShift + Textshift + 4, 4367, 1, 1, CharactersCSets[CurrentChar], -1, -1, 0, 0, 0, 0, 0, true, OP_OPAQUE);
  621. }
  622. }
  623. else if(CurrentChar == 14){ //Sasic
  624. OutfitOption = true;
  625. MaxOutfit = 2;
  626. if(OutfitState == 0)
  627. Screen->DrawString(2, XLoc + Indent, 160 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Normal, OP_OPAQUE);
  628. else if(OutfitState == 1){
  629. Screen->DrawString(2, XLoc + Indent, 160 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Olsov, OP_OPAQUE);
  630. Screen->DrawCombo(2, XLoc + Indent + 5, 110 + SubscreenShift + Textshift + 4, 4384, 1, 1, CharactersCSets[CurrentChar], -1, -1, 0, 0, 0, 0, 0, true, OP_OPAQUE);
  631. }
  632. else if(OutfitState == 2){
  633. Screen->DrawString(2, XLoc + Indent, 160 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Gaius, OP_OPAQUE);
  634. Screen->DrawCombo(2, XLoc + Indent + 5, 110 + SubscreenShift + Textshift + 4, 4385, 1, 1, CharactersCSets[CurrentChar], -1, -1, 0, 0, 0, 0, 0, true, OP_OPAQUE);
  635. }
  636. }
  637. else if(CurrentChar == 33){ //Mato
  638. OutfitOption = true;
  639. MaxOutfit = 2;
  640. if(OutfitState == 0)
  641. Screen->DrawString(2, XLoc + Indent, 160 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Normal, OP_OPAQUE);
  642. else if(OutfitState == 1){
  643. Screen->DrawString(2, XLoc + Indent, 160 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Soccer, OP_OPAQUE);
  644. Screen->DrawCombo(2, XLoc + Indent + 5, 110 + SubscreenShift + Textshift + 4, 4386, 1, 1, CharactersCSets[CurrentChar], -1, -1, 0, 0, 0, 0, 0, true, OP_OPAQUE);
  645. }
  646. else if(OutfitState == 2){
  647. Screen->DrawString(2, XLoc + Indent, 160 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Summer, OP_OPAQUE);
  648. Screen->DrawCombo(2, XLoc + Indent + 5, 110 + SubscreenShift + Textshift + 4, 4387, 1, 1, CharactersCSets[CurrentChar], -1, -1, 0, 0, 0, 0, 0, true, OP_OPAQUE);
  649. }
  650. }
  651. else if(CurrentChar == 34){ //Miles
  652. OutfitOption = true;
  653. MaxOutfit = 2;
  654. if(OutfitState == 0)
  655. Screen->DrawString(2, XLoc + Indent, 160 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Normal, OP_OPAQUE);
  656. else if(OutfitState == 1){
  657. Screen->DrawString(2, XLoc + Indent, 160 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Blood, OP_OPAQUE);
  658. Screen->DrawCombo(2, XLoc + Indent + 5, 110 + SubscreenShift + Textshift + 4, 4388, 1, 1, CharactersCSets[CurrentChar], -1, -1, 0, 0, 0, 0, 0, true, OP_OPAQUE);
  659. }
  660. else if(OutfitState == 2){
  661. Screen->DrawString(2, XLoc + Indent, 160 + SubscreenShift + Textshift, FONT_Z3SMALL, 0x4A, -1, TF_NORMAL, Summer, OP_OPAQUE);
  662. Screen->DrawCombo(2, XLoc + Indent + 5, 110 + SubscreenShift + Textshift + 4, 4389, 1, 1, CharactersCSets[CurrentChar], -1, -1, 0, 0, 0, 0, 0, true, OP_OPAQUE);
  663. }
  664. }
  665. else{
  666. MaxOutfit = 0;
  667. OutfitState = 0;
  668. OutfitOption = false;
  669. }
  670.  
  671. if(Link->PressStart && !DisableUp)
  672. CursorPosition = 6;
  673. Waitframe();
  674. }
  675. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement