|
|
| version 1.6, 2003/10/19 16:54:51 | version 1.12, 2003/10/24 10:58:47 |
|---|---|
| Line 12 | Line 12 |
| #include "pc9861k.h" | #include "pc9861k.h" |
| #include "mpu98ii.h" | #include "mpu98ii.h" |
| #include "board14.h" | #include "board14.h" |
| #include "bios.h" | |
| #include "vram.h" | #include "vram.h" |
| #include "maketext.h" | |
| #include "palettes.h" | #include "palettes.h" |
| #include "font.h" | #include "maketext.h" |
| #include "sound.h" | #include "sound.h" |
| #include "bios.h" | |
| #include "fmboard.h" | #include "fmboard.h" |
| #include "beep.h" | #include "beep.h" |
| #include "font.h" | |
| #include "fddfile.h" | #include "fddfile.h" |
| #include "fdd_mtr.h" | #include "fdd_mtr.h" |
| #include "sxsi.h" | #include "sxsi.h" |
| Line 38 typedef struct { | Line 38 typedef struct { |
| char index[10]; | char index[10]; |
| UINT16 ver; | UINT16 ver; |
| UINT32 size; | UINT32 size; |
| } NP2FLAGPART_T; | } NP2FENT; |
| enum { | enum { |
| NP2FLAG_BIN = 0, | NP2FLAG_BIN = 0, |
| NP2FLAG_TERM, | NP2FLAG_TERM, |
| NP2FLAG_CORE, | NP2FLAG_CLOCK, |
| NP2FLAG_DMA, | NP2FLAG_DMA, |
| NP2FLAG_EGC, | NP2FLAG_EGC, |
| NP2FLAG_EXT, | NP2FLAG_EXT, |
| NP2FLAG_EVT, | NP2FLAG_EVT, |
| NP2FLAG_GIJ, | NP2FLAG_GIJ, |
| NP2FLAG_FM, | NP2FLAG_FM, |
| NP2FLAG_BEEP, | |
| NP2FLAG_MIDI, | NP2FLAG_MIDI, |
| NP2FLAG_DISK | NP2FLAG_DISK |
| }; | }; |
| Line 73 typedef struct { | Line 72 typedef struct { |
| int num; | int num; |
| } ENUMTBL; | } ENUMTBL; |
| #define PROCID(a, b, c, d) (((d) << 24) | ((c) << 16) | ((b) << 8) | (a)) | #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 PROC2NUM(a, b) proc2num(&(a), (b), sizeof(b)/sizeof(PROCTBL)) |
| #define NUM2PROC(a, b) num2proc(&(a), b, sizeof(b)/sizeof(PROCTBL)) | #define NUM2PROC(a, b) num2proc(&(a), (b), sizeof(b)/sizeof(PROCTBL)) |
| #include "statsave.tbl" | #include "statsave.tbl" |
| Line 139 static BOOL num2proc(void *func, const P | Line 138 static BOOL num2proc(void *func, const P |
| // ---- | // ---- |
| typedef struct { | typedef struct { |
| FILEH fh; | FILEH fh; |
| long pos; | long pos; |
| long bak; | long bak; |
| long next; | long next; |
| NP2FHDR f; | NP2FHDR f; |
| NP2FLAGPART_T p; | NP2FENT p; |
| } NP2FFILE; | } _NP2FFILE, *NP2FFILE; |
| static int flagopen(NP2FFILE *f, const char *filename, ERR_BUF *e) { | static int flagopen(NP2FFILE f, const char *filename, ERR_BUF *e) { |
| if (f) { | if (f) { |
| f->fh = file_open(filename); | f->fh = file_open(filename); |
| Line 186 static int flagopen(NP2FFILE *f, const c | Line 185 static int flagopen(NP2FFILE *f, const c |
| return(NP2FLAG_FAILURE); | return(NP2FLAG_FAILURE); |
| } | } |
| static int flagcreate(NP2FFILE *f, const char *filename) { | static int flagcreate(NP2FFILE f, const char *filename) { |
| if (f) { | if (f) { |
| f->fh = file_create(filename); | f->fh = file_create(filename); |
| Line 204 static int flagcreate(NP2FFILE *f, const | Line 203 static int flagcreate(NP2FFILE *f, const |
| return(NP2FLAG_FAILURE); | return(NP2FLAG_FAILURE); |
| } | } |
| static int flagload_create(NP2FFILE *f) { | static int flagload_create(NP2FFILE f) { |
| if (f) { | if (f) { |
| ZeroMemory(&f->p, sizeof(NP2FLAGPART_T)); | ZeroMemory(&f->p, sizeof(NP2FENT)); |
| if (f->pos & 15) { | if (f->pos & 15) { |
| f->pos += 15; | f->pos += 15; |
| f->pos &= ~0xf; | f->pos &= ~0xf; |
| Line 215 static int flagload_create(NP2FFILE *f) | Line 214 static int flagload_create(NP2FFILE *f) |
| return(NP2FLAG_FAILURE); | return(NP2FLAG_FAILURE); |
| } | } |
| } | } |
| if (file_read(f->fh, &f->p, sizeof(NP2FLAGPART_T)) | if (file_read(f->fh, &f->p, sizeof(NP2FENT)) != sizeof(NP2FENT)) { |
| != sizeof(NP2FLAGPART_T)) { | |
| return(NP2FLAG_FAILURE); | return(NP2FLAG_FAILURE); |
| } | } |
| f->pos += sizeof(NP2FLAGPART_T); | f->pos += sizeof(NP2FENT); |
| f->next = f->pos + f->p.size; | f->next = f->pos + f->p.size; |
| return(NP2FLAG_SUCCESS); | return(NP2FLAG_SUCCESS); |
| } | } |
| return(NP2FLAG_FAILURE); | return(NP2FLAG_FAILURE); |
| } | } |
| static int flagload_load(NP2FFILE *f, void *buf, UINT size) { | static int flagload_load(NP2FFILE f, void *buf, UINT size) { |
| if (f && buf && size && (file_read(f->fh, buf, size) == size)) { | if (f && buf && size && (file_read(f->fh, buf, size) == size)) { |
| f->pos += size; | f->pos += size; |
| Line 235 static int flagload_load(NP2FFILE *f, vo | Line 233 static int flagload_load(NP2FFILE *f, vo |
| return(NP2FLAG_FAILURE); | return(NP2FLAG_FAILURE); |
| } | } |
| static int flagload_close(NP2FFILE *f) { | static int flagload_close(NP2FFILE f) { |
| if (file_seek(f->fh, f->next, 0) != f->next) { | if (file_seek(f->fh, f->next, 0) != f->next) { |
| return(NP2FLAG_FAILURE); | return(NP2FLAG_FAILURE); |
| Line 244 static int flagload_close(NP2FFILE *f) { | Line 242 static int flagload_close(NP2FFILE *f) { |
| return(NP2FLAG_SUCCESS); | return(NP2FLAG_SUCCESS); |
| } | } |
| static int flagsave_create(NP2FFILE *f, const STENTRY *t) { | static int flagsave_create(NP2FFILE f, const STENTRY *t) { |
| if (f && t) { | if (f && t) { |
| int len; | int len; |
| ZeroMemory(&f->p, sizeof(NP2FLAGPART_T)); | ZeroMemory(&f->p, sizeof(NP2FENT)); |
| if (f->pos & 15) { | if (f->pos & 15) { |
| UINT rem; | UINT rem; |
| rem = 16 - (f->pos & 15); | rem = 16 - (f->pos & 15); |
| Line 267 static int flagsave_create(NP2FFILE *f, | Line 265 static int flagsave_create(NP2FFILE *f, |
| CopyMemory(f->p.index, t->index, len); | CopyMemory(f->p.index, t->index, len); |
| } | } |
| f->p.ver = t->ver; | f->p.ver = t->ver; |
| if (file_write(f->fh, &f->p, sizeof(NP2FLAGPART_T)) | if (file_write(f->fh, &f->p, sizeof(NP2FENT)) != sizeof(NP2FENT)) { |
| != sizeof(NP2FLAGPART_T)) { | |
| return(NP2FLAG_FAILURE); | return(NP2FLAG_FAILURE); |
| } | } |
| f->pos += sizeof(NP2FLAGPART_T); | f->pos += sizeof(NP2FENT); |
| return(NP2FLAG_SUCCESS); | return(NP2FLAG_SUCCESS); |
| } | } |
| return(NP2FLAG_FAILURE); | return(NP2FLAG_FAILURE); |
| } | } |
| static int flagsave_save(NP2FFILE *f, void *buf, UINT size) { | static int flagsave_save(NP2FFILE f, void *buf, UINT size) { |
| if (f && buf && size && (file_write(f->fh, buf, size) == size)) { | if (f && buf && size && (file_write(f->fh, buf, size) == size)) { |
| f->pos += size; | f->pos += size; |
| Line 287 static int flagsave_save(NP2FFILE *f, vo | Line 284 static int flagsave_save(NP2FFILE *f, vo |
| return(NP2FLAG_FAILURE); | return(NP2FLAG_FAILURE); |
| } | } |
| static int flagsave_close(NP2FFILE *f) { | static int flagsave_close(NP2FFILE f) { |
| if (!f) { | if (!f) { |
| goto fs_closeerr; | goto fs_closeerr; |
| Line 295 static int flagsave_close(NP2FFILE *f) { | Line 292 static int flagsave_close(NP2FFILE *f) { |
| if (file_seek(f->fh, f->bak, 0) != f->bak) { | if (file_seek(f->fh, f->bak, 0) != f->bak) { |
| goto fs_closeerr; | goto fs_closeerr; |
| } | } |
| if (file_write(f->fh, &f->p, sizeof(NP2FLAGPART_T)) | if (file_write(f->fh, &f->p, sizeof(NP2FENT)) != sizeof(NP2FENT)) { |
| != sizeof(NP2FLAGPART_T)) { | |
| goto fs_closeerr; | goto fs_closeerr; |
| } | } |
| if (file_seek(f->fh, f->pos, 0) == f->pos) { | if (file_seek(f->fh, f->pos, 0) == f->pos) { |
| Line 307 fs_closeerr: | Line 303 fs_closeerr: |
| return(NP2FLAG_FAILURE); | return(NP2FLAG_FAILURE); |
| } | } |
| static void flagclose(NP2FFILE *f) { | static void flagclose(NP2FFILE f) { |
| if (f) { | if (f) { |
| file_close(f->fh); | file_close(f->fh); |
| Line 317 static void flagclose(NP2FFILE *f) { | Line 313 static void flagclose(NP2FFILE *f) { |
| // ---- | // ---- |
| static int flagsave_term(NP2FFILE *f, const STENTRY *t) { | static int flagsave_term(NP2FFILE f, const STENTRY *t) { |
| int ret; | int ret; |
| Line 329 static int flagsave_term(NP2FFILE *f, co | Line 325 static int flagsave_term(NP2FFILE *f, co |
| // ---- | // ---- |
| static int flagsave_common(NP2FFILE *f, const STENTRY *t) { | static int flagsave_common(NP2FFILE f, const STENTRY *t) { |
| int ret; | int ret; |
| Line 341 static int flagsave_common(NP2FFILE *f, | Line 337 static int flagsave_common(NP2FFILE *f, |
| return(ret); | return(ret); |
| } | } |
| static int flagload_common(NP2FFILE *f, const STENTRY *t) { | static int flagload_common(NP2FFILE f, const STENTRY *t) { |
| return(flagload_load(f, t->arg1, t->arg2)); | return(flagload_load(f, t->arg1, t->arg2)); |
| } | } |
| Line 349 static int flagload_common(NP2FFILE *f, | Line 345 static int flagload_common(NP2FFILE *f, |
| // ----- | // ----- |
| static int flagload_core(NP2FFILE *f, const STENTRY *t) { | static int flagload_clock(NP2FFILE f, const STENTRY *t) { |
| int ret; | int ret; |
| ret = flagload_common(f, t); | ret = flagload_common(f, t); |
| #if 0 | sound_changeclock(); |
| if (opna_rate) { | beep_changeclock(); |
| pc.sampleclock = pc.realclock / opna_rate; | |
| } | |
| else { | |
| pc.sampleclock = 0; | |
| } | |
| #endif | |
| return(ret); | return(ret); |
| } | } |
| // ----- | // ----- |
| static int flagsave_dma(NP2FFILE *f, const STENTRY *t) { | static int flagsave_dma(NP2FFILE f, const STENTRY *t) { |
| int ret; | int ret; |
| int i; | int i; |
| Line 390 static int flagsave_dma(NP2FFILE *f, con | Line 380 static int flagsave_dma(NP2FFILE *f, con |
| return(ret); | return(ret); |
| } | } |
| static int flagload_dma(NP2FFILE *f, const STENTRY *t) { | static int flagload_dma(NP2FFILE f, const STENTRY *t) { |
| int ret; | int ret; |
| int i; | int i; |
| Line 418 static int flagload_dma(NP2FFILE *f, con | Line 408 static int flagload_dma(NP2FFILE *f, con |
| // ----- | // ----- |
| static int flagsave_egc(NP2FFILE *f, const STENTRY *t) { | static int flagsave_egc(NP2FFILE f, const STENTRY *t) { |
| int ret; | int ret; |
| _EGC egcbak; | _EGC egcbak; |
| Line 435 static int flagsave_egc(NP2FFILE *f, con | Line 425 static int flagsave_egc(NP2FFILE *f, con |
| return(ret); | return(ret); |
| } | } |
| static int flagload_egc(NP2FFILE *f, const STENTRY *t) { | static int flagload_egc(NP2FFILE f, const STENTRY *t) { |
| int ret; | int ret; |
| Line 449 static int flagload_egc(NP2FFILE *f, con | Line 439 static int flagload_egc(NP2FFILE *f, con |
| // ----- | // ----- |
| static int flagsave_ext(NP2FFILE *f, const STENTRY *t) { | static int flagsave_ext(NP2FFILE f, const STENTRY *t) { |
| int ret; | int ret; |
| Line 464 static int flagsave_ext(NP2FFILE *f, con | Line 454 static int flagsave_ext(NP2FFILE *f, con |
| return(ret); | return(ret); |
| } | } |
| static int flagload_ext(NP2FFILE *f, const STENTRY *t) { | static int flagload_ext(NP2FFILE f, const STENTRY *t) { |
| int ret; | int ret; |
| int i; | int i; |
| Line 512 typedef struct { | Line 502 typedef struct { |
| NEVENTCB proc; | NEVENTCB proc; |
| } NEVTITEM; | } NEVTITEM; |
| static int nevent_save(NP2FFILE *f, int num) { | static int nevent_save(NP2FFILE f, int num) { |
| NEVTITEM nit; | NEVTITEM nit; |
| UINT i; | UINT i; |
| Line 533 static int nevent_save(NP2FFILE *f, int | Line 523 static int nevent_save(NP2FFILE *f, int |
| return(flagsave_save(f, &nit, sizeof(nit))); | return(flagsave_save(f, &nit, sizeof(nit))); |
| } | } |
| static int flagsave_evt(NP2FFILE *f, const STENTRY *t) { | static int flagsave_evt(NP2FFILE f, const STENTRY *t) { |
| NEVTSAVE nevt; | NEVTSAVE nevt; |
| int ret; | int ret; |
| Line 556 static int flagsave_evt(NP2FFILE *f, con | Line 546 static int flagsave_evt(NP2FFILE *f, con |
| return(ret); | return(ret); |
| } | } |
| static int nevent_load(NP2FFILE *f, UINT *tbl, UINT *pos) { | static int nevent_load(NP2FFILE f, UINT *tbl, UINT *pos) { |
| int ret; | int ret; |
| NEVTITEM nit; | NEVTITEM nit; |
| Line 589 static int nevent_load(NP2FFILE *f, UINT | Line 579 static int nevent_load(NP2FFILE *f, UINT |
| return(ret); | return(ret); |
| } | } |
| static int flagload_evt(NP2FFILE *f, const STENTRY *t) { | static int flagload_evt(NP2FFILE f, const STENTRY *t) { |
| int ret; | int ret; |
| NEVTSAVE nevt; | NEVTSAVE nevt; |
| Line 613 static int flagload_evt(NP2FFILE *f, con | Line 603 static int flagload_evt(NP2FFILE *f, con |
| // ---- | // ---- |
| static int flagsave_gij(NP2FFILE *f, const STENTRY *t) { | static int flagsave_gij(NP2FFILE f, const STENTRY *t) { |
| int ret; | int ret; |
| int i; | int i; |
| Line 634 static int flagsave_gij(NP2FFILE *f, con | Line 624 static int flagsave_gij(NP2FFILE *f, con |
| return(ret); | return(ret); |
| } | } |
| static int flagload_gij(NP2FFILE *f, const STENTRY *t) { | static int flagload_gij(NP2FFILE f, const STENTRY *t) { |
| int ret; | int ret; |
| int i; | int i; |
| Line 675 typedef struct { | Line 665 typedef struct { |
| BYTE extop[4]; | BYTE extop[4]; |
| } OPNKEY; | } OPNKEY; |
| static int flagsave_fm(NP2FFILE *f, const STENTRY *t) { | static int flagsave_fm(NP2FFILE f, const STENTRY *t) { |
| int ret; | int ret; |
| UINT saveflg; | UINT saveflg; |
| Line 790 static void play_psgreg(PSGGEN psg) { | Line 780 static void play_psgreg(PSGGEN psg) { |
| } | } |
| } | } |
| static int flagload_fm(NP2FFILE *f, const STENTRY *t) { | static int flagload_fm(NP2FFILE f, const STENTRY *t) { |
| int ret; | int ret; |
| UINT saveflg; | UINT saveflg; |
| Line 848 static int flagload_fm(NP2FFILE *f, cons | Line 838 static int flagload_fm(NP2FFILE *f, cons |
| break; | break; |
| default: | default: |
| saveflg = 0; | |
| break; | break; |
| } | } |
| Line 926 typedef struct { | Line 917 typedef struct { |
| DOSTIME time; | DOSTIME time; |
| } STATDISK; | } STATDISK; |
| static int disksave(NP2FFILE *f, const char *path, int readonly) { | static int disksave(NP2FFILE f, const char *path, int readonly) { |
| STATDISK st; | STATDISK st; |
| FILEH fh; | FILEH fh; |
| Line 944 static int disksave(NP2FFILE *f, const c | Line 935 static int disksave(NP2FFILE *f, const c |
| return(flagsave_save(f, &st, sizeof(st))); | return(flagsave_save(f, &st, sizeof(st))); |
| } | } |
| static int flagsave_disk(NP2FFILE *f, const STENTRY *t) { | static int flagsave_disk(NP2FFILE f, const STENTRY *t) { |
| int ret; | int ret; |
| BYTE i; | BYTE i; |
| Line 966 static int flagsave_disk(NP2FFILE *f, co | Line 957 static int flagsave_disk(NP2FFILE *f, co |
| return(ret); | return(ret); |
| } | } |
| static int diskcheck(NP2FFILE *f, const char *name, ERR_BUF *e) { | static int diskcheck(NP2FFILE f, const char *name, ERR_BUF *e) { |
| int ret; | int ret; |
| FILEH fh; | FILEH fh; |
| Line 997 static int diskcheck(NP2FFILE *f, const | Line 988 static int diskcheck(NP2FFILE *f, const |
| return(ret); | return(ret); |
| } | } |
| static int flagcheck_disk(NP2FFILE *f, const STENTRY *t, ERR_BUF *e) { | static int flagcheck_disk(NP2FFILE f, const STENTRY *t, ERR_BUF *e) { |
| int ret; | int ret; |
| int i; | int i; |
| Line 1021 static int flagcheck_disk(NP2FFILE *f, c | Line 1012 static int flagcheck_disk(NP2FFILE *f, c |
| return(ret); | return(ret); |
| } | } |
| static int flagload_disk(NP2FFILE *f, const STENTRY *t) { | static int flagload_disk(NP2FFILE f, const STENTRY *t) { |
| int ret; | int ret; |
| BYTE i; | BYTE i; |
| Line 1057 static int flagload_disk(NP2FFILE *f, co | Line 1048 static int flagload_disk(NP2FFILE *f, co |
| // ----- | // ----- |
| #ifdef _MIDICH | #ifdef _MIDICH |
| static int flagsave_midi(NP2FFILE *f, const STENTRY *t) { | static int flagsave_midi(NP2FFILE f, const STENTRY *t) { |
| UINT device; | UINT device; |
| COMMNG cm; | COMMNG cm; |
| Line 1089 static int flagsave_midi(NP2FFILE *f, co | Line 1080 static int flagsave_midi(NP2FFILE *f, co |
| return(ret); | return(ret); |
| } | } |
| static int flagload_midi(NP2FFILE *f, const STENTRY *t) { | static int flagload_midi(NP2FFILE f, const STENTRY *t) { |
| _MIDICH mch[16]; | _MIDICH mch[16]; |
| UINT device; | UINT device; |
| Line 1127 static int flagload_midi(NP2FFILE *f, co | Line 1118 static int flagload_midi(NP2FFILE *f, co |
| // ---- | // ---- |
| static int flagcheck_versize(NP2FFILE *f, const STENTRY *t, ERR_BUF *e) { | static int flagcheck_versize(NP2FFILE f, const STENTRY *t, ERR_BUF *e) { |
| if ((f) && (t)) { | if ((f) && (t)) { |
| if ((f->p.ver == t->ver) && (f->p.size == t->arg2)) { | if ((f->p.ver == t->ver) && (f->p.size == t->arg2)) { |
| Line 1139 static int flagcheck_versize(NP2FFILE *f | Line 1130 static int flagcheck_versize(NP2FFILE *f |
| return(NP2FLAG_FAILURE); | return(NP2FLAG_FAILURE); |
| } | } |
| static int flagcheck_veronly(NP2FFILE *f, const STENTRY *t, ERR_BUF *e) { | static int flagcheck_veronly(NP2FFILE f, const STENTRY *t, ERR_BUF *e) { |
| if ((f) && (t)) { | if ((f) && (t)) { |
| if (f->p.ver == t->ver) { | if (f->p.ver == t->ver) { |
| Line 1156 static int flagcheck_veronly(NP2FFILE *f | Line 1147 static int flagcheck_veronly(NP2FFILE *f |
| int statsave_save(const char *filename) { | int statsave_save(const char *filename) { |
| NP2FFILE f; | _NP2FFILE f; |
| int ret; | int ret; |
| UINT i; | UINT i; |
| Line 1167 int statsave_save(const char *filename) | Line 1158 int statsave_save(const char *filename) |
| for (i=0; i<sizeof(np2tbl)/sizeof(STENTRY); i++) { | for (i=0; i<sizeof(np2tbl)/sizeof(STENTRY); i++) { |
| switch(np2tbl[i].type) { | switch(np2tbl[i].type) { |
| case NP2FLAG_BIN: | case NP2FLAG_BIN: |
| case NP2FLAG_CORE: | case NP2FLAG_CLOCK: |
| case NP2FLAG_BEEP: | |
| ret |= flagsave_common(&f, &np2tbl[i]); | ret |= flagsave_common(&f, &np2tbl[i]); |
| break; | break; |
| Line 1217 int statsave_save(const char *filename) | Line 1207 int statsave_save(const char *filename) |
| int statsave_check(const char *filename, char *buf, int size) { | int statsave_check(const char *filename, char *buf, int size) { |
| NP2FFILE f; | _NP2FFILE f; |
| int ret; | int ret; |
| UINT i; | UINT i; |
| BOOL done; | BOOL done; |
| Line 1251 int statsave_check(const char *filename, | Line 1241 int statsave_check(const char *filename, |
| if (i < (sizeof(np2tbl)/sizeof(STENTRY))) { | if (i < (sizeof(np2tbl)/sizeof(STENTRY))) { |
| switch(np2tbl[i].type) { | switch(np2tbl[i].type) { |
| case NP2FLAG_BIN: | case NP2FLAG_BIN: |
| case NP2FLAG_CLOCK: | |
| ret |= flagcheck_versize(&f, &np2tbl[i], &e); | ret |= flagcheck_versize(&f, &np2tbl[i], &e); |
| break; | break; |
| Line 1258 int statsave_check(const char *filename, | Line 1249 int statsave_check(const char *filename, |
| done = TRUE; | done = TRUE; |
| break; | break; |
| case NP2FLAG_CORE: | |
| case NP2FLAG_DMA: | case NP2FLAG_DMA: |
| case NP2FLAG_EGC: | case NP2FLAG_EGC: |
| case NP2FLAG_EXT: | case NP2FLAG_EXT: |
| case NP2FLAG_EVT: | case NP2FLAG_EVT: |
| case NP2FLAG_GIJ: | case NP2FLAG_GIJ: |
| case NP2FLAG_BEEP: | |
| #if defined(MIDICH) | #if defined(MIDICH) |
| case NP2FLAG_MIDI: | case NP2FLAG_MIDI: |
| #endif | #endif |
| Line 1298 int statsave_check(const char *filename, | Line 1287 int statsave_check(const char *filename, |
| int statsave_load(const char *filename) { | int statsave_load(const char *filename) { |
| NP2FFILE f; | _NP2FFILE f; |
| int ret; | int ret; |
| UINT i; | UINT i; |
| BOOL done; | BOOL done; |
| Line 1329 int statsave_load(const char *filename) | Line 1318 int statsave_load(const char *filename) |
| if (i < (sizeof(np2tbl)/sizeof(STENTRY))) { | if (i < (sizeof(np2tbl)/sizeof(STENTRY))) { |
| switch(np2tbl[i].type) { | switch(np2tbl[i].type) { |
| case NP2FLAG_BIN: | case NP2FLAG_BIN: |
| case NP2FLAG_BEEP: | |
| ret |= flagload_common(&f, &np2tbl[i]); | ret |= flagload_common(&f, &np2tbl[i]); |
| break; | break; |
| Line 1337 int statsave_load(const char *filename) | Line 1325 int statsave_load(const char *filename) |
| done = TRUE; | done = TRUE; |
| break; | break; |
| case NP2FLAG_CORE: | case NP2FLAG_CLOCK: |
| ret |= flagload_core(&f, &np2tbl[i]); | ret |= flagload_clock(&f, &np2tbl[i]); |
| break; | break; |
| case NP2FLAG_DMA: | case NP2FLAG_DMA: |