GUI: colored pattern view
This commit is contained in:
parent
60f06d2908
commit
9e2e02a12e
6 changed files with 253 additions and 34 deletions
|
|
@ -144,7 +144,7 @@ bool DivEngine::isFMSystem(DivSystem sys) {
|
|||
const char* chanNames[11][17]={
|
||||
{"Channel 1", "Channel 2", "Channel 3", "Channel 4", "Channel 5", "Channel 6", "Channel 7", "Channel 8", "Channel 9", "Channel 10", "Channel 11", "Channel 12", "Channel 13", "Channel 14", "Channel 15", "Channel 16", "PCM"}, // YMU759
|
||||
{"FM 1", "FM 2", "FM 3", "FM 4", "FM 5", "FM 6", "Square 1", "Square 2", "Square 3", "Noise"}, // Genesis
|
||||
{"FM 1", "FM 2", "FM 3 Operator 1", "FM 3 Operator 2", "FM 3 Operator 3", "FM 3 Operator 4", "FM 4", "FM 5", "FM 6", "Square 1", "Square 2", "Square 3", "Noise"}, // Genesis (extended channel 3)
|
||||
{"FM 1", "FM 2", "FM 3 OP1", "FM 3 OP2", "FM 3 OP3", "FM 3 OP4", "FM 4", "FM 5", "FM 6", "Square 1", "Square 2", "Square 3", "Noise"}, // Genesis (extended channel 3)
|
||||
{"Square 1", "Square 2", "Square 3", "Noise"}, // SMS
|
||||
{"Pulse 1", "Pulse 2", "Wavetable", "Noise"}, // GB
|
||||
{"Channel 1", "Channel 2", "Channel 3", "Channel 4", "Channel 5", "Channel 6"}, // PCE
|
||||
|
|
@ -152,7 +152,7 @@ const char* chanNames[11][17]={
|
|||
{"Channel 1", "Channel 2", "Channel 3"}, // C64
|
||||
{"FM 1", "FM 2", "FM 3", "FM 4", "FM 5", "FM 6", "FM 7", "FM 8", "Sample 1", "Sample 2", "Sample 3", "Sample 4", "Sample 5"}, // Arcade
|
||||
{"FM 1", "FM 2", "FM 3", "FM 4", "Square 1", "Square 2", "Square 3", "Sample 1", "Sample 2", "Sample 3", "Sample 4", "Sample 5", "Sample 6"}, // YM2610
|
||||
{"FM 1", "FM 2 Operator 1", "FM 2 Operator 2", "FM 2 Operator 3", "FM 2 Operator 4", "FM 3", "FM 4", "Square 1", "Square 2", "Square 3", "Sample 1", "Sample 2", "Sample 3", "Sample 4", "Sample 5", "Sample 6"}, // YM2610 (extended channel 2)
|
||||
{"FM 1", "FM 2 OP1", "FM 2 OP2", "FM 2 OP3", "FM 2 OP4", "FM 3", "FM 4", "Square 1", "Square 2", "Square 3", "Sample 1", "Sample 2", "Sample 3", "Sample 4", "Sample 5", "Sample 6"}, // YM2610 (extended channel 2)
|
||||
};
|
||||
|
||||
const char* chanShortNames[11][17]={
|
||||
|
|
@ -1164,10 +1164,22 @@ void DivEngine::reset() {
|
|||
dispatch->reset();
|
||||
}
|
||||
|
||||
int DivEngine::getMaxVolumeChan(int ch) {
|
||||
return chan[ch].volMax>>8;
|
||||
}
|
||||
|
||||
unsigned char DivEngine::getOrder() {
|
||||
return curOrder;
|
||||
}
|
||||
|
||||
int DivEngine::getRow() {
|
||||
return curRow;
|
||||
}
|
||||
|
||||
bool DivEngine::isPlaying() {
|
||||
return playing;
|
||||
}
|
||||
|
||||
void DivEngine::setOrder(unsigned char order) {
|
||||
isBusy.lock();
|
||||
curOrder=order;
|
||||
|
|
@ -1357,3 +1369,9 @@ bool DivEngine::init(String outName) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DivEngine::quit() {
|
||||
output->quit();
|
||||
quitDispatch();
|
||||
return true;
|
||||
}
|
||||
|
|
@ -125,6 +125,9 @@ class DivEngine {
|
|||
// get channel short name
|
||||
const char* getChannelShortName(int chan);
|
||||
|
||||
// get channel max volume
|
||||
int getMaxVolumeChan(int chan);
|
||||
|
||||
// get max STD volume
|
||||
int getMaxVolume();
|
||||
|
||||
|
|
@ -137,6 +140,12 @@ class DivEngine {
|
|||
// get current order
|
||||
unsigned char getOrder();
|
||||
|
||||
// get current row
|
||||
int getRow();
|
||||
|
||||
// is playing
|
||||
bool isPlaying();
|
||||
|
||||
// go to order
|
||||
void setOrder(unsigned char order);
|
||||
|
||||
|
|
@ -158,6 +167,9 @@ class DivEngine {
|
|||
// initialize the engine. optionally provide an output file name.
|
||||
bool init(String outName="");
|
||||
|
||||
// terminate the engine.
|
||||
bool quit();
|
||||
|
||||
unsigned char* adpcmMem;
|
||||
|
||||
DivEngine():
|
||||
|
|
@ -178,7 +190,7 @@ class DivEngine {
|
|||
totalCmds(0),
|
||||
lastCmds(0),
|
||||
cmdsPerSecond(0),
|
||||
view(DIV_STATUS_PATTERN),
|
||||
view(DIV_STATUS_NOTHING),
|
||||
audioEngine(DIV_AUDIO_SDL),
|
||||
bbInLen(0),
|
||||
temp{0,0},
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@ static DivPattern emptyPat;
|
|||
|
||||
DivPattern::DivPattern() {
|
||||
memset(data,-1,256*16);
|
||||
for (int i=0; i<256; i++) {
|
||||
data[i][0]=0;
|
||||
data[i][1]=0;
|
||||
}
|
||||
}
|
||||
|
||||
DivPattern* DivChannelData::getPattern(int index, bool create) {
|
||||
|
|
@ -17,6 +21,7 @@ DivPattern* DivChannelData::getPattern(int index, bool create) {
|
|||
return data[index];
|
||||
}
|
||||
|
||||
DivChannelData::DivChannelData() {
|
||||
DivChannelData::DivChannelData():
|
||||
effectRows(1) {
|
||||
memset(data,0,128*sizeof(void*));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue