|
Crossfire Server, Trunk
|
#include "global.h"#include <assert.h>#include <errno.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "image.h"#include "assets.h"
Include dependency graph for image.c:Go to the source code of this file.
Functions | |
| static void | do_face (const Face *face) |
| void | dump_faces (void) |
| uint8_t | find_color (const char *name) |
| int | find_smooth (const Face *face, const Face **smoothed) |
| const char * | get_colorname (uint8_t index) |
| int | get_face_fallback (int faceset, uint16_t imageno) |
| int | is_valid_faceset (int fsn) |
Variables | |
| const Face * | blank_face |
| static const char *const | colorname [] |
| const Face * | empty_face |
| const Face * | smooth_face |
Handles face-related stuff, including the actual face data.
Definition in file image.c.
|
static |
Definition at line 155 of file image.c.
References Face::name, Face::number, and Face::smoothface.
Referenced by dump_faces().
Here is the caller graph for this function:| void dump_faces | ( | void | ) |
Dump all faces to stderr, for debugging purposes.
Definition at line 162 of file image.c.
References do_face(), and faces_for_each().
Referenced by server_dump_faces().
Here is the call graph for this function:
Here is the caller graph for this function:| uint8_t find_color | ( | const char * | name | ) |
Finds a color by name.
| name | color name, case-sensitive. |
Definition at line 74 of file image.c.
References colorname, llevError, LOG(), and give::name.
Referenced by FaceLoader::load().
Here is the call graph for this function:
Here is the caller graph for this function:Find the smooth face for a given face.
| face | the face to find the smoothing face for |
| smoothed | return value: set to smooth face |
Definition at line 101 of file image.c.
References Face::smoothface.
Referenced by send_smooth().
Here is the caller graph for this function:| const char* get_colorname | ( | uint8_t | index | ) |
Definition at line 85 of file image.c.
References colorname, and npc_dialog::index.
Referenced by FaceWriter::write().
Here is the caller graph for this function:| int get_face_fallback | ( | int | faceset, |
| uint16_t | imageno | ||
| ) |
This returns the set we will actually use when sending a face. This is used because the image files may be sparse. This function is recursive. imageno is the face number we are trying to send
If face is not found in specified faceset, tries with 'fallback' faceset.
| faceset | faceset to check |
| imageno | image number |
Definition at line 132 of file image.c.
References face_info::data, face_sets::faces, face_sets::fallback, find_faceset(), get_face_fallback(), face_sets::id, llevError, LOG(), and face_sets::prefix.
Referenced by esrv_send_face(), get_face_fallback(), process_map(), send_image_sums(), and test_faceset().
Here is the call graph for this function:
Here is the caller graph for this function:| int is_valid_faceset | ( | int | fsn | ) |
Checks specified faceset is valid
| fsn | faceset number |
Definition at line 116 of file image.c.
References find_faceset().
Referenced by main(), and set_up_cmd().
Here is the call graph for this function:
Here is the caller graph for this function:| const Face* blank_face |
Following can just as easily be pointers, but it is easier to keep them like this.
Definition at line 35 of file image.c.
Referenced by add_abilities(), animate_object(), artifact_get_face(), Faces::Faces(), knowledge_monster_face(), magic_mapping_mark(), magic_mapping_mark_recursive(), object_clear(), recipe_get_face(), tear_down_wall(), update_position(), and write_rune().
|
static |
The only thing this table is used for now is to translate the colorname in the magicmap field of the face into a numeric index that is then sent to the client for magic map commands. The order of this table must match that of the NDI colors in include/newclient.h.
Definition at line 45 of file image.c.
Referenced by find_color(), and get_colorname().
| const Face * empty_face |
Definition at line 35 of file image.c.
Referenced by esrv_draw_look(), esrv_send_inventory(), and Faces::Faces().
| const Face * smooth_face |
Definition at line 35 of file image.c.
Referenced by Faces::Faces(), and send_smooth().