mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-03 09:47:26 +00:00
Merge branch 'master' of https://github.com/tildearrow/furnace into ay_divider
* 'master' of https://github.com/tildearrow/furnace: GUI: macro UI refactor, part 2 Masochism Volatile Compiler GUI: is the macro UI back yet OPL: fix 4-op muting (I think) GUI: macro UI refactor, part 1 - PLEASE READ GUI: remove classic macro view Fix more MSVC warnings
This commit is contained in:
commit
9df2500195
5 changed files with 331 additions and 649 deletions
|
@ -564,7 +564,7 @@ int DivPlatformOPL::toFreq(int freq) {
|
|||
|
||||
void DivPlatformOPL::muteChannel(int ch, bool mute) {
|
||||
isMuted[ch]=mute;
|
||||
if (ch<melodicChans) {
|
||||
if (oplType<3 && ch<melodicChans) {
|
||||
fm.channel[outChanMap[ch]].muted=mute;
|
||||
}
|
||||
int ops=(slots[3][ch]!=255 && chan[ch].state.ops==4 && oplType==3)?4:2;
|
||||
|
@ -1246,7 +1246,7 @@ void DivPlatformOPL::reset() {
|
|||
chan[i].outVol=0x3f;
|
||||
}
|
||||
|
||||
for (int i=0; i<melodicChans; i++) {
|
||||
if (oplType<3) for (int i=0; i<melodicChans; i++) {
|
||||
fm.channel[outChanMap[i]].muted=isMuted[i];
|
||||
}
|
||||
|
||||
|
|
|
@ -723,6 +723,35 @@ struct FurnaceGUISysCategory {
|
|||
name(NULL) {}
|
||||
};
|
||||
|
||||
struct FurnaceGUIMacroDesc {
|
||||
DivInstrumentMacro* macro;
|
||||
int min, max;
|
||||
float height;
|
||||
const char* displayName;
|
||||
const char** bitfieldBits;
|
||||
const char* modeName;
|
||||
ImVec4 color;
|
||||
unsigned int bitOffset;
|
||||
bool isBitfield, blockMode;
|
||||
String (*hoverFunc)(int,float);
|
||||
|
||||
FurnaceGUIMacroDesc(const char* name, DivInstrumentMacro* m, int macroMin, int macroMax, float macroHeight, ImVec4 col=ImVec4(1.0f,1.0f,1.0f,1.0f), bool block=false, const char* mName=NULL, String (*hf)(int,float)=NULL, bool bitfield=false, const char** bfVal=NULL, unsigned int bitOff=0):
|
||||
macro(m),
|
||||
height(macroHeight),
|
||||
displayName(name),
|
||||
bitfieldBits(bfVal),
|
||||
modeName(mName),
|
||||
color(col),
|
||||
bitOffset(bitOff),
|
||||
isBitfield(bitfield),
|
||||
blockMode(block),
|
||||
hoverFunc(hf) {
|
||||
// MSVC -> hell
|
||||
this->min=macroMin;
|
||||
this->max=macroMax;
|
||||
}
|
||||
};
|
||||
|
||||
class FurnaceGUI {
|
||||
DivEngine* e;
|
||||
|
||||
|
@ -1161,6 +1190,8 @@ class FurnaceGUI {
|
|||
|
||||
void patternRow(int i, bool isPlaying, float lineHeight, int chans, int ord, const DivPattern** patCache, bool inhibitSel);
|
||||
|
||||
void drawMacros(std::vector<FurnaceGUIMacroDesc>& macros);
|
||||
|
||||
void actualWaveList();
|
||||
void actualSampleList();
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1074,11 +1074,6 @@ void FurnaceGUI::drawSettings() {
|
|||
settings.separateFMColors=separateFMColorsB;
|
||||
}
|
||||
|
||||
bool macroViewB=settings.macroView;
|
||||
if (ImGui::Checkbox("Classic macro view (standard macros only; deprecated!)",¯oViewB)) {
|
||||
settings.macroView=macroViewB;
|
||||
}
|
||||
|
||||
bool unifiedDataViewB=settings.unifiedDataView;
|
||||
if (ImGui::Checkbox("Unified instrument/wavetable/sample list",&unifiedDataViewB)) {
|
||||
settings.unifiedDataView=unifiedDataViewB;
|
||||
|
|
|
@ -31,16 +31,3 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prevInst, PSTR args, int state) {
|
|||
}
|
||||
return main(argc,argv);
|
||||
}
|
||||
|
||||
int WINAPI wWinMain(HINSTANCE inst, HINSTANCE prevInst, PWSTR args, int state) {
|
||||
int argc=0;
|
||||
wchar_t** argw=CommandLineToArgvW(args,&argc);
|
||||
char** argv=new char*[argc+1];
|
||||
argv[argc]=NULL;
|
||||
for (int i=0; i<argc; i++) {
|
||||
std::string str=utf16To8(argw[i]);
|
||||
argv[i]=new char[str.size()+1];
|
||||
strcpy(argv[i],str.c_str());
|
||||
}
|
||||
return main(argc,argv);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue