home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Games / ISp Sample / Source / MainWindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-28  |  2.1 KB  |  96 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        MainWindow.h
  3.  
  4.     Contains:    xxx put contents here xxx
  5.  
  6.     Version:    xxx put version here xxx
  7.  
  8.     Copyright:    © 1999 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     File Ownership:
  11.  
  12.         DRI:                xxx put dri here xxx
  13.  
  14.         Other Contact:        xxx put other contact here xxx
  15.  
  16.         Technology:            xxx put technology here xxx
  17.  
  18.     Writers:
  19.  
  20.         (BWS)    Brent Schorsch
  21.  
  22.     Change History (most recent first):
  23.  
  24.        <SP1>      7/1/99    BWS        first checked in
  25. */
  26.  
  27. #ifndef __MAINWINDOW__
  28. #define __MAINWINDOW__
  29.  
  30. //•    ————————————————————————————————————————    Includes
  31.  
  32. #include "ShellWindow.h"
  33. #include "ISp_Sample.h"
  34.  
  35. //•    ————————————————————————————————————————    Public Definitions
  36. //•    ————————————————————————————————————————    Public Types
  37.  
  38. class MainWindow : public ShellWindow
  39. {
  40. private:
  41.  
  42.     Input_GameState        mInputState;
  43.     float                mAngleOfRoll;
  44.     float                mAngleOfPitch;
  45.     float                mAngleOfYaw;
  46.     float                mVelocity;
  47.  
  48.     void AdjustControlPositions(void);
  49.  
  50.     void DrawStringCentered (StringPtr string, SInt16 height);
  51.     void DrawStringLeftJustified (StringPtr string, SInt16 indent, SInt16 height, SInt16 eraseSize);
  52.     void DrawStringRightJustified (StringPtr string, SInt16 indent, SInt16 height, SInt16 eraseSize);
  53.     
  54.     void FixedToString (Fixed inFixed, StringPtr ioString);
  55.     void FloatToString (float inFloat, StringPtr ioString);
  56.     
  57.     float    AdjustAngleByAxisInput (float inCurrentAngle, SInt32 inAxisValue);
  58.     float    AdjustAngleByFixedDelta (float inCurrentAngle, Fixed inDeltaValue);
  59.  
  60. public:
  61.  
  62.     MainWindow();
  63.     ~MainWindow();
  64.  
  65.     virtual void    Update(void);
  66.     virtual OSErr    Grow(const Point inWhere);
  67.     virtual OSErr    Click(const Point inWhere, const short inModifiers);
  68.     virtual OSErr    Close(void);
  69.     virtual void    Idle(void);
  70.     virtual Boolean    Menu(const UInt32 inMenuCommand, const short inModifiers);
  71.     virtual void    Suspend(void);
  72.     virtual void    Resume(void);
  73.  
  74.     void DrawContents(void);
  75.     void DrawValues(void);
  76.  
  77.     void StartGame(void);
  78.     void EndGame(void);
  79.     void TogglePauseGame(void);
  80.     
  81.     void GetWeaponString (SInt16 inWeapon, StringPtr ioString);
  82. };
  83.  
  84. //•    ————————————————————————————————————————    Public Variables
  85. //•    ————————————————————————————————————————    Public Functions
  86.  
  87. #ifdef __cplusplus
  88. extern "C" {
  89. #endif
  90.  
  91. #ifdef __cplusplus
  92. }
  93. #endif
  94.  
  95. #endif
  96.