[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netPanzer-CVS] netpanzer/src Lib/FileSystem.cpp Lib/FileSystem...
From: |
Matthias Braun |
Subject: |
[netPanzer-CVS] netpanzer/src Lib/FileSystem.cpp Lib/FileSystem... |
Date: |
Tue, 23 Sep 2003 19:43:19 -0400 |
CVSROOT: /cvsroot/netpanzer
Module name: netpanzer
Branch:
Changes by: Matthias Braun <address@hidden> 03/09/23 19:43:18
Modified files:
src/Lib : FileSystem.cpp FileSystem.hpp
src/Lib/2D : Surface.cpp Surface.hpp
src/Lib/Particles: DirtKickParticle2D.cpp FlameParticle2D.cpp
FlameParticle2D.hpp SparkParticle2D.cpp
SparkParticle2D.hpp
src/Lib/View : View.cpp View.hpp cButton.cpp cButton.hpp
src/NetPanzer/Classes/Weapons: Weapon.cpp
src/NetPanzer/Core: main.cpp
src/NetPanzer/Views/Game: ChatView.cpp GameInfoView.cpp
GameToolbarView.cpp
VehicleSelectionView.cpp
src/NetPanzer/Views/MainMenu: OptionsTemplateView.cpp
src/NetPanzer/Views/MainMenu/Multi: HostOptionsView.cpp
Log message:
fixed some more warnings and removed unused PCX loading code
Patches:
Index: netpanzer/src/Lib/2D/Surface.cpp
diff -u netpanzer/src/Lib/2D/Surface.cpp:1.27
netpanzer/src/Lib/2D/Surface.cpp:1.28
--- netpanzer/src/Lib/2D/Surface.cpp:1.27 Tue Sep 23 11:56:05 2003
+++ netpanzer/src/Lib/2D/Surface.cpp Tue Sep 23 19:43:18 2003
@@ -1039,143 +1039,6 @@
}
} //end Surface::drawLine
-// extractPCX
-//---------------------------------------------------------------------------
-// Purpose: Extracts PCX images from the specified PCX file. Given the number
-// of columnsand gapspace of each frame, the number of rows can be
-// automatically calculated. Gapspace corresponds only to the border
-// pixel width to the right and bottom of the first image. Therefore,
-// all images but the top row and left-most row are surrounded by the
-// pixel width defined by gapspace.
-//---------------------------------------------------------------------------
-void Surface::extractPCX(const char *filename, int nCols, int gapSpace)
-{
- assert(getDoesExist());
- assert(this != 0);
-
- Surface pcx;
- pcx.loadPCX(filename);
-
- // We are going to extract accross columns, then rows.
- int col = 0;
- int xPos = 0;
- int yPos = 0;
-
- for (int frameNum = 0 ; frameNum < frameCount ; ++frameNum) {
- setFrame(frameNum);
-
- pcx.blt(*this, xPos, yPos);
-
- if (++col >= nCols) {
- col = 0;
- xPos = 0;
- yPos -= pix.y + gapSpace;
- } else {
- xPos -= pix.x + gapSpace;
- }
- }
-
- // Reset back to the first frame
- setFrame(0);
-} // end Surface::extractPCX
-
-#ifdef MSVC
-#pragma pack (1)
-#endif
-struct PCX_HEADER
-{
- char manufacturer;
- char version;
- char encoding;
- char bitsPerPixel;
- short xPos;
- short yPos;
- short width;
- short height;
- short hres;
- short vres;
- char egaPalette[48];
- char reserved;
- char numColorPlanes;
- short bytesPerLine;
- short paletteType;
- char padding[58];
-}
-__attribute__((packed));
-#ifdef MSVC
-#pragma pack ()
-#endif
-
-// loadPCX
-//---------------------------------------------------------------------------
-// Purpose: Loads in a single PCX from the specified filename. Memory for
-// this image will automatically allocated unless otherwise
-// specified. The PCX palette can be set by sending a palette var
-// into the palette field.
-//---------------------------------------------------------------------------
-void Surface::loadPCX(const char *fileName, bool needAlloc /* = true */,
- void *returnPalette /* = 0 */)
-{
- assert(this != 0);
-
- if (needAlloc) free();
-
- // Open the PCX file
- FILE *fp = fopen(fileName,"rb");
- if (fp == 0)
- throw Exception("Unable to open %s", fileName);
-
- // Read in the header
- PCX_HEADER header;
- fread(&header, sizeof(PCX_HEADER), 1, fp);
-
- if (ferror(fp))
- throw Exception("Error reading .pcx file %s", fileName);
-
- if (header.manufacturer != 0x0a || header.version != 5)
- throw Exception("%s is not a valid 8-bit PCX file", fileName);
-
- if (needAlloc) {
- // Allocate room for the PCX, check to see if we need the palette.
- if (!alloc(header.width-header.xPos+1, header.height-header.yPos+1,
false, header.width-header.xPos+1, 1)) {
- throw Exception("Not enough memory to load PCX image %s",
fileName);
- }
- } else {
- // Check and make sure the picture will fit
- if (pix.x < header.width || pix.y < header.height)
- throw Exception("Not enough memory to load PCX image %s",
- fileName);
- }
- if (returnPalette != 0) {
- // Move to the end of the file and back up to the start of the
palette
- fseek(fp, -768L, SEEK_END);
-
- ((Palette *) returnPalette)->read(fp);
- }
-
- fseek(fp, 128L, SEEK_SET);
-
- // Decode the picture
- PIX *d = mem;
- DWORD size = DWORD(pix.x) * DWORD(pix.y);
- long unsigned index = 0;
- while (index < size) {
- int data = fgetc(fp); // If it's a run of
bytes field.
- if (data < 0) break;
- if ((data & 0xc0) == 0xc0) {
// And off the high bits.
- int runLength = data & 0x3f;
- data = fgetc(fp);
- if (data < 0) break;
- while (runLength--) d[index++] = data; // Run the byte (data).
- } else {
- d[index++] = data; // Else just store it.
- }
- }
- if (ferror(fp))
- throw Exception("Error reading .pcx file %s", fileName);
- fclose(fp);
-} // end Surface::loadPCX
-
// flipHorizontal
//---------------------------------------------------------------------------
// Purpose: Goes through all the frames of the surface and mirrors them
@@ -1294,69 +1157,6 @@
}
} // end ROTATE
-// loadRaw
-//---------------------------------------------------------------------------
-// Purpose: Loads a ".raw" file, which is not actually a raw because it
-// has dimension information in the header, so I need to rename
-// eventually.
-//---------------------------------------------------------------------------
-void Surface::loadRAW(const char *filename, bool needAlloc /* = true */)
-{
- assert(this != 0);
-
- if (needAlloc) free();
-
- // Open the TIL file
- FILE *fp = fopen(filename, "rb");
- if (fp == 0)
- throw Exception("ERROR: Unable to load raw %s", filename);
-
- // Read in the header
- PIC_HEAD head;
-
- fread(&head, sizeof(PIC_HEAD), 1, fp);
-
- LOG(("loadRAW -> picName: %s", filename));
- LOG(("head.xPix: %lu", head.xPix));
- LOG(("head.yPix: %lu", head.yPix));
- LOG(("head.frameCount: %lu", head.frameCount));
- LOG(("head.numBytes: %lu", head.xPix*head.yPix*head.frameCount));
-
- if (ferror(fp)) {
- ////MessageBox(gapp.hwndApp, "Error reading .raw file.", "Shit",
MB_OK);
- throw Exception("Error reading .pcx file %s", filename);
- }
-
- if (needAlloc) {
- create(head.xPix, head.yPix, head.xPix, head.frameCount);
- } else {
- // Check and make sure the picture will fit
- if (pix.x < signed(head.xPix) || pix.y < signed(head.yPix) ||
frameCount < signed(head.frameCount)) {
- ////MessageBox(gapp.hwndApp, "During loadTil, you chose to not
allocate the memory for the image, but the was not enough already memory
already allocated.", "Shit", MB_OK);
- throw Exception("error during loadTil");
- }
- }
-
- if (ferror(fp)) {
- throw Exception("Error reading file %s", filename);
- }
-
- assert(frame0 != 0);
- assert(mem != 0);
- assert(unsigned(pix.x) == head.xPix);
- assert(unsigned(pix.y) == head.yPix);
-
- // Read in the raw data of the tiles.
- DWORD numBytes = pix.x*pix.y*frameCount;
- fread(mem, numBytes, 1, fp);
-
- if (ferror(fp)) {
- throw Exception("Error reading file %s", filename);
- }
-
- fclose(fp);
-} // end Surface::loadRaw
-
// shade
//---------------------------------------------------------------------------
// Purpose: Shades every other pixel which gies the surface a mesh look. The
@@ -2333,42 +2133,6 @@
fwrite(mem, numBytes, 1, fp);
} // end Surface::saveTIL
-
-// loadRAW
-int Surface::loadRAW(const char *filename, const iXY pix)
-{
- FILE *fp = fopen(filename, "rb");
- if (fp == 0) return 0;
-
- loadRAW(fp, pix);
-
- fclose(fp);
-
- return 1;
-
-} // end Surface::loadRAW
-
-// loadRAW
-void Surface::loadRAW(FILE *fp, const iXY pix)
-{
- if (fp == 0) return;
- if (pix.x <= 0) return;
- if (pix.y <= 0) return;
-
- if (frame0 == 0 || mem == 0 || this->pix.x != pix.x || this->pix.y !=
pix.y) {
- create(pix.x, pix.y, pix.x, 1);
- }
-
- int numBytes = pix.x * pix.y * sizeof(BYTE);
-
- if (numBytes <= 0) return;
- if (mem == 0) {
- throw Exception("ERROR: This should not happen.");
- }
-
- fread(mem, numBytes, 1, fp);
-
-} // end Surface::loadRAW
// setBrightness
void Surface::setBrightness(int percent)
Index: netpanzer/src/Lib/2D/Surface.hpp
diff -u netpanzer/src/Lib/2D/Surface.hpp:1.11
netpanzer/src/Lib/2D/Surface.hpp:1.12
--- netpanzer/src/Lib/2D/Surface.hpp:1.11 Fri Sep 19 11:22:30 2003
+++ netpanzer/src/Lib/2D/Surface.hpp Tue Sep 23 19:43:18 2003
@@ -481,17 +481,12 @@
}
PIX getAverageColor();
- void loadPCX(const char *filename, bool needAlloc = true, void
*returnPalette = 0);
- void extractPCX(const char *filename, int nCols, int gapSpace);
- void loadRAW(const char *fileName, bool needAlloc = true);
virtual int loadTIL(const char* filename);
virtual void loadTIL(FILE *fp);
int saveTIL(const char *filename);
void saveTIL(FILE *fp);
void saveAllTIL(const char *path);
- int loadRAW(const char *filename, const iXY pix);
- void loadRAW(FILE *fp, const iXY pix);
void scale(const iXY &pix);
inline void scale(int x, int y)
Index: netpanzer/src/Lib/FileSystem.cpp
diff -u netpanzer/src/Lib/FileSystem.cpp:1.7
netpanzer/src/Lib/FileSystem.cpp:1.8
--- netpanzer/src/Lib/FileSystem.cpp:1.7 Sat Sep 20 18:40:15 2003
+++ netpanzer/src/Lib/FileSystem.cpp Tue Sep 23 19:43:18 2003
@@ -92,6 +92,20 @@
PHYSFS_deinit();
}
+void FileSystem::addToSearchPath(const char* directory, bool append)
+{
+ if(!PHYSFS_addToSearchPath(directory, append))
+ throw Exception("Couldn't add '%s' to searchpath: %s", directory,
+ PHYSFS_getLastError());
+}
+
+void FileSystem::removeFromSearchPath(const char* directory)
+{
+ if(!PHYSFS_removeFromSearchPath(directory))
+ throw Exception("Couldn't remove '%s' from searchpath: %s", directory,
+ PHYSFS_getLastError());
+}
+
const char* FileSystem::getRealDir(const char* filename)
{
return PHYSFS_getRealDir(filename);
Index: netpanzer/src/Lib/FileSystem.hpp
diff -u netpanzer/src/Lib/FileSystem.hpp:1.7
netpanzer/src/Lib/FileSystem.hpp:1.8
--- netpanzer/src/Lib/FileSystem.hpp:1.7 Fri Sep 19 11:22:30 2003
+++ netpanzer/src/Lib/FileSystem.hpp Tue Sep 23 19:43:18 2003
@@ -131,6 +131,9 @@
const char* applicationname);
static void shutdown();
+ static void addToSearchPath(const char* dir, bool append = true);
+ static void removeFromSearchPath(const char* dir);
+
static const char* getRealDir(const char* filename);
static std::string getRealName(const char* filename);
// remember to call freeLisT
Index: netpanzer/src/Lib/Particles/DirtKickParticle2D.cpp
diff -u netpanzer/src/Lib/Particles/DirtKickParticle2D.cpp:1.6
netpanzer/src/Lib/Particles/DirtKickParticle2D.cpp:1.7
--- netpanzer/src/Lib/Particles/DirtKickParticle2D.cpp:1.6 Tue Sep 16
16:16:09 2003
+++ netpanzer/src/Lib/Particles/DirtKickParticle2D.cpp Tue Sep 23 19:43:18 2003
@@ -15,10 +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 "DirtKickParticle2D.hpp"
+#include "DirtKickParticle2D.hpp"
Surface DirtKickParticle2D::dirtKickSprite;
@@ -43,6 +42,7 @@
//---------------------------------------------------------------------------
void DirtKickParticle2D::init()
{
+#if 0
dirtKickSprite.create(iXY(48, 46), 48, 6);
dirtKickSprite.extractPCX("pics/particles/dirtKick.pcx", 1, 0);
@@ -51,6 +51,7 @@
dirtKickSprite.setFPS(dirtKickFPS);
dirtKickSprite.setOffset(iXY(-dirtKickSprite.getCenter().x,
-dirtKickSprite.getPix().y));
+#endif
} // end DirtKickParticle2D::init
// draw
Index: netpanzer/src/Lib/Particles/FlameParticle2D.cpp
diff -u netpanzer/src/Lib/Particles/FlameParticle2D.cpp:1.8
netpanzer/src/Lib/Particles/FlameParticle2D.cpp:1.9
--- netpanzer/src/Lib/Particles/FlameParticle2D.cpp:1.8 Tue Sep 16 16:16:09 2003
+++ netpanzer/src/Lib/Particles/FlameParticle2D.cpp Tue Sep 23 19:43:18 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 "Exception.hpp"
#include "FlameParticle2D.hpp"
@@ -27,12 +27,6 @@
const char explosionPath[] = "pics/particles/explosion/";
-// Used for packing images.
-static int maxLevel = 7;
-static int minLevel = 1;
-static int incrementLevel = 1;
-
-
// FlameParticle2D
//---------------------------------------------------------------------------
FlameParticle2D::FlameParticle2D( const fXYZ &pos,
@@ -66,61 +60,7 @@
// Check for accelerated flames.
packedSurface.setFPS(getFPS(explosionFPS, 0));
-}
-; // end FlameParticle2D::FlameParticle2D
-
-//---------------------------------------------------------------------------
-void FlameParticle2D::pakFiles()
-{
- int i;
-
- Surface tempSurface;
- PackedSurface tempPackedSurface;
-
- char strBuf[256];
-
- // Explosion 1.
- for (i = minLevel; i <= maxLevel; i += incrementLevel) {
- tempSurface.create(iXY(96, 128), 96, 16);
- sprintf(strBuf, "%s/pcx/flack1.pcx", explosionPath);
- tempSurface.extractPCX(strBuf, 5, 0);
-
- iXY newSize;
-
- float percent = float(i) / float(maxLevel);
-
- newSize.x = int(float(tempSurface.getPixX()) * percent);
- newSize.y = int(float(tempSurface.getPixY()) * percent);
-
- tempSurface.scale(newSize);
- tempSurface.setFPS(explosionFPS);
- tempPackedSurface.pack(tempSurface);
-
- sprintf(strBuf, "%s/pak/explosion1-%04d.pak", explosionPath, i);
- tempPackedSurface.save(strBuf);
- }
-
- // Explosion 2.
- for (i = minLevel; i <= maxLevel; i += incrementLevel) {
- tempSurface.create(iXY(128, 96), 128, 15);
- sprintf(strBuf, "%s/pcx/flack2.pcx", explosionPath);
- tempSurface.extractPCX(strBuf, 4, 0);
-
- iXY newSize;
-
- float percent = float(i) / float(maxLevel);
-
- newSize.x = int(float(tempSurface.getPixX()) * percent);
- newSize.y = int(float(tempSurface.getPixY()) * percent);
-
- tempSurface.scale(newSize);
- tempSurface.setFPS(explosionFPS);
- tempPackedSurface.pack(tempSurface);
-
- sprintf(strBuf, "%s/pak/explosion2-%04d.pak", explosionPath, i);
- tempPackedSurface.save(strBuf);
- }
-}
+}; // end FlameParticle2D::FlameParticle2D
// loadPakFiles
//---------------------------------------------------------------------------
Index: netpanzer/src/Lib/Particles/FlameParticle2D.hpp
diff -u netpanzer/src/Lib/Particles/FlameParticle2D.hpp:1.4
netpanzer/src/Lib/Particles/FlameParticle2D.hpp:1.5
--- netpanzer/src/Lib/Particles/FlameParticle2D.hpp:1.4 Tue Sep 16 16:16:09 2003
+++ netpanzer/src/Lib/Particles/FlameParticle2D.hpp Tue Sep 23 19:43:18 2003
@@ -15,12 +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
*/
-
#ifndef __FlameParticle2D_hpp__
#define __FlameParticle2D_hpp__
-
-
#include "Particle2D.hpp"
#include "PackedSurface.hpp"
#include "cGrowList.hpp"
@@ -44,7 +41,6 @@
virtual void draw(const Surface &dest, SpriteSorter &sorter);
- static void pakFiles();
static void loadPakFiles();
}
; // end FlameParticle2D
Index: netpanzer/src/Lib/Particles/SparkParticle2D.cpp
diff -u netpanzer/src/Lib/Particles/SparkParticle2D.cpp:1.6
netpanzer/src/Lib/Particles/SparkParticle2D.cpp:1.7
--- netpanzer/src/Lib/Particles/SparkParticle2D.cpp:1.6 Tue Sep 16 16:16:09 2003
+++ netpanzer/src/Lib/Particles/SparkParticle2D.cpp Tue Sep 23 19:43:18 2003
@@ -15,15 +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 "SparkParticle2D.hpp"
#include "TimerInterface.hpp"
-
Surface SparkParticle2D::sparkSprite;
-
//---------------------------------------------------------------------------
SparkParticle2D::SparkParticle2D(fXYZ nPos) : Particle2D(nPos)
{
@@ -41,8 +39,8 @@
//---------------------------------------------------------------------------
void SparkParticle2D::init()
{
- sparkSprite.create(iXY(96, 128), 96, 16);
- sparkSprite.extractPCX("pics/particles/explosion/pcx/flack1.pcx", 5, 0);
+ //sparkSprite.create(iXY(96, 128), 96, 16);
+ //sparkSprite.extractPCX("pics/particles/explosion/pcx/flack1.pcx", 5, 0);
//sparkSprite.setOffsetCenter();
//explosion.loadRAW("pics/explode/expl0002.raw");
Index: netpanzer/src/Lib/Particles/SparkParticle2D.hpp
diff -u netpanzer/src/Lib/Particles/SparkParticle2D.hpp:1.3
netpanzer/src/Lib/Particles/SparkParticle2D.hpp:1.4
--- netpanzer/src/Lib/Particles/SparkParticle2D.hpp:1.3 Tue Sep 16 16:16:09 2003
+++ netpanzer/src/Lib/Particles/SparkParticle2D.hpp Tue Sep 23 19:43:18 2003
@@ -15,15 +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
*/
-
#ifndef __SparkParticle2D_hpp__
#define __SparkParticle2D_hpp__
-
-
#include "Particle2D.hpp"
-
class SparkParticle2D : public Particle2D
{
public:
@@ -37,7 +33,6 @@
void static init();
void virtual draw(const Surface &dest, SpriteSorter &sorter);
-
}
; // end SparkParticle2D
Index: netpanzer/src/Lib/View/View.cpp
diff -u netpanzer/src/Lib/View/View.cpp:1.15
netpanzer/src/Lib/View/View.cpp:1.16
--- netpanzer/src/Lib/View/View.cpp:1.15 Mon Sep 22 09:53:49 2003
+++ netpanzer/src/Lib/View/View.cpp Tue Sep 23 19:43:18 2003
@@ -1275,56 +1275,6 @@
} // end addButtonSurfaceSingle
-// ADD cButton
-//---------------------------------------------------------------------------
-// Purpose:
-//---------------------------------------------------------------------------
-void View::addButton(const iXY &pos, const char *name, const char *toolTip,
- ITEM_FUNC func)
-{
- assert(this != 0);
-
- // Grow the list
- buttons.setNum(buttons.getCount()+1);
- cButton &b = buttons[buttons.getCount()-1];
- b.create(pos, name, toolTip, func);
-} // end ADD cButton
-
-// addButtonPCX
-//---------------------------------------------------------------------------
-// Purpose: Makes a button out of a PCX image.
-//---------------------------------------------------------------------------
-void View::addButtonPCX(const iXY &pos,
- const char *filename,
- const char *toolTip,
- ITEM_FUNC func)
-{
- assert(this != 0);
-
- // Grow the list.
- buttons.setNum(buttons.getCount()+1);
- cButton &b = buttons[buttons.getCount()-1];
-
- // Create the button.
- b.createPCX(pos, filename, toolTip, func);
-} // end addButtonPCX
-
-//---------------------------------------------------------------------------
-void View::addButton( const iXY &pos,
- const ANIMATED_BUTTON_TYPE_PCX &topButton,
- const ANIMATED_BUTTON_TYPE_PCX &bottomButton,
- const char *toolTip,
- ITEM_FUNC leftClickFunc,
- ITEM_FUNC rightClickFunc)
-{
- assert(this != 0);
-
- // Grow the list
- buttons.setNum(buttons.getCount()+1);
- cButton &b = buttons[buttons.getCount()-1];
- b.create(pos, topButton, bottomButton, toolTip, leftClickFunc,
rightClickFunc);
-} // end ADD cButton
-
// setSearchName
//---------------------------------------------------------------------------
// Purpose: Sets the title of the window.
Index: netpanzer/src/Lib/View/View.hpp
diff -u netpanzer/src/Lib/View/View.hpp:1.6 netpanzer/src/Lib/View/View.hpp:1.7
--- netpanzer/src/Lib/View/View.hpp:1.6 Sat Sep 20 13:52:46 2003
+++ netpanzer/src/Lib/View/View.hpp Tue Sep 23 19:43:18 2003
@@ -196,7 +196,6 @@
// cButton Functions.
void addButtonPackedSurface(const iXY &pos, PackedSurface &source, const
char *toolTip, ITEM_FUNC leftClickFunc);
- void addButtonPCX(const iXY &pos, const char *filename, const char
*toolTip, ITEM_FUNC func);
void addButtonCenterText(const iXY &pos, const int &xSize, const char
*nName, const char *nToolTip, ITEM_FUNC nLeftClickFunc);
void addButtonTIL(const iXY &pos, const char *imageName, const char
*toolTip, ITEM_FUNC func, const bool &isBordered);
inline void addButtonTIL(const iXY &pos, const char *imageName, const char
*toolTip, ITEM_FUNC func)
@@ -209,8 +208,6 @@
}
void addButtonSurface(const iXY &pos, Surface &source, const char
*toolTip, ITEM_FUNC func);
void addButtonSurfaceSingle(const iXY &pos, Surface &source, const char
*toolTip, ITEM_FUNC func);
- void addButton(const iXY &pos, const char *name, const char *toolTip,
ITEM_FUNC func);
- void addButton(const iXY &pos, const ANIMATED_BUTTON_TYPE_PCX &topButton,
const ANIMATED_BUTTON_TYPE_PCX &bottomButton, const char *nToolTip, ITEM_FUNC
nLeftClickFunc, ITEM_FUNC nRightClickFunc);
/*!FIXME!*/ void drawDefinedButtons (const Surface &clientArea);
void drawHighlightedButton(const Surface &clientArea);
void drawPressedButton(const Surface &clientArea);
Index: netpanzer/src/Lib/View/cButton.cpp
diff -u netpanzer/src/Lib/View/cButton.cpp:1.6
netpanzer/src/Lib/View/cButton.cpp:1.7
--- netpanzer/src/Lib/View/cButton.cpp:1.6 Tue Sep 16 16:16:11 2003
+++ netpanzer/src/Lib/View/cButton.cpp Tue Sep 23 19:43:18 2003
@@ -15,9 +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 "cButton.hpp"
#include "Surface.hpp"
#include "Exception.hpp"
@@ -43,46 +42,6 @@
cButton::leftClickFunc = leftClickFunc;
}
-// CREATE
-//---------------------------------------------------------------------------
-void cButton::create(iXY pos, const char *nName, const char *nToolTip,
- ITEM_FUNC nLeftClickFunc)
-{
- Surface tempTopSurface;
-
- const unsigned GAP_SPACE = 6;
- int xSize = strlen(nName) * CHAR_XPIX + GAP_SPACE + 1;
- int ySize = CHAR_YPIX + GAP_SPACE;
- tempTopSurface.create(iXY(xSize, ySize), xSize, 3);
-
- // Make the unselected button
- tempTopSurface.fill(componentBodyColor);
- tempTopSurface.drawButtonBorder(iRect(0, 0, xSize, ySize),
topLeftBorderColor, bottomRightBorderColor);
- tempTopSurface.bltString(GAP_SPACE / 2 + 1, GAP_SPACE / 2, nName,
componentInActiveTextColor);
-
- // Make the mouse-over button
- tempTopSurface.setFrame(1);
- tempTopSurface.fill(componentBodyColor);
- tempTopSurface.drawButtonBorder(iRect(0, 0, xSize, ySize),
topLeftBorderColor, bottomRightBorderColor);
- tempTopSurface.bltString(GAP_SPACE / 2 + 1, GAP_SPACE / 2, nName,
componentFocusTextColor);
-
- // Make the selected button
- tempTopSurface.setFrame(2);
- tempTopSurface.fill(componentBodyColor);
- tempTopSurface.drawButtonBorder(iRect(0, 0, xSize, ySize),
bottomRightBorderColor, topLeftBorderColor);
- tempTopSurface.bltString(GAP_SPACE / 2 + 2, GAP_SPACE / 2 + 1, nName,
componentActiveTextColor);
-
- setName(nName); assert(name != 0);
- toolTip = strdup(nToolTip); assert(toolTip != 0);
- bounds = iRect(pos.x, pos.y, pos.x + tempTopSurface.getPix().x,
pos.y + tempTopSurface.getPix().y);
- leftClickFunc = nLeftClickFunc;
-
- tempTopSurface.setFrame(0);
-
- topSurface.pack(tempTopSurface);
-
-} // end CREATE
-
// createCenterText
//---------------------------------------------------------------------------
// Purpose: Creates a button with the name centered in the absolute horizontal
@@ -280,69 +239,6 @@
} // end createSurfaceSingle
-// create
-//---------------------------------------------------------------------------
-void cButton::create(iXY pos,
- const char *imageName0,
- const char *imageName1,
- const char *imageName2,
- const char *nName,
- const char *nToolTip,
- ITEM_FUNC nLeftClickFunc)
-{
- Surface tempTopSurface;
-
- tempTopSurface.create(iXY(32, 32), 32, 3);
- tempTopSurface.setFrame(0);
- tempTopSurface.loadRAW(imageName0, false);
- tempTopSurface.setFrame(1);
- tempTopSurface.loadRAW(imageName1, false);
- tempTopSurface.setFrame(2);
- tempTopSurface.loadRAW(imageName2, false);
- setName(nName); assert(name != 0);
- toolTip = strdup(nToolTip); assert(toolTip != 0);
- bounds = iRect(pos.x, pos.y, pos.x+tempTopSurface.getPix().x,
pos.y+tempTopSurface.getPix().y);
- leftClickFunc = nLeftClickFunc;
-
- topSurface.pack(tempTopSurface);
-
-} // end create
-
-// create
-//---------------------------------------------------------------------------
-// Purpose: Adds a button which has 2 animated surfaces as the button.
-//---------------------------------------------------------------------------
-void cButton::create(iXY pos, ANIMATED_BUTTON_TYPE_PCX topButton,
- ANIMATED_BUTTON_TYPE_PCX bottomButton,
- const char *nToolTip, ITEM_FUNC nLeftClickFunc,
- ITEM_FUNC nRightClickFunc)
-{
- Surface tempTopSurface;
-
- tempTopSurface.create(iXY(topButton.size.x, topButton.size.y),
topButton.size.x, topButton.numFrames);
- tempTopSurface.extractPCX(topButton.filename, topButton.numColumns,
topButton.gapSpace);
- tempTopSurface.scale(iXY(topButton.scale.x, topButton.scale.y));
- tempTopSurface.setFPS((int) topButton.fps);
- /*
- bottomSurface.create(iXY(bottomButton.size.x, bottomButton.size.y),
bottomButton.size.x, bottomButton.numFrames);
- bottomSurface.extractPCX(bottomButton.filename,
bottomButton.numColumns, bottomButton.gapSpace);
- bottomSurface.scale(iXY(bottomButton.scale.x, bottomButton.scale.y));
- bottomSurface.setFPS(bottomButton.fps);
-
- // Make sure the button pics are the same size.
- assert(tempTopSurface.getPix().x == bottomSurface.getPix().x &&
- tempTopSurface.getPix().y == bottomSurface.getPix().y);
- */
- toolTip = strdup(nToolTip); assert(toolTip != 0);
- bounds = iRect(pos.x, pos.y, pos.x+tempTopSurface.getPix().x,
pos.y+tempTopSurface.getPix().y);
-
- leftClickFunc = nLeftClickFunc;
- rightClickFunc = nRightClickFunc;
-
- topSurface.pack(tempTopSurface);
-
-} // end create
-
// RESET
//---------------------------------------------------------------------------
void cButton::reset()
@@ -362,45 +258,3 @@
if (buttonName == 0) throw Exception("ERROR: Unable to allocate button
name: %s", buttonName);
} // end SET NAME
-// createPCX
-//---------------------------------------------------------------------------
-void cButton::createPCX(iXY pos,
- const char *filename,
- const char *nToolTip,
- ITEM_FUNC nLeftClickFunc)
-{
- //SURFACE tempSurface;
- //tempSurface.loadPCX(filename);
- //tempTopSurface.loadPCX(filename);
-
- //iXY nSize(tempTopSurface.getPix());
-
- Surface tempTopSurface;
-
- tempTopSurface.create(22, 22, 22, 3);
-
- // Make the unselected button
- tempTopSurface.setFrame(0);
- tempTopSurface.loadPCX(filename, false, 0);
- tempTopSurface.drawButtonBorder(Color::white, Color::gray64);
-
- // Make the mouse-over button
- tempTopSurface.setFrame(1);
- tempTopSurface.loadPCX(filename, false, 0);
- tempTopSurface.drawButtonBorder(Color::red, Color::red);
-
- // Make the selected button
- tempTopSurface.setFrame(2);
- tempTopSurface.loadPCX(filename, false, 0);
- tempTopSurface.drawButtonBorder(Color::gray64, Color::white);
-
- setName(filename); assert(name != 0);
- toolTip = strdup(nToolTip); assert(toolTip != 0);
- bounds = iRect(pos.x, pos.y, pos.x+tempTopSurface.getPix().x,
pos.y+tempTopSurface.getPix().y);
- leftClickFunc = nLeftClickFunc;
-
- tempTopSurface.setFrame(0);
-
- topSurface.pack(tempTopSurface);
-
-} // end createPCX
Index: netpanzer/src/Lib/View/cButton.hpp
diff -u netpanzer/src/Lib/View/cButton.hpp:1.5
netpanzer/src/Lib/View/cButton.hpp:1.6
--- netpanzer/src/Lib/View/cButton.hpp:1.5 Tue Sep 16 16:16:11 2003
+++ netpanzer/src/Lib/View/cButton.hpp Tue Sep 23 19:43:18 2003
@@ -23,21 +23,8 @@
#include "iRect.hpp"
#include "PackedSurface.hpp"
-
class Surface;
-
-struct ANIMATED_BUTTON_TYPE_PCX
-{
- char filename[80];
- iXY scale;
- iXY size;
- unsigned numColumns;
- unsigned numFrames;
- float fps;
- unsigned gapSpace;
-};
-
class cButton
{
public:
@@ -80,9 +67,6 @@
void createPacked(const iXY &pos, PackedSurface &source, const char
*toolTip, ITEM_FUNC leftClickFunc);
- void createPCX(iXY pos, const char *filename, const char *nToolTip,
ITEM_FUNC nLeftClickFunc);
-
- void create(iXY pos, const char *nName, const char *nToolTip, ITEM_FUNC
nLeftClickFunc);
void createCenterText(iXY pos, int xSize, const char *nName, const char
*nToolTip, ITEM_FUNC nLeftClickFunc);
void createTIL(iXY pos, const char *imageName, const char *nToolTip,
ITEM_FUNC nLeftClickFunc, bool isBordered);
@@ -106,14 +90,6 @@
}
void createSurfaceSingle(iXY pos, Surface &source, const char *nToolTip,
ITEM_FUNC nLeftClickFunc);
- void create(iXY pos, const char *imageName0, const char *imageName1,
- const char *imageName2, const char *nName,
- const char *nToolTip, ITEM_FUNC nLeftClickFunc);
-
- void create(iXY pos, ANIMATED_BUTTON_TYPE_PCX topButton,
- ANIMATED_BUTTON_TYPE_PCX bottomButton,
- const char *nToolTip, ITEM_FUNC nLeftClickFunc,
- ITEM_FUNC nRightClickFunc);
inline bool contains(iXY pos)
{
Index: netpanzer/src/NetPanzer/Classes/Weapons/Weapon.cpp
diff -u netpanzer/src/NetPanzer/Classes/Weapons/Weapon.cpp:1.10
netpanzer/src/NetPanzer/Classes/Weapons/Weapon.cpp:1.11
--- netpanzer/src/NetPanzer/Classes/Weapons/Weapon.cpp:1.10 Tue Sep 16
16:16:12 2003
+++ netpanzer/src/NetPanzer/Classes/Weapons/Weapon.cpp Tue Sep 23 19:43:18 2003
@@ -72,6 +72,8 @@
void Weapon::packFiles()
{
+ throw Exception("not support anymore");
+#if 0
Surface tempSurface;
Surface tempRotateSurface;
PackedSurface tempPackSurface;
@@ -126,6 +128,7 @@
//
//tempPackSurface.pack(tempShellSurface);
//tempPackSurface.save("pics/particles/shells/pak/shells.pak");
+#endif
}
Weapon::Weapon(UnitID &owner, unsigned short owner_type_id, unsigned short
damage, iXY &start, iXY &end)
Index: netpanzer/src/NetPanzer/Core/main.cpp
diff -u netpanzer/src/NetPanzer/Core/main.cpp:1.8
netpanzer/src/NetPanzer/Core/main.cpp:1.9
--- netpanzer/src/NetPanzer/Core/main.cpp:1.8 Fri Sep 19 20:05:29 2003
+++ netpanzer/src/NetPanzer/Core/main.cpp Tue Sep 23 19:43:18 2003
@@ -138,6 +138,9 @@
// Initialize libphysfs
try {
FileSystem::initialize(argv[0], "netpanzer", "netpanzer");
+#ifdef DATADIR
+ FileSystem::addToSearchPath(DATADIR);
+#endif
} catch(Exception e) {
fprintf(stderr, "%s", e.getMessage());
shutdown();
Index: netpanzer/src/NetPanzer/Views/Game/ChatView.cpp
diff -u netpanzer/src/NetPanzer/Views/Game/ChatView.cpp:1.6
netpanzer/src/NetPanzer/Views/Game/ChatView.cpp:1.7
--- netpanzer/src/NetPanzer/Views/Game/ChatView.cpp:1.6 Tue Sep 16 16:16:12 2003
+++ netpanzer/src/NetPanzer/Views/Game/ChatView.cpp Tue Sep 23 19:43:18 2003
@@ -32,26 +32,6 @@
chatView.addMessage( message_text );
}
-/////////////////////////////////////////////////////////////////////////////
-// Button functions.
-/////////////////////////////////////////////////////////////////////////////
-
-static void sendMessageAllPlayers()
-{
- ChatInterface::setMessageScopeAll();
-}
-
-static void sendMessageAllies()
-{
- ChatInterface::setMessageScopeAllies();
-}
-
-static void sendMessageFoes()
-{
- ChatInterface::setMessageScopeEnemies();
-}
-
-
// ChatView
//---------------------------------------------------------------------------
ChatView::ChatView() : GameTemplateView()
Index: netpanzer/src/NetPanzer/Views/Game/GameInfoView.cpp
diff -u netpanzer/src/NetPanzer/Views/Game/GameInfoView.cpp:1.8
netpanzer/src/NetPanzer/Views/Game/GameInfoView.cpp:1.9
--- netpanzer/src/NetPanzer/Views/Game/GameInfoView.cpp:1.8 Mon Sep 22
09:53:53 2003
+++ netpanzer/src/NetPanzer/Views/Game/GameInfoView.cpp Tue Sep 23 19:43:18 2003
@@ -28,23 +28,6 @@
#include "NetworkState.hpp"
#include "String.hpp"
-
-static int getPlayerKills()
-{
- PlayerState *player_state;
-
- player_state = PlayerInterface::getLocalPlayerState();
- return( (int) player_state->getKills() );
-}
-
-static int getPlayerLosses()
-{
- PlayerState *player_state;
-
- player_state = PlayerInterface::getLocalPlayerState();
- return( (int) player_state->getLosses() );
-}
-
static int getPlayerFrags()
{
PlayerState *player_state;
Index: netpanzer/src/NetPanzer/Views/Game/GameToolbarView.cpp
diff -u netpanzer/src/NetPanzer/Views/Game/GameToolbarView.cpp:1.4
netpanzer/src/NetPanzer/Views/Game/GameToolbarView.cpp:1.5
--- netpanzer/src/NetPanzer/Views/Game/GameToolbarView.cpp:1.4 Tue Sep 16
16:16:12 2003
+++ netpanzer/src/NetPanzer/Views/Game/GameToolbarView.cpp Tue Sep 23
19:43:18 2003
@@ -161,9 +161,9 @@
addButtonCenterText(pos, buttonSizeX - (15 + 1) * 2 - 1, "Mini Map",
"Toggle the visibility of the mini map", bToggleMiniMap);
pos.x = buttonSizeX - (15 + 1) * 2;
- addButton(pos, "-", "", bDecreaseMiniMapSize);
+ addButtonCenterText(pos, 15+1, "-", "", bDecreaseMiniMapSize);
pos.x += 15 + 1;
- addButton(pos, "+", "", bIncreaseMiniMapSize);
+ addButtonCenterText(pos, 15+1, "+", "", bIncreaseMiniMapSize);
pos.x += 15 + 1;
pos.x = 0;
@@ -186,13 +186,13 @@
addLabel(iXY(pos.x + 2, pos.y + 3), "Group", Color::white);
pos.x += 48 + 1 + 4;
- addButton(pos, "1", "", bSetGroup1);
+ addButtonCenterText(pos, 15+1, "1", "", bSetGroup1);
pos.x += 15 + 1;
- addButton(pos, "2", "", bSetGroup2);
+ addButtonCenterText(pos, 15+1, "2", "", bSetGroup2);
pos.x += 15 + 1;
- addButton(pos, "3", "", bSetGroup3);
+ addButtonCenterText(pos, 15+1, "3", "", bSetGroup3);
pos.x += 15 + 1;
- addButton(pos, "4", "", bSetGroup4);
+ addButtonCenterText(pos, 15+1, "4", "", bSetGroup4);
pos.x += 15 + 1;
pos.x = 0;
@@ -200,13 +200,13 @@
addLabel(iXY(pos.x + 2, pos.y + 3), "Recall", Color::white);
pos.x += 48 + 1 + 4;
- addButton(pos, "1", "", bRecallGroup1);
+ addButtonCenterText(pos, 15+1, "1", "", bRecallGroup1);
pos.x += 15 + 1;
- addButton(pos, "2", "", bRecallGroup2);
+ addButtonCenterText(pos, 15+1, "2", "", bRecallGroup2);
pos.x += 15 + 1;
- addButton(pos, "3", "", bRecallGroup3);
+ addButtonCenterText(pos, 15+1, "3", "", bRecallGroup3);
pos.x += 15 + 1;
- addButton(pos, "4", "", bRecallGroup4);
+ addButtonCenterText(pos, 15+1, "4", "", bRecallGroup4);
pos.x += 15 + 1;
pos.y += yOffset;
Index: netpanzer/src/NetPanzer/Views/Game/VehicleSelectionView.cpp
diff -u netpanzer/src/NetPanzer/Views/Game/VehicleSelectionView.cpp:1.10
netpanzer/src/NetPanzer/Views/Game/VehicleSelectionView.cpp:1.11
--- netpanzer/src/NetPanzer/Views/Game/VehicleSelectionView.cpp:1.10 Mon Sep
22 09:53:53 2003
+++ netpanzer/src/NetPanzer/Views/Game/VehicleSelectionView.cpp Tue Sep 23
19:43:18 2003
@@ -250,47 +250,6 @@
bOK();
}
-
-static void bSelectHovercraft()
-{
- if (vsvSelectedUnit == _unit_type_null && vsvUnitGenOn) {
- Desktop::setVisibilityNoDoAnything("VehicleSelectionView", false);
- return;
- }
-
- vsvSelectedUnit = _unit_type_null;
- changeMade = true;
- bSetPowerOn();
- bOK();
-}
-
-static void bSelectCommKilller()
-{
- if (vsvSelectedUnit == _unit_type_null && vsvUnitGenOn) {
- Desktop::setVisibilityNoDoAnything("VehicleSelectionView", false);
- return;
- }
-
- vsvSelectedUnit = _unit_type_null;
- changeMade = true;
- bSetPowerOn();
- bOK();
-}
-
-static void bSelectRefuelingTruck()
-{
- if (vsvSelectedUnit == _unit_type_null && vsvUnitGenOn) {
- Desktop::setVisibilityNoDoAnything("VehicleSelectionView", false);
- return;
- }
-
- vsvSelectedUnit = _unit_type_null;
- changeMade = true;
- bSetPowerOn();
- bOK();
-}
-
-
// VehicleSelectionView
//---------------------------------------------------------------------------
VehicleSelectionView::VehicleSelectionView() : GameTemplateView()
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostOptionsView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostOptionsView.cpp:1.5
netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostOptionsView.cpp:1.6
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostOptionsView.cpp:1.5
Mon Sep 22 09:53:54 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostOptionsView.cpp Tue Sep
23 19:43:18 2003
@@ -37,49 +37,11 @@
return GameConfig::GetNumberPlayers();
}
-static int getMaxPlayersCount()
-{
- return GameConfig::getNumberUnitsBoundsUpper();
-}
-
static int getCurMaxUnitCount()
{
return GameConfig::GetNumberUnits();
}
-static int getMaxUnitCount()
-{
- return GameConfig::getNumberUnitsBoundsUpper();
-}
-
-static int getRespawnUnitCount()
-{
- return GameConfig::GetNumberInitialUnits();
-}
-
-static int getMaxRespawnUnitCount()
-{
- return GameConfig::getNumberInitialUnitsBoundUpper();
-}
-
-static const char *getAllowAllies()
-{
- return GameConfig::getAllieStateString();
- //return "Yes";
-}
-
-static const char *getSpawnPlacement()
-{
- return GameConfig::getRespawnTypeString();
- //return "Round Robin";
-}
-
-static const char *getAllowFogOfWar()
-{
- //return GameConfig::getAllowFogOfWarString()
- return "Not available in netPanzerTest.";
-}
-
static void bDecreasePlayerCount()
{
GameConfig::SetNumberPlayers(GameConfig::GetNumberPlayers() - 1);
@@ -100,58 +62,6 @@
GameConfig::SetNumberUnits(GameConfig::GetNumberUnits() + 5);
}
-static void bDecreaseRespawnCount()
-{
- GameConfig::SetNumberInitialUnits(GameConfig::GetNumberInitialUnits() - 1);
-}
-
-static void bIncreaseRespawnCount()
-{
- GameConfig::SetNumberInitialUnits(GameConfig::GetNumberInitialUnits() + 1);
-}
-
-static void bSetAllowAlliesFalse()
-{
- GameConfig::setAllieState(false);
-}
-
-static void bSetAllowAlliesTrue()
-{
- GameConfig::setAllieState(true);
-}
-
-static void bPreviousSpawnPlacement()
-{
- GameConfig::setPreviousRespawnType();
-}
-
-static void bNextSpawnPlacement()
-{
- GameConfig::setNextRespawnType();
-}
-
-static void bIncreaseCloudCoverage()
-{
-
HostOptionsView::setCloudCoverageCount(HostOptionsView::getCloudCoverageCount()
+ 1);
-
- if (HostOptionsView::getCloudCoverageCount() > 4) {
- HostOptionsView::setCloudCoverageCount(4);
- }
-
- HostOptionsView::updateGameConfigCloudCoverage();
-}
-
-static void bDecreaseCloudCoverage()
-{
-
HostOptionsView::setCloudCoverageCount(HostOptionsView::getCloudCoverageCount()
- 1);
-
- if (HostOptionsView::getCloudCoverageCount() < 0) {
- HostOptionsView::setCloudCoverageCount(0);
- }
-
- HostOptionsView::updateGameConfigCloudCoverage();
-}
-
void HostOptionsView::updateGameConfigCloudCoverage()
{
// Make sure the cloud settings are the same for different size
@@ -240,38 +150,6 @@
}
return( "Unknown" );
-}
-
-static void bSetAllowFogOfWarFalse()
-{
- //GameConfig::setAllowFogOfWar(false);
-}
-
-static void bSetAllowFogOfWarTrue()
-{
- //GameConfig::setAllowFogOfWar(true);
-}
-
-static void bIncreaseWindSpeed()
-{
- HostOptionsView::setWindSpeed(HostOptionsView::getWindSpeed() + 1);
-
- if(HostOptionsView::getWindSpeed() > 4) {
- HostOptionsView::setWindSpeed(4);
- }
-
- HostOptionsView::updateWindSpeedString();
-}
-
-static void bDecreaseWindSpeed()
-{
- HostOptionsView::setWindSpeed(HostOptionsView::getWindSpeed() - 1);
-
- if(HostOptionsView::getWindSpeed() < 0) {
- HostOptionsView::setWindSpeed(0);
- }
-
- HostOptionsView::updateWindSpeedString();
}
static void bIncreaseTimeLimit()
Index: netpanzer/src/NetPanzer/Views/MainMenu/OptionsTemplateView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/OptionsTemplateView.cpp:1.7
netpanzer/src/NetPanzer/Views/MainMenu/OptionsTemplateView.cpp:1.8
--- netpanzer/src/NetPanzer/Views/MainMenu/OptionsTemplateView.cpp:1.7 Thu Sep
18 13:44:18 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/OptionsTemplateView.cpp Tue Sep
23 19:43:18 2003
@@ -22,22 +22,6 @@
#include "DDHardSurface.hpp"
#include "GameViewGlobals.hpp"
-
-static void bSound()
-{
- if (Desktop::getVisible("GameView")) {
- Desktop::setVisibility("ControlsView", false);
- Desktop::setVisibility("VisualsView", false);
- Desktop::setVisibility("InterfaceView", false);
- Desktop::setVisibility("SoundView", false);
- Desktop::setVisibility("OptionsView", false);
- } else {
- Desktop::setVisibilityAllWindows(false);
- }
-
- Desktop::setVisibility("SoundView", true);
-}
-
static void bInterface()
{
if (Desktop::getVisible("GameView")) {
@@ -66,21 +50,6 @@
}
Desktop::setVisibility("VisualsView", true);
-}
-
-static void bControls()
-{
- if (Desktop::getVisible("GameView")) {
- Desktop::setVisibility("ControlsView", false);
- Desktop::setVisibility("VisualsView", false);
- Desktop::setVisibility("InterfaceView", false);
- Desktop::setVisibility("SoundView", false);
- Desktop::setVisibility("OptionsView", false);
- } else {
- Desktop::setVisibilityAllWindows(false);
- }
-
- Desktop::setVisibility("ControlsView", true);
}
// OptionsTemplateView
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [netPanzer-CVS] netpanzer/src Lib/FileSystem.cpp Lib/FileSystem...,
Matthias Braun <=