 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
49 if (len <= 0 || !buff) {
55 faceid = tmpnum&0xffff;
139 unsigned int start, stop;
147 if (params == NULL) {
148 LOG(
llevError,
"send_image_sums: bogus \"requestinfo image_sums\": no range provided.\n");
154 start = atoi(params);
155 for (cp = params; *cp !=
'\0'; cp++)
162 || (stop-start) > 1000
171 for (i = start; i <= stop; i++) {
175 LOG(
llevError,
"send_image_sums: buffer overflow, rejecting range %d..%d\n", start, stop);
New face structure - this enforces the notion that data is face by face only - you can not change the...
void SockList_AddInt(SockList *sl, uint32_t data)
Adds a 32 bit value.
#define NS_FACESENT_FACE
Bitmask for the faces_sent[] array - what portion of the face have we sent?
@ llevError
Error, serious thing.
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
Socket structure, represents a client-server connection.
int get_face_fallback(int faceset, uint16_t imageno)
This returns the set we will actually use when sending a face.
void SockList_AddString(SockList *sl, const char *data)
Adds a string without length.
void esrv_send_face(socket_struct *ns, const Face *face, int nocache)
Sends a face to a client if they are in pixmap mode, nothing gets sent in bitmap mode.
face_sets * find_faceset(int id)
static unsigned checksum(const mtar_raw_header_t *rh)
void SockList_Reset(SockList *sl)
Resets the length of the stored data for writing.
AssetsManager * getManager()
char * prefix
Faceset short name, used in pictures names (base, clsc).
void send_face_cmd(char *buff, int len, socket_struct *ns)
Client has requested pixmap that it somehow missed getting.
char * extension
Supplementary description.
size_t SockList_Avail(const SockList *sl)
Returns the available bytes in a SockList instance.
uint32_t facecache
If true, client is caching images.
sstring name
Usually monster-name/combination.
void SockList_AddShort(SockList *sl, uint16_t data)
Adds a 16 bit value.
void SockList_AddChar(SockList *sl, unsigned char c)
Adds an 8 bit value.
char * comment
Human-readable comment for this set.
char * host
Which host it is connected from (ip address).
uint8_t * data
Image data.
uint8_t faceset
Set the client is using, default 0.
char * size
Human-readable set size.
void each(std::function< void(T *)> op)
Apply a function to each asset.
const Face * get_face_by_id(uint16_t id)
Get a face from its unique identifier.
Facesets * facesets()
Get facesets.
void SockList_Init(SockList *sl)
Initializes the SockList instance.
struct face_sets * fallback
Faceset to use when an image is not found in this faceset.
void send_image_info(socket_struct *ns)
Sends the number of images, checksum of the face file, and the image_info file information.
void SockList_Term(SockList *sl)
Frees all resources allocated by a SockList instance.
void send_image_sums(socket_struct *ns, char *params)
Sends requested face information.
void SockList_AddData(SockList *sl, const void *data, size_t len)
Adds a data block.
void SockList_AddLen8Data(SockList *sl, const void *data, size_t len)
Adds a data block prepended with an 8 bit length field.
uint16_t datalen
Length of data.
uint32_t checksum
Checksum of face data.
uint8_t * faces_sent
This is a bitmap on sent face status.
char * fullname
Full faceset name.
Information about one face set.
void Send_With_Handling(socket_struct *ns, SockList *sl)
Calls Write_To_Socket to send data to the client.
face_info * faces
images in this faceset
Contains the base information we use to make up a packet we want to send.
@ llevDebug
Only for debugging purposes.
void SockList_AddPrintf(SockList *sl, const char *format,...)
Adds a printf like formatted string.
in that case they will be relative to whatever the PWD of the crossfire server process is You probably shouldn though Notes on Specific and settings file datadir Usually usr share crossfire Contains data that the server does not need to modify while such as the etc A default install will pack the and treasurelist definitions into a single or trs file and the graphics into a face(metadata) and .tar(bitmaps) file