| version 1.19, 2004/04/20 17:27:18 | version 1.30, 2005/05/15 18:26:47 | 
| Line 2 | Line 2 | 
 | #define _WIN32_IE       0x0200 | #define _WIN32_IE       0x0200 | 
 |  |  | 
 | #include        <windows.h> | #include        <windows.h> | 
 |  | #include        <tchar.h> | 
 | #include        <stdio.h> | #include        <stdio.h> | 
 | #include        <stddef.h> | #include        <stddef.h> | 
 | #include        <setjmp.h> | #include        <setjmp.h> | 
 |  | #if defined(TRACE) | 
 |  | #include        <assert.h> | 
 |  | #endif | 
 |  |  | 
 | #define BYTESEX_LITTLE | #define BYTESEX_LITTLE | 
 |  | #if !defined(OSLANG_UTF8) | 
 |  | #if !defined(_UNICODE) | 
 | #define OSLANG_SJIS | #define OSLANG_SJIS | 
 |  | #else | 
 |  | #define OSLANG_UCS2 | 
 |  | #endif | 
 |  | #endif | 
 | #define OSLINEBREAK_CRLF | #define OSLINEBREAK_CRLF | 
 |  |  | 
 |  |  | 
 | #ifndef __GNUC__ | #ifndef __GNUC__ | 
| typedef signed char                     SINT8; | typedef signed int                      SINT; | 
| typedef unsigned char           UINT8; | typedef signed char                     SINT8; | 
|  | typedef unsigned char           UINT8; | 
 | typedef signed short            SINT16; | typedef signed short            SINT16; | 
 | typedef unsigned short          UINT16; | typedef unsigned short          UINT16; | 
 | typedef signed int                      SINT32; | typedef signed int                      SINT32; | 
 | typedef unsigned int            UINT32; | typedef unsigned int            UINT32; | 
| typedef signed __int64          SINT64; | typedef signed __int64          SINT64; | 
| typedef unsigned __int64        UINT64; | typedef unsigned __int64        UINT64; | 
 | #define INLINE                          __inline | #define INLINE                          __inline | 
 | #define QWORD_CONST(v)          ((UINT64)(v)) | #define QWORD_CONST(v)          ((UINT64)(v)) | 
 | #define SQWORD_CONST(v)         ((SINT64)(v)) | #define SQWORD_CONST(v)         ((SINT64)(v)) | 
| Line 27  typedef unsigned __int64 UINT64; | Line 37  typedef unsigned __int64 UINT64; | 
 | #define vsnprintf                       _vsnprintf | #define vsnprintf                       _vsnprintf | 
 | #else | #else | 
 | #include        <stdlib.h> | #include        <stdlib.h> | 
| typedef signed char                     SINT8; | typedef signed int                      SINT; | 
| typedef unsigned char           UINT8; | typedef signed char                     SINT8; | 
| typedef short                           SINT16; | typedef unsigned char           UINT8; | 
|  | typedef signed short            SINT16; | 
 | typedef unsigned short          UINT16; | typedef unsigned short          UINT16; | 
| typedef int                                     SINT32; | typedef signed int                      SINT32; | 
| typedef signed __int64          SINT64; | typedef signed __int64          SINT64; | 
 | #define INLINE                          inline | #define INLINE                          inline | 
 | #endif | #endif | 
 | #define FASTCALL                        __fastcall | #define FASTCALL                        __fastcall | 
 |  |  | 
 |  | // for x86 | 
 | #define LOADINTELDWORD(a)               (*((UINT32 *)(a))) | #define LOADINTELDWORD(a)               (*((UINT32 *)(a))) | 
 | #define LOADINTELWORD(a)                (*((UINT16 *)(a))) | #define LOADINTELWORD(a)                (*((UINT16 *)(a))) | 
 | #define STOREINTELDWORD(a, b)   *(UINT32 *)(a) = (b) | #define STOREINTELDWORD(a, b)   *(UINT32 *)(a) = (b) | 
 | #define STOREINTELWORD(a, b)    *(UINT16 *)(a) = (b) | #define STOREINTELWORD(a, b)    *(UINT16 *)(a) = (b) | 
 |  |  | 
 |  |  | 
 | #define sigjmp_buf                              jmp_buf | #define sigjmp_buf                              jmp_buf | 
 | #define sigsetjmp(env, mask)    setjmp(env) | #define sigsetjmp(env, mask)    setjmp(env) | 
 | #define siglongjmp(env, val)    longjmp(env, val) | #define siglongjmp(env, val)    longjmp(env, val) | 
| #define msgbox(title, msg)              MessageBox(NULL, msg, title, MB_OK) | #define msgbox(title, msg)              __msgbox(title, msg) | 
|  |  | 
|  | #define STRCALL         __stdcall | 
|  |  | 
|  | #define BRESULT                         UINT8 | 
|  | #if !defined(OSLANG_UTF8) | 
|  | #define OEMCHAR                         TCHAR | 
|  | #define OEMTEXT(string)         _T(string) | 
|  | #define OEMSPRINTF                      wsprintf | 
|  | #define OEMSTRLEN                       lstrlen | 
|  | #else | 
|  | #define OEMCHAR                         char | 
|  | #define OEMTEXT(string)         string | 
|  | #define OEMSPRINTF                      sprintf | 
|  | #define OEMSTRLEN                       strlen | 
|  | #endif | 
 |  |  | 
 |  |  | 
 | #include        "common.h" | #include        "common.h" | 
 |  | #include        "win32sub.h" | 
 | #include        "milstr.h" | #include        "milstr.h" | 
 | #include        "_memory.h" | #include        "_memory.h" | 
 | #include        "rect.h" | #include        "rect.h" | 
| Line 58  typedef signed __int64  SINT64; | Line 85  typedef signed __int64  SINT64; | 
 |  |  | 
 |  |  | 
 | #define GETTICK()                       GetTickCount() | #define GETTICK()                       GetTickCount() | 
| #define SPRINTF                         wsprintf | #if defined(TRACE) | 
|  | #define __ASSERT(s)                     assert(s) | 
|  | #else | 
 | #define __ASSERT(s) | #define __ASSERT(s) | 
 |  | #endif | 
 |  | #if defined(_UNICODE) | 
 |  | #define SPRINTF                         sprintf | 
 |  | #define STRLEN                          strlen | 
 |  | #else | 
 |  | #define SPRINTF                         wsprintf | 
 |  | #define STRLEN                          lstrlen | 
 |  | #endif | 
 |  |  | 
 | #define LABEL                           __declspec(naked) | #define LABEL                           __declspec(naked) | 
| #define RELEASE(x)                      if (x) {(x)->Release(); (x) = NULL;} | #define RELEASE(x)                      if (x) {(x)->Release(); (x) = NULL;} | 
 |  |  | 
 | #define OPNGENX86 | #define OPNGENX86 | 
 | #define VERMOUTH_LIB | #define VERMOUTH_LIB | 
 |  | #define MT32SOUND_DLL | 
 | #define PARTSCALL       __fastcall | #define PARTSCALL       __fastcall | 
 | #define CPUCALL         __fastcall | #define CPUCALL         __fastcall | 
 | #define MEMCALL         __fastcall | #define MEMCALL         __fastcall | 
| #define DMACCALL        __fastcall | #define DMACCALL        __fastcall | 
 | #define IOOUTCALL       __fastcall | #define IOOUTCALL       __fastcall | 
 | #define IOINPCALL       __fastcall | #define IOINPCALL       __fastcall | 
| #define SOUNDCALL       __fastcall | #define SOUNDCALL       __fastcall | 
 | #define VRAMCALL        __fastcall | #define VRAMCALL        __fastcall | 
 | #define SCRNCALL        __fastcall | #define SCRNCALL        __fastcall | 
 |  |  | 
 |  | #if defined(OSLANG_SJIS) | 
 | #define SUPPORT_SJIS | #define SUPPORT_SJIS | 
 |  | #elif defined(OSLANG_UTF8) | 
 |  | #define SUPPORT_UTF8 | 
 |  | #else | 
 |  | #define SUPPORT_ANK | 
 |  | #endif | 
 |  |  | 
 | #define SUPPORT_8BPP | #define SUPPORT_8BPP | 
 | #define SUPPORT_16BPP | #define SUPPORT_16BPP | 
 | #define SUPPORT_24BPP | #define SUPPORT_24BPP | 
 | #define SUPPORT_32BPP | #define SUPPORT_32BPP | 
| #define SUPPORT_NORMALDISP | #define SUPPORT_NORMALDISP | 
 |  |  | 
 | #if defined(SUPPORT_PC9821) | #if defined(SUPPORT_PC9821) | 
 | #define CPUCORE_IA32 | #define CPUCORE_IA32 | 
| #define IA32_PAGING_EACHSIZE | #define IA32_PAGING_EACHSIZE | 
 | #define SUPPORT_CRT31KHZ | #define SUPPORT_CRT31KHZ | 
 | #define SUPPORT_PC9801_119 | #define SUPPORT_PC9801_119 | 
 | #endif | #endif | 
 | #define SUPPORT_CRT15KHZ | #define SUPPORT_CRT15KHZ | 
 | #define SUPPORT_PC9861K | #define SUPPORT_PC9861K | 
| // #define      SUPPORT_SOFTKBD         0 | #define SUPPORT_SOFTKBD         0 | 
 | #define SUPPORT_S98 | #define SUPPORT_S98 | 
 | #define SUPPORT_KEYDISP | #define SUPPORT_KEYDISP | 
 | #define SUPPORT_MEMDBG32 | #define SUPPORT_MEMDBG32 | 
 | #define SUPPORT_HOSTDRV | #define SUPPORT_HOSTDRV | 
 | #define SUPPORT_SASI | #define SUPPORT_SASI | 
 | #define SUPPORT_SCSI | #define SUPPORT_SCSI | 
 |  | #if defined(TRACE) | 
 |  | #define SUPPORT_IDEIO | 
 |  | #endif | 
 |  |  | 
 | #define SUPPORT_RESUME | #define SUPPORT_RESUME | 
 | #define SUPPORT_STATSAVE        10 | #define SUPPORT_STATSAVE        10 | 
| Line 106  typedef signed __int64  SINT64; | Line 153  typedef signed __int64  SINT64; | 
 |  |  | 
 | #define SOUNDRESERVE    20 | #define SOUNDRESERVE    20 | 
 |  |  | 
 |  |  | 
 |  | #define SUPPORT_TEXTCNV | 
 |  |  |