Skip to content

Commit

Permalink
Refactor|Cleanup: Renamed dehread/*converter plugins to “import*”
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Nov 16, 2016
1 parent 1c57649 commit 370b845
Show file tree
Hide file tree
Showing 53 changed files with 106 additions and 107 deletions.
8 changes: 4 additions & 4 deletions doomsday/apps/plugins/CMakeLists.txt
Expand Up @@ -9,10 +9,10 @@ if (DENG_DEVELOPER)
add_subdirectory (example)
endif ()

add_subdirectory (idtech1converter)
add_subdirectory (savegameconverter)
add_subdirectory (dehread)
add_subdirectory (udmfconverter)
add_subdirectory (importdeh)
add_subdirectory (importidtech1)
add_subdirectory (importsave)
add_subdirectory (importudmf)

add_subdirectory (doom)
add_subdirectory (heretic)
Expand Down
@@ -1,8 +1,8 @@
cmake_minimum_required (VERSION 3.1)
project (DENG_DEHREAD)
project (DENG_IMPORTDEH)
include (../PluginConfig.cmake)

include_directories (include)
file (GLOB SOURCES src/*.cpp include/*.h)

deng_add_plugin (dehread ${SOURCES})
deng_add_plugin (importdeh ${SOURCES})
@@ -1,4 +1,4 @@
LIBRARY DEHREAD
LIBRARY IMPORTDEH

EXPORTS
DP_Initialize @1
Expand Down
File renamed without changes.
Expand Up @@ -25,7 +25,7 @@
#ifndef LIBDEHREAD_DEHREADER_H
#define LIBDEHREAD_DEHREADER_H

#include "dehread.h"
#include "importdeh.h"
#include <de/Block>

/// Maximum number of nested patch file inclussions. Set to zero to disable.
Expand Down
@@ -1,4 +1,4 @@
/** @file dehread.h DeHackEd patch reader plugin for Doomsday Engine.
/** @file importdeh.h DeHackEd patch reader plugin for Doomsday Engine.
*
* @ingroup dehread
*
Expand All @@ -24,6 +24,7 @@
#define LIBDEHREAD_DEHREAD_H

#include <doomsday/defs/ded.h>

struct font_s;

//#define DENG_INTERNAL_DATA_ACCESS
Expand Down
Expand Up @@ -24,7 +24,7 @@
#define LIBDEHREAD_INFO_H

#include <QString>
#include "dehread.h"
#include "importdeh.h"

struct FinaleBackgroundMapping
{
Expand Down
Expand Up @@ -32,11 +32,11 @@
#endif

// Used to derive filepaths.
#define PLUGIN_NAME "dpdehread"
#define PLUGIN_NAME "importdeh"

// Presented to the user in dialogs, messages etc.
#define PLUGIN_NICENAME "Deh Reader"
#define PLUGIN_DETAILS "Doomsday plugin for reading DeHackEd patches."
#define PLUGIN_NICENAME "Dehacked Importer"
#define PLUGIN_DETAILS "Doomsday plugin for importing DeHackEd patches."

#define PLUGIN_VERSION_TEXT "2.0.0"
#define PLUGIN_VERSION_TEXTLONG "Version " PLUGIN_VERSION_TEXT " " __DATE__ " (" DEHREAD_VER_ID ")"
Expand Down
Expand Up @@ -22,7 +22,7 @@
*/

/**
* dehread.rc: dpDehRead.dll resource script.
* dehread.rc: importdeh.dll resource script.
*/

#include "resource.h"
Expand Down Expand Up @@ -57,7 +57,7 @@ END
3 TEXTINCLUDE
BEGIN
"#ifndef NO_MANIFEST\r\n"
" CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST ""dpdehread.dll.manifest""\r\n"
" CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST ""importdeh.dll.manifest""\r\n"
"#endif\r\n"
"\r\n"
"VS_VERSION_INFO VERSIONINFO\r\n"
Expand All @@ -81,7 +81,7 @@ BEGIN
" VALUE ""FileVersion"", PLUGIN_VERSION_TEXT ""\0""\r\n"
" VALUE ""InternalName"", PLUGIN_NICENAME ""\0""\r\n"
" VALUE ""LegalCopyright"", ""Copyright � 2003-2012, deng Team\0""\r\n"
" VALUE ""OriginalFilename"", ""dpDehRead.dll\0""\r\n"
" VALUE ""OriginalFilename"", ""importdeh.dll\0""\r\n"
" VALUE ""ProductName"", PLUGIN_NICENAME ""\0""\r\n"
" VALUE ""ProductVersion"", PLUGIN_VERSION_TEXT ""\0""\r\n"
" END\r\n"
Expand Down Expand Up @@ -119,7 +119,7 @@ BEGIN
VALUE "FileVersion", PLUGIN_VERSION_TEXT "\0"
VALUE "InternalName", PLUGIN_NICENAME "\0"
VALUE "LegalCopyright", "Copyright � 2003-2012, deng Team\0"
VALUE "OriginalFilename", "dpDehRead.dll\0"
VALUE "OriginalFilename", "importdeh.dll\0"
VALUE "ProductName", PLUGIN_NICENAME "\0"
VALUE "ProductVersion", PLUGIN_VERSION_TEXT "\0"
END
Expand Down
Expand Up @@ -43,7 +43,7 @@
#include <de/Log>
#include <de/String>

#include "dehread.h"
#include "importdeh.h"
#include "dehreader_util.h"
#include "info.h"

Expand Down
@@ -1,4 +1,4 @@
/** @file dehread.cpp DeHackEd patch reader plugin for Doomsday Engine.
/** @file importdeh.cpp DeHackEd patch reader plugin for Doomsday Engine.
*
* @authors Copyright © 2013-2014 Daniel Swanson <danij@dengine.net>
* @authors Copyright © 2012-2014 Jaakko Keränen <jaakko.keranen@iki.fi>
Expand All @@ -18,7 +18,7 @@
* 02110-1301 USA</small>
*/

#include "dehread.h"
#include "importdeh.h"

#include <QDir>
#include <QFile>
Expand Down
Expand Up @@ -19,7 +19,7 @@
* 02110-1301 USA</small>
*/

#include "dehread.h"
#include "importdeh.h"
#include "info.h"

static FinaleBackgroundMapping const finaleBGMappings[] = {
Expand Down
@@ -1,10 +1,10 @@
cmake_minimum_required (VERSION 3.1)
project (DENG_IDTECH1CONVERTER)
project (DENG_IMPORTIDTECH1)
include (../PluginConfig.cmake)

append (CMAKE_CXX_FLAGS_DEBUG "-DDENG_IDTECH1CONVERTER_DEBUG")
append (CMAKE_CXX_FLAGS_DEBUG "-DDENG_IMPORTIDTECH1_DEBUG")

include_directories (include)
file (GLOB SOURCES src/*.cpp include/*.h)

deng_add_plugin (idtech1converter ${SOURCES})
deng_add_plugin (importidtech1 ${SOURCES})
@@ -1,4 +1,4 @@
LIBRARY IDTECH1CONVERTER
LIBRARY IMPORTIDTECH1

EXPORTS
DP_Initialize @1
Expand Down
Expand Up @@ -19,10 +19,10 @@
* 02110-1301 USA</small>
*/

#ifndef IDTECH1CONVERTER_HEXLEX_H
#define IDTECH1CONVERTER_HEXLEX_H
#ifndef IMPORTIDTECH1_HEXLEX_H
#define IMPORTIDTECH1_HEXLEX_H

#include "idtech1converter.h"
#include "importidtech1.h"

namespace idtech1 {

Expand Down Expand Up @@ -106,4 +106,4 @@ class HexLex

} // namespace idtech1

#endif // IDTECH1CONVERTER_HEXLEX_H
#endif // IMPORTIDTECH1_HEXLEX_H
@@ -1,4 +1,4 @@
/** @file idtech1converter.h Converter plugin for id Tech 1 resource formats.
/** @file importidtech1.h Importer plugin for id Tech 1 resource formats.
*
* @ingroup idtech1converter
*
Expand All @@ -23,8 +23,8 @@
* 02110-1301 USA</small>
*/

#ifndef IDTECH1CONVERTER_H
#define IDTECH1CONVERTER_H
#ifndef IMPORTIDTECH1_H
#define IMPORTIDTECH1_H

#include "doomsday.h"
#include "mapimporter.h"
Expand All @@ -36,4 +36,4 @@ DENG_USING_API(Material);
DENG_USING_API(MPE);
DENG_USING_API(Uri);

#endif // IDTECH1CONVERTER_H
#endif // IMPORTIDTECH1_H
Expand Up @@ -17,8 +17,8 @@
* 02110-1301 USA</small>
*/

#ifndef IDTECH1CONVERTER_MAPIMPORTER_H
#define IDTECH1CONVERTER_MAPIMPORTER_H
#ifndef IMPORTIDTECH1_MAPIMPORTER_H
#define IMPORTIDTECH1_MAPIMPORTER_H

#include "dd_types.h" // lumpnum_t
#include <doomsday/filesys/file.h>
Expand Down Expand Up @@ -81,4 +81,4 @@ class MapImporter

} // namespace idtech1

#endif // IDTECH1CONVERTER_MAPIMPORTER_H
#endif // IMPORTIDTECH1_MAPIMPORTER_H
Expand Up @@ -19,10 +19,10 @@
* 02110-1301 USA</small>
*/

#ifndef IDTECH1CONVERTER_MAPINFOTRANSLATOR_H
#define IDTECH1CONVERTER_MAPINFOTRANSLATOR_H
#ifndef IMPORTIDTECH1_MAPINFOTRANSLATOR_H
#define IMPORTIDTECH1_MAPINFOTRANSLATOR_H

#include "idtech1converter.h"
#include "importidtech1.h"

namespace idtech1 {

Expand Down Expand Up @@ -53,4 +53,4 @@ class MapInfoTranslator

} // namespace idtech1

#endif // IDTECH1CONVERTER_MAPINFOTRANSLATOR_H
#endif // IMPORTIDTECH1_MAPINFOTRANSLATOR_H
Expand Up @@ -21,26 +21,26 @@
* 02110-1301 USA</small>
*/

#ifndef IDTECH1CONVERTER_VERSION_H
#define IDTECH1CONVERTER_VERSION_H
#ifndef IMPORTIDTECH1_VERSION_H
#define IMPORTIDTECH1_VERSION_H

#ifndef IDTECH1CONVERTER_VER_ID
#ifndef IMPORTIDTECH1_VER_ID
# ifdef _DEBUG
# define IDTECH1CONVERTER_VER_ID "+D Doomsday"
# define IMPORTIDTECH1_VER_ID "+D Doomsday"
# else
# define IDTECH1CONVERTER_VER_ID "Doomsday"
# define IMPORTIDTECH1_VER_ID "Doomsday"
# endif
#endif

// Used to derive filepaths.
#define PLUGIN_NAME "dpidtech1converter"
#define PLUGIN_NAME "importidtech1"

// Presented to the user in dialogs, messages etc.
#define PLUGIN_NICENAME "Id Tech 1 Converter"
#define PLUGIN_DETAILS "Doomsday plugin for loading id Tech 1 resources."

#define PLUGIN_VERSION_TEXT "1.0.0"
#define PLUGIN_VERSION_TEXTLONG "Version " PLUGIN_VERSION_TEXT " " __DATE__ " (" IDTECH1CONVERTER_VER_ID ")"
#define PLUGIN_VERSION_TEXTLONG "Version " PLUGIN_VERSION_TEXT " " __DATE__ " (" IMPORTIDTECH1_VER_ID ")"
#define PLUGIN_VERSION_NUMBER 1,0,0,0 // For WIN32 version info.

#endif // IDTECH1CONVERTER_VERSION_H
#endif // IMPORTIDTECH1_VERSION_H
Expand Up @@ -57,7 +57,7 @@ END
3 TEXTINCLUDE
BEGIN
"#ifndef NO_MANIFEST\r\n"
" CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST ""dpidtech1converter.dll.manifest""\r\n"
" CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST ""importidtech1.dll.manifest""\r\n"
"#endif\r\n"
"\r\n"
"VS_VERSION_INFO VERSIONINFO\r\n"
Expand All @@ -81,7 +81,7 @@ BEGIN
" VALUE ""FileVersion"", PLUGIN_VERSION_TEXT ""\0""\r\n"
" VALUE ""InternalName"", PLUGIN_NICENAME ""\0""\r\n"
" VALUE ""LegalCopyright"", ""Copyright � 2003-2014, deng Team\0""\r\n"
" VALUE ""OriginalFilename"", ""dpIdTech1Converter.dll\0""\r\n"
" VALUE ""OriginalFilename"", ""importidtech1.dll\0""\r\n"
" VALUE ""ProductName"", PLUGIN_NICENAME ""\0""\r\n"
" VALUE ""ProductVersion"", PLUGIN_VERSION_TEXT ""\0""\r\n"
" END\r\n"
Expand Down Expand Up @@ -119,7 +119,7 @@ BEGIN
VALUE "FileVersion", PLUGIN_VERSION_TEXT "\0"
VALUE "InternalName", PLUGIN_NICENAME "\0"
VALUE "LegalCopyright", "Copyright � 2003-2014, deng Team\0"
VALUE "OriginalFilename", "dpIdTech1Converter.dll\0"
VALUE "OriginalFilename", "importidtech1.dll\0"
VALUE "ProductName", PLUGIN_NICENAME "\0"
VALUE "ProductVersion", PLUGIN_VERSION_TEXT "\0"
END
Expand Down
@@ -1,4 +1,4 @@
/** @file idtech1converter.cpp Converter plugin for id Tech 1 resource formats.
/** @file importidtech1.cpp Importer plugin for id Tech 1 resource formats.
*
* @ingroup idtech1converter
*
Expand All @@ -19,7 +19,7 @@
* 02110-1301 USA</small>
*/

#include "idtech1converter.h"
#include "importidtech1.h"
#include "mapinfotranslator.h"
#include <doomsday/filesys/lumpindex.h>
#include <de/App>
Expand Down Expand Up @@ -59,9 +59,10 @@ int ConvertMapHook(int /*hookType*/, int /*parm*/, void *context)
DENG2_ASSERT(context != 0);
Id1MapRecognizer const &recognizer = *reinterpret_cast<de::Id1MapRecognizer *>(context);

if(recognizer.format() != Id1MapRecognizer::UnknownFormat &&
recognizer.format() != Id1MapRecognizer::UniversalFormat)
if (recognizer.format() != Id1MapRecognizer::UnknownFormat &&
recognizer.format() != Id1MapRecognizer::UniversalFormat)
{
LOG_AS("importidtech1");
// Attempt a conversion...
try
{
Expand All @@ -70,13 +71,11 @@ int ConvertMapHook(int /*hookType*/, int /*parm*/, void *context)
// The archived map data was read successfully.
// Transfer to the engine via the runtime map editing interface.
/// @todo Build it using native components directly...
LOG_AS("IdTech1Converter");
map->transfer();
return true; // success
}
catch(MapImporter::LoadError const &er)
{
LOG_AS("IdTech1Converter");
LOG_MAP_ERROR("Load error: ") << er.asText();
}
}
Expand Down Expand Up @@ -114,7 +113,7 @@ static void convertMapInfos(QList<QString> const &pathsInLoadOrder, String &xlat
*/
int ConvertMapInfoHook(int /*hookType*/, int /*parm*/, void *context)
{
LOG_AS("IdTech1Converter");
LOG_AS("importidtech1");
DENG2_ASSERT(context);
auto &parm = *static_cast<ddhook_mapinfo_convert_t *>(context);
QStringList allPathsInLoadOrder = String(Str_Text(&parm.paths)).split(";");
Expand Down
Expand Up @@ -29,7 +29,7 @@
#include <de/Reader>
#include <de/Time>
#include <de/Vector>
#include "idtech1converter.h"
#include "importidtech1.h"

using namespace de;

Expand Down
Expand Up @@ -20,7 +20,7 @@
* 02110-1301 USA</small>
*/

#include "idtech1converter.h"
#include "importidtech1.h"
#include <de/Log>

using namespace de;
Expand Down
Expand Up @@ -1283,7 +1283,7 @@ DENG2_PIMPL_NOREF(MapInfoTranslator)
// Warp numbers may be used as internal map references (doh!)
translateWarpNumbers();

/*#ifdef DENG_IDTECH1CONVERTER_DEBUG
/*#ifdef DENG_IMPORTIDTECH1_DEBUG
for(HexDefs::MapInfos::const_iterator i = defs.mapInfos.begin(); i != defs.mapInfos.end(); ++i)
{
MapInfo const &info = i->second;
Expand Down
@@ -1,8 +1,8 @@
cmake_minimum_required (VERSION 3.1)
project (DENG_SAVEGAMECONVERTER)
project (DENG_IMPORTSAVE)
include (../PluginConfig.cmake)

include_directories (include)
file (GLOB SOURCES src/*.cpp include/*.h)

deng_add_plugin (savegameconverter ${SOURCES})
deng_add_plugin (importsave ${SOURCES})

0 comments on commit 370b845

Please sign in to comment.