home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection 1998 Fall: Game Toolkit / Disc.iso / Samples / SprocketExamples / SprocketInvaders / Source / SprocketInvaders.h < prev   
Encoding:
Text File  |  1998-07-14  |  2.2 KB  |  76 lines  |  [TEXT/CWIE]

  1. //•    ------------------------------------------------------------------------------------------    •
  2. //•
  3. //•    Copyright © 1996 Apple Computer, Inc., All Rights Reserved
  4. //•
  5. //•
  6. //•        You may incorporate this sample code into your applications without
  7. //•        restriction, though the sample code has been provided "AS IS" and the
  8. //•        responsibility for its operation is 100% yours.  However, what you are
  9. //•        not permitted to do is to redistribute the source as "DSC Sample Code"
  10. //•        after having made changes. If you're going to re-distribute the source,
  11. //•        we require that you make it clear in the source that the code was
  12. //•        descended from Apple Sample Code, but that you've made changes.
  13. //•
  14. //•        Authors:
  15. //•            Chris De Salvo
  16. //•
  17. //•    ------------------------------------------------------------------------------------------    •
  18.  
  19. #ifndef __SPACEINVADERS__
  20. #define __SPACEINVADERS__
  21.  
  22. //•    ------------------------------    Includes
  23.  
  24. #include "GameObject.h"
  25. #include "Particles.h"
  26.  
  27. //•    ------------------------------    Public Definitions
  28.  
  29. #define kNumEnemyRows                5
  30. #define kNumEnemyColumns            11
  31.  
  32. #define kNumEnemies                    (kNumEnemyRows * kNumEnemyColumns)
  33.  
  34. #define kEnemyMovingRight            1
  35. #define kEnemyMovingLeft            2
  36. #define kEnemyDropping                3
  37.  
  38. //•    ------------------------------    Public Types
  39. //•    ------------------------------    Public Variables
  40.  
  41. extern Boolean gGameInProgress;
  42. extern Boolean gTwoPlayers;
  43. extern Boolean gNetPlay;
  44.  
  45. extern GameObjectPtr gEnemyList;
  46. extern GameObjectPtr gEnemyShotList;
  47. extern GameObjectPtr gPlayerList;
  48. extern GameObjectPtr gGreenPlayerShotList;
  49. extern GameObjectPtr gRedPlayerShotList;
  50. extern GameObjectPtr gMiscObjectList;
  51. extern UInt32 gEnemyTask;
  52. extern SInt32 gEnemiesChangeDirection;
  53. extern SInt32 gEnemyVelocity;
  54. extern UInt32 gNumEnemies;
  55. extern UInt32 gEnemyLevel;
  56. extern UInt32 gNumEnemiesProcessed;
  57. extern UInt32 gNumRedPlayerLives;
  58. extern UInt32 gNumGreenPlayerLives;
  59.  
  60. //•    ------------------------------    Public Functions
  61.  
  62. #ifdef __cplusplus
  63. extern "C" {
  64. #endif
  65.  
  66. extern void InitNewGame(UInt32 wave);
  67. extern void GameLoop(void);
  68. extern void PlayerShoot(GameObjectPtr whichPlayer);
  69. extern void EnemyShoot(GameObjectPtr go);
  70. extern void AddParticles(short x, short y, ObjectKind kind);
  71.  
  72. #ifdef __cplusplus
  73. }
  74. #endif
  75.  
  76. #endif