ucc.h

Go to the documentation of this file.
00001 /*
00002  *  Copyright (C) 2001-2002  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 UCC_H
00020 #define UCC_H
00021 
00022 #include <vector>
00023 #include <string>
00024 
00025 class UCc;
00026 
00027 class UCc
00028 {
00029   public:
00030     UCc(const unsigned int offset=0, const unsigned int id=0, const std::vector<unsigned char> &params=std::vector<unsigned char>())
00031        : _id(id), _offset(offset), _params(params), _tagged(false) {};
00032     UCc(const unsigned int id, const std::string &miscstr)
00033        : _id(id), _miscstr(miscstr) {};
00034         //UCc() : _id(0), _offset(0), _tagged(false) {};
00035 
00036     unsigned int               _id;
00037     std::string                _miscstr;
00038     unsigned int               _offset;
00039     std::vector<unsigned char> _params;
00040     std::vector<unsigned int>  _params_parsed;
00041     bool                       _tagged;
00042     std::vector<unsigned int>  _jump_offsets;
00043     
00044     /* A temporary array to hold the items this opcode theoretically popped
00045        from the stack. This should probably go in it's own wrapper class with
00046        the current UCc. */
00047     std::vector<UCc *>    _popped;
00048 };
00049 
00050 class UCOptions
00051 {
00052   public:
00053     UCOptions() : output_extern_header(false), noconf(false),
00054                   rawops(false), autocomment(false),
00055                   uselesscomment(false), verbose(false),
00056                   very_verbose(false),
00057                   ucdebug(false), basic(false),
00058                   output_list(false), output_asm(false),
00059                   output_ucs(false), output_flag(false),
00060                   output_trans_table(false),
00061                   mode_all(false), mode_dis(false),
00062                   force_ext32(false),
00063                   _game(GAME_BG)
00064     {};
00065     
00066     bool game_bg()      const { return _game==GAME_BG; };
00067     bool game_si()      const { return _game==GAME_SI; };
00068     bool game_u8()      const { return _game==GAME_U8; };
00069     
00070     bool output_extern_header;
00071     
00072     bool noconf;
00073     bool rawops;
00074     bool autocomment;
00075     bool uselesscomment;
00076     bool verbose;
00077     bool very_verbose;
00078     bool ucdebug;
00079     bool basic;
00080     
00081     bool output_list;
00082     bool output_asm;
00083     bool output_ucs;
00084     bool output_flag;
00085     bool output_trans_table;
00086     
00087     bool mode_all;
00088     bool mode_dis;
00089     
00090     bool force_ext32; // force ext32 function format output for all functions
00091     
00092   //private:
00093     unsigned int _game;
00094     enum { GAME_BG=1, GAME_SI=2, GAME_U8=3 };
00095 };
00096 
00097 #endif

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