 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
26 auto slash = strrchr(filename.c_str(),
'/');
27 char *dup = slash ?
strdup_local(strrchr(filename.c_str(),
'/') + 1) : strdup(filename.c_str());
39 for (
size_t p = 0; p < count - 1; p++) {
51 if (
face->number >=
set->allocated) {
53 for (
int i =
set->allocated; i <= face->number; i++) {
54 set->faces[i].data = NULL;
55 set->faces[i].datalen = 0;
56 set->faces[i].checksum = 0;
58 set->allocated =
face->number + 1;
61 if (
set->faces[
face->number].data) {
63 free(
set->faces[
face->number].data);
67 set->faces[
face->number].data =
static_cast<uint8_t *
>(malloc(
set->faces[
face->number].datalen));
68 if (!
set->faces[
face->number].data) {
72 set->faces[
face->number].checksum = 0;
73 for (
size_t i = 0; i <
set->faces[
face->number].datalen; i++) {
75 set->faces[
face->number].checksum +=
set->faces[
face->number].data[i];
76 set->faces[
face->number].checksum &= 0xffffffff;
New face structure - this enforces the notion that data is face by face only - you can not change the...
char * bufferreader_data(BufferReader *br)
Get the whole buffer, independently of the calls to bufferreader_next_line().
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
Available facesets for clients.
size_t bufferreader_data_length(BufferReader *br)
Return the length of the buffer data.
size_t split_string(char *str, char *array[], size_t array_size, char sep)
Splits a string delimited by passed in sep value into characters into an array of strings.
sstring name
Usually monster-name/combination.
Actual image data the client will display.
T * get(const Key &name)
Get a named asset.
void fatal(enum fatal_error err)
fatal() is meant to be called whenever a fatal signal is intercepted.
virtual void load(BufferReader *reader, const std::string &filename) override
Load assets from the specified reader.
PngLoader(Faces *faces, Facesets *facesets)
static std::vector< std::string > split(const std::string &field, const std::string &by)
Information about one face set.
*envar *is the environment if one that can also be used as an override If both the flag and the envar are set
@ llevDebug
Only for debugging purposes.
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