palette.h

Go to the documentation of this file.
00001 
00005 //     $Id: palette.h,v 1.10 2007-07-08 15:25:21 mbickel Exp $
00006 //
00007 //     $Log: not supported by cvs2svn $
00008 //     Revision 1.9  2007/04/13 16:15:54  mbickel
00009 //      Merged ASC2 branch
00010 //
00011 //     Revision 1.7.2.1  2004/10/11 18:14:04  mbickel
00012 //      Converted units to use new graphic system
00013 //      Wrote new blitter
00014 //
00015 //     Revision 1.7  2001/11/05 21:10:42  mbickel
00016 //      Updated palette code
00017 //
00018 //     Revision 1.6  2001/09/20 15:36:09  mbickel
00019 //      New object displaying mode
00020 //
00021 //     Revision 1.5  2001/01/28 20:42:14  mbickel
00022 //      Introduced a new string class, ASCString, which should replace all
00023 //        char* and std::string in the long term
00024 //      Split loadbi3.cpp into 3 different files (graphicselector, graphicset)
00025 //
00026 //     Revision 1.4  2001/01/28 14:04:15  mbickel
00027 //      Some restructuring, documentation and cleanup
00028 //      The resource network functions are now it their own files, the dashboard
00029 //       as well
00030 //      Updated the TODO list
00031 //
00032 //     Revision 1.3  1999/12/28 21:03:15  mbickel
00033 //      Continued Linux port
00034 //      Added KDevelop project files
00035 //
00036 //     Revision 1.2  1999/11/16 03:42:20  tmwilson
00037 //      Added CVS keywords to most of the files.
00038 //      Started porting the code to Linux (ifdef'ing the DOS specific stuff)
00039 //      Wrote replacement routines for kbhit/getch for Linux
00040 //      Cleaned up parts of the code that gcc barfed on (char vs unsigned char)
00041 //      Added autoconf/automake capabilities
00042 //      Added files used by 'automake --gnu'
00043 //
00044 //
00045 /*
00046     This file is part of Advanced Strategic Command; http://www.asc-hq.de
00047     Copyright (C) 1994-2010  Martin Bickel  and  Marc Schellenberger
00048 
00049     This program is free software; you can redistribute it and/or modify
00050     it under the terms of the GNU General Public License as published by
00051     the Free Software Foundation; either version 2 of the License, or
00052     (at your option) any later version.
00053 
00054     This program is distributed in the hope that it will be useful,
00055     but WITHOUT ANY WARRANTY; without even the implied warranty of
00056     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00057     GNU General Public License for more details.
00058 
00059     You should have received a copy of the GNU General Public License
00060     along with this program; see the file COPYING. If not, write to the 
00061     Free Software Foundation, Inc., 59 Temple Place, Suite 330, 
00062     Boston, MA  02111-1307  USA
00063 */
00064 
00065 #ifndef palette_h_included
00066  #define palette_h_included
00067 
00068 #pragma pack(1)
00069 
00070 typedef char tmixbuf[256][256];
00071 typedef tmixbuf* pmixbuf;
00072 typedef char tpixelxlattable[256];
00073 typedef tpixelxlattable* ppixelxlattable; 
00074 typedef char dacpalette256[256][3];
00075 typedef char dacpalettefst[256][4];
00076 
00077 
00078    struct txlattables {
00079              tpixelxlattable nochange;
00080              union {
00081                 struct {
00082                    tpixelxlattable dark05;
00083                    tpixelxlattable dark1;
00084                    tpixelxlattable dark2;
00085                    tpixelxlattable dark3;
00086                    tpixelxlattable light;
00087                    tpixelxlattable light2;
00088                    tpixelxlattable light3;
00089                    tpixelxlattable light4;
00090                 }a;
00091                 tpixelxlattable xl[8];
00092              };
00093           };
00094 
00095    extern txlattables xlattables;
00096 
00097 /*
00098 extern tpixelxlattable nochange;
00099 extern tpixelxlattable dark1;
00100 extern tpixelxlattable dark2;
00101 extern tpixelxlattable light;
00102 */
00103 
00104 // tables storing the color that results when two palette colors are mixed
00105 extern tmixbuf *colormixbuf;
00106 extern char* colormixbufchar;
00107 
00108 
00109 extern dacpalette256 pal;
00110 
00111 extern bool asc_paletteloaded;
00112 extern ppixelxlattable xlatpictgraytable;  
00113 // extern tpixelxlattable bi2asc_color_translation_table;
00114 
00115 #pragma pack()
00116 
00117 #endif

Generated on Mon May 21 01:26:35 2012 for Advanced Strategic Command by  doxygen 1.5.1