home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the 3D Game Programming Gurus / gurus.iso / Articles / LinkingUpDirectPlay / dpex.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-31  |  1.3 KB  |  59 lines

  1. #define NAME "dpex"
  2. #define TITLE "DirectPlay Example"
  3.  
  4. #define WIN32_LEAN_AND_MEAN
  5.  
  6. #include <windows.h>
  7. #include <windowsx.h>
  8. #include <ddraw.h>
  9. #include <dplay.h>
  10. #include <dplobby.h>
  11. #include <stdlib.h>
  12. #include <stdio.h>
  13. #include <stdarg.h>
  14. #include <mmsystem.h>
  15.  
  16. #include "resource.h"
  17. //#include "ddutil.h"
  18. //#include "ddtools.h"
  19. //#include "utility.h"
  20. //#include "sprites.h"
  21. #include "dptools.h"
  22. //#include "gameutil.h"
  23.  
  24. // Externals
  25.  
  26.  
  27. // Keyboard commands
  28.  
  29. #define KEY_THRUST 0x0001 // Thrust with the "5" key
  30. #define KEY_LEFT   0x0004 // Turn left with left arrow
  31. #define KEY_RIGHT  0x0008 // Turn right with right arrow
  32. #define KEY_FIRE   0x0020 // Fire with space bar
  33.  
  34. #define SYNCKEYS   0x000D
  35.  
  36. // Game constants
  37.  
  38. #define SCREEN_X    639
  39. #define SCREEN_Y    479
  40. #define SHIP_X      ( SCREEN_X - 32 )
  41. #define SHIP_Y      ( SCREEN_Y - 32 )
  42. #define SHOT_X      ( SCREEN_X - 3 )
  43. #define SHOT_Y      ( SCREEN_Y - 3 )
  44.  
  45. #define SAMPLE_RATE        25        // 40 frames per second (ms)
  46. #define SHOTLIFE        2000    // lifetime of shote (ms)
  47. #define SHOTFREQ        500        // time between shots (ms)
  48. #define DISABLEDTIME    4000    // time disabled after hit
  49. #define SYNC_INTERVAL    1000    // time between sync messages
  50. #define INPUT_RATE        25        // 40 times per second (ms)
  51.  
  52.  
  53.  
  54. // Prototypes
  55.  
  56. //BOOL DDInit( void );
  57.  
  58.  
  59.