mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-26 22:43:01 +00:00
#79: .y12 import done
This commit is contained in:
parent
b8d9fab745
commit
a049e43618
3 changed files with 6 additions and 5 deletions
|
@ -650,12 +650,12 @@ void DivEngine::loadY12(SafeReader& reader, std::vector<DivInstrument*>& ret, St
|
|||
ins->fm.ops = 4;
|
||||
ins->name = stripPath;
|
||||
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
for (int i : {0,1,2,3}) {
|
||||
DivInstrumentFM::Operator& insOp = ins->fm.op[i];
|
||||
uint8_t tmp = reader.readC();
|
||||
insOp.mult = (tmp & 0xF);
|
||||
insOp.dt = ((tmp >> 4) & 0x7);
|
||||
insOp.tl = (reader.readC() & 0xF);
|
||||
insOp.tl = (reader.readC() & 0x3F);
|
||||
tmp = reader.readC();
|
||||
insOp.rs = ((tmp >> 6) & 0x3);
|
||||
insOp.ar = (tmp & 0x1F);
|
||||
|
@ -671,7 +671,7 @@ void DivEngine::loadY12(SafeReader& reader, std::vector<DivInstrument*>& ret, St
|
|||
}
|
||||
ins->fm.alg = reader.readC();
|
||||
ins->fm.fb = reader.readC();
|
||||
reader.seek(14, SEEK_CUR);
|
||||
reader.seek(62, SEEK_CUR);
|
||||
ret.push_back(ins);
|
||||
} catch (EndOfFileException& e) {
|
||||
lastError = "premature end of file";
|
||||
|
|
|
@ -1290,9 +1290,9 @@ void FurnaceGUI::openFileDialog(FurnaceGUIFileDialogs type) {
|
|||
if (!dirExists(workingDirIns)) workingDirIns=getHomeDir();
|
||||
hasOpened=fileDialog->openLoad(
|
||||
"Load Instrument",
|
||||
{"compatible files", "*.fui *.dmp *.tfi *.vgi *.s3i *.sbi *.bnk *.ff *.opm",
|
||||
{"compatible files", "*.fui *.dmp *.tfi *.vgi *.s3i *.sbi *.y12 *.bnk *.ff *.opm",
|
||||
"all files", ".*"},
|
||||
"compatible files{.fui,.dmp,.tfi,.vgi,.s3i,.sbi,.bnk,.ff,.opm},.*",
|
||||
"compatible files{.fui,.dmp,.tfi,.vgi,.s3i,.sbi,.y12,.bnk,.ff,.opm},.*",
|
||||
workingDirIns,
|
||||
dpiScale
|
||||
);
|
||||
|
|
|
@ -2485,6 +2485,7 @@ void FurnaceGUI::applyUISettings(bool updateFonts) {
|
|||
ImGuiFileDialog::Instance()->SetFileStyle(IGFD_FileStyleByExtension,".vgi",uiColors[GUI_COLOR_FILE_INSTR],ICON_FA_FILE);
|
||||
ImGuiFileDialog::Instance()->SetFileStyle(IGFD_FileStyleByExtension,".s3i",uiColors[GUI_COLOR_FILE_INSTR],ICON_FA_FILE);
|
||||
ImGuiFileDialog::Instance()->SetFileStyle(IGFD_FileStyleByExtension,".sbi",uiColors[GUI_COLOR_FILE_INSTR],ICON_FA_FILE);
|
||||
ImGuiFileDialog::Instance()->SetFileStyle(IGFD_FileStyleByExtension,".y12",uiColors[GUI_COLOR_FILE_INSTR],ICON_FA_FILE);
|
||||
ImGuiFileDialog::Instance()->SetFileStyle(IGFD_FileStyleByExtension,".bnk",uiColors[GUI_COLOR_FILE_INSTR],ICON_FA_FILE);
|
||||
ImGuiFileDialog::Instance()->SetFileStyle(IGFD_FileStyleByExtension,".fti",uiColors[GUI_COLOR_FILE_INSTR],ICON_FA_FILE);
|
||||
ImGuiFileDialog::Instance()->SetFileStyle(IGFD_FileStyleByExtension,".bti",uiColors[GUI_COLOR_FILE_INSTR],ICON_FA_FILE);
|
||||
|
|
Loading…
Reference in a new issue