Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //FinalSubscreens.zh
- //The Subscreen the player will see in this quest
- //Active Subscreen: Item Selection Menu
- //Passive Subscreen: Display's Health, Magic, Current Buttom Items, Counters
- //Active Menu Pages
- //1. Item Screen
- //2. Status/Equipment Screen
- //3. Quest Collection Screen
- //4. Overworld/Dungeon Map Screen
- //5. Log Book
- // -History/Lore
- // -Journel Entries
- // -Research
- // -Monsters
- // -Items
- dmapdata script FinalActiveSubscreen
- {
- void run()
- {
- //declare variables here
- bool ActiveMenu_Transition = true; //The trigger that transitions the game into the menu
- int ActiveMenu_Transition_Phase = 0; //The stage in the transition the menu is in
- int ActiveMenu_Background_Alpha = 64; //The transparency of the menu
- int ActiveMenu_Menu_Alpha = 0; //The alpha for the menu and item's
- int ActiveMenu_Alpha_Timer_1 = 0; //Timer for the pace of the alpha transition
- int ActiveMenu_Alpha_Timer_2 = 0; //Timer for the pace of the alpha transition
- int ActiveMenu_Page = 1; //The Page the ActiveSubScreen is On
- int ActiveMenu_Layer = 0; //The Layer the ActiveSubScreen is On
- int ActiveMenu_X1 = 0; //X1 Position of the ActiveSubScreen
- int ActiveMenu_Y1 = 176; //Y1 Position of the ActiveSubScreen
- int ActiveMenu_X2 = 256; //X2 Position of the ActiveSubScreen
- int ActiveMenu_Y2 = 176; //Y2 Position of the ActiveSubScreen
- //start Active Subscreen Code
- do
- {
- //Transition Period
- switch(ActiveMenu_Transition_Phase)
- {
- case 0:
- Audio->PlaySound(SFX_MENU_OPEN);
- ActiveMenu_Transition_Phase = 1;
- break;
- case 1:
- if (ActiveMenu_Y1 > 0)
- {
- ActiveMenu_Y1 -= 4;
- }
- else
- {
- ActiveMenu_Transition_Phase = 2;
- }
- break;
- case 2:
- ActiveMenu_Transition = false;
- break;
- }
- //Code for drawing the subscreen
- Screen->Rectangle(ActiveMenu_Layer, ActiveMenu_X1, ActiveMenu_Y1, ActiveMenu_X2, ActiveMenu_Y2, Color_Black, 1, 0, 0, 0, true, OP_OPAQUE); //Background
- //Item Screen
- if (ActiveMenu_Page == 1)
- {
- //Title
- Screen->DrawString(1, 128, ActiveMenu_Y1 + 10, FONT_LA, Color_White, Color_Black, TF_CENTERED, "Item Screen", OP_OPAQUE);
- //Menu
- Screen->DrawTile(1, 10, ActiveMenu_Y1 + 20, 20053, 1, 1, 7, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE); //Top-Left Cornor
- Screen->DrawTile(1, 230, ActiveMenu_Y1 + 20, 20055, 1, 1, 7, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE); //Top-Right Cornor
- Screen->DrawTile(1, 10, ActiveMenu_Y1 + 84, 20093, 1, 1, 7, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE); //Bottom-Left Cornor
- Screen->DrawTile(1, 230, ActiveMenu_Y1 + 84, 20095, 1, 1, 7, -1, -1, 0, 0, 0, 0, true, OP_OPAQUE); //Bottom-Right Cornor
- Screen->DrawTile(1, 26, ActiveMenu_Y1 + 20, 20054, 1, 1, 7, 204, 16, 0, 0, 0, 0, true, OP_OPAQUE); //Top-Edge
- Screen->DrawTile(1, 26, ActiveMenu_Y1 + 84, 20094, 1, 1, 7, 204, 16, 0, 0, 0, 0, true, OP_OPAQUE); //Bottom-Edge
- Screen->DrawTile(1, 10, ActiveMenu_Y1 + 36, 20073, 1, 1, 7, 16, 48, 0, 0, 0, 0, true, OP_OPAQUE); //Left-Edge
- Screen->DrawTile(1, 230, ActiveMenu_Y1 + 36, 20075, 1, 1, 7, 16, 48, 0, 0, 0, 0, true, OP_OPAQUE); //Right-Edge
- //Drawing Items
- //Player's Sword
- if (Hero->Item[I_SWORD4])
- {
- itemdata Sword = Game->LoadItemData(I_SWORD4);
- Screen->FastTile(1, 20, ActiveMenu_Y1 + 30, Sword->Tile, Sword->CSet, OP_OPAQUE);
- }
- else if (Hero->Item[I_SWORD3])
- {
- itemdata Sword = Game->LoadItemData(I_SWORD3);
- Screen->FastTile(1, 20, ActiveMenu_Y1 + 30, Sword->Tile, Sword->CSet, OP_OPAQUE);
- }
- else if (Hero->Item[I_SWORD2])
- {
- itemdata Sword = Game->LoadItemData(I_SWORD2);
- Screen->FastTile(1, 20, ActiveMenu_Y1 + 30, Sword->Tile, Sword->CSet, OP_OPAQUE);
- }
- else if (Hero->Item[I_SWORD1])
- {
- itemdata Sword = Game->LoadItemData(I_SWORD1);
- Screen->FastTile(1, 20, ActiveMenu_Y1 + 30, Sword->Tile, Sword->CSet, OP_OPAQUE);
- }
- }
- Waitframe();
- }
- until(Input->Press[CB_START] and ActiveMenu_Transition == false); //Stop running when the player presses Start
- //end
- }
- }
- dmapdata script FinalPassiveSubscreen
- {
- void run()
- {
- while(true)
- {
- //Passive subscreen draws
- Waitframe();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement