ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/loader.C
(Generate patch)

Comparing deliantra/server/common/loader.C (file contents):
Revision 1.134 by root, Mon Oct 12 14:00:57 2009 UTC vs.
Revision 1.136 by root, Wed Nov 4 00:02:48 2009 UTC

994 loading_arch 994 loading_arch
995 ? treasurelist::get (f.get_str ()) 995 ? treasurelist::get (f.get_str ())
996 : treasurelist::find (f.get_str ()); 996 : treasurelist::find (f.get_str ());
997 997
998 if (!randomitems) 998 if (!randomitems)
999 {
999 LOG (llevError, "%s uses unknown randomitems '%s'.\n", debug_desc (), f.get_str ()); 1000 LOG (llevError, "%s uses unknown randomitems '%s'.\n", debug_desc (), f.get_str ());
1001 randomitems = treasurelist::get (shstr_none); // avoid crashes
1002 }
1000 } 1003 }
1001 else 1004 else
1002 randomitems = 0; 1005 randomitems = 0;
1003 break; 1006 break;
1004 1007
1098{ 1101{
1099 object_thawer f (buf, (AV *)0); 1102 object_thawer f (buf, (AV *)0);
1100 1103
1101 return op->parse_kv (f); 1104 return op->parse_kv (f);
1102} 1105}
1103
1104/* This returns a string of the integer movement type */
1105#if 0
1106// unused function
1107static char *
1108get_string_move_type (MoveType mt)
1109{
1110 static char retbuf[MAX_BUF], retbuf_all[MAX_BUF];
1111 int i, all_count = 0, count;
1112
1113 strcpy (retbuf, "");
1114 strcpy (retbuf_all, " all");
1115
1116 /* Quick check, and probably fairly common */
1117 if (mt == MOVE_ALL)
1118 return retbuf_all + 1;
1119 if (mt == 0)
1120 {
1121 strcpy (retbuf, "0");
1122 return retbuf;
1123 }
1124
1125 /* We basically slide the bits down. Why look at MOVE_ALL?
1126 * because we may want to return a string like 'all -swim',
1127 * and if we just looked at mt, we couldn't get that.
1128 */
1129 for (i = MOVE_ALL, count = 0; i != 0; i >>= 1, count++)
1130 {
1131 if (mt & (1 << count))
1132 {
1133 strcat (retbuf, " ");
1134 strcat (retbuf, move_name[count]);
1135 }
1136 else
1137 {
1138 strcat (retbuf_all, " -");
1139 strcat (retbuf_all, move_name[count]);
1140 all_count++;
1141 }
1142 }
1143 /* Basically, if there is a single negation, return it, eg
1144 * 'all -swim'. But more than that, just return the
1145 * enumerated values. It doesn't make sense to return
1146 * 'all -walk -fly_low' - it is shorter to return 'fly_high swim'
1147 */
1148 if (all_count <= 1)
1149 return retbuf_all + 1;
1150 else
1151 return retbuf + 1;
1152}
1153#endif
1154 1106
1155// compare *op against *tmp and output differences 1107// compare *op against *tmp and output differences
1156static void 1108static void
1157write_diff (object_freezer &f, object *op, object *tmp) 1109write_diff (object_freezer &f, object *op, object *tmp)
1158{ 1110{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines