void pack_string (entity *en, string_types type, const char *s) { ASSERT ((type >= 0) && (type < NUM_STRING_TYPES)); ASSERT (s); #if (DEBUG_MODULE_PACK_ONE || DEBUG_MODULE_PACK_ALL) if (string_type_database[type].debug_pack) { debug_log_entity_args (ENTITY_DEBUG_PACK, ENTITY_DEBUG_STRING, en, type, s); } #endif ASSERT (strlen (s) <= (unsigned)get_string_type_max_length (type)); while (*s) { pack_unsigned_data ((unsigned char)*s++, 8);//DEBUG// } pack_unsigned_data (0, 8);//DEBUG// }
void pack_entity_type (entity_types type) { ASSERT ((type >= 0) && (type < NUM_ENTITY_TYPES)); #if (DEBUG_MODULE_PACK_ONE || DEBUG_MODULE_PACK_ALL) if (entity_type_database[type].debug_pack) { debug_log_entity_args (ENTITY_DEBUG_PACK, ENTITY_DEBUG_ENTITY_TYPE, NULL, type); } #endif pack_unsigned_data (type, NUM_ENTITY_TYPE_PACK_BITS); }