add options for ZSM and TIunA out
This commit is contained in:
parent
fb2b98a541
commit
b213586ca4
36
src/main.cpp
36
src/main.cpp
|
@ -112,6 +112,9 @@ bool infoMode=false;
|
|||
|
||||
bool noReportError=false;
|
||||
|
||||
int tiunaFirstBankSize=3072;
|
||||
int tiunaOtherBankSize=4096-48;
|
||||
|
||||
std::vector<TAParam> params;
|
||||
|
||||
#ifdef HAVE_LOCALE
|
||||
|
@ -891,6 +894,39 @@ int main(int argc, char** argv) {
|
|||
reportError(_("could not write VGM!"));
|
||||
}
|
||||
}
|
||||
if (zsmOutName!="") {
|
||||
// TODO: changing parameters
|
||||
SafeWriter* w=e.saveZSM(60,true,true);
|
||||
if (w!=NULL) {
|
||||
FILE* f=ps_fopen(zsmOutName.c_str(),"wb");
|
||||
if (f!=NULL) {
|
||||
fwrite(w->getFinalBuf(),1,w->size(),f);
|
||||
fclose(f);
|
||||
} else {
|
||||
reportError(fmt::sprintf(_("could not open file! (%s)"),e.getLastError()));
|
||||
}
|
||||
w->finish();
|
||||
delete w;
|
||||
} else {
|
||||
reportError(fmt::sprintf(_("could not write ZSM! (%s)"),e.getLastError()));
|
||||
}
|
||||
}
|
||||
if (tiunaOutName!="") {
|
||||
SafeWriter* w=e.saveTiuna(NULL,"asmBaseLabel",tiunaFirstBankSize,tiunaOtherBankSize);
|
||||
if (w!=NULL) {
|
||||
FILE* f=ps_fopen(tiunaOutName.c_str(),"wb");
|
||||
if (f!=NULL) {
|
||||
fwrite(w->getFinalBuf(),1,w->size(),f);
|
||||
fclose(f);
|
||||
} else {
|
||||
reportError(fmt::sprintf(_("could not open file! (%s)"),e.getLastError()));
|
||||
}
|
||||
w->finish();
|
||||
delete w;
|
||||
} else {
|
||||
reportError(fmt::sprintf("could not write TIunA! (%s)",e.getLastError()));
|
||||
}
|
||||
}
|
||||
if (outName!="") {
|
||||
e.setConsoleMode(true);
|
||||
e.saveAudio(outName.c_str(),exportOptions);
|
||||
|
|
Loading…
Reference in a new issue