Diff for /np2/sound/s98.c between versions 1.2 and 1.3

version 1.2, 2003/10/17 03:52:24 version 1.3, 2003/10/28 18:30:30
Line 12 Line 12
 #include        "s98.h"  #include        "s98.h"
   
   
 #define S98LOG_BUFSIZE (32*1024)  #define S98LOG_BUFSIZE (32 * 1024)
   
 typedef struct {                                                // UINT32は 常に 0fillされてる  typedef struct {
         BYTE    magic[3];          BYTE    magic[3];
         BYTE    formatversion;          BYTE    formatversion;
         UINT32  timerinfo;          BYTE    timerinfo[4];
         UINT32  timerinfo2;          BYTE    timerinfo2[4];
         UINT32  compressing;          BYTE    compressing[4];
         UINT32  offset;          BYTE    offset[4];
         UINT32  dumpdata;          BYTE    dumpdata[4];
         UINT32  looppoint;          BYTE    looppoint[4];
         BYTE    headerreserved[0x24];          BYTE    headerreserved[0x24];
         BYTE    title[0x40];          BYTE    title[0x40];
 } S98HDR;  } S98HDR;
   
 static const S98HDR s98hdr =  
                                         {{'S','9','8'}, '1', 1, 0, 0, 0x40, 0x80, 0, {0}, {0}};  
   
 static struct {  static struct {
         FILEH   fh;          FILEH   fh;
         UINT32  intcount;          UINT32  intcount;
Line 111  void S98_trash(void) { Line 108  void S98_trash(void) {
 BOOL S98_open(const char *filename) {  BOOL S98_open(const char *filename) {
   
         UINT    i;          UINT    i;
           S98HDR  hdr;
   
         // ファイルのオープン          // ファイルのオープン
         s98log.fh = file_create(filename);          s98log.fh = file_create(filename);
Line 123  BOOL S98_open(const char *filename) { Line 121  BOOL S98_open(const char *filename) {
         s98log.p = 0;          s98log.p = 0;
   
         // ヘッダの保存          // ヘッダの保存
         for (i=0; i<sizeof(s98hdr); i++) {          ZeroMemory(&hdr, sizeof(hdr));
                 S98_putc(*(((BYTE *)&s98hdr) + i));          hdr.magic[0] = 'S';
           hdr.magic[1] = '9';
           hdr.magic[2] = '8';
           hdr.formatversion = '1';
           STOREINTELDWORD(hdr.timerinfo, 1);
           STOREINTELDWORD(hdr.offset, offsetof(S98HDR, title));
           STOREINTELDWORD(hdr.dumpdata, sizeof(S98HDR));
           for (i=0; i<sizeof(hdr); i++) {
                   S98_putc(*(((BYTE *)&hdr) + i));
         }          }
   
 #if 0  #if 0

Removed from v.1.2  
changed lines
  Added in v.1.3


RetroPC.NET-CVS <cvs@retropc.net>