actually obey the orders
This commit is contained in:
parent
13c6362edb
commit
d395abe47f
5 changed files with 31 additions and 9 deletions
22
src/engine/pattern.cpp
Normal file
22
src/engine/pattern.cpp
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#include "engine.h"
|
||||
|
||||
static DivPattern emptyPat;
|
||||
|
||||
DivPattern::DivPattern() {
|
||||
memset(data,0,256*16);
|
||||
}
|
||||
|
||||
DivPattern* DivChannelData::getPattern(int index, bool create) {
|
||||
if (data[index]==NULL) {
|
||||
if (create) {
|
||||
data[index]=new DivPattern;
|
||||
} else {
|
||||
return &emptyPat;
|
||||
}
|
||||
}
|
||||
return data[index];
|
||||
}
|
||||
|
||||
DivChannelData::DivChannelData() {
|
||||
memset(data,0,128*sizeof(void*));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue