Source/SprocketInvaders.h

/*
    File:       SprocketInvaders.h
 
    Contains:   xxx put contents here xxx
 
    Version:    xxx put version here xxx
 
    Copyright:  © 1999 by Apple Computer, Inc., all rights reserved.
 
    File Ownership:
 
        DRI:                xxx put dri here xxx
 
        Other Contact:      xxx put other contact here xxx
 
        Technology:         xxx put technology here xxx
 
    Writers:
 
        (cjd)   Chris De Salvo
 
    Change History (most recent first):
 
       <SP5>     1/29/99    cjd     Moved gCDAudio to this file.
*/
 
//¥ ------------------------------------------------------------------------------------------  ¥
//¥
//¥ 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 __SPROCKETINVADERS__
#define __SPROCKETINVADERS__
 
//¥ ------------------------------  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 gCDAudio;
 
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