Advertisement
Bond697

PokeGen Changes

Feb 16th, 2013
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.25 KB | None | 0 0
  1. p->Misc.tGender = data[132] & 0x80 ? 1 : 0;
  2.     p->Misc.tID[0] = *(unsigned short *)&data[12];
  3.     p->Misc.tID[1] = *(unsigned short *)&data[14];
  4.     if (IsGeneration4(targetGame))
  5.     {
  6.         G4ToUnicode((unsigned short *)&data[104],p->Misc.tName,8,0);
  7.     }
  8.  
  9.     else
  10.     {
  11.         G5ToUnicode((unsigned short *)&data[104],p->Misc.tName,8);
  12.     }
  13.  
  14.  
  15. -------------------------------------------------------------------------------------
  16.  
  17. p->Misc.tGender = data[132] & 0x80 ? 1 : 0;
  18.     p->Misc.tID[0] = *(unsigned short *)&data[12];
  19.     p->Misc.tID[1] = *(unsigned short *)&data[14];
  20.     if (IsGeneration4(targetGame))
  21.     {
  22.         if((p->Met.game < GAME_ALL_GEN3) || (p->Met.game == GAME_GC)){
  23.             memcpy(temp_ot_fix, &data[72], 16);
  24.  
  25.             for(int i = 0; i < 16; ++i)
  26.             {
  27.                 if(data[i + 104])
  28.  
  29.                     temp_ot_fix[i] = data[i + 104];
  30.             }
  31.  
  32.             memcpy(&data[104], temp_ot_fix, 16);
  33.         }
  34.  
  35.         G4ToUnicode((unsigned short *)&data[104],p->Misc.tName,8,0);
  36.     }
  37.  
  38.     else
  39.     {
  40.         if((p->Met.game < GAME_ALL_GEN3) || (p->Met.game == GAME_GC)){
  41.             memcpy(temp_ot_fix, &data[72], 16);
  42.  
  43.             for(int i = 0; i < 16; ++i)
  44.             {
  45.                 if(data[i + 104])
  46.  
  47.                     temp_ot_fix[i] = data[i + 104];
  48.             }
  49.  
  50.             memcpy(&data[104], temp_ot_fix, 16);
  51.         }
  52.  
  53.         G5ToUnicode((unsigned short *)&data[104],p->Misc.tName,8);
  54.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement