Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int Character[] = "Character";
- int ToggleSpells[] = "Press A to toggle all spells.";
- int Coins[] = "Coins";
- int EventIndex[] = "Event Index";
- int EventProgress[] = "Progress";
- int New[] = "New";
- int Viewed[] = "Viewed";
- int Defeated[] = "Defeated";
- int OpeningA[] = "OpeningA";
- int OpeningB[] = "OpeningB";
- int LowerLeft[] = "LowerLeft";
- int LowerRight[] = "LowerRight";
- int MiddleA[] = "MiddleA";
- int MiddleB[] = "MiddleB";
- int MiddleLeft[] = "MiddleLeft";
- int UpperLeft[] = "UpperLeft";
- int UpperRight[] = "UpperRight";
- int FinalBoss[] = "FinalBoss";
- void DebugMenu(){
- G[G_IN_CUTSCENE] = I_TRUE;
- LinkMovement_UndoLinkMovement()
- FreezeScreen();
- int anchorx = 32;
- int anchory = 8;
- int spacing = 10;
- int xrightside = 128;
- Screen->DrawString(6, anchorx, anchory, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, Character, OP_OPAQUE);
- Screen->DrawString(6, anchorx, anchory+spacing*1, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, Coins, OP_OPAQUE);
- Screen->DrawString(6, anchorx, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, EventIndex, OP_OPAQUE);
- Screen->DrawString(6, anchorx+16, anchory+spacing*3, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, EventProgress, OP_OPAQUE);
- DisplayCharacterName(ModifiedGetCharacterNumber(), anchorx+xrightside, anchory);
- Screen->DrawInteger(6, anchorx+xrightside, anchory+spacing*1, FONT_Z3SMALL, 0x01, 0x00, 16, 16, Game->Counter[CR_SCRIPT1], 0, OP_OPAQUE);
- if(G[G_DEBUG_EVENT] == SCN_OPENINGA)
- Screen->DrawString(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, OpeningA, OP_OPAQUE);
- else if(G[G_DEBUG_EVENT] == SCN_OPENINGB)
- Screen->DrawString(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, OpeningB, OP_OPAQUE);
- else if(G[G_DEBUG_EVENT] == SCN_LOWERLEFT)
- Screen->DrawString(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, LowerLeft, OP_OPAQUE);
- else if(G[G_DEBUG_EVENT] == SCN_LOWERRIGHT)
- Screen->DrawString(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, LowerRight, OP_OPAQUE);
- else if(G[G_DEBUG_EVENT] == SCN_MIDDLEA)
- Screen->DrawString(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, MiddleA, OP_OPAQUE);
- else if(G[G_DEBUG_EVENT] == SCN_MIDDLEB)
- Screen->DrawString(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, MiddleB, OP_OPAQUE);
- else if(G[G_DEBUG_EVENT] == SCN_MIDDLELEFT)
- Screen->DrawString(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, MiddleLeft, OP_OPAQUE);
- else if(G[G_DEBUG_EVENT] == SCN_UPPERLEFT)
- Screen->DrawString(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, UpperLeft, OP_OPAQUE);
- else if(G[G_DEBUG_EVENT] == SCN_UPPERRIGHT)
- Screen->DrawString(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, UpperRight, OP_OPAQUE);
- else if(G[G_DEBUG_EVENT] == SCN_FINALBOSS)
- Screen->DrawString(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, FinalBoss, OP_OPAQUE);
- else
- Screen->DrawInteger(6, anchorx+xrightside, anchory+spacing*2, FONT_Z3SMALL, 0x01, 0x00, 16, 16, G[G_DEBUG_EVENT], 0, OP_OPAQUE);
- int debugevent = G[G_DEBUG_EVENT];
- if(StoryEvents[debugevent] == SPG_NEW)
- Screen->DrawString(6, anchorx+xrightside, anchory+spacing*3, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, New, OP_OPAQUE);
- if(StoryEvents[debugevent] == SPG_VIEWED)
- Screen->DrawString(6, anchorx+xrightside, anchory+spacing*3, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, Viewed, OP_OPAQUE);
- if(StoryEvents[debugevent] == SPG_BOSSDEFEATED)
- Screen->DrawString(6, anchorx+xrightside, anchory+spacing*3, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, Defeated, OP_OPAQUE);
- if(Link->Item[181] || Link->Item[142]){
- Screen->DrawString(6, anchorx, anchory+spacing*5, FONT_Z3SMALL, 0x01, 0x00, TF_NORMAL, ToggleSpells, OP_OPAQUE);
- if(Link->PressA){
- for(int i = 0; i < SizeOfArray(ItemIDs); i++){
- int currentitem = ItemIDs[i];
- if(Positions[i] != 10 && Positions[i] != 0 && Positions[i] != 20 && Positions[i] != 27)
- Link->Item[currentitem] = false;
- }
- Game->PlaySound(72);
- }
- }
- else{
- Screen->DrawString(6, anchorx, anchory+spacing*5, FONT_Z3SMALL, 0x02, 0x00, TF_NORMAL, ToggleSpells, OP_OPAQUE);
- if(Link->PressA){
- for(int i = 0; i < SizeOfArray(ItemIDs); i++){
- int currentitem = ItemIDs[i];
- if(Positions[i] < 29)
- Link->Item[currentitem] = true;
- }
- Game->PlaySound(67);
- }
- }
- Screen->FastTile(6, anchorx+xrightside-8, anchory+spacing*G[G_DEBUG_CURSOR]-1, 1517, 7, OP_OPAQUE);
- if(Link->PressUp){
- do{
- G[G_DEBUG_CURSOR]--;
- if(G[G_DEBUG_CURSOR] >3)
- G[G_DEBUG_CURSOR] -= 4;
- if(G[G_DEBUG_CURSOR] <0)
- G[G_DEBUG_CURSOR] += 4;
- }
- while(G[G_DEBUG_CURSOR] >3 || G[G_DEBUG_CURSOR] <0);
- Game->PlaySound(5);
- }
- if(Link->PressDown){
- do{
- G[G_DEBUG_CURSOR]++;
- if(G[G_DEBUG_CURSOR] >3)
- G[G_DEBUG_CURSOR] -= 4;
- if(G[G_DEBUG_CURSOR] <0)
- G[G_DEBUG_CURSOR] += 4;
- }
- while(G[G_DEBUG_CURSOR] >3 || G[G_DEBUG_CURSOR] <0);
- Game->PlaySound(5);
- }
- if(Link->PressLeft){
- if(G[G_DEBUG_CURSOR] == 0){
- int characternumber = ModifiedGetCharacterNumber();
- characternumber--;
- if(characternumber < 1)
- characternumber += SizeOfArray(FirstUpgrade);
- int newring = GetCharacterRing(characternumber);
- int oldring = GetCharacterRing(ModifiedGetCharacterNumber());
- Link->Item[oldring] = false;
- Link->Item[newring] = true;
- SetSignatureString(characternumber);
- }
- if(G[G_DEBUG_CURSOR] == 1){
- if(Game->Counter[CR_SCRIPT1] != 0)
- Game->Counter[CR_SCRIPT1]--;
- else
- Game->Counter[CR_SCRIPT1] = 100;
- }
- if(G[G_DEBUG_CURSOR] == 2){
- G[G_DEBUG_EVENT]--;
- if(G[G_DEBUG_EVENT] < 0)
- G[G_DEBUG_EVENT] += SizeOfArray(StoryEvents);
- }
- if(G[G_DEBUG_CURSOR] == 3){
- StoryEvents[debugevent]--;
- if(StoryEvents[debugevent] <0)
- StoryEvents[debugevent] = SPG_BOSSDEFEATED;
- }
- Game->PlaySound(5);
- }
- if(Link->PressRight){
- if(G[G_DEBUG_CURSOR] == 0){
- int characternumber = ModifiedGetCharacterNumber();
- characternumber++;
- if(characternumber > SizeOfArray(FirstUpgrade))
- characternumber -= SizeOfArray(FirstUpgrade);
- int newring = GetCharacterRing(characternumber);
- int oldring = GetCharacterRing(ModifiedGetCharacterNumber());
- Link->Item[oldring] = false;
- Link->Item[newring] = true;
- SetSignatureString(characternumber);
- }
- if(G[G_DEBUG_CURSOR] == 1){
- Game->Counter[CR_SCRIPT1]++;
- }
- if(G[G_DEBUG_CURSOR] == 2){
- G[G_DEBUG_EVENT]++;
- if(G[G_DEBUG_EVENT] >= SizeOfArray(StoryEvents))
- G[G_DEBUG_EVENT] -= SizeOfArray(StoryEvents);
- }
- if(G[G_DEBUG_CURSOR] == 3){
- StoryEvents[debugevent]++;
- if(StoryEvents[debugevent] > SPG_BOSSDEFEATED)
- StoryEvents[debugevent] = SPG_NEW;
- }
- Game->PlaySound(5);
- }
- if(Link->InputRight && G[G_DEBUG_CURSOR] == 1 && !Link->PressRight && G[G_GLOBALFRAMES] %4 == 0){
- Game->Counter[CR_SCRIPT1]++;
- }
- if(Link->InputLeft && G[G_DEBUG_CURSOR] == 1 && !Link->PressLeft && G[G_GLOBALFRAMES] %4 == 0){
- if(Game->Counter[CR_SCRIPT1] != 0)
- Game->Counter[CR_SCRIPT1]--;
- else
- Game->Counter[CR_SCRIPT1] = 100;
- }
- if(Game->Counter[CR_SCRIPT1] > 100)
- Game->Counter[CR_SCRIPT1] -= 100;
- if(Game->Counter[CR_SCRIPT1] < 0)
- Game->Counter[CR_SCRIPT1] += 100;
- Link->InputStart = false;
- if(Link->PressB){
- NoInputWaitframes(4);
- G[G_IN_CUTSCENE] = I_FALSE;
- G[G_DEBUG_OPEN] = I_FALSE;
- G[G_DEBUG_COUNTER] = 0;
- UnfreezeScreen();
- }
- }
- int GetCharacterRing(int CurrentChar){ //returns a ring item ID based on ModifiedGetCharacterNumber()
- int ring;
- if(CurrentChar == 1)
- ring = RHONE_RING;
- if(CurrentChar == 2)
- ring = SEINE_RING;
- if(CurrentChar == 3)
- ring = LOIRE_RING;
- if(CurrentChar == 4)
- ring = HITO_RING;
- if(CurrentChar == 5)
- ring = JACK_RING;
- if(CurrentChar == 6)
- ring = WILL_RING;
- if(CurrentChar == 7)
- ring = NAIYA_RING;
- if(CurrentChar == 8){
- if(G[G_OUTFIT] == 0)
- ring = JANDRA_RING;
- if(G[G_OUTFIT] == 1)
- ring = JANDRA_RING_2;
- }
- if(CurrentChar == 9)
- ring = TYRE_RING;
- if(CurrentChar == 10)
- ring = EMILY_RING;
- if(CurrentChar == 11)
- ring = LUCAS_RING;
- if(CurrentChar == 12)
- ring = CAELAN_RING;
- if(CurrentChar == 13)
- ring = FLECT_RING;
- if(CurrentChar == 14){
- if(G[G_OUTFIT] == 0)
- ring = SASIC_RING;
- if(G[G_OUTFIT] == 1)
- ring = SASIC_RING_2;
- if(G[G_OUTFIT] == 2)
- ring = SASIC_RING_3;
- }
- if(CurrentChar == 15)
- ring = ZELDA_RING;
- if(CurrentChar == 16)
- ring = HOLM_RING;
- if(CurrentChar == 17)
- ring = MIRR_RING;
- if(CurrentChar == 18)
- ring = HART_RING;
- if(CurrentChar == 19)
- ring = BASTILLE_RING;
- if(CurrentChar == 20)
- ring = CHAINED_RING;
- if(CurrentChar == 21)
- ring = HORIZON_RING;
- if(CurrentChar == 22)
- ring = VANICE_RING;
- if(CurrentChar == 23)
- ring = VEN_RING;
- if(CurrentChar == 24)
- ring = WAN_RING;
- if(CurrentChar == 25)
- ring = SUE_RING;
- if(CurrentChar == 26)
- ring = GALE_RING;
- if(CurrentChar == 27)
- ring = CALAIS_RING;
- if(CurrentChar == 28)
- ring = ZEPHYR_RING;
- if(CurrentChar == 29)
- ring = NOTOS_RING;
- if(CurrentChar == 30)
- ring = BOREAS_RING;
- if(CurrentChar == 31)
- ring = AUTIMECIA_RING;
- if(CurrentChar == 32)
- ring = QUINN_RING;
- if(CurrentChar == 33)
- ring = MATO_RING;
- if(CurrentChar == 34){
- if(G[G_OUTFIT] == 1)
- ring = MILES_RING_2;
- else
- ring = MILES_RING;
- }
- if(CurrentChar == 35)
- ring = KAVERI_RING;
- if(CurrentChar == 36)
- ring = AVA_RING;
- if(CurrentChar == 37)
- ring = XAYA_RING;
- if(CurrentChar == 38)
- ring = DRACUS_RING;
- if(CurrentChar == 39)
- ring = LUMEN_RING;
- if(CurrentChar == 40)
- ring = STAN_RING;
- if(CurrentChar == 41)
- ring = MORGAN_RING;
- if(CurrentChar == 42)
- ring = JAKE_RING;
- if(CurrentChar == 43){
- if(G[G_OUTFIT] == 1)
- ring = ELI_RING_2;
- else
- ring = ELI_RING;
- }
- if(CurrentChar == 44)
- ring = DESIO_RING;
- if(CurrentChar == 45)
- ring = JULIUS_RING;
- if(CurrentChar == 46)
- ring = ZARATH_RING;
- if(CurrentChar == 47)
- ring = SYNAPSE_RING;
- if(CurrentChar == 48)
- ring = KRAMPUS_RING;
- return ring;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement