diff MM7.h @ 828:0f56abdcce94

Massive refactors of spells + PID (packed id) macros introduced.
author Nomad
date Wed, 27 Mar 2013 00:27:38 +0200
parents c1da83d8223f
children ae8f83e1b0cf
line wrap: on
line diff
--- a/MM7.h	Tue Mar 26 20:06:51 2013 +0200
+++ b/MM7.h	Wed Mar 27 00:27:38 2013 +0200
@@ -22,6 +22,8 @@
 #define BYTE3(a) (*((unsigned char *)&a + 3))
 
 #define PID(type, id) (unsigned int)((((8 * (id))) | (type)) & 0xFFFF)  // packed id
+#define PID_TYPE(pid) (unsigned int)((pid) & 7)                         // extract type
+#define PID_ID(pid)   (unsigned int)(((pid) & 0xFFFF) >> 3)             // extract value
 
 
 typedef unsigned __int16 _WORD;