Advertisement
Kurausukun

Untitled

Nov 3rd, 2023
890
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.56 KB | None | 0 0
  1. //============================================================================================
  2. /**
  3.  *  Get Unown Form Number
  4.  *
  5.  * @param[in]   ppp pointer to box pokemon structure
  6.  *
  7.  * @retval  0-25:A-Z 26:! 27:?
  8.  */
  9. //============================================================================================
  10. u8  PokePasoParaUnknownFormGet(POKEMON_PASO_PARAM *ppp)
  11. {
  12.     return PokePasoParaGet(ppp,ID_PARA_form_no,NULL);
  13. //  u32 annon_rnd=PokePasoParaGet(ppp,ID_PARA_personal_rnd,NULL);
  14.  
  15. //  return PokemonUnknownFormGet(annon_rnd);
  16. }
  17.  
  18. //the form_no member has been added to the party information as of DS, so remove the method of obtaining from PID
  19. #if 0
  20. //============================================================================================
  21. /**
  22.  *  Get Unown Form Number
  23.  *
  24.  * @param[in]   annon_rnd   the unown's PID
  25.  *
  26.  * @retval  0-25:A-Z 26:! 27:?
  27.  */
  28. //============================================================================================
  29. u8  PokemonUnknownFormGet(u32 annon_rnd)
  30. {
  31.     return (((annon_rnd&0x03000000)>>18)|((annon_rnd&0x030000)>>12)|((annon_rnd&0x0300)>>6)|(annon_rnd&0x03))%28;
  32. }
  33.  
  34. //============================================================================================
  35. /**
  36.  *  Get Unown form number from PID
  37.  *
  38.  * @param[in]   form    Unown form number
  39.  *
  40.  * @retval  PID
  41.  */
  42. //============================================================================================
  43. u32 PokemonPasoUnknownFormRndGet(int form)
  44. {
  45.     return (((form&0x000000c0)<<18)|((form&0x00000030)<<12)|((form&0x0000000c)<<6)|(form&0x00000003));
  46. }
  47. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement