home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-07-14 | 2.2 KB | 76 lines | [TEXT/CWIE] |
- //• ------------------------------------------------------------------------------------------ •
- //•
- //• Copyright © 1996 Apple Computer, Inc., All Rights Reserved
- //•
- //•
- //• You may incorporate this sample code into your applications without
- //• restriction, though the sample code has been provided "AS IS" and the
- //• responsibility for its operation is 100% yours. However, what you are
- //• not permitted to do is to redistribute the source as "DSC Sample Code"
- //• after having made changes. If you're going to re-distribute the source,
- //• we require that you make it clear in the source that the code was
- //• descended from Apple Sample Code, but that you've made changes.
- //•
- //• Authors:
- //• Chris De Salvo
- //•
- //• ------------------------------------------------------------------------------------------ •
-
- #ifndef __SPACEINVADERS__
- #define __SPACEINVADERS__
-
- //• ------------------------------ Includes
-
- #include "GameObject.h"
- #include "Particles.h"
-
- //• ------------------------------ Public Definitions
-
- #define kNumEnemyRows 5
- #define kNumEnemyColumns 11
-
- #define kNumEnemies (kNumEnemyRows * kNumEnemyColumns)
-
- #define kEnemyMovingRight 1
- #define kEnemyMovingLeft 2
- #define kEnemyDropping 3
-
- //• ------------------------------ Public Types
- //• ------------------------------ Public Variables
-
- extern Boolean gGameInProgress;
- extern Boolean gTwoPlayers;
- extern Boolean gNetPlay;
-
- extern GameObjectPtr gEnemyList;
- extern GameObjectPtr gEnemyShotList;
- extern GameObjectPtr gPlayerList;
- extern GameObjectPtr gGreenPlayerShotList;
- extern GameObjectPtr gRedPlayerShotList;
- extern GameObjectPtr gMiscObjectList;
- extern UInt32 gEnemyTask;
- extern SInt32 gEnemiesChangeDirection;
- extern SInt32 gEnemyVelocity;
- extern UInt32 gNumEnemies;
- extern UInt32 gEnemyLevel;
- extern UInt32 gNumEnemiesProcessed;
- extern UInt32 gNumRedPlayerLives;
- extern UInt32 gNumGreenPlayerLives;
-
- //• ------------------------------ Public Functions
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- extern void InitNewGame(UInt32 wave);
- extern void GameLoop(void);
- extern void PlayerShoot(GameObjectPtr whichPlayer);
- extern void EnemyShoot(GameObjectPtr go);
- extern void AddParticles(short x, short y, ObjectKind kind);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif