Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.10 KB | None | 0 0
  1. int Character[] = "Character";
  2. int ToggleSpells[] = "Press A to toggle all spells.";
  3. int Coins[] = "Coins";
  4. int EventIndex[] = "Event Index";
  5. int EventProgress[] = "Progress";
  6. int New[] = "New";
  7. int Viewed[] = "Viewed";
  8. int Defeated[] = "Defeated";
  9. int OpeningA[] = "OpeningA";
  10. int OpeningB[] = "OpeningB";
  11. int LowerLeft[] = "LowerLeft";
  12. int LowerRight[] = "LowerRight";
  13. int MiddleA[] = "MiddleA";
  14. int MiddleB[] = "MiddleB";
  15. int MiddleLeft[] = "MiddleLeft";
  16. int UpperLeft[] = "UpperLeft";
  17. int UpperRight[] = "UpperRight";
  18. int FinalBoss[] = "FinalBoss";
  19.  
  20.  
  21. void DebugMenu(){
  22. G[G_IN_CUTSCENE] = I_TRUE;
  23. LinkMovement_UndoLinkMovement()
  24. FreezeScreen();
  25. int anchorx = 32;
  26. int anchory = 8;
  27. int spacing = 10;
  28. int xrightside = 128;
  29. Screen->DrawString(6, anchorx, anchory, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, Character, OP_OPAQUE);
  30. Screen->DrawString(6, anchorx, anchory+spacing*1, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, Coins, OP_OPAQUE);
  31. Screen->DrawString(6, anchorx, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, EventIndex, OP_OPAQUE);
  32. Screen->DrawString(6, anchorx+16, anchory+spacing*3, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, EventProgress, OP_OPAQUE);
  33. DisplayCharacterName(ModifiedGetCharacterNumber(), anchorx+xrightside, anchory);
  34.  
  35.  
  36. Screen->DrawInteger(6, anchorx+xrightside, anchory+spacing*1, FONT_Z3SMALL, 0x01, 0x00, 16, 16, Game->Counter[CR_SCRIPT1], 0, OP_OPAQUE);
  37. if(G[G_DEBUG_EVENT] == SCN_OPENINGA)
  38. Screen->DrawString(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, OpeningA, OP_OPAQUE);
  39. else if(G[G_DEBUG_EVENT] == SCN_OPENINGB)
  40. Screen->DrawString(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, OpeningB, OP_OPAQUE);
  41. else if(G[G_DEBUG_EVENT] == SCN_LOWERLEFT)
  42. Screen->DrawString(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, LowerLeft, OP_OPAQUE);
  43. else if(G[G_DEBUG_EVENT] == SCN_LOWERRIGHT)
  44. Screen->DrawString(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, LowerRight, OP_OPAQUE);
  45. else if(G[G_DEBUG_EVENT] == SCN_MIDDLEA)
  46. Screen->DrawString(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, MiddleA, OP_OPAQUE);
  47. else if(G[G_DEBUG_EVENT] == SCN_MIDDLEB)
  48. Screen->DrawString(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, MiddleB, OP_OPAQUE);
  49. else if(G[G_DEBUG_EVENT] == SCN_MIDDLELEFT)
  50. Screen->DrawString(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, MiddleLeft, OP_OPAQUE);
  51. else if(G[G_DEBUG_EVENT] == SCN_UPPERLEFT)
  52. Screen->DrawString(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, UpperLeft, OP_OPAQUE);
  53. else if(G[G_DEBUG_EVENT] == SCN_UPPERRIGHT)
  54. Screen->DrawString(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, UpperRight, OP_OPAQUE);
  55. else if(G[G_DEBUG_EVENT] == SCN_FINALBOSS)
  56. Screen->DrawString(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, FinalBoss, OP_OPAQUE);
  57. else
  58. Screen->DrawInteger(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, 16, 16, G[G_DEBUG_EVENT], 0, OP_OPAQUE);
  59. int debugevent = G[G_DEBUG_EVENT];
  60. if(StoryEvents[debugevent] == SPG_NEW)
  61. Screen->DrawString(6, anchorx+xrightside, anchory+spacing*3, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, New, OP_OPAQUE);
  62. if(StoryEvents[debugevent] == SPG_VIEWED)
  63. Screen->DrawString(6, anchorx+xrightside, anchory+spacing*3, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, Viewed, OP_OPAQUE);
  64. if(StoryEvents[debugevent] == SPG_BOSSDEFEATED)
  65. Screen->DrawString(6, anchorx+xrightside, anchory+spacing*3, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, Defeated, OP_OPAQUE);
  66. if(Link->Item[181] || Link->Item[142]){
  67. Screen->DrawString(6, anchorx, anchory+spacing*5, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, ToggleSpells, OP_OPAQUE);
  68. if(Link->PressA){
  69. for(int i = 0; i < SizeOfArray(ItemIDs); i++){
  70. int currentitem = ItemIDs[i];
  71. if(Positions[i] != 10 && Positions[i] != 0 && Positions[i] != 20 && Positions[i] != 27)
  72. Link->Item[currentitem] = false;
  73. }
  74. Game->PlaySound(72);
  75. }
  76.  
  77. }
  78. else{
  79. Screen->DrawString(6, anchorx, anchory+spacing*5, FONT_Z3SMALL, 0x02, 0x00, TF_NORMAL, ToggleSpells, OP_OPAQUE);
  80. if(Link->PressA){
  81. for(int i = 0; i < SizeOfArray(ItemIDs); i++){
  82. int currentitem = ItemIDs[i];
  83. if(Positions[i] < 29)
  84. Link->Item[currentitem] = true;
  85. }
  86. Game->PlaySound(67);
  87. }
  88. }
  89. Screen->FastTile(6, anchorx+xrightside-8, anchory+spacing*G[G_DEBUG_CURSOR]-1, 1517, 7, OP_OPAQUE);
  90. if(Link->PressUp){
  91. do{
  92. G[G_DEBUG_CURSOR]--;
  93. if(G[G_DEBUG_CURSOR] >3)
  94. G[G_DEBUG_CURSOR] -= 4;
  95. if(G[G_DEBUG_CURSOR] <0)
  96. G[G_DEBUG_CURSOR] += 4;
  97. }
  98. while(G[G_DEBUG_CURSOR] >3 || G[G_DEBUG_CURSOR] <0);
  99. Game->PlaySound(5);
  100. }
  101. if(Link->PressDown){
  102. do{
  103. G[G_DEBUG_CURSOR]++;
  104. if(G[G_DEBUG_CURSOR] >3)
  105. G[G_DEBUG_CURSOR] -= 4;
  106. if(G[G_DEBUG_CURSOR] <0)
  107. G[G_DEBUG_CURSOR] += 4;
  108. }
  109. while(G[G_DEBUG_CURSOR] >3 || G[G_DEBUG_CURSOR] <0);
  110. Game->PlaySound(5);
  111. }
  112. if(Link->PressLeft){
  113. if(G[G_DEBUG_CURSOR] == 0){
  114. int characternumber = ModifiedGetCharacterNumber();
  115. characternumber--;
  116. if(characternumber < 1)
  117. characternumber += SizeOfArray(FirstUpgrade);
  118. int newring = GetCharacterRing(characternumber);
  119. int oldring = GetCharacterRing(ModifiedGetCharacterNumber());
  120. Link->Item[oldring] = false;
  121. Link->Item[newring] = true;
  122. SetSignatureString(characternumber);
  123. }
  124. if(G[G_DEBUG_CURSOR] == 1){
  125. if(Game->Counter[CR_SCRIPT1] != 0)
  126. Game->Counter[CR_SCRIPT1]--;
  127. else
  128. Game->Counter[CR_SCRIPT1] = 100;
  129. }
  130. if(G[G_DEBUG_CURSOR] == 2){
  131. G[G_DEBUG_EVENT]--;
  132. if(G[G_DEBUG_EVENT] < 0)
  133. G[G_DEBUG_EVENT] += SizeOfArray(StoryEvents);
  134. }
  135. if(G[G_DEBUG_CURSOR] == 3){
  136. StoryEvents[debugevent]--;
  137. if(StoryEvents[debugevent] <0)
  138. StoryEvents[debugevent] = SPG_BOSSDEFEATED;
  139. }
  140. Game->PlaySound(5);
  141. }
  142.  
  143. if(Link->PressRight){
  144. if(G[G_DEBUG_CURSOR] == 0){
  145. int characternumber = ModifiedGetCharacterNumber();
  146. characternumber++;
  147. if(characternumber > SizeOfArray(FirstUpgrade))
  148. characternumber -= SizeOfArray(FirstUpgrade);
  149. int newring = GetCharacterRing(characternumber);
  150. int oldring = GetCharacterRing(ModifiedGetCharacterNumber());
  151. Link->Item[oldring] = false;
  152. Link->Item[newring] = true;
  153. SetSignatureString(characternumber);
  154. }
  155. if(G[G_DEBUG_CURSOR] == 1){
  156. Game->Counter[CR_SCRIPT1]++;
  157. }
  158. if(G[G_DEBUG_CURSOR] == 2){
  159. G[G_DEBUG_EVENT]++;
  160. if(G[G_DEBUG_EVENT] >= SizeOfArray(StoryEvents))
  161. G[G_DEBUG_EVENT] -= SizeOfArray(StoryEvents);
  162. }
  163. if(G[G_DEBUG_CURSOR] == 3){
  164. StoryEvents[debugevent]++;
  165. if(StoryEvents[debugevent] > SPG_BOSSDEFEATED)
  166. StoryEvents[debugevent] = SPG_NEW;
  167. }
  168. Game->PlaySound(5);
  169. }
  170. if(Link->InputRight && G[G_DEBUG_CURSOR] == 1 && !Link->PressRight && G[G_GLOBALFRAMES] %4 == 0){
  171. Game->Counter[CR_SCRIPT1]++;
  172. }
  173. if(Link->InputLeft && G[G_DEBUG_CURSOR] == 1 && !Link->PressLeft && G[G_GLOBALFRAMES] %4 == 0){
  174. if(Game->Counter[CR_SCRIPT1] != 0)
  175. Game->Counter[CR_SCRIPT1]--;
  176. else
  177. Game->Counter[CR_SCRIPT1] = 100;
  178. }
  179. if(Game->Counter[CR_SCRIPT1] > 100)
  180. Game->Counter[CR_SCRIPT1] -= 100;
  181. if(Game->Counter[CR_SCRIPT1] < 0)
  182. Game->Counter[CR_SCRIPT1] += 100;
  183. Link->InputStart = false;
  184. if(Link->PressB){
  185. NoInputWaitframes(4);
  186. G[G_IN_CUTSCENE] = I_FALSE;
  187. G[G_DEBUG_OPEN] = I_FALSE;
  188. G[G_DEBUG_COUNTER] = 0;
  189. UnfreezeScreen();
  190. }
  191. }
  192.  
  193. int GetCharacterRing(int CurrentChar){ //returns a ring item ID based on ModifiedGetCharacterNumber()
  194. int ring;
  195. if(CurrentChar == 1)
  196. ring = RHONE_RING;
  197. if(CurrentChar == 2)
  198. ring = SEINE_RING;
  199. if(CurrentChar == 3)
  200. ring = LOIRE_RING;
  201. if(CurrentChar == 4)
  202. ring = HITO_RING;
  203. if(CurrentChar == 5)
  204. ring = JACK_RING;
  205. if(CurrentChar == 6)
  206. ring = WILL_RING;
  207. if(CurrentChar == 7)
  208. ring = NAIYA_RING;
  209. if(CurrentChar == 8){
  210. if(G[G_OUTFIT] == 0)
  211. ring = JANDRA_RING;
  212. if(G[G_OUTFIT] == 1)
  213. ring = JANDRA_RING_2;
  214. }
  215. if(CurrentChar == 9)
  216. ring = TYRE_RING;
  217. if(CurrentChar == 10)
  218. ring = EMILY_RING;
  219. if(CurrentChar == 11)
  220. ring = LUCAS_RING;
  221. if(CurrentChar == 12)
  222. ring = CAELAN_RING;
  223. if(CurrentChar == 13)
  224. ring = FLECT_RING;
  225. if(CurrentChar == 14){
  226. if(G[G_OUTFIT] == 0)
  227. ring = SASIC_RING;
  228. if(G[G_OUTFIT] == 1)
  229. ring = SASIC_RING_2;
  230. if(G[G_OUTFIT] == 2)
  231. ring = SASIC_RING_3;
  232. }
  233. if(CurrentChar == 15)
  234. ring = ZELDA_RING;
  235. if(CurrentChar == 16)
  236. ring = HOLM_RING;
  237. if(CurrentChar == 17)
  238. ring = MIRR_RING;
  239. if(CurrentChar == 18)
  240. ring = HART_RING;
  241. if(CurrentChar == 19)
  242. ring = BASTILLE_RING;
  243. if(CurrentChar == 20)
  244. ring = CHAINED_RING;
  245. if(CurrentChar == 21)
  246. ring = HORIZON_RING;
  247. if(CurrentChar == 22)
  248. ring = VANICE_RING;
  249. if(CurrentChar == 23)
  250. ring = VEN_RING;
  251. if(CurrentChar == 24)
  252. ring = WAN_RING;
  253. if(CurrentChar == 25)
  254. ring = SUE_RING;
  255. if(CurrentChar == 26)
  256. ring = GALE_RING;
  257. if(CurrentChar == 27)
  258. ring = CALAIS_RING;
  259. if(CurrentChar == 28)
  260. ring = ZEPHYR_RING;
  261. if(CurrentChar == 29)
  262. ring = NOTOS_RING;
  263. if(CurrentChar == 30)
  264. ring = BOREAS_RING;
  265. if(CurrentChar == 31)
  266. ring = AUTIMECIA_RING;
  267. if(CurrentChar == 32)
  268. ring = QUINN_RING;
  269. if(CurrentChar == 33)
  270. ring = MATO_RING;
  271. if(CurrentChar == 34){
  272. if(G[G_OUTFIT] == 1)
  273. ring = MILES_RING_2;
  274. else
  275. ring = MILES_RING;
  276. }
  277. if(CurrentChar == 35)
  278. ring = KAVERI_RING;
  279. if(CurrentChar == 36)
  280. ring = AVA_RING;
  281. if(CurrentChar == 37)
  282. ring = XAYA_RING;
  283. if(CurrentChar == 38)
  284. ring = DRACUS_RING;
  285. if(CurrentChar == 39)
  286. ring = LUMEN_RING;
  287. if(CurrentChar == 40)
  288. ring = STAN_RING;
  289. if(CurrentChar == 41)
  290. ring = MORGAN_RING;
  291. if(CurrentChar == 42)
  292. ring = JAKE_RING;
  293. if(CurrentChar == 43){
  294. if(G[G_OUTFIT] == 1)
  295. ring = ELI_RING_2;
  296. else
  297. ring = ELI_RING;
  298. }
  299. if(CurrentChar == 44)
  300. ring = DESIO_RING;
  301. if(CurrentChar == 45)
  302. ring = JULIUS_RING;
  303. if(CurrentChar == 46)
  304. ring = ZARATH_RING;
  305. if(CurrentChar == 47)
  306. ring = SYNAPSE_RING;
  307. if(CurrentChar == 48)
  308. ring = KRAMPUS_RING;
  309. return ring;
  310. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement