ZoriaRPG

ZScript Subscreens

Nov 9th, 2016
164
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Subscreen Things
  2. //v0.1.6
  3.  
  4. //0. Store all existing 32 ffcs to an array.
  5. //1. Drawtiles to a bitmap to make a background
  6.     //DrawTile in a huge block width/height could be substituted for bitmaps!
  7. //2. Draw the bitmap to the screen, panning in
  8. //3. Add objects over the background. These cqan be tiles/combos, or sprites via weapons; or ffcs.
  9. //4. Draw a cursor
  10. //5. Allow selecting an object. Selecting and clicking on an ffc object will run a script attached to it.
  11.  
  12. int Subscreen[214747];
  13. int SavedFFCs[214747];
  14.  
  15. void Subscreen_SaveFFCs(){}
  16. void Subsceen_RestoreFFCs(){}
  17.  
  18. //Returns the cursor's go-to Y position for the next object selection in a giver direction.
  19. int GetYRight(int cur_obj_id)){}
  20. int GetYLeft(int cur_obj_id)){}
  21. int GetYDown(int cur_obj_id)){}
  22. int GetYUp(int cur_obj_id){}
  23.  
  24. //Returns the cursor's go-to X position for the next object selection in a giver direction.
  25. int GetXRight(int cur_obj_id)){}
  26. int GetXLeft(int cur_obj_id)){}
  27. int GetXDown(int cur_obj_id)){}
  28. int GetXUp(int cur_obj_id){}
  29.  
  30. //Returns the object ID of the next object selection in a giver direction.
  31. int GetObjRight(int cur_obj_id)){}
  32. int GetObjLeft(int cur_obj_id)){}
  33. int GetObjDown(int cur_obj_id)){}
  34. int GetObjUp(int cur_obj_id){}
  35.  
  36. const int SUBSCREEN_
  37.  
  38. const int LW_SUBSCREEN_OBJECT = //LW Type
  39. const int LWMISC_SUBSCREEN = 1; //Misc fla for a subscreen object lweapon
  40. const int LWF_SUBSCREEN = 01000b; //The flag.
  41.  
  42. void CleanUpSubscreenWeapons(){ for ( int q = Screen->NumLWeapons(); q> 0; q-- ) {
  43.     lweapon l = Screen->LoadLWeapon(q);
  44.     if ( ( l->ID == LW_SUBSCREEN_OBJECT && (l->Misc[LWMISC_SUBSCREEN]&LWF_SUBSCREEN != 0 ) ) Remove(l);
  45. }
  46.  
  47. //Called if an object has a custom function calml tied to it.
  48. void SubmenuCustomFunctions(int fc){
  49.     if ( fc == 1 ) {}
  50.     else if ( fc == 2 ) {}
  51.     else if ( fc == 3 ) {}
  52. }
  53.  
  54. const int SUBSCREEN_NUMOBJECTS = 176;
  55.  
  56. const int SUBSCREEN_ID = 0;
  57.  
  58. const int SUBSCREEN_POS_ //On the grid
  59. const int SUBSCREEN_POSX =
  60. const int SUBSCREEN_POSY =
  61.  
  62. //Object Class Fields
  63.  
  64. //Subscreen page ID
  65. //ID
  66. //PosX (-1 if grid)
  67. //PosY (-1 if grid)
  68. //PosGrid (-1 if x/y)
  69. //Class/Type (tile, combo, sprited object, ffc)
  70. //Combo ( if an ffc, this is its data; otherwise DrawCombo)
  71. //Tile (-1 if a combo, ffc, or weapon)
  72. //Sprite (-1 if a tile, combo, or ffc
  73. //Script (if ffc, it will run this script)
  74. //Sound : Selecting will play this sound. -1 for standard.
  75. //CSet : If a combo, or tile, you may specify the cset.
  76. //Flash CSet
  77. //Flip : If sprited, you can flip it.
  78. //Opacity : If drawn with tiles, or combos, use this opacity
  79. //LeftMouseAction: Flas for what a left click does.
  80. //RightMouseAction : Flags for what a right mouse click does.
  81.     // 001b sets to A.
  82.     // 010b sets to B
  83.     // 100b Run Script if FFC, or function ID speciied by special function, otherwise.
  84. //Flags :
  85.     // 001b Inventory Item
  86.     // 010b runs function  [...]
  87.     // 100b disabled
  88.     //1000b No press actiom
  89. //Function ID: Runs a special function set up as a list by the user.
  90. //Cursor ID : Set a special cursor type when this is selected. -1 for standard.
  91. //RefItem : Inventory Item to Select
  92. //Screen Index Position (0 to 255)
  93. //NextRight : Pressing right will move to this index positon
  94. //NextLeft
  95. //NextUp
  96. //NextDown
  97. //FFC Specific:
  98.     // Vy
  99.     // Vx
  100.     // Ax
  101.     // Ay
  102.     //Delay
  103.    
  104.     // Link
  105.     // Flag0
  106.     // Flag1
  107.     // Flag2
  108.     // Flag3
  109.     // Flag4
  110.     // Flag5
  111.     // Flag6
  112.     // Flag7
  113.     // Flag8
  114.     // Flag9
  115.     // Misc0
  116.     // Misc1
  117.     // Misc2
  118.     // Misc3
  119.     // Misc4
  120.     // Misc5
  121.     // Misc6
  122.     // Misc7
  123.     // Misc8
  124.     // Misc9
  125.     // Misc10
  126.     // Misc11
  127.     // Misc12
  128.     // Misc13
  129.     // Misc14
  130.    
  131. // Sprited Objects and FFCs
  132.     // Extend (sprited object, only)
  133.     // TileWidth :
  134.     // TileHeight
  135.     // EffectWidth / HitWidth
  136.     // EffectHeight / HitHeight
  137. // Stringbox String
  138. //ZQuest String
  139. //Extra Button Flags
  140. // Ex1
  141. // Ex2
  142. // Ex3
  143. // Ex 4
  144.     //00001 : Inspect / Info
  145.  
  146. const int SUBSCREEN_ITEM
  147. const int SUBSCREEN_SELECTION
  148. const int SUBSCREEN_SELECTION_FLAGS
  149. const int SUBSCREEN_OBJTILE
  150. const int SUBSCREEN_OBJSPRITE
  151. const int SUBSCREEN_OBJCOMBO
  152. const int SUBSCREEN_OBJCSET
  153. const int SUBSCREEN_OBJ_CLASS /// TIle, combo, sprite (uses a weapon or item), or ffc
  154. const int SUBSCREEN_OBJ_SCRIPT // If an ffc, this is the script that selecting it runs.
  155. const int SUBSCREEN_OBJ_DATA //The combo, if it is an ffc
  156. const int SUBSCREEN_OBJ_R_NEXT
  157. const int SUBSCREEN_OBJ_D_NEXT
  158. const int SUBSCREEN_OBJ_U_NEXT
  159. const int SUBSCREEN_OBJ_L_NEXT
  160.  
  161. const int SUBSCREEN_NEXTOBJECT
  162.  
  163. const int SUBSCREEN_B_FIRSTTILE = //The first tile of a page that will be copied to the bitmap for the background.
  164.  
  165. const int SUBSCREEN_ROW =
  166. const int SUBSCREEN_COL =
  167. const int SUBSCREEN_CUR_ID //The present of N subscreens
  168. const int SUBSCREEN_PANTIMER
  169. const int SUBSCREEN_PANDIR
  170. const int SUBSCREEN_CURSELECTION
  171. const int SUBSCREEN_CURITEM
  172.  
  173.  
  174. const int SUBSCREEN_CURSOR_TILE
  175. const int SUBSCREEN_CURSOR_COMBO
  176. const int SUBSCREEN_CURSOR_SPRITE
  177.  
  178.  
  179.  
  180. void DisplaySubscreen(int id){
  181.    
  182.    
  183.    
  184. }
  185.  
  186.  
  187. bool CursorOnObject{}
  188.  
  189. bool ClickObject{}
  190.  
  191. bool SelectObject{}
  192.  
  193. bool SetItem(int selection, int slot){}
  194.  
  195. //Draw the subscreen to a bitmap
  196.  
  197. void GenerateSubscreen(){}
  198.  
  199. //Pan the Bitmap
  200. //Set the pan direction, the screen that is fading in, and the screen fading out.
  201. void FadeSubscreen(int dir, int id, int old_id){}
  202.  
  203. //Creates the bitmap of the play screen, for panning in. Probably pointless.
  204. void GenerateScreen(){}
  205.  
  206. //Stores objects in the array
  207. void AddSubscreenObject(int id, int type, bool select, int screen_id, int position_x, int position_y, int item_id, int tile, int sprite, int cset, int opacity){}
  208.  
  209. //Reads objects from the array, and adds them tot he subscreen
  210. void DrawSubscreenObjects(){}
  211.  
  212. //Reads the present cursor position, and the array values for what ID it will move to when pressing a button.
  213. void DrawCursor(int tile, int sprite, int pos_x, int pos_y){}
  214.  
  215. void MoveCursor(int dir, int pos){}
  216.  
  217. int FindNextSelection(){}
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×