[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src exit_menu.cxx, 1.23, 1.24 exit_menu.h
From: |
Ingo Ruhnke |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src exit_menu.cxx, 1.23, 1.24 exit_menu.hxx, 1.13, 1.14 layer_manager.cxx, 1.7, 1.8 layer_manager.hxx, 1.12, 1.13 menu_background.cxx, 1.11, 1.12 menu_button.cxx, 1.15, 1.16 menu_button.hxx, 1.7, 1.8 |
Date: |
Sun, 14 Dec 2003 01:30:06 +0100 |
Update of /var/lib/cvs/Games/Pingus/src
In directory dark:/tmp/cvs-serv21266/src
Modified Files:
exit_menu.cxx exit_menu.hxx layer_manager.cxx
layer_manager.hxx menu_background.cxx menu_button.cxx
menu_button.hxx
Log Message:
- replaced a few CL_Surface with CL_Sprite
Index: exit_menu.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/exit_menu.cxx,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- exit_menu.cxx 21 Oct 2003 11:01:52 -0000 1.23
+++ exit_menu.cxx 14 Dec 2003 00:30:04 -0000 1.24
@@ -109,8 +109,8 @@
{
//gc.draw_fillrect (0, 0, CL_Display::get_width (), CL_Display::get_height
(),
//0, 0, 0, 0.5);
- gc.draw(sur, gc.get_width ()/2 - sur.get_width ()/2,
- gc.get_height ()/2 - sur.get_height ()/2);
+ gc.draw(sur, Vector(gc.get_width ()/2 - sur.get_width ()/2,
+ gc.get_height ()/2 - sur.get_height ()/2));
gc.print_center(Fonts::chalk_large, gc.get_width()/2, gc.get_height()/2 -
70, _("Exit Pingus?"));
PingusSubMenu::draw(gc);
return true;
@@ -119,7 +119,7 @@
void
ExitMenu::preload ()
{
- sur = PingusResource::load_surface ("menu/exit_menu", "core");
+ sur = PingusResource::load_sprite("menu/exit_menu", "core");
}
} // namespace Pingus
Index: exit_menu.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/exit_menu.hxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- exit_menu.hxx 18 Oct 2003 23:17:27 -0000 1.13
+++ exit_menu.hxx 14 Dec 2003 00:30:04 -0000 1.14
@@ -20,7 +20,7 @@
#ifndef HEADER_PINGUS_EXIT_MENU_HXX
#define HEADER_PINGUS_EXIT_MENU_HXX
-#include <ClanLib/Display/surface.h>
+#include <ClanLib/Display/sprite.h>
#include "pingus_sub_menu.hxx"
namespace Pingus {
@@ -30,7 +30,7 @@
class ExitMenu : public PingusSubMenu
{
private:
- CL_Surface sur;
+ CL_Sprite sur;
public:
ExitMenu (PingusMenuManager* manager);
Index: layer_manager.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/layer_manager.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- layer_manager.cxx 18 Oct 2003 23:17:27 -0000 1.7
+++ layer_manager.cxx 14 Dec 2003 00:30:04 -0000 1.8
@@ -31,7 +31,7 @@
}
void
-LayerManager::add_layer (const CL_Surface& sur, float x_o, float y_o, float
x_u, float y_u)
+LayerManager::add_layer (const CL_Sprite& sur, float x_o, float y_o, float
x_u, float y_u)
{
layers.push_back (Layer(sur, x_o, y_o, x_u, y_u));
}
@@ -41,7 +41,7 @@
{
for (std::vector<Layer>::iterator i = layers.begin ();
i != layers.end (); ++i)
- i->draw (gc);
+ i->draw(gc);
}
void
@@ -49,7 +49,7 @@
{
for (std::vector<Layer>::iterator i = layers.begin ();
i != layers.end (); ++i)
- i->update (delta);
+ i->update(delta);
}
} // namespace Pingus
Index: layer_manager.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/layer_manager.hxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- layer_manager.hxx 18 Oct 2003 23:17:27 -0000 1.12
+++ layer_manager.hxx 14 Dec 2003 00:30:04 -0000 1.13
@@ -22,7 +22,7 @@
#include "pingus.hxx"
#include <cmath>
-#include <ClanLib/Display/surface.h>
+#include <ClanLib/Display/sprite.h>
#include "gui/graphic_context.hxx"
namespace Pingus {
@@ -33,7 +33,7 @@
class Layer
{
private:
- CL_Surface sur;
+ CL_Sprite sur;
float x_pos;
float y_pos;
@@ -51,7 +51,7 @@
x_offset(0), y_offset(0)
{}
- Layer (const CL_Surface& arg_sur, float x_o, float y_o, float x_u, float
y_u)
+ Layer (const CL_Sprite& arg_sur, float x_o, float y_o, float x_u, float
y_u)
: sur(arg_sur),
x_pos(0), y_pos(0),
x_update(x_u), y_update(y_u),
@@ -60,10 +60,8 @@
void draw (GraphicContext& gc)
{
- gc.draw(sur, int(x_pos + x_offset),
- int(y_pos + y_offset));
- gc.draw(sur, int(x_pos + x_offset - 800),
- int(y_pos + y_offset));
+ gc.draw(sur, Vector(x_pos + x_offset, y_pos + y_offset));
+ gc.draw(sur, Vector(x_pos + x_offset - 800, y_pos + y_offset));
}
void update (float delta)
@@ -79,7 +77,7 @@
LayerManager ();
~LayerManager();
- void add_layer (const CL_Surface& sur, float x_o, float y_o, float x_u,
float y_u);
+ void add_layer (const CL_Sprite& sur, float x_o, float y_o, float x_u, float
y_u);
void draw (GraphicContext& gc);
void update (float delta);
Index: menu_background.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/menu_background.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- menu_background.cxx 13 Dec 2003 15:10:44 -0000 1.11
+++ menu_background.cxx 14 Dec 2003 00:30:04 -0000 1.12
@@ -25,11 +25,11 @@
MenuBackground::MenuBackground ()
{
- layer_manager.add_layer (PingusResource::load_surface("menu/layer1",
"core"), 0, 0, 12, 0);
- layer_manager.add_layer (PingusResource::load_surface("menu/layer2",
"core"), 0, 150, 25, 0);
- layer_manager.add_layer (PingusResource::load_surface ("menu/layer3",
"core"), 0, 200, 50, 0);
- layer_manager.add_layer (PingusResource::load_surface ("menu/layer4",
"core"), 0, 600 - 171, 100, 0);
- layer_manager.add_layer (PingusResource::load_surface ("menu/layer5",
"core"), 0, 500, 200, 0);
+ layer_manager.add_layer (PingusResource::load_sprite("menu/layer1", "core"),
0, 0, 12, 0);
+ layer_manager.add_layer (PingusResource::load_sprite("menu/layer2", "core"),
0, 150, 25, 0);
+ layer_manager.add_layer (PingusResource::load_sprite("menu/layer3", "core"),
0, 200, 50, 0);
+ layer_manager.add_layer (PingusResource::load_sprite("menu/layer4", "core"),
0, 600 - 171, 100, 0);
+ layer_manager.add_layer (PingusResource::load_sprite("menu/layer5", "core"),
0, 500, 200, 0);
}
MenuBackground::~MenuBackground ()
Index: menu_button.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/menu_button.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- menu_button.cxx 22 Oct 2003 12:35:47 -0000 1.15
+++ menu_button.cxx 14 Dec 2003 00:30:04 -0000 1.16
@@ -67,8 +67,8 @@
CL_Display::get_height() - font.get_height(),
desc.c_str());
- gc.draw(surface_p, x_pos - surface_p.get_width()/2,
- y_pos - surface_p.get_height()/2);
+ gc.draw(surface_p, Vector(x_pos - surface_p.get_width()/2,
+ y_pos - surface_p.get_height()/2));
if (line2.empty())
{
@@ -93,9 +93,11 @@
desc.c_str());
gc.draw(surface_p,
- static_cast<int>(x_pos - surface_p.get_width()/2 * shrink),
- static_cast<int>(y_pos - surface_p.get_height()/2 * shrink),
+ Vector(x_pos - surface_p.get_width()/2 * shrink,
+ y_pos - surface_p.get_height()/2 * shrink));
+#ifdef CLANLIB_0_6
shrink, shrink, 0);
+#endif
if (line2.empty())
{
@@ -116,8 +118,8 @@
else
{
gc.draw(surface_p,
- x_pos - surface_p.get_width()/2,
- y_pos - surface_p.get_height()/2);
+ Vector(x_pos - surface_p.get_width()/2,
+ y_pos - surface_p.get_height()/2));
}
UNUSED_ARG(gc);
}
@@ -182,11 +184,11 @@
line1 = _("Credits");
//line1["de"] = "Credits";
- surface_p = PingusResource::load_surface("menu/credits_on", "core");
- // surface = PingusResource::load_surface("NewButtons/credits_off",
"menu");
+ surface_p = PingusResource::load_sprite("menu/credits_on", "core");
+ // surface = PingusResource::load_sprite("NewButtons/credits_off",
"menu");
- //surface = PingusResource::load_surface("Buttons/play", "menu");
- //surface_p = PingusResource::load_surface("Buttons/play_p", "menu");
+ //surface = PingusResource::load_sprite("Buttons/play", "menu");
+ //surface_p = PingusResource::load_sprite("Buttons/play_p", "menu");
}
CreditButton::~CreditButton ()
@@ -217,11 +219,11 @@
line1 = _("Options");
//line1["de"] = "Einstellungen";
- // surface = PingusResource::load_surface("NewButtons/options_off",
"menu");
- surface_p = PingusResource::load_surface("menu/options_on", "core");
+ // surface = PingusResource::load_sprite("NewButtons/options_off",
"menu");
+ surface_p = PingusResource::load_sprite("menu/options_on", "core");
- // surface = PingusResource::load_surface("Buttons/options", "menu");
- // surface_p = PingusResource::load_surface("Buttons/options_p", "menu");
+ // surface = PingusResource::load_sprite("Buttons/options", "menu");
+ // surface_p = PingusResource::load_sprite("Buttons/options_p", "menu");
}
OptionsButton::~OptionsButton ()
@@ -253,11 +255,11 @@
line1 = _("Exit");
//line1["de"] = "Ausgang";
- // surface = PingusResource::load_surface("Buttons/quit", "menu");
- // surface_p = PingusResource::load_surface("Buttons/quit_p", "menu");
+ // surface = PingusResource::load_sprite("Buttons/quit", "menu");
+ // surface_p = PingusResource::load_sprite("Buttons/quit_p", "menu");
- // surface = PingusResource::load_surface("NewButtons/exit_off", "menu");
- surface_p = PingusResource::load_surface("menu/exit_on", "core");
+ // surface = PingusResource::load_sprite("NewButtons/exit_off", "menu");
+ surface_p = PingusResource::load_sprite("menu/exit_on", "core");
}
QuitButton::~QuitButton()
@@ -277,8 +279,8 @@
x_pos = CL_Display::get_width() * 400 / 800;
y_pos = CL_Display::get_height() * 500 / 600;
- //surface = PingusResource::load_surface("menu/load", "core");
- surface_p = PingusResource::load_surface("menu/load_p", "core");
+ //surface = PingusResource::load_sprite("menu/load", "core");
+ surface_p = PingusResource::load_sprite("menu/load_p", "core");
}
LoadButton::~LoadButton()
@@ -310,10 +312,10 @@
//line1["de"] = "Level";
//line2["de"] = "Editor";
- // surface = PingusResource::load_surface("Buttons/editor", "menu");
- // surface_p = PingusResource::load_surface("Buttons/editor_p", "menu");
+ // surface = PingusResource::load_sprite("Buttons/editor", "menu");
+ // surface_p = PingusResource::load_sprite("Buttons/editor_p", "menu");
- surface_p = PingusResource::load_surface("menu/create_on", "core");
+ surface_p = PingusResource::load_sprite("menu/create_on", "core");
}
EditorButton::~EditorButton ()
@@ -341,7 +343,7 @@
desc = _("..:: Start the game ::..");
line1 = _("Start");
- surface_p = PingusResource::load_surface("menu/play_on", "core");
+ surface_p = PingusResource::load_sprite("menu/play_on", "core");
}
StoryButton::~StoryButton () {}
@@ -373,7 +375,7 @@
desc = _("..:: Start a contrib level ::..");
line1 = _("Contrib");
- surface_p = PingusResource::load_surface("menu/play_on", "core");
+ surface_p = PingusResource::load_sprite("menu/play_on", "core");
}
void
@@ -398,7 +400,7 @@
line1 = _("Multi");
- surface_p = PingusResource::load_surface("menu/multi_on", "core");
+ surface_p = PingusResource::load_sprite("menu/multi_on", "core");
}
MultiplayerButton::~MultiplayerButton ()
Index: menu_button.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/menu_button.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- menu_button.hxx 21 Oct 2003 21:37:06 -0000 1.7
+++ menu_button.hxx 14 Dec 2003 00:30:04 -0000 1.8
@@ -21,7 +21,7 @@
#define HEADER_PINGUS_SURFACE_BUTTON_HXX
#include <string>
-#include <ClanLib/Display/surface.h>
+#include <ClanLib/Display/sprite.h>
#include <ClanLib/Display/font.h>
#include "gui/component.hxx"
@@ -33,7 +33,7 @@
class SurfaceButton : public GUI::Component
{
protected:
- CL_Surface surface_p;
+ CL_Sprite surface_p;
CL_Font font;
CL_Font font_large;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src exit_menu.cxx, 1.23, 1.24 exit_menu.hxx, 1.13, 1.14 layer_manager.cxx, 1.7, 1.8 layer_manager.hxx, 1.12, 1.13 menu_background.cxx, 1.11, 1.12 menu_button.cxx, 1.15, 1.16 menu_button.hxx, 1.7, 1.8,
Ingo Ruhnke <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/data/data core.xml, 1.2, 1.3 worldmaps.xml, 1.1, 1.2
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldmap manager.cxx, 1.41, 1.42 surface_drawable.cxx, 1.7, 1.8 surface_drawable.hxx, 1.7, 1.8 worldmap.cxx, 1.52, 1.53 worldmap.hxx, 1.31, 1.32
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/data/data core.xml, 1.2, 1.3 worldmaps.xml, 1.1, 1.2
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldmap manager.cxx, 1.41, 1.42 surface_drawable.cxx, 1.7, 1.8 surface_drawable.hxx, 1.7, 1.8 worldmap.cxx, 1.52, 1.53 worldmap.hxx, 1.31, 1.32
- Index(es):