[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netPanzer-CVS] netpanzer/src Lib/2D/Surface.cpp NetPanzer/Clas...
From: |
Matthias Braun |
Subject: |
[netPanzer-CVS] netpanzer/src Lib/2D/Surface.cpp NetPanzer/Clas... |
Date: |
Mon, 08 Sep 2003 18:50:28 -0400 |
CVSROOT: /cvsroot/netpanzer
Module name: netpanzer
Branch:
Changes by: Matthias Braun <address@hidden> 03/09/08 18:50:28
Modified files:
src/Lib/2D : Surface.cpp
src/NetPanzer/Classes: SelectionBoxSprite.cpp
SelectionBoxSprite.hpp
src/NetPanzer/Interfaces: GameManager.cpp
Log message:
fixed a bug that prevented the flags and damage bars to be drawn
Patches:
Index: netpanzer/src/Lib/2D/Surface.cpp
diff -u netpanzer/src/Lib/2D/Surface.cpp:1.13
netpanzer/src/Lib/2D/Surface.cpp:1.14
--- netpanzer/src/Lib/2D/Surface.cpp:1.13 Mon Sep 8 16:29:09 2003
+++ netpanzer/src/Lib/2D/Surface.cpp Mon Sep 8 18:50:28 2003
@@ -2029,7 +2029,8 @@
for (int yCount = 0 ; yCount < numRows ; yCount++)
{
- bltLookupSpan(dRow, pixelsPerRow, table);
+ for(size_t x=0; x<pixelsPerRow; x++)
+ dRow[x] = table[dRow[x]];
dRow += stride;
}
Index: netpanzer/src/NetPanzer/Classes/SelectionBoxSprite.cpp
diff -u netpanzer/src/NetPanzer/Classes/SelectionBoxSprite.cpp:1.4
netpanzer/src/NetPanzer/Classes/SelectionBoxSprite.cpp:1.5
--- netpanzer/src/NetPanzer/Classes/SelectionBoxSprite.cpp:1.4 Mon Sep 8
11:32:04 2003
+++ netpanzer/src/NetPanzer/Classes/SelectionBoxSprite.cpp Mon Sep 8
18:50:28 2003
@@ -16,6 +16,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <config.h>
+
#include "SelectionBoxSprite.hpp"
#include "GameConfig.hpp"
@@ -74,8 +75,8 @@
}
-void UnitSelectionBox::blit( Surface *surface, Recti &world_win )
- {
+void UnitSelectionBox::blit( Surface *surface, const Recti &world_win )
+{
PointXYi min_abs, max_abs;
min_abs = (world_pos + selection_area.min) - world_win.min;
@@ -103,7 +104,7 @@
} else { assert(false); }
} // ** box_state == true
-
+
// Draw the unit hitpoints.
if ( GameConfig::getDrawUnitDamage() || (box_state == true) )
{
@@ -133,7 +134,6 @@
r = iRect(min_abs.x + 2, max_abs.y - 4, min_abs.x + 2 +
hit_bar_size, max_abs.y - 3);
surface->drawRect(r, hitBarColor);
-
// Solid method.
//surface->drawHLine(min_abs.x+1, max_abs.y-1, min_abs.x +
hit_bar_size, hit_bar_color);
Index: netpanzer/src/NetPanzer/Classes/SelectionBoxSprite.hpp
diff -u netpanzer/src/NetPanzer/Classes/SelectionBoxSprite.hpp:1.3
netpanzer/src/NetPanzer/Classes/SelectionBoxSprite.hpp:1.4
--- netpanzer/src/NetPanzer/Classes/SelectionBoxSprite.hpp:1.3 Mon Sep 8
11:32:04 2003
+++ netpanzer/src/NetPanzer/Classes/SelectionBoxSprite.hpp Mon Sep 8
18:50:28 2003
@@ -24,14 +24,13 @@
extern Surface UNIT_FLAGS_SURFACE;
class SelectionBoxSprite : public Sprite
- {
- protected:
- BoundBox selection_area;
- unsigned char box_color;
- bool box_state;
+{
+protected:
+ BoundBox selection_area;
+ unsigned char box_color;
+ bool box_state;
- public:
-
+public:
inline void setBoxAttributes( BoundBox box, unsigned char box_color )
{
selection_area = box;
@@ -45,9 +44,8 @@
virtual bool isVisible(const Recti &world_win ) const;
- virtual void blit( Surface *surface, const Recti &world_win );
-
- };
+ virtual void blit( Surface *surface, const Recti &world_win );
+};
class UnitSelectionBox : public SelectionBoxSprite
{
@@ -102,8 +100,7 @@
allie_state = is_allied;
}
- virtual void blit( Surface *surface, Recti &world_win );
-
- };
+ virtual void blit( Surface *surface, const Recti &world_win );
+};
#endif // ** _SELECTION_BOX_SPRITE_HPP
Index: netpanzer/src/NetPanzer/Interfaces/GameManager.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.28
netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.29
--- netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.28 Mon Sep 8
17:25:09 2003
+++ netpanzer/src/NetPanzer/Interfaces/GameManager.cpp Mon Sep 8 18:50:28 2003
@@ -1649,7 +1649,7 @@
//winsock hack
//JoinSession( gapp.hwndApp );
//InitStreamClient(gapp.hwndApp);
- CLIENT->joinSession("127.0.0.1");
+ CLIENT->joinSession("kiff.local");
// XXX how should that work? we can't process (network) events while waiting
#if 0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [netPanzer-CVS] netpanzer/src Lib/2D/Surface.cpp NetPanzer/Clas...,
Matthias Braun <=