void XETP::send_rooms_known(OutStreamP out,const Rooms &rooms, int worldVersion,Boolean *map) { int mapSize = rooms.acrossMax * rooms.downMax; u_int len = sizeof(int) + // version Rooms::get_write_length() + // rooms sizeof(char) * mapSize; // map if (out->get_protocol() == GenericStream::UDP) { ((UDPOutStreamP)out)->prepare_packet(XETP::add_header(len)); } send_header(out,ROOMS_KNOWN,len); out->write_int(worldVersion); rooms.write(out); for (int n = 0; n < mapSize; n++) { out->write_char((u_char)map[n]); } if (out->get_protocol() == GenericStream::UDP) { ((UDPOutStreamP)out)->done_packet(); } }
void ViewportInfo::write(OutStreamP out) const { out->write_char((char)smoothScroll); logicalSize.write_32(out); extraSize.write(out); out->write_int(radius); }