Table of Contents
Engine source. It contains the network communication, graphics and sound.
This sections describes the diffrent file format that Teewars uses.
int ID int version int size int swaplen
int num_item_types int num_items int num_raw_data
int item_size int data_size
types { int typeid int start int num } * (num_item_types)
item_offsets { int offset } * (num_items)
raw_data_offsets { int offset } * (num_raw_data)
item { int type_and_id int size datai { int data } * (size/4) } * (num_items)
raw_data { byte d } * X
Notes: swaplen tells how much of the data that should be swapped types.start is an index into offsets item.size must be a multiple of 4 the types must be sorted by type id special typeid of 0xffff means raw data, and there fore should always come last
Could change: item.size could be removed
0x8010 = image 0x8020 = tilemap 0x8030 = collision
collision { int width int height int raw_data_index } data { byte data } * (width * height)
image { int width int height int raw_data_index } pixel { byte r byte g byte b byte a } * (width * height)
tilemap { int image int width int height int x int y int scale int raw_data_index } data { byte data } * (width * height)
Sent by the client when it wants to connect. str32 name str32 clan str32 password str32 skin
Sent by the server as a respons to CLIENT_CONNECT, when it accepts a connection. str32 mapname