-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
83 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,36 @@ | |
factory.cpp | ||
Written by Dalton Messmer <[email protected]>. | ||
See factory.h | ||
Implements InitializeImpl for each factory. | ||
*/ | ||
|
||
#include "factory.h" | ||
#include "dmf2mod.h" | ||
|
||
using namespace d2m; | ||
|
||
using MODOptionEnum = MODConversionOptions::OptionEnum; | ||
static auto MODOptions = OptionDefinitionCollection | ||
{ | ||
/* Type / Option id / Full name / Short / Default / Possib. vals / Description */ | ||
{OPTION, MODOptionEnum::AmigaFilter, "amiga", '\0', false, "Enables the Amiga filter"}, | ||
{OPTION, MODOptionEnum::Arpeggio, "arp", '\0', false, "Allow arpeggio effects"}, | ||
{OPTION, MODOptionEnum::Portamento, "port", '\0', false, "Allow portamento up/down effects"}, | ||
{OPTION, MODOptionEnum::Port2Note, "port2note", '\0', false, "Allow portamento to note effects"}, | ||
{OPTION, MODOptionEnum::Vibrato, "vib", '\0', false, "Allow vibrato effects"}, | ||
{OPTION, MODOptionEnum::TempoType, "tempo", '\0', "accuracy", {"accuracy", "compat"}, "Prioritize tempo accuracy or compatibility with effects"}, | ||
}; | ||
|
||
template<> | ||
Factory<ConversionOptions>::InitializeImpl::InitializeImpl() | ||
{ | ||
Register<ModuleType::DMF, DMFConversionOptions>(); | ||
Register<ModuleType::MOD, MODConversionOptions>(std::move(MODOptions)); | ||
}; | ||
|
||
template<> | ||
Factory<Module>::InitializeImpl::InitializeImpl() | ||
{ | ||
Register<ModuleType::DMF, DMF>("Deflemask", "dmf"); | ||
Register<ModuleType::MOD, MOD>("ProTracker", "mod"); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,45 +2,9 @@ | |
dmf2mod.cpp | ||
Written by Dalton Messmer <[email protected]>. | ||
Implements initialize methods for each factory. | ||
See dmf2mod.h | ||
*/ | ||
|
||
#include "dmf2mod.h" | ||
|
||
using namespace d2m; | ||
|
||
using MODOptionEnum = MODConversionOptions::OptionEnum; | ||
static auto MODOptions = OptionDefinitionCollection | ||
{ | ||
/* Type / Option id / Full name / Short / Default / Possib. vals / Description */ | ||
{OPTION, MODOptionEnum::AmigaFilter, "amiga", '\0', false, "Enables the Amiga filter"}, | ||
{OPTION, MODOptionEnum::Arpeggio, "arp", '\0', false, "Allow arpeggio effects"}, | ||
{OPTION, MODOptionEnum::Portamento, "port", '\0', false, "Allow portamento up/down effects"}, | ||
{OPTION, MODOptionEnum::Port2Note, "port2note", '\0', false, "Allow portamento to note effects"}, | ||
{OPTION, MODOptionEnum::Vibrato, "vib", '\0', false, "Allow vibrato effects"}, | ||
{OPTION, MODOptionEnum::TempoType, "tempo", '\0', "accuracy", {"accuracy", "compat"}, "Prioritize tempo accuracy or compatibility with effects"}, | ||
}; | ||
|
||
template<> | ||
void Factory<ConversionOptions>::InitializeImpl() | ||
{ | ||
Clear(); | ||
|
||
Register<ModuleType::DMF, DMFConversionOptions>(); | ||
Register<ModuleType::MOD, MODConversionOptions>(std::move(MODOptions)); | ||
} | ||
|
||
template<> | ||
void Factory<Module>::InitializeImpl() | ||
{ | ||
Clear(); | ||
|
||
Register<ModuleType::DMF, DMF>("Deflemask", "dmf"); | ||
Register<ModuleType::MOD, MOD>("ProTracker", "mod"); | ||
} | ||
|
||
void d2m::Initialize() | ||
{ | ||
Factory<Module>::Initialize(); | ||
Factory<ConversionOptions>::Initialize(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters