Advertisement
ZoriaRPG

Store Remote FFC InitD into Arrays

Nov 1st, 2018
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.21 KB | None | 0 0
  1. int initd[8]; int initd32[8*32]; initd32_fullmap[8*32*128];
  2. void GetRemoteFFCInitD(int map_id, int screen_id, int ffc_slot, int ptr)
  3. {
  4.     mapdata md = Game->LoadMapData(map_id, screen_id);
  5.     for ( int q = 0; q < 8; ++q ) ptr[q] = md->GetFFCInitD(ffc_slot,q);
  6. }
  7. //GetRemoteFFCInitD(1,6,1,initd); //Stores all FFC InitD[] 1 on map 1, screen 5, for FFC ID 1 into pointer *initd
  8.  
  9. //GetRemoteFFCInitD(1,5,initd32) //Stores the InitD for ALL FFCs on a given screen to *initd32
  10. void GetRemoteFFCInitD(int map_id, int screen_id, int ptr)
  11. {
  12.     mapdata md = Game->LoadMapData(map_id, screen_id);
  13.     int q; int last_q = 8;
  14.     for ( int ff_index = 1;  ff_index < 33; ++q )
  15.     {
  16.         for ( q < last_q; ++q ) ptr[q] = md->GetFFCInitD(ffc_slot,q);
  17.         last_q += 8;
  18.     }
  19.    
  20. }
  21.  
  22. //GetRemoteFFCInitD(1,initd32_fullmap) //Stores the InitD for all 32 ffcs on every one of the 128
  23. //screens on a specific map into *initd32_fullmap
  24. void GetRemoteFFCInitD(int map_id, int ptr)
  25. {
  26.     int q; int last_q = 8; int scr;
  27.     for ( ; scr < 128; ++scr )
  28.     {
  29.         mapdata md = Game->LoadMapData(map_id, scr);
  30.         for ( int ff_index = 1;  ff_index < 33; ++q )
  31.         {
  32.             for ( q < last_q; ++q ) ptr[q] = md->GetFFCInitD(ffc_slot,q);
  33.             last_q += 8;
  34.         }
  35.        
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement