Skip to content
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
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@ else()
endif()

if(MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fp:fast")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:fast")
# These are needed for MSVC to play ball as much as possible
# with the /EHs- flag
add_definitions("-D_HAS_EXCEPTIONS=0 -D_STATIC_CPPLIB")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fp:fast /EHs- /GR-")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:fast /EHs- /GR-")
# get the number of logical cores for parallel build
if (NOT CLANG)
cmake_host_system_information(RESULT LOGICAL_CORES QUERY NUMBER_OF_LOGICAL_CORES)
math(EXPR COMPILE_CORES "${LOGICAL_CORES} - 1")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MD /MP${COMPILE_CORES}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MD /EHa /MP${COMPILE_CORES}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MD /MP${COMPILE_CORES}")
endif()
# To use the sanitizer with MSVC, you will need to either have your Visual Studio
# or Build Tools install in your PATH variable, or copy the appropriate DLL to the program
Expand All @@ -58,8 +61,8 @@ if(MSVC)
set(CMAKE_EXE_LINKER_FLAGS "/SUBSYSTEM:WINDOWS")
endif()
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fno-strict-aliasing")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fno-strict-aliasing")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fno-exceptions -fno-strict-aliasing")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fno-exceptions -fno-rtti -fno-strict-aliasing")
if (OBSIDIAN_SANITIZE AND OBSIDIAN_SANITIZE_UB)
message( FATAL_ERROR "Enable only one of OBSIDIAN_SANITIZE or OBSIDIAN_SANITIZE_UB!" )
elseif (OBSIDIAN_SANITIZE)
Expand Down
32 changes: 0 additions & 32 deletions data/License Attribution.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
BSD 3-Clause License
===========================================================================================

3270 Font - Copyright (c) 2011-2017, Ricardo Banffy.
Copyright (c) 1993-2011, Paul Mattes.
Copyright (c) 2004-2005, Don Russell.
Copyright (c) 2004, Dick Altenbern.
Copyright (c) 1990, Jeff Sparkes.
Copyright (c) 1989, Georgia Tech Research Corporation (GTRC), Atlanta, GA 30332.

Blasphemer (Assorted graphic assets) - Copyright (c) 2021 Contributors to the Blasphemer project

Freedoom (Assorted graphic assets) - Copyright (c) 2001-2019 Contributors to the Freedoom project
Expand Down Expand Up @@ -123,31 +116,6 @@ miniz - Copyright (c) 2013-2014 RAD Game Tools and Valve Software
Copyright (c) 2010-2014 Rich Geldreich and Tenacious Software LLC


===========================================================================================
SIL Open Font License
===========================================================================================

Avenixel - Copyright (c) 2020 Gabriel Sammartino (https://www.behance.net/webcreativity | contact@gabrielsammartino.com),
with Reserved Font Name Avenixel.

Drama Sans - Copyright (c) 2018 Drama Sans (dramasans@outlook.com),
with Reserved Font Name "Drama Sans".

FPD Pressure - Copyright (c) 2020 Felix Summ

Kalam - Copyright (c) 2014 Indian Type Foundry (info@indiantypefoundry.com)

MiniSmallCaps (renamed to "Sam I Am") - Copyright (c) 2019 Sam Trenholme

Source Sans Pro (renamed to "Sauce") - Copyright 2010, 2012, 2014 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name ‘Source’

Teko - Copyright (c) 2014, Indian Type Foundry (info@indiantypefoundry.com)

The Neue Black (renamed to "New Black") - Copyright (c) 2019-2021, Tre Seals <beheard@vocaltype.co>, Micah Rich <micah@micahrich.com>, The League of Moveable Type Limited Liability Company <founders@theleagueofmoveabletype.com>
with Reserved Font Name: "The Neue Black"

Workbench - Copyright (c) 2019, Jens Kutilek (www.kutilek.de)

===========================================================================================
Public Domain
===========================================================================================
Expand Down
86 changes: 0 additions & 86 deletions data/licenses/OFL.txt

This file was deleted.

5 changes: 1 addition & 4 deletions source/g_doom.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1299,10 +1299,7 @@ bool Doom::game_interface_c::Finish(bool build_ok)
if (!build_ok)
{
// remove the WAD if an error occurred
if (!preserve_failures)
{
FileDelete(filename);
}
FileDelete(filename);
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions source/lib_wad.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ bool WAD_OpenRead(const std::string &filename)

if (wad_R_header.num_entries >= 5000) // sanity check
{
LogPrint("WAD_OpenRead: bad header (%u entries?)\n", static_cast<unsigned int>(wad_R_header.num_entries));
LogPrint("WAD_OpenRead: bad header (%u entries?)\n", wad_R_header.num_entries);
PHYSFS_close(wad_R_fp);
return false;
}

if (!PHYSFS_seek(wad_R_fp, wad_R_header.dir_start))
{
LogPrint("WAD_OpenRead: cannot seek to directory (at 0x%u)\n",
static_cast<unsigned int>(wad_R_header.dir_start));
wad_R_header.dir_start);
PHYSFS_close(wad_R_fp);
return false;
}
Expand Down
1 change: 0 additions & 1 deletion source/m_addons.cc
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ void VFS_InitAddons()
VFS_AddFolder("ports");
VFS_AddFolder("presets");
VFS_AddFolder("addons");
VFS_AddFolder("temp");

LogPrint("DONE.\n\n");
}
Expand Down
29 changes: 3 additions & 26 deletions source/m_cookie.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,33 +81,10 @@ static void Cookie_SetValue(std::string name, const std::string &value)

if (context == cookie_context_e::Arguments || keep_seed)
{
try
{
next_rand_seed = stoull(value);
return;
}
catch (std::invalid_argument &e)
{
(void)e;
if (!value.empty())
{
string_seed = value;
ob_set_config("string_seed", value.c_str());
next_rand_seed = StringHash64(string_seed);
}
else
{
LogPrint("Invalid argument. Will generate new seed.\n");
}
}
catch (std::out_of_range &e)
{
(void)e;
LogPrint("Resulting number would be out of range. Will generate new "
"seed.\n");
}
string_seed = value;
ob_set_config("seed", value);
next_rand_seed = StringHash64(string_seed);
}

return;
}

Expand Down
42 changes: 3 additions & 39 deletions source/m_dialog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -326,50 +326,14 @@ void DLG_EditSeed(void)
int user_response;
user_buf =
fl_input_str(user_response, 0 /* limit */, "%s",
string_seed.empty() ? std::format("{}", "{}", next_rand_seed).c_str() : string_seed.c_str(),
_("Enter New Seed Number or Phrase:"));
string_seed.c_str(), _("Enter New Seed Number or Phrase:"));
// cancelled?
if (user_response < 0)
{
return;
}

std::string word = {user_buf.c_str(), static_cast<size_t>(user_buf.size())};
try
{
for (long unsigned int i = 0; i < word.size(); i++)
{
char character = word[i];
if (!IsDigitASCII(character))
{
throw std::runtime_error(
// clang-format off
_("String contains non-digits. Will process as string\n"));
// clang-format on
}
}
did_specify_seed = true;
next_rand_seed = stoull(word);
return;
}
catch (std::invalid_argument &e)
{
(void)e;
printf("%s\n", _("Invalid argument. Will process as string."));
}
catch (std::out_of_range &e)
{
(void)e;
// clang-format off
printf("%s\n", _("Resulting number would be out of range. Will process as string."));
// clang-format on
}
catch (std::exception &e)
{
printf("%s\n", e.what());
}
string_seed = word;
ob_set_config("string_seed", word.c_str());
string_seed = user_buf;
ob_set_config("seed", string_seed);
next_rand_seed = StringHash64(string_seed);
did_specify_seed = true;
return;
Expand Down
17 changes: 0 additions & 17 deletions source/m_lua.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1389,20 +1389,6 @@ int generate_midi_track(lua_State *L)
return 0;
}

int remove_temp_file(lua_State *L)
{
std::string path = PathAppend(home_dir, "temp");

const char *temp_file = luaL_checkstring(L, 1);

path = PathAppend(path, GetFilename(temp_file));

if (FileExists(path))
FileDelete(path);

return 0;
}

//------------------------------------------------------------------------

extern int SPOT_begin(lua_State *L);
Expand Down Expand Up @@ -1593,9 +1579,6 @@ static const luaL_Reg gui_script_funcs[] = {
// MIDI generation
{"generate_midi_track", generate_midi_track},

// Miscellany
{"remove_temp_file", remove_temp_file},

{NULL, NULL} // the end
};

Expand Down
Loading