… | |
… | |
52 | 0, |
52 | 0, |
53 | -1, -1, 0, 1, 1, 1, 0, -1, |
53 | -1, -1, 0, 1, 1, 1, 0, -1, |
54 | -2, -2, -2, -1, 0, 1, 2, 2, 2, 2, 2, 1, 0, -1, -2, -2, |
54 | -2, -2, -2, -1, 0, 1, 2, 2, 2, 2, 2, 1, 0, -1, -2, -2, |
55 | -3, -3, -3, -3, -2, -1, 0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, -1, -2, -3, -3, -3 |
55 | -3, -3, -3, -3, -2, -1, 0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, -1, -2, -3, -3, -3 |
56 | }; |
56 | }; |
57 | int maxfree[SIZEOFFREE] = { |
|
|
58 | 0, |
|
|
59 | 9, 10, 13, 14, 17, 18, 21, 22, |
|
|
60 | 25, 26, 27, 30, 31, 32, 33, 36, 37, 39, 39, 42, 43, 44, 45, 48, |
|
|
61 | 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49 |
|
|
62 | }; |
|
|
63 | int freedir[SIZEOFFREE] = { |
57 | int freedir[SIZEOFFREE] = { |
64 | 0, |
58 | 0, |
65 | 1, 2, 3, 4, 5, 6, 7, 8, |
59 | 1, 2, 3, 4, 5, 6, 7, 8, |
66 | 1, 2, 2, 2, 3, 4, 4, 4, 5, 6, 6, 6, 7, 8, 8, 8, |
60 | 1, 2, 2, 2, 3, 4, 4, 4, 5, 6, 6, 6, 7, 8, 8, 8, |
67 | 1, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 5, 6, 6, 6, 6, 6, 7, 8, 8, 8, 8, 8 |
61 | 1, 2, 2, 2, 2, 2, 3, 4, 4, 4, 4, 4, 5, 6, 6, 6, 6, 6, 7, 8, 8, 8, 8, 8 |
|
|
62 | }; |
|
|
63 | |
|
|
64 | static int maxfree[SIZEOFFREE] = { |
|
|
65 | 0, |
|
|
66 | 9, 10, 13, 14, 17, 18, 21, 22, |
|
|
67 | 25, 26, 27, 30, 31, 32, 33, 36, 37, 39, 39, 42, 43, 44, 45, 48, |
|
|
68 | 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49 |
68 | }; |
69 | }; |
69 | |
70 | |
70 | static void |
71 | static void |
71 | write_uuid (uval64 skip, bool sync) |
72 | write_uuid (uval64 skip, bool sync) |
72 | { |
73 | { |
… | |
… | |
445 | /* |
446 | /* |
446 | * get_nearest_part(multi-object, object 2) returns the part of the |
447 | * get_nearest_part(multi-object, object 2) returns the part of the |
447 | * multi-object 1 which is closest to the second object. |
448 | * multi-object 1 which is closest to the second object. |
448 | * If it's not a multi-object, it is returned. |
449 | * If it's not a multi-object, it is returned. |
449 | */ |
450 | */ |
450 | object * |
451 | static object * |
451 | get_nearest_part (object *op, const object *pl) |
452 | get_nearest_part (object *op, const object *pl) |
452 | { |
453 | { |
453 | object *tmp, *closest; |
454 | object *tmp, *closest; |
454 | int last_dist, i; |
455 | int last_dist, i; |
455 | |
456 | |
… | |
… | |
2173 | * This basically means that if direction is 15, then it could either go |
2174 | * This basically means that if direction is 15, then it could either go |
2174 | * direction 4, 14, or 16 to get back to where we are. |
2175 | * direction 4, 14, or 16 to get back to where we are. |
2175 | * Moved from spell_util.c to object.c with the other related direction |
2176 | * Moved from spell_util.c to object.c with the other related direction |
2176 | * functions. |
2177 | * functions. |
2177 | */ |
2178 | */ |
2178 | const int reduction_dir[SIZEOFFREE][3] = { |
2179 | static const int reduction_dir[SIZEOFFREE][3] = { |
2179 | {0, 0, 0}, /* 0 */ |
2180 | {0, 0, 0}, /* 0 */ |
2180 | {0, 0, 0}, /* 1 */ |
2181 | {0, 0, 0}, /* 1 */ |
2181 | {0, 0, 0}, /* 2 */ |
2182 | {0, 0, 0}, /* 2 */ |
2182 | {0, 0, 0}, /* 3 */ |
2183 | {0, 0, 0}, /* 3 */ |
2183 | {0, 0, 0}, /* 4 */ |
2184 | {0, 0, 0}, /* 4 */ |