Update of /cvsroot/super-tux/supertux/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23055/src
Modified Files:
door.cpp door.h menu.cpp tilemap.cpp tilemap.h
Log Message:
Allow creation of Tilemap and Door objects by feeding them with info.
Index: menu.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/menu.cpp,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- menu.cpp 1 Jul 2004 13:39:25 -0000 1.82
+++ menu.cpp 2 Jul 2004 15:14:48 -0000 1.83
@@ -91,7 +91,7 @@
}
if(background == NULL)
- context.draw_gradient(Color(200, 100, 200), Color(100, 200, 100), LAYER_BACKGROUND0);
+ context.draw_gradient(Color(200,240,220), Color(200,200,220), LAYER_BACKGROUND0);
else
context.draw_surface(background, Vector(0,0), LAYER_BACKGROUND0);
@@ -238,9 +238,9 @@
char str[1024];
if(input_flickering)
- sprintf(str,"%s_",input);
- else
sprintf(str,"%s ",input);
+ else
+ sprintf(str,"%s_",input);
std::string string = str;
Index: door.h
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/door.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- door.h 20 Jun 2004 14:50:21 -0000 1.4
+++ door.h 2 Jul 2004 15:14:48 -0000 1.5
@@ -40,6 +40,7 @@
{
public:
Door(LispReader& reader);
+ Door(int x, int y);
virtual ~Door();
virtual void write(LispWriter& writer);
Index: tilemap.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/tilemap.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- tilemap.cpp 1 Jul 2004 15:25:02 -0000 1.14
+++ tilemap.cpp 2 Jul 2004 15:14:48 -0000 1.15
@@ -83,6 +83,11 @@
throw std::runtime_error("wrong number of tiles in tilemap.");
}
+TileMap::TileMap(int layer_, bool solid_, size_t width_, size_t height_)
+ : solid(solid_), speed(1), width(width_), height(height_), layer(layer_)
+{
+}
+
TileMap::~TileMap()
{
}
Index: tilemap.h
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/tilemap.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- tilemap.h 28 Jun 2004 11:30:27 -0000 1.9
+++ tilemap.h 2 Jul 2004 15:14:48 -0000 1.10
@@ -48,6 +48,7 @@
public:
TileMap();
TileMap(LispReader& reader);
+ TileMap(int layer_, bool solid_, size_t width_, size_t height_);
virtual ~TileMap();
virtual void write(LispWriter& writer);
Index: door.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/door.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- door.cpp 20 Jun 2004 14:50:21 -0000 1.4
+++ door.cpp 2 Jul 2004 15:14:48 -0000 1.5
@@ -47,6 +47,19 @@
animation_timer.init(true);
}
+Door::Door(int x, int y)
+{
+area.x = x;
+area.y = y;
+area.width = 32;
+area.height = 64;
+
+animation_timer.init(true);
+door_activated = false;
+
+animation_timer.init(true);
+}
+
void
Door::write(LispWriter& writer)
{
|