Game Boy: fix serious typo

This commit is contained in:
tildearrow 2022-08-07 01:32:28 -05:00
parent 1721e1d03e
commit 45196daf95
2 changed files with 11 additions and 1 deletions

View File

@ -534,7 +534,7 @@ void DivInstrument::putInsData(SafeWriter* w) {
// GB hardware sequence
w->writeC(gb.hwSeqLen);
for (int i=0; gb.hwSeqLen; i++) {
for (int i=0; i<gb.hwSeqLen; i++) {
w->writeC(gb.hwSeq[i].cmd);
w->writeS(gb.hwSeq[i].data);
}

View File

@ -262,6 +262,16 @@ struct DivInstrumentSTD {
struct DivInstrumentGB {
unsigned char envVol, envDir, envLen, soundLen, hwSeqLen;
enum HWSeqCommands: unsigned char {
DIV_GB_HWCMD_ENVELOPE=0,
DIV_GB_HWCMD_SWEEP,
DIV_GB_HWCMD_WAIT,
DIV_GB_HWCMD_WAIT_REL,
DIV_GB_HWCMD_LOOP,
DIV_GB_HWCMD_LOOP_REL,
DIV_GB_HWCMD_MAX
};
struct HWSeqCommand {
unsigned char cmd;
unsigned short data;