Subversion Repositories Games.Carmageddon

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 pmbaty 1
#ifndef WIN95_POLYFILL_TYPES_H
2
#define WIN95_POLYFILL_TYPES_H
3
 
4
#include <stddef.h>
5
#include <stdint.h>
6
 
7
typedef void* HANDLE_;
8
 
9
#ifndef _WIN32 // Pierre-Marie Baty -- include guard
10
 
11
#define GENERIC_READ 0x80000000
12
#define OPEN_EXISTING 3
13
//#define FILE_ATTRIBUTE_NORMAL 0x80 // Pierre-Marie Baty -- avoid multiple definitions
14
#define INVALID_HANDLE_VALUE ((HANDLE_*)-1)
15
#define INVALID_FILE_ATTRIBUTES -1
16
 
17
#define FILE_ATTRIBUTE_READONLY 0x01
18
#define FILE_ATTRIBUTE_NORMAL 0x80
19
 
20
#define HWND_BROADCAST ((void*)0xffff)
21
 
22
#define _CRT_ASSERT 2
23
 
24
#define WM_QUIT 0x0012
25
 
26
#define MB_ICONERROR 0x00000010
27
 
28
#endif // !_WIN32
29
 
30
#define _CRT_ASSERT 2 // Pierre-Marie Baty -- missing one
31
 
32
typedef struct _MEMORYSTATUS_ {
33
    uint32_t dwLength;
34
    uint32_t dwMemoryLoad;
35
    size_t dwTotalPhys;
36
    size_t dwAvailPhys;
37
    size_t dwTotalPageFile;
38
    size_t dwAvailPageFile;
39
    size_t dwTotalVirtual;
40
    size_t dwAvailVirtual;
41
} MEMORYSTATUS_;
42
 
43
typedef struct tagPOINT_ {
44
    long x;
45
    long y;
46
} POINT_;
47
 
48
#pragma pack(push, 1)
49
typedef struct tagPALETTEENTRY_ {
50
    uint8_t peRed;
51
    uint8_t peGreen;
52
    uint8_t peBlue;
53
    uint8_t peFlags;
54
} PALETTEENTRY_;
55
#pragma pack(pop)
56
 
57
typedef struct _WIN32_FIND_DATA_ {
58
    // uint32_t dwFileAttributes;
59
    // FILETIME ftCreationTime;
60
    // FILETIME ftLastAccessTime;
61
    // FILETIME ftLastWriteTime;
62
    // uint32_t nFileSizeHigh;
63
    // uint32_t nFileSizeLow;
64
    // uint32_t dwReserved0;
65
    // uint32_t dwReserved1;
66
    char cFileName[1024];
67
    // char cAlternateFileName[14];
68
} WIN32_FIND_DATAA_;
69
 
70
typedef struct tagMSG_ {
71
    void* hwnd;
72
    unsigned int message;
73
    int wParam;
74
    long lParam;
75
    uint32_t time;
76
    POINT_ pt;
77
    uint32_t lPrivate;
78
} MSG_;
79
 
80
#endif