Crossfire Server, Trunk
|
Go to the source code of this file.
Functions | |
static int | calc_pattern (char ch, char **layout, int i, int j, int xsize, int ysize) |
char ** | expand2x (char **layout, int xsize, int ysize) |
static void | expand_door (char **newlayout, int i, int j, char **layout, int xsize, int ysize) |
static void | expand_misc (char **newlayout, int i, int j, char **layout) |
static void | expand_wall (char **newlayout, int i, int j, char **layout, int xsize, int ysize) |
|
static |
Returns a bitmap that represents which squares on the right and bottom edges of a square (i,j) match the given character.
ch | character to look for. |
layout | map. |
i | |
j | spot where to look. |
xsize | |
ysize | layout size. |
Definition at line 121 of file expand2x.c.
Referenced by expand_door(), and expand_wall().
char** expand2x | ( | char ** | layout, |
int | xsize, | ||
int | ysize | ||
) |
Expands the layout be a factor 2. Doors and walls are taken care of.
layout | layout to expand. Memory is free()d at the end, so pointer becomes invalid. |
xsize | |
ysize | layout size. |
Definition at line 43 of file expand2x.c.
References expand_door(), expand_misc(), and expand_wall().
Referenced by layoutgen().
|
static |
Expand a door. This function will try to sensibly connect doors so that they meet up with adjacent walls. Note that it will also presumptuously delete (ignore) doors that it doesn't know how to correctly expand.
newlayout | expanded layout. |
i | |
j | coordinates of door to expand in non expanded layout. |
layout | non expanded layout. |
xsize | |
ysize | size of non expanded layout. |
Definition at line 199 of file expand2x.c.
References calc_pattern().
Referenced by expand2x().
|
static |
Copy the old tile X into the new one at location (i*2, j*2) and fill up the rest of the 2x2 result with 0: X —> X 0 0 0
newlayout | map layout. |
i | |
j | spot to expand. |
layout | map layout. |
Definition at line 94 of file expand2x.c.
Referenced by expand2x().
|
static |
Expand a wall. This function will try to sensibly connect the resulting wall to adjacent wall squares, so that the result won't have disconnected walls.
newlayout | map layout. |
i | |
j | coordinates of wall to expand in non expanded layout. |
layout | current (non expanded) layout. |
xsize | |
ysize | sizes of layout. |
Definition at line 156 of file expand2x.c.
References calc_pattern().
Referenced by expand2x().