cheat_screen.h

Go to the documentation of this file.
00001 /*
00002  *  Copyright (C) 2000-2001  The Exult Team
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00017  */
00018 
00019 #ifndef CHEAT_SCREEN_H
00020 #define CHEAT_SCREEN_H
00021 
00022 class Game_window;
00023 class Image_buffer8;
00024 class Font;
00025 class Game_clock;
00026 class Actor;
00027 
00028 class CheatScreen {
00029   Actor     *grabbed;
00030   static const char *schedules[33];
00031   static const char *flag_names[64];
00032 public:
00033     CheatScreen();
00034     ~CheatScreen();
00035   void  show_screen();
00036   void  SetGrabbedActor (Actor *g) { grabbed = g; }
00037   void  ClearThisGrabbedActor (Actor *g) const { if (g==grabbed) g = 0; }
00038 private:
00039   enum Cheat_Prompt
00040   {
00041     CP_Command = 0,
00042 
00043     CP_HitKey = 1,
00044     CP_NotAvail = 2,
00045     CP_InvalidNPC = 3,
00046     CP_InvalidCom = 4,
00047     CP_Canceled = 5,
00048     CP_ClockSet = 6,
00049     CP_InvalidTime = 7,
00050     CP_InvalidShape = 8,
00051     CP_InvalidValue = 9,
00052     CP_Created = 10,
00053     CP_ShapeSet = 11,
00054     CP_ValueSet = 12,
00055     CP_NameSet = 13,
00056     CP_WrongShapeFile = 14,
00057 
00058     CP_ChooseNPC = 16,
00059     CP_EnterValue = 17,
00060     CP_Minute = 18,
00061     CP_Hour = 19,
00062     CP_Day = 20,
00063     CP_Shape = 21,
00064     CP_Activity = 22,
00065     CP_XCoord = 23,
00066     CP_YCoord = 24,
00067     CP_Lift = 25,
00068     CP_GFlagNum = 26,
00069     CP_NFlagNum = 27,
00070 
00071     CP_Name = 32
00072   };
00073   Game_window* gwin;
00074   Image_buffer8* ibuf;
00075   Font* font;
00076   Game_clock *clock;
00077   int maxx, maxy;
00078   int centerx, centery;
00079   Palette pal;
00080 
00081   void SharedPrompt (char *input, const Cheat_Prompt &mode);
00082   bool SharedInput (char *input, int len, int &command, Cheat_Prompt &mode, bool &activate);
00083 
00084   void NormalLoop();
00085   void NormalDisplay ();
00086   void NormalMenu();
00087   void NormalActivate (char *input, int &command, Cheat_Prompt &mode);
00088   bool NormalCheck (char *input, int &command, Cheat_Prompt &mode, bool &activate);
00089 
00090   void ActivityDisplay ();
00091 
00092   Cheat_Prompt GlobalFlagLoop(int num);
00093 
00094   Cheat_Prompt TimeSetLoop();
00095 
00096   Cheat_Prompt NPCLoop(int num);
00097   void NPCDisplay (Actor *actor, int &num);
00098   void NPCMenu(Actor *actor, int &num);
00099   void NPCActivate (char *input, int &command, Cheat_Prompt &mode, Actor *actor, int &num);
00100   bool NPCCheck (char *input, int &command, Cheat_Prompt &mode, bool &activate, Actor *actor, int &num);
00101 
00102   void FlagLoop(Actor *actor);
00103   void FlagMenu(Actor *actor);
00104   void FlagActivate (char *input, int &command, Cheat_Prompt &mode, Actor *actor);
00105   bool FlagCheck (char *input, int &command, Cheat_Prompt &mode, bool &activate, Actor *actor);
00106   Cheat_Prompt AdvancedFlagLoop(int flagnum, Actor *actor);
00107 
00108   void BusinessLoop(Actor *actor);
00109   void BusinessDisplay (Actor *actor);
00110   void BusinessMenu(Actor *actor);
00111   void BusinessActivate (char *input, int &command, Cheat_Prompt &mode, Actor *actor, int &time, int &prev);
00112   bool BusinessCheck (char *input, int &command, Cheat_Prompt &mode, bool &activate, Actor *actor, int &time);
00113 
00114   void StatLoop(Actor *actor);
00115   void StatMenu(Actor *actor);
00116   void StatActivate (char *input, int &command, Cheat_Prompt &mode, Actor *actor);
00117   bool StatCheck (char *input, int &command, Cheat_Prompt &mode, bool &activate, Actor *actor);
00118 
00119 };
00120 
00121 #endif

Generated on Mon Jul 9 14:42:44 2007 for ExultEngine by  doxygen 1.5.1