netpanzer-cvs
[Top][All Lists]
Advanced

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

[netPanzer-CVS] netpanzer/src ChangeLog TODO Lib/Log.hpp Lib/Vi...


From: Matthias Braun
Subject: [netPanzer-CVS] netpanzer/src ChangeLog TODO Lib/Log.hpp Lib/Vi...
Date: Thu, 18 Sep 2003 13:44:19 -0400

CVSROOT:        /cvsroot/netpanzer
Module name:    netpanzer
Branch:         
Changes by:     Matthias Braun <address@hidden> 03/09/18 13:44:19

Modified files:
        src            : ChangeLog TODO 
        src/Lib        : Log.hpp 
        src/Lib/View   : Choice.cpp Choice.hpp Component.cpp 
                         Component.hpp View.cpp 
        src/NetPanzer/Classes: ViewCamera.cpp 
        src/NetPanzer/Interfaces: GameManager.cpp GameManager.hpp 
        src/NetPanzer/Views: GameViewGlobals.cpp GameViewGlobals.hpp 
        src/NetPanzer/Views/Game: GameView.cpp GameView.hpp 
        src/NetPanzer/Views/MainMenu: OptionsTemplateView.cpp 
                                      OptionsTemplateView.hpp 
        src/NetPanzer/Views/MainMenu/Options: VisualsView.cpp 
        src/UILib/SDL  : SDLSound.cpp 

Log message:
        -set sound to 22khz,8 channel only
        -fix the "Choice gets cleared on click"-bug
        -removed unused/strange options
        -still no idea (not even a hint) why the views are drawn in the middle 
in
        higher resolutions (or better why some views are not...)

Patches:
Index: netpanzer/src/ChangeLog
diff -u netpanzer/src/ChangeLog:1.26 netpanzer/src/ChangeLog:1.27
--- netpanzer/src/ChangeLog:1.26        Tue Sep 16 16:00:26 2003
+++ netpanzer/src/ChangeLog     Thu Sep 18 13:44:17 2003
@@ -1,3 +1,9 @@
+18-Sepby Matthias Braun
+-fixed the Choice-reset problem
+-removed lots of options from visualsview
+-changed sound back to 8 channels at 22k, no need to blow too much resources
+ away...
+
 16-Sep-2003 by Matthias Braun
 -randomly fixed stuff in the very ugly libview code (also removed several 
unused
  files there)
Index: netpanzer/src/Lib/Log.hpp
diff -u netpanzer/src/Lib/Log.hpp:1.5 netpanzer/src/Lib/Log.hpp:1.6
--- netpanzer/src/Lib/Log.hpp:1.5       Wed Sep 17 19:46:42 2003
+++ netpanzer/src/Lib/Log.hpp   Thu Sep 18 13:44:17 2003
@@ -19,7 +19,7 @@
 #ifndef __LIB_LOG_HPP__
 #define __LIB_LOG_HPP__
 
-#include <config.h>
+#include <stdarg.h>
 #include <stdio.h>
 
 class Logger
@@ -51,12 +51,12 @@
 
 extern Logger logger;
 #ifdef DO_LOGGING
-#define FUNC(funcname) logger.debug("Entering function '%s'.", funcname);
 #define LOG(x)         logger.info x
 #else
-#define FUNC(funcname)
 #define LOG(x)
 #endif // DO_LOGGING
+// FUNC is deprecated
+#define FUNC(x)
 
 #endif
 
Index: netpanzer/src/Lib/View/Choice.cpp
diff -u netpanzer/src/Lib/View/Choice.cpp:1.6 
netpanzer/src/Lib/View/Choice.cpp:1.7
--- netpanzer/src/Lib/View/Choice.cpp:1.6       Tue Sep 16 16:16:10 2003
+++ netpanzer/src/Lib/View/Choice.cpp   Thu Sep 18 13:44:17 2003
@@ -48,59 +48,6 @@
 }
 
 //---------------------------------------------------------------------------
-void Choice::addItemDefault(const String &item)
-{
-    choiceList.setNum(choiceList.getCount() + 1);
-
-    choiceList[choiceList.getCount() - 1] = item;
-
-    int borderSpace = borderSize * 2;
-
-    size.x = std::max(int(strlen(item) * CHAR_XPIX + borderSpace), size.y);
-    size.y = CHAR_XPIX + borderSpace;
-
-    select(item);
-}
-
-//---------------------------------------------------------------------------
-void Choice::insert(String item, int index)
-{
-    // for (int i = 0; i < choiceList.getCount(); i++)
-    // {
-    //         if (strcmp((const char *) item, (const char *) choiceList[i]) 
== 0)
-    //         {
-    //                 choiceList.removeByIndex(i);
-    //
-    //                 return;
-    //         }
-    // }
-}
-
-//---------------------------------------------------------------------------
-void Choice::remove(String item)
-{
-    for (int i = 0; i < choiceList.getCount(); i++) {
-        if (strcmp((const char *) item, (const char *) choiceList[i]) == 0) {
-            choiceList.removeByIndex(i);
-
-            return;
-        }
-    }
-}
-
-//---------------------------------------------------------------------------
-void Choice::remove(int index)
-{
-    choiceList.removeByIndex(index);
-}
-
-//---------------------------------------------------------------------------
-void Choice::removeAll()
-{
-    choiceList.setNum(0);
-}
-
-//---------------------------------------------------------------------------
 void Choice::select(const String &item)
 {
     for (int i = 0; i < choiceList.getCount(); i++) {
@@ -108,7 +55,7 @@
             if(index == i)
                 return;
 
-            index = i;
+            mouseover = index = i;
             if(callback)
                 callback->stateChanged(this);
 
@@ -125,7 +72,7 @@
     if(index == Choice::index)
         return;
 
-    Choice::index = index;
+    Choice::index = mouseover = index;
     if(callback)
         callback->stateChanged(this);
 }
@@ -135,7 +82,7 @@
 {
     iXY parentDimensions(((View *)parent)->getClientRect().getSize());
 
-    if (       me.getID() == mMouseEvent::MOUSE_EVENT_PRESSED &&
+    if (me.getID() == mMouseEvent::MOUSE_EVENT_PRESSED &&
             (me.getModifiers() & InputEvent::BUTTON1_MASK)) {
         //assert(isOpen == false);
         isOpen = true;
@@ -159,12 +106,10 @@
 
 
             // Make sure the choice is still on the screen.
-            if (min.y < 0) {
-                assert(false);
-            }
+            assert (min.y >= 0);
         }
         assert(min + size < parentDimensions);
-    } else if (        me.getID() == mMouseEvent::MOUSE_EVENT_DRAGGED &&
+    } else if (me.getID() == mMouseEvent::MOUSE_EVENT_DRAGGED &&
                 (me.getModifiers() & InputEvent::BUTTON1_MASK)) {
         isOpen = true;
 
@@ -318,6 +263,5 @@
         choiceList[i] = choice.choiceList[i];
     }
 
-    index = choice.getSelectedIndex();
-
+    //index = choice.getSelectedIndex();
 } // end Choice::copyItems
Index: netpanzer/src/Lib/View/Choice.hpp
diff -u netpanzer/src/Lib/View/Choice.hpp:1.3 
netpanzer/src/Lib/View/Choice.hpp:1.4
--- netpanzer/src/Lib/View/Choice.hpp:1.3       Tue Sep 16 16:16:10 2003
+++ netpanzer/src/Lib/View/Choice.hpp   Thu Sep 18 13:44:18 2003
@@ -49,7 +49,6 @@
 
     void   add(const String &item);
     void   addItem(const String &item);
-    void   addItemDefault(const String &item);
     void   copyItems(const Choice &choice);
     int    getItemCount() const
     {
@@ -59,14 +58,10 @@
     {
         return index;
     }
-    void   insert(String item, int index);
     String paramString()
     {
         return String();
     }
-    void   remove(String item);
-    void   remove(int index);
-    void   removeAll();
     void   select(const String &item);
     void   select(int index);
     void   setMinWidth(int minWidth);
Index: netpanzer/src/Lib/View/Component.cpp
diff -u netpanzer/src/Lib/View/Component.cpp:1.5 
netpanzer/src/Lib/View/Component.cpp:1.6
--- netpanzer/src/Lib/View/Component.cpp:1.5    Tue Sep 16 16:16:10 2003
+++ netpanzer/src/Lib/View/Component.cpp        Thu Sep 18 13:44:18 2003
@@ -58,9 +58,6 @@
 void Component::setParent(void *parent)
 {
     assert(parent != 0);
-    if (parent == 0) {
-        throw Exception("ERROR: Component parent == 0");
-    }
 
     Component::parent = parent;
 }
Index: netpanzer/src/Lib/View/Component.hpp
diff -u netpanzer/src/Lib/View/Component.hpp:1.5 
netpanzer/src/Lib/View/Component.hpp:1.6
--- netpanzer/src/Lib/View/Component.hpp:1.5    Tue Sep 16 16:16:10 2003
+++ netpanzer/src/Lib/View/Component.hpp        Thu Sep 18 13:44:18 2003
@@ -65,10 +65,6 @@
     {
         reset();
     }
-    Component(int i)
-    {
-        reset();
-    }
     virtual ~Component()
     {}
 
Index: netpanzer/src/Lib/View/View.cpp
diff -u netpanzer/src/Lib/View/View.cpp:1.11 
netpanzer/src/Lib/View/View.cpp:1.12
--- netpanzer/src/Lib/View/View.cpp:1.11        Tue Sep 16 16:16:11 2003
+++ netpanzer/src/Lib/View/View.cpp     Thu Sep 18 13:44:18 2003
@@ -64,9 +64,6 @@
 void View::add(Component *component)
 {
     assert(component != 0);
-    if (component == 0) {
-        return;
-    }
 
     if (componentsUsedCount < MAX_COMPONENT_COUNT - 1) {
         componentList[componentsUsedCount] = component;
Index: netpanzer/src/NetPanzer/Classes/ViewCamera.cpp
diff -u netpanzer/src/NetPanzer/Classes/ViewCamera.cpp:1.6 
netpanzer/src/NetPanzer/Classes/ViewCamera.cpp:1.7
--- netpanzer/src/NetPanzer/Classes/ViewCamera.cpp:1.6  Tue Sep 16 16:16:11 2003
+++ netpanzer/src/NetPanzer/Classes/ViewCamera.cpp      Thu Sep 18 13:44:18 2003
@@ -37,7 +37,6 @@
     if ( (view.x >= 0) && (view.x <= map_size.x) ) {
         loc.x = view.x;
     }
-
 }
 
 void ViewCamera::scrollMinusX( long scroll_increment )
@@ -53,7 +52,6 @@
     if ( (view.x >= 0) && (view.x <= map_size.x) ) {
         loc.x = view.x;
     }
-
 }
 
 void ViewCamera::scrollMinusY( long scroll_increment )
@@ -84,7 +82,6 @@
     if ( (view.y >= 0) && (view.y <= map_size.y) ) {
         loc.y = view.y;
     }
-
 }
 
 void ViewCamera::getViewStart( unsigned long view_size_x, unsigned long 
view_size_y,
Index: netpanzer/src/NetPanzer/Interfaces/GameManager.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.44 
netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.45
--- netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.44     Tue Sep 16 
16:58:36 2003
+++ netpanzer/src/NetPanzer/Interfaces/GameManager.cpp  Thu Sep 18 13:44:18 2003
@@ -144,9 +144,6 @@
 int GameManager::execution_mode;
 
 unsigned char GameManager::game_state  = _game_state_idle;
-iXY GameManager::previous_video_mode_res;
-iXY GameManager::current_video_mode_res;
-
 
 static Surface hostLoadSurface;
 
@@ -156,8 +153,6 @@
     LOG( ( "Initializing video mode" ) );
     Screen = new SDLDraw();
 
-    current_video_mode_res = iXY(640,480);
-    // don't go fullscreen for now
     setVideoMode();
     loadPalette("wads/netp.act");
 }
@@ -286,19 +281,17 @@
     if(mode<0)
         throw Exception("couldn't find a usable video mode");
 
-    current_video_mode_res = mode_res;
-
-    if (!Screen->setVideoMode(current_video_mode_res.x,
-                              current_video_mode_res.y, 8, fullscreen))
+    if (!Screen->setVideoMode(mode_res.x,
+                              mode_res.y, 8, fullscreen))
         throw Exception("failed to set video mode.");
 
-    WorldViewInterface::setCameraSize( current_video_mode_res.x, 
current_video_mode_res.y );
-    FRAME_BUFFER.create(current_video_mode_res.x, current_video_mode_res.y, 
current_video_mode_res.x, 1 );
-    screen.createNoAlloc(current_video_mode_res);
-    gameView.setSize(current_video_mode_res);
+    WorldViewInterface::setCameraSize( mode_res.x, mode_res.y );
+    FRAME_BUFFER.create(mode_res.x, mode_res.y, mode_res.x, 1 );
+    screen.createNoAlloc(mode_res);
+    gameView.setSize(mode_res);
 
     Desktop::checkViewPositions();
-    //ConsoleInterface::setToSurfaceSize( current_video_mode_res );
+    //ConsoleInterface::setToSurfaceSize( mode_res );
 
     // reset palette
     Palette pal;
@@ -320,70 +313,6 @@
 
 // ******************************************************************
 
-#if 0
-void GameManager::increaseDisplayResolution()
-{
-    iXY new_mode;
-
-    drawTextCenteredOnScreen("Changing Resolution", Color::white);
-
-    GameConfig::setNextGameScreenResolution();
-
-    drawTextCenteredOnScreen("Changing Resolution", Color::white);
-
-    new_mode = GameConfig::getGameScreenResolutionSize();
-
-    setVideoMode(new_mode, Screen->isFullScreen());
-
-    previous_video_mode_res = current_video_mode_res;
-    current_video_mode_res = new_mode;
-
-    WorldViewInterface::setCameraSize( current_video_mode_res.x, 
current_video_mode_res.y );
-    FRAME_BUFFER.create(current_video_mode_res.x, current_video_mode_res.y, 
current_video_mode_res.x, 1 );
-    screen.createNoAlloc(current_video_mode_res);
-    gameView.setSize( current_video_mode_res );
-    Desktop::checkViewPositions();
-    ConsoleInterface::setToSurfaceSize( current_video_mode_res );
-
-    loadPalette( "wads/netp.act" );
-
-    ConsoleInterface::postMessage( "Screen Resolution :  %d  x  %d", 
current_video_mode_res.x, current_video_mode_res.y );
-}
-
-// ******************************************************************
-
-void GameManager::decreaseDisplayResolution()
-{
-    iXY new_mode;
-
-    drawTextCenteredOnScreen("Changing Resolution", Color::white);
-
-    GameConfig::setPreviousGameScreenResolution();
-
-    drawTextCenteredOnScreen("Changing Resolution", Color::white);
-
-    new_mode = GameConfig::getGameScreenResolutionSize();
-
-    setVideoMode(new_mode, Screen->isFullScreen());
-
-    previous_video_mode_res = current_video_mode_res;
-    current_video_mode_res = new_mode;
-
-    WorldViewInterface::setCameraSize( current_video_mode_res.x, 
current_video_mode_res.y );
-    FRAME_BUFFER.create(current_video_mode_res.x, current_video_mode_res.y, 
current_video_mode_res.x, 1 );
-    screen.createNoAlloc(current_video_mode_res);
-    gameView.setSize( current_video_mode_res );
-    Desktop::checkViewPositions();
-    ConsoleInterface::setToSurfaceSize( current_video_mode_res );
-
-    loadPalette("wads/netp.act");
-
-    ConsoleInterface::postMessage( "Screen Resolution :  %d  x  %d", 
current_video_mode_res.x, current_video_mode_res.y );
-}
-#endif
-
-// ******************************************************************
-
 void GameManager::loadPalette(char *palette_path)
 {
     Palette::init(palette_path);
@@ -477,9 +406,6 @@
 
     NetworkState::setNetworkStatus( _network_state_server );
     NetworkState::resetNetworkStats();
-
-    // XXX do we need this?
-    //SetPacketFunction( EnqueueIncomingPacket );
 }
 
 // ******************************************************************
@@ -1062,8 +988,6 @@
     if ( view_control->action_flags & _view_control_flag_visible_off ) {
         Desktop::setVisibility( view_control->view_name, false );
     }
-
-
 }
 
 // ******************************************************************
@@ -1095,7 +1019,6 @@
     default :
         assert(0);
     } // ** switch
-
 }
 
 // ******************************************************************
@@ -1578,19 +1501,6 @@
 
     reinitializeGameLogic();
 
-    /*
-    MinimizeOrNot( gapp.hwndApp );    
-
-    InitializeDirectPlay( gapp.hwndApp);
-
-    initializeConnectionType();
-
-    HostSession( gapp.hwndApp );                 
-    */
-
-    //winsock hack
-    //InitStreamServer(gapp.hwndApp);
-
     SERVER->openSession();
     SERVER->hostSession();
 
@@ -1609,9 +1519,6 @@
 // ******************************************************************
 void GameManager::exitNetPanzer()
 {
-    // NOTE: Hack
-    sound->stopTankIdle();
-
     quitNetPanzerGame();
 
     SDL_Event event;
@@ -1629,13 +1536,6 @@
         ServerConnectDaemon::shutdownConnectDaemon();
         SERVER->closeSession();
     }
-
-
-    //***workaround for directplay fuckup on bad client disconnects
-    //until we find out why close doesn't work anymore on the server
-    //object after the crap out. actually, this call seems unnecessary,
-    //since the dplay object is destroyed subsequently anyway. sr
-    //QuitSession();
 }
 
 // ******************************************************************
@@ -1734,11 +1634,6 @@
     }
 
     mouse.draw(screen);
-
-    //char strBuf[256];
-    //sprintf(strBuf, "%d, %d", mouse.getScreenPos().x, 
mouse.getScreenPos().y);
-    //screen.bltString(40, 2, strBuf, Color::white);
-
     MouseInterface::updateCursor();
 
     FRAME_BUFFER.unlock();
Index: netpanzer/src/NetPanzer/Interfaces/GameManager.hpp
diff -u netpanzer/src/NetPanzer/Interfaces/GameManager.hpp:1.10 
netpanzer/src/NetPanzer/Interfaces/GameManager.hpp:1.11
--- netpanzer/src/NetPanzer/Interfaces/GameManager.hpp:1.10     Tue Sep 16 
16:58:37 2003
+++ netpanzer/src/NetPanzer/Interfaces/GameManager.hpp  Thu Sep 18 13:44:18 2003
@@ -60,9 +60,6 @@
 
     static int execution_mode;
 
-    static iXY previous_video_mode_res;
-    static iXY current_video_mode_res;
-
 protected:
     static unsigned char game_state;
 
Index: netpanzer/src/NetPanzer/Views/Game/GameView.cpp
diff -u netpanzer/src/NetPanzer/Views/Game/GameView.cpp:1.7 
netpanzer/src/NetPanzer/Views/Game/GameView.cpp:1.8
--- netpanzer/src/NetPanzer/Views/Game/GameView.cpp:1.7 Tue Sep 16 16:16:12 2003
+++ netpanzer/src/NetPanzer/Views/Game/GameView.cpp     Thu Sep 18 13:44:18 2003
@@ -15,12 +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
 */
-
-/////////////////////////////////////////////////////////////////////////////
-// Includes.
-/////////////////////////////////////////////////////////////////////////////
-
 #include <config.h>
+
 #include "GameView.hpp"
 #include "Desktop.hpp"
 #include "TileEngine.hpp"
@@ -57,7 +53,6 @@
 void GameView::setSize(iXY size)
 {
     resize(size);
-
 } // end GameView::setSize
 
 // init
Index: netpanzer/src/NetPanzer/Views/Game/GameView.hpp
diff -u netpanzer/src/NetPanzer/Views/Game/GameView.hpp:1.3 
netpanzer/src/NetPanzer/Views/Game/GameView.hpp:1.4
--- netpanzer/src/NetPanzer/Views/Game/GameView.hpp:1.3 Tue Sep 16 16:16:12 2003
+++ netpanzer/src/NetPanzer/Views/Game/GameView.hpp     Thu Sep 18 13:44:18 2003
@@ -15,8 +15,6 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
-
 #ifndef __GameView_hpp__
 #define __GameView_hpp__
 
@@ -42,9 +40,7 @@
     virtual void doDraw(const Surface &windowArea, const Surface &clientArea);
     //virtual void mouseEnter(const iXY &pos);
     virtual void mouseMove(const iXY & prevPos, const iXY &newPos);
-
-}
-; // end GameView
+}; // end GameView
 
 extern GameView gameView;
 
Index: netpanzer/src/NetPanzer/Views/GameViewGlobals.cpp
diff -u netpanzer/src/NetPanzer/Views/GameViewGlobals.cpp:1.5 
netpanzer/src/NetPanzer/Views/GameViewGlobals.cpp:1.6
--- netpanzer/src/NetPanzer/Views/GameViewGlobals.cpp:1.5       Tue Sep 16 
16:16:12 2003
+++ netpanzer/src/NetPanzer/Views/GameViewGlobals.cpp   Thu Sep 18 13:44:18 2003
@@ -29,15 +29,25 @@
 iXY optionsPos(325, 7);
 iXY helpPos(480, 7);
 iXY creditsPos(0, 0);
-iXY soundPos(16, 32);
-iXY tcpipPos = soundPos;
-iXY joinPos  = soundPos;
-iXY interfacePos(169, 32);
-iXY directConnectPos = interfacePos;
-iXY hostPos          = interfacePos;
-iXY visualsPos(325, 32);
-iXY modemPos = visualsPos;
-iXY controlsPos(480, 32);
+
+const iXY sub1(16, 32);
+const iXY sub2(169, 32);
+const iXY sub3(325, 32);
+const iXY sub4(480, 32);
+
+#if 0 // XXX
+iXY soundPos = sub1;
+iXY interfacePos = sub2;
+iXY visualsPos = sub3;
+iXY controlsPos = sub4;
+#else
+iXY visualsPos = sub1;
+iXY interfacePos = sub2;
+#endif
+
+iXY hostPos = sub1;
+iXY joinPos = sub2;
+
 iXY returnToGamePos = mainPos;
 iXY resignPos = multiPos;
 
Index: netpanzer/src/NetPanzer/Views/GameViewGlobals.hpp
diff -u netpanzer/src/NetPanzer/Views/GameViewGlobals.hpp:1.3 
netpanzer/src/NetPanzer/Views/GameViewGlobals.hpp:1.4
--- netpanzer/src/NetPanzer/Views/GameViewGlobals.hpp:1.3       Tue Sep 16 
16:16:12 2003
+++ netpanzer/src/NetPanzer/Views/GameViewGlobals.hpp   Thu Sep 18 13:44:18 2003
@@ -47,13 +47,10 @@
 extern iXY helpPos;
 extern iXY creditsPos;
 extern iXY soundPos;
-extern iXY tcpipPos;
 extern iXY joinPos;
 extern iXY interfacePos;
-extern iXY directConnectPos;
 extern iXY hostPos;
 extern iXY visualsPos;
-extern iXY modemPos;
 extern iXY controlsPos;
 extern iXY returnToGamePos;
 extern iXY resignPos;
Index: netpanzer/src/NetPanzer/Views/MainMenu/Options/VisualsView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/Options/VisualsView.cpp:1.6 
netpanzer/src/NetPanzer/Views/MainMenu/Options/VisualsView.cpp:1.7
--- netpanzer/src/NetPanzer/Views/MainMenu/Options/VisualsView.cpp:1.6  Tue Sep 
16 16:16:13 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Options/VisualsView.cpp      Thu Sep 
18 13:44:18 2003
@@ -50,15 +50,21 @@
     y = 100;
     choiceResolution.setName("Resolution");
     choiceResolution.setStateChangedCallback(this);
-    choiceResolution.addItemDefault("640x480");
+    choiceResolution.addItem("640x480");
     choiceResolution.addItem("800x600");
     choiceResolution.addItem("1024x768");
     choiceResolution.setLocation(x, y);
     choiceResolution.select(GameConfig::getScreenResolution());
     choiceResolution.setMinWidth(minWidth);
+
+    checkBoxFullscreen.setLabel("Fullscreen");
+    checkBoxFullscreen.setStateChangedCallback(this);
+    checkBoxFullscreen.setState(Screen->isFullScreen());    
+    checkBoxFullscreen.setLocation(x+ 200, y);
     y += yOffset;
     y += yOffset;
 
+#if 0
     choiceGameViewBackgroundColor.setName("Game View Background Color");
     choiceGameViewBackgroundColor.setStateChangedCallback(this);
     choiceGameViewBackgroundColor.addItemDefault("Dark Gray Blend");
@@ -115,6 +121,7 @@
     //x += optionsMeterWidth + arrowButtonWidth;
     //addButtonCenterText(iXY(x + 1, y), arrowButtonWidth, ">", "", 
bIncreaseBrightness);
     //y += yOffset;
+#endif
 
     // Other visual options to add.
     // Gamma
@@ -122,6 +129,7 @@
 
     // Color Settings
     //----------------------------------------------------------------------
+#if 0
     minWidth = 13 * CHAR_XPIX;
 
     x = xTextStart + 10;
@@ -208,6 +216,7 @@
 
     x = 300;
     y = 344;
+#endif
 
     checkBoxDrawAllShadows.setLabel("Draw All Shadows");
     checkBoxDrawAllShadows.setStateChangedCallback(this);
@@ -220,12 +229,6 @@
     checkBoxBlendSmoke.setState(GameConfig::getBlendSmoke());
     checkBoxBlendSmoke.setLocation(x, y);
     y += yOffset;
-
-    checkBoxFullscreen.setLabel("Fullscreen");
-    checkBoxFullscreen.setStateChangedCallback(this);
-    checkBoxFullscreen.setState(Screen->isFullScreen());
-    checkBoxFullscreen.setLocation(x, y);
-    y += yOffset;
 } // end VisualsView::VisualsView
 
 // initButtons
@@ -238,19 +241,18 @@
     add(&checkBoxBlendSmoke);
     add(&checkBoxFullscreen);
     add(&choiceResolution);
-    add(&choiceGameViewBackgroundColor);
-    add(&choiceMiniMapObjectiveDrawMode);
-    add(&choiceMiniMapUnitSize);
-    add(&choiceUnitSelectionDrawMode);
+    //add(&choiceGameViewBackgroundColor);
+    //add(&choiceMiniMapObjectiveDrawMode);
+    //add(&choiceMiniMapUnitSize);
+    //add(&choiceUnitSelectionDrawMode);
     //add(&choiceUnitInfoDrawLayer);
-    add(&choiceYourRadarUnit);
-    add(&choiceAlliedRadarUnit);
-    add(&choiceYourRadarObjective);
-    add(&choiceAlliedRadarObjective);
-    add(&choiceEnemyRadarObjective);
-    add(&choiceVehicleSelectionBox);
-    add(&choiceConsoleText);
-
+    //add(&choiceYourRadarUnit);
+    //add(&choiceAlliedRadarUnit);
+    //add(&choiceYourRadarObjective);
+    //add(&choiceAlliedRadarObjective);
+    //add(&choiceEnemyRadarObjective);
+    //add(&choiceVehicleSelectionBox);
+    //add(&choiceConsoleText);
 } // end VisualsView::initButtons
 
 // doDraw
Index: netpanzer/src/NetPanzer/Views/MainMenu/OptionsTemplateView.cpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/OptionsTemplateView.cpp:1.6 
netpanzer/src/NetPanzer/Views/MainMenu/OptionsTemplateView.cpp:1.7
--- netpanzer/src/NetPanzer/Views/MainMenu/OptionsTemplateView.cpp:1.6  Tue Sep 
16 16:16:13 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/OptionsTemplateView.cpp      Thu Sep 
18 13:44: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 "OptionsTemplateView.hpp"
 #include "Desktop.hpp"
 #include "DDHardSurface.hpp"
@@ -106,10 +105,12 @@
 
     MenuTemplateView::initButtons();
 
+#if 0 // XXX
     // Sound.
     addSpecialButton(  soundPos,
                       "Sound",
                       bSound);
+#endif
 
     // Interface.
     addSpecialButton(  interfacePos,
@@ -121,10 +122,12 @@
                       "Visuals",
                       bVisuals);
 
+#if 0 // XXX
     // Contols.
     addSpecialButton(  controlsPos,
                       "Controls",
                       bControls);
+#endif
 
 } // end OptionsTemplateView::initButtons
 
Index: netpanzer/src/NetPanzer/Views/MainMenu/OptionsTemplateView.hpp
diff -u netpanzer/src/NetPanzer/Views/MainMenu/OptionsTemplateView.hpp:1.2 
netpanzer/src/NetPanzer/Views/MainMenu/OptionsTemplateView.hpp:1.3
--- netpanzer/src/NetPanzer/Views/MainMenu/OptionsTemplateView.hpp:1.2  Tue Sep 
16 16:16:13 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/OptionsTemplateView.hpp      Thu Sep 
18 13:44:18 2003
@@ -15,26 +15,17 @@
 along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-
 #ifndef __OptionsTemplateView_hpp__
 #define __OptionsTemplateView_hpp__
 
-
-#if _MSC_VER > 1000
-       #pragma once
-#endif
-
-
 #include "View.hpp"
 #include "Surface.hpp"
 #include "MenuTemplateView.hpp"
 
-
 //--------------------------------------------------------------------------
 class OptionsTemplateView : public MenuTemplateView
 {
 protected:
-
     virtual void loadBackgroundSurface();
     virtual void loadTitleSurface();
 
@@ -43,8 +34,6 @@
 
     virtual void doDraw(const Surface &windowArea, const Surface &clientArea);
     virtual void initButtons();
-
-}
-; // end OptionsTemplateView
+}; // end OptionsTemplateView
 
 #endif // end __OptionsTemplateView_hpp__
Index: netpanzer/src/TODO
diff -u netpanzer/src/TODO:1.6 netpanzer/src/TODO:1.7
--- netpanzer/src/TODO:1.6      Tue Sep  9 12:23:27 2003
+++ netpanzer/src/TODO  Thu Sep 18 13:44:17 2003
@@ -10,16 +10,17 @@
 -ParticleInterface.cpp contains some DirectSound code which needs to be 
replaced
  - OK
 -GroundExplosionParticle, RadarPingParticle2D and DirtKickParticle2D seem to
- miss some Surface variables, where are these defined?
--PUFF_PARTICLE_TYPE isn't defined in SmokingTrajectoryParticle - Old code?
+ miss some Surface variables, where are these defined? - seems OK
+-PUFF_PARTICLE_TYPE isn't defined in SmokingTrajectoryParticle - Old code? -
+    yes, OK
 -write a new version of DDHardSurface - OK
 -network code probably needs a bigger rewrite since directplay is not available
- on unix.
+ on unix. - OK (for now)
 -look at all the directx code in GameManager.cpp - OK
 -need new mousecode in MouseInterface.cpp - OK
 -need new directplay code in NetworkClientDPlay.cpp, NetworkServerDPlay.cpp -
-  not needed, these files aren't used anymore
--need new code instead of winsock in NetworkClientWinsock.cpp - nearl OK
+  not needed, these files aren't used anymore - OK
+-need new code instead of winsock in NetworkClientWinsock.cpp - OK
 -rewrite all the windows specific code in NetPanzer/Core - OK (SDL specific
  code is in NetPanze/Core/unix now)
 -check if the functions and stuff in Lib/terminate.cpp is really needed (looks
@@ -28,4 +29,23 @@
 -Fix the win32 stuff in Lib/Util/UtilInterface.cpp - OK
 -rewrite win32 event loop to use a SDL event loop. Don't forget to pump mouse
  events to MouseInterface then. - OK
+
+Todo before beta release:
+-Fix the problems with mainmenu in >640x480 resolution
+-Eventually trim down option windows to only necessary stuff (this can wait
+    for after the release though)
+-Complete GameConfig::save and GameConfig::load functions
+-Test it (esp. with more than 2 players)
+-Make it compiling in mingw again.
+-Fix all warnings in the sourcecode
+-Add configure script (autoconf) which checks for all prerequesits
+-Create "make install" target (also a "make uninstall"?)
+-Write a README
+-Test it, esp. with more than 2 players and test a complete
+    getsource/configure/build/install/play cycle. We should be able to find
+    betatesters in irc channels like #netpanzer, #sdl, #*game* I assume ;-)
+-Create and upload source tarball
+-Announce on linux/opensource related sites (together with a call for new
+    artists, coders, and *good* game designers - we wanna improve the gameplay
+    too, don't we?)
 
Index: netpanzer/src/UILib/SDL/SDLSound.cpp
diff -u netpanzer/src/UILib/SDL/SDLSound.cpp:1.10 
netpanzer/src/UILib/SDL/SDLSound.cpp:1.11
--- netpanzer/src/UILib/SDL/SDLSound.cpp:1.10   Tue Sep 16 16:16:13 2003
+++ netpanzer/src/UILib/SDL/SDLSound.cpp        Thu Sep 18 13:44:18 2003
@@ -40,11 +40,11 @@
     if(SDL_InitSubSystem(SDL_INIT_AUDIO) < 0)
         throw Exception("SDL_Init audio error: %s", SDL_GetError());
 
-    if(Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 1024) < 0)
+    if(Mix_OpenAudio(22050, MIX_DEFAULT_FORMAT, 2, 1024) < 0)
         throw Exception("Couldn't open audio device: %s", Mix_GetError());
 
     loadSound("sound/");
-    Mix_AllocateChannels(16);
+    Mix_AllocateChannels(8);
 }
 //-----------------------------------------------------------------
 SDLSound::~SDLSound()




reply via email to

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