Crossfire Server, Trunk
|
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include "global.h"
#include <ctype.h>
#include "loader.h"
#include "newserver.h"
#include "sproto.h"
#include "stringbuffer.h"
#include <unistd.h>
Go to the source code of this file.
Data Structures | |
struct | yy_buffer_state |
struct | yy_trans_info |
Macros | |
#define | BEGIN (yy_start) = 1 + 2 * |
#define | ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) |
#define | EOB_ACT_CONTINUE_SCAN 0 |
#define | EOB_ACT_END_OF_FILE 1 |
#define | EOB_ACT_LAST_MATCH 2 |
#define | FLEX_BETA |
#define | FLEX_SCANNER |
#define | FLEXINT_H |
#define | FVAL atof(yval()) |
#define | INITIAL 0 |
#define | INT16_MAX (32767) |
#define | INT16_MIN (-32767-1) |
#define | INT32_MAX (2147483647) |
#define | INT32_MIN (-2147483647-1) |
#define | INT8_MAX (127) |
#define | INT8_MIN (-128) |
#define | IVAL atoi(yval()) |
#define | LORE 2 |
#define | MAXDEPTH 10 |
#define | MESSAGE 1 |
#define | REJECT reject_used_but_not_detected |
#define | SET_OR_CLEAR_FLAG(op, flag, val) { if (val) SET_FLAG(op, flag); else CLEAR_FLAG(op, flag); } |
#define | SET_RESIST(op, type, val) op->resist[type] = val; |
#define | SIZE_MAX (~(size_t)0) |
#define | UINT16_MAX (65535U) |
#define | UINT32_MAX (4294967295U) |
#define | UINT8_MAX (255U) |
#define | unput(c) yyunput( c, (yytext_ptr) ) |
#define | YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
#define | YY_BREAK /*LINTED*/break; |
#define | YY_BUF_SIZE 16384 |
#define | YY_BUFFER_EOF_PENDING 2 |
#define | YY_BUFFER_NEW 0 |
#define | YY_BUFFER_NORMAL 1 |
#define | YY_CURRENT_BUFFER |
#define | YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
#define | YY_DECL int lex_load(int *depth, object **items, int maxdepth, int map_flags, int linemode, int *ismore, bool arch_init, bool artifact_init) |
#define | YY_DO_BEFORE_ACTION |
#define | YY_END_OF_BUFFER 225 |
#define | YY_END_OF_BUFFER_CHAR 0 |
#define | YY_EXIT_FAILURE 2 |
#define | YY_EXTRA_TYPE void * |
#define | YY_FATAL_ERROR(msg) yy_fatal_error( msg ) |
#define | YY_FLEX_MAJOR_VERSION 2 |
#define | YY_FLEX_MINOR_VERSION 6 |
#define | YY_FLEX_SUBMINOR_VERSION 4 |
#define | YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) |
#define | YY_INPUT(buf, result, max_size) |
#define | YY_INT_ALIGNED short int |
#define | YY_LESS_LINENO(n) |
#define | YY_LINENO_REWIND_TO(ptr) |
#define | YY_MORE_ADJ 0 |
#define | yy_new_buffer yy_create_buffer |
#define | YY_NEW_FILE yyrestart( yyin ) |
#define | YY_NO_INPUT 1 |
#define | YY_NULL 0 |
#define | YY_NUM_RULES 224 |
#define | YY_READ_BUF_SIZE 8192 |
#define | YY_RESTORE_YY_MORE_OFFSET |
#define | YY_RULE_SETUP |
#define | YY_SC_TO_UI(c) ((YY_CHAR) (c)) |
#define | yy_set_bol(at_bol) |
#define | yy_set_interactive(is_interactive) |
#define | YY_SKIP_YYWRAP |
#define | YY_START (((yy_start) - 1) / 2) |
#define | YY_START_STACK_INCR 25 |
#define | YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
#define | YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) |
#define | YY_STRUCT_YY_BUFFER_STATE |
#define | YY_TYPEDEF_YY_BUFFER_STATE |
#define | YY_TYPEDEF_YY_SIZE_T |
#define | YY_USER_ACTION |
#define | yyconst const |
#define | yyless(n) |
#define | yyless(n) |
#define | yymore() yymore_used_but_not_detected |
#define | yynoreturn |
#define | YYSTATE YY_START |
#define | YYTABLES_NAME "yytables" |
#define | yyterminate() return YY_NULL |
#define | yytext_ptr yytext |
#define | yywrap() (/*CONSTCOND*/1) |
Typedefs | |
typedef short int | flex_int16_t |
typedef int | flex_int32_t |
typedef signed char | flex_int8_t |
typedef unsigned short int | flex_uint16_t |
typedef unsigned int | flex_uint32_t |
typedef unsigned char | flex_uint8_t |
typedef struct yy_buffer_state * | YY_BUFFER_STATE |
typedef flex_uint8_t | YY_CHAR |
typedef size_t | yy_size_t |
typedef int | yy_state_type |
Functions | |
static void | add_key_value (object *op) |
static void | check_loaded_object (object *op, bool arch_init) |
void | free_loader (void) |
if (!(yy_init)) | |
int | load_object (FILE *fp, object *op, int bufstate, int map_flags, bool artifact_init) |
int | load_object_from_reader (BufferReader *reader, object *op, int map_flags, bool arch_init, bool artifact_init) |
static void | reverse_ob_inv (object *op) |
static void | reverse_ob_key_values (object *op) |
static void | set_body_info (object *op, char *params) |
static void | set_move (MoveType *mt, char *params, const char *prefix) |
int | set_variable (object *op, const char *buf) |
while (1) | |
static char * | yval (void) |
YY_BUFFER_STATE | yy_create_buffer (FILE *file, int size) |
void | yy_delete_buffer (YY_BUFFER_STATE b) |
static void yynoreturn | yy_fatal_error (const char *msg) |
void | yy_flush_buffer (YY_BUFFER_STATE b) |
static int | yy_get_next_buffer (void) |
static yy_state_type | yy_get_previous_state (void) |
static void | yy_init_buffer (YY_BUFFER_STATE b, FILE *file) |
static int | yy_init_globals (void) |
static void | yy_load_buffer_state (void) |
static void | yy_pop_state (void) |
static void | yy_push_state (int _new_state) |
YY_BUFFER_STATE | yy_scan_buffer (char *base, yy_size_t size) |
YY_BUFFER_STATE | yy_scan_bytes (const char *bytes, int len) |
YY_BUFFER_STATE | yy_scan_string (const char *yy_str) |
void | yy_switch_to_buffer (YY_BUFFER_STATE new_buffer) |
static yy_state_type | yy_try_NUL_trans (yy_state_type current_state) |
void * | yyalloc (yy_size_t) |
static void | yyensure_buffer_stack (void) |
void | yyfree (void *) |
int | yyget_debug (void) |
YY_EXTRA_TYPE | yyget_extra (void) |
FILE * | yyget_in (void) |
int | yyget_leng (void) |
int | yyget_lineno (void) |
FILE * | yyget_out (void) |
char * | yyget_text (void) |
int | yylex_destroy (void) |
void | yypop_buffer_state (void) |
void | yypush_buffer_state (YY_BUFFER_STATE new_buffer) |
void * | yyrealloc (void *, yy_size_t) |
void | yyrestart (FILE *input_file) |
void | yyset_debug (int debug_flag) |
void | yyset_extra (YY_EXTRA_TYPE user_defined) |
void | yyset_in (FILE *_in_str) |
void | yyset_lineno (int _line_number) |
void | yyset_out (FILE *_out_str) |
Variables | |
static int | lex_error = 0 |
static char | lorebuf [HUGE_BUF] |
static char | msgbuf [HUGE_BUF] |
size_t | msglen = 0 |
static bool | seen_object = false |
size_t | total_msglen = 0 |
static const flex_int16_t | yy_accept [2024] |
int | yy_act |
char * | yy_bp |
static YY_BUFFER_STATE * | yy_buffer_stack = NULL |
static size_t | yy_buffer_stack_max = 0 |
static size_t | yy_buffer_stack_top = 0 |
static char * | yy_c_buf_p = NULL |
char * | yy_cp |
YY_DECL | |
static int | yy_did_buffer_switch_on_eof |
int | yy_flex_debug = 0 |
static char | yy_hold_char |
static int | yy_init = 0 |
static int | yy_n_chars |
static const yy_state_type | yy_NUL_trans [2024] |
static const flex_int16_t | yy_nxt [][128] |
static int | yy_start = 0 |
static int * | yy_start_stack = NULL |
static int | yy_start_stack_depth = 0 |
static int | yy_start_stack_ptr = 0 |
FILE * | yyin = NULL |
int | yyleng |
int | yylineno = 1 |
FILE * | yyout = NULL |
char * | yytext |
#define BEGIN (yy_start) = 1 + 2 * |
Definition at line 118 of file loader.cpp.
Definition at line 36332 of file loader.cpp.
#define EOB_ACT_CONTINUE_SCAN 0 |
Definition at line 162 of file loader.cpp.
#define EOB_ACT_END_OF_FILE 1 |
Definition at line 163 of file loader.cpp.
#define EOB_ACT_LAST_MATCH 2 |
Definition at line 164 of file loader.cpp.
#define FLEX_BETA |
Definition at line 14 of file loader.cpp.
#define FLEX_SCANNER |
Definition at line 9 of file loader.cpp.
#define FLEXINT_H |
Definition at line 30 of file loader.cpp.
#define FVAL atof(yval()) |
Next value as float.
Definition at line 35894 of file loader.cpp.
#define INITIAL 0 |
Definition at line 36229 of file loader.cpp.
#define INT16_MAX (32767) |
Definition at line 72 of file loader.cpp.
#define INT16_MIN (-32767-1) |
Definition at line 63 of file loader.cpp.
#define INT32_MAX (2147483647) |
Definition at line 75 of file loader.cpp.
#define INT32_MIN (-2147483647-1) |
Definition at line 66 of file loader.cpp.
#define INT8_MAX (127) |
Definition at line 69 of file loader.cpp.
#define INT8_MIN (-128) |
Definition at line 60 of file loader.cpp.
#define IVAL atoi(yval()) |
Next value as integer.
Definition at line 35892 of file loader.cpp.
#define LORE 2 |
Definition at line 36231 of file loader.cpp.
#define MAXDEPTH 10 |
#define MESSAGE 1 |
Definition at line 36230 of file loader.cpp.
#define REJECT reject_used_but_not_detected |
Definition at line 35846 of file loader.cpp.
#define SET_OR_CLEAR_FLAG | ( | op, | |
flag, | |||
val | |||
) | { if (val) SET_FLAG(op, flag); else CLEAR_FLAG(op, flag); } |
Utility macro to transform a bit into a flag.
Definition at line 35885 of file loader.cpp.
#define SET_RESIST | ( | op, | |
type, | |||
val | |||
) | op->resist[type] = val; |
Definition at line 35888 of file loader.cpp.
#define SIZE_MAX (~(size_t)0) |
Definition at line 88 of file loader.cpp.
#define UINT16_MAX (65535U) |
Definition at line 81 of file loader.cpp.
#define UINT32_MAX (4294967295U) |
Definition at line 84 of file loader.cpp.
#define UINT8_MAX (255U) |
Definition at line 78 of file loader.cpp.
#define unput | ( | c | ) | yyunput( c, (yytext_ptr) ) |
Definition at line 182 of file loader.cpp.
#define YY_AT_BOL | ( | ) | (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) |
Definition at line 323 of file loader.cpp.
#define YY_BREAK /*LINTED*/break; |
Definition at line 36411 of file loader.cpp.
#define YY_BUF_SIZE 16384 |
Definition at line 140 of file loader.cpp.
#define YY_BUFFER_EOF_PENDING 2 |
Definition at line 244 of file loader.cpp.
#define YY_BUFFER_NEW 0 |
Definition at line 232 of file loader.cpp.
#define YY_BUFFER_NORMAL 1 |
Definition at line 233 of file loader.cpp.
#define YY_CURRENT_BUFFER |
Definition at line 260 of file loader.cpp.
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] |
Definition at line 266 of file loader.cpp.
#define YY_DECL int lex_load(int *depth, object **items, int maxdepth, int map_flags, int linemode, int *ismore, bool arch_init, bool artifact_init) |
Definition at line 35875 of file loader.cpp.
#define YY_DO_BEFORE_ACTION |
Definition at line 35371 of file loader.cpp.
#define YY_END_OF_BUFFER 225 |
Definition at line 35378 of file loader.cpp.
#define YY_END_OF_BUFFER_CHAR 0 |
Definition at line 129 of file loader.cpp.
#define YY_EXIT_FAILURE 2 |
Definition at line 38665 of file loader.cpp.
#define YY_EXTRA_TYPE void * |
Definition at line 36242 of file loader.cpp.
#define YY_FATAL_ERROR | ( | msg | ) | yy_fatal_error( msg ) |
Definition at line 36386 of file loader.cpp.
#define YY_FLEX_MAJOR_VERSION 2 |
Definition at line 10 of file loader.cpp.
#define YY_FLEX_MINOR_VERSION 6 |
Definition at line 11 of file loader.cpp.
#define YY_FLEX_SUBMINOR_VERSION 4 |
Definition at line 12 of file loader.cpp.
#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) |
Definition at line 294 of file loader.cpp.
#define YY_INPUT | ( | buf, | |
result, | |||
max_size | |||
) |
Definition at line 36339 of file loader.cpp.
#define YY_INT_ALIGNED short int |
Definition at line 5 of file loader.cpp.
#define YY_LESS_LINENO | ( | n | ) |
Definition at line 166 of file loader.cpp.
#define YY_LINENO_REWIND_TO | ( | ptr | ) |
Definition at line 167 of file loader.cpp.
#define YY_MORE_ADJ 0 |
Definition at line 35848 of file loader.cpp.
#define yy_new_buffer yy_create_buffer |
Definition at line 304 of file loader.cpp.
Definition at line 128 of file loader.cpp.
#define YY_NO_INPUT 1 |
Definition at line 36226 of file loader.cpp.
#define YY_NULL 0 |
Definition at line 107 of file loader.cpp.
#define YY_NUM_RULES 224 |
Definition at line 35377 of file loader.cpp.
#define YY_READ_BUF_SIZE 8192 |
Definition at line 36323 of file loader.cpp.
#define YY_RESTORE_YY_MORE_OFFSET |
Definition at line 35849 of file loader.cpp.
#define YY_RULE_SETUP |
Definition at line 36414 of file loader.cpp.
Definition at line 112 of file loader.cpp.
#define yy_set_bol | ( | at_bol | ) |
Definition at line 314 of file loader.cpp.
#define yy_set_interactive | ( | is_interactive | ) |
Definition at line 305 of file loader.cpp.
#define YY_SKIP_YYWRAP |
Definition at line 328 of file loader.cpp.
#define YY_START (((yy_start) - 1) / 2) |
Definition at line 123 of file loader.cpp.
#define YY_START_STACK_INCR 25 |
Definition at line 36381 of file loader.cpp.
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) |
Definition at line 146 of file loader.cpp.
#define YY_STATE_EOF | ( | state | ) | (YY_END_OF_BUFFER + state + 1) |
Definition at line 126 of file loader.cpp.
#define YY_STRUCT_YY_BUFFER_STATE |
Definition at line 185 of file loader.cpp.
#define YY_TYPEDEF_YY_BUFFER_STATE |
Definition at line 149 of file loader.cpp.
#define YY_TYPEDEF_YY_SIZE_T |
Definition at line 154 of file loader.cpp.
#define YY_USER_ACTION |
Definition at line 36406 of file loader.cpp.
#define yyconst const |
Definition at line 98 of file loader.cpp.
#define yyless | ( | n | ) |
Definition at line 38677 of file loader.cpp.
#define yyless | ( | n | ) |
Definition at line 38677 of file loader.cpp.
#define yymore | ( | ) | yymore_used_but_not_detected |
Definition at line 35847 of file loader.cpp.
#define yynoreturn |
Definition at line 103 of file loader.cpp.
#define YYSTATE YY_START |
Definition at line 124 of file loader.cpp.
#define YYTABLES_NAME "yytables" |
Definition at line 38877 of file loader.cpp.
#define yyterminate | ( | ) | return YY_NULL |
Definition at line 36376 of file loader.cpp.
#define yytext_ptr yytext |
Definition at line 342 of file loader.cpp.
#define yywrap | ( | ) | (/*CONSTCOND*/1) |
Definition at line 327 of file loader.cpp.
typedef short int flex_int16_t |
Definition at line 52 of file loader.cpp.
typedef int flex_int32_t |
Definition at line 53 of file loader.cpp.
typedef signed char flex_int8_t |
Definition at line 51 of file loader.cpp.
typedef unsigned short int flex_uint16_t |
Definition at line 55 of file loader.cpp.
typedef unsigned int flex_uint32_t |
Definition at line 56 of file loader.cpp.
typedef unsigned char flex_uint8_t |
Definition at line 54 of file loader.cpp.
typedef struct yy_buffer_state* YY_BUFFER_STATE |
Definition at line 150 of file loader.cpp.
typedef flex_uint8_t YY_CHAR |
Definition at line 329 of file loader.cpp.
typedef size_t yy_size_t |
Definition at line 155 of file loader.cpp.
typedef int yy_state_type |
Definition at line 333 of file loader.cpp.
|
static |
This extracts the key/value from the yytext field - calls object_set_value() to actually set the value. Function basically has to find spaces, strip out extra, etc. strchr doesn't work as good because could also be tabs.
op | object in which to insert the value. |
Definition at line 36103 of file loader.cpp.
References castle_read::key, object_set_value(), give::op, TRUE, autojail::value, and yytext.
Referenced by while().
|
static |
This function checks the object after it has been loaded (when we get the 'end' in the input stream). This function can be used to deal with legacy objects where fields may have changed. It can also be used to check for objects to make sure there are no common errors.
op | object to check. |
arch_init | true if doing archetypes initialisation, false else. |
Definition at line 35978 of file loader.cpp.
References add_string(), BOW, buf, cf_random(), CONVERTER, create_archetype_by_object_name(), CREATOR, FABS, FLAG_CONTENT_ON_GEN, FLAG_GENERATOR, FLAG_IDENTIFIED, FLAG_IS_A_TEMPLATE, FLAG_MONSTER, free_string(), get_archetype_struct(), is_type_valid(), IS_WEAPON, llevDebug, llevError, LOG(), MIN_ACTIVE_SPEED, object_can_merge(), object_copy(), object_give_identified_properties(), object_insert_in_ob(), object_set_flag_inv(), object_update_speed(), give::op, QUERY_FLAG, RUNE, set_materialname(), SPELLBOOK, guildbuy::temp, Ice::tmp, and WEAPON.
Referenced by while().
void free_loader | ( | void | ) |
Frees all memory allocated by the loader.
Definition at line 39074 of file loader.cpp.
References YY_CURRENT_BUFFER, and yy_delete_buffer().
Referenced by cleanup().
if | ( | ! | yy_init | ) |
Definition at line 36428 of file loader.cpp.
References YY_BUF_SIZE, yy_create_buffer(), YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_init, yy_load_buffer_state(), yy_start, yyensure_buffer_stack(), yyin, and yyout.
Referenced by addArchetypes(), ResourcesManager::archetypeUse(), calc_item_power(), calculate_difficulty(), check_generators(), check_login(), CRESubItemQuest::CRESubItemQuest(), crystal_level(), do_item_conversion(), dump_abilities(), fire_bow(), fix_flesh_item(), fix_object(), fix_player(), get_spell_by_name(), god_enchants_weapon(), identify_object_with_skill(), FaceLoader::loadAnimationBlock(), move_duplicator(), CREMainWindow::onReportArchetypes(), CREMainWindow::onReportDuplicate(), CREMainWindow::onReportSummon(), pay_from_container(), SockList_ReadPacket(), and tear_down_wall().
int load_object | ( | FILE * | fp, |
object * | op, | ||
int | bufstate, | ||
int | map_flags, | ||
bool | artifact_init | ||
) |
Loads an object from the given file-pointer. Variables will be read and parsed and patched into the object until the string "end" is reached, or the end of the file.
fp | file pointer from which to read. |
op | where to read the data. |
bufstate | used to determine various file attributes:
|
map_flags | combination of Map loading flags flags, though only MAP_STYLE is used. |
artifact_init | whether the object is being loaded as part of artifact loading or not. |
Definition at line 38944 of file loader.cpp.
References LL_EOF, LL_NORMAL, llevDebug, LO_LINEMODE, LO_NEWFILE, LO_NOREAD, LOG(), lorebuf, MAXDEPTH, msgbuf, msglen, give::op, total_msglen, VERY_BIG_BUF, YY_BUF_SIZE, yy_create_buffer(), YY_CURRENT_BUFFER, yy_delete_buffer(), yy_scan_string(), and yy_switch_to_buffer().
Referenced by check_login(), load_objects(), and load_unique_objects().
int load_object_from_reader | ( | BufferReader * | reader, |
object * | op, | ||
int | map_flags, | ||
bool | arch_init, | ||
bool | artifact_init | ||
) |
Load an object from the specified reader, stopping when the object is complete.
reader | where to read from. |
op | object to read. |
map_flags | one or more map loading flags. |
arch_init | whether we are loading archetypes or not. |
artifact_init | whether the object is being loaded as part of artifact loading or not. |
Definition at line 38996 of file loader.cpp.
References buf, bufferreader_get_line(), HUGE_BUF, INITIAL, LL_EOF, LL_MORE, LL_NORMAL, llevError, LOG(), lorebuf, MAXDEPTH, msgbuf, msglen, give::op, total_msglen, YY_CURRENT_BUFFER, yy_delete_buffer(), yy_pop_state(), yy_push_state(), and yy_scan_string().
Referenced by ArtifactLoader::load(), and ArchetypeLoader::load().
|
static |
Destructively reverse the object's inventory. Used to preserve object order as they appear in the file, since linked list insertion is at the beginning.
op | Object to reverse. |
Definition at line 35909 of file loader.cpp.
References object::above, object::below, give::next, and give::op.
Referenced by while().
|
static |
Destructively reverse the object's key value pairs.
op | Object to reverse. |
Definition at line 35927 of file loader.cpp.
References give::next, key_value::next, and give::op.
Referenced by while().
|
static |
Fills in the body information for one slot.
op | object |
params | the body part, which should be in the body_locations structure. |
Definition at line 35948 of file loader.cpp.
References body_locations, llevError, LOG(), NUM_BODY_LOCATIONS, give::op, and roll-o-matic::params.
Referenced by while().
|
static |
Handles the different move types an object can have.
mt | field for which we are computing the value, will be set to the result of parsing. |
params | string containing the definition of the move type to parse. |
prefix | string to be displayed in case the move type is invalid, must not be NULL. |
Definition at line 36174 of file loader.cpp.
References llevDebug, LOG(), MOVE_ALL, MOVE_FLYING, move_name, roll-o-matic::params, castle_read::prefix, make_face_from_files::str, and strcasecmp().
Referenced by while().
int set_variable | ( | object * | op, |
const char * | buf | ||
) |
This takes a buffer, scans it for variables, and sets those variables as appropriate in op.
This function appears to be used in only 2 places - in crossedit to override values and in c_wiz to mutate values.
op | object to alter. |
buf | modifications to apply. |
Definition at line 39047 of file loader.cpp.
References buf, INITIAL, lorebuf, MAXDEPTH, msgbuf, msglen, give::op, total_msglen, YY_CURRENT_BUFFER, yy_delete_buffer(), yy_pop_state(), yy_push_state(), yy_scan_string(), and yy_switch_to_buffer().
Referenced by command_create(), command_patch(), and Archetypes::recursive_update().
while | ( | 1 | ) |
Definition at line 36468 of file loader.cpp.
References add_button_link(), add_friendly_object(), add_key_value(), add_string(), ATNR_ACID, ATNR_BLIND, ATNR_CANCELLATION, ATNR_CHAOS, ATNR_COLD, ATNR_CONFUSION, ATNR_COUNTERSPELL, ATNR_DEATH, ATNR_DEPLETE, ATNR_DISEASE, ATNR_DRAIN, ATNR_ELECTRICITY, ATNR_FEAR, ATNR_FIRE, ATNR_GHOSTHIT, ATNR_GODPOWER, ATNR_HOLYWORD, ATNR_INTERNAL, ATNR_LIFE_STEALING, ATNR_MAGIC, ATNR_PARALYZE, ATNR_PHYSICAL, ATNR_POISON, ATNR_SLOW, ATNR_TURN_UNDEAD, ATNR_WEAPONMAGIC, BEGIN, check_loaded_object(), CLEAR_FLAG, ECHO, EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, find_animation(), find_archetype(), find_artifact(), find_face(), find_treasurelist(), FLAG_ACTIVATE_ON_PUSH, FLAG_ACTIVATE_ON_RELEASE, FLAG_ALIVE, FLAG_ANIMATE, FLAG_APPLIED, FLAG_AUTO_APPLY, FLAG_BEEN_APPLIED, FLAG_BERSERK, FLAG_BLESSED, FLAG_BLIND, FLAG_BLOCKSVIEW, FLAG_CAN_ROLL, FLAG_CAN_USE_SKILL, FLAG_CAST_SPELL, FLAG_CHANGING, FLAG_CLIENT_ANIM_RANDOM, FLAG_CLIENT_ANIM_SYNC, FLAG_CONFUSED, FLAG_CONTENT_ON_GEN, FLAG_CURSED, FLAG_DAMNED, FLAG_FRIENDLY, FLAG_GENERATOR, FLAG_HITBACK, FLAG_IDENTIFIED, FLAG_INV_LOCKED, FLAG_IS_BUILDABLE, FLAG_IS_CAULDRON, FLAG_IS_FLOOR, FLAG_IS_HILLY, FLAG_IS_LIGHTABLE, FLAG_IS_THROWN, FLAG_IS_TURNABLE, FLAG_IS_USED_UP, FLAG_IS_WATER, FLAG_IS_WOODED, FLAG_KNOWN_BLESSED, FLAG_KNOWN_CURSED, FLAG_KNOWN_MAGICAL, FLAG_LIFESAVE, FLAG_MAKE_INVIS, FLAG_MONSTER, FLAG_NEUTRAL, FLAG_NO_ATTACK, FLAG_NO_DAMAGE, FLAG_NO_DROP, FLAG_NO_FIX_PLAYER, FLAG_NO_MAGIC, FLAG_NO_PICK, FLAG_NO_SKILL_IDENT, FLAG_NO_STEAL, FLAG_NO_STRENGTH, FLAG_ONE_HIT, FLAG_ONLY_ATTACK, FLAG_OVERLAY_FLOOR, FLAG_PARALYZED, FLAG_RANDOM_MOVE, FLAG_READY_BOW, FLAG_READY_SCROLL, FLAG_READY_SKILL, FLAG_READY_WEAPON, FLAG_REFL_MISSILE, FLAG_REFL_SPELL, FLAG_REFLECTING, FLAG_SCARED, FLAG_SEE_ANYWHERE, FLAG_SEE_IN_DARK, FLAG_SEE_INVISIBLE, FLAG_SLEEP, FLAG_SPLITTING, FLAG_STAND_STILL, FLAG_STARTEQUIP, FLAG_STEALTH, FLAG_TEAR_DOWN, FLAG_TREASURE, FLAG_UNAGGRESSIVE, FLAG_UNDEAD, FLAG_UNIQUE, FLAG_UNPAID, FLAG_USE_ARMOUR, FLAG_USE_BOW, FLAG_USE_RANGE, FLAG_USE_RING, FLAG_USE_SCROLL, FLAG_USE_SHIELD, FLAG_USE_WEAPON, FLAG_WAS_WIZ, FLAG_WIZ, FLAG_WIZCAST, FLAG_WIZPASS, FLAG_XRAYS, FREE_AND_COPY, FVAL, give_artifact_abilities(), HUGE_BUF, INITIAL, make_face_from_files::int, artifact::item, IVAL, lex_error, LL_EOF, LL_IGNORED, LL_MORE, LL_NORMAL, llevDebug, llevError, LOG(), LORE, lorebuf, map_layer_name, MAP_LAYERS, MAP_STYLE, MESSAGE, MOVE_WALK, msgbuf, msglen, give::name, object_copy(), object_copy_no_speed(), object_insert_in_ob(), object_new(), object_set_msg(), object_update_speed(), give::op, Settings::permanent_exp_ratio, PLAYER, RANDOM, reverse_ob_inv(), reverse_ob_key_values(), safe_strcat(), seen_object, set_body_info(), SET_FLAG, set_move(), SET_OR_CLEAR_FLAG, SET_RESIST, settings, Face::smoothface, strcasecmp(), Ice::tmp, total_msglen, diamondslots::y, yval(), yy_accept, yy_act, YY_AT_BOL, yy_bp, YY_BREAK, YY_BUFFER_NEW, YY_BUFFER_NORMAL, yy_c_buf_p, yy_cp, YY_CURRENT_BUFFER_LVALUE, yy_did_buffer_switch_on_eof, YY_DO_BEFORE_ACTION, YY_END_OF_BUFFER, YY_FATAL_ERROR, yy_get_next_buffer(), yy_get_previous_state(), yy_hold_char, YY_MORE_ADJ, yy_n_chars, YY_NEW_FILE, yy_nxt, YY_RESTORE_YY_MORE_OFFSET, YY_RULE_SETUP, YY_SC_TO_UI, YY_START, yy_start, YY_STATE_EOF, yy_try_NUL_trans(), yyin, yytext, yytext_ptr, and yywrap.
Referenced by CFMapTransformer.CFMapTransformer::untransformAll().
|
static |
Returns the next token for lex. Our save file syntax is very simple, so we can use a very simple processing mechanism here instead using something like bison This skips over the space and returns the value, or "" if no value is found. Modified 4/26/2000 to also strip spaces at end of line
Definition at line 38890 of file loader.cpp.
References yytext.
Referenced by while().
YY_BUFFER_STATE yy_create_buffer | ( | FILE * | file, |
int | size | ||
) |
Allocate and initialize an input buffer state.
file | A readable stream. |
size | The character buffer size in bytes. When in doubt, use YY_BUF_SIZE . |
Definition at line 38349 of file loader.cpp.
References Ice::b, mad_mage_user::file, YY_FATAL_ERROR, yy_init_buffer(), and yyalloc().
Referenced by if(), load_object(), and yyrestart().
void yy_delete_buffer | ( | YY_BUFFER_STATE | b | ) |
Destroy the buffer.
b | a buffer created with yy_create_buffer() |
Definition at line 38377 of file loader.cpp.
References Ice::b, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, and yyfree().
Referenced by free_loader(), load_object(), load_object_from_reader(), set_variable(), yylex_destroy(), and yypop_buffer_state().
|
static |
Definition at line 38668 of file loader.cpp.
References navar-midane_pickup::msg, and YY_EXIT_FAILURE.
void yy_flush_buffer | ( | YY_BUFFER_STATE | b | ) |
Discard all buffered characters. On the next scan, YY_INPUT will be called.
b | the buffer state to be flushed, usually YY_CURRENT_BUFFER . |
Definition at line 38424 of file loader.cpp.
References Ice::b, YY_BUFFER_NEW, YY_CURRENT_BUFFER, YY_END_OF_BUFFER_CHAR, and yy_load_buffer_state().
Referenced by yy_init_buffer().
|
static |
Definition at line 38028 of file loader.cpp.
References Ice::b, convert::dest, EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, make_face_from_files::int, YY_BUFFER_EOF_PENDING, yy_c_buf_p, YY_CURRENT_BUFFER_LVALUE, YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, YY_INPUT, YY_MORE_ADJ, yy_n_chars, YY_READ_BUF_SIZE, yyin, yyrealloc(), yyrestart(), and yytext_ptr.
Referenced by while().
|
static |
Definition at line 38166 of file loader.cpp.
References YY_AT_BOL, yy_c_buf_p, yy_cp, YY_MORE_ADJ, yy_NUL_trans, yy_nxt, YY_SC_TO_UI, yy_start, and yytext_ptr.
Referenced by while().
|
static |
Definition at line 38396 of file loader.cpp.
References Ice::b, mad_mage_user::file, YY_CURRENT_BUFFER, and yy_flush_buffer().
Referenced by yy_create_buffer(), and yyrestart().
|
static |
Definition at line 38771 of file loader.cpp.
References yy_buffer_stack, yy_buffer_stack_max, yy_buffer_stack_top, yy_c_buf_p, yy_init, yy_start, yy_start_stack, yy_start_stack_depth, yy_start_stack_ptr, yyin, and yyout.
Referenced by yylex_destroy().
|
static |
Definition at line 38335 of file loader.cpp.
References yy_c_buf_p, YY_CURRENT_BUFFER_LVALUE, yy_hold_char, yy_n_chars, yyin, and yytext_ptr.
Referenced by if(), yy_flush_buffer(), yy_switch_to_buffer(), yypop_buffer_state(), yypush_buffer_state(), and yyrestart().
|
static |
Definition at line 38656 of file loader.cpp.
References BEGIN, YY_FATAL_ERROR, yy_start_stack, and yy_start_stack_ptr.
Referenced by load_object_from_reader(), and set_variable().
|
static |
Definition at line 38631 of file loader.cpp.
References BEGIN, make_face_from_files::int, YY_FATAL_ERROR, YY_START, yy_start_stack, yy_start_stack_depth, YY_START_STACK_INCR, yy_start_stack_ptr, yyalloc(), and yyrealloc().
Referenced by load_object_from_reader(), and set_variable().
YY_BUFFER_STATE yy_scan_buffer | ( | char * | base, |
yy_size_t | size | ||
) |
Setup the input buffer state to scan directly from a user-specified character buffer.
base | the character buffer |
size | the size in bytes of the character buffer |
Definition at line 38551 of file loader.cpp.
References Ice::b, make_face_from_files::int, YY_BUFFER_NEW, YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, yy_switch_to_buffer(), and yyalloc().
Referenced by yy_scan_bytes().
YY_BUFFER_STATE yy_scan_bytes | ( | const char * | yybytes, |
int | _yybytes_len | ||
) |
Setup the input buffer state to scan the given bytes. The next call to yylex() will scan from a copy of bytes.
yybytes | the byte buffer to scan |
_yybytes_len | the number of bytes in the buffer pointed to by bytes. |
Definition at line 38601 of file loader.cpp.
References Ice::b, buf, YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, yy_scan_buffer(), and yyalloc().
Referenced by yy_scan_string().
YY_BUFFER_STATE yy_scan_string | ( | const char * | yystr | ) |
Setup the input buffer state to scan a string. The next call to yylex() will scan from a copy of str.
yystr | a NUL-terminated string to scan |
Definition at line 38588 of file loader.cpp.
References yy_scan_bytes().
Referenced by load_object(), load_object_from_reader(), and set_variable().
void yy_switch_to_buffer | ( | YY_BUFFER_STATE | new_buffer | ) |
Switch to a different input buffer.
new_buffer | The new input buffer. |
Definition at line 38304 of file loader.cpp.
References yy_c_buf_p, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_did_buffer_switch_on_eof, yy_hold_char, yy_load_buffer_state(), yy_n_chars, and yyensure_buffer_stack().
Referenced by load_object(), set_variable(), and yy_scan_buffer().
|
static |
Definition at line 38192 of file loader.cpp.
References yy_NUL_trans.
Referenced by while().
void * yyalloc | ( | yy_size_t | size | ) |
Definition at line 38854 of file loader.cpp.
Referenced by yy_create_buffer(), yy_push_state(), yy_scan_buffer(), yy_scan_bytes(), and yyensure_buffer_stack().
|
static |
Definition at line 38502 of file loader.cpp.
References yy_buffer_stack, yy_buffer_stack_max, yy_buffer_stack_top, YY_FATAL_ERROR, yyalloc(), and yyrealloc().
Referenced by if(), yy_switch_to_buffer(), yypush_buffer_state(), and yyrestart().
void yyfree | ( | void * | ptr | ) |
Definition at line 38872 of file loader.cpp.
Referenced by yy_delete_buffer(), and yylex_destroy().
int yyget_debug | ( | void | ) |
Definition at line 38761 of file loader.cpp.
References yy_flex_debug.
YY_EXTRA_TYPE yyget_extra | ( | void | ) |
FILE* yyget_in | ( | void | ) |
int yyget_leng | ( | void | ) |
Get the length of the current token.
Definition at line 38721 of file loader.cpp.
References yyleng.
int yyget_lineno | ( | void | ) |
FILE* yyget_out | ( | void | ) |
char* yyget_text | ( | void | ) |
int yylex_destroy | ( | void | ) |
Definition at line 38804 of file loader.cpp.
References yy_buffer_stack, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_delete_buffer(), yy_init_globals(), yy_start_stack, yyfree(), and yypop_buffer_state().
void yypop_buffer_state | ( | void | ) |
Removes and deletes the top of the stack, if present. The next element becomes the new top.
Definition at line 38483 of file loader.cpp.
References yy_buffer_stack_top, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_delete_buffer(), yy_did_buffer_switch_on_eof, and yy_load_buffer_state().
Referenced by yylex_destroy().
void yypush_buffer_state | ( | YY_BUFFER_STATE | new_buffer | ) |
Pushes the new state onto the stack. The new state becomes the current state. This function will allocate the stack if necessary.
new_buffer | The new state. |
Definition at line 38453 of file loader.cpp.
References yy_buffer_stack_top, yy_c_buf_p, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_did_buffer_switch_on_eof, yy_hold_char, yy_load_buffer_state(), yy_n_chars, and yyensure_buffer_stack().
void * yyrealloc | ( | void * | ptr, |
yy_size_t | size | ||
) |
Definition at line 38859 of file loader.cpp.
Referenced by yy_get_next_buffer(), yy_push_state(), and yyensure_buffer_stack().
void yyrestart | ( | FILE * | input_file | ) |
Immediately switch to a different input stream.
input_file | A readable stream. |
INITIAL
. Definition at line 38287 of file loader.cpp.
Referenced by yy_get_next_buffer().
void yyset_debug | ( | int | debug_flag | ) |
Definition at line 38766 of file loader.cpp.
void yyset_extra | ( | YY_EXTRA_TYPE | user_defined | ) |
void yyset_in | ( | FILE * | _in_str | ) |
Set the input stream. This does not discard the current input buffer.
_in_str | A readable stream. |
Definition at line 38751 of file loader.cpp.
void yyset_lineno | ( | int | _line_number | ) |
Set the current line number.
_line_number | line number |
Definition at line 38739 of file loader.cpp.
void yyset_out | ( | FILE * | _out_str | ) |
Definition at line 38756 of file loader.cpp.
|
static |
Definition at line 35879 of file loader.cpp.
Referenced by while().
|
static |
Definition at line 35882 of file loader.cpp.
Referenced by load_object(), load_object_from_reader(), set_variable(), and while().
|
static |
Definition at line 35880 of file loader.cpp.
Referenced by init_regions(), MessageLoader::load(), load_map_header(), load_object(), load_object_from_reader(), set_variable(), and while().
size_t msglen = 0 |
Definition at line 35881 of file loader.cpp.
Referenced by load_object(), load_object_from_reader(), set_variable(), and while().
|
static |
Keep track of whether we're currently inside an object...end block. This might have been better designed as a separate start condition, but was added to give a warning when an object started before the previous ended.
Definition at line 35901 of file loader.cpp.
Referenced by while().
size_t total_msglen = 0 |
Definition at line 35881 of file loader.cpp.
Referenced by load_object(), load_object_from_reader(), set_variable(), and while().
|
static |
Definition at line 35386 of file loader.cpp.
Referenced by while().
int yy_act |
Definition at line 36426 of file loader.cpp.
Referenced by while().
char * yy_bp |
Definition at line 36425 of file loader.cpp.
Referenced by while().
|
static |
Stack as an array.
Definition at line 252 of file loader.cpp.
Referenced by yy_init_globals(), yyensure_buffer_stack(), and yylex_destroy().
|
static |
capacity of stack.
Definition at line 251 of file loader.cpp.
Referenced by yy_init_globals(), and yyensure_buffer_stack().
|
static |
index of top of stack.
Definition at line 250 of file loader.cpp.
Referenced by yy_init_globals(), yyensure_buffer_stack(), yypop_buffer_state(), and yypush_buffer_state().
|
static |
Definition at line 274 of file loader.cpp.
Referenced by while(), yy_get_next_buffer(), yy_get_previous_state(), yy_init_globals(), yy_load_buffer_state(), yy_switch_to_buffer(), and yypush_buffer_state().
char* yy_cp |
Definition at line 36425 of file loader.cpp.
Referenced by while(), and yy_get_previous_state().
YY_DECL |
The main scanner function which does all the work.
Definition at line 36423 of file loader.cpp.
|
static |
Definition at line 281 of file loader.cpp.
Referenced by while(), yy_switch_to_buffer(), yypop_buffer_state(), and yypush_buffer_state().
int yy_flex_debug = 0 |
Definition at line 35841 of file loader.cpp.
Referenced by yyget_debug(), and yyset_debug().
|
static |
Definition at line 269 of file loader.cpp.
Referenced by while(), yy_load_buffer_state(), yy_switch_to_buffer(), and yypush_buffer_state().
|
static |
Definition at line 275 of file loader.cpp.
Referenced by if(), and yy_init_globals().
|
static |
Definition at line 270 of file loader.cpp.
Referenced by while(), yy_get_next_buffer(), yy_load_buffer_state(), yy_switch_to_buffer(), and yypush_buffer_state().
|
static |
Definition at line 35613 of file loader.cpp.
Referenced by yy_get_previous_state(), and yy_try_NUL_trans().
|
static |
Definition at line 344 of file loader.cpp.
Referenced by while(), and yy_get_previous_state().
|
static |
Definition at line 276 of file loader.cpp.
Referenced by if(), while(), yy_get_previous_state(), and yy_init_globals().
|
static |
Definition at line 36311 of file loader.cpp.
Referenced by yy_init_globals(), yy_pop_state(), yy_push_state(), and yylex_destroy().
|
static |
Definition at line 36310 of file loader.cpp.
Referenced by yy_init_globals(), and yy_push_state().
|
static |
Definition at line 36309 of file loader.cpp.
Referenced by yy_init_globals(), yy_pop_state(), and yy_push_state().
FILE* yyin = NULL |
Definition at line 331 of file loader.cpp.
Referenced by if(), while(), yy_get_next_buffer(), yy_init_globals(), yy_load_buffer_state(), yyget_in(), yyrestart(), and yyset_in().
int yyleng |
Definition at line 271 of file loader.cpp.
Referenced by yyget_leng().
int yylineno = 1 |
Definition at line 336 of file loader.cpp.
Referenced by yyget_lineno(), and yyset_lineno().
FILE * yyout = NULL |
Definition at line 160 of file loader.cpp.
Referenced by if(), yy_init_globals(), yyget_out(), and yyset_out().
char* yytext |
Definition at line 35850 of file loader.cpp.
Referenced by add_key_value(), while(), yval(), and yyget_text().