giga-refactor, part 12

loading works
This commit is contained in:
tildearrow 2025-11-16 07:13:30 -05:00
parent 94044ef210
commit 334d8708e2
3 changed files with 250 additions and 85 deletions

View file

@ -171,17 +171,22 @@ enum DivFileElementType: unsigned char {
DIV_ELEMENT_PATTERN,
DIV_ELEMENT_COMPAT_FLAGS,
DIV_ELEMENT_COMMENTS,
DIV_ELEMENT_GROOVE
DIV_ELEMENT_GROOVE,
DIV_ELEMENT_MAX
};
struct DivGroovePattern {
unsigned char val[16];
unsigned char len;
unsigned short val[16];
unsigned short len;
bool readData(SafeReader& reader);
void putData(SafeWriter* w);
DivGroovePattern():
len(1) {
memset(val,6,16);
for (int i=0; i<16; i++) {
val[i]=6;
}
}
};
struct DivSongTimestamps {
@ -244,6 +249,11 @@ struct DivSubSong {
*/
void calcTimestamps(int chans, std::vector<DivGroovePattern>& grooves, int jumpTreatment, int ignoreJumpAtEnd, int brokenSpeedSel, int delayBehavior, int firstPat=0);
/**
* read sub-song data.
*/
bool readData(SafeReader& reader, int version, int chans);
/**
* write sub-song block to a SafeWriter.
*/