Advertisement
OmegaGamingHunters

ZC subscreens V2

Apr 21st, 2020
441
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.23 KB | None | 0 0
  1. //FinalSubscreens.zh
  2. //The Subscreen the player will see in this quest
  3. //Active Subscreen: Item Selection Menu
  4. //Passive Subscreen: Display's Health, Magic, Current Buttom Items, Counters
  5.  
  6. //Active Menu Pages
  7. //1. Item Screen
  8. //2. Status/Equipment Screen
  9. //3. Quest Collection Screen
  10. //4. Overworld/Dungeon Map Screen
  11. //5. Log Book
  12. //   -History/Lore
  13. //   -Journel Entries
  14. //   -Research
  15. //   -Monsters
  16. //   -Items
  17.  
  18. dmapdata script FinalActiveSubscreen
  19. {
  20.     void run()
  21.     {
  22.         //declare variables here
  23.         bool ActiveMenu_Transition = true; //The trigger that transitions the game into the menu
  24.         int ActiveMenu_Transition_Phase = 0; //The stage in the transition the menu is in
  25.         int ActiveMenu_Background_Alpha = 64; //The transparency of the menu
  26.         int ActiveMenu_Menu_Alpha = 0; //The alpha for the menu and item's
  27.         int ActiveMenu_Alpha_Timer_1 = 0; //Timer for the pace of the alpha transition
  28.         int ActiveMenu_Alpha_Timer_2 = 0; //Timer for the pace of the alpha transition
  29.        
  30.         int ActiveMenu_Page = 1; //The Page the ActiveSubScreen is On
  31.         int ActiveMenu_Layer = 0; //The Layer the ActiveSubScreen is On
  32.         int ActiveMenu_X1 = 0; //X1 Position of the ActiveSubScreen
  33.         int ActiveMenu_Y1 = 176; //Y1 Position of the ActiveSubScreen
  34.         int ActiveMenu_X2 = 256; //X2 Position of the ActiveSubScreen
  35.         int ActiveMenu_Y2 = 176; //Y2 Position of the ActiveSubScreen
  36.  
  37.         //start Active Subscreen Code
  38.         do
  39.         {
  40.             //Transition Period
  41.             switch(ActiveMenu_Transition_Phase)
  42.             {
  43.                 case 0:
  44.                     Audio->PlaySound(SFX_MENU_OPEN);
  45.                     ActiveMenu_Transition_Phase = 1;
  46.                     break;
  47.                 case 1:
  48.                     if (ActiveMenu_Y1 > 0)
  49.                     {
  50.                         ActiveMenu_Y1 -= 4;
  51.                     }
  52.                     else
  53.                     {
  54.                         ActiveMenu_Transition_Phase = 2;
  55.                     }
  56.                     break;
  57.                 case 2:
  58.                     ActiveMenu_Transition = false;
  59.                     break;
  60.             }
  61.  
  62.             //Code for drawing the subscreen
  63.             Screen->Rectangle(ActiveMenu_Layer, ActiveMenu_X1, ActiveMenu_Y1, ActiveMenu_X2, ActiveMenu_Y2, Color_Black, 1, 0, 0, 0, true, OP_OPAQUE); //Background
  64.            
  65.             //Item Screen
  66.             if (ActiveMenu_Page == 1)
  67.             {
  68.                 //Title
  69.                 Screen->DrawString(1, 128, ActiveMenu_Y1 + 10, FONT_LA, Color_White, Color_Black, TF_CENTERED, "Item Screen", OP_OPAQUE);
  70.                
  71.                 //Menu
  72.                 Screen->DrawTile(1, 10, ActiveMenu_Y1 + 20, 20053, 1, 1, 7, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE); //Top-Left Cornor
  73.                 Screen->DrawTile(1, 230, ActiveMenu_Y1 + 20, 20055, 1, 1, 7, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE); //Top-Right Cornor
  74.                 Screen->DrawTile(1, 10, ActiveMenu_Y1 + 84, 20093, 1, 1, 7, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE); //Bottom-Left Cornor
  75.                 Screen->DrawTile(1, 230, ActiveMenu_Y1 + 84, 20095, 1, 1, 7, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE); //Bottom-Right Cornor
  76.                 Screen->DrawTile(1, 26, ActiveMenu_Y1 + 20, 20054, 1, 1, 7, 204, 16, 0, 0, 0, 0, true, OP_OPAQUE); //Top-Edge
  77.                 Screen->DrawTile(1, 26, ActiveMenu_Y1 + 84, 20094, 1, 1, 7, 204, 16, 0, 0, 0, 0, true, OP_OPAQUE); //Bottom-Edge
  78.                 Screen->DrawTile(1, 10, ActiveMenu_Y1 + 36, 20073, 1, 1, 7, 16, 48, 0, 0, 0, 0, true, OP_OPAQUE); //Left-Edge
  79.                 Screen->DrawTile(1, 230, ActiveMenu_Y1 + 36, 20075, 1, 1, 7, 16, 48, 0, 0, 0, 0, true, OP_OPAQUE); //Right-Edge
  80.                
  81.                 //Drawing Items
  82.                 //Player's Sword
  83.                 if (Hero->Item[I_SWORD4])
  84.                 {
  85.                     itemdata Sword = Game->LoadItemData(I_SWORD4);
  86.                     Screen->FastTile(1, 20, ActiveMenu_Y1 + 30, Sword->Tile, Sword->CSet, OP_OPAQUE);
  87.                 }
  88.                 else if (Hero->Item[I_SWORD3])
  89.                 {
  90.                     itemdata Sword = Game->LoadItemData(I_SWORD3);
  91.                     Screen->FastTile(1, 20, ActiveMenu_Y1 + 30, Sword->Tile, Sword->CSet, OP_OPAQUE);
  92.                 }
  93.                 else if (Hero->Item[I_SWORD2])
  94.                 {
  95.                     itemdata Sword = Game->LoadItemData(I_SWORD2);
  96.                     Screen->FastTile(1, 20, ActiveMenu_Y1 + 30, Sword->Tile, Sword->CSet, OP_OPAQUE);
  97.                 }
  98.                 else if (Hero->Item[I_SWORD1])
  99.                 {
  100.                     itemdata Sword = Game->LoadItemData(I_SWORD1);
  101.                     Screen->FastTile(1, 20, ActiveMenu_Y1 + 30, Sword->Tile, Sword->CSet, OP_OPAQUE);
  102.                 }
  103.             }
  104.             Waitframe();
  105.         }
  106.         until(Input->Press[CB_START] and ActiveMenu_Transition == false); //Stop running when the player presses Start
  107.         //end
  108.     }
  109. }
  110.  
  111. dmapdata script FinalPassiveSubscreen
  112. {
  113.     void run()
  114.     {      
  115.         while(true)
  116.         {
  117.             //Passive subscreen draws
  118.             Waitframe();
  119.         }
  120.     }
  121. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement