Crossfire Server, Trunk
|
Those flags are object-related flags, stored in the obj::flags fields. More...
Those flags are object-related flags, stored in the obj::flags fields.
Flag structure now changed. Each flag is now a bit offset, starting at zero. The macros will update/read the appropriate flag element in the object structure.
Hopefully, since these offsets are integer constants set at run time, the compiler will reduce the macros something as simple as the old system was.
Flags now have FLAG as the prefix. This to be clearer, and also to make sure F_ names are not still being used anyplace.
The macros below assume that the flag size for each element is 32 bits. IF it is smaller, bad things will happen. See structs.h for more info.
All functions should use the macros below. In process of converting to the new system, I find several files that did not use the previous macros.
If any FLAG's are or changed, make sure the flag_names structure in common/loader.l is updated.
Values can go up to 127 before the size of the flags array in the object structure needs to be enlarged. So there are 18 available flags slots