[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r4158 - in branches/pingus-hanusz/src: . components
From: |
grumbel |
Subject: |
[Pingus-CVS] r4158 - in branches/pingus-hanusz/src: . components |
Date: |
Wed, 25 May 2011 15:40:12 +0200 |
Author: grumbel
Date: 2011-05-25 15:40:12 +0200 (Wed, 25 May 2011)
New Revision: 4158
Modified:
branches/pingus-hanusz/src/client.cpp
branches/pingus-hanusz/src/components/pingus_counter.cpp
branches/pingus-hanusz/src/pingu_enums.cpp
branches/pingus-hanusz/src/result.hpp
branches/pingus-hanusz/src/result_screen.cpp
branches/pingus-hanusz/src/start_screen.cpp
Log:
Added PINGUS_MODE_EVIL changes
Modified: branches/pingus-hanusz/src/client.cpp
===================================================================
--- branches/pingus-hanusz/src/client.cpp 2011-05-18 12:18:55 UTC (rev
4157)
+++ branches/pingus-hanusz/src/client.cpp 2011-05-25 13:40:12 UTC (rev
4158)
@@ -72,7 +72,10 @@
gui_manager->add(small_map, true);
gui_manager->add(time_display, true);
+#ifndef PINGUS_MODE_EVIL
gui_manager->add(new ArmageddonButton(server, Display::get_width() - 40,
Display::get_height() - 62), true);
+#endif
+
gui_manager->add(new ForwardButton (server, Display::get_width() - 40 * 2,
Display::get_height() - 62), true);
gui_manager->add(new PauseButton (server, Display::get_width() - 40 * 3,
Display::get_height() - 62), true);
// Connect the button_panel with the playfield
Modified: branches/pingus-hanusz/src/components/pingus_counter.cpp
===================================================================
--- branches/pingus-hanusz/src/components/pingus_counter.cpp 2011-05-18
12:18:55 UTC (rev 4157)
+++ branches/pingus-hanusz/src/components/pingus_counter.cpp 2011-05-25
13:40:12 UTC (rev 4158)
@@ -46,12 +46,21 @@
World* world = server->get_world();
- snprintf(str, 128, _("Released:%3d/%d Out:%3d Saved:%3d/%d").c_str(),
- world->get_pingus()->get_number_of_released(),
- world->get_pingus()->get_number_of_allowed(),
- world->get_pingus()->get_number_of_alive(),
- world->get_pingus()->get_number_of_exited(),
- server->get_plf().get_number_to_save());
+#ifdef PINGUS_MODE_EVIL
+ snprintf(str, 128, _("Released:%3d/%d Out:%3d Killed:%3d/%d").c_str(),
+ world->get_pingus()->get_number_of_released(),
+ world->get_pingus()->get_number_of_allowed(),
+ world->get_pingus()->get_number_of_alive(),
+ world->get_pingus()->get_number_of_killed(),
+ server->get_plf().get_number_to_save());
+#else
+ snprintf(str, 128, _("Released:%3d/%d Out:%3d Saved:%3d/%d").c_str(),
+ world->get_pingus()->get_number_of_released(),
+ world->get_pingus()->get_number_of_allowed(),
+ world->get_pingus()->get_number_of_alive(),
+ world->get_pingus()->get_number_of_exited(),
+ server->get_plf().get_number_to_save());
+#endif
gc.print_center(font, gc.get_width()/2, -1, str);
}
Modified: branches/pingus-hanusz/src/pingu_enums.cpp
===================================================================
--- branches/pingus-hanusz/src/pingu_enums.cpp 2011-05-18 12:18:55 UTC (rev
4157)
+++ branches/pingus-hanusz/src/pingu_enums.cpp 2011-05-25 13:40:12 UTC (rev
4158)
@@ -22,7 +22,12 @@
// Pingu "globals". Make [deadly_velocity = 20 * sqrt("normal gravity")] so
// that the "deadly distance" is the same and therefore doesn't break levels.
+#ifdef PINGUS_MODE_EVIL
+const float deadly_velocity = 13.0f;
+#else
const float deadly_velocity = 10.0f;
+#endif
+
const int pingu_height = 26;
namespace Actions {
Modified: branches/pingus-hanusz/src/result.hpp
===================================================================
--- branches/pingus-hanusz/src/result.hpp 2011-05-18 12:18:55 UTC (rev
4157)
+++ branches/pingus-hanusz/src/result.hpp 2011-05-25 13:40:12 UTC (rev
4158)
@@ -51,7 +51,11 @@
bool aborted;
bool success() const {
+#ifdef PINGUS_MODE_EVIL
+ return (killed >= needed);
+#else
return (saved >= needed);
+#endif
}
};
Modified: branches/pingus-hanusz/src/result_screen.cpp
===================================================================
--- branches/pingus-hanusz/src/result_screen.cpp 2011-05-18 12:18:55 UTC
(rev 4157)
+++ branches/pingus-hanusz/src/result_screen.cpp 2011-05-25 13:40:12 UTC
(rev 4158)
@@ -193,6 +193,15 @@
std::string message;
if (result.success())
{
+#ifdef PINGUS_MODE_EVIL
+ if (result.killed == result.total)
+ message = _("Perfect! You killed everyone possible - great!");
+ else if (result.killed == result.needed)
+ message = _("You killed exactly what you needed - you made it, but\n"
+ "maybe you can do better?");
+ else
+ message = _("Not everybody was killed, but still good work!");
+#else
if (result.killed == 0 && result.saved == result.total)
message = _("Perfect! You saved everyone possible - great!");
else if (result.killed == 0)
@@ -204,9 +213,16 @@
message = _("Not everybody was saved, but still good work!");
else
message = _("What can I say, you made it - congratulations!");
+#endif
}
else
{
+#ifdef PINGUS_MODE_EVIL
+ if (result.killed == 0)
+ message = _("You are not a killer, aren't you.");
+ else
+ message = _("Better luck next time!");
+#else
if (result.killed == result.total)
message = _("You killed everybody, not good.");
else if (result.saved == 0)
@@ -220,6 +236,7 @@
message = _("Only a handful more and you would have made it - try
again!");
else
message = _("Better luck next time!");
+#endif
}
gc.print_center(Fonts::chalk_normal, gc.get_width()/2,
Display::get_height()/2 - 70, message);
@@ -236,14 +253,24 @@
int right_x = Display::get_width()/2 + 100;
int y = Display::get_height()/2 + 10;
+#ifdef PINGUS_MODE_EVIL
+ gc.print_left(Fonts::chalk_normal, left_x, y, _("Killed: "));
+ gc.print_right(Fonts::chalk_normal, right_x, y,
StringUtil::to_string(result.killed)
+ + "/" + StringUtil::to_string(result.needed));;
+#else
gc.print_left(Fonts::chalk_normal, left_x, y, _("Saved: "));
gc.print_right(Fonts::chalk_normal, right_x, y,
StringUtil::to_string(result.saved)
+ "/" + StringUtil::to_string(result.needed));;
+#endif
+#ifdef PINGUS_MODE_EVIL
+ gc.print_left(Fonts::chalk_normal, left_x, (y+=30), _("Survived: "));
+ gc.print_right(Fonts::chalk_normal, right_x, y,
StringUtil::to_string(result.saved));
+#else
gc.print_left(Fonts::chalk_normal, left_x, (y+=30), _("Died: "));
gc.print_right(Fonts::chalk_normal, right_x, y,
StringUtil::to_string(result.killed));
+#endif
-
gc.print_left(Fonts::chalk_normal, left_x, (y+=30), _("Time left: "));
gc.print_right(Fonts::chalk_normal, right_x, y, time_str);
Modified: branches/pingus-hanusz/src/start_screen.cpp
===================================================================
--- branches/pingus-hanusz/src/start_screen.cpp 2011-05-18 12:18:55 UTC (rev
4157)
+++ branches/pingus-hanusz/src/start_screen.cpp 2011-05-25 13:40:12 UTC (rev
4158)
@@ -163,7 +163,12 @@
gc.print_left (Fonts::chalk_normal, left_x, y, _("Number of Pingus: "));
gc.print_right(Fonts::chalk_normal, right_x, y,
StringUtil::to_string(plf.get_number_of_pingus()));
+#ifdef PINGUS_MODE_EVIL
+ gc.print_left (Fonts::chalk_normal, left_x, (y += 30), _("Number to Kill:
"));
+#else
gc.print_left (Fonts::chalk_normal, left_x, (y += 30), _("Number to Save:
"));
+#endif
+
gc.print_right(Fonts::chalk_normal, right_x, y,
StringUtil::to_string(plf.get_number_to_save()));
gc.print_left (Fonts::chalk_normal, left_x, (y += 30), _("Time: "));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r4158 - in branches/pingus-hanusz/src: . components,
grumbel <=