… | |
… | |
23 | |
23 | |
24 | #include <global.h> |
24 | #include <global.h> |
25 | #include <spells.h> |
25 | #include <spells.h> |
26 | #include <skills.h> |
26 | #include <skills.h> |
27 | #include <living.h> |
27 | #include <living.h> |
28 | #include <newclient.h> |
|
|
29 | #ifndef __CEXTRACT__ |
|
|
30 | # include <sproto.h> |
28 | #include <sproto.h> |
31 | #endif |
|
|
32 | #include <math.h> |
29 | #include <math.h> |
33 | |
30 | |
34 | /* this is a measure of how effective store specialisation is. A general store |
31 | /* this is a measure of how effective store specialisation is. A general store |
35 | * will offer this proportion of the 'maximum' price, a specialised store will |
32 | * will offer this proportion of the 'maximum' price, a specialised store will |
36 | * offer a range of prices around it such that the maximum price is always one |
33 | * offer a range of prices around it such that the maximum price is always one |
… | |
… | |
1228 | if (nx < 0 || ny < 0 || nx > MAGIC_MAP_SIZE || ny > MAGIC_MAP_SIZE) |
1225 | if (nx < 0 || ny < 0 || nx > MAGIC_MAP_SIZE || ny > MAGIC_MAP_SIZE) |
1229 | continue; |
1226 | continue; |
1230 | |
1227 | |
1231 | if (map_mark[nx + MAGIC_MAP_SIZE * ny] & FACE_FLOOR) |
1228 | if (map_mark[nx + MAGIC_MAP_SIZE * ny] & FACE_FLOOR) |
1232 | { |
1229 | { |
1233 | stack = get_map_ob (op->map, i, j); |
1230 | stack = GET_MAP_OB (op->map, i, j); |
1234 | |
1231 | |
1235 | while (stack) |
1232 | while (stack) |
1236 | { |
1233 | { |
1237 | if (QUERY_FLAG (stack, FLAG_UNPAID)) |
1234 | if (QUERY_FLAG (stack, FLAG_UNPAID)) |
1238 | { |
1235 | { |
… | |
… | |
1292 | |
1289 | |
1293 | /* elmex: this function checks whether we are in a shop or not */ |
1290 | /* elmex: this function checks whether we are in a shop or not */ |
1294 | bool |
1291 | bool |
1295 | is_in_shop (maptile *map, int x, int y) |
1292 | is_in_shop (maptile *map, int x, int y) |
1296 | { |
1293 | { |
1297 | for (object *floor = get_map_ob (map, x, y); floor; floor = floor->above) |
1294 | for (object *floor = GET_MAP_OB (map, x, y); floor; floor = floor->above) |
1298 | if (floor->type == SHOP_FLOOR) |
1295 | if (floor->type == SHOP_FLOOR) |
1299 | return true; |
1296 | return true; |
1300 | |
1297 | |
1301 | return false; |
1298 | return false; |
1302 | } |
1299 | } |