Advertisement
Guest User

Untitled

a guest
Jul 9th, 2014
230
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.94 KB | None
  1. #else
  2. # define WEP_MAXCOUNT 72
  3. # define WEP_FIRST2 25
  4. # define WEP_FIRST3 49
  5. .float _WS1_weapons;
  6. .float _WS2_weapons;
  7. .float _WS3_weapons;
  8. # define WEPSET_BIT1(a) (((a) < WEP_FIRST2) ? power2of((a) - WEP_FIRST) : 0)
  9. # define WEPSET_BIT2(a) (((a) >= WEP_FIRST2) ? power2of((a) - WEP_FIRST2) : 0)
  10. # define WEPSET_BIT3(a) (((a) >= WEP_FIRST3) ? power2of((a) - WEP_FIRST3) : 0)
  11. # define WEPSET_DECLARE_A(a) float _WS1_##a, _WS2_##a, _WS3_##a
  12. # define WEPSET_CLEAR_E(e) ((e)._WS1_weapons = (e)._WS2_weapons = (e)._WS3_weapons = 0)
  13. # define WEPSET_CLEAR_A(a) ((_WS1_##a) = (_WS2_##a) = (_WS3_##a) = 0)
  14. # define WEPSET_EMPTY_E(e) ((e)._WS1_weapons == 0 && (e)._WS2_weapons == 0 && (e)._WS3_weapons == 0)
  15. # define WEPSET_EMPTY_A(a) ((_WS1_##a) == 0 && (_WS2_##a) == 0 && (_WS3_##a) == 0)
  16. # define WEPSET_COPY_AS(a) ((_WS1_##a) = getstati(STAT_WEAPONS), (_WS2_##a) = getstati(STAT_WEAPONS2), (_WS3_##a) = getstati(STAT_WEAPONS3))
  17. # define WEPSET_ADDSTAT() addstat(STAT_WEAPONS, AS_INT, _WS1_weapons); addstat(STAT_WEAPONS2, AS_INT, _WS2_weapons); addstat(STAT_WEAPONS3, AS_INT, _WS3_weapons)
  18. # define WEPSET_WRITE_E(dest,a) WriteInt24_t(dest, (a)._WS1_weapons); WriteInt24_t(dest, (a)._WS2_weapons); WriteInt24_t(dest, (a)._WS3_weapons)
  19. # define WEPSET_WRITE_A(dest,a) WriteInt24_t(dest, _WS1_##a); WriteInt24_t(dest, _WS2_##a); WriteInt24_t(dest, _WS3_##a)
  20. # define WEPSET_WRITE_W(dest,a) WriteInt24_t(dest, WEPSET_BIT1(a)); WriteInt24_t(dest, WEPSET_BIT2(a)); WriteInt24_t(dest, WEPSET_BIT3(a))
  21. # define WEPSET_READ_E(a) (a)._WS1_weapons = ReadInt24_t(); (a)._WS2_weapons = ReadInt24_t(); (a)._WS3_weapons = ReadInt24_t()
  22. # define WEPSET_READ_A(a) (_WS1_##a) = ReadInt24_t(); (_WS2_##a) = ReadInt24_t(); (_WS3_##a) = ReadInt24_t()
  23.  
  24. # define WEPSET_OP1_EE(a,b,mergeop,x) (((a)._WS1_weapons x (b)._WS1_weapons) mergeop ((a)._WS2_weapons x (b)._WS2_weapons) mergeop ((a)._WS3_weapons x (b)._WS3_weapons))
  25. # define WEPSET_OP2_EE(a,b,mergeop,x,y) (((a)._WS1_weapons x (b)._WS1_weapons y (a)._WS1_weapons) mergeop ((a)._WS2_weapons x (b)._WS2_weapons y (a)._WS2_weapons) mergeop ((a)._WS3_weapons x (b)._WS3_weapons y (a)._WS3_weapons))
  26.  
  27. # define WEPSET_OP1_EA(a,b,mergeop,x) (((a)._WS1_weapons x _WS1_##b) mergeop ((a)._WS2_weapons x _WS2_##b) mergeop ((a)._WS3_weapons x _WS3_##b))
  28. # define WEPSET_OP2_EA(a,b,mergeop,x,y) (((a)._WS1_weapons x _WS1_##b y (a)._WS1_weapons) mergeop ((a)._WS2_weapons x _WS2_##b y (a)._WS2_weapons) mergeop ((a)._WS3_weapons x _WS3_##b y (a)._WS3_weapons))
  29.  
  30. # define WEPSET_OP1_EW(a,b,mergeop,x) (((a)._WS1_weapons x WEPSET_BIT1(b)) mergeop ((a)._WS2_weapons x WEPSET_BIT2(b)) mergeop ((a)._WS3_weapons x WEPSET_BIT3(b)))
  31. # define WEPSET_OP2_EW(a,b,mergeop,x,y) (((a)._WS1_weapons x WEPSET_BIT1(b) y (a)._WS1_weapons) mergeop ((a)._WS2_weapons x WEPSET_BIT2(b) y (a)._WS2_weapons) mergeop ((a)._WS3_weapons x WEPSET_BIT3(b) y (a)._WS3_weapons))
  32.  
  33. # define WEPSET_OP1_AE(a,b,mergeop,x) ((_WS1_##a x (b)._WS1_weapons) mergeop (_WS2_##a x (b)._WS2_weapons) mergeop (_WS3_##a x (b)._WS3_weapons))
  34. # define WEPSET_OP2_AE(a,b,mergeop,x,y) ((_WS1_##a x (b)._WS1_weapons y _WS1_##a) mergeop (_WS2_##a x (b)._WS2_weapons y _WS2_##a) mergeop (_WS3_##a x (b)._WS3_weapons y _WS3_##a))
  35.  
  36. # define WEPSET_OP1_AA(a,b,mergeop,x) ((_WS1_##a x _WS1_##b) mergeop (_WS2_##a x _WS2_##b) mergeop (_WS3_##a x _WS3_##b))
  37. # define WEPSET_OP2_AA(a,b,mergeop,x,y) ((_WS1_##a x _WS1_##b y _WS1_##a) mergeop (_WS2_##a x _WS2_##b y _WS2_##a) mergeop (_WS3_##a x _WS3_##b y _WS3_##a))
  38.  
  39. # define WEPSET_OP1_AW(a,b,mergeop,x) ((_WS1_##a x WEPSET_BIT1(b)) mergeop (_WS2_##a x WEPSET_BIT2(b)) mergeop (_WS3_##a x WEPSET_BIT3(b)))
  40. # define WEPSET_OP2_AW(a,b,mergeop,x,y) ((_WS1_##a x WEPSET_BIT1(b) y _WS1_##a) mergeop (_WS2_##a x WEPSET_BIT2(b) y _WS2_##a) mergeop (_WS3_##a x WEPSET_BIT3(b) y _WS3_##a))
  41. #endif
Advertisement
RAW Paste Data Copied
Advertisement