Sfoglia il codice sorgente

Updated DUMB to version 2.0.2.

master
parent
commit
20d1ce09e5
46 ha cambiato i file con 112 aggiunte e 60 eliminazioni
  1. +2
    -2
      Frameworks/Dumb/dumb/include/dumb.h
  2. +4
    -0
      Frameworks/Dumb/dumb/src/it/itorder.c
  3. +5
    -1
      Frameworks/Dumb/dumb/src/it/itread.c
  4. +1
    -1
      Frameworks/Dumb/dumb/src/it/load669.c
  5. +1
    -1
      Frameworks/Dumb/dumb/src/it/load6692.c
  6. +1
    -1
      Frameworks/Dumb/dumb/src/it/loadamf.c
  7. +1
    -1
      Frameworks/Dumb/dumb/src/it/loadamf2.c
  8. +1
    -1
      Frameworks/Dumb/dumb/src/it/loadany.c
  9. +1
    -1
      Frameworks/Dumb/dumb/src/it/loadany2.c
  10. +1
    -1
      Frameworks/Dumb/dumb/src/it/loadasy.c
  11. +1
    -1
      Frameworks/Dumb/dumb/src/it/loadasy2.c
  12. +1
    -1
      Frameworks/Dumb/dumb/src/it/loadmtm.c
  13. +1
    -1
      Frameworks/Dumb/dumb/src/it/loadmtm2.c
  14. +1
    -1
      Frameworks/Dumb/dumb/src/it/loadokt.c
  15. +1
    -1
      Frameworks/Dumb/dumb/src/it/loadokt2.c
  16. +1
    -1
      Frameworks/Dumb/dumb/src/it/loadoldpsm.c
  17. +1
    -1
      Frameworks/Dumb/dumb/src/it/loadoldpsm2.c
  18. +1
    -1
      Frameworks/Dumb/dumb/src/it/loadpsm.c
  19. +1
    -1
      Frameworks/Dumb/dumb/src/it/loadpsm2.c
  20. +1
    -1
      Frameworks/Dumb/dumb/src/it/loadptm.c
  21. +1
    -1
      Frameworks/Dumb/dumb/src/it/loadptm2.c
  22. +1
    -1
      Frameworks/Dumb/dumb/src/it/loadriff.c
  23. +1
    -1
      Frameworks/Dumb/dumb/src/it/loadriff2.c
  24. +1
    -1
      Frameworks/Dumb/dumb/src/it/loadstm.c
  25. +1
    -1
      Frameworks/Dumb/dumb/src/it/loadstm2.c
  26. +1
    -1
      Frameworks/Dumb/dumb/src/it/ptmeffect.c
  27. +5
    -2
      Frameworks/Dumb/dumb/src/it/read669.c
  28. +1
    -1
      Frameworks/Dumb/dumb/src/it/read6692.c
  29. +5
    -2
      Frameworks/Dumb/dumb/src/it/readam.c
  30. +6
    -3
      Frameworks/Dumb/dumb/src/it/readamf.c
  31. +1
    -1
      Frameworks/Dumb/dumb/src/it/readany.c
  32. +1
    -1
      Frameworks/Dumb/dumb/src/it/readany2.c
  33. +5
    -2
      Frameworks/Dumb/dumb/src/it/readasy.c
  34. +7
    -2
      Frameworks/Dumb/dumb/src/it/readdsmf.c
  35. +4
    -1
      Frameworks/Dumb/dumb/src/it/readmod.c
  36. +6
    -3
      Frameworks/Dumb/dumb/src/it/readmtm.c
  37. +5
    -2
      Frameworks/Dumb/dumb/src/it/readokt.c
  38. +1
    -1
      Frameworks/Dumb/dumb/src/it/readokt2.c
  39. +4
    -3
      Frameworks/Dumb/dumb/src/it/readoldpsm.c
  40. +5
    -2
      Frameworks/Dumb/dumb/src/it/readpsm.c
  41. +6
    -2
      Frameworks/Dumb/dumb/src/it/readptm.c
  42. +1
    -1
      Frameworks/Dumb/dumb/src/it/readriff.c
  43. +5
    -1
      Frameworks/Dumb/dumb/src/it/reads3m.c
  44. +5
    -2
      Frameworks/Dumb/dumb/src/it/readstm.c
  45. +1
    -1
      Frameworks/Dumb/dumb/src/it/readstm2.c
  46. +4
    -1
      Frameworks/Dumb/dumb/src/it/readxm.c

+ 2
- 2
Frameworks/Dumb/dumb/include/dumb.h Vedi File

@@ -40,8 +40,8 @@ extern "C" {
*/
#define DUMB_MAJOR_VERSION 2
#define DUMB_MINOR_VERSION 0
#define DUMB_REVISION_VERSION 0
#define DUMB_VERSION_STR "2.0.0"
#define DUMB_REVISION_VERSION 2
#define DUMB_VERSION_STR "2.0.2"
#define DUMB_VERSION \
(DUMB_MAJOR_VERSION * 10000 + DUMB_MINOR_VERSION * 100 + \


+ 4
- 0
Frameworks/Dumb/dumb/src/it/itorder.c Vedi File

@@ -40,6 +40,10 @@ int _dumb_it_fix_invalid_orders(DUMB_IT_SIGDATA *sigdata) {
sigdata->order[i] <= last_invalid) {
sigdata->order[i] = sigdata->n_patterns;
found_some = 1;
} else if (sigdata->order[i] < first_invalid) {
IT_PATTERN *pattern = sigdata->pattern + sigdata->order[i];
if (!pattern->n_rows || (pattern->n_entries && !pattern->entry))
return -1;
}
}


+ 5
- 1
Frameworks/Dumb/dumb/src/it/itread.c Vedi File

@@ -1042,6 +1042,7 @@ static sigdata_t *it_load_sigdata(DUMBFILE *f) {
// XXX sample count
if (dumbfile_error(f) || sigdata->n_orders <= 0 ||
sigdata->n_orders > 1024 || // Whoa, nelly.
sigdata->n_instruments > 256 || sigdata->n_samples > 4000 ||
sigdata->n_patterns > 256) {
_dumb_it_unload_sigdata(sigdata);
@@ -1437,7 +1438,10 @@ static sigdata_t *it_load_sigdata(DUMBFILE *f) {
free(buffer);
free(component);
_dumb_it_fix_invalid_orders(sigdata);
if (_dumb_it_fix_invalid_orders(sigdata) < 0) {
_dumb_it_unload_sigdata(sigdata);
return NULL;
}
return sigdata;
}


+ 1
- 1
Frameworks/Dumb/dumb/src/it/load669.c Vedi File

@@ -12,7 +12,7 @@
* file, opening and closing it for | < / \_
* you. | \/ /\ /
* \_ / > /
* By Chris Moeller | \ / /
* By Christopher Snowhill. | \ / /
* | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/load6692.c Vedi File

@@ -12,7 +12,7 @@
* file, opening and closing it for | < / \_
* you, and do an initial run-through. | \/ /\ /
* \_ / > /
* By Chris Moeller | \ / /
* By Christopher Snowhill. | \ / /
* | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/loadamf.c Vedi File

@@ -12,7 +12,7 @@
* opening and closing it for you. | < / \_
* | \/ /\ /
* \_ / > /
* By Chris Moeller. | \ / /
* By Christopher Snowhill. | \ / /
* | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/loadamf2.c Vedi File

@@ -13,7 +13,7 @@
* do an initial run-through. | \/ /\ /
* \_ / > /
* | \ / /
* By Chris Moeller. | ' /
* By Christopher Snowhill. | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/loadany.c Vedi File

@@ -12,7 +12,7 @@
* module formats supported by DUMB, | < / \_
* opening and closing the file for you. | \/ /\ /
* \_ / > /
* By Chris Moeller. | \ / /
* By Christopher Snowhill. | \ / /
* | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/loadany2.c Vedi File

@@ -13,7 +13,7 @@
* opening and closing the file for | \/ /\ /
* you, and do an initial run-through. \_ / > /
* | \ / /
* by Chris Moeller. | ' /
* by Christopher Snowhill. | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/loadasy.c Vedi File

@@ -12,7 +12,7 @@
* module file, opening and closing it | < / \_
* for you. | \/ /\ /
* \_ / > /
* By Chris Moeller. | \ / /
* By Christopher Snowhill. | \ / /
* | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/loadasy2.c Vedi File

@@ -13,7 +13,7 @@
* for you, and do an initial run- | \/ /\ /
* through. \_ / > /
* | \ / /
* By Chris Moeller. | ' /
* By Christopher Snowhill. | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/loadmtm.c Vedi File

@@ -12,7 +12,7 @@
* file, opening and closing it for | < / \_
* you. | \/ /\ /
* \_ / > /
* By Chris Moeller | \ / /
* By Christopher Snowhill. | \ / /
* | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/loadmtm2.c Vedi File

@@ -12,7 +12,7 @@
* file, opening and closing it for | < / \_
* you, and do an initial run-through. | \/ /\ /
* \_ / > /
* By Chris Moeller | \ / /
* By Christopher Snowhill. | \ / /
* | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/loadokt.c Vedi File

@@ -12,7 +12,7 @@
* file, opening and closing it for | < / \_
* you. | \/ /\ /
* \_ / > /
* By Chris Moeller. | \ / /
* By Christopher Snowhill. | \ / /
* | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/loadokt2.c Vedi File

@@ -13,7 +13,7 @@
* it for you, and do an initial run- | \/ /\ /
* through. \_ / > /
* | \ / /
* By Chris Moeller. | ' /
* By Christopher Snowhill. | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/loadoldpsm.c Vedi File

@@ -12,7 +12,7 @@
* file, opening and closing it for | < / \_
* you. | \/ /\ /
* \_ / > /
* By Chris Moeller. | \ / /
* By Christopher Snowhill. | \ / /
* | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/loadoldpsm2.c Vedi File

@@ -13,7 +13,7 @@
* you, and do an initial run- | \/ /\ /
* through. \_ / > /
* | \ / /
* By Chris Moeller. | ' /
* By Christopher Snowhill. | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/loadpsm.c Vedi File

@@ -12,7 +12,7 @@
* file, opening and closing it for | < / \_
* you. | \/ /\ /
* \_ / > /
* By Chris Moeller. | \ / /
* By Christopher Snowhill. | \ / /
* | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/loadpsm2.c Vedi File

@@ -12,7 +12,7 @@
* file, opening and closing it for | < / \_
* you, and do an initial run-through. | \/ /\ /
* \_ / > /
* By Chris Moeller. | \ / /
* By Christopher Snowhill. | \ / /
* | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/loadptm.c Vedi File

@@ -12,7 +12,7 @@
* file, opening and closing it for | < / \_
* you. | \/ /\ /
* \_ / > /
* By Chris Moeller. | \ / /
* By Christopher Snowhill. | \ / /
* | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/loadptm2.c Vedi File

@@ -12,7 +12,7 @@
* file, opening and closing it for | < / \_
* you, and do an initial run-through. | \/ /\ /
* \_ / > /
* By Chris Moeller. | \ / /
* By Christopher Snowhill. | \ / /
* | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/loadriff.c Vedi File

@@ -12,7 +12,7 @@
* opening and closing it for you. | < / \_
* | \/ /\ /
* \_ / > /
* By Chris Moeller. | \ / /
* By Christopher Snowhill. | \ / /
* | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/loadriff2.c Vedi File

@@ -12,7 +12,7 @@
* opening and closing it for you, | < / \_
* and do an initial run-through. | \/ /\ /
* \_ / > /
* By Chris Moeller. | \ / /
* By Christopher Snowhill. | \ / /
* | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/loadstm.c Vedi File

@@ -12,7 +12,7 @@
* file, opening and closing it for | < / \_
* you. | \/ /\ /
* \_ / > /
* By Chris Moeller. | \ / /
* By Christopher Snowhill. | \ / /
* | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/loadstm2.c Vedi File

@@ -12,7 +12,7 @@
* file, opening and closing it for | < / \_
* you, and do an initial run-through. | \/ /\ /
* \_ / > /
* By Chris Moeller. | \ / /
* By Christopher Snowhill. | \ / /
* | ' /
* \__/
*/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/ptmeffect.c Vedi File

@@ -11,7 +11,7 @@
* ptmeffect.c - Code for converting PTM / / \ \
* effects to IT effects. | < / \_
* | \/ /\ /
* By Chris Moeller. Based on xmeffect.c \_ / > /
* By Christopher Snowhill. Based on xmeffect.c \_ / > /
* by Julien Cugniere. | \ / /
* | ' /
* \__/


+ 5
- 2
Frameworks/Dumb/dumb/src/it/read669.c Vedi File

@@ -11,7 +11,7 @@
* read669.c - Code to read a 669 Composer module / / \ \
* from an open file. | < / \_
* | \/ /\ /
* By Chris Moeller. \_ / > /
* By Christopher Snowhill. \_ / > /
* | \ / /
* | ' /
* \__/
@@ -423,7 +423,10 @@ static DUMB_IT_SIGDATA *it_669_load_sigdata(DUMBFILE *f, int *ext) {
sigdata->channel_pan[i + 1] = 32 - sep;
}
_dumb_it_fix_invalid_orders(sigdata);
if (_dumb_it_fix_invalid_orders(sigdata) < 0) {
_dumb_it_unload_sigdata(sigdata);
return NULL;
}
return sigdata;
}


+ 1
- 1
Frameworks/Dumb/dumb/src/it/read6692.c Vedi File

@@ -11,7 +11,7 @@
* read6692.c - Code to read a 669 Composer module / / \ \
* from an open file, and do an initial | < / \_
* run-through. | \/ /\ /
* By Chris Moeller. \_ / > /
* By Christopher Snowhill. \_ / > /
* | \ / /
* | ' /
* \__/


+ 5
- 2
Frameworks/Dumb/dumb/src/it/readam.c Vedi File

@@ -11,7 +11,7 @@
* readam.c - Code to read a RIFF AM module / / \ \
* from a parsed RIFF structure. | < / \_
* | \/ /\ /
* By Chris Moeller. \_ / > /
* By Christopher Snowhill. \_ / > /
* | \ / /
* | ' /
* \__/
@@ -463,7 +463,10 @@ static DUMB_IT_SIGDATA *it_riff_amff_load_sigdata(DUMBFILE *f,
}
}
_dumb_it_fix_invalid_orders(sigdata);
if (_dumb_it_fix_invalid_orders(sigdata) < 0) {
_dumb_it_unload_sigdata(sigdata);
return NULL;
}
return sigdata;


+ 6
- 3
Frameworks/Dumb/dumb/src/it/readamf.c Vedi File

@@ -11,7 +11,7 @@
* readamf.c - Code to read a DSMI AMF module from / / \ \
* an open file. | < / \_
* | \/ /\ /
* By Chris Moeller. \_ / > /
* By Christopher Snowhill. \_ / > /
* | \ / /
* | ' /
* \__/
@@ -536,8 +536,6 @@ static DUMB_IT_SIGDATA *it_amf_load_sigdata(DUMBFILE *f, int *version) {
sigdata->mixing_volume = 48;
sigdata->pan_separation = 128;
_dumb_it_fix_invalid_orders(sigdata);
for (i = 0; i < realntracks; i++) {
if (track[i]) {
free(track[i]);
@@ -547,6 +545,11 @@ static DUMB_IT_SIGDATA *it_amf_load_sigdata(DUMBFILE *f, int *version) {
free(trackmap);
free(orderstotracks);
if (_dumb_it_fix_invalid_orders(sigdata) < 0) {
_dumb_it_unload_sigdata(sigdata);
return NULL;
}
return sigdata;
error_all:


+ 1
- 1
Frameworks/Dumb/dumb/src/it/readany.c Vedi File

@@ -11,7 +11,7 @@
* readany.c - Code to detect and read any of the / / \ \
* module formats supported by DUMB. | < / \_
* | \/ /\ /
* By Chris Moeller. \_ / > /
* By Christopher Snowhill. \_ / > /
* | \ / /
* | ' /
* \__/


+ 1
- 1
Frameworks/Dumb/dumb/src/it/readany2.c Vedi File

@@ -13,7 +13,7 @@
* from an open file and do an initial | \/ /\ /
* run-through. \_ / > /
* | \ / /
* by Chris Moeller. | ' /
* by Christopher Snowhill. | ' /
* \__/
*/


+ 5
- 2
Frameworks/Dumb/dumb/src/it/readasy.c Vedi File

@@ -11,7 +11,7 @@
* readasy.c - Code to read an ASYLUM Music Format / / \ \
* module from an open file. | < / \_
* | \/ /\ /
* By Chris Moeller. \_ / > /
* By Christopher Snowhill. \_ / > /
* | \ / /
* | ' /
* \__/
@@ -314,7 +314,10 @@ static DUMB_IT_SIGDATA *it_asy_load_sigdata(DUMBFILE *f) {
sigdata->channel_pan[i + 3] = 32 - sep;
}
_dumb_it_fix_invalid_orders(sigdata);
if (_dumb_it_fix_invalid_orders(sigdata) < 0) {
_dumb_it_unload_sigdata(sigdata);
return NULL;
}
return sigdata;
}


+ 7
- 2
Frameworks/Dumb/dumb/src/it/readdsmf.c Vedi File

@@ -11,7 +11,7 @@
* readam.c - Code to read a RIFF DSMF module / / \ \
* from a parsed RIFF structure. | < / \_
* | \/ /\ /
* By Chris Moeller. \_ / > /
* By Christopher Snowhill. \_ / > /
* | \ / /
* | ' /
* \__/
@@ -293,6 +293,8 @@ static DUMB_IT_SIGDATA *it_riff_dsmf_load_sigdata(DUMBFILE *f,
sigdata->flags = IT_STEREO | IT_OLD_EFFECTS | IT_COMPATIBLE_GXX;
dumbfile_skip(f, 36 - 28);
sigdata->n_orders = dumbfile_igetw(f);
if (sigdata->n_orders > 1024) // Whoa, nelly.
goto error_usd;
// sigdata->n_samples = ptr[ 38 ] | ( ptr[ 39 ] << 8 ); // whatever
// sigdata->n_patterns = ptr[ 40 ] | ( ptr[ 41 ] << 8 );
dumbfile_skip(f, 42 - 38);
@@ -355,7 +357,10 @@ static DUMB_IT_SIGDATA *it_riff_dsmf_load_sigdata(DUMBFILE *f,
}
}
_dumb_it_fix_invalid_orders(sigdata);
if (_dumb_it_fix_invalid_orders(sigdata) < 0) {
_dumb_it_unload_sigdata(sigdata);
return NULL;
}
return sigdata;


+ 4
- 1
Frameworks/Dumb/dumb/src/it/readmod.c Vedi File

@@ -621,7 +621,10 @@ static DUMB_IT_SIGDATA *it_mod_load_sigdata(DUMBFILE *f, int restrict_) {
sigdata->channel_pan[i + 3] = 32 - sep;
}
_dumb_it_fix_invalid_orders(sigdata);
if (_dumb_it_fix_invalid_orders(sigdata) < 0) {
_dumb_it_unload_sigdata(sigdata);
return NULL;
}
return sigdata;
}


+ 6
- 3
Frameworks/Dumb/dumb/src/it/readmtm.c Vedi File

@@ -11,7 +11,7 @@
* readmtm.c - Code to read a MultiTracker Module / / \ \
* from an open file. | < / \_
* | \/ /\ /
* By Chris Moeller. \_ / > /
* By Christopher Snowhill. \_ / > /
* | \ / /
* | ' /
* \__/
@@ -389,12 +389,15 @@ static DUMB_IT_SIGDATA *it_mtm_load_sigdata(DUMBFILE *f, int *version) {
goto error_fs;
}
_dumb_it_fix_invalid_orders(sigdata);
free(sequence);
free(track);
free(skip_bytes);
if (_dumb_it_fix_invalid_orders(sigdata) < 0) {
_dumb_it_unload_sigdata(sigdata);
return NULL;
}
return sigdata;
error_fc:


+ 5
- 2
Frameworks/Dumb/dumb/src/it/readokt.c Vedi File

@@ -11,7 +11,7 @@
* readokt.c - Code to read an Oktalyzer module / / \ \
* from an open file. | < / \_
* | \/ /\ /
* By Chris Moeller. \_ / > /
* By Christopher Snowhill. \_ / > /
* | \ / /
* | ' /
* \__/
@@ -577,7 +577,10 @@ static DUMB_IT_SIGDATA *it_okt_load_sigdata(DUMBFILE *f) {
memset(sigdata->channel_pan + n_channels, 32,
DUMB_IT_N_CHANNELS - n_channels);
_dumb_it_fix_invalid_orders(sigdata);
if (_dumb_it_fix_invalid_orders(sigdata) < 0) {
_dumb_it_unload_sigdata(sigdata);
return NULL;
}
return sigdata;
}


+ 1
- 1
Frameworks/Dumb/dumb/src/it/readokt2.c Vedi File

@@ -13,7 +13,7 @@
* an initial run-through. | \/ /\ /
* \_ / > /
* | \ / /
* By Chris Moeller. | ' /
* By Christopher Snowhill. | ' /
* \__/
*/


+ 4
- 3
Frameworks/Dumb/dumb/src/it/readoldpsm.c Vedi File

@@ -11,7 +11,7 @@
* readpsm.c - Code to read an old Protracker / / \ \
* Studio module from an open file. | < / \_
* | \/ /\ /
* By Chris Moeller. \_ / > /
* By Christopher Snowhill. \_ / > /
* | \ / /
* | ' /
* \__/
@@ -111,7 +111,7 @@ static int it_old_psm_read_samples(IT_SAMPLE **sample, DUMBFILE *f, int *num) {
} else
smp.finetune = 0;
smp.flags |= IT_SAMPLE_EXISTS;
smp.flags = IT_SAMPLE_EXISTS;
if (flags & 0x41)
continue;
if (flags & 0x20)
@@ -705,7 +705,8 @@ static DUMB_IT_SIGDATA *it_old_psm_load_sigdata(DUMBFILE *f) {
}
}
_dumb_it_fix_invalid_orders(sigdata);
if (_dumb_it_fix_invalid_orders(sigdata) < 0)
goto error_fc;
free(component);


+ 5
- 2
Frameworks/Dumb/dumb/src/it/readpsm.c Vedi File

@@ -11,7 +11,7 @@
* readpsm.c - Code to read a Protracker Studio / / \ \
* module from an open file. | < / \_
* | \/ /\ /
* By Chris Moeller. \_ / > /
* By Christopher Snowhill. \_ / > /
* | \ / /
* | ' /
* \__/
@@ -1062,7 +1062,10 @@ static DUMB_IT_SIGDATA *it_psm_load_sigdata(DUMBFILE *f, int *ver,
free(songchunk);
free_chunks(chunk, n_chunks);
_dumb_it_fix_invalid_orders(sigdata);
if (_dumb_it_fix_invalid_orders(sigdata) < 0) {
_dumb_it_unload_sigdata(sigdata);
return NULL;
}
dumb_it_optimize_orders(sigdata);


+ 6
- 2
Frameworks/Dumb/dumb/src/it/readptm.c Vedi File

@@ -11,7 +11,7 @@
* readptm.c - Code to read a Poly Tracker v2.03 / / \ \
* module from an open file. | < / \_
* | \/ /\ /
* By Chris Moeller. Based on reads3m.c \_ / > /
* By Christopher Snowhill. Based on reads3m.c \_ / > /
* by entheh. | \ / /
* | ' /
* \__/
@@ -352,6 +352,7 @@ static DUMB_IT_SIGDATA *it_ptm_load_sigdata(DUMBFILE *f) {
sigdata->n_patterns = dumbfile_igetw(f);
if (dumbfile_error(f) || sigdata->n_orders <= 0 ||
sigdata->n_orders > 1024 || // Whoa, nelly.
sigdata->n_samples > 255 || sigdata->n_patterns > 128) {
_dumb_it_unload_sigdata(sigdata);
return NULL;
@@ -534,7 +535,10 @@ static DUMB_IT_SIGDATA *it_ptm_load_sigdata(DUMBFILE *f) {
free(buffer);
free(component);
_dumb_it_fix_invalid_orders(sigdata);
if (_dumb_it_fix_invalid_orders(sigdata) < 0) {
_dumb_it_unload_sigdata(sigdata);
return NULL;
}
return sigdata;
}


+ 1
- 1
Frameworks/Dumb/dumb/src/it/readriff.c Vedi File

@@ -12,7 +12,7 @@
* from memory. | < / \_
* | \/ /\ /
* \_ / > /
* By Chris Moeller. | \ / /
* By Christopher Snowhill. | \ / /
* | ' /
* \__/
*/


+ 5
- 1
Frameworks/Dumb/dumb/src/it/reads3m.c Vedi File

@@ -480,6 +480,7 @@ static DUMB_IT_SIGDATA *it_s3m_load_sigdata(DUMBFILE *f, int *cwtv) {
sigdata->n_patterns = dumbfile_igetw(f);
if (dumbfile_error(f) || sigdata->n_orders <= 0 ||
sigdata->n_orders > 1024 || // Whoa, nelly.
sigdata->n_samples > 256 || sigdata->n_patterns > 256) {
_dumb_it_unload_sigdata(sigdata);
return NULL;
@@ -733,7 +734,10 @@ static DUMB_IT_SIGDATA *it_s3m_load_sigdata(DUMBFILE *f, int *cwtv) {
free(buffer);
free(component);
_dumb_it_fix_invalid_orders(sigdata);
if (_dumb_it_fix_invalid_orders(sigdata) < 0) {
_dumb_it_unload_sigdata(sigdata);
return NULL;
}
return sigdata;
}


+ 5
- 2
Frameworks/Dumb/dumb/src/it/readstm.c Vedi File

@@ -11,7 +11,7 @@
* readstm.c - Code to read a ScreamTracker 2 / / \ \
* module from an open file. | < / \_
* | \/ /\ /
* By Chris Moeller. \_ / > /
* By Christopher Snowhill. \_ / > /
* | \ / /
* | ' /
* \__/
@@ -355,7 +355,10 @@ static DUMB_IT_SIGDATA *it_stm_load_sigdata(DUMBFILE *f, int *version) {
}
}
_dumb_it_fix_invalid_orders(sigdata);
if (_dumb_it_fix_invalid_orders(sigdata) < 0) {
_dumb_it_unload_sigdata(sigdata);
return NULL;
}
return sigdata;
}


+ 1
- 1
Frameworks/Dumb/dumb/src/it/readstm2.c Vedi File

@@ -12,7 +12,7 @@
* module from an open file and do an | < / \_
* initial run-through. | \/ /\ /
* \_ / > /
* By Chris Moeller. | \ / /
* By Christopher Snowhill. | \ / /
* | ' /
* \__/
*/


+ 4
- 1
Frameworks/Dumb/dumb/src/it/readxm.c Vedi File

@@ -1252,7 +1252,10 @@ static DUMB_IT_SIGDATA *it_xm_load_sigdata(DUMBFILE *f, int *version) {
memset(sigdata->channel_volume, 64, DUMB_IT_N_CHANNELS);
memset(sigdata->channel_pan, 32, DUMB_IT_N_CHANNELS);
_dumb_it_fix_invalid_orders(sigdata);
if (_dumb_it_fix_invalid_orders(sigdata) < 0) {
_dumb_it_unload_sigdata(sigdata);
return NULL;
}
return sigdata;
}


Loading…
Annulla
Salva