--- np2/sound/s98.c 2003/10/16 17:58:09 1.1.1.1 +++ np2/sound/s98.c 2003/10/28 18:30:30 1.3 @@ -12,24 +12,21 @@ #include "s98.h" -#define S98LOG_BUFSIZE (32*1024) +#define S98LOG_BUFSIZE (32 * 1024) -typedef struct { // UINT32は 常に 0fillされてる +typedef struct { BYTE magic[3]; BYTE formatversion; - UINT32 timerinfo; - UINT32 timerinfo2; - UINT32 compressing; - UINT32 offset; - UINT32 dumpdata; - UINT32 looppoint; + BYTE timerinfo[4]; + BYTE timerinfo2[4]; + BYTE compressing[4]; + BYTE offset[4]; + BYTE dumpdata[4]; + BYTE looppoint[4]; BYTE headerreserved[0x24]; BYTE title[0x40]; } S98HDR; -static const S98HDR s98hdr = - {{'S','9','8'}, '1', 1, 0, 0, 0x40, 0x80, 0, {0}, {0}}; - static struct { FILEH fh; UINT32 intcount; @@ -110,7 +107,8 @@ void S98_trash(void) { BOOL S98_open(const char *filename) { - int i; + UINT i; + S98HDR hdr; // ファイルのオープン s98log.fh = file_create(filename); @@ -123,8 +121,16 @@ BOOL S98_open(const char *filename) { s98log.p = 0; // ヘッダの保存 - for (i=0; i