home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-06-05 | 2.4 KB | 107 lines | [TEXT/PJMM] |
- {****************************************************}
- {}
- { BDIntf.p }
- {}
- { Interface file for SAT-TCL Bouncing Demonstration of SAT-TCL. }
- {}
- { Copyright © 1996 by Patrick C Hew. All rights reserved. }
- {}
- {****************************************************}
-
-
- unit BDIntf;
-
- interface
-
- uses
- TCL, GameIntf, SAT, SATTCLIntf, BDGlobals, sBouncer;
-
- const
-
- { Command IDs. }
-
- cmdStart = 3000;
- cmdPause = 3001;
- cmdResume = 3002;
- cmdAbort = 3003;
-
- { Resource IDs. }
-
- PICTColorBackground = 128;
- PICTBWBackground = 129;
-
- WINDBD = 500; { Resource ID for WIND template }
-
-
- {****************************************************}
- {}
- { CBDApp }
- {}
- { Application class for BD. }
- {}
- {****************************************************}
-
- type
- CBDApp = object(CGameApp)
-
- { Initialize an BD Application object. }
- procedure IBDApp;
-
- { Implements a very simple About box. }
- procedure DoCommand (theCommand: longint);
- override;
-
- end; { CBDApp }
-
-
- {****************************************************}
- {}
- { CBDDirector }
- {}
- { Director class for BD. }
- {}
- { Note that when the SAT Pane is not scrolled or shifted in its window, there }
- { is no need to call PrepareForSATRun. }
- {}
- {****************************************************}
-
- type
- CBDDirector = object(CSATDirector)
-
- { Flags for whether we are currently playing or paused. }
- isPlaying, isPaused: Boolean;
-
- { Pointer to the application, to tell it to switch to game mode and back. }
- itsGameApp: CGameApp;
-
- { Initialize an BD Director object. }
- procedure IBDDirector (aSupervisor: CGameApp);
-
- { We reset our private pointer to the application. }
- procedure Free;
- override;
-
- { We build a fixed size window which has one pane , the SAT pane . }
- procedure BuildWindow;
- override;
-
- { Set up the sprites for the bouncer. }
- procedure SetUpSprites;
-
- { Enables the appropriate commands in the Game Menu. }
- procedure UpdateMenus;
- override;
-
- { React to commands to start, pause, resume or abort the game. }
- procedure DoCommand (theCommand: longint);
- override;
-
- { When playing, this is the heart of the game loop. }
- procedure Dawdle (var maxSleep: longint);
- override;
-
- end; { CBDirector }
-
- implementation
-
- end. { BDIntf }