Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

129 lines
4.1 KiB

  1. /*==========================================================================
  2. *
  3. * Copyright (c) 1995 - 1997 Microsoft Corporation. All Rights Reserved.
  4. * Copyright (C) 1994-1995 ATI Technologies Inc. All Rights Reserved.
  5. *
  6. * File: foxbear.h
  7. * Content: main include file
  8. *
  9. ***************************************************************************/
  10. #ifndef __FOXBEAR_INCLUDED__
  11. #define __FOXBEAR_INCLUDED__
  12. //#define WIN32_LEAN_AND_MEAN
  13. #define COBJMACROS
  14. #include <windows.h>
  15. #include <windowsx.h>
  16. #include <mmsystem.h>
  17. #include <ddraw.h>
  18. #include <dsound.h>
  19. #include "strmif.h"
  20. #include "uuids.h"
  21. #include "MMSTREAM.H"
  22. #include "AMSTREAM.H"
  23. #include "DDSTREAM.H"
  24. #include "gfx.h"
  25. #include "fbsound.h"
  26. #include "gameproc.h"
  27. #include "vidsrc.h"
  28. #include "fastfile.h"
  29. #include "dsutil.h"
  30. int getint(char**p, int def);
  31. #define QUOTE(x) #x
  32. #define QQUOTE(y) QUOTE(y)
  33. #define REMIND(str) __FILE__ "(" QQUOTE(__LINE__) "):" str
  34. /*
  35. * keyboard commands
  36. */
  37. enum
  38. {
  39. KEY_STOP = 1,
  40. KEY_DOWN,
  41. KEY_LEFT,
  42. KEY_RIGHT,
  43. KEY_UP,
  44. KEY_JUMP,
  45. KEY_THROW
  46. };
  47. /*
  48. * global data
  49. */
  50. extern LPDIRECTDRAW lpDD;
  51. extern LPDIRECTDRAWSURFACE lpFrontBuffer;
  52. extern LPDIRECTDRAWSURFACE lpBackBuffer;
  53. extern LPDIRECTDRAWSURFACE lpStretchBuffer;
  54. extern LPDIRECTDRAWCLIPPER lpClipper;
  55. extern DWORD lastKey;
  56. extern BOOL bModeX; // we are in a modex mode
  57. extern BOOL bColorFill; // device supports color fill
  58. extern BOOL bTransDest; // we should use dest color key
  59. extern BOOL bColorFill; // device supports color fill
  60. extern int nBufferCount; // buffer count
  61. extern int CmdLineBufferCount; // buffer count
  62. extern BOOL bStretch; // stretch
  63. extern BOOL bFullscreen; // run in fullscreen mode
  64. extern BOOL bStress; // just keep running
  65. extern BOOL bUseEmulation; // dont use HW use SW
  66. extern BOOL bMovie; // Use a movie
  67. extern BOOL bCamera; // Use camera input
  68. extern RECT GameRect; // game is here
  69. extern SIZE GameSize; // game is this size
  70. extern SIZE GameMode; // display mode size
  71. extern UINT GameBPP; // the bpp we want
  72. extern DWORD dwColorKey; // the color key
  73. extern HWND hWndMain; // the foxbear window
  74. extern RECT rcWindow; // where the FoxBear window is.
  75. extern BOOL bIsActive; // we are the active app.
  76. extern BOOL bPaused; //
  77. extern BOOL bWantSound; // Set the default action in DSEnable
  78. extern WCHAR wszMovie[100];
  79. /*
  80. * list of display modes
  81. */
  82. struct {int w, h, bpp;} ModeList[100];
  83. int NumModes;
  84. /*
  85. * map a point that assumes 640x480 to the current game size.
  86. */
  87. #define MapDX(x) (((x) * GameSize.cx) / C_SCREEN_W)
  88. #define MapDY(y) (((y) * GameSize.cy) / C_SCREEN_H)
  89. #define MapX(x) (GameRect.left + MapDX(x))
  90. #define MapY(y) (GameRect.top + MapDY(y))
  91. #define MapRX(x) ((GameSize.cx == C_SCREEN_W) ? x : MapDX(x)+1)
  92. #define MapRY(y) ((GameSize.cy == C_SCREEN_H) ? y : MapDY(y)+1)
  93. void PauseGame(void);
  94. void UnPauseGame(void);
  95. /*
  96. * fn prototypes
  97. */
  98. /* ddraw.c */
  99. extern BOOL DDEnable( void );
  100. extern BOOL DDDisable( BOOL );
  101. extern LPDIRECTDRAWSURFACE DDCreateSurface( DWORD width, DWORD height, BOOL sysmem, BOOL trans );
  102. extern BOOL DDCreateFlippingSurface( void );
  103. extern BOOL DDClear( void );
  104. extern DWORD DDColorMatch(IDirectDrawSurface *pdds, COLORREF rgb);
  105. extern void Splash( void );
  106. extern LPVOID CMemAlloc( UINT cnt, UINT isize );
  107. extern LPVOID MemAlloc( UINT size );
  108. extern void MemFree( LPVOID ptr );
  109. #ifdef DEBUG
  110. extern void __cdecl Msg( LPSTR fmt, ... );
  111. #else
  112. #define Msg ; / ## /
  113. #endif
  114. LPDIRECTDRAWPALETTE ReadPalFile( char *fname );
  115. #endif