Crossfire Server, Trunk
|
#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 |
Functions | |
int | obj_count_in_map (mapstruct *map, int x, int y) |
void | put_decor (mapstruct *map, char **maze, char *decorstyle, int decor_option, RMParms *RP) |
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 disinfect::count, FOR_MAP_FINISH, FOR_MAP_PREPARE, disinfect::map, Ice::tmp, diamondslots::x, and diamondslots::y.
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(), disinfect::map, NR_DECOR_OPTIONS, obj_count_in_map(), object_copy(), object_insert_in_map_at(), pick_random_object(), RANDOM, diamondslots::x, RMParms::Xsize, diamondslots::y, and RMParms::Ysize.
Referenced by generate_random_map().