--- np2/statsave.c 2003/10/20 06:36:33 1.7 +++ np2/statsave.c 2003/10/24 08:07:33 1.11 @@ -12,14 +12,14 @@ #include "pc9861k.h" #include "mpu98ii.h" #include "board14.h" +#include "bios.h" #include "vram.h" -#include "maketext.h" #include "palettes.h" -#include "font.h" +#include "maketext.h" #include "sound.h" -#include "bios.h" #include "fmboard.h" #include "beep.h" +#include "font.h" #include "fddfile.h" #include "fdd_mtr.h" #include "sxsi.h" @@ -50,7 +50,6 @@ enum { NP2FLAG_EVT, NP2FLAG_GIJ, NP2FLAG_FM, - NP2FLAG_BEEP, NP2FLAG_MIDI, NP2FLAG_DISK }; @@ -73,9 +72,9 @@ typedef struct { int num; } ENUMTBL; -#define PROCID(a, b, c, d) (((d) << 24) | ((c) << 16) | ((b) << 8) | (a)) -#define PROC2NUM(a, b) proc2num(&(a), b, sizeof(b)/sizeof(PROCTBL)) -#define NUM2PROC(a, b) num2proc(&(a), b, sizeof(b)/sizeof(PROCTBL)) +#define PROCID(a, b, c, d) (((d) << 24) + ((c) << 16) + ((b) << 8) + (a)) +#define PROC2NUM(a, b) proc2num(&(a), (b), sizeof(b)/sizeof(PROCTBL)) +#define NUM2PROC(a, b) num2proc(&(a), (b), sizeof(b)/sizeof(PROCTBL)) #include "statsave.tbl" @@ -355,6 +354,7 @@ static int flagload_clock(NP2FFILE *f, c ret = flagload_common(f, t); sound_changeclock(); + beep_changeclock(); return(ret); } @@ -841,6 +841,7 @@ static int flagload_fm(NP2FFILE *f, cons break; default: + saveflg = 0; break; } @@ -1161,7 +1162,6 @@ int statsave_save(const char *filename) switch(np2tbl[i].type) { case NP2FLAG_BIN: case NP2FLAG_CLOCK: - case NP2FLAG_BEEP: ret |= flagsave_common(&f, &np2tbl[i]); break; @@ -1244,6 +1244,7 @@ int statsave_check(const char *filename, if (i < (sizeof(np2tbl)/sizeof(STENTRY))) { switch(np2tbl[i].type) { case NP2FLAG_BIN: + case NP2FLAG_CLOCK: ret |= flagcheck_versize(&f, &np2tbl[i], &e); break; @@ -1251,13 +1252,11 @@ int statsave_check(const char *filename, done = TRUE; break; - case NP2FLAG_CLOCK: case NP2FLAG_DMA: case NP2FLAG_EGC: case NP2FLAG_EXT: case NP2FLAG_EVT: case NP2FLAG_GIJ: - case NP2FLAG_BEEP: #if defined(MIDICH) case NP2FLAG_MIDI: #endif @@ -1322,7 +1321,6 @@ int statsave_load(const char *filename) if (i < (sizeof(np2tbl)/sizeof(STENTRY))) { switch(np2tbl[i].type) { case NP2FLAG_BIN: - case NP2FLAG_BEEP: ret |= flagload_common(&f, &np2tbl[i]); break;