diff --git a/data/bg/airduct.tga b/data/bg/airduct.tga deleted file mode 100644 index b8b02c6fc3..0000000000 Binary files a/data/bg/airduct.tga and /dev/null differ diff --git a/data/bg/block1.tga b/data/bg/block1.tga deleted file mode 100644 index 82a7668c95..0000000000 Binary files a/data/bg/block1.tga and /dev/null differ diff --git a/data/bg/block2.tga b/data/bg/block2.tga deleted file mode 100644 index 84b26b34bc..0000000000 Binary files a/data/bg/block2.tga and /dev/null differ diff --git a/data/bg/bodiesc.tga b/data/bg/bodiesc.tga deleted file mode 100644 index a5a201f7cd..0000000000 Binary files a/data/bg/bodiesc.tga and /dev/null differ diff --git a/data/bg/bricks08.tga b/data/bg/bricks08.tga deleted file mode 100644 index 69a01224a0..0000000000 Binary files a/data/bg/bricks08.tga and /dev/null differ diff --git a/data/bg/bricks09.tga b/data/bg/bricks09.tga deleted file mode 100644 index a2fb1790a6..0000000000 Binary files a/data/bg/bricks09.tga and /dev/null differ diff --git a/data/bg/bronze5.tga b/data/bg/bronze5.tga deleted file mode 100644 index 6ae90de926..0000000000 Binary files a/data/bg/bronze5.tga and /dev/null differ diff --git a/data/bg/cement.tga b/data/bg/cement.tga deleted file mode 100644 index 3b6973c33d..0000000000 Binary files a/data/bg/cement.tga and /dev/null differ diff --git a/data/bg/darkf03.tga b/data/bg/darkf03.tga deleted file mode 100644 index e0e00da2a5..0000000000 Binary files a/data/bg/darkf03.tga and /dev/null differ diff --git a/data/bg/goth10.tga b/data/bg/goth10.tga deleted file mode 100644 index bdb88ba995..0000000000 Binary files a/data/bg/goth10.tga and /dev/null differ diff --git a/data/bg/goth36.tga b/data/bg/goth36.tga deleted file mode 100644 index ca0927d91f..0000000000 Binary files a/data/bg/goth36.tga and /dev/null differ diff --git a/data/bg/goth50.tga b/data/bg/goth50.tga deleted file mode 100644 index eabe5cf905..0000000000 Binary files a/data/bg/goth50.tga and /dev/null differ diff --git a/data/bg/goth51.tga b/data/bg/goth51.tga deleted file mode 100644 index e6219ec625..0000000000 Binary files a/data/bg/goth51.tga and /dev/null differ diff --git a/data/bg/goth6.tga b/data/bg/goth6.tga deleted file mode 100644 index 984ab8ec4e..0000000000 Binary files a/data/bg/goth6.tga and /dev/null differ diff --git a/data/bg/graymet2.tga b/data/bg/graymet2.tga deleted file mode 100644 index cd764ebd0b..0000000000 Binary files a/data/bg/graymet2.tga and /dev/null differ diff --git a/data/bg/helmet1.tga b/data/bg/helmet1.tga deleted file mode 100644 index 2f5d124e15..0000000000 Binary files a/data/bg/helmet1.tga and /dev/null differ diff --git a/data/bg/helmet2.tga b/data/bg/helmet2.tga deleted file mode 100644 index 1d23faf09a..0000000000 Binary files a/data/bg/helmet2.tga and /dev/null differ diff --git a/data/bg/helwal1.tga b/data/bg/helwal1.tga deleted file mode 100644 index 74cc8905f3..0000000000 Binary files a/data/bg/helwal1.tga and /dev/null differ diff --git a/data/bg/lamp1.tga b/data/bg/lamp1.tga deleted file mode 100644 index 4828355ce2..0000000000 Binary files a/data/bg/lamp1.tga and /dev/null differ diff --git a/data/bg/lamp2.tga b/data/bg/lamp2.tga deleted file mode 100644 index 70a70c7326..0000000000 Binary files a/data/bg/lamp2.tga and /dev/null differ diff --git a/data/bg/lamp3.tga b/data/bg/lamp3.tga deleted file mode 100644 index d4a7d8204f..0000000000 Binary files a/data/bg/lamp3.tga and /dev/null differ diff --git a/data/bg/rdrok1.tga b/data/bg/rdrok1.tga deleted file mode 100644 index 80271e3ae1..0000000000 Binary files a/data/bg/rdrok1.tga and /dev/null differ diff --git a/data/licenses/License Attribution.txt b/data/licenses/License Attribution.txt index 36710af098..456115a83d 100644 --- a/data/licenses/License Attribution.txt +++ b/data/licenses/License Attribution.txt @@ -23,6 +23,8 @@ Freedoom (Icon of Sin replacement graphics) - Copyright (c) 2001-2019 Contributo CC0 1.0 Universal License =========================================================================================== +Oblige v5-v7 Prefab WAD files and colocated Lua definitions - Andrew Apted + "Wind Arctic Cold" sound - cobratronik via Freesound.org "Dark Cave Drone" sound - Kinoton via Freesound.org @@ -68,9 +70,7 @@ CC-BY-NC-3.0 Unported License CC-BY-4.0 International License =========================================================================================== -Oblige v5-v7 Prefab WAD files - Copyright (c) 2013-2017 Andrew Apted - -ObAddon and OBSIDIAN Prefab WAD files - Copyright (c) 2018-2024 The OBSIDIAN Team +ObAddon and OBSIDIAN Prefab WAD files and colocated Lua definitions - Copyright (c) 2018-2024 The OBSIDIAN Team "Wide Stereo Outdoor Ambience" sound - Copyright (c) 2014 Kasper August Topp via Freesound.org diff --git a/data/masks/compgreen.tga b/data/masks/compgreen.tga deleted file mode 100644 index d2b3aad049..0000000000 Binary files a/data/masks/compgreen.tga and /dev/null differ diff --git a/data/masks/fireblu.tga b/data/masks/fireblu.tga deleted file mode 100644 index de5ace2869..0000000000 Binary files a/data/masks/fireblu.tga and /dev/null differ diff --git a/data/masks/groovy1.tga b/data/masks/groovy1.tga deleted file mode 100644 index 5969242a6d..0000000000 Binary files a/data/masks/groovy1.tga and /dev/null differ diff --git a/data/masks/redrock.tga b/data/masks/redrock.tga deleted file mode 100644 index 39e8515b4f..0000000000 Binary files a/data/masks/redrock.tga and /dev/null differ diff --git a/data/masks/shawn_r.tga b/data/masks/shawn_r.tga deleted file mode 100644 index 93f4a0a1ff..0000000000 Binary files a/data/masks/shawn_r.tga and /dev/null differ diff --git a/data/masks/yellowish.tga b/data/masks/yellowish.tga deleted file mode 100644 index 21b55e295f..0000000000 Binary files a/data/masks/yellowish.tga and /dev/null differ diff --git a/games/doom/base.lua b/games/doom/base.lua index 1dd3784e0d..8b259cceb0 100644 --- a/games/doom/base.lua +++ b/games/doom/base.lua @@ -64,6 +64,7 @@ OB_GAMES["doom2"] = hooks = { + setup = DOOM.setup, factory_setup = DOOM.factory_setup, slump_setup = DOOM.slump_setup, get_levels = DOOM.get_levels, diff --git a/data/loading/loading_screens.wad b/games/doom/data/loading/loading_screens.wad similarity index 98% rename from data/loading/loading_screens.wad rename to games/doom/data/loading/loading_screens.wad index 51a7779510..4737f575f2 100644 Binary files a/data/loading/loading_screens.wad and b/games/doom/data/loading/loading_screens.wad differ diff --git a/data/music/D_DM2INT.ogg b/games/doom/data/music/D_DM2INT.ogg similarity index 100% rename from data/music/D_DM2INT.ogg rename to games/doom/data/music/D_DM2INT.ogg diff --git a/data/sounds/ARCTIC.ogg b/games/doom/data/sounds/ARCTIC.ogg similarity index 100% rename from data/sounds/ARCTIC.ogg rename to games/doom/data/sounds/ARCTIC.ogg diff --git a/data/sounds/BATHFAN.ogg b/games/doom/data/sounds/BATHFAN.ogg similarity index 100% rename from data/sounds/BATHFAN.ogg rename to games/doom/data/sounds/BATHFAN.ogg diff --git a/data/sounds/CAVEAMB.ogg b/games/doom/data/sounds/CAVEAMB.ogg similarity index 100% rename from data/sounds/CAVEAMB.ogg rename to games/doom/data/sounds/CAVEAMB.ogg diff --git a/data/sounds/COMPSTN.ogg b/games/doom/data/sounds/COMPSTN.ogg similarity index 100% rename from data/sounds/COMPSTN.ogg rename to games/doom/data/sounds/COMPSTN.ogg diff --git a/data/sounds/CONVMECH.ogg b/games/doom/data/sounds/CONVMECH.ogg similarity index 100% rename from data/sounds/CONVMECH.ogg rename to games/doom/data/sounds/CONVMECH.ogg diff --git a/data/sounds/DSRAT.ogg b/games/doom/data/sounds/DSRAT.ogg similarity index 100% rename from data/sounds/DSRAT.ogg rename to games/doom/data/sounds/DSRAT.ogg diff --git a/data/sounds/FANSND.ogg b/games/doom/data/sounds/FANSND.ogg similarity index 100% rename from data/sounds/FANSND.ogg rename to games/doom/data/sounds/FANSND.ogg diff --git a/data/sounds/HELLIND.ogg b/games/doom/data/sounds/HELLIND.ogg similarity index 100% rename from data/sounds/HELLIND.ogg rename to games/doom/data/sounds/HELLIND.ogg diff --git a/data/sounds/HELLOUT.ogg b/games/doom/data/sounds/HELLOUT.ogg similarity index 100% rename from data/sounds/HELLOUT.ogg rename to games/doom/data/sounds/HELLOUT.ogg diff --git a/data/sounds/MACHNAIR.ogg b/games/doom/data/sounds/MACHNAIR.ogg similarity index 100% rename from data/sounds/MACHNAIR.ogg rename to games/doom/data/sounds/MACHNAIR.ogg diff --git a/data/sounds/MACHVENT.ogg b/games/doom/data/sounds/MACHVENT.ogg similarity index 100% rename from data/sounds/MACHVENT.ogg rename to games/doom/data/sounds/MACHVENT.ogg diff --git a/data/sounds/PIPELINE.ogg b/games/doom/data/sounds/PIPELINE.ogg similarity index 100% rename from data/sounds/PIPELINE.ogg rename to games/doom/data/sounds/PIPELINE.ogg diff --git a/data/sounds/RAINAMB.ogg b/games/doom/data/sounds/RAINAMB.ogg similarity index 100% rename from data/sounds/RAINAMB.ogg rename to games/doom/data/sounds/RAINAMB.ogg diff --git a/data/sounds/SPARKING.ogg b/games/doom/data/sounds/SPARKING.ogg similarity index 100% rename from data/sounds/SPARKING.ogg rename to games/doom/data/sounds/SPARKING.ogg diff --git a/data/sounds/STREETAM.ogg b/games/doom/data/sounds/STREETAM.ogg similarity index 100% rename from data/sounds/STREETAM.ogg rename to games/doom/data/sounds/STREETAM.ogg diff --git a/data/sounds/TECHAMB.ogg b/games/doom/data/sounds/TECHAMB.ogg similarity index 100% rename from data/sounds/TECHAMB.ogg rename to games/doom/data/sounds/TECHAMB.ogg diff --git a/data/sounds/TECHIND.ogg b/games/doom/data/sounds/TECHIND.ogg similarity index 100% rename from data/sounds/TECHIND.ogg rename to games/doom/data/sounds/TECHIND.ogg diff --git a/data/sounds/TEMPPARK.ogg b/games/doom/data/sounds/TEMPPARK.ogg similarity index 100% rename from data/sounds/TEMPPARK.ogg rename to games/doom/data/sounds/TEMPPARK.ogg diff --git a/data/sounds/TOILETRN.ogg b/games/doom/data/sounds/TOILETRN.ogg similarity index 100% rename from data/sounds/TOILETRN.ogg rename to games/doom/data/sounds/TOILETRN.ogg diff --git a/data/sounds/VENDHUM.ogg b/games/doom/data/sounds/VENDHUM.ogg similarity index 100% rename from data/sounds/VENDHUM.ogg rename to games/doom/data/sounds/VENDHUM.ogg diff --git a/data/sounds/WATDRAIN.ogg b/games/doom/data/sounds/WATDRAIN.ogg similarity index 100% rename from data/sounds/WATDRAIN.ogg rename to games/doom/data/sounds/WATDRAIN.ogg diff --git a/data/sounds/WATFALL.ogg b/games/doom/data/sounds/WATFALL.ogg similarity index 100% rename from data/sounds/WATFALL.ogg rename to games/doom/data/sounds/WATFALL.ogg diff --git a/data/sounds/WATSTRM.ogg b/games/doom/data/sounds/WATSTRM.ogg similarity index 100% rename from data/sounds/WATSTRM.ogg rename to games/doom/data/sounds/WATSTRM.ogg diff --git a/data/sounds/WATTANK.ogg b/games/doom/data/sounds/WATTANK.ogg similarity index 100% rename from data/sounds/WATTANK.ogg rename to games/doom/data/sounds/WATTANK.ogg diff --git a/games/doom/data/title/barrel1.tga b/games/doom/data/title/barrel1.tga new file mode 100644 index 0000000000..ca19940780 Binary files /dev/null and b/games/doom/data/title/barrel1.tga differ diff --git a/games/doom/data/title/brushedmetal.tga b/games/doom/data/title/brushedmetal.tga new file mode 100644 index 0000000000..068f25c967 Binary files /dev/null and b/games/doom/data/title/brushedmetal.tga differ diff --git a/games/doom/data/title/techbg1.tga b/games/doom/data/title/techbg1.tga new file mode 100644 index 0000000000..83f2d76921 Binary files /dev/null and b/games/doom/data/title/techbg1.tga differ diff --git a/games/doom/themes.lua b/games/doom/themes.lua index 726e530fec..943fd68a22 100644 --- a/games/doom/themes.lua +++ b/games/doom/themes.lua @@ -5934,6 +5934,505 @@ DOOM.NAMES = } } +-------------------------------------------------------------------- + +DOOM.TITLE_MAIN_STYLES = +{ + --- Solid styles --- + + solid_blue = + { + prob = 25, + + font_mode = "solid", + + font_colors = { "#00f" }, + + font_outline_mode = "shadow2", + font_outlines = { "#00c", "#009", "#006", "#000" }, + + narrow = 0.6, + + alt = + { + font_mode = "solid", + font_colors = { "#ccf" }, + font_outline_mode = "zoom", + font_outlines = { "#77f", "#00f", "#000" }, + }, + }, + + solid_red = + { + prob = 25, + + font_mode = "solid", + + font_colors = { "#f00" }, + + font_outline_mode = "shadow2", + font_outlines = { "#c00", "#900", "#600", "#000" }, + + narrow = 0.6, + + alt = + { + font_mode = "solid", + font_colors = { "#fff" }, + font_outline_mode = "surround", + font_outlines = { "#f44", "#900", "#000" }, + }, + }, + + solid_green = + { + prob = 25, + + font_mode = "solid", + + font_colors = { "#0f0" }, + + font_outline_mode = "shadow", + font_outlines = { "#0c0", "#090", "#060", "#000" }, + + narrow = 0.4, + }, + + solid_black_lightblue = + { + prob = 25, + + font_mode = "solid", + + font_colors = { "#000" }, + + font_outlines = { "#009", "#99f", "#ddd" }, + + narrow = 0.7, + }, + + shaded_white_n_blue = + { + font_mode = "solid", + + font_colors = { "#fff" }, + + font_outline_mode = "shadow", + font_outlines = { "#bbf", "#99f", "#55f", "#22f", "#00f", "#009", "#004", "#000" }, + + narrow = 0.4, + }, + + shaded_white_n_red = + { + font_mode = "solid", + + font_colors = { "#fff" }, + + font_outline_mode = "zoom", + font_outlines = { "#f99", "#f66", "#e00", "#b00", "#800", "#400", "#000" }, + + narrow = 0.4, + }, + + --- Gradient styles --- + + gradient_white_black = + { + font_mode = "gradient", + + font_colors = { "#fff", "#000" }, + + font_outlines = { "#000", "#555" }, + }, + + gradient_green_black = + { + font_mode = "gradient", + + font_colors = { "#7e6", "#000" }, + + font_outlines = { "#231", "#342" }, + }, + + gradient_pink_black = + { + font_mode = "gradient3", + + font_colors = { "#c77", "#611", "#000" }, + + font_outlines = { "#000", "#933" }, + }, + + gradient_black_brown = + { + font_mode = "gradient3", + + font_colors = { "#000", "#752", "#fb8" }, + + font_outlines = { "#432", "#000" }, + }, + + grad3_white_red_black = + { + font_mode = "gradient3", + + font_colors = { "#fff", "#f00", "#000" }, + + font_outlines = { "#c00" }, + }, + + grad3_white_blue_black = + { + font_mode = "gradient3", + + font_colors = { "#fff", "#00f", "#000" }, + + font_outlines = { "#00c" }, + }, + + grad3_white_orange_black = + { + font_mode = "gradient3", + + font_colors = { "#fff", "#720", "#000" }, + + font_outlines = { "#000" }, + }, + + gradmirror_orange_white = + { + font_mode = "gradient3", + + font_colors = { "#720", "#fff", "#720" }, + + font_outlines = { "#000" }, + }, + + gradmirror_yellow_orange = + { + font_mode = "gradient3", + + font_colors = { "#ff7", "#620", "#ff7" }, + + font_outlines = { "#000", "#000", "#000" }, + + narrow = 0.7, + }, + + --- Textured styles --- + + textured_tech = + { + font_mode = "texture", + + font_texture = "brushedmetal", + + font_outlines = { "#000" }, + + background = "techbg1", + + props = + { + barrel_1 = + { + image = "barrel1", + x = 40, + y = 160 + }, + barrel_2 = + { + image = "barrel1", + x = 255, + y = 160 + }, + }, + }, +} + + +DOOM.TITLE_SUB_STYLES = +{ + white = + { + font_mode = "solid", + font_colors = { "#ddd" }, + font_outlines = { "#000" }, + }, + + yellow = + { + prob = 25, + font_mode = "solid", + font_colors = { "#ff7" }, + font_outlines = { "#431" }, + }, + + yellow_outline = + { + font_mode = "solid", + font_colors = { "#000" }, + font_outlines = { "#ff7" }, + }, + + red_outline = + { + font_mode = "solid", + font_colors = { "#000" }, + font_outlines = { "#f44" }, + }, + + lightbrown = + { + font_mode = "solid", + font_colors = { "#ea7" }, + font_outlines = { "#431" }, + }, + + green = + { + font_mode = "solid", + font_colors = { "#6d5" }, + font_outlines = { "#242" }, + }, + + purple = + { + font_mode = "solid", + font_colors = { "#f0f" }, + font_outlines = { "#505" }, + }, +} + + +DOOM.TITLE_SPACE_STYLES = +{ + red_nebula = + { + hue1 = "#300", + hue2 = "#f00", + hue3 = "#fff", + thresh = 0.5, + }, + + blue_nebula = + { + hue1 = "#000", + hue2 = "#00f", + hue3 = "#99f", + thresh = 0.5, + }, + + green_nebula = + { + hue1 = "#000", + hue2 = "#363", + hue3 = "#6f6", + thresh = 0.5, + }, + + brown_nebula = + { + hue1 = "#000000", + hue2 = "#ab6f43", + hue3 = "#ffebdf", + thresh = 0.25, + power = 3.0, + }, + + firey_nebula = + { + prob = 100, + + hue1 = "#300", + hue2 = "#732", + hue3 = "#ff8", + thresh = 0.2, + power = 1.5, + }, + + grey_nebula = + { + prob = 5, + + hue1 = "#000", + hue2 = "#aaa", + hue3 = "#000", + power = 4, + }, + + purple_nebula = + { + prob = 5, + + hue1 = "#707", + hue2 = "#f0f", + hue3 = "#fff", + thresh = 0.3, + power = 2, + }, +} + + +DOOM.TITLE_INTERMISSION_STYLES = +{ + brown_box = + { + hue1 = "#332b13", + hue2 = "#774f2b", + hue3 = "#ab6f43", + + fracdim = 2.8 + }, + + blue_box = + { + hue1 = "#005", + hue2 = "#00c", + hue3 = "#33f", + + fracdim = 2.8 + }, + + pink_box = + { + hue1 = "#600", + hue2 = "#933", + hue3 = "#b55", + + fracdim = 2.8 + }, + + green_box = + { + hue1 = "#13230b", + hue2 = "#27551b", + hue3 = "#448822", + + fracdim = 2.8 + }, + + dark_box = + { + hue1 = "#111", + hue2 = "#222", + hue3 = "#333", + + fracdim = 2.9 + } +} + + +DOOM.TITLE_COLOR_RAMPS = +{ + white = + { + { 0,0,0 }, + { 255,255,255 } + }, + + light_grey = + { + { 0,0,0 }, + { 168,168,168 } + }, + + mid_grey = + { + { 0,0,0 }, + { 128,128,128 } + }, + + dark_grey = + { + { 0,0,0 }, + { 96,96,96 } + }, + + blue = + { + { 0,0,0 }, + { 0,0,255 } + }, + + blue_white = + { + { 0,0,0 }, + { 0,0,255 }, + { 231,231,255 } + }, + + red = + { + { 60,0,0 }, + { 255,0,0 } + }, + + red_white = + { + { 60,0,0 }, + { 255,0,0 }, + { 255,224,224 } + }, + + green = + { + { 8,23,8 }, + { 62,147,62 }, + { 115,255,115 } + }, + + mid_green = + { + { 8,23,8 }, + { 62,147,62 } + }, + + orange_white = + { + {43,35,15}, + {135,40,5}, + {215,95,11}, + {243,115,23}, + {255,235,219} + }, + + pink = + { + {60,5,5}, + {107,15,15}, + {155,51,51}, + {203,107,107}, + {255,183,183} + }, + + light_brown = + { + {0,0,0}, + {75,55,27}, + {119,79,43}, + {191,123,75}, + {255,179,131}, + {255,235,223} + }, + + brown_yellow = + { + {0,0,0}, + {115,43,0}, + {255,255,115} + } +} + +function DOOM.setup() + GAME.TITLE_MAIN_STYLES = DOOM.TITLE_MAIN_STYLES + GAME.TITLE_SUB_STYLES = DOOM.TITLE_SUB_STYLES + GAME.TITLE_SPACE_STYLES = DOOM.TITLE_SPACE_STYLES + GAME.TITLE_INTERMISSION_STYLES = DOOM.TITLE_INTERMISSION_STYLES + GAME.TITLE_COLOR_RAMPS = DOOM.TITLE_COLOR_RAMPS + GAME.title_screen_asset_dir = "games/doom/data/title" +end + function DOOM.slump_setup() if ob_match_game({game = {doom2=1, tnt=1, plutonia=1}}) then if OB_CONFIG.theme == "default" then diff --git a/games/heretic/base.lua b/games/heretic/base.lua index b37977f7cf..2db67571b4 100644 --- a/games/heretic/base.lua +++ b/games/heretic/base.lua @@ -61,6 +61,7 @@ OB_GAMES["heretic"] = hooks = { + setup = HERETIC.setup, factory_setup = HERETIC.factory_setup, slump_setup = HERETIC.slump_setup, get_levels = HERETIC.get_levels, diff --git a/games/heretic/data/loading/loading_screens.wad b/games/heretic/data/loading/loading_screens.wad new file mode 100644 index 0000000000..e6a4591e2c Binary files /dev/null and b/games/heretic/data/loading/loading_screens.wad differ diff --git a/games/heretic/data/title/barrel1.tga b/games/heretic/data/title/barrel1.tga new file mode 100644 index 0000000000..b6ba29dc6d Binary files /dev/null and b/games/heretic/data/title/barrel1.tga differ diff --git a/games/heretic/data/title/brickwall.tga b/games/heretic/data/title/brickwall.tga new file mode 100644 index 0000000000..9e427f157b Binary files /dev/null and b/games/heretic/data/title/brickwall.tga differ diff --git a/games/heretic/themes.lua b/games/heretic/themes.lua index 6d72761e26..72d41c34e4 100644 --- a/games/heretic/themes.lua +++ b/games/heretic/themes.lua @@ -2991,6 +2991,505 @@ function HERETIC.slump_setup() end end +-------------------------------------------------------------------- + +HERETIC.TITLE_MAIN_STYLES = +{ + --- Solid styles --- + + solid_blue = + { + prob = 25, + + font_mode = "solid", + + font_colors = { "#00f" }, + + font_outline_mode = "shadow2", + font_outlines = { "#00c", "#009", "#006", "#000" }, + + narrow = 0.6, + + alt = + { + font_mode = "solid", + font_colors = { "#ccf" }, + font_outline_mode = "zoom", + font_outlines = { "#77f", "#00f", "#000" }, + }, + }, + + solid_red = + { + prob = 25, + + font_mode = "solid", + + font_colors = { "#f00" }, + + font_outline_mode = "shadow2", + font_outlines = { "#c00", "#900", "#600", "#000" }, + + narrow = 0.6, + + alt = + { + font_mode = "solid", + font_colors = { "#fff" }, + font_outline_mode = "surround", + font_outlines = { "#f44", "#900", "#000" }, + }, + }, + + solid_green = + { + prob = 25, + + font_mode = "solid", + + font_colors = { "#0f0" }, + + font_outline_mode = "shadow", + font_outlines = { "#0c0", "#090", "#060", "#000" }, + + narrow = 0.4, + }, + + solid_black_lightblue = + { + prob = 25, + + font_mode = "solid", + + font_colors = { "#000" }, + + font_outlines = { "#009", "#99f", "#ddd" }, + + narrow = 0.7, + }, + + shaded_white_n_blue = + { + font_mode = "solid", + + font_colors = { "#fff" }, + + font_outline_mode = "shadow", + font_outlines = { "#bbf", "#99f", "#55f", "#22f", "#00f", "#009", "#004", "#000" }, + + narrow = 0.4, + }, + + shaded_white_n_red = + { + font_mode = "solid", + + font_colors = { "#fff" }, + + font_outline_mode = "zoom", + font_outlines = { "#f99", "#f66", "#e00", "#b00", "#800", "#400", "#000" }, + + narrow = 0.4, + }, + + --- Gradient styles --- + + gradient_white_black = + { + font_mode = "gradient", + + font_colors = { "#fff", "#000" }, + + font_outlines = { "#000", "#555" }, + }, + + gradient_green_black = + { + font_mode = "gradient", + + font_colors = { "#7e6", "#000" }, + + font_outlines = { "#231", "#342" }, + }, + + gradient_pink_black = + { + font_mode = "gradient3", + + font_colors = { "#c77", "#611", "#000" }, + + font_outlines = { "#000", "#933" }, + }, + + gradient_black_brown = + { + font_mode = "gradient3", + + font_colors = { "#000", "#752", "#fb8" }, + + font_outlines = { "#432", "#000" }, + }, + + grad3_white_red_black = + { + font_mode = "gradient3", + + font_colors = { "#fff", "#f00", "#000" }, + + font_outlines = { "#c00" }, + }, + + grad3_white_blue_black = + { + font_mode = "gradient3", + + font_colors = { "#fff", "#00f", "#000" }, + + font_outlines = { "#00c" }, + }, + + grad3_white_orange_black = + { + font_mode = "gradient3", + + font_colors = { "#fff", "#720", "#000" }, + + font_outlines = { "#000" }, + }, + + gradmirror_orange_white = + { + font_mode = "gradient3", + + font_colors = { "#720", "#fff", "#720" }, + + font_outlines = { "#000" }, + }, + + gradmirror_yellow_orange = + { + font_mode = "gradient3", + + font_colors = { "#ff7", "#620", "#ff7" }, + + font_outlines = { "#000", "#000", "#000" }, + + narrow = 0.7, + }, + + --- Textured styles --- + + textured_brick = + { + font_mode = "gradient", + + font_colors = { "#7e6", "#000" }, + + font_outlines = { "#231", "#342" }, + + background = "brickwall", + + props = + { + barrel_1 = + { + image = "barrel1", + x = 40, + y = 160 + }, + barrel_2 = + { + image = "barrel1", + x = 245, + y = 160 + }, + }, + }, +} + + +HERETIC.TITLE_SUB_STYLES = +{ + white = + { + font_mode = "solid", + font_colors = { "#ddd" }, + font_outlines = { "#000" }, + }, + + yellow = + { + prob = 25, + font_mode = "solid", + font_colors = { "#ff7" }, + font_outlines = { "#431" }, + }, + + yellow_outline = + { + font_mode = "solid", + font_colors = { "#000" }, + font_outlines = { "#ff7" }, + }, + + red_outline = + { + font_mode = "solid", + font_colors = { "#000" }, + font_outlines = { "#f44" }, + }, + + lightbrown = + { + font_mode = "solid", + font_colors = { "#ea7" }, + font_outlines = { "#431" }, + }, + + green = + { + font_mode = "solid", + font_colors = { "#6d5" }, + font_outlines = { "#242" }, + }, + + purple = + { + font_mode = "solid", + font_colors = { "#f0f" }, + font_outlines = { "#505" }, + }, +} + + +HERETIC.TITLE_SPACE_STYLES = +{ + red_nebula = + { + hue1 = "#300", + hue2 = "#f00", + hue3 = "#fff", + thresh = 0.5, + }, + + blue_nebula = + { + hue1 = "#000", + hue2 = "#00f", + hue3 = "#99f", + thresh = 0.5, + }, + + green_nebula = + { + hue1 = "#000", + hue2 = "#363", + hue3 = "#6f6", + thresh = 0.5, + }, + + brown_nebula = + { + hue1 = "#000000", + hue2 = "#ab6f43", + hue3 = "#ffebdf", + thresh = 0.25, + power = 3.0, + }, + + firey_nebula = + { + prob = 100, + + hue1 = "#300", + hue2 = "#732", + hue3 = "#ff8", + thresh = 0.2, + power = 1.5, + }, + + grey_nebula = + { + prob = 5, + + hue1 = "#000", + hue2 = "#aaa", + hue3 = "#000", + power = 4, + }, + + purple_nebula = + { + prob = 5, + + hue1 = "#707", + hue2 = "#f0f", + hue3 = "#fff", + thresh = 0.3, + power = 2, + }, +} + + +HERETIC.TITLE_INTERMISSION_STYLES = +{ + brown_box = + { + hue1 = "#332b13", + hue2 = "#774f2b", + hue3 = "#ab6f43", + + fracdim = 2.8 + }, + + blue_box = + { + hue1 = "#005", + hue2 = "#00c", + hue3 = "#33f", + + fracdim = 2.8 + }, + + pink_box = + { + hue1 = "#600", + hue2 = "#933", + hue3 = "#b55", + + fracdim = 2.8 + }, + + green_box = + { + hue1 = "#13230b", + hue2 = "#27551b", + hue3 = "#448822", + + fracdim = 2.8 + }, + + dark_box = + { + hue1 = "#111", + hue2 = "#222", + hue3 = "#333", + + fracdim = 2.9 + } +} + + +HERETIC.TITLE_COLOR_RAMPS = +{ + white = + { + { 0,0,0 }, + { 255,255,255 } + }, + + light_grey = + { + { 0,0,0 }, + { 168,168,168 } + }, + + mid_grey = + { + { 0,0,0 }, + { 128,128,128 } + }, + + dark_grey = + { + { 0,0,0 }, + { 96,96,96 } + }, + + blue = + { + { 0,0,0 }, + { 0,0,255 } + }, + + blue_white = + { + { 0,0,0 }, + { 0,0,255 }, + { 231,231,255 } + }, + + red = + { + { 60,0,0 }, + { 255,0,0 } + }, + + red_white = + { + { 60,0,0 }, + { 255,0,0 }, + { 255,224,224 } + }, + + green = + { + { 8,23,8 }, + { 62,147,62 }, + { 115,255,115 } + }, + + mid_green = + { + { 8,23,8 }, + { 62,147,62 } + }, + + orange_white = + { + {43,35,15}, + {135,40,5}, + {215,95,11}, + {243,115,23}, + {255,235,219} + }, + + pink = + { + {60,5,5}, + {107,15,15}, + {155,51,51}, + {203,107,107}, + {255,183,183} + }, + + light_brown = + { + {0,0,0}, + {75,55,27}, + {119,79,43}, + {191,123,75}, + {255,179,131}, + {255,235,223} + }, + + brown_yellow = + { + {0,0,0}, + {115,43,0}, + {255,255,115} + } +} + +function HERETIC.setup() + GAME.TITLE_MAIN_STYLES = HERETIC.TITLE_MAIN_STYLES + GAME.TITLE_SUB_STYLES = HERETIC.TITLE_SUB_STYLES + GAME.TITLE_SPACE_STYLES = HERETIC.TITLE_SPACE_STYLES + GAME.TITLE_INTERMISSION_STYLES = HERETIC.TITLE_INTERMISSION_STYLES + GAME.TITLE_COLOR_RAMPS = HERETIC.TITLE_COLOR_RAMPS + GAME.title_screen_asset_dir = "games/heretic/data/title" +end + ------------------------------------------------------------------------ OB_THEMES["city"] = diff --git a/modules/heretic/zdoom_specials.lua b/modules/heretic/zdoom_specials.lua index 19266b7783..693c53e92e 100644 --- a/modules/heretic/zdoom_specials.lua +++ b/modules/heretic/zdoom_specials.lua @@ -964,7 +964,7 @@ function ZDOOM_SPECIALS_HERETIC.do_special_stuff() ZStoryGen_init() end - gui.wad_merge_sections("data/loading/loading_screens.wad") + gui.wad_merge_sections("games/heretic/data/loading/loading_screens.wad") end diff --git a/modules/zdoom_frozsoul_sound.lua b/modules/zdoom_frozsoul_sound.lua index d5bf449c55..046b2af832 100644 --- a/modules/zdoom_frozsoul_sound.lua +++ b/modules/zdoom_frozsoul_sound.lua @@ -238,7 +238,7 @@ end function ZDOOM_SOUND.merge_frozsoul_sounds(self) if PARAM.bool_merge_frozsoul_sounds == 1 then - local dir = "data/sounds/" + local dir = "games/doom/data/sounds/" for _,sound in pairs(ZDOOM_SOUND_DEFS) do if ob_mod_enabled("compress_output") == 1 then diff --git a/modules/zdoom_specials.lua b/modules/zdoom_specials.lua index 502fe6dfdb..0080587c4a 100644 --- a/modules/zdoom_specials.lua +++ b/modules/zdoom_specials.lua @@ -963,11 +963,11 @@ function ZDOOM_SPECIALS.do_special_stuff() -- insert custom music if PARAM.story_generator ~= "none" then if PARAM.generic_intermusic == "$MUSIC_DM2INT" then - gui.wad_insert_file("data/music/D_DM2INT.ogg","D_DM2INT") + gui.wad_insert_file("games/doom/data/music/D_DM2INT.ogg","D_DM2INT") end end - gui.wad_merge_sections("data/loading/loading_screens.wad") + gui.wad_merge_sections("games/doom/data/loading/loading_screens.wad") end OB_MODULES["zdoom_specials_lighting"] = diff --git a/scripts/title_gen.lua b/scripts/title_gen.lua index 55d9449f45..ab8e2149c8 100644 --- a/scripts/title_gen.lua +++ b/scripts/title_gen.lua @@ -965,7 +965,7 @@ end function Title_centered_string(T, mx, my, text, style) - assert(style.mode) + assert(style.font_mode) -- do not create really tall letters if T.fh / T.fw > 2.5 then @@ -999,27 +999,27 @@ function Title_centered_string(T, mx, my, text, style) -- do the outlines -- - if style.outlines then + if style.font_outlines then gui.title_prop("render_mode", "solid") - for i = #style.outlines, 1, -1 do - local outline = style.outlines[i] + for i = #style.font_outlines, 1, -1 do + local outline = style.font_outlines[i] gui.title_prop("color", outline) - if style.outline_mode == "shadow" then + if style.font_outline_mode == "shadow" then thick = T.thick + i T.ofs_x = base_ofs T.ofs_y = base_ofs - elseif style.outline_mode == "shadow2" then + elseif style.font_outline_mode == "shadow2" then thick = T.thick + i T.ofs_x = base_ofs - i T.ofs_y = base_ofs - elseif style.outline_mode == "zoom" then + elseif style.font_outline_mode == "zoom" then thick = T.thick + i T.ofs_x = base_ofs - i / 2 @@ -1042,19 +1042,19 @@ function Title_centered_string(T, mx, my, text, style) -- do central part of text -- - if style.mode == "texture" then - gui.title_prop("texture", "data/masks/" .. style.texture .. ".tga") + if style.font_mode == "texture" and style.font_texture then + gui.title_prop("texture", GAME.title_screen_asset_dir .. "/" .. style.font_texture .. ".tga") else - gui.title_prop("render_mode", style.mode) + gui.title_prop("render_mode", style.font_mode) for k = 1, 4 do - if style.colors[k] then - gui.title_prop("color" .. k, style.colors[k]) + if style.font_colors[k] then + gui.title_prop("color" .. k, style.font_colors[k]) end end end - if style.mode == "gradient" or style.mode == "gradient3" then + if style.font_mode == "gradient" or style.font_mode == "gradient3" then gui.title_prop("grad_y1", math.round(T.y - T.fh + 1)) gui.title_prop("grad_y2", math.round(T.y - 1)) end @@ -1128,527 +1128,24 @@ end ------------------------------------------------------------------------ -TITLE_MAIN_STYLES = -{ - --- Solid styles --- - - solid_blue = - { - prob = 25, - - mode = "solid", - - colors = { "#00f" }, - - outline_mode = "shadow2", - outlines = { "#00c", "#009", "#006", "#000" }, - - narrow = 0.6, - - alt = - { - mode = "solid", - colors = { "#ccf" }, - outline_mode = "zoom", - outlines = { "#77f", "#00f", "#000" }, - }, - }, - - solid_red = - { - prob = 25, - - mode = "solid", - - colors = { "#f00" }, - - outline_mode = "shadow2", - outlines = { "#c00", "#900", "#600", "#000" }, - - narrow = 0.6, - - alt = - { - mode = "solid", - colors = { "#fff" }, - outline_mode = "surround", - outlines = { "#f44", "#900", "#000" }, - }, - }, - - solid_green = - { - prob = 25, - - mode = "solid", - - colors = { "#0f0" }, - - outline_mode = "shadow", - outlines = { "#0c0", "#090", "#060", "#000" }, - - narrow = 0.4, - }, - - solid_black_lightblue = - { - prob = 25, - - mode = "solid", - - colors = { "#000" }, - - outlines = { "#009", "#99f", "#ddd" }, - - narrow = 0.7, - }, - - shaded_white_n_blue = - { - mode = "solid", - - colors = { "#fff" }, - - outline_mode = "shadow", - outlines = { "#bbf", "#99f", "#55f", "#22f", "#00f", "#009", "#004", "#000" }, - - narrow = 0.4, - }, - - shaded_white_n_red = - { - mode = "solid", - - colors = { "#fff" }, - - outline_mode = "zoom", - outlines = { "#f99", "#f66", "#e00", "#b00", "#800", "#400", "#000" }, - - narrow = 0.4, - }, - - --- Gradient styles --- - - gradient_white_black = - { - mode = "gradient", - - colors = { "#fff", "#000" }, - - outlines = { "#000", "#555" }, - }, - - gradient_green_black = - { - mode = "gradient", - - colors = { "#7e6", "#000" }, - - outlines = { "#231", "#342" }, - }, - - gradient_pink_black = - { - mode = "gradient3", - - colors = { "#c77", "#611", "#000" }, - - outlines = { "#000", "#933" }, - }, - - gradient_black_brown = - { - mode = "gradient3", - - colors = { "#000", "#752", "#fb8" }, - - outlines = { "#432", "#000" }, - }, +TITLE_MAIN_STYLE = +{ } - grad3_white_red_black = - { - mode = "gradient3", - - colors = { "#fff", "#f00", "#000" }, - - outlines = { "#c00" }, - }, - - grad3_white_blue_black = - { - mode = "gradient3", - - colors = { "#fff", "#00f", "#000" }, - - outlines = { "#00c" }, - }, - - grad3_white_orange_black = - { - mode = "gradient3", - - colors = { "#fff", "#720", "#000" }, - - outlines = { "#000" }, - }, - - gradmirror_orange_white = - { - mode = "gradient3", - - colors = { "#720", "#fff", "#720" }, - - outlines = { "#000" }, - }, - - gradmirror_yellow_orange = - { - mode = "gradient3", - - colors = { "#ff7", "#620", "#ff7" }, - - outlines = { "#000", "#000", "#000" }, - - narrow = 0.7, - }, - - --- Textured styles --- - - groovy_1 = - { - mode = "texture", - - texture = "groovy1", - - outlines = { "#000", "#864", "#000" }, - }, - - compgreen_1 = - { - prob = 15, - - mode = "texture", - texture = "compgreen", +TITLE_SUB_STYLE = +{ } - outlines = { "#000", "#cb4" }, - narrow = 0.9, - }, - - yellowish_1 = - { - mode = "texture", - - texture = "yellowish", - - outlines = { "#654", "#ca8", "#000" }, - }, - - redrock_1 = - { - mode = "texture", - - texture = "redrock", - - outline_mode = "zoom", - outlines = { "#c66", "#933", "#622", "#511" }, - }, - - fireblu_1 = - { - mode = "texture", - - texture = "fireblu", - - outlines = { "#ccc", "#000" }, - }, - - shawn_1 = - { - mode = "texture", - - texture = "shawn_r", - - outlines = { "#643", "#321", "#000" }, +TITLE_SPACE_STYLE = +{ } - narrow = 0.8, - }, -} - -TITLE_SUB_STYLES = -{ - white = - { - mode = "solid", - colors = { "#ddd" }, - outlines = { "#000" }, - }, - - yellow = - { - prob = 25, - mode = "solid", - colors = { "#ff7" }, - outlines = { "#431" }, - }, - - yellow_outline = - { - mode = "solid", - colors = { "#000" }, - outlines = { "#ff7" }, - }, - - red_outline = - { - mode = "solid", - colors = { "#000" }, - outlines = { "#f44" }, - }, - - lightbrown = - { - mode = "solid", - colors = { "#ea7" }, - outlines = { "#431" }, - }, - - green = - { - mode = "solid", - colors = { "#6d5" }, - outlines = { "#242" }, - }, - - purple = - { - mode = "solid", - colors = { "#f0f" }, - outlines = { "#505" }, - }, -} - - -TITLE_SPACE_STYLES = -{ - red_nebula = - { - hue1 = "#300", - hue2 = "#f00", - hue3 = "#fff", - thresh = 0.5, - }, - - blue_nebula = - { - hue1 = "#000", - hue2 = "#00f", - hue3 = "#99f", - thresh = 0.5, - }, - - green_nebula = - { - hue1 = "#000", - hue2 = "#363", - hue3 = "#6f6", - thresh = 0.5, - }, - - brown_nebula = - { - hue1 = "#000000", - hue2 = "#ab6f43", - hue3 = "#ffebdf", - thresh = 0.25, - power = 3.0, - }, - - firey_nebula = - { - prob = 100, - - hue1 = "#300", - hue2 = "#732", - hue3 = "#ff8", - thresh = 0.2, - power = 1.5, - }, - - grey_nebula = - { - prob = 5, - - hue1 = "#000", - hue2 = "#aaa", - hue3 = "#000", - power = 4, - }, - - purple_nebula = - { - prob = 5, - - hue1 = "#707", - hue2 = "#f0f", - hue3 = "#fff", - thresh = 0.3, - power = 2, - }, -} - - -TITLE_INTERMISSION_STYLES = -{ - brown_box = - { - hue1 = "#332b13", - hue2 = "#774f2b", - hue3 = "#ab6f43", - - fracdim = 2.8 - }, - - blue_box = - { - hue1 = "#005", - hue2 = "#00c", - hue3 = "#33f", - - fracdim = 2.8 - }, - - pink_box = - { - hue1 = "#600", - hue2 = "#933", - hue3 = "#b55", - - fracdim = 2.8 - }, - - green_box = - { - hue1 = "#13230b", - hue2 = "#27551b", - hue3 = "#448822", - - fracdim = 2.8 - }, - - dark_box = - { - hue1 = "#111", - hue2 = "#222", - hue3 = "#333", - - fracdim = 2.9 - } -} +TITLE_INTERMISSION_STYLE = +{ } TITLE_COLOR_RAMPS = -{ - white = - { - { 0,0,0 }, - { 255,255,255 } - }, - - light_grey = - { - { 0,0,0 }, - { 168,168,168 } - }, - - mid_grey = - { - { 0,0,0 }, - { 128,128,128 } - }, - - dark_grey = - { - { 0,0,0 }, - { 96,96,96 } - }, - - blue = - { - { 0,0,0 }, - { 0,0,255 } - }, - - blue_white = - { - { 0,0,0 }, - { 0,0,255 }, - { 231,231,255 } - }, - - red = - { - { 60,0,0 }, - { 255,0,0 } - }, - - red_white = - { - { 60,0,0 }, - { 255,0,0 }, - { 255,224,224 } - }, - - green = - { - { 8,23,8 }, - { 62,147,62 }, - { 115,255,115 } - }, - - mid_green = - { - { 8,23,8 }, - { 62,147,62 } - }, - - orange_white = - { - {43,35,15}, - {135,40,5}, - {215,95,11}, - {243,115,23}, - {255,235,219} - }, - - pink = - { - {60,5,5}, - {107,15,15}, - {155,51,51}, - {203,107,107}, - {255,183,183} - }, - - light_brown = - { - {0,0,0}, - {75,55,27}, - {119,79,43}, - {191,123,75}, - {255,179,131}, - {255,235,223} - }, - - brown_yellow = - { - {0,0,0}, - {115,43,0}, - {255,255,115} - } -} +{ } ------------------------------------------------------------------------ @@ -1662,7 +1159,7 @@ function Title_gen_space_scene() -- generate a night sky scene -- - local style = Title_pick_style(TITLE_SPACE_STYLES, {}) + local style = TITLE_SPACE_STYLE local density = rand.pick({40,70,100}) @@ -1909,72 +1406,29 @@ end function Title_gen_wall_scene() - local tex_list - - local lamp_y - local lamp_sprite - - if rand.odds(37) then - -- tech lamp - lamp_y = 154 - lamp_sprite = "lamp2" - - tex_list = { "airduct", "cement" } - - else - if rand.odds(50) then - -- standing lamp - lamp_y = 130 - lamp_sprite = "lamp1" - else - -- wall-mounted torch - lamp_y = 80 - lamp_sprite = "lamp3" - end + local style = TITLE_MAIN_STYLE - -- Added new shit here - - tex_list = { "block1", "block2", "bodiesc", "bricks08", "bricks09", "bronze5", "darkf03", "goth6", "goth10", "goth36", "goth50", "goth51", - "graymet2", "helmet1", "helmet2", "helwal1", "rdrok1" } - end - - -- draw the texture over the whole screen - local tex = rand.pick(tex_list) - - gui.title_prop("texture", "data/bg/" .. tex .. ".tga") + -- draw the background over the whole screen + gui.title_prop("texture", GAME.title_screen_asset_dir .. "/" .. style.background .. ".tga") gui.title_draw_rect(0, 0, 320, 200) - -- decide # of lamps - local lamp_num = 2 - if rand.odds(25) then lamp_num = 1 end - if rand.odds(25) then lamp_num = 3 end + if not style.props then return end - local lights = {} - - for i = 1, lamp_num do - local x = 150 - - if lamp_num >= 2 and i == 1 then x = 35 end - if lamp_num >= 2 and i == lamp_num then x = 265 end - - table.insert(lights, { x=x, y=lamp_y }) - end - - -- apply lighting effect - gui.title_prop("render_mode", "multiply") + -- apply lighting effect??? + --[[gui.title_prop("render_mode", "multiply") local col = { 0,0,0 } local xf = 1.0 - if lamp_num == 1 then xf = 0.7 end - if lamp_num == 3 then xf = 1.6 end + if #style.props == 1 then xf = 0.7 end + if #style.props == 3 then xf = 1.6 end for x = 0, 319 do for y = 0, 199 do local d = 9e9 - for _,L in pairs(lights) do - d = math.min(d, geom.dist(L.x * xf, L.y, x * xf, y)) + for _,prop in pairs(style.props) do + d = math.min(d, geom.dist(prop.x * xf, prop.y, x * xf, y)) end local ity = math.exp(-d / 50) * 255 --- 255 - (d ^ 1.5) / 2.0, @@ -1989,11 +1443,11 @@ function Title_gen_wall_scene() gui.title_prop("color", col) gui.title_draw_rect(x, y, 1, 1) end - end + end]]-- - -- draw each lamp - for _,L in pairs(lights) do - gui.title_load_image(L.x - 10, L.y - 16, "data/bg/" .. lamp_sprite .. ".tga") + -- draw each prop + for _,prop in pairs(style.props) do + gui.title_load_image(prop.x, prop.y, GAME.title_screen_asset_dir .. "/" .. prop.image .. ".tga") end end @@ -2361,25 +1815,11 @@ function Title_add_title() bb_main.h = bb_main.h + 5 end ---[[ - stderrf("bb_main =\n%s\n\n", table.tostr(bb_main)) - stderrf("bb_sub =\n%s\n\n", table.tostr(bb_sub)) - - gui.title_prop("color", "#070") - gui.title_draw_rect(bb_main.x, bb_main.y, bb_main.w, bb_main.h) - - gui.title_prop("color", "#00f") - gui.title_draw_rect(bb_sub.x, bb_sub.y, bb_sub.w, bb_sub.h) ---]] - - - -- pick the styles to use - local style = Title_pick_style(TITLE_MAIN_STYLES, {}) + local style = TITLE_MAIN_STYLE -- FIXME : this used for the smaller words, often make it different (and simpler) local mid_style = style.alt or style - -- vertical sizing of the main title local line_h = bb_main.h / (main_lines * 2 + other_lines) @@ -2410,15 +1850,9 @@ function Title_add_title() local h3 = line_h * 0.7 ---[[ -stderrf("line_h = %1.1f\n", line_h) -stderrf("font sizes: %d x %d | %d x %d | %d x %d\n", w1,h1, w2,h2, w3,h3) ---]] - -- TODO: find a good naming scheme for these title parts - -- decide geometry for major parts -- local line1_T = { fw=w1, fh=h1, spacing=spacing } @@ -2509,7 +1943,7 @@ stderrf("font sizes: %d x %d | %d x %d | %d x %d\n", w1,h1, w2,h2, w3,h3) local mx = 160 local my = bb_sub.y + bb_sub.h / 2 - style = Title_pick_style(TITLE_SUB_STYLES, {}) + style = TITLE_SUB_STYLE sub_T.fw = rand.sel(25, 13, 11) sub_T.fh = 13 @@ -2595,7 +2029,7 @@ function Title_make_interpic() gui.title_create(320, 200, "#000") gui.title_set_palette(GAME.RESOURCES.PALETTES.normal) - local style = Title_pick_style(TITLE_INTERMISSION_STYLES, {}) + local style = TITLE_INTERMISSION_STYLE gui.title_draw_clouds(TITLE_SEED, style.hue1, style.hue2, style.hue3, style.thresh or 0, style.power or 1, @@ -2629,14 +2063,14 @@ end function Title_add_background() - if rand.odds(12) then + if TITLE_MAIN_STYLE.background then + Title_gen_wall_scene() + elseif rand.odds(12) then Title_gen_ray_burst() elseif rand.odds(12) then Title_gen_tunnel_scene() elseif rand.odds(6) then Title_gen_cave_scene() - elseif rand.odds(35) then - Title_gen_wall_scene() else Title_gen_space_scene() end @@ -2669,10 +2103,20 @@ function Title_generate() assert(GAME.title) assert(GAME.RESOURCES.PALETTES) assert(GAME.RESOURCES.PALETTES.normal) + assert(GAME.TITLE_MAIN_STYLES) + assert(GAME.TITLE_SUB_STYLES) + assert(GAME.TITLE_SPACE_STYLES) + assert(GAME.TITLE_INTERMISSION_STYLES) + assert(GAME.TITLE_COLOR_RAMPS) Title_process_raw_fonts() TITLE_SEED = gui.random_int() + TITLE_MAIN_STYLE = Title_pick_style(GAME.TITLE_MAIN_STYLES, {}) + TITLE_SUB_STYLE = Title_pick_style(GAME.TITLE_SUB_STYLES, {}) + TITLE_SPACE_STYLE = Title_pick_style(GAME.TITLE_SPACE_STYLES, {}) + TITLE_COLOR_RAMPS = GAME.TITLE_COLOR_RAMPS + TITLE_INTERMISSION_STYLE = Title_pick_style(GAME.TITLE_INTERMISSION_STYLES, {}) Title_make_interpic() Title_make_titlepic()