Subversion Repositories Games.Carmageddon

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. #ifndef _POLYFILL_H_
  2. #define _POLYFILL_H_
  3.  
  4. #include "harness/compiler.h"
  5. #include "win95_polyfill_defs.h"
  6. #include <assert.h>
  7. #include <stdarg.h>
  8. #include <stddef.h>
  9. #include <stdint.h>
  10. #include <stdio.h>
  11.  
  12. // All functions have a "_" suffix to avoid collisions with <windows.h>-defined types
  13.  
  14. uint32_t GetFileAttributesA_(char* path);
  15.  
  16. int SetFileAttributesA_(char* lpFileName, uint32_t dwFileAttributes);
  17.  
  18. void* CreateFileA_(
  19.     char* lpFileName,
  20.     uint32_t dwDesiredAccess,
  21.     uint32_t dwShareMode,
  22.     void* lpSecurityAttributes,
  23.     uint32_t dwCreationDisposition,
  24.     uint32_t dwFlagsAndAttributes,
  25.     void* hTemplateFile);
  26.  
  27. uint32_t GetFileSize_(
  28.     void* hFile,
  29.     uint32_t* lpFileSizeHigh);
  30.  
  31. int CloseHandle_(
  32.     void* hObject);
  33.  
  34. void GlobalMemoryStatus_(MEMORYSTATUS_* lpBuffer);
  35.  
  36. int GetCursorPos_(POINT_* lpPoint);
  37.  
  38. int ScreenToClient_(void* hWnd, POINT_* lpPoint);
  39.  
  40. uint32_t timeGetTime_(void);
  41.  
  42. uint32_t GetCurrentDirectoryA_(uint32_t nBufferLength, char* lpBuffer);
  43.  
  44. int SetCurrentDirectoryA_(char* lpPathName);
  45.  
  46. uint32_t GetShortPathNameA_(char* lpszLongPath, char* lpszShortPath, uint32_t cchBuffer);
  47.  
  48. HANDLE_ FindFirstFileA_(char* lpFileName, WIN32_FIND_DATAA_* lpFindFileData);
  49.  
  50. int FindNextFileA_(HANDLE_ hFindFile, WIN32_FIND_DATAA_* lpFindFileData);
  51.  
  52. int FindClose_(HANDLE_ hFindFile);
  53.  
  54. void* CreateWindowExA_(uint32_t dwExStyle, char* lpClassName, char* lpWindowName, uint32_t dwStyle, int X, int Y, int nWidth, int nHeight, void* hWndParent, void* hMenu, void* hInstance, void* lpParam);
  55.  
  56. int SetWindowPos_(void* hWnd, void* hWndInsertAfter, int X, int Y, int cx, int cy, unsigned int uFlags);
  57.  
  58. int ShowCursor_(int bShow);
  59.  
  60. int SendMessageA_(void* hWnd, unsigned int Msg, unsigned int wParam, long lParam);
  61.  
  62. int MessageBoxA_(void* hWnd, char* lpText, char* lpCaption, unsigned int uType);
  63.  
  64. int DestroyWindow_(void* hWnd);
  65.  
  66. HARNESS_NORETURN void ExitProcess_(unsigned int uExitCode);
  67.  
  68. void TranslateMessage_(MSG_* lpMsg);
  69.  
  70. void DispatchMessageA_(MSG_* lpMsg);
  71.  
  72. int PeekMessageA_(MSG_* lpMsg, void* hWnd, unsigned int wMsgFilterMin, unsigned int wMsgFilterMax, unsigned int wRemoveMsg);
  73.  
  74. int GetMessageA_(MSG_* lpMsg, void* hWnd, unsigned int wMsgFilterMin, unsigned int wMsgFilterMax);
  75.  
  76. void Sleep_(uint32_t dwMilliseconds);
  77.  
  78. void DirectDraw_CreateSurface(int width, int height);
  79.  
  80. void DirectDrawDevice_SetPaletteEntries(PALETTEENTRY_* palette, int pFirst_colour, int pCount);
  81.  
  82. void DirectInputDevice_GetDeviceState(unsigned int keys, uint8_t* buffer);
  83.  
  84. void _splitpath_(char* path, char* drive, char* dir, char* fname, char* ext);
  85.  
  86. int _CrtDbgReport_(int reportType, const char* filename, int linenumber, const char* moduleName, const char* format, ...);
  87.  
  88. #endif
  89.