[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netPanzer-CVS] netpanzer/src ChangeLog TODO Lib/2D/ColorTable....
From: |
Matthias Braun |
Subject: |
[netPanzer-CVS] netpanzer/src ChangeLog TODO Lib/2D/ColorTable.... |
Date: |
Sat, 06 Sep 2003 16:49:45 -0400 |
CVSROOT: /cvsroot/netpanzer
Module name: netpanzer
Branch:
Changes by: Matthias Braun <address@hidden> 03/09/06 16:49:45
Modified files:
src : ChangeLog TODO
src/Lib/2D : ColorTable.cpp
src/Lib/Interfaces: UtilInterface.cpp
src/Lib/PObject/Classes: FileList.cpp
src/NetPanzer/Interfaces: GameManager.cpp
src/NetPanzer/Views/MainMenu/Multi: MapSelectionView.cpp
Added files:
src/Lib : SplitPath.cpp SplitPath.hpp
Log message:
-added a unix version of _splitpath
Patches:
Index: netpanzer/src/ChangeLog
diff -u netpanzer/src/ChangeLog:1.5 netpanzer/src/ChangeLog:1.6
--- netpanzer/src/ChangeLog:1.5 Sat Sep 6 13:15:34 2003
+++ netpanzer/src/ChangeLog Sat Sep 6 16:49:45 2003
@@ -15,6 +15,7 @@
-added a basic SDL Event loop
-fixed more small issues
=> the main menu is displayed now and the Exit and Options buttons work :)
+-added a unix verison of _splitpath
------------
prior changes (not complete)
Index: netpanzer/src/Lib/2D/ColorTable.cpp
diff -u netpanzer/src/Lib/2D/ColorTable.cpp:1.6
netpanzer/src/Lib/2D/ColorTable.cpp:1.7
--- netpanzer/src/Lib/2D/ColorTable.cpp:1.6 Sat Sep 6 12:06:18 2003
+++ netpanzer/src/Lib/2D/ColorTable.cpp Sat Sep 6 16:49:45 2003
@@ -19,6 +19,7 @@
#include <config.h>
#include <io.h>
#endif
+#include "SplitPath.hpp"
#include "Log.hpp"
#include "Exception.hpp"
#include "ColorTable.hpp"
@@ -282,19 +283,12 @@
char tablePath[256];
char tableFilename[256];
- //void _splitpath( const char *path, char *drive, char *dir, char
*fname, char *ext );
- // XXX
-#ifdef WIN32
_splitpath(Palette::getName(), 0, 0, paletteFilename, 0);
- _splitpath(filename, 0, tablePath, 0, 0);
- _splitpath(filename, 0, 0, tableFilename, 0);
+ _splitpath(filename, 0, tablePath, tableFilename, 0);
// This is dangerous, so make sure the filename can handle the length
of the possible
// sprintf.
sprintf(destname, "%s%s%s%s", tablePath, tableFilename,
paletteFilename, extension);
-#else
- strcpy(destname, filename);
-#endif
return;
Index: netpanzer/src/Lib/Interfaces/UtilInterface.cpp
diff -u netpanzer/src/Lib/Interfaces/UtilInterface.cpp:1.5
netpanzer/src/Lib/Interfaces/UtilInterface.cpp:1.6
--- netpanzer/src/Lib/Interfaces/UtilInterface.cpp:1.5 Sat Sep 6 14:59:06 2003
+++ netpanzer/src/Lib/Interfaces/UtilInterface.cpp Sat Sep 6 16:49:45 2003
@@ -22,6 +22,7 @@
#include <sys/stat.h>
#endif
#include <string.h>
+#include "SplitPath.hpp"
#include "FindFirst.hpp"
#include "UtilInterface.hpp"
@@ -49,11 +50,7 @@
{
char strBuf[256];
- // XXX
-#ifdef WIN32
- //void _splitpath( const char *path, char *drive, char *dir, char
*fname, char *ext );
_splitpath(path, 0, strBuf, 0, 0);
-#endif
return strBuf;
@@ -65,11 +62,7 @@
{
char strBuf[256];
- // XXX
-#ifdef WIN32
- //void _splitpath( const char *path, char *drive, char *dir, char
*fname, char *ext );
_splitpath(path, 0, 0, strBuf, 0);
-#endif
return strBuf;
@@ -81,11 +74,7 @@
{
char strBuf[256];
- // XXX
-#ifdef WIN32
- //void _splitpath( const char *path, char *drive, char *dir, char
*fname, char *ext );
_splitpath(path, 0, 0, 0, strBuf);
-#endif
return strBuf;
@@ -192,7 +181,5 @@
srand(0);
return;
#endif
-
srand((unsigned)time(0));
-
} // end UtilInterface::startRandomNumberGenerator
Index: netpanzer/src/Lib/PObject/Classes/FileList.cpp
diff -u netpanzer/src/Lib/PObject/Classes/FileList.cpp:1.4
netpanzer/src/Lib/PObject/Classes/FileList.cpp:1.5
--- netpanzer/src/Lib/PObject/Classes/FileList.cpp:1.4 Sat Sep 6 09:12:39 2003
+++ netpanzer/src/Lib/PObject/Classes/FileList.cpp Sat Sep 6 16:49:45 2003
@@ -15,101 +15,89 @@
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 "SplitPath.hpp"
#include "FileList.hpp"
#include <string.h>
#include <stdlib.h>
FileList::FileList() : ArrayTemplate< char * >()
{
- contains = 0;
+ contains = 0;
}
FileList::FileList( unsigned long size ) : ArrayTemplate< char * >( )
{
- initialize( size );
+ initialize( size );
}
void FileList::initialize( unsigned long size )
{
- contains = 0;
+ contains = 0;
- ArrayTemplate< char * >::initialize( size );
- for ( unsigned long i = 0; i < size; i++ )
- {
- array[i] = new char[_FILESTRING_SIZE];
- }
+ ArrayTemplate< char * >::initialize( size );
+ for ( unsigned long i = 0; i < size; i++ )
+ {
+ array[i] = new char[_FILESTRING_SIZE];
+ }
}
FileList::~FileList()
{
- for ( unsigned long i = 0; i < size; i++ )
- {
- delete[] (array[i]);
- }
+ for ( unsigned long i = 0; i < size; i++ )
+ {
+ delete[] (array[i]);
+ }
}
void FileList::addString( char *string )
{
- strcpy( array[contains], string );
- contains++;
+ strcpy( array[contains], string );
+ contains++;
}
char * FileList::getString( unsigned long index )
{
- return( array[ index ] );
+ return( array[ index ] );
}
void FileList::resetList( void )
{
- contains = 0;
+ contains = 0;
}
unsigned long FileList::containsItems( void )
{
- return( contains );
+ return contains;
}
void FileList::getFullPath( unsigned long index, char *full_path )
{
- strcpy( full_path, array[ index ] );
+ strcpy( full_path, array[ index ] );
}
void FileList::getDir( unsigned long index, char *directory )
{
- // XXX
-#ifdef WIN32
- _splitpath( array[ index ], 0, directory, 0, 0 );
-#endif
+ char* fullname = array[index];
+
+ _splitpath( array[ index ], 0, directory, 0, 0 );
}
void FileList::getFullFilename( unsigned long index, char *full_fname )
{
- char ext[256];
-
- // XXX
-#ifdef WIN32
- _splitpath( array[ index ], 0, 0, full_fname, 0 );
- _splitpath( array[ index ], 0, 0, 0, ext );
-#endif
-
- strcat( full_fname, ext );
+ char ext[256];
+ _splitpath( array[ index ], 0, 0, full_fname, 0 );
+ _splitpath( array[ index ], 0, 0, 0, ext );
+ strcat( full_fname, ext );
}
void FileList::getFilename( unsigned long index, char *fname )
{
- // XXX
-#ifdef WIN32
- _splitpath( array[ index ], 0, 0, fname, 0 );
-#endif
+ _splitpath( array[ index ], 0, 0, fname, 0 );
}
void FileList::getExtension( unsigned long index, char *extension )
{
- // XXX
-#ifdef WIN32
- _splitpath( array[ index ], 0, 0, 0, extension );
-#endif
+ _splitpath( array[ index ], 0, 0, 0, extension );
}
Index: netpanzer/src/NetPanzer/Interfaces/GameManager.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.17
netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.18
--- netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.17 Sat Sep 6
13:46:15 2003
+++ netpanzer/src/NetPanzer/Interfaces/GameManager.cpp Sat Sep 6 16:49:45 2003
@@ -204,7 +204,7 @@
#endif
setVideoMode(current_video_mode_res);
- loadPalette( "wads/netp.act" );
+ loadPalette("wads/netp.act");
}
void GameManager::shutdownVideoSubSystem()
@@ -248,7 +248,7 @@
LOG(("Initializing Game Viewing System"));
// Use this when needing to create colorfilters.
- loadPalette( "wads/netp.act" );
+ loadPalette("wads/netp.act");
initFont();
loadPics();
@@ -402,14 +402,14 @@
Desktop::checkViewPositions();
ConsoleInterface::setToSurfaceSize( current_video_mode_res );
- loadPalette( "wads/netp.act" );
+ loadPalette("wads/netp.act");
ConsoleInterface::postMessage( "Screen Resolution : %d x %d",
current_video_mode_res.x, current_video_mode_res.y );
}
// ******************************************************************
-void GameManager::loadPalette( char *palette_path )
+void GameManager::loadPalette(char *palette_path)
{
Palette::init(palette_path);
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp:1.7
netpanzer/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp:1.8
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp:1.7
Sat Sep 6 14:59:06 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/MapSelectionView.cpp Sat Sep
6 16:49:45 2003
@@ -19,6 +19,7 @@
#ifdef WIN32
#include <io.h>
#endif
+#include "SplitPath.hpp"
#include "FindFirst.hpp"
#include "MapSelectionView.hpp"
#include "gapp.hpp"
@@ -200,11 +201,7 @@
FUBAR("Map description is too long.");
}
*/
- // XXX need an alternative to _splitpath
- printf("Need Splitpath alternative!!!\n");
-#if 0
_splitpath(fileList[i].name, 0, 0, mapList[i].name, 0);
-#endif
sprintf(mapList[i].description, "%s",
netPanzerMapHeader.description);
mapList[i].cells.x = netPanzerMapHeader.x_size;
Index: netpanzer/src/TODO
diff -u netpanzer/src/TODO:1.3 netpanzer/src/TODO:1.4
--- netpanzer/src/TODO:1.3 Sat Sep 6 09:12:39 2003
+++ netpanzer/src/TODO Sat Sep 6 16:49:45 2003
@@ -25,4 +25,8 @@
-Fix the win32 stuff in Lib/Util/UtilInterface.cpp
-rewrite win32 event loop to use a SDL event loop. Don't forget to pump mouse
events to MouseInterface then.
-
+-The brightness adjustment code generates 256 version of all palettes again at
+ the beginning, leading to excessive calculations on the CPU ~9 seconds from 11
+ seconds startup time are spend calculating these palettes. We should change
+ behaviour here I assume. (Restrict 5 or 10 values, people can tune their
+ monitor too and don't need to tune ingame!)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [netPanzer-CVS] netpanzer/src ChangeLog TODO Lib/2D/ColorTable....,
Matthias Braun <=