mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 15:03:01 +00:00
Add define value for number of chip defines
This commit is contained in:
parent
ace2142286
commit
7e1acaf9d5
3 changed files with 10 additions and 9 deletions
|
@ -24,6 +24,7 @@
|
|||
#define DIV_MAX_CHIPS 32
|
||||
#define DIV_MAX_CHANS 128
|
||||
#define DIV_MAX_PATTERNS 256
|
||||
#define DIV_MAX_CHIP_DEFS 256
|
||||
|
||||
// in-pattern
|
||||
#define DIV_MAX_ROWS 256
|
||||
|
|
|
@ -391,9 +391,9 @@ class DivEngine {
|
|||
std::vector<String> midiOuts;
|
||||
std::vector<DivCommand> cmdStream;
|
||||
std::vector<DivInstrumentType> possibleInsTypes;
|
||||
static DivSysDef* sysDefs[256];
|
||||
static DivSystem sysFileMapFur[256];
|
||||
static DivSystem sysFileMapDMF[256];
|
||||
static DivSysDef* sysDefs[DIV_MAX_CHIP_DEFS];
|
||||
static DivSystem sysFileMapFur[DIV_MAX_CHIP_DEFS];
|
||||
static DivSystem sysFileMapDMF[DIV_MAX_CHIP_DEFS];
|
||||
|
||||
struct SamplePreview {
|
||||
double rate;
|
||||
|
@ -1162,11 +1162,11 @@ class DivEngine {
|
|||
memset(tremTable,0,128*sizeof(short));
|
||||
memset(reversePitchTable,0,4096*sizeof(int));
|
||||
memset(pitchTable,0,4096*sizeof(int));
|
||||
memset(sysDefs,0,256*sizeof(void*));
|
||||
memset(sysDefs,0,DIV_MAX_CHIP_DEFS*sizeof(void*));
|
||||
memset(walked,0,8192);
|
||||
memset(oscBuf,0,DIV_MAX_OUTPUTS*(sizeof(float*)));
|
||||
|
||||
for (int i=0; i<256; i++) {
|
||||
for (int i=0; i<DIV_MAX_CHIP_DEFS; i++) {
|
||||
sysFileMapFur[i]=DIV_SYSTEM_NULL;
|
||||
sysFileMapDMF[i]=DIV_SYSTEM_NULL;
|
||||
}
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
#include "song.h"
|
||||
#include "../ta-log.h"
|
||||
|
||||
DivSysDef* DivEngine::sysDefs[256];
|
||||
DivSystem DivEngine::sysFileMapFur[256];
|
||||
DivSystem DivEngine::sysFileMapDMF[256];
|
||||
DivSysDef* DivEngine::sysDefs[DIV_MAX_CHIP_DEFS];
|
||||
DivSystem DivEngine::sysFileMapFur[DIV_MAX_CHIP_DEFS];
|
||||
DivSystem DivEngine::sysFileMapDMF[DIV_MAX_CHIP_DEFS];
|
||||
|
||||
DivSystem DivEngine::systemFromFileFur(unsigned char val) {
|
||||
return sysFileMapFur[val];
|
||||
|
@ -1791,7 +1791,7 @@ void DivEngine::registerSystems() {
|
|||
{DIV_INS_STD, DIV_INS_STD, DIV_INS_STD, DIV_INS_STD, DIV_INS_STD, DIV_INS_STD, DIV_INS_STD, DIV_INS_STD}
|
||||
);
|
||||
|
||||
for (int i=0; i<256; i++) {
|
||||
for (int i=0; i<DIV_MAX_CHIP_DEFS; i++) {
|
||||
if (sysDefs[i]==NULL) continue;
|
||||
if (sysDefs[i]->id!=0) {
|
||||
sysFileMapFur[sysDefs[i]->id]=(DivSystem)i;
|
||||
|
|
Loading…
Reference in a new issue