 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
103 if (op->
state >= max_state) {
167 for (; head != NULL; head = head->
more) {
181 fprintf(stderr,
"id name faces\n");
183 anim->num_animations, anim->has_blank ?
" (with blank)" :
""); });
#define FLAG_IS_TURNABLE
Object can change face with direction.
@ llevError
Problems requiring server admin to fix.
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
#define QUERY_FLAG(xyz, p)
struct archetype * arch
Pointer to archetype.
StringBuffer * stringbuffer_new(void)
Create a new string buffer.
int16_t invisible
How much longer the object will be invis.
if you malloc the data for the make sure to free it when done There is also the newclient h file which is shared between the client and server This file contains the definition of the as well as many defined values for constants of varying you will need to grab these constant values for yourself Many of the constants in this file are used in the protocol to denote types Image Caching ~ Image caching has been implemented on the with necessary server support to handle it This section will briefly describe how image caching works on the protocol as well as how the current client does it the client checks for an option denoting the image caching is desired If we initialize all the images to a default value this means we don t need to put special checks into the drawing code to see if we have an image we just draw the default we know what filename to store it as we request the server to do image caching This is done by or ing the cache directive to the image mode we want C when the server finds an image number that it has not send to the it sends us a name command information us the number to name and there is no space between that the and the name Such formating is difficult but the above example illustrates the data is sent The client then checks for the existence of the image locally It is up to the client to organize images and then splits them into sub directories based on the first letters in the above the file would be crossfire images CS CSword If the client does not have the image or otherwise needs a copy from the server
AllAnimations * animations()
Get animations.
#define SET_ANIMATION(ob, newanim)
int8_t direction
Means the object is moving that way.
const Face * blank_face
Following can just as easily be pointers, but it is easier to keep them like this.
cmake_minimum_required(VERSION 3.15...4.1) project(crossfire LANGUAGES CXX) set(VERSION 1.75.0) option(METASERVER2 "Metaserver2 support (requires curl)" ON) option(MAPPER "Build crossfire-mapper (requires gdlib)" ON) find_package(FLEX REQUIRED) find_package(Python COMPONENTS Interpreter Development) include_directories(include include/random_maps $
AssetsManager * getManager()
#define FLAG_ALIVE
Object can fight (or be fought)
char * stringbuffer_finish(StringBuffer *sb)
Deallocate the string buffer instance and return the string.
void object_update(object *op, int action)
object_update() updates the array which represents the map.
uint8_t temp_anim_speed
Ticks between temporary animation-frames.
uint16_t number
This is the image unique identifier.
object clone
An object from which to do object_copy()
void object_dump(const object *op, StringBuffer *sb)
Dumps an object.
Player Stats effect how well a character can survie and interact inside the crossfire world This section discusses the various what they and how they effect the player s actions Also in this section are the stat modifiers that specific classes professions bring Player and sps the current and maximum the Current and Maximum The Current Sp can go somewhat negative When Sp is negative not all spells can be and a more negative Sp makes spell casting less likey to succeed can affect Damage and how the characters as well as how often the character can attack this affects the prices when buying and selling items if this drops the player will start losing hit points wd Cleric or Dwarf sm Elf wd Fireborn B
void apply_anim_suffix(object *who, const char *suffix)
Applies a compound animation to an object.
#define HEAD(op)
Returns the head part of an object.
const Face * face
Face with colors.
uint8_t last_anim
Last sequence used to draw face.
uint8_t type
PLAYER, BULLET, etc.
uint8_t facings
How many facings (1,2,4,8).
void each(std::function< void(T *)> op)
Apply a function to each asset.
int8_t facing
Object is oriented/facing that way.
const Animations * animation
Animation of this item, NULL if not animated.
uint8_t num_animations
How many different faces to animate, size of the faces array.
#define MAX_BUF
Used for all kinds of things.
add_library(cfpython MODULE ../common/plugin_common.cpp cfpython.cpp cfpython_archetype.cpp cfpython_map.cpp cfpython_object.cpp cfpython_party.cpp cfpython_region.cpp cjson.cpp) set_target_properties(cfpython PROPERTIES PREFIX "") include_directories(../common/include include $
object * head
Points to the main object of a large body.
Animations * try_find_animation(const char *name)
A buffer that will be expanded as content is added to it.
bool has_blank
If this animation contains a blank face or not, used for invisibility.
This represents one animation.
void animate_object(object *op, int dir)
Updates the face-variable of an object.
#define CLEAR_FLAG(xyz, p)
#define NUM_ANIMATIONS(ob)
#define UP_OBJ_FACE
Only thing that changed was the face.
void dump_animations(void)
Dump all animations to stderr, for debugging purposes.
target_precompile_headers(cfpython PRIVATE ../../include/global.h) target_link_libraries(cfpython PUBLIC $
uint8_t state
How the object was last drawn (animation)
object * more
Pointer to the rest of a large body of objects.
const Animations * temp_animation
A temporary animation.
*envar *is the environment if one that can also be used as an override If both the flag and the envar are set
sstring name
Name of the animation sequence.