Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge from Unstable #30

Merged
merged 18 commits into from
Mar 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ ZDBSP_OBJS= \
$(OBJ_DIR)/zdbsp/sc_man.o \
$(OBJ_DIR)/zdbsp/zdwad.o \
$(OBJ_DIR)/zdbsp/nodebuild.o \
$(OBJ_DIR)/zdbsp/rejectbuilder.o \
$(OBJ_DIR)/zdbsp/rejectbuilder_nogl.o \
$(OBJ_DIR)/zdbsp/vis.o \
$(OBJ_DIR)/zdbsp/visflow.o \
$(OBJ_DIR)/zdbsp/nodebuild_events.o \
$(OBJ_DIR)/zdbsp/nodebuild_extract.o \
$(OBJ_DIR)/zdbsp/nodebuild_gl.o \
Expand Down
46 changes: 9 additions & 37 deletions engines/zdoom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,42 +40,14 @@ ZDOOM.ENTITIES =


ZDOOM.PARAMETERS =
{
-- TODO
}


OB_ENGINES["zdoom"] =
{
label = _("ZDoom"),

extends = "boom",

game =
{
chex3=1, doom1=1, doom2=1, heretic=1, hexen=1, strife=1,
},

tables =
{
ZDOOM
}
}

----------------------------------------------------------------

GZDOOM = { }

GZDOOM.PARAMETERS =
{
bridges = true,
extra_floors = true,
liquid_floors = true,
tga_images = true
}


function GZDOOM.setup()
function ZDOOM.setup()
-- extrafloors : use Legacy types
gui.property("ef_solid_type", 281)
gui.property("ef_liquid_type", 301)
Expand All @@ -85,27 +57,27 @@ function GZDOOM.setup()
gui.property("ef_thing_mode", 1)
end


OB_ENGINES["gzdoom"] =
OB_ENGINES["zdoom"] =
{
label = _("GZDoom"),
priority = -1, -- keep at bottom with ZDoom
priority = -1,

extends = "zdoom",
extends = "boom",

game =
{
chex3=1, doom1=1, doom2=1, heretic=1, hexen=1, strife=1
chex3=1, doom1=1, doom2=1, heretic=1, hexen=1, strife=1,
},

tables =
{
GZDOOM
ZDOOM
},

hooks =
{
setup = GZDOOM.setup
setup = ZDOOM.setup
}

}

4 changes: 2 additions & 2 deletions games/doom/fabs/hall/dem_conveyorh_j.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PREFABS.Hallway_conveyorh_term1 =
{
file = "hall/dem_conveyorh_j.wad",
map = "MAP01",
engine = "gzdoom",
engine = "zdoom",

kind = "terminator",
theme = "hell",
Expand Down Expand Up @@ -112,7 +112,7 @@ PREFABS.Hallway_conveyorh_term4 =

map = "MAP04",

engine = "gzdoom",
engine = "zdoom",

style = "doors",

Expand Down
8 changes: 4 additions & 4 deletions games/doom/fabs/hall/dem_conveyorh_k.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PREFABS.Hallway_conveyorh_locked_red1 =
{
file = "hall/dem_conveyorh_k.wad",
map = "MAP01",
engine = "gzdoom",
engine = "zdoom",

theme = "hell",

Expand All @@ -31,7 +31,7 @@ PREFABS.Hallway_conveyorh_locked_blue1 =
{
template = "Hallway_conveyorh_locked_red1",
map = "MAP01",
engine = "gzdoom",
engine = "zdoom",

key = "k_blue",

Expand All @@ -44,7 +44,7 @@ PREFABS.Hallway_conveyorh_locked_yellow1 =
{
template = "Hallway_conveyorh_locked_red1",
map = "MAP01",
engine = "gzdoom",
engine = "zdoom",

key = "k_yellow",

Expand Down Expand Up @@ -186,7 +186,7 @@ PREFABS.Hallway_conveyorh_barred1 =
{
file = "hall/dem_conveyorh_k.wad",
map = "MAP04",
engine = "gzdoom",
engine = "zdoom",

kind = "terminator",
group = "conveyorh",
Expand Down
2 changes: 1 addition & 1 deletion games/doom/fabs/hall/dem_pipeline_c.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ PREFABS.Hallway_pipeline_c1 =
seed_w = 2,
seed_h = 2,

engine = "gzdoom",
engine = "zdoom",

sound = "Pipeline",

Expand Down
4 changes: 2 additions & 2 deletions games/doom/fabs/hall/dem_pipeline_k.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ PREFABS.Hallway_pipeline_locked_red2 =
y_fit = "top",
deep = 16,

engine = "gzdoom",
engine = "zdoom",

sound = "Pipeline",

Expand Down Expand Up @@ -130,7 +130,7 @@ PREFABS.Hallway_pipeline_barred1 =

deep = 16,

engine = "gzdoom",
engine = "zdoom",

sound = "Pipeline",

Expand Down
2 changes: 1 addition & 1 deletion games/doom/fabs/item/dem_item_closets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ PREFABS.Item_dem_campsiteC_closet =
file = "item/dem_item_closets.wad",
map = "MAP21",

engine = "gzdoom",
engine = "zdoom",

theme = "!hell",

Expand Down
2 changes: 1 addition & 1 deletion games/doom/fabs/item/dem_secret_closets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ PREFABS.Item_dem_campsiteC_secretcloset =
file = "item/dem_secret_closets.wad",
map = "MAP13",

engine = "gzdoom",
engine = "zdoom",

theme = "!hell",

Expand Down
2 changes: 1 addition & 1 deletion games/doom/fabs/picture/dem_pic_nature.lua
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ PREFABS.Pic_dem_campsiteC =
file = "picture/dem_pic_nature.wad",
map = "MAP52",

engine = "gzdoom",
engine = "zdoom",

theme = "!hell",

Expand Down
5 changes: 5 additions & 0 deletions games/hexen/themes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ HEXEN.THEMES =
beam_metal = 50,
},

wall_groups =
{
PLAIN = 0.01,
},

fences =
{
CASTLE07=35,
Expand Down
94 changes: 94 additions & 0 deletions gui/dm_prefab.cc
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,56 @@ int wadfab_get_thing(lua_State *L)
return 1;
}

int wadfab_get_thing_hexen(lua_State *L)
{
int index = luaL_checkinteger(L, 1);

if (index < 0 || index >= ajpoly::num_things)
return 0;

const ajpoly::thing_c * TH = ajpoly::Thing(index);

lua_newtable(L);

lua_pushinteger(L, TH->type);
lua_setfield(L, -2, "id");

lua_pushinteger(L, TH->x);
lua_setfield(L, -2, "x");

lua_pushinteger(L, TH->y);
lua_setfield(L, -2, "y");

lua_pushinteger(L, calc_thing_z(TH->x, TH->y));
lua_setfield(L, -2, "z");

lua_pushinteger(L, TH->angle);
lua_setfield(L, -2, "angle");

lua_pushinteger(L, TH->options);
lua_setfield(L, -2, "flags");

lua_pushinteger(L, TH->special);
lua_setfield(L, -2, "special");

lua_pushinteger(L, TH->args[0]);
lua_setfield(L, -2, "arg1");

lua_pushinteger(L, TH->args[1]);
lua_setfield(L, -2, "arg2");

lua_pushinteger(L, TH->args[2]);
lua_setfield(L, -2, "arg3");

lua_pushinteger(L, TH->args[3]);
lua_setfield(L, -2, "arg4");

lua_pushinteger(L, TH->args[4]);
lua_setfield(L, -2, "arg5");

return 1;
}


int wadfab_get_sector(lua_State *L)
{
Expand Down Expand Up @@ -318,6 +368,50 @@ int wadfab_get_line(lua_State *L)

lua_pushinteger(L, LD->tag);
lua_setfield(L, -2, "tag");

return 1;
}

int wadfab_get_line_hexen(lua_State *L)
{
int index = luaL_checkinteger(L, 1);

if (index < 0 || index >= ajpoly::num_linedefs)
return 0;

const ajpoly::linedef_c * LD = ajpoly::Linedef(index);

lua_newtable(L);

lua_pushinteger(L, LD->start->x);
lua_setfield(L, -2, "x1");

lua_pushinteger(L, LD->start->y);
lua_setfield(L, -2, "y1");

lua_pushinteger(L, LD->end->x);
lua_setfield(L, -2, "x2");

lua_pushinteger(L, LD->end->y);
lua_setfield(L, -2, "y2");

if (LD->right)
{
lua_pushinteger(L, LD->right->index);
lua_setfield(L, -2, "right");
}

if (LD->left)
{
lua_pushinteger(L, LD->left->index);
lua_setfield(L, -2, "left");
}

lua_pushinteger(L, LD->special);
lua_setfield(L, -2, "special");

lua_pushinteger(L, LD->flags);
lua_setfield(L, -2, "flags");

lua_pushinteger(L, LD->args[0]);
lua_setfield(L, -2, "arg1");
Expand Down
Loading