--- deliantra/server/random_maps/treasure.C 2006/12/12 21:39:56 1.9 +++ deliantra/server/random_maps/treasure.C 2006/12/30 18:45:28 1.11 @@ -69,7 +69,7 @@ */ void -place_treasure (maptile *map, char **layout, char *treasure_style, int treasureoptions, RMParms * RP) +place_treasure (maptile *map, char **layout, char *treasure_style, int treasureoptions, random_map_params * RP) { char styledirname[256]; char stylefilepath[256]; @@ -115,9 +115,9 @@ /* map_layout_style global, and is previously set */ switch (RP->map_layout_style) { - case ONION_LAYOUT: - case SPIRAL_LAYOUT: - case SQUARE_SPIRAL_LAYOUT: + case LAYOUT_ONION: + case LAYOUT_SPIRAL: + case LAYOUT_SQUARE_SPIRAL: { int i, j; @@ -200,7 +200,7 @@ if the global variable "treasurestyle" is set to that treasure list's name */ object * -place_chest (int treasureoptions, int x, int y, maptile *map, maptile *style_map, int n_treasures, RMParms * RP) +place_chest (int treasureoptions, int x, int y, maptile *map, maptile *style_map, int n_treasures, random_map_params * RP) { object *the_chest; int i, xl, yl; @@ -299,7 +299,7 @@ /* finds the closest monster and returns him, regardless of doors or walls */ object * -find_closest_monster (maptile *map, int x, int y, RMParms * RP) +find_closest_monster (maptile *map, int x, int y, random_map_params * RP) { int i; @@ -314,7 +314,7 @@ /* don't bother searching this square unless the map says life exists. */ if (GET_MAP_FLAGS (map, lx, ly) & P_IS_ALIVE) { - object *the_monster = get_map_ob (map, lx, ly); + object *the_monster = GET_MAP_OB (map, lx, ly); for (; the_monster != NULL && (!QUERY_FLAG (the_monster, FLAG_MONSTER)); the_monster = the_monster->above); if (the_monster && QUERY_FLAG (the_monster, FLAG_MONSTER)) @@ -338,7 +338,7 @@ */ int -keyplace (maptile *map, int x, int y, char *keycode, int door_flag, int n_keys, RMParms * RP) +keyplace (maptile *map, int x, int y, char *keycode, int door_flag, int n_keys, random_map_params * RP) { int i, j; int kx, ky; @@ -434,7 +434,7 @@ it does a check-off on the layout, converting 0's to 1's */ object * -find_monster_in_room_recursive (char **layout, maptile *map, int x, int y, RMParms * RP) +find_monster_in_room_recursive (char **layout, maptile *map, int x, int y, random_map_params * RP) { int i, j; @@ -455,7 +455,7 @@ layout[x][y] = 1; if (GET_MAP_FLAGS (map, x, y) & P_IS_ALIVE) { - object *the_monster = get_map_ob (map, x, y); + object *the_monster = GET_MAP_OB (map, x, y); /* check off this point */ for (; the_monster != NULL && (!QUERY_FLAG (the_monster, FLAG_ALIVE)); the_monster = the_monster->above); @@ -481,7 +481,7 @@ real work. */ object * -find_monster_in_room (maptile *map, int x, int y, RMParms * RP) +find_monster_in_room (maptile *map, int x, int y, random_map_params * RP) { char **layout2; int i, j; @@ -523,7 +523,7 @@ that datastructure. */ void -find_spot_in_room_recursive (char **layout, int x, int y, RMParms * RP) +find_spot_in_room_recursive (char **layout, int x, int y, random_map_params * RP) { int i, j; @@ -552,7 +552,7 @@ /* find a random non-blocked spot in this room to drop a key. */ void -find_spot_in_room (maptile *map, int x, int y, int *kx, int *ky, RMParms * RP) +find_spot_in_room (maptile *map, int x, int y, int *kx, int *ky, random_map_params * RP) { char **layout2; int i, j; @@ -599,7 +599,7 @@ it'll return 0 if no FREE spots are found.*/ void -find_enclosed_spot (maptile *map, int *cx, int *cy, RMParms * RP) +find_enclosed_spot (maptile *map, int *cx, int *cy, random_map_params * RP) { int x, y; int i; @@ -675,14 +675,14 @@ { object *tmp; - for (tmp = get_map_ob (map, x, y); tmp != NULL; tmp = tmp->above) + for (tmp = GET_MAP_OB (map, x, y); tmp != NULL; tmp = tmp->above) if (QUERY_FLAG (tmp, FLAG_ALIVE)) { if (tmp->head) tmp = tmp->head; tmp->remove (); tmp->destroy (); - tmp = get_map_ob (map, x, y); + tmp = GET_MAP_OB (map, x, y); if (tmp == NULL) break; }; @@ -741,7 +741,7 @@ { object *tmp; - for (tmp = get_map_ob (map, x, y); tmp != NULL; tmp = tmp->above) + for (tmp = GET_MAP_OB (map, x, y); tmp != NULL; tmp = tmp->above) if (tmp->type == DOOR || tmp->type == LOCKED_DOOR) return tmp; return NULL; @@ -750,7 +750,7 @@ /* the workhorse routine, which finds the doors in a room */ void -find_doors_in_room_recursive (char **layout, maptile *map, int x, int y, object **doorlist, int *ndoors, RMParms * RP) +find_doors_in_room_recursive (char **layout, maptile *map, int x, int y, object **doorlist, int *ndoors, random_map_params * RP) { int i, j; object *door; @@ -792,7 +792,7 @@ /* find a random non-blocked spot in this room to drop a key. */ object ** -find_doors_in_room (maptile *map, int x, int y, RMParms * RP) +find_doors_in_room (maptile *map, int x, int y, random_map_params * RP) { char **layout2; object **doorlist; @@ -832,7 +832,7 @@ opts doesn't say to lock/hide doors. */ void -lock_and_hide_doors (object **doorlist, maptile *map, int opts, RMParms * RP) +lock_and_hide_doors (object **doorlist, maptile *map, int opts, random_map_params * RP) { object *door; int i;