home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1999 Spring / macformat-077.iso / Shareware Plus / Development / SpriteWorld 2.2 / SpriteWorld Examples / Split-Screen Scrolling / Split-Screen Demo.h < prev    next >
Encoding:
Text File  |  1998-08-06  |  1.5 KB  |  81 lines  |  [TEXT/CWIE]

  1. ///--------------------------------------------------------------------------------------
  2. // Split-Screen Demo.h
  3. //
  4. // By: Vern Jensen
  5. ///--------------------------------------------------------------------------------------
  6.  
  7.  
  8. #ifndef __WINDOWS__
  9. #include <Windows.h>
  10. #endif
  11.  
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16.  
  17.  
  18. #define kTileWidth                    32
  19. #define kTileHeight                    32
  20.  
  21. #define    kLeftPlayer1Key                0x01        // S
  22. #define    kRightPlayer1Key            0x02        // D      Q  E
  23. #define    kDownPlayer1Key                0x07        // X        S D
  24. #define    kUpPlayer1Key                0x0E        // E         X
  25. #define kShootPlayer1Key            0x0C        // Q
  26.  
  27. #define    kLeftKeyPad                    0x56        // 4
  28. #define    kRightKeyPad                0x58        // 6         8
  29. #define    kDownKeyPad                    0x54        // 2        4 6
  30. #define    kUpKeyPad                    0x5B        // 8         2
  31. #define kShootKeyPad                0x52        // 0       0
  32.  
  33.  
  34. typedef struct KeyStruct
  35. {
  36.     Boolean    up;
  37.     Boolean    right;
  38.     Boolean    down;
  39.     Boolean    left;
  40.     Boolean shoot;
  41. } KeyStruct;
  42.  
  43.  
  44. enum tileIDs
  45. {
  46.     kFirstWallTile = 0,
  47.     kLastWallTile = kFirstWallTile + 79,
  48.     kFirstFloorTile,
  49.     kMainFloorTile,
  50.     kRockFloorTile,
  51.     kMudTile,
  52.     kFirstLavaTile,
  53.     kLastLavaTile = kFirstLavaTile + 4,
  54.     
  55.     kMaxNumTiles
  56. };
  57.  
  58. #define kWallDamageOffset    20
  59.  
  60.  
  61. void    main( void );
  62. void    CreateSpriteWorlds( void );
  63. void    CreateTankSprites( void );
  64. void    SetUpAnimation( void );
  65.  
  66. void    RunAnimation( void );
  67. void    ShutDown( void );
  68.  
  69. SW_FUNC void TileChangeProc(SpriteWorldPtr spriteWorldP);
  70.  
  71. SW_FUNC void ScrollingWorldMoveProc(
  72.     SpriteWorldPtr spriteWorldP,
  73.     SpritePtr followSpriteP);
  74.  
  75. void    UpdateKeys( void );
  76.  
  77.  
  78. #ifdef __cplusplus
  79. }
  80. #endif
  81.