netpanzer-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netPanzer-CVS] netpanzer/src ChangeLog Lib/Math.cpp Lib/Math.h...


From: Matthias Braun
Subject: [netPanzer-CVS] netpanzer/src ChangeLog Lib/Math.cpp Lib/Math.h...
Date: Wed, 10 Sep 2003 07:26:14 -0400

CVSROOT:        /cvsroot/netpanzer
Module name:    netpanzer
Branch:         
Changes by:     Matthias Braun <address@hidden> 03/09/10 07:26:12

Modified files:
        src            : ChangeLog 
        src/Lib        : Math.cpp Math.hpp Physics.cpp cGrowList.hpp 
        src/Lib/2D     : ColorTable.cpp DigitText.hpp FontSystem2D.cpp 
                         Palette.hpp Span.cpp Span.hpp Surface.cpp 
                         Surface.hpp 
        src/Lib/Particles: ChunkTrajectoryParticle2D.cpp 
                           CloudParticle2D.cpp CraterParticle2D.cpp 
                           FireParticle2D.cpp FireParticleSystem2D.cpp 
                           FlashParticle2D.cpp 
                           GroundExplosionParticle2D.cpp 
                           PuffParticle2D.cpp 
                           SmokingTrajectoryParticle2D.cpp 
                           SmolderParticleSystem2D.cpp 
                           SnowParticle2D.cpp SnowParticleSystem2D.cpp 
                           TemplateExplosionSystem.cpp 
                           TemplateMuzzleSystem.cpp 
                           VectorPuffParticle2D.cpp 
        src/Lib/View   : cButton.cpp cInputField.cpp 
        src/NetPanzer/Classes: SelectionBoxSprite.cpp TileEngine.cpp 
                               UnitBucketArray.cpp 
        src/NetPanzer/Interfaces: ChatInterface.cpp GameConfig.hpp 
                                  GameManager.cpp MouseInterface.hpp 
                                  TileInterface.hpp 
        src/NetPanzer/Port: Wrldsprt.cpp 
        src/NetPanzer/Views: GameViewGlobals.cpp 
        src/NetPanzer/Views/Game: AreYouSureExitView.cpp 
                                  AreYouSureResignView.cpp 
                                  HelpScrollView.cpp MiniRankView.cpp 
                                  ResignView.cpp 
        src/NetPanzer/Views/MainMenu: MenuTemplateView.cpp 
        src/NetPanzer/Views/MainMenu/Multi: 
                                            DirectPlayErrorExceptionView.cpp 
                                            FlagSelectionView.cpp 
                                            GetSessionHostView.cpp 
                                            GetSessionView.cpp 
                                            HostJoinTemplateView.cpp 
                                            IPAddressView.cpp 
                                            JoinView.cpp 
                                            MapSelectionView.cpp 
                                            UnitColorView.cpp 
                                            UnitSelectionView.cpp 
        src/UILib      : UIDraw.hpp 
        src/UILib/SDL  : SDLDraw.cpp 
Removed files:
        src/Stub       : DPlayError.hpp DirectPlay.h WinSockClientList.h 
                         WinsockClient.h WinsockServer.h gapp.hpp 
                         winsockglobals.h 

Log message:
        -more random cleanups
        -more cleanups so that the Stub directory is empty now
        -fixed the bug where the TileEngine didn't correctly draw the last line

Patches:
Index: netpanzer/src/ChangeLog
diff -u netpanzer/src/ChangeLog:1.14 netpanzer/src/ChangeLog:1.15
--- netpanzer/src/ChangeLog:1.14        Tue Sep  9 13:16:11 2003
+++ netpanzer/src/ChangeLog     Wed Sep 10 07:26:06 2003
@@ -1,3 +1,8 @@
+10-Sep-2003 by Matze Braun
+-more random cleanups
+-more cleanups so that the Stub directory is empty now
+-fixed the bug where the TileEngine didn't correctly draw the last line
+
 9-Sep-2003 by Matze Braun
 -worked around issues with the block allocator code for Particl2D (new operator
  is overloaded, but laste C++ draft doesn't allow to return 0 from such an
Index: netpanzer/src/Lib/2D/ColorTable.cpp
diff -u netpanzer/src/Lib/2D/ColorTable.cpp:1.9 
netpanzer/src/Lib/2D/ColorTable.cpp:1.10
--- netpanzer/src/Lib/2D/ColorTable.cpp:1.9     Mon Sep  8 12:46:22 2003
+++ netpanzer/src/Lib/2D/ColorTable.cpp Wed Sep 10 07:26:06 2003
@@ -15,17 +15,15 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-#ifdef WIN32
 #include <config.h>
-#include <io.h>
-#endif
+
 #include "SplitPath.hpp"
 #include "Log.hpp"
 #include "Exception.hpp"
 #include "ColorTable.hpp"
 #include "Palette.hpp"
+#include "Surface.hpp"
 #include "UtilInterface.hpp"
-
 
 char *ColorTable::extension = ".tbl";
 
Index: netpanzer/src/Lib/2D/DigitText.hpp
diff -u netpanzer/src/Lib/2D/DigitText.hpp:1.1 
netpanzer/src/Lib/2D/DigitText.hpp:1.2
--- netpanzer/src/Lib/2D/DigitText.hpp:1.1      Sun Dec  1 12:51:40 2002
+++ netpanzer/src/Lib/2D/DigitText.hpp  Wed Sep 10 07:26:06 2003
@@ -20,7 +20,7 @@
 
 #include "Surface.hpp"
 #include "iXY.hpp"
-
+#include "Color.hpp"
 
 enum DIGIT_BLT_MODES
 {
Index: netpanzer/src/Lib/2D/FontSystem2D.cpp
diff -u netpanzer/src/Lib/2D/FontSystem2D.cpp:1.3 
netpanzer/src/Lib/2D/FontSystem2D.cpp:1.4
--- netpanzer/src/Lib/2D/FontSystem2D.cpp:1.3   Fri Sep  5 22:01:18 2003
+++ netpanzer/src/Lib/2D/FontSystem2D.cpp       Wed Sep 10 07:26:06 2003
@@ -15,11 +15,13 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
-
 #include <config.h>
+
+#include <string.h>
 #include "FontSystem2D.hpp"
 #include "TimerInterface.hpp"
+#include "Palette.hpp"
+#include "Color.hpp"
 
 static FontSystem2D theRealZFontSystem2D(iXY(0, 0), "theRealZFontSystem2D", 
screen, 0.0f, Color::white);
 FontSystem2D *const FontSystem2D::zFontSystem2D = &theRealZFontSystem2D;
Index: netpanzer/src/Lib/2D/Palette.hpp
diff -u netpanzer/src/Lib/2D/Palette.hpp:1.2 
netpanzer/src/Lib/2D/Palette.hpp:1.3
--- netpanzer/src/Lib/2D/Palette.hpp:1.2        Mon Sep  1 16:24:18 2003
+++ netpanzer/src/Lib/2D/Palette.hpp    Wed Sep 10 07:26:06 2003
@@ -25,12 +25,7 @@
 #include "RGBColor.hpp"
 #include "String.hpp"
 
-
-typedef        BYTE PIX; // Used for variable color depths.
-
-
 const size_t PALETTE_LENGTH = 256;
-
 
 //--------------------------------------------------------------------------
 class Palette
Index: netpanzer/src/Lib/2D/Span.cpp
diff -u netpanzer/src/Lib/2D/Span.cpp:1.7 netpanzer/src/Lib/2D/Span.cpp:1.8
--- netpanzer/src/Lib/2D/Span.cpp:1.7   Mon Sep  8 16:29:09 2003
+++ netpanzer/src/Lib/2D/Span.cpp       Wed Sep 10 07:26:06 2003
@@ -15,194 +15,30 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
 #include <config.h>
-#include "Span.hpp"
 
+#include <string.h>
+#include "Span.hpp"
 
 int allowSpanBlitting = 1;
 
 //--------------------------------------------------------------------------
-void bltTransSpan(PIX *dRow, const PIX *sRow, int pixelsPerRow)
-{
-       // XXX not needed at the moment
-       memcpy(dRow, sRow, pixelsPerRow*sizeof(PIX));
-#if 0
-               _asm {
-                       mov edi, [dRow]
-                       mov esi, [sRow]
-                       mov ecx, [pixelsPerRow]
-
-alignMe:
-                       test edi, 3
-                       je aligned
-                       mov al, [esi]
-                       test al, al
-                       jz skipMe1
-                       mov [edi], al
-skipMe1:
-                       inc edi
-                       inc esi
-                       dec ecx
-                       jnz alignMe
-                       jmp spanDone
-allOpaque:
-                       mov [edi-4], edx
-aligned:
-                       sub ecx, 4
-                       jl leftovers
-test4:
-                       mov edx,7EFEFEFFh
-                       mov eax,dword ptr [esi]
-
-                       add edx,eax
-                       add esi, 4
-
-                       xor eax,0FFFFFFFFh
-                       add edi, 4
-
-                       xor eax,edx
-                       mov edx,dword ptr [esi-4]
-
-                       test eax,81010100h
-                       je allOpaque
-
-                       test dl, dl
-                       jz done0
-                       mov [edi-4], dl
-done0:
-
-                       test dh, dh
-                       jz done1
-                       mov [edi-4+1], dh
-done1:
-
-                       shr edx, 16
-                       test dl, dl
-                       jz done2
-                       mov [edi-4+2], dl
-done2:
-
-                       test dh, dh
-                       jz done3
-                       mov [edi-4+3], dh
-done3:
-
-                       sub ecx, 4
-                       jge test4
-                       
-leftovers:
-                       add ecx, 4
-                       jle spanDone
-leftover:
-                       mov al, [esi]
-                       test al, al
-                       jz skipMe2
-                       mov [edi], al
-skipMe2:
-                       inc esi
-                       inc edi
-                       dec ecx
-                       jnz leftover
-
-spanDone:
-               }
-#endif
-
-} // end bltTransSpan
-
-//--------------------------------------------------------------------------
-void bltBlendSpan(PIX *dRow, const PIX *sRow, int pixelsPerRow, const BYTE 
*table)
+void bltBlendSpan(PIX *dRow, const PIX *sRow, size_t pixelsPerRow,
+               const uint8_t *table)
 {
        if (!allowSpanBlitting) { return; } // Remove for release candidate.
 
        for(size_t idx=0;idx<pixelsPerRow;idx++) {
                dRow[idx] = table[ (dRow[idx]<<8)+sRow[idx] ];
-               //dRow[idx] = table[sRow[idx]];
        }
-
-#if 0
-               _asm {
-                       mov edi, [dRow]
-                       mov esi, [sRow]
-                       mov ecx, [pixelsPerRow]
-                       mov ebx, [table]
-
-                       xor eax, eax
-alignMe:
-                       test edi, 3
-                       je aligned
-                       mov al, [esi]
-                       mov ah, [edi]
-                       mov al, [ebx + eax]
-                       mov [edi], al
-                       inc esi
-                       inc edi
-                       dec ecx
-                       jnz alignMe
-                       jmp spanDone
-
-aligned:
-                       sub ecx, 4
-                       jl leftovers
-                       push ebp
-                       mov ebp, ebx
-                       xor ebx, ebx
-do4:
-                       mov al, [esi+2]
-                       mov bl, [esi+3]
-
-                       mov ah, [edi+2]
-                       mov bh, [edi+3]
-
-                       add esi, 4
-                       mov dl, [ebp + eax]
-
-                       add edi, 4
-                       mov dh, [ebp + ebx]
-
-                       shl edx, 16
-                       mov al, [esi-4+0]
-
-                       mov bl, [esi-4+1]
-                       mov ah, [edi-4+0]
-
-                       mov bh, [edi-4+1]
-                       mov dl, [ebp + eax]
-
-                       mov dh, [ebp + ebx]
-                       sub ecx, 4
-
-                       mov [edi-4], edx
-                       jge do4
-                       
-                       mov ebx, ebp
-                       pop ebp
-
-leftovers:
-                       add ecx, 4
-                       jz spanDone
-leftover:
-                       mov al, [esi]
-                       mov ah, [edi]
-                       mov al, [ebx + eax]
-                       mov [edi], al
-                       inc esi
-                       inc edi
-                       dec ecx
-                       jnz leftover
-
-spanDone:
-
-               }
-#endif
-
 } // end bltBlendSpan
 
 //--------------------------------------------------------------------------
-void bltBlendScaleSpan(PIX *dRow, const PIX *sRow, int srcX1FracWithCount, int 
stepAndDecCount, int stepWholePart, const BYTE *table)
+void bltBlendScaleSpan(PIX *dRow, const PIX *sRow, int srcX1FracWithCount, int
+               stepAndDecCount, int stepWholePart, const uint8_t *table)
 {
        if (!allowSpanBlitting) { return; } // Remove for release candidate.
+
        int stepDecPart = stepAndDecCount>>16;
        int stepCount=srcX1FracWithCount>>16;
        for(int i=0;i<srcX1FracWithCount&0xffff;i++) {
@@ -214,91 +50,6 @@
            sRow+=1;
          }       
        }
-       
-#if 0
-               _asm {
-                       mov edi, [dRow]
-                       mov esi, [sRow]
-                       mov ecx, [srcX1FracWithCount];
-                       mov ebx, [table]
-
-                       xor eax, eax
-alignMe:
-                       test edi, 3
-                       je aligned
-                       mov al, [esi]
-                       mov ah, [edi]
-                       mov al, [ebx + eax]
-                       mov [edi], al
-                       inc edi
-                       add ecx, [stepAndDecCount]
-                       adc esi, [stepWholePart]
-                       test ecx, 0ffffh
-                       jnz alignMe
-                       jmp spanDone
-
-aligned:
-                       test ecx, 0fffch
-                       jz leftovers
-do4:
-                       mov al, [esi]
-                       add ecx, [stepAndDecCount]
-
-                       mov ah, [edi+0]
-                       adc esi, [stepWholePart]
-
-                       mov dl, [ebx + eax]
-                       mov al, [esi]
-
-                       add ecx, [stepAndDecCount]
-                       mov ah, [edi+1]
-
-                       adc esi, [stepWholePart]
-                       mov dh, [ebx + eax]
-
-                       shl edx, 16
-                       add edi, 4
-
-                       mov al, [esi]
-                       add ecx, [stepAndDecCount]
-
-                       mov ah, [edi-4+2]
-                       adc esi, [stepWholePart]
-
-                       mov dl, [ebx + eax]
-                       mov al, [esi]
-
-                       mov ah, [edi-4+3]
-                       add ecx, [stepAndDecCount]
-
-                       mov dh, [ebx + eax]
-                       adc esi, [stepWholePart]
-
-                       rol edx, 16
-                       test ecx, 0fffch
-
-                       mov [edi-4], edx
-                       jnz do4
-                       
-leftovers:
-                       test ecx, 0fh
-                       jz spanDone
-leftover:
-                       mov al, [esi]
-                       mov ah, [edi]
-                       mov al, [ebx + eax]
-                       mov [edi], al
-                       inc edi
-                       add ecx, [stepAndDecCount]
-                       adc esi, [stepWholePart]
-                       test ecx, 0fh
-                       jnz leftover
-
-spanDone:
-
-               }
-#endif
-
 } // end bltBlendScaleSpan
 
 //--------------------------------------------------------------------------
@@ -308,68 +59,6 @@
 
        for(size_t idx=0;idx<pixelsPerRow;idx++)
                dRow[idx] = table[dRow[idx]];
-
-#if 0
-               _asm {
-                       mov edi, [dRow]
-                       mov ecx, [pixelsPerRow]
-                       mov esi, [table]
-
-                       xor eax, eax
-alignMe:
-                       test edi, 3
-                       je aligned
-                       mov al, [edi]
-                       mov al, [esi + eax]
-                       mov [edi], al
-                       inc edi
-                       dec ecx
-                       jnz alignMe
-                       jmp spanDone
-
-aligned:
-                       sub ecx, 4
-                       jl leftovers
-                       xor ebx, ebx
-
-                       mov al, [edi+2]
-                       mov bl, [edi+3]
-
-do4:
-                       mov dl, [esi + eax]
-                       mov al, [edi+0]
-
-                       mov dh, [esi + ebx]
-                       mov bl, [edi+1]
-
-                       shl edx, 16
-                       add edi, 4
-
-                       mov dl, [esi + eax]
-                       sub ecx, 4
-
-                       mov al, [edi+2]
-                       mov dh, [esi + ebx]
-
-                       mov bl, [edi+3]
-                       mov [edi-4], edx
-                       jge do4
-                       
-leftovers:
-                       add ecx, 4
-                       jz spanDone
-leftover:
-                       mov al, [edi]
-                       mov al, [esi + eax]
-                       mov [edi], al
-                       inc edi
-                       dec ecx
-                       jnz leftover
-
-spanDone:
-               }
-#endif
-
 } // end bltLookupSpan
 
 //--------------------------------------------------------------------------
@@ -388,78 +77,5 @@
            sRow+=1;
          }       
        }
-
-#if 0
-               _asm {
-                       mov edi, [dRow]
-                       mov esi, [sRow]
-                       mov ecx, [srcX1FracWithCount];
-                       mov edx, [stepAndDecCount]
-                       mov eax, [stepWholePart]
-                       push ebp
-                       mov ebp, eax
-
-
-alignMe:
-                       test edi, 3
-                       je aligned
-                       mov al, [esi]
-                       mov [edi], al
-                       inc edi
-                       add ecx, edx
-                       adc esi, ebp
-                       test ecx, 0ffffh
-                       jnz alignMe
-                       jmp spanDone
-
-aligned:
-                       test ecx, 0fffch
-                       jz leftovers
-do4:
-                       mov al, [esi]
-                       add ecx, edx
-
-                       adc esi, ebp
-                       add ecx, edx
-
-                       mov ah, [esi]
-                       lea edi, [edi+4]
-
-                       adc esi, ebp
-
-                       shl eax, 16
-                       add ecx, edx
-
-                       mov al, [esi]
-                       adc esi, ebp
-
-                       mov ah, [esi]
-                       add ecx, edx
-
-                       adc esi, ebp
-
-                       rol eax, 16
-                       test ecx, 0fffch
-
-                       mov [edi-4], eax
-                       jnz do4
-                       
-leftovers:
-                       test ecx, 0fh
-                       jz spanDone
-leftover:
-                       mov al, [esi]
-                       mov [edi], al
-                       inc edi
-                       add ecx, edx
-                       adc esi, ebp
-                       test ecx, 0fh
-                       jnz leftover
-
-spanDone:
-                       pop ebp
-               }
-#endif
-
 } // end bltScaleSpan
 
Index: netpanzer/src/Lib/2D/Span.hpp
diff -u netpanzer/src/Lib/2D/Span.hpp:1.1 netpanzer/src/Lib/2D/Span.hpp:1.2
--- netpanzer/src/Lib/2D/Span.hpp:1.1   Sun Dec  1 12:51:40 2002
+++ netpanzer/src/Lib/2D/Span.hpp       Wed Sep 10 07:26:06 2003
@@ -22,10 +22,11 @@
 
 extern int allowSpanBlitting; // Used for debugging.
 
-void bltTransSpan(PIX *dRow, const PIX *sRow, int pixelsPerRow);
-void bltBlendSpan(PIX *dRow, const PIX *sRow, int pixelsPerRow, const BYTE 
*table);
-void bltBlendScaleSpan(PIX *dRow, const PIX *sRow, int srcX1FracWithCount, int 
stepAndDecCount, int stepWholePart, const BYTE *table);
-void bltLookupSpan(PIX *dRow, int pixelsPerRow, const PIX *table);
-void bltScaleSpan(PIX *dRow, const PIX *sRow, int srcX1FracWithCount, int 
stepAndDecCount, int stepWholePart);
+void bltBlendSpan(PIX *dRow, const PIX *sRow, size_t pixelsPerRow, const 
uint8_t* table);
+void bltBlendScaleSpan(PIX *dRow, const PIX *sRow, int srcX1FracWithCount,
+               int     stepAndDecCount, int stepWholePart, const uint8_t* 
table);
+void bltLookupSpan(PIX *dRow, size_t pixelsPerRow, const PIX *table);
+void bltScaleSpan(PIX *dRow, const PIX *sRow, int srcX1FracWithCount,
+               int stepAndDecCount, int stepWholePart);
 
 #endif // end __Span_hpp__
Index: netpanzer/src/Lib/2D/Surface.cpp
diff -u netpanzer/src/Lib/2D/Surface.cpp:1.15 
netpanzer/src/Lib/2D/Surface.cpp:1.16
--- netpanzer/src/Lib/2D/Surface.cpp:1.15       Tue Sep  9 13:16:12 2003
+++ netpanzer/src/Lib/2D/Surface.cpp    Wed Sep 10 07:26:06 2003
@@ -23,9 +23,9 @@
 #include "UtilInterface.hpp"
 #include "cGrowList.hpp"
 #include "fXY.hpp"
-#include "gapp.hpp"
 #include "TimerInterface.hpp"
 #include "Span.hpp"
+#include "Palette.hpp"
 #include "Exception.hpp"
 
 using std::swap;
@@ -1961,7 +1961,7 @@
        assert(mem        != 0);
        assert(source.mem != 0);
 
-       int pixelsPerRow = max.x-min.x;
+       size_t pixelsPerRow = max.x-min.x;
        int numRows      = max.y-min.y;
 
        int srcX1 = 0;
@@ -2672,9 +2672,9 @@
 
 // loadTIL
 //---------------------------------------------------------------------------
-int Surface::loadTIL(String filename)
+int Surface::loadTIL(const char* filename)
 {
-       FILE *fp = fopen((const char *) filename, "rb");
+       FILE *fp = fopen(filename, "rb");
        
        if (fp == 0)
        {
@@ -5033,7 +5033,7 @@
 //--------------------------------------------------------------------------
 // Purpose: Maps this image from the specified palette to the current palette.
 //--------------------------------------------------------------------------
-void Surface::mapFromPalette(String oldPalette)
+void Surface::mapFromPalette(const char* oldPalette)
 {
        // Load the source palette.
        BYTE     bestFitArray[256];
Index: netpanzer/src/Lib/2D/Surface.hpp
diff -u netpanzer/src/Lib/2D/Surface.hpp:1.4 
netpanzer/src/Lib/2D/Surface.hpp:1.5
--- netpanzer/src/Lib/2D/Surface.hpp:1.4        Tue Sep  9 13:16:12 2003
+++ netpanzer/src/Lib/2D/Surface.hpp    Wed Sep 10 07:26:06 2003
@@ -18,10 +18,16 @@
 #ifndef __Surface_hpp__
 #define __Surface_hpp__
 
+#include <assert.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdio.h>
 #include "iXY.hpp"
 #include "iRect.hpp"
-#include "Palette.hpp"
-#include "String.hpp"
+
+class ColorTable;
+class Palette;
+typedef uint8_t PIX;
 
 // This must be called before any of the string blitting functions are used.
 void initFont();
@@ -52,23 +58,23 @@
 class FletchTileHeader
 {
 public:
-       BYTE    minVer;    // Version number
-       BYTE    majVer;    // Version number
-       WORD    headSize;  // Size (in bytes) of header.  Also offset of data
-       DWORD   xSize;     // Horizontal pixel count
-       DWORD   ySize;     // Vertical pixel count
-       DWORD   frameCount; // Number of frames
-       BYTE    avgR;      // Average color in 24-bit format
-       BYTE    avgG;      // .
-       BYTE    avgB;      // .
-       BYTE    avgIndex;  // Closest palette entry to the average color
+       uint8_t    minVer;    // Version number
+       uint8_t    majVer;    // Version number
+       uint16_t   headSize;  // Size (in bytes) of header.  Also offset of data
+       uint32_t   xSize;     // Horizontal pixel count
+       uint32_t   ySize;     // Vertical pixel count
+       uint32_t   frameCount; // Number of frames
+       uint8_t    avgR;      // Average color in 24-bit format
+       uint8_t    avgG;      // .
+       uint8_t    avgB;      // .
+       uint8_t    avgIndex;  // Closest palette entry to the average color
 } __attribute__((packed)); // end FletchTileHeader
 
 //struct PIC_HEAD
 //{
-//     DWORD xPix;         // Horizontal pixel count.
-//     DWORD yPix;         // Vertical pixel count.
-//     DWORD frameCount;    // Number of frames.
+//     uint32_t xPix;         // Horizontal pixel count.
+//     uint32_t yPix;         // Vertical pixel count.
+//     uint32_t frameCount;    // Number of frames.
 //} __attribute__((packed));
 
 #ifdef MSVC
@@ -386,7 +392,7 @@
        int  saveRAW(const char *filename) const;
        void saveRAW(FILE *fp) const;
        bool saveRAW();
-       virtual int  loadTIL(String filename);
+       virtual int  loadTIL(const char* filename);
        virtual void loadTIL(FILE *fp);
        int  saveTIL(const char *filename);
        void saveTIL(FILE *fp);
@@ -515,7 +521,7 @@
     void saveBMP(FILE *fp, Palette &pal );
     int  saveBMP( const char *filename, Palette &pal ); 
 
-       void mapFromPalette(String oldPalette);
+       void mapFromPalette(const char* oldPalette);
 
        void drawBoxCorners(const iRect &rect, int cornerLength, PIX color) 
const;
        inline void drawBoxCorners(const iXY &min, const iXY &max, int 
cornerLength, PIX color) const
Index: netpanzer/src/Lib/Math.cpp
diff -u netpanzer/src/Lib/Math.cpp:1.3 netpanzer/src/Lib/Math.cpp:1.4
--- netpanzer/src/Lib/Math.cpp:1.3      Fri Sep  5 22:01:17 2003
+++ netpanzer/src/Lib/Math.cpp  Wed Sep 10 07:26:06 2003
@@ -31,7 +31,7 @@
 //--------------------------------------------------------------------------
 int Math::rad2Deg(float radian)
 {
-       return int(radian * rad2DegConversion);
+       return int(radian * (180.0 / M_PI));
 
 } // end Math::rad2Deg
 
@@ -41,7 +41,7 @@
 //--------------------------------------------------------------------------
 float Math::deg2Rad(int degree)
 {
-       return degree * deg2RadConversion;
+       return degree * (M_PI / 180.0);
 
 } // end Math::deg2Rad
 
@@ -101,7 +101,7 @@
 {
        float angle = radAngle(northDirection.x, northDirection.y);
 
-       angle += PI_DIV_2;
+       angle += M_PI / 2.0;
 
        return unitDirection(angle);
 
@@ -113,7 +113,7 @@
 {
        float angle = radAngle(northDirection.x, northDirection.y);
 
-       angle -= PI_DIV_2;
+       angle -= M_PI / 2.0;
 
        return unitDirection(angle);
 
@@ -141,7 +141,7 @@
 
 // init
 //--------------------------------------------------------------------------
-void Math::init()
+Math::Math()
 {
        for (int i = 0; i <= 360; i++)
        {
@@ -150,5 +150,6 @@
                cosTable[i] = cos(radians);
                sinTable[i] = sin(radians);
        }
-
 } // end Math::init
+
+Math math;
Index: netpanzer/src/Lib/Math.hpp
diff -u netpanzer/src/Lib/Math.hpp:1.2 netpanzer/src/Lib/Math.hpp:1.3
--- netpanzer/src/Lib/Math.hpp:1.2      Mon Sep  1 16:24:18 2003
+++ netpanzer/src/Lib/Math.hpp  Wed Sep 10 07:26:06 2003
@@ -27,10 +27,6 @@
 #define        M_PI 3.14159265358979323846
 #endif
 
-const  double PI_DIV_2          = M_PI / 2.0;
-const  double deg2RadConversion = M_PI / 180.0;
-const  double rad2DegConversion = 180.0 / M_PI;
-
 //--------------------------------------------------------------------------
 class Math
 {
@@ -39,6 +35,8 @@
        static float sinTable[360 + 1];
 
 public:
+       Math();
+
        static int   rad2Deg(float radian);
        static float deg2Rad(int degree);
        static float radAngle(const iXY &a, const iXY &b);
@@ -54,7 +52,8 @@
        static float getSin(int angle);
        
        static void init();
-
 }; // end Math
+
+extern Math math;
 
 #endif // end __Math_hpp__
Index: netpanzer/src/Lib/Particles/ChunkTrajectoryParticle2D.cpp
diff -u netpanzer/src/Lib/Particles/ChunkTrajectoryParticle2D.cpp:1.5 
netpanzer/src/Lib/Particles/ChunkTrajectoryParticle2D.cpp:1.6
--- netpanzer/src/Lib/Particles/ChunkTrajectoryParticle2D.cpp:1.5       Tue Sep 
 9 13:16:12 2003
+++ netpanzer/src/Lib/Particles/ChunkTrajectoryParticle2D.cpp   Wed Sep 10 
07:26:07 2003
@@ -15,8 +15,8 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
 #include <config.h>
+
 #include "ChunkTrajectoryParticle2D.hpp"
 #include "TimerInterface.hpp"
 #include "PuffParticle2D.hpp"
@@ -147,7 +147,10 @@
 
                if (smokeCurWait > smokeWaitTime)
                {
-                       new PuffParticle2D(fXYZ(pos.x, pos.y, pos.z - arcYPix), 
fXYZ(pos.x - arcYPix, pos.y, pos.z), particleType, scaleMin, scaleRand, 
smokeFPSMin, smokeFPSRand, smokeLayer, smokeShadowLayer, smokeWindScale, 
isFarAway);
+                       try {
+                               new PuffParticle2D(fXYZ(pos.x, pos.y, pos.z - 
arcYPix), fXYZ(pos.x - arcYPix, pos.y, pos.z), particleType, scaleMin, 
scaleRand, smokeFPSMin, smokeFPSRand, smokeLayer, smokeShadowLayer, 
smokeWindScale, isFarAway);
+                       } catch(...) {
+                       }
                        
                        smokeWaitTime = (float(rand()) / float(RAND_MAX)) * 
waitRand + waitMin;
                        
Index: netpanzer/src/Lib/Particles/CloudParticle2D.cpp
diff -u netpanzer/src/Lib/Particles/CloudParticle2D.cpp:1.6 
netpanzer/src/Lib/Particles/CloudParticle2D.cpp:1.7
--- netpanzer/src/Lib/Particles/CloudParticle2D.cpp:1.6 Mon Sep  8 11:32:04 2003
+++ netpanzer/src/Lib/Particles/CloudParticle2D.cpp     Wed Sep 10 07:26:07 2003
@@ -22,6 +22,7 @@
 #include "PackedSurface.hpp"
 #include "GameConfig.hpp"
 #include "Exception.hpp"
+#include "Palette.hpp"
 #include "Sprite.hpp"
 
 
Index: netpanzer/src/Lib/Particles/CraterParticle2D.cpp
diff -u netpanzer/src/Lib/Particles/CraterParticle2D.cpp:1.4 
netpanzer/src/Lib/Particles/CraterParticle2D.cpp:1.5
--- netpanzer/src/Lib/Particles/CraterParticle2D.cpp:1.4        Sat Sep  6 
11:39:24 2003
+++ netpanzer/src/Lib/Particles/CraterParticle2D.cpp    Wed Sep 10 07:26:07 2003
@@ -15,12 +15,12 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
 #include <config.h>
+
 #include "CraterParticle2D.hpp"
 #include "UtilInterface.hpp"
 #include "ConsoleInterface.hpp"
-
+#include "Palette.hpp"
 
 // Set to 1 for divide by zero issues.
 int CraterParticle2D::cacheHitCount  = 1;
Index: netpanzer/src/Lib/Particles/FireParticle2D.cpp
diff -u netpanzer/src/Lib/Particles/FireParticle2D.cpp:1.5 
netpanzer/src/Lib/Particles/FireParticle2D.cpp:1.6
--- netpanzer/src/Lib/Particles/FireParticle2D.cpp:1.5  Sun Sep  7 16:49:02 2003
+++ netpanzer/src/Lib/Particles/FireParticle2D.cpp      Wed Sep 10 07:26:07 2003
@@ -15,10 +15,11 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
 #include <config.h>
+
 #include "FireParticle2D.hpp"
 #include "TimerInterface.hpp"
+#include "Color.hpp"
 
 void FireParticle2D::reset()
 {
Index: netpanzer/src/Lib/Particles/FireParticleSystem2D.cpp
diff -u netpanzer/src/Lib/Particles/FireParticleSystem2D.cpp:1.4 
netpanzer/src/Lib/Particles/FireParticleSystem2D.cpp:1.5
--- netpanzer/src/Lib/Particles/FireParticleSystem2D.cpp:1.4    Sat Sep  6 
11:18:18 2003
+++ netpanzer/src/Lib/Particles/FireParticleSystem2D.cpp        Wed Sep 10 
07:26:07 2003
@@ -20,6 +20,7 @@
 #include "Log.hpp"
 #include "FireParticleSystem2D.hpp"
 #include "TimerInterface.hpp"
+#include "Palette.hpp"
 
 BYTE FireParticleSystem2D::fireColor[12];
 
Index: netpanzer/src/Lib/Particles/FlashParticle2D.cpp
diff -u netpanzer/src/Lib/Particles/FlashParticle2D.cpp:1.6 
netpanzer/src/Lib/Particles/FlashParticle2D.cpp:1.7
--- netpanzer/src/Lib/Particles/FlashParticle2D.cpp:1.6 Mon Sep  8 17:25:08 2003
+++ netpanzer/src/Lib/Particles/FlashParticle2D.cpp     Wed Sep 10 07:26:07 2003
@@ -20,6 +20,7 @@
 #include "Exception.hpp"
 #include "FlashParticle2D.hpp"
 #include "UtilInterface.hpp"
+#include "Palette.hpp"
 
 PackedSurface FlashParticle2D::staticPackedFlash;
 
Index: netpanzer/src/Lib/Particles/GroundExplosionParticle2D.cpp
diff -u netpanzer/src/Lib/Particles/GroundExplosionParticle2D.cpp:1.5 
netpanzer/src/Lib/Particles/GroundExplosionParticle2D.cpp:1.6
--- netpanzer/src/Lib/Particles/GroundExplosionParticle2D.cpp:1.5       Sat Sep 
 6 11:39:24 2003
+++ netpanzer/src/Lib/Particles/GroundExplosionParticle2D.cpp   Wed Sep 10 
07:26:07 2003
@@ -19,6 +19,7 @@
 
 #include "Log.hpp"
 #include "GroundExplosionParticle2D.hpp"
+#include "Color.hpp"
 
 Surface GroundExplosionParticle2D::groundParticleSprite0;
 
Index: netpanzer/src/Lib/Particles/PuffParticle2D.cpp
diff -u netpanzer/src/Lib/Particles/PuffParticle2D.cpp:1.5 
netpanzer/src/Lib/Particles/PuffParticle2D.cpp:1.6
--- netpanzer/src/Lib/Particles/PuffParticle2D.cpp:1.5  Sun Sep  7 16:49:02 2003
+++ netpanzer/src/Lib/Particles/PuffParticle2D.cpp      Wed Sep 10 07:26:07 2003
@@ -23,6 +23,7 @@
 #include "ParticleSystemGlobals.hpp"
 #include "UtilInterface.hpp"
 #include "Exception.hpp"
+#include "Palette.hpp"
 #include "GameConfig.hpp"
 
 
Index: netpanzer/src/Lib/Particles/SmokingTrajectoryParticle2D.cpp
diff -u netpanzer/src/Lib/Particles/SmokingTrajectoryParticle2D.cpp:1.4 
netpanzer/src/Lib/Particles/SmokingTrajectoryParticle2D.cpp:1.5
--- netpanzer/src/Lib/Particles/SmokingTrajectoryParticle2D.cpp:1.4     Tue Sep 
 9 13:16:12 2003
+++ netpanzer/src/Lib/Particles/SmokingTrajectoryParticle2D.cpp Wed Sep 10 
07:26:07 2003
@@ -15,8 +15,8 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
 #include <config.h>
+
 #include "SmokingTrajectoryParticle2D.hpp"
 #include "TimerInterface.hpp"
 
Index: netpanzer/src/Lib/Particles/SmolderParticleSystem2D.cpp
diff -u netpanzer/src/Lib/Particles/SmolderParticleSystem2D.cpp:1.3 
netpanzer/src/Lib/Particles/SmolderParticleSystem2D.cpp:1.4
--- netpanzer/src/Lib/Particles/SmolderParticleSystem2D.cpp:1.3 Fri Sep  5 
22:01:18 2003
+++ netpanzer/src/Lib/Particles/SmolderParticleSystem2D.cpp     Wed Sep 10 
07:26:07 2003
@@ -15,8 +15,8 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
 #include <config.h>
+
 #include "SmolderParticleSystem2D.hpp"
 #include "TimerInterface.hpp"
 
@@ -81,7 +81,10 @@
                        }
                        
                        // Generate a new smolder particle.
-                       new PuffParticle2D(offset, particleType, 0.0f, 1.0f, 
smokeFPSMin, smokeFPSRand, smokeLayer, smokeShadowLayer, smokeWindScale, 
Particle2D::getFarAway(offset));
+                       try {
+                               new PuffParticle2D(offset, particleType, 0.0f, 
1.0f, smokeFPSMin, smokeFPSRand, smokeLayer, smokeShadowLayer, smokeWindScale, 
Particle2D::getFarAway(offset));
+                       } catch(...) {
+                       }
 
                        waitTime = 0.0f;
                }
Index: netpanzer/src/Lib/Particles/SnowParticle2D.cpp
diff -u netpanzer/src/Lib/Particles/SnowParticle2D.cpp:1.4 
netpanzer/src/Lib/Particles/SnowParticle2D.cpp:1.5
--- netpanzer/src/Lib/Particles/SnowParticle2D.cpp:1.4  Sat Sep  6 11:18:18 2003
+++ netpanzer/src/Lib/Particles/SnowParticle2D.cpp      Wed Sep 10 07:26:07 2003
@@ -19,6 +19,7 @@
 #include <config.h>
 
 #include "Log.hpp"
+#include "Color.hpp"
 #include "SnowParticle2D.hpp"
 
 class SnowParticleSystem2D;
Index: netpanzer/src/Lib/Particles/SnowParticleSystem2D.cpp
diff -u netpanzer/src/Lib/Particles/SnowParticleSystem2D.cpp:1.4 
netpanzer/src/Lib/Particles/SnowParticleSystem2D.cpp:1.5
--- netpanzer/src/Lib/Particles/SnowParticleSystem2D.cpp:1.4    Sat Sep  6 
11:18:18 2003
+++ netpanzer/src/Lib/Particles/SnowParticleSystem2D.cpp        Wed Sep 10 
07:26:07 2003
@@ -55,7 +55,10 @@
 {
        FUNC("SnowParticleSystem2D::init");
 
+       try {
        snowParticles = new SnowParticle2D [SNOW_PARTICLE_COUNT];
+       } catch(...) {
+       }
        assert(snowParticles != 0);
 
        for (unsigned num = 0; num < SNOW_PARTICLE_COUNT; num++)
Index: netpanzer/src/Lib/Particles/TemplateExplosionSystem.cpp
diff -u netpanzer/src/Lib/Particles/TemplateExplosionSystem.cpp:1.4 
netpanzer/src/Lib/Particles/TemplateExplosionSystem.cpp:1.5
--- netpanzer/src/Lib/Particles/TemplateExplosionSystem.cpp:1.4 Mon Sep  8 
17:25:08 2003
+++ netpanzer/src/Lib/Particles/TemplateExplosionSystem.cpp     Wed Sep 10 
07:26:07 2003
@@ -15,8 +15,8 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
 #include <config.h>
+
 #include "TemplateExplosionSystem.hpp"
 #include "ChunkTrajectoryParticle2D.hpp"
 #include "FlameParticle2D.hpp"
@@ -63,7 +63,10 @@
        if (pixMovementValue != 5 &&
                pixMovementValue != 4)
        {
-               new CraterParticle2D(pos);
+               try {
+                       new CraterParticle2D(pos);
+               } catch(...) {
+               }
        }
 
        // If this is water, we can not have smoke.
@@ -99,12 +102,18 @@
                ParticleInterface::gExplosionFlameFlashCullMissCount++;
 
                // Add the flame(s).
-               new FlameParticle2D(pos, e.flameMinScale, e.flameRandScale, 
e.flameLifetime, ExplosionSystem::flameLayer);
+               try {
+                       new FlameParticle2D(pos, e.flameMinScale, 
e.flameRandScale, e.flameLifetime, ExplosionSystem::flameLayer);
+               } catch(...) {
+               }
                
                // Add the flash(s).
                //if (e.flashCount <= 1)
                //{
+               try {
                        new FlashParticle2D(pos, e.flashMinScale, 
e.flashRandScale, e.flashLifetime, ExplosionSystem::flashLayer);
+               } catch(...) {
+               }
                //}
 
                //for (int i = 0; i < e.flashCount - 1; i++)
@@ -154,7 +163,8 @@
                offset.y = pos.y;
                offset.z = pos.z - (rand() % bounds.getSizeY()) + halfBoundsY;
 
-               new ChunkTrajectoryParticle2D(  offset,
+               try {
+                       new ChunkTrajectoryParticle2D(  offset,
                                                                                
int(maxSpeed),
                                                                                
scaleMin,
                                                                                
scaleRand,
@@ -165,6 +175,8 @@
                                                                                
(rand() % 2) ? true : false,
                                                                                
isFarAway || fpsLow,
                                                                                
canHaveSmoke);
+               } catch(...) {
+               }
        }}
 
        // Medium smoke.
@@ -180,7 +192,8 @@
                offset.y = pos.y;
                offset.z = pos.z - (rand() % bounds.getSizeY()) + halfBoundsY;
 
-               new ChunkTrajectoryParticle2D(  pos,
+               try {
+                       new ChunkTrajectoryParticle2D(  pos,
                                                                                
int(maxSpeed),
                                                                                
scaleMin,
                                                                                
scaleRand,
@@ -191,6 +204,8 @@
                                                                                
true,
                                                                                
isFarAway || fpsLow,
                                                                                
canHaveSmoke);
+               } catch(...) {
+               }
        }}
 
        // Large smoke.
@@ -206,8 +221,8 @@
                offset.y = pos.y;
                offset.z = pos.z - (rand() % bounds.getSizeY()) + halfBoundsY;
 
-
-               new ChunkTrajectoryParticle2D(  pos,
+               try {
+                       new ChunkTrajectoryParticle2D(  pos,
                                                                                
int(maxSpeed),
                                                                                
scaleMin,
                                                                                
scaleRand,
@@ -218,6 +233,8 @@
                                                                                
true,
                                                                                
isFarAway || fpsLow,
                                                                                
canHaveSmoke);
+               } catch(...) {
+               }
        }}
 
        // Kill me after I release my particles.
Index: netpanzer/src/Lib/Particles/TemplateMuzzleSystem.cpp
diff -u netpanzer/src/Lib/Particles/TemplateMuzzleSystem.cpp:1.3 
netpanzer/src/Lib/Particles/TemplateMuzzleSystem.cpp:1.4
--- netpanzer/src/Lib/Particles/TemplateMuzzleSystem.cpp:1.3    Fri Sep  5 
22:01:18 2003
+++ netpanzer/src/Lib/Particles/TemplateMuzzleSystem.cpp        Wed Sep 10 
07:26:07 2003
@@ -15,8 +15,8 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
 #include <config.h>
+
 #include "TemplateMuzzleSystem.hpp"
 #include "VectorPuffParticle2D.hpp"
 #include "Math.hpp"
@@ -57,11 +57,15 @@
 //     static int   flashLayer;
 
        // Chunk a flash in!
-       new FlashParticle2D(pos, 0.3f, 0.2f, 0.1f, ExplosionSystem::flashLayer);
+       try {
+               new FlashParticle2D(pos, 0.3f, 0.2f, 0.1f, 
ExplosionSystem::flashLayer);
+       } catch(...) {
+       }
 
        if (m.muzzleType == MuzzleSystem::SINGLE)
        {
-               new VectorPuffParticle2D(       pos,
+               try {
+                       new VectorPuffParticle2D(       pos,
                                                                        
direction,
                                                                        
m.puffMinScale,
                                                                        
m.puffRandScale,
@@ -72,10 +76,13 @@
                                                                        
m.lifetimeMin,
                                                                        
m.lifetimeRand,
                                                                        
MuzzleSystem::windScale);
+               } catch(...) {
+               }
        }
        else if (m.muzzleType == MuzzleSystem::TRIPLE)
        {
-               new VectorPuffParticle2D(       pos,
+               try {
+                       new VectorPuffParticle2D(       pos,
                                                                        
direction,
                                                                        
m.puffMinScale,
                                                                        
m.puffRandScale,
@@ -86,10 +93,13 @@
                                                                        
m.lifetimeMin,
                                                                        
m.lifetimeRand,
                                                                        
MuzzleSystem::windScale);
+               } catch(...) {
+               }
 
                fXY eastDirection(Math::unitDirectionEast(fXY(direction.x, 
direction.z)));
 
-               new VectorPuffParticle2D(       pos,
+               try {
+                       new VectorPuffParticle2D(       pos,
                                                                        
fXYZ(eastDirection.x, 0, eastDirection.y),
                                                                        
m.puffMinScale,
                                                                        
m.puffRandScale,
@@ -100,10 +110,13 @@
                                                                        
m.lifetimeMin,
                                                                        
m.lifetimeRand,
                                                                        
MuzzleSystem::windScale);
+               } catch(...) {
+               }
 
                fXY westDirection(Math::unitDirectionWest(fXY(direction.x, 
direction.z)));
 
-               new VectorPuffParticle2D(       pos,
+               try {
+                       new VectorPuffParticle2D(       pos,
                                                                        
fXYZ(westDirection.x, 0, westDirection.y),
                                                                        
m.puffMinScale,
                                                                        
m.puffRandScale,
@@ -114,6 +127,8 @@
                                                                        
m.lifetimeMin,
                                                                        
m.lifetimeRand,
                                                                        
MuzzleSystem::windScale);
+               } catch(...) {
+               }
        } else
        {
                assert(false);
Index: netpanzer/src/Lib/Particles/VectorPuffParticle2D.cpp
diff -u netpanzer/src/Lib/Particles/VectorPuffParticle2D.cpp:1.4 
netpanzer/src/Lib/Particles/VectorPuffParticle2D.cpp:1.5
--- netpanzer/src/Lib/Particles/VectorPuffParticle2D.cpp:1.4    Tue Sep  9 
13:16:12 2003
+++ netpanzer/src/Lib/Particles/VectorPuffParticle2D.cpp        Wed Sep 10 
07:26:07 2003
@@ -15,8 +15,8 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
 #include <config.h>
+
 #include "VectorPuffParticle2D.hpp"
 #include "PuffParticle2D.hpp"
 #include "TimerInterface.hpp"
@@ -69,7 +69,8 @@
 
                if (particleType == 0)
                {
-                       new PuffParticle2D(     pos,
+                       try {
+                               new PuffParticle2D(     pos,
                                                                LIGHT,
                                                                scaleMin,
                                                                scaleRand,
@@ -79,10 +80,13 @@
                                                                
smokeShadowLayer,
                                                                windScale,
                                                                0);
+                       } catch(...) {
+                       }
                }
                else if (particleType == 1)
                {
-                       new PuffParticle2D(     pos,
+                       try {
+                               new PuffParticle2D(     pos,
                                                                DARK,
                                                                scaleMin,
                                                                scaleRand,
@@ -92,11 +96,16 @@
                                                                
smokeShadowLayer,
                                                                windScale,
                                                                0);
+                       } catch(...) {
+                       }
                }
        
                waitTime = 0.0f;
 
-               //new cSparkParticle2D(fXYZ(pos.x, pos.y, zPos));
+               try {
+                       //new cSparkParticle2D(fXYZ(pos.x, pos.y, zPos));
+               } catch(...) {
+               }
        }
 
        if (age > lifetime)
Index: netpanzer/src/Lib/Physics.cpp
diff -u netpanzer/src/Lib/Physics.cpp:1.3 netpanzer/src/Lib/Physics.cpp:1.4
--- netpanzer/src/Lib/Physics.cpp:1.3   Fri Sep  5 22:01:17 2003
+++ netpanzer/src/Lib/Physics.cpp       Wed Sep 10 07:26:06 2003
@@ -15,8 +15,8 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
 #include <config.h>
+
 #include <string.h>
 #include <stdlib.h>
 #include "Physics.hpp"
Index: netpanzer/src/Lib/View/cButton.cpp
diff -u netpanzer/src/Lib/View/cButton.cpp:1.4 
netpanzer/src/Lib/View/cButton.cpp:1.5
--- netpanzer/src/Lib/View/cButton.cpp:1.4      Sun Sep  7 16:49:03 2003
+++ netpanzer/src/Lib/View/cButton.cpp  Wed Sep 10 07:26:07 2003
@@ -21,6 +21,7 @@
 #include "cButton.hpp"
 #include "Surface.hpp"
 #include "Exception.hpp"
+#include "Color.hpp"
 #include "ViewGlobals.hpp"
 
 
Index: netpanzer/src/Lib/View/cInputField.cpp
diff -u netpanzer/src/Lib/View/cInputField.cpp:1.6 
netpanzer/src/Lib/View/cInputField.cpp:1.7
--- netpanzer/src/Lib/View/cInputField.cpp:1.6  Sun Sep  7 16:49:03 2003
+++ netpanzer/src/Lib/View/cInputField.cpp      Wed Sep 10 07:26:07 2003
@@ -17,10 +17,11 @@
 */
 #include <config.h>
 
+#include <string.h>
+#include "Color.hpp"
 #include "Exception.hpp"
 #include "cInputField.hpp"
 #include "TimerInterface.hpp"
-
 
 ////////////////////////////////////////////////////////////////////////////
 // cInputFieldString definitions.
Index: netpanzer/src/Lib/cGrowList.hpp
diff -u netpanzer/src/Lib/cGrowList.hpp:1.4 netpanzer/src/Lib/cGrowList.hpp:1.5
--- netpanzer/src/Lib/cGrowList.hpp:1.4 Tue Sep  9 13:16:12 2003
+++ netpanzer/src/Lib/cGrowList.hpp     Wed Sep 10 07:26:06 2003
@@ -18,9 +18,9 @@
 #ifndef __cGrowlist_hpp__
 #define __cGrowlist_hpp__
 
+#include <new>
 #include <assert.h>
-#include "codewiz.hpp"
-
+#include <string.h>
 
 template <class TYPE>
 class cGrowList {
@@ -138,7 +138,7 @@
                        memset(array + alloced, 0x00, sizeof(array[0]) * 
(nAlloced - alloced));
                #endif
                do {
-                       new (array + alloced) TYPE();
+                       new(array + alloced) TYPE();
                        ++alloced;
                } while (alloced < nAlloced);
        }
Index: netpanzer/src/NetPanzer/Classes/SelectionBoxSprite.cpp
diff -u netpanzer/src/NetPanzer/Classes/SelectionBoxSprite.cpp:1.5 
netpanzer/src/NetPanzer/Classes/SelectionBoxSprite.cpp:1.6
--- netpanzer/src/NetPanzer/Classes/SelectionBoxSprite.cpp:1.5  Mon Sep  8 
18:50:28 2003
+++ netpanzer/src/NetPanzer/Classes/SelectionBoxSprite.cpp      Wed Sep 10 
07:26:07 2003
@@ -18,6 +18,7 @@
 #include <config.h>
 
 #include "SelectionBoxSprite.hpp"
+#include "Palette.hpp"
 #include "GameConfig.hpp"
 
 Surface UNIT_FLAGS_SURFACE;
Index: netpanzer/src/NetPanzer/Classes/TileEngine.cpp
diff -u netpanzer/src/NetPanzer/Classes/TileEngine.cpp:1.6 
netpanzer/src/NetPanzer/Classes/TileEngine.cpp:1.7
--- netpanzer/src/NetPanzer/Classes/TileEngine.cpp:1.6  Mon Sep  8 08:12:19 2003
+++ netpanzer/src/NetPanzer/Classes/TileEngine.cpp      Wed Sep 10 07:26:07 2003
@@ -96,7 +96,7 @@
        world_row =  map_buffer + (map_y * map_width) + map_x;
 
        // XXX
-       next_tile_row_offset = Screen->getWidth() * (tile_size - 1) + 
X_CLIP_OFS;
+       next_tile_row_offset = Screen->getWidth() * (tile_size - 1);
 
        next_map_row_offset = map_width - complete_columns - 1;
 
@@ -107,8 +107,7 @@
        tile_offset = tile_set.getTile( tile_type ); 
        tile_offset = tile_offset + (y_top_offset * tile_size ) + 
x_left_offset; 
  
-       // XXX is this correct?
-       buffer_offset = double_buffer /*+ OFFSET_TO_VIEW*/;
+       buffer_offset = double_buffer;
 
        blit_partial_xy( tile_offset, buffer_offset, y_top_length, 
x_left_length );
 
@@ -143,15 +142,13 @@
                        blit_partial_xy(tile_offset, buffer_offset, 
y_top_length, x_right_length);
                }
 
-               // XXX
-               buffer_offset += ( Screen->getWidth() * (y_top_length-1)) + 
X_CLIP_OFS + x_right_length;
+               buffer_offset += ( Screen->getWidth() * (y_top_length-1)) + 
x_right_length;
 
                world_row = world_row + next_map_row_offset;
        }
        else
        {
-               // XXX
-               //buffer_offset += (Screen->getWidth() * (y_top_length-1)) + 
X_CLIP_OFS;
+               buffer_offset += (Screen->getWidth() * (y_top_length-1));
 
                world_row = world_row + next_map_row_offset;
        }               
@@ -245,15 +242,13 @@
                                blit_partial_xy( tile_offset, buffer_offset, 
y_bottom_length, x_right_length );
                        }
 
-                       // XXX
-                       buffer_offset += (Screen->getWidth() * 
(y_bottom_length-1)) + X_CLIP_OFS + x_right_length;
+                       buffer_offset += (Screen->getWidth() * 
(y_bottom_length-1)) + x_right_length;
 
                        world_row = world_row + next_map_row_offset;
                }
                else
                {
-                       // XXX
-                       buffer_offset += (Screen->getWidth() * 
(y_bottom_length-1)) + X_CLIP_OFS;
+                       buffer_offset += (Screen->getWidth() * 
(y_bottom_length-1));
 
                        world_row = world_row + next_map_row_offset;
                }
Index: netpanzer/src/NetPanzer/Classes/UnitBucketArray.cpp
diff -u netpanzer/src/NetPanzer/Classes/UnitBucketArray.cpp:1.3 
netpanzer/src/NetPanzer/Classes/UnitBucketArray.cpp:1.4
--- netpanzer/src/NetPanzer/Classes/UnitBucketArray.cpp:1.3     Fri Sep  5 
22:01:18 2003
+++ netpanzer/src/NetPanzer/Classes/UnitBucketArray.cpp Wed Sep 10 07:26:08 2003
@@ -16,6 +16,8 @@
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 #include <config.h>
+
+#include "Palette.hpp"
 #include "UnitBucketArray.hpp"
 
 UnitBucketArray::UnitBucketArray( )
Index: netpanzer/src/NetPanzer/Interfaces/ChatInterface.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/ChatInterface.cpp:1.4 
netpanzer/src/NetPanzer/Interfaces/ChatInterface.cpp:1.5
--- netpanzer/src/NetPanzer/Interfaces/ChatInterface.cpp:1.4    Sun Sep  7 
14:39:32 2003
+++ netpanzer/src/NetPanzer/Interfaces/ChatInterface.cpp        Wed Sep 10 
07:26:09 2003
@@ -16,8 +16,9 @@
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 #include <config.h>
-#include "ChatInterface.hpp"
 
+#include "ChatInterface.hpp"
+#include "Color.hpp"
 #include "PlayerInterface.hpp"
 #include "NetworkState.hpp"
 #include "Server.hpp"
Index: netpanzer/src/NetPanzer/Interfaces/GameConfig.hpp
diff -u netpanzer/src/NetPanzer/Interfaces/GameConfig.hpp:1.2 
netpanzer/src/NetPanzer/Interfaces/GameConfig.hpp:1.3
--- netpanzer/src/NetPanzer/Interfaces/GameConfig.hpp:1.2       Mon Sep  1 
16:24:20 2003
+++ netpanzer/src/NetPanzer/Interfaces/GameConfig.hpp   Wed Sep 10 07:26:09 2003
@@ -18,11 +18,13 @@
 #ifndef __GAMECONFIG_HPP
 #define __GAMECONFIG_HPP
 
-#include "string.h"
-#include "memory.h"
+#include <assert.h>
+#include <string.h>
+
 #include "PObject.hpp"
 #include "Point.hpp"
 #include "Surface.hpp"
+#include "Color.hpp"
 #include "PlayerUnitConfig.hpp"
 
 enum { _mini_map_objective_draw_mode_solid_rect,
Index: netpanzer/src/NetPanzer/Interfaces/GameManager.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.30 
netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.31
--- netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.30     Tue Sep  9 
12:21:07 2003
+++ netpanzer/src/NetPanzer/Interfaces/GameManager.cpp  Wed Sep 10 07:26:09 2003
@@ -26,9 +26,6 @@
 #include <windows.h>
 #endif
 
-// ** netPanzer Core Includes
-#include "gapp.hpp"
-
 // ** Direct X Includes
 #ifdef WIN32
 #include "DirectDrawGlobals.hpp"
@@ -480,7 +477,6 @@
        MapsManager::scanMaps();
   
        Physics::init();
-       Math::init();
        Weapon::init();
 
        ConsoleInterface::initialize(25);
Index: netpanzer/src/NetPanzer/Interfaces/MouseInterface.hpp
diff -u netpanzer/src/NetPanzer/Interfaces/MouseInterface.hpp:1.3 
netpanzer/src/NetPanzer/Interfaces/MouseInterface.hpp:1.4
--- netpanzer/src/NetPanzer/Interfaces/MouseInterface.hpp:1.3   Fri Sep  5 
21:09:50 2003
+++ netpanzer/src/NetPanzer/Interfaces/MouseInterface.hpp       Wed Sep 10 
07:26:09 2003
@@ -22,7 +22,6 @@
 #include "Point.hpp" 
 #include "QueueTemplate.hpp"
 #include "Surface.hpp"
-#include "gapp.hpp"
 
 #include "cTimeStamp.hpp"
 
Index: netpanzer/src/NetPanzer/Interfaces/TileInterface.hpp
diff -u netpanzer/src/NetPanzer/Interfaces/TileInterface.hpp:1.2 
netpanzer/src/NetPanzer/Interfaces/TileInterface.hpp:1.3
--- netpanzer/src/NetPanzer/Interfaces/TileInterface.hpp:1.2    Mon Sep  1 
16:24:21 2003
+++ netpanzer/src/NetPanzer/Interfaces/TileInterface.hpp        Wed Sep 10 
07:26:09 2003
@@ -19,29 +19,28 @@
 #define _TILEINTERFACE_HPP
 
 #include "PObject.hpp"
+#include "Surface.hpp"
 #include "TileSet.hpp"
 #include "Palette.hpp"
 #include "Point.hpp"
 
 class TileInterface : virtual PObject
- {
-  protected: 
-   static TileSet tile_set;
+{
+protected: 
+       static TileSet tile_set;
 
-  public:
-
-  static void loadTileSet( const char *file_path );
+public:
+       static void loadTileSet( const char *file_path );
    
-  static inline TileSet * getTileSet( void )
-   {
-    return ( &tile_set );
-   }
-
-  static PointXYi getTileSize( void );
-
-  static PIX  getWorldPixColor(int worldX, int worldY);
-  static long getWorldPixMovementValue(int worldX, int worldY);
-
- };
+       static inline TileSet * getTileSet( void )
+       {
+               return ( &tile_set );
+       }
+
+       static PointXYi getTileSize( void );
+
+       static PIX  getWorldPixColor(int worldX, int worldY);
+       static long getWorldPixMovementValue(int worldX, int worldY);
+};
 
 #endif // ** _TILEINTERFACE_HPP
Index: netpanzer/src/NetPanzer/Port/Wrldsprt.cpp
diff -u netpanzer/src/NetPanzer/Port/Wrldsprt.cpp:1.6 
netpanzer/src/NetPanzer/Port/Wrldsprt.cpp:1.7
--- netpanzer/src/NetPanzer/Port/Wrldsprt.cpp:1.6       Sun Sep  7 22:44:22 2003
+++ netpanzer/src/NetPanzer/Port/Wrldsprt.cpp   Wed Sep 10 07:26:10 2003
@@ -126,8 +126,9 @@
   y = y_loc + bbox_y1 + attach_y;
 
   //WorldViewInterface::getViewStart( 640, 480, &view_start_x, &view_start_y );
+  view_start_x = view_start_y = 0;
   
-  frame_offset = ((y - (view_start_y)) * Screen->getWidth()) + (x - 
(view_start_x)) + OFFSET_TO_VIEW;
+  frame_offset = ((y - (view_start_y)) * Screen->getWidth()) + (x - 
(view_start_x));
 
   Screen->lockDoubleBuffer( &double_buffer );
 
@@ -292,8 +293,9 @@
   y = y_loc + bbox_y1 + attach_y;
   
   //WorldViewInterface::getViewStart( 640, 480, &view_start_x, &view_start_y );
+  view_start_x = view_start_y = 0;
   
-  frame_offset = ((y - (view_start_y)) * Screen->getWidth()) + (x - 
(view_start_x)) + OFFSET_TO_VIEW;
+  frame_offset = ((y - (view_start_y)) * Screen->getWidth()) + (x - 
(view_start_x));
 
   frame_data = anim->data + (anim->frame_size * frame_counter) + (direct * 
anim->direct_size);
   
@@ -309,7 +311,7 @@
      x_size = (bbox_x2 - select_x_cut) - (bbox_x1 + select_x_cut);
      y_size = (bbox_y2 - select_y_cut) - (bbox_y1 + select_y_cut);
 
-     frame_offset = ((y - (view_start_y)) * Screen->getWidth()) + (x - 
(view_start_x)) + OFFSET_TO_VIEW;
+     frame_offset = ((y - (view_start_y)) * Screen->getWidth()) + (x - 
(view_start_x));
 
      blit_selector_square( x_size, y_size, frame_offset, double_buffer ); 
     }
Index: netpanzer/src/NetPanzer/Views/Game/AreYouSureExitView.cpp
diff -u netpanzer/src/NetPanzer/Views/Game/AreYouSureExitView.cpp:1.3 
netpanzer/src/NetPanzer/Views/Game/AreYouSureExitView.cpp:1.4
--- netpanzer/src/NetPanzer/Views/Game/AreYouSureExitView.cpp:1.3       Fri Sep 
 5 22:01:19 2003
+++ netpanzer/src/NetPanzer/Views/Game/AreYouSureExitView.cpp   Wed Sep 10 
07:26:10 2003
@@ -15,13 +15,12 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
-
 #include <config.h>
+
 #include "AreYouSureExitView.hpp"
 #include "Desktop.hpp"
+#include "Palette.hpp"
 #include "GameManager.hpp"
-
 
 //---------------------------------------------------------------------------
 static void bYES()
Index: netpanzer/src/NetPanzer/Views/Game/AreYouSureResignView.cpp
diff -u netpanzer/src/NetPanzer/Views/Game/AreYouSureResignView.cpp:1.7 
netpanzer/src/NetPanzer/Views/Game/AreYouSureResignView.cpp:1.8
--- netpanzer/src/NetPanzer/Views/Game/AreYouSureResignView.cpp:1.7     Mon Sep 
 8 11:32:05 2003
+++ netpanzer/src/NetPanzer/Views/Game/AreYouSureResignView.cpp Wed Sep 10 
07:26:10 2003
@@ -28,6 +28,7 @@
 #include "SoundView.hpp"
 #include "ControlsView.hpp"
 #include "VisualsView.hpp"
+#include "Palette.hpp"
 #include "InterfaceView.hpp"
 
 //---------------------------------------------------------------------------
Index: netpanzer/src/NetPanzer/Views/Game/HelpScrollView.cpp
diff -u netpanzer/src/NetPanzer/Views/Game/HelpScrollView.cpp:1.5 
netpanzer/src/NetPanzer/Views/Game/HelpScrollView.cpp:1.6
--- netpanzer/src/NetPanzer/Views/Game/HelpScrollView.cpp:1.5   Sun Sep  7 
16:49:03 2003
+++ netpanzer/src/NetPanzer/Views/Game/HelpScrollView.cpp       Wed Sep 10 
07:26:10 2003
@@ -15,11 +15,9 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
-
 #include <config.h>
+
 #include "HelpScrollView.hpp"
-#include "gapp.hpp"
 #include "GameView.hpp"
 #include "GameViewGlobals.hpp"
 #include "Desktop.hpp"
Index: netpanzer/src/NetPanzer/Views/Game/MiniRankView.cpp
diff -u netpanzer/src/NetPanzer/Views/Game/MiniRankView.cpp:1.1 
netpanzer/src/NetPanzer/Views/Game/MiniRankView.cpp:1.2
--- netpanzer/src/NetPanzer/Views/Game/MiniRankView.cpp:1.1     Tue Sep  9 
13:16:13 2003
+++ netpanzer/src/NetPanzer/Views/Game/MiniRankView.cpp Wed Sep 10 07:26:10 2003
@@ -22,6 +22,7 @@
 #include "iRect.hpp"
 #include "Surface.hpp"
 #include "Stats.hpp"
+#include "Palette.hpp"
 #include "MiniRankView.hpp"
 
 void drawMiniRankView(const Surface &dest)
Index: netpanzer/src/NetPanzer/Views/Game/ResignView.cpp
diff -u netpanzer/src/NetPanzer/Views/Game/ResignView.cpp:1.3 
netpanzer/src/NetPanzer/Views/Game/ResignView.cpp:1.4
--- netpanzer/src/NetPanzer/Views/Game/ResignView.cpp:1.3       Fri Sep  5 
22:01:19 2003
+++ netpanzer/src/NetPanzer/Views/Game/ResignView.cpp   Wed Sep 10 07:26:10 2003
@@ -16,11 +16,12 @@
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 #include <config.h>
+
 #include "ResignView.hpp"
 #include "Desktop.hpp"
+#include "Palette.hpp"
 #include "AreYouSureResignView.hpp"
 #include "AreYouSureExitView.hpp"
-
 
 //---------------------------------------------------------------------------
 static void bResign()
Index: netpanzer/src/NetPanzer/Views/GameViewGlobals.cpp
diff -u netpanzer/src/NetPanzer/Views/GameViewGlobals.cpp:1.3 
netpanzer/src/NetPanzer/Views/GameViewGlobals.cpp:1.4
--- netpanzer/src/NetPanzer/Views/GameViewGlobals.cpp:1.3       Fri Sep  5 
22:01:19 2003
+++ netpanzer/src/NetPanzer/Views/GameViewGlobals.cpp   Wed Sep 10 07:26:10 2003
@@ -16,6 +16,8 @@
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 #include <config.h>
+
+#include "Palette.hpp"
 #include "GameViewGlobals.hpp"
 
 iXY exitPos(6, 454);
Index: netpanzer/src/NetPanzer/Views/MainMenu/MenuTemplateView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/MenuTemplateView.cpp:1.9 
netpanzer/src/NetPanzer/Views/MainMenu/MenuTemplateView.cpp:1.10
--- netpanzer/src/NetPanzer/Views/MainMenu/MenuTemplateView.cpp:1.9     Mon Sep 
 8 17:25:09 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/MenuTemplateView.cpp Wed Sep 10 
07:26:10 2003
@@ -15,10 +15,10 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
-
 #include <config.h>
+
 #include "MenuTemplateView.hpp"
+#include "Palette.hpp"
 #include "Desktop.hpp"
 #include "GameConfig.hpp"
 #include "GameManager.hpp"
Index: 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/DirectPlayErrorExceptionView.cpp
diff -u 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/DirectPlayErrorExceptionView.cpp:1.3
 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/DirectPlayErrorExceptionView.cpp:1.4
--- 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/DirectPlayErrorExceptionView.cpp:1.3
   Fri Sep  5 22:01:20 2003
+++ 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/DirectPlayErrorExceptionView.cpp   
    Wed Sep 10 07:26:10 2003
@@ -15,12 +15,12 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
 #include <config.h>
+
 #include "DirectPlayErrorExceptionView.hpp"
 #include "Desktop.hpp"
+#include "Palette.hpp"
 #include "GameManager.hpp"
-
 
 //---------------------------------------------------------------------------
 static void bOK()
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/FlagSelectionView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/Multi/FlagSelectionView.cpp:1.7 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/FlagSelectionView.cpp:1.8
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/FlagSelectionView.cpp:1.7      
Sun Sep  7 16:49:03 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/FlagSelectionView.cpp  Wed Sep 
10 07:26:10 2003
@@ -18,7 +18,6 @@
 #include <config.h>
 
 #include "FlagSelectionView.hpp"
-#include "gapp.hpp"
 #include "GameView.hpp"
 #include "GameViewGlobals.hpp"
 #include "Exception.hpp"
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/GetSessionHostView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/Multi/GetSessionHostView.cpp:1.4 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/GetSessionHostView.cpp:1.5
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/GetSessionHostView.cpp:1.4     
Sat Sep  6 06:34:29 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/GetSessionHostView.cpp Wed Sep 
10 07:26:10 2003
@@ -15,13 +15,10 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
-
 #include <config.h>
+
 #include "GetSessionHostView.hpp"
 #include "Desktop.hpp"
-#include "DirectPlay.h"
-#include "gapp.hpp"
 #include "TimerInterface.hpp"
 #include "GameViewGlobals.hpp"
 
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/GetSessionView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/Multi/GetSessionView.cpp:1.8 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/GetSessionView.cpp:1.9
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/GetSessionView.cpp:1.8 Mon Sep 
 8 17:25:09 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/GetSessionView.cpp     Wed Sep 
10 07:26:10 2003
@@ -15,22 +15,18 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
-
 #include <config.h>
+
 #include "GetSessionView.hpp"
 #include "GetSessionHostView.hpp"
 #include "Desktop.hpp"
 #include "GameConfig.hpp"
 #include "GameManager.hpp"
-#include "DirectPlay.h"
-#include "gapp.hpp"
 #include "MouseInterface.hpp"
 #include "GameViewGlobals.hpp"
 
 //winsock hack
 #include "IPAddressView.h"
-#include "WinsockClient.h"
 
 #include "Server.hpp"
 #include "Client.hpp"
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp
diff -u 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp:1.7 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp:1.8
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp:1.7   
Sun Sep  7 16:49:03 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp       
Wed Sep 10 07:26:10 2003
@@ -16,14 +16,13 @@
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 #include <config.h>
+
 #include <ctype.h>
 #include "HostJoinTemplateView.hpp"
 #include "Desktop.hpp"
 #include "HostJoinTemplateView.hpp"
 #include "GameConfig.hpp"
 #include "GameManager.hpp"
-#include "DirectPlay.h"
-#include "gapp.hpp"
 #include "DDHardSurface.hpp"
 #include "FontSystem2D.hpp"
 #include "HostView.hpp"
@@ -31,6 +30,7 @@
 #include "MapSelectionView.hpp"
 #include "PlayerNameView.hpp"
 #include "FlagSelectionView.hpp"
+#include "Palette.hpp"
 #include "GameViewGlobals.hpp"
 
 #include "Client.hpp"
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/IPAddressView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/Multi/IPAddressView.cpp:1.4 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/IPAddressView.cpp:1.5
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/IPAddressView.cpp:1.4  Mon Sep 
 8 17:25:09 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/IPAddressView.cpp      Wed Sep 
10 07:26:10 2003
@@ -20,9 +20,6 @@
 #include "IPAddressView.h"
 #include "Desktop.hpp"
 #include "GameViewGlobals.hpp"
-#include "gapp.hpp"
-#include "WinsockClient.h"
-#include "winsockglobals.h"
 
 #include "Client.hpp"
 
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/JoinView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/Multi/JoinView.cpp:1.5 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/JoinView.cpp:1.6
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/JoinView.cpp:1.5       Sat Sep 
 6 11:39:25 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/JoinView.cpp   Wed Sep 10 
07:26:10 2003
@@ -16,12 +16,11 @@
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 #include <config.h>
+
 #include "JoinView.hpp"
 #include "Desktop.hpp"
 #include "GameConfig.hpp"
 #include "GameManager.hpp"
-#include "DirectPlay.h"
-#include "gapp.hpp"
 #include "GameManager.hpp"
 #include "GameViewGlobals.hpp"
 
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp:1.9 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp:1.10
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp:1.9       
Sun Sep  7 16:49:03 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp   Wed Sep 
10 07:26:10 2003
@@ -16,13 +16,10 @@
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 #include <config.h>
-#ifdef WIN32
-#include <io.h>
-#endif
+
 #include "SplitPath.hpp"
 #include "FindFirst.hpp"
 #include "MapSelectionView.hpp"
-#include "gapp.hpp"
 #include "GameConfig.hpp"
 #include "GameViewGlobals.hpp"
 #include "HostOptionsView.hpp"
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/UnitColorView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/Multi/UnitColorView.cpp:1.5 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/UnitColorView.cpp:1.6
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/UnitColorView.cpp:1.5  Sat Sep 
 6 11:18:20 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/UnitColorView.cpp      Wed Sep 
10 07:26:10 2003
@@ -16,10 +16,11 @@
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 #include <config.h>
+
 #include "UnitColorView.hpp"
-#include "gapp.hpp"
 #include "GameView.hpp"
 #include "GameViewGlobals.hpp"
+#include "Palette.hpp"
 #include "ColorTable.hpp"
 
 static float maxPercent       = 3.5f;
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/UnitSelectionView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/Multi/UnitSelectionView.cpp:1.4 
netpanzer/src/NetPanzer/Views/MainMenu/Multi/UnitSelectionView.cpp:1.5
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/UnitSelectionView.cpp:1.4      
Sat Sep  6 06:34:29 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/UnitSelectionView.cpp  Wed Sep 
10 07:26:10 2003
@@ -17,10 +17,8 @@
 */
 #include <config.h>
 #include "UnitSelectionView.hpp"
-#include "gapp.hpp"
 #include "GameView.hpp"
 #include "GameViewGlobals.hpp"
-
 
 // UnitSelectionView
 //---------------------------------------------------------------------------
Index: netpanzer/src/UILib/SDL/SDLDraw.cpp
diff -u netpanzer/src/UILib/SDL/SDLDraw.cpp:1.10 
netpanzer/src/UILib/SDL/SDLDraw.cpp:1.11
--- netpanzer/src/UILib/SDL/SDLDraw.cpp:1.10    Mon Sep  8 17:25:09 2003
+++ netpanzer/src/UILib/SDL/SDLDraw.cpp Wed Sep 10 07:26:12 2003
@@ -18,11 +18,6 @@
 #include <config.h>
 #include "SDLDraw.hpp"
 
-// XXX fixme, need sensefull values here
-unsigned long X_CLIP_OFS = 0;
-unsigned long Y_CLIP_OFS = 0;
-unsigned long OFFSET_TO_VIEW = 0;
-
 SDLDraw::SDLDraw()
        : FrontBuffer(0)
 {
Index: netpanzer/src/UILib/UIDraw.hpp
diff -u netpanzer/src/UILib/UIDraw.hpp:1.8 netpanzer/src/UILib/UIDraw.hpp:1.9
--- netpanzer/src/UILib/UIDraw.hpp:1.8  Mon Sep  8 16:29:10 2003
+++ netpanzer/src/UILib/UIDraw.hpp      Wed Sep 10 07:26:12 2003
@@ -58,18 +58,6 @@
        { return curBPP; }              
 }; // end DirectDraw
 
-// XXX some global vars, these should be avoided or at least moved inside the
-// UIDraw class!!!
-#if 0
-extern unsigned long DBUFFER_WIDTH;
-extern unsigned long DBUFFER_HEIGHT;
-extern unsigned long DBUFFER_VIEW_WIDTH;
-extern unsigned long DBUFFER_VIEW_HEIGHT;
-#endif
-extern unsigned long X_CLIP_OFS;
-extern unsigned long Y_CLIP_OFS;
-extern unsigned long OFFSET_TO_VIEW;
-
 extern UIDraw *Screen;
 
 #endif // end __UIDraw_hpp__




reply via email to

[Prev in Thread] Current Thread [Next in Thread]