[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netPanzer-CVS] netpanzer ./ChangeLog ./README src/Lib/2D/Packe...
From: |
Matthias Braun |
Subject: |
[netPanzer-CVS] netpanzer ./ChangeLog ./README src/Lib/2D/Packe... |
Date: |
Sun, 12 Oct 2003 15:22:13 -0400 |
CVSROOT: /cvsroot/netpanzer
Module name: netpanzer
Branch:
Changes by: Matthias Braun <address@hidden> 03/10/12 15:22:12
Modified files:
. : ChangeLog README
src/Lib/2D : PackedSurface.cpp Surface.cpp
src/Lib/Types : fRect.hpp fXY.hpp iXY.hpp
src/Lib/View : CheckBox.cpp CheckBox.hpp Component.hpp
Desktop.hpp View.cpp
src/NetPanzer/Interfaces: ConsoleInterface.cpp
MiniMapInterface.cpp
ObjectiveInterface.hpp
src/NetPanzer/Views/Game: VehicleSelectionView.cpp
src/NetPanzer/Views/MainMenu/Multi: HostJoinTemplateView.cpp
Log message:
fixed a bug in the iXY class
Patches:
Index: netpanzer/ChangeLog
diff -u netpanzer/ChangeLog:1.8 netpanzer/ChangeLog:1.9
--- netpanzer/ChangeLog:1.8 Sun Oct 5 09:50:08 2003
+++ netpanzer/ChangeLog Sun Oct 12 15:22:12 2003
@@ -1,3 +1,10 @@
+12-Oct-2003
+-Fixed a bug in iXY classes.
+-Added note about black screen to readme
+
+11-Oct-2003 by Matthias Braun
+-added a release script
+
05-Oct-2003 by Matthias Braun
-did some more code cleanup. all the Rect and XY classes cleaned up a bit and
finally removed the codewiz.hpp file.
Index: netpanzer/README
diff -u netpanzer/README:1.1 netpanzer/README:1.2
--- netpanzer/README:1.1 Wed Sep 24 13:37:30 2003
+++ netpanzer/README Sun Oct 12 15:22:12 2003
@@ -90,6 +90,10 @@
netpanzer -d
+Note that on first startup the game needs some time to precalculate some data.
+This might take up to 5 minutes. So just wait a bit when you have a black
+screen.
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3. Gameplay
Index: netpanzer/src/Lib/2D/PackedSurface.cpp
diff -u netpanzer/src/Lib/2D/PackedSurface.cpp:1.16
netpanzer/src/Lib/2D/PackedSurface.cpp:1.17
--- netpanzer/src/Lib/2D/PackedSurface.cpp:1.16 Sun Oct 5 09:50:09 2003
+++ netpanzer/src/Lib/2D/PackedSurface.cpp Sun Oct 12 15:22:12 2003
@@ -91,7 +91,7 @@
//--------------------------------------------------------------------------
void PackedSurface::reset()
{
- pix = 0;
+ pix.zero();
rowOffsetTable = 0;
packedDataChunk = 0;
frameCount = 0;
Index: netpanzer/src/Lib/2D/Surface.cpp
diff -u netpanzer/src/Lib/2D/Surface.cpp:1.32
netpanzer/src/Lib/2D/Surface.cpp:1.33
--- netpanzer/src/Lib/2D/Surface.cpp:1.32 Sun Oct 5 09:50:09 2003
+++ netpanzer/src/Lib/2D/Surface.cpp Sun Oct 12 15:22:12 2003
@@ -294,16 +294,16 @@
{
assert(this != 0);
- pix = 0;
+ pix.zero();
stride = 0;
- center = 0;
+ center.zero();
mem = 0;
frame0 = 0;
myMem = false;
frameCount = 0;
curFrame = 0;
fps = 0;
- offset = 0;
+ offset.zero();
doesExist = 0;
wipeCount = 0;
} // end Surface::reset
@@ -896,7 +896,7 @@
assert(getDoesExist());
assert(this != 0);
- if (pix == 0) return;
+ if (pix.isZero()) return;
orderCoords(bounds);
@@ -935,7 +935,7 @@
assert(getDoesExist());
assert(this != 0);
- if (pix == 0) return;
+ if (pix.isZero()) return;
orderCoords(bounds);
@@ -1794,7 +1794,7 @@
assert(this != 0);
assert(Palette::brightness256.getColorCount() == 256);
- if (pix == 0) return;
+ if (pix.isZero()) return;
orderCoords(bounds);
Index: netpanzer/src/Lib/Types/fRect.hpp
diff -u netpanzer/src/Lib/Types/fRect.hpp:1.5
netpanzer/src/Lib/Types/fRect.hpp:1.6
--- netpanzer/src/Lib/Types/fRect.hpp:1.5 Sun Oct 5 09:50:10 2003
+++ netpanzer/src/Lib/Types/fRect.hpp Sun Oct 12 15:22:12 2003
@@ -26,7 +26,10 @@
fXY min;
fXY max;
- fRect(float x1=0, float y1=0, float x2=0, float y2=0)
+ fRect()
+ {
+ }
+ fRect(float x1, float y1, float x2, float y2)
{
min.x = x1;
min.y = y1;
Index: netpanzer/src/Lib/Types/fXY.hpp
diff -u netpanzer/src/Lib/Types/fXY.hpp:1.4 netpanzer/src/Lib/Types/fXY.hpp:1.5
--- netpanzer/src/Lib/Types/fXY.hpp:1.4 Sun Oct 5 09:50:10 2003
+++ netpanzer/src/Lib/Types/fXY.hpp Sun Oct 12 15:22:12 2003
@@ -24,11 +24,11 @@
float x, y;
fXY()
+ : x(0), y(0)
{}
- fXY(float x, float y)
+ fXY(float newx, float newy)
+ : x(newx), y(newy)
{
- fXY::x = x;
- fXY::y = y;
}
fXY(const fXY &a)
{
Index: netpanzer/src/Lib/Types/iXY.hpp
diff -u netpanzer/src/Lib/Types/iXY.hpp:1.4 netpanzer/src/Lib/Types/iXY.hpp:1.5
--- netpanzer/src/Lib/Types/iXY.hpp:1.4 Sun Oct 5 09:50:10 2003
+++ netpanzer/src/Lib/Types/iXY.hpp Sun Oct 12 15:22:12 2003
@@ -23,10 +23,14 @@
int x;
int y;
- iXY(int x = 0, int y = 0)
+ iXY()
+ : x(0), y(0)
+ {
+ }
+
+ iXY(int newx, int newy)
+ : x(newx), y(newy)
{
- iXY::x = x;
- iXY::y = y;
}
iXY(const iXY &a)
Index: netpanzer/src/Lib/View/CheckBox.cpp
diff -u netpanzer/src/Lib/View/CheckBox.cpp:1.6
netpanzer/src/Lib/View/CheckBox.cpp:1.7
--- netpanzer/src/Lib/View/CheckBox.cpp:1.6 Fri Oct 3 10:45:00 2003
+++ netpanzer/src/Lib/View/CheckBox.cpp Sun Oct 12 15:22:12 2003
@@ -65,9 +65,9 @@
//---------------------------------------------------------------------------
void CheckBox::drawCheck(const Surface &dest)
{
- iXY pos(min + 2);
+ iXY pos(min + iXY(2,2));
- iXY length(size - 4);
+ iXY length(size - iXY(4,4));
dest.drawLine(pos, pos + length, Color::white);
Index: netpanzer/src/Lib/View/CheckBox.hpp
diff -u netpanzer/src/Lib/View/CheckBox.hpp:1.3
netpanzer/src/Lib/View/CheckBox.hpp:1.4
--- netpanzer/src/Lib/View/CheckBox.hpp:1.3 Tue Sep 16 16:16:10 2003
+++ netpanzer/src/Lib/View/CheckBox.hpp Sun Oct 12 15:22:12 2003
@@ -40,13 +40,13 @@
CheckBox(StateChangedCallback* newcallback = 0)
: Component(), state(false), callback(newcallback)
{
- size = 14;
+ size = iXY(14, 14);
}
CheckBox(const String &newlabel, bool newstate = false)
: Component(), label(newlabel), state(newstate), callback(0)
{
- size = 14;
+ size = iXY(14, 14);
}
virtual ~CheckBox()
Index: netpanzer/src/Lib/View/Component.hpp
diff -u netpanzer/src/Lib/View/Component.hpp:1.7
netpanzer/src/Lib/View/Component.hpp:1.8
--- netpanzer/src/Lib/View/Component.hpp:1.7 Sun Oct 5 09:50:11 2003
+++ netpanzer/src/Lib/View/Component.hpp Sun Oct 12 15:22:12 2003
@@ -80,7 +80,6 @@
{
return background;
}
- //inline const iRect &getBounds() { return iRect(min, min + size); }
inline void getBounds(iRect &r)
{
r.min = min;
Index: netpanzer/src/Lib/View/Desktop.hpp
diff -u netpanzer/src/Lib/View/Desktop.hpp:1.8
netpanzer/src/Lib/View/Desktop.hpp:1.9
--- netpanzer/src/Lib/View/Desktop.hpp:1.8 Sun Oct 5 09:50:11 2003
+++ netpanzer/src/Lib/View/Desktop.hpp Sun Oct 12 15:22:12 2003
@@ -91,7 +91,7 @@
}
static void resetMouseActionOffset()
{
- mouseActionOffset = 0;
+ mouseActionOffset.zero();
}
static int getViewCount();
Index: netpanzer/src/Lib/View/View.cpp
diff -u netpanzer/src/Lib/View/View.cpp:1.17
netpanzer/src/Lib/View/View.cpp:1.18
--- netpanzer/src/Lib/View/View.cpp:1.17 Fri Oct 3 10:45:02 2003
+++ netpanzer/src/Lib/View/View.cpp Sun Oct 12 15:22:12 2003
@@ -112,8 +112,8 @@
//---------------------------------------------------------------------------
void View::reset()
{
- min = 0;
- max = 0;
+ min.zero();
+ max.zero();
status = 0;
numLabels = 0;
pressedButton = -1;
Index: netpanzer/src/NetPanzer/Interfaces/ConsoleInterface.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/ConsoleInterface.cpp:1.14
netpanzer/src/NetPanzer/Interfaces/ConsoleInterface.cpp:1.15
--- netpanzer/src/NetPanzer/Interfaces/ConsoleInterface.cpp:1.14 Sat Oct
4 10:44:38 2003
+++ netpanzer/src/NetPanzer/Interfaces/ConsoleInterface.cpp Sun Oct 12
15:22:12 2003
@@ -79,7 +79,7 @@
bounds.min.x = 5;
bounds.min.y = 5;
- bounds.max = pix - 5;
+ bounds.max = pix - iXY(5, 5);
int CHAR_XPIX = 8; // XXX hardcoded
max_char_per_line = (bounds.max.x - bounds.min.x) / CHAR_XPIX;
Index: netpanzer/src/NetPanzer/Interfaces/MiniMapInterface.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/MiniMapInterface.cpp:1.7
netpanzer/src/NetPanzer/Interfaces/MiniMapInterface.cpp:1.8
--- netpanzer/src/NetPanzer/Interfaces/MiniMapInterface.cpp:1.7 Sat Oct 4
10:44:38 2003
+++ netpanzer/src/NetPanzer/Interfaces/MiniMapInterface.cpp Sun Oct 12
15:22:12 2003
@@ -91,7 +91,7 @@
map_loc.y = int(float(world_loc.y) / scale_factor.y);
if (gameconfig->radar_unitsize == _mini_map_unit_size_large) {
- unitRect = iRect(map_loc, map_loc + 1);
+ unitRect = iRect(map_loc, map_loc + iXY(1,1));
}
if ( unit_dispostion == _unit_player ) {
Index: netpanzer/src/NetPanzer/Interfaces/ObjectiveInterface.hpp
diff -u netpanzer/src/NetPanzer/Interfaces/ObjectiveInterface.hpp:1.5
netpanzer/src/NetPanzer/Interfaces/ObjectiveInterface.hpp:1.6
--- netpanzer/src/NetPanzer/Interfaces/ObjectiveInterface.hpp:1.5 Tue Sep
16 16:16:12 2003
+++ netpanzer/src/NetPanzer/Interfaces/ObjectiveInterface.hpp Sun Oct 12
15:22:12 2003
@@ -87,8 +87,7 @@
public:
static void startObjectivePositionEnumeration( void );
- static bool objectivePositionEnumeration( iRect *objective_rect, unsigned
char *objective_disposition, int *objective_id );
-
+ static bool objectivePositionEnumeration(iRect *objective_rect, unsigned
char *objective_disposition, int *objective_id);
};
Index: netpanzer/src/NetPanzer/Views/Game/VehicleSelectionView.cpp
diff -u netpanzer/src/NetPanzer/Views/Game/VehicleSelectionView.cpp:1.15
netpanzer/src/NetPanzer/Views/Game/VehicleSelectionView.cpp:1.16
--- netpanzer/src/NetPanzer/Views/Game/VehicleSelectionView.cpp:1.15 Sun Oct
12 14:56:19 2003
+++ netpanzer/src/NetPanzer/Views/Game/VehicleSelectionView.cpp Sun Oct 12
15:22:12 2003
@@ -673,9 +673,8 @@
case _objective_disposition_player: {
iXY objectiveScreenPos(objectiveBounds.min - gameViewRect.min);
-
- objectiveScreenPos.x -= 0;
- objectiveScreenPos.y -= 0;
+ printf("ObjectiveScreenPos: %d %d\n", objectiveBounds.min.x,
+ objectiveBounds.min.y);
outpostStatus =
ObjectiveInterface::getOutpostStatus(objectiveID);
@@ -772,9 +771,6 @@
if( displayOutpostNames == true ) {
iXY objectiveScreenPos(objectiveBounds.min -
gameViewRect.min);
- objectiveScreenPos.x -= 0;
- objectiveScreenPos.y -= 0;
-
assert(screen->getDoesExist());
miniProductionRect.min = objectiveScreenPos;
@@ -824,7 +820,6 @@
if (length > miniProductionRect.getSizeX()) {
miniProductionRect.max.x = miniProductionRect.min.x + length;
}
-
} // end VehicleSelectionView::checkMiniProductionRect
// doActivate
Index: netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp
diff -u
netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp:1.14
netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp:1.15
--- netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp:1.14
Sat Oct 4 10:44:40 2003
+++ netpanzer/src/NetPanzer/Views/MainMenu/Multi/HostJoinTemplateView.cpp
Sun Oct 12 15:22:12 2003
@@ -481,7 +481,7 @@
dest.bltLookup(flagBorder, Palette::darkGray256.getColorArray());
dest.drawButtonBorder(flagBorder, Color::lightGreen, Color::darkGreen);
- dest.bltStringVGradient(pos + 10, "FLAG", Palette::gradientWhite2Green);
+ dest.bltStringVGradient(pos + iXY(10,10) , "FLAG",
Palette::gradientWhite2Green);
playerFlag.blt(dest, iXY(pos.x + 55, pos.y + 10));
} // end HostJoinTemplateView::drawFlagInfo
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [netPanzer-CVS] netpanzer ./ChangeLog ./README src/Lib/2D/Packe...,
Matthias Braun <=