Advertisement
Mr-A

A-Engine <interface.h> v0.07

Aug 5th, 2014
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.56 KB | None | 0 0
  1. //==========Interface.h===========
  2. #ifndef INTERFACE_INCLUDED
  3. #define INTERFACE_INCLUDED
  4.  
  5. //=================================
  6. // included dependencies
  7. #include "Object.h"
  8. #include <string>
  9. #include <vector>
  10. //=================================
  11.  
  12.  
  13. struct CharInMenu
  14. {
  15.     int key , posx, posy;           //the key position values and the real position of the pic
  16.     int id;                         //the id of the character
  17.     spritegrid tex;                 //the texture stored in a custom class "spritegrid"
  18.     int up=4321, down=4321;         //the value of the key to go to when the corressponding button is pressed
  19.     int left=4321, right=4321;
  20.     int _disjoin=4321;
  21.     int _showstance=4321;
  22.     int _destroystance=4321;
  23.     int _effctfrm=0;
  24.     int _whnhighlght=0;
  25.     int _psfrm=4321;
  26.     int highlight=0;
  27.     int whenchoose=0;
  28.     bool isbg=false;
  29.     bool flags[1]= {false};         //actually "switches". that is the old name which is used throughout this source
  30. };
  31.  
  32. class LoadMenuStuff
  33. {
  34. public:
  35.     int _charschoices[10]= {4321, 4321, 4321, 4321, 4321, 4321, 4321, 4321, 4321, 4321};
  36.     int playersselections[4]= {0,0,0,0};
  37.     bool LOADNOW=false;
  38.     CharInMenu Chars[200];         //chars in selection data
  39.     spritegrid CharMenuBG;         //stores the charater menu texture
  40.     int MenuID=10;                 //this var tells what menu you're currently on
  41.     int _nextbutton=4;
  42.     int _backbutton=5;
  43.     int Chars_index=0;
  44.     int _unallocatedobjindx=8;
  45.     int _currbgkey=0;
  46.     int _bg_key=4321;
  47.     int CharMenuBG_x=0, CharMenuBG_y=0;
  48.     int SelectionCurr_key[4]= {0,0,0,0};
  49.     int _clicktojoinpos[8]= {0, 0, 0, 0, 0, 0, 0, 0}; //from 0->3=posx; from 4->7;posy;
  50.     int _clicktojoinfrms[8]= {0, 0, 0, 0, 0, 0, 0, 0}; // from 0->3=Initial; from 3->7=WhenJoin;
  51.     int _highlightframes[8]= {0, 0, 0, 0, 0, 0, 0, 0}; // from 0->3=Initial; from 3->7=WhenChoose;
  52.     int _humanplayersjoining[4]= {4321, 4321, 4321, 4321};
  53.     int _playerorigins[20]= {0,0  ,0,0  ,0,0  ,0,0  ,0,0  ,0,0  ,0,0  ,0,0  ,0,0  ,0,0};
  54.     std::string SelectionMenuBG_dir;
  55.     std::string _objectstoload=":";
  56.     LOAD _menusdata;
  57.  
  58.     std::vector<std::vector<int> > P_INPUTDATA;
  59.  
  60.  
  61.     LoadMenuStuff( LOAD * LOADED );
  62.     void LoadIntros();
  63.     void LoadCharacterSelection(LOAD*LOADED);
  64.     void LoadMainMenu();
  65.     void LoadBGSelection();
  66.     void LoadOptions();
  67.     void LoadCredits();
  68.     void Update_Interface( LOAD * LOADED );
  69. };
  70.  
  71. //Renders textures into the screen
  72. void BlitTexture(spritegrid griddy, int x, int y);
  73.  
  74. #endif // INTERFACE_INCLUDED
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement