![]() |
Crossfire Server, Trunk
1.75.0
|
#include <assert.h>
#include <stdlib.h>
#include "global.h"
#include "random_map.h"
#include "rproto.h"
Go to the source code of this file.
Macros | |
#define | NR_DECOR_OPTIONS 1 |
Number of decor styles that can be chosen if none specified. More... | |
Functions | |
int | obj_count_in_map (mapstruct *map, int x, int y) |
Count objects at a spot. More... | |
void | put_decor (mapstruct *map, char **maze, char *decorstyle, int decor_option, RMParms *RP) |
Put the decor into the map. More... | |
Those functions handle the decor in the random maps.
Definition in file decor.cpp.
#define NR_DECOR_OPTIONS 1 |
int obj_count_in_map | ( | mapstruct * | map, |
int | x, | ||
int | y | ||
) |
Count objects at a spot.
map | map we want to check |
x | |
y | coordinates |
Definition at line 39 of file decor.cpp.
References FOR_MAP_FINISH, and FOR_MAP_PREPARE.
Referenced by put_decor().
Put the decor into the map.
Right now, it's very primitive.
map | map to add decor to. |
maze | layout of the map, as was generated. |
decorstyle | style to use. Can be NULL. |
decor_option | how to place decor:
|
RP | parameters of the random map. |
Definition at line 65 of file decor.cpp.
References object::arch, arch_to_object(), find_style(), NR_DECOR_OPTIONS, obj_count_in_map(), object_copy(), object_insert_in_map_at(), pick_random_object(), RANDOM, RMParms::Xsize, and RMParms::Ysize.
Referenced by generate_random_map().