| 1 | /*************************************************************************** |
| 2 | control.h - description |
| 3 | ------------------- |
| 4 | begin : Tue June 11 2002 |
| 5 | copyright : (C) 2002 by Rick McDaniel |
| 6 | email : [email protected] |
| 7 | $Id: control.h,v 1.3 2003/04/14 05:51:03 mbridak Exp $ |
| 8 | ***************************************************************************/ |
| 9 | |
| 10 | /*************************************************************************** |
| 11 | * * |
| 12 | * This program is free software; you can redistribute it and/or modify * |
| 13 | * it under the terms of the GNU General Public License as published by * |
| 14 | * the Free Software Foundation; either version 2 of the License. * |
| 15 | * . * |
| 16 | * * |
| 17 | ***************************************************************************/ |
| 18 | |
| 19 | #ifndef CONTROL_H |
| 20 | #define CONTROL_H |
| 21 | |
| 22 | |
| 23 | /** |
| 24 | *@author Rick McDaniel |
| 25 | */ |
| 26 | |
| 27 | class Control { |
| 28 | public: |
| 29 | Submarine *Subs; |
| 30 | |
| 31 | SDL_Rect src, dest; |
| 32 | |
| 33 | SDL_Surface *controlscreen; |
| 34 | SDL_Surface *tempscreen; |
| 35 | |
| 36 | SDL_Surface *ClearControl; |
| 37 | |
| 38 | Control(Submarine *temp); |
| 39 | ~Control(); |
| 40 | |
| 41 | bool A13, A23, ASTD, AFULL, AFLK; |
| 42 | bool ASTOP, B13, B23, BSTD, BEMER; |
| 43 | |
| 44 | bool depthup, depthdown; |
| 45 | |
| 46 | void InitGraphics(SDL_Surface *temp, SDL_Surface *tempcontrolscreen); |
| 47 | |
| 48 | void ClearHeading(); |
| 49 | void ClearOrdHeading(); |
| 50 | |
| 51 | |
| 52 | void ClearSpeed(); |
| 53 | void ClearOrdSpeed(); |
| 54 | |
| 55 | void ClearDepth(); |
| 56 | void ClearOrdDepth(); |
| 57 | |
| 58 | void LoadWidgets(); |
| 59 | |
| 60 | void DisplayWidgets(); |
| 61 | |
| 62 | void ToggleBEMER(); |
| 63 | void ToggleBSTD(); |
| 64 | void ToggleB23(); |
| 65 | void ToggleB13(); |
| 66 | void ToggleASTOP(); |
| 67 | void ToggleA13(); |
| 68 | void ToggleA23(); |
| 69 | void ToggleASTD(); |
| 70 | void ToggleAFULL(); |
| 71 | void ToggleAFLK(); |
| 72 | |
| 73 | void Display(); |
| 74 | |
| 75 | void AdjustHeading(int x, int y); |
| 76 | |
| 77 | void AdjustDepth(int x); |
| 78 | |
| 79 | // void DPixel(SDL_Surface *screen, int x, int y, Uint32 color); //rdm not needed |
| 80 | |
| 81 | // void DLine(SDL_Surface *screen, int X1, int Y1, int X2, int Y2, Uint32 Color); //rdm not needed |
| 82 | |
| 83 | private: |
| 84 | |
| 85 | SDL_Surface *screen; |
| 86 | SDL_Surface *STOPoff; |
| 87 | SDL_Surface *STOPon; |
| 88 | SDL_Surface *A13off; |
| 89 | SDL_Surface *A13on; |
| 90 | SDL_Surface *A23off; |
| 91 | SDL_Surface *A23on; |
| 92 | SDL_Surface *ASTDoff; |
| 93 | SDL_Surface *ASTDon; |
| 94 | SDL_Surface *AFULLoff; |
| 95 | SDL_Surface *AFULLon; |
| 96 | SDL_Surface *AFLKoff; |
| 97 | SDL_Surface *AFLKon; |
| 98 | SDL_Surface *depthupoff; |
| 99 | SDL_Surface *depthupon; |
| 100 | SDL_Surface *depthdownoff; |
| 101 | SDL_Surface *depthdownon; |
| 102 | |
| 103 | |
| 104 | int x; |
| 105 | int y; |
| 106 | // Uint32 orange, green, black; //rdm 9/11 not needed |
| 107 | |
| 108 | static char text[120]; |
| 109 | DFont largeFont(const char*, const char *); |
| 110 | DFont fnt(const char*, const char *); |
| 111 | DFont fnt2(const char*, const char *); |
| 112 | |
| 113 | }; |
| 114 | |
| 115 | #endif |