1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010,2011 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992 Frank Tore Johansen |
6 | * Copyright (©) 1992 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * the terms of the Affero GNU General Public License as published by the |
9 | * the terms of the Affero GNU General Public License as published by the |
… | |
… | |
918 | case KW_is_buildable: GET_FLAG (this, FLAG_IS_BUILDABLE); break; |
918 | case KW_is_buildable: GET_FLAG (this, FLAG_IS_BUILDABLE); break; |
919 | case KW_destroy_on_death: GET_FLAG (this, FLAG_DESTROY_ON_DEATH); break; |
919 | case KW_destroy_on_death: GET_FLAG (this, FLAG_DESTROY_ON_DEATH); break; |
920 | case KW_treasure_env: GET_FLAG (this, FLAG_TREASURE_ENV); break; |
920 | case KW_treasure_env: GET_FLAG (this, FLAG_TREASURE_ENV); break; |
921 | case KW_precious: GET_FLAG (this, FLAG_PRECIOUS); break; |
921 | case KW_precious: GET_FLAG (this, FLAG_PRECIOUS); break; |
922 | case KW_random_speed: GET_FLAG (this, FLAG_RANDOM_SPEED); break; |
922 | case KW_random_speed: GET_FLAG (this, FLAG_RANDOM_SPEED); break; |
|
|
923 | case KW_is_quad: GET_FLAG (this, FLAG_IS_QUAD); break; |
923 | |
924 | |
924 | case KW_armour: f.get (resist[ATNR_PHYSICAL]); break; |
925 | case KW_armour: f.get (resist[ATNR_PHYSICAL]); break; |
925 | case KW_resist_physical: f.get (resist[ATNR_PHYSICAL]); break; |
926 | case KW_resist_physical: f.get (resist[ATNR_PHYSICAL]); break; |
926 | case KW_resist_magic: f.get (resist[ATNR_MAGIC]); break; |
927 | case KW_resist_magic: f.get (resist[ATNR_MAGIC]); break; |
927 | case KW_resist_fire: f.get (resist[ATNR_FIRE]); break; |
928 | case KW_resist_fire: f.get (resist[ATNR_FIRE]); break; |
… | |
… | |
1081 | |
1082 | |
1082 | archetype *arch = archetype::find (f.get_str ()); |
1083 | archetype *arch = archetype::find (f.get_str ()); |
1083 | |
1084 | |
1084 | if (!arch) |
1085 | if (!arch) |
1085 | { |
1086 | { |
1086 | LOG (llevError, "object refering to nonexistant archetype '%s'.\n", f.get_str ()); |
1087 | LOG (llevError, "object referring to nonexistent archetype '%s'.\n", f.get_str ()); |
1087 | arch = archetype::find (shstr_earthwall); |
1088 | arch = archetype::find (shstr_earthwall); |
1088 | } |
1089 | } |
1089 | |
1090 | |
1090 | assert (arch); //D maybe use exception handling of sorts? |
1091 | assert (arch); //D maybe use exception handling of sorts? |
1091 | |
1092 | |
… | |
… | |
1465 | #endif |
1466 | #endif |
1466 | |
1467 | |
1467 | // save body locations. gcc's memcmp does an abysmal job when used |
1468 | // save body locations. gcc's memcmp does an abysmal job when used |
1468 | for (int i = 0; i < NUM_BODY_LOCATIONS; i++) |
1469 | for (int i = 0; i < NUM_BODY_LOCATIONS; i++) |
1469 | if (expect_false (op->slot[i].info != arch->slot[i].info)) |
1470 | if (expect_false (op->slot[i].info != arch->slot[i].info)) |
1470 | f.put (body_locations[i].save_name, op->slot[i].info); |
1471 | f.put (body_locations[i].kw, op->slot[i].info); |
1471 | } |
1472 | } |
1472 | |
1473 | |
1473 | /* |
1474 | /* |
1474 | * Dumps all variables in an object to a file. |
1475 | * Dumps all variables in an object to a file. |
1475 | * If bit 0 of flag is set, unpaid objects will be saved. As of now, |
1476 | * If bit 0 of flag is set, unpaid objects will be saved. As of now, |