Add lua selection match method

Also improve the replace_terrain command parameters.
This commit is contained in:
Pasi Kallinen
2020-03-02 16:15:40 +02:00
parent ee2821e7e8
commit c9b21e36a7
6 changed files with 244 additions and 90 deletions

View File

@@ -2468,6 +2468,12 @@ E void FDECL(sysopt_seduce_set, (int));
/* ### sp_lev.c ### */
#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_TARGET)
E struct mapfragment *FDECL(mapfrag_fromstr, (char *));
E void FDECL(mapfrag_free, (struct mapfragment **));
E schar FDECL(mapfrag_get, (struct mapfragment *, int, int));
E boolean FDECL(mapfrag_canmatch, (struct mapfragment *));
E const char * FDECL(mapfrag_error, (struct mapfragment *));
E boolean FDECL(mapfrag_match, (struct mapfragment *, int, int));
E void FDECL(flip_level, (int, BOOLEAN_P));
E void FDECL(flip_level_rnd, (int, BOOLEAN_P));
E boolean FDECL(check_room, (xchar *, xchar *, xchar *, xchar *, BOOLEAN_P));

View File

@@ -164,12 +164,6 @@ typedef struct {
xchar ter, tlit;
} terrain;
typedef struct {
xchar chance;
xchar x1, y1, x2, y2;
xchar fromter, toter, tolit;
} replaceterrain;
typedef struct {
struct {
xchar room;
@@ -186,12 +180,9 @@ typedef struct _room {
xchar rtype, chance, rlit, filled, joined;
} room;
typedef struct {
schar zaligntyp;
schar keep_region;
schar halign, valign;
char xsize, ysize;
char **map;
} mazepart;
struct mapfragment {
int wid, hei;
char *data;
};
#endif /* SP_LEV_H */