prefix some macro names

This commit is contained in:
nhmall
2022-11-03 16:50:25 -04:00
parent d80e8d9569
commit cf897d9293
3 changed files with 59 additions and 59 deletions

View File

@@ -163,11 +163,11 @@ int lspo_trap(lua_State *);
int lspo_wall_property(lua_State *);
int lspo_wallify(lua_State *);
#define LEFT 1
#define H_LEFT 2
#define CENTER 3
#define H_RIGHT 4
#define RIGHT 5
#define SPLEV_LEFT 1
#define SPLEV_H_LEFT 2
#define SPLEV_CENTER 3
#define SPLEV_H_RIGHT 4
#define SPLEV_RIGHT 5
#define TOP 1
#define BOTTOM 5
@@ -1561,12 +1561,12 @@ create_room(
xabs = (((xtmp - 1) * COLNO) / 5) + 1;
yabs = (((ytmp - 1) * ROWNO) / 5) + 1;
switch (xaltmp) {
case LEFT:
case SPLEV_LEFT:
break;
case RIGHT:
case SPLEV_RIGHT:
xabs += (COLNO / 5) - wtmp;
break;
case CENTER:
case SPLEV_CENTER:
xabs += ((COLNO / 5) - wtmp) / 2;
break;
}
@@ -1576,7 +1576,7 @@ create_room(
case BOTTOM:
yabs += (ROWNO / 5) - htmp;
break;
case CENTER:
case SPLEV_CENTER:
yabs += ((ROWNO / 5) - htmp) / 2;
break;
}
@@ -3892,12 +3892,12 @@ lspo_room(lua_State *L)
"none", "random", NULL
};
static const int l_or_r2i[] = {
LEFT, H_LEFT, CENTER, H_RIGHT, RIGHT, -1, -1, -1
SPLEV_LEFT, SPLEV_H_LEFT, SPLEV_CENTER, SPLEV_H_RIGHT, SPLEV_RIGHT, -1, -1, -1
};
static const char *const top_or_bot[] = {
"top", "center", "bottom", "none", "random", NULL
};
static const int t_or_b2i[] = { TOP, CENTER, BOTTOM, -1, -1, -1 };
static const int t_or_b2i[] = { TOP, SPLEV_CENTER, BOTTOM, -1, -1, -1 };
room tmproom;
struct mkroom *tmpcr;
lua_Integer rx, ry;
@@ -6445,12 +6445,12 @@ TODO: g.coder->croom needs to be updated
"left", "half-left", "center", "half-right", "right", "none", NULL
};
static const int l_or_r2i[] = {
LEFT, H_LEFT, CENTER, H_RIGHT, RIGHT, -1, -1
SPLEV_LEFT, SPLEV_H_LEFT, SPLEV_CENTER, SPLEV_H_RIGHT, SPLEV_RIGHT, -1, -1
};
static const char *const top_or_bot[] = {
"top", "center", "bottom", "none", NULL
};
static const int t_or_b2i[] = { TOP, CENTER, BOTTOM, -1, -1 };
static const int t_or_b2i[] = { TOP, SPLEV_CENTER, BOTTOM, -1, -1 };
int lr, tb;
lua_Integer x = -1, y = -1;
struct mapfragment *mf;
@@ -6467,7 +6467,7 @@ TODO: g.coder->croom needs to be updated
if (argc == 1 && lua_type(L, 1) == LUA_TSTRING) {
tmpstr = dupstr(luaL_checkstring(L, 1));
lr = tb = CENTER;
lr = tb = SPLEV_CENTER;
mf = mapfrag_fromstr(tmpstr);
free(tmpstr);
} else {
@@ -6545,19 +6545,19 @@ TODO: g.coder->croom needs to be updated
} else {
/* place map starting at halign,valign */
switch (lr) {
case LEFT:
case SPLEV_LEFT:
g.xstart = splev_init_present ? 1 : 3;
break;
case H_LEFT:
case SPLEV_H_LEFT:
g.xstart = 2 + ((g.x_maze_max - 2 - g.xsize) / 4);
break;
case CENTER:
case SPLEV_CENTER:
g.xstart = 2 + ((g.x_maze_max - 2 - g.xsize) / 2);
break;
case H_RIGHT:
case SPLEV_H_RIGHT:
g.xstart = 2 + ((g.x_maze_max - 2 - g.xsize) * 3 / 4);
break;
case RIGHT:
case SPLEV_RIGHT:
g.xstart = g.x_maze_max - g.xsize - 1;
break;
}
@@ -6565,7 +6565,7 @@ TODO: g.coder->croom needs to be updated
case TOP:
g.ystart = 3;
break;
case CENTER:
case SPLEV_CENTER:
g.ystart = 2 + ((g.y_maze_max - 2 - g.ysize) / 2);
break;
case BOTTOM: