mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 13:05:11 +00:00
GUI: channel status, part 4
This commit is contained in:
parent
429119a186
commit
d8daeb1169
7 changed files with 126 additions and 3 deletions
|
@ -396,6 +396,15 @@ struct DivChannelModeHints {
|
|||
// - 9: misc 1
|
||||
// - 10: misc 2
|
||||
// - 11: misc 3
|
||||
// - 12: attack
|
||||
// - 13: decay
|
||||
// - 14: sustain
|
||||
// - 15: release
|
||||
// - 16: dec linear
|
||||
// - 17: dec exp
|
||||
// - 18: inc linear
|
||||
// - 19: inc bent
|
||||
// - 20: direct
|
||||
unsigned char type[4];
|
||||
// up to 4
|
||||
unsigned char count;
|
||||
|
|
|
@ -710,6 +710,63 @@ DivChannelPair DivPlatformSNES::getPaired(int ch) {
|
|||
return DivChannelPair();
|
||||
}
|
||||
|
||||
DivChannelModeHints DivPlatformSNES::getModeHints(int ch) {
|
||||
DivChannelModeHints ret;
|
||||
ret.count=1;
|
||||
ret.hint[0]="-";
|
||||
ret.type[0]=0;
|
||||
|
||||
const SPC_DSP::voice_t* v=dsp.get_voice(ch);
|
||||
if (v!=NULL) {
|
||||
if (v->regs[5]&128) {
|
||||
switch (v->env_mode) {
|
||||
case SPC_DSP::env_attack:
|
||||
ret.hint[0]="A";
|
||||
ret.type[0]=12;
|
||||
break;
|
||||
case SPC_DSP::env_decay:
|
||||
ret.hint[0]="D";
|
||||
ret.type[0]=13;
|
||||
break;
|
||||
case SPC_DSP::env_sustain:
|
||||
ret.hint[0]="S";
|
||||
ret.type[0]=14;
|
||||
break;
|
||||
case SPC_DSP::env_release:
|
||||
ret.hint[0]="R";
|
||||
ret.type[0]=15;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (v->regs[7]&128) {
|
||||
switch (v->regs[7]&0x60) {
|
||||
case 0:
|
||||
ret.hint[0]="d";
|
||||
ret.type[0]=16;
|
||||
break;
|
||||
case 32:
|
||||
ret.hint[0]="X";
|
||||
ret.type[0]=17;
|
||||
break;
|
||||
case 64:
|
||||
ret.hint[0]="I";
|
||||
ret.type[0]=18;
|
||||
break;
|
||||
case 96:
|
||||
ret.hint[0]="B";
|
||||
ret.type[0]=19;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
ret.hint[0]="V";
|
||||
ret.type[0]=20;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
DivSamplePos DivPlatformSNES::getSamplePos(int ch) {
|
||||
if (ch>=8) return DivSamplePos();
|
||||
if (!chan[ch].active) return DivSamplePos();
|
||||
|
|
|
@ -102,6 +102,7 @@ class DivPlatformSNES: public DivDispatch {
|
|||
DivMacroInt* getChanMacroInt(int ch);
|
||||
unsigned short getPan(int chan);
|
||||
DivChannelPair getPaired(int chan);
|
||||
DivChannelModeHints getModeHints(int chan);
|
||||
DivSamplePos getSamplePos(int ch);
|
||||
DivDispatchOscBuffer* getOscBuffer(int chan);
|
||||
unsigned char* getRegisterPool();
|
||||
|
|
|
@ -321,7 +321,15 @@ enum FurnaceGUIColors {
|
|||
GUI_COLOR_PATTERN_STATUS_MISC1,
|
||||
GUI_COLOR_PATTERN_STATUS_MISC2,
|
||||
GUI_COLOR_PATTERN_STATUS_MISC3,
|
||||
|
||||
GUI_COLOR_PATTERN_STATUS_ATTACK,
|
||||
GUI_COLOR_PATTERN_STATUS_DECAY,
|
||||
GUI_COLOR_PATTERN_STATUS_SUSTAIN,
|
||||
GUI_COLOR_PATTERN_STATUS_RELEASE,
|
||||
GUI_COLOR_PATTERN_STATUS_DEC_LINEAR,
|
||||
GUI_COLOR_PATTERN_STATUS_DEC_EXP,
|
||||
GUI_COLOR_PATTERN_STATUS_INC,
|
||||
GUI_COLOR_PATTERN_STATUS_BENT,
|
||||
GUI_COLOR_PATTERN_STATUS_DIRECT,
|
||||
GUI_COLOR_PATTERN_PAIR,
|
||||
|
||||
GUI_COLOR_SAMPLE_BG,
|
||||
|
|
|
@ -1004,6 +1004,15 @@ const FurnaceGUIColorDef guiColors[GUI_COLOR_MAX]={
|
|||
D(GUI_COLOR_PATTERN_STATUS_MISC1,"",ImVec4(1.0f,0.5f,0.0f,1.0f)),
|
||||
D(GUI_COLOR_PATTERN_STATUS_MISC2,"",ImVec4(0.7f,0.5f,1.0f,1.0f)),
|
||||
D(GUI_COLOR_PATTERN_STATUS_MISC3,"",ImVec4(1.0f,0.1f,0.1f,1.0f)),
|
||||
D(GUI_COLOR_PATTERN_STATUS_ATTACK,"",ImVec4(1.0f,0.1f,0.1f,1.0f)),
|
||||
D(GUI_COLOR_PATTERN_STATUS_DECAY,"",ImVec4(1.0f,0.1f,1.0f,1.0f)),
|
||||
D(GUI_COLOR_PATTERN_STATUS_SUSTAIN,"",ImVec4(0.1f,1.0f,1.0f,1.0f)),
|
||||
D(GUI_COLOR_PATTERN_STATUS_RELEASE,"",ImVec4(0.1f,0.2f,1.0f,1.0f)),
|
||||
D(GUI_COLOR_PATTERN_STATUS_DEC_LINEAR,"",ImVec4(1.0f,1.0f,0.1f,1.0f)),
|
||||
D(GUI_COLOR_PATTERN_STATUS_DEC_EXP,"",ImVec4(1.0f,0.5f,0.1f,1.0f)),
|
||||
D(GUI_COLOR_PATTERN_STATUS_INC,"",ImVec4(1.0f,1.0f,0.1f,1.0f)),
|
||||
D(GUI_COLOR_PATTERN_STATUS_BENT,"",ImVec4(1.0f,0.5f,0.1f,1.0f)),
|
||||
D(GUI_COLOR_PATTERN_STATUS_DIRECT,"",ImVec4(0.2f,1.0f,0.2f,1.0f)),
|
||||
|
||||
D(GUI_COLOR_PATTERN_PAIR,"",ImVec4(0.6f,0.8f,1.0f,1.0f)),
|
||||
|
||||
|
|
|
@ -1039,14 +1039,44 @@ void FurnaceGUI::drawPattern() {
|
|||
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_DSP];
|
||||
break;
|
||||
case 8:
|
||||
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_MISC1];
|
||||
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_NOTE];
|
||||
break;
|
||||
case 9:
|
||||
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_MISC2];
|
||||
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_MISC1];
|
||||
break;
|
||||
case 10:
|
||||
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_MISC2];
|
||||
break;
|
||||
case 11:
|
||||
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_MISC3];
|
||||
break;
|
||||
case 12:
|
||||
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_ATTACK];
|
||||
break;
|
||||
case 13:
|
||||
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_DECAY];
|
||||
break;
|
||||
case 14:
|
||||
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_SUSTAIN];
|
||||
break;
|
||||
case 15:
|
||||
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_RELEASE];
|
||||
break;
|
||||
case 16:
|
||||
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_DEC_LINEAR];
|
||||
break;
|
||||
case 17:
|
||||
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_DEC_EXP];
|
||||
break;
|
||||
case 18:
|
||||
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_INC];
|
||||
break;
|
||||
case 19:
|
||||
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_BENT];
|
||||
break;
|
||||
case 20:
|
||||
hintColor=uiColors[GUI_COLOR_PATTERN_STATUS_DIRECT];
|
||||
break;
|
||||
default:
|
||||
hintColor=uiColors[GUI_COLOR_TEXT];
|
||||
break;
|
||||
|
|
|
@ -3381,6 +3381,15 @@ void FurnaceGUI::drawSettings() {
|
|||
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_MISC1,"Status: misc color 1");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_MISC2,"Status: misc color 2");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_MISC3,"Status: misc color 3");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_ATTACK,"Status: attack");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_DECAY,"Status: decay");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_SUSTAIN,"Status: sustain");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_RELEASE,"Status: release");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_DEC_LINEAR,"Status: decrease linear");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_DEC_EXP,"Status: decrease exp");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_INC,"Status: increase");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_BENT,"Status: bent");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_PATTERN_STATUS_DIRECT,"Status: direct");
|
||||
ImGui::TreePop();
|
||||
}
|
||||
if (ImGui::TreeNode("Sample Editor")) {
|
||||
|
|
Loading…
Reference in a new issue