… | |
… | |
1945 | char *yytext; |
1945 | char *yytext; |
1946 | #line 1 "loader.l" |
1946 | #line 1 "loader.l" |
1947 | #line 2 "loader.l" |
1947 | #line 2 "loader.l" |
1948 | /* |
1948 | /* |
1949 | * static char *rcsid_object_c = |
1949 | * static char *rcsid_object_c = |
1950 | * "$Id: loader.c,v 1.1.1.2 2006/02/22 18:01:20 elmex Exp $"; |
1950 | * "$Id: loader.c,v 1.1.1.3 2006/03/15 14:04:37 elmex Exp $"; |
1951 | */ |
1951 | */ |
1952 | |
1952 | |
1953 | /* |
1953 | /* |
1954 | CrossFire, A Multiplayer game for X-windows |
1954 | CrossFire, A Multiplayer game for X-windows |
1955 | |
1955 | |
… | |
… | |
5830 | |
5830 | |
5831 | strcpy(retbuf,""); |
5831 | strcpy(retbuf,""); |
5832 | strcpy(retbuf_all," all"); |
5832 | strcpy(retbuf_all," all"); |
5833 | |
5833 | |
5834 | /* Quick check, and probably fairly common */ |
5834 | /* Quick check, and probably fairly common */ |
5835 | if (mt == MOVE_ALL) return retbuf_all; |
5835 | if (mt == MOVE_ALL) return retbuf_all+1; |
5836 | if (mt == 0) { |
5836 | if (mt == 0) { |
5837 | strcpy(retbuf,"0"); |
5837 | strcpy(retbuf,"0"); |
5838 | return retbuf; |
5838 | return retbuf; |
5839 | } |
5839 | } |
5840 | |
5840 | |
… | |
… | |
5855 | /* Basically, if there is a single negation, return it, eg |
5855 | /* Basically, if there is a single negation, return it, eg |
5856 | * 'all -swim'. But more than that, just return the |
5856 | * 'all -swim'. But more than that, just return the |
5857 | * enumerated values. It doesn't make sense to return |
5857 | * enumerated values. It doesn't make sense to return |
5858 | * 'all -walk -fly_low' - it is shorter to return 'fly_high swim' |
5858 | * 'all -walk -fly_low' - it is shorter to return 'fly_high swim' |
5859 | */ |
5859 | */ |
5860 | if (all_count <=1) return retbuf_all; |
5860 | if (all_count <=1) return retbuf_all+1; |
5861 | else return retbuf; |
5861 | else return retbuf+1; |
5862 | } |
5862 | } |
5863 | |
5863 | |
5864 | |
5864 | |
5865 | /* |
5865 | /* |
5866 | * Returns a pointer to a static string which contains all variables |
5866 | * Returns a pointer to a static string which contains all variables |
… | |
… | |
6052 | if(op->stats.maxgrace!=op2->stats.maxgrace) |
6052 | if(op->stats.maxgrace!=op2->stats.maxgrace) |
6053 | FAST_SAVE_LONG(fastbuf,"maxgrace ",op->stats.maxgrace,9); |
6053 | FAST_SAVE_LONG(fastbuf,"maxgrace ",op->stats.maxgrace,9); |
6054 | |
6054 | |
6055 | if(op->stats.exp!=op2->stats.exp) { |
6055 | if(op->stats.exp!=op2->stats.exp) { |
6056 | #ifndef WIN32 |
6056 | #ifndef WIN32 |
6057 | sprintf(buf2,"%lld\n", op->stats.exp); |
6057 | sprintf(buf2,"%lld", op->stats.exp); |
6058 | #else |
6058 | #else |
6059 | sprintf(buf2,"%I64d\n", op->stats.exp); |
6059 | sprintf(buf2,"%I64d", op->stats.exp); |
6060 | #endif |
6060 | #endif |
6061 | ADD_STRINGLINE_ENTRY(fastbuf,"exp ", buf2, 4); |
6061 | ADD_STRINGLINE_ENTRY(fastbuf,"exp ", buf2, 4); |
6062 | } |
6062 | } |
6063 | |
6063 | |
6064 | if(op->perm_exp!=op2->perm_exp) { |
6064 | if(op->perm_exp!=op2->perm_exp) { |
6065 | #ifndef WIN32 |
6065 | #ifndef WIN32 |
6066 | sprintf(buf2,"%lld\n", op->perm_exp); |
6066 | sprintf(buf2,"%lld", op->perm_exp); |
6067 | #else |
6067 | #else |
6068 | sprintf(buf2,"%I64d\n", op->perm_exp); |
6068 | sprintf(buf2,"%I64d", op->perm_exp); |
6069 | #endif |
6069 | #endif |
6070 | ADD_STRINGLINE_ENTRY(fastbuf,"perm_exp ", buf2, 9); |
6070 | ADD_STRINGLINE_ENTRY(fastbuf,"perm_exp ", buf2, 9); |
6071 | } |
6071 | } |
6072 | |
6072 | |
6073 | if(op->expmul!=op2->expmul) |
6073 | if(op->expmul!=op2->expmul) |
… | |
… | |
6218 | * save (say to a temp map, where we don't care about strings), |
6218 | * save (say to a temp map, where we don't care about strings), |
6219 | * or a slower save/dm dump, where printing out strings is handy. |
6219 | * or a slower save/dm dump, where printing out strings is handy. |
6220 | */ |
6220 | */ |
6221 | if (op->move_type != op2->move_type) { |
6221 | if (op->move_type != op2->move_type) { |
6222 | /*FAST_SAVE_LONG(fastbuf,"move_type ",op->move_type,10)*/ |
6222 | /*FAST_SAVE_LONG(fastbuf,"move_type ",op->move_type,10)*/ |
6223 | ADD_STRINGLINE_ENTRY(fastbuf,"move_type ", |
6223 | ADD_STRINGLINE_ENTRY(fastbuf,"move_type ", |
6224 | get_string_move_type(op->move_type), |
6224 | get_string_move_type(op->move_type), |
6225 | 10); |
6225 | 10); |
6226 | } |
6226 | } |
6227 | if (op->move_block != op2->move_block) { |
6227 | if (op->move_block != op2->move_block) { |
6228 | /*FAST_SAVE_LONG(fastbuf,"move_block ",op->move_block,11)*/ |
6228 | /*FAST_SAVE_LONG(fastbuf,"move_block ",op->move_block,11)*/ |
6229 | ADD_STRINGLINE_ENTRY(fastbuf,"move_block ", |
6229 | ADD_STRINGLINE_ENTRY(fastbuf,"move_block ", |
6230 | get_string_move_type(op->move_block), |
6230 | get_string_move_type(op->move_block), |
6231 | 11); |
6231 | 11); |
6232 | } |
6232 | } |
6233 | if (op->move_allow != op2->move_allow) { |
6233 | if (op->move_allow != op2->move_allow) { |
6234 | /*FAST_SAVE_LONG(fastbuf,"move_allow ",op->move_allow,11);*/ |
6234 | /*FAST_SAVE_LONG(fastbuf,"move_allow ",op->move_allow,11);*/ |
6235 | ADD_STRINGLINE_ENTRY(fastbuf,"move_allow ", |
6235 | ADD_STRINGLINE_ENTRY(fastbuf,"move_allow ", |
6236 | get_string_move_type(op->move_allow), |
6236 | get_string_move_type(op->move_allow), |
6237 | 11); |
6237 | 11); |
6238 | } |
6238 | } |
6239 | if (op->move_on != op2->move_on) { |
6239 | if (op->move_on != op2->move_on) { |
6240 | /*FAST_SAVE_LONG(fastbuf,"move_on ",op->move_on,8);*/ |
6240 | /*FAST_SAVE_LONG(fastbuf,"move_on ",op->move_on,8);*/ |
6241 | ADD_STRINGLINE_ENTRY(fastbuf,"move_on ", |
6241 | ADD_STRINGLINE_ENTRY(fastbuf,"move_on ", |
6242 | get_string_move_type(op->move_on), |
6242 | get_string_move_type(op->move_on), |
6243 | 8); |
6243 | 8); |
6244 | } |
6244 | } |
6245 | if (op->move_off != op2->move_off) { |
6245 | if (op->move_off != op2->move_off) { |
6246 | /*FAST_SAVE_LONG(fastbuf,"move_off ",op->move_off,9);*/ |
6246 | /*FAST_SAVE_LONG(fastbuf,"move_off ",op->move_off,9);*/ |
6247 | ADD_STRINGLINE_ENTRY(fastbuf,"move_off ", |
6247 | ADD_STRINGLINE_ENTRY(fastbuf,"move_off ", |
6248 | get_string_move_type(op->move_off), |
6248 | get_string_move_type(op->move_off), |
6249 | 9); |
6249 | 9); |
6250 | } |
6250 | } |
6251 | if (op->move_slow != op2->move_slow) { |
6251 | if (op->move_slow != op2->move_slow) { |
6252 | /*FAST_SAVE_LONG(fastbuf,"move_slow ",op->move_slow,10);*/ |
6252 | /*FAST_SAVE_LONG(fastbuf,"move_slow ",op->move_slow,10);*/ |
6253 | ADD_STRINGLINE_ENTRY(fastbuf,"move_slow ", |
6253 | ADD_STRINGLINE_ENTRY(fastbuf,"move_slow ", |
6254 | get_string_move_type(op->move_slow), |
6254 | get_string_move_type(op->move_slow), |
6255 | 10); |
6255 | 10); |
6256 | } |
6256 | } |
6257 | |
6257 | |
6258 | if (op->move_slow_penalty != op2->move_slow_penalty) { |
6258 | if (op->move_slow_penalty != op2->move_slow_penalty) { |