[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src story.cxx,1.16,1.17 story.hxx,1.12,1.
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src story.cxx,1.16,1.17 story.hxx,1.12,1.13 story_screen.cxx,1.12,1.13 story_screen.hxx,1.4,1.5 |
Date: |
6 Apr 2003 12:40:49 -0000 |
Update of /var/lib/cvs/Games/Pingus/src
In directory dark:/tmp/cvs-serv23697/src
Modified Files:
story.cxx story.hxx story_screen.cxx story_screen.hxx
Log Message:
- added next button to story screen
Index: story.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/story.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- story.cxx 5 Apr 2003 20:24:16 -0000 1.16
+++ story.cxx 6 Apr 2003 12:40:47 -0000 1.17
@@ -21,8 +21,8 @@
#include "my_gettext.hxx"
#include "story.hxx"
-std::vector<StoryPage> Story::credits;
-std::vector<StoryPage> Story::intro;
+Story Story::credits;
+Story Story::intro;
void
Story::init()
@@ -34,7 +34,8 @@
void
Story::init_credits()
{
- credits.push_back
+ credits.title = _("The Journey Continues");
+ credits.pages.push_back
(StoryPage
(ResDescriptor("Story/credits1", "story"),
_("Now after you and the Pingus have learned the basics and\n"
@@ -44,7 +45,7 @@
"climated regions the Pingus have to find something else to guide\n"
"there on there journey.\n")));
- credits.push_back
+ credits.pages.push_back
(StoryPage
(ResDescriptor("Story/credits2", "story"),
_("But as the eldest have said, the Tutorial Island provides not\n"
@@ -52,7 +53,7 @@
"the world, cause the wood if the large tree at the end of the\n"
"island is brings good wood to construct a float.\n")));
- credits.push_back
+ credits.pages.push_back
(StoryPage
(ResDescriptor("Story/credits3", "story"),
_("So the Pingus set out and constructed a some large floats, enough\n"
@@ -61,7 +62,7 @@
"their familiar ground and entering the unknown parts of the\n"
"world.\n")));
- credits.push_back
+ credits.pages.push_back
(StoryPage
(ResDescriptor("Story/credits4", "story"),
_("So the Pingus sat on there float, worrying whats to come and\n"
@@ -69,13 +70,14 @@
"\n"
"To be continued...")));
- std::reverse(credits.begin(), credits.end());
+ std::reverse(credits.pages.begin(), credits.pages.end());
}
void
Story::init_intro()
{
- intro.push_back
+ intro.title = _("The Journey Begins");
+ intro.pages.push_back
(StoryPage
(ResDescriptor("Story/story0", "story"),
_("For a long time now the Pingus have lived happily in peace on the\n"
@@ -83,7 +85,7 @@
"balance and it seemed like nothing could disrupt there peace. The\n"
"Pingus where happy and it seemed like this could never end.\n")));
- intro.push_back
+ intro.pages.push_back
(StoryPage
(ResDescriptor("Story/story1", "story"),
_("But then one day, things began to change slowly, the sky got darker\n"
@@ -92,7 +94,7 @@
"worse and worse with every year.")));
- intro.push_back
+ intro.pages.push_back
(StoryPage
(ResDescriptor("Story/story2", "story"),
_("The snow began to melt away in a few regions and food became an\n"
@@ -100,7 +102,7 @@
"for colder areas, but the Pingus knew that this couldn't help,\n"
"they knew that they had to do something about this problem.")));
- intro.push_back
+ intro.pages.push_back
(StoryPage
(ResDescriptor("Story/story3", "story"),
_("So the circle of the eldest came together to decide what to do\n"
@@ -108,7 +110,7 @@
"to find the cause for this warming. The expedition consisted of\n"
"hundreds of the bravest Pingus around on the south pole.")));
- intro.push_back
+ intro.pages.push_back
(StoryPage
(ResDescriptor("Story/story4", "story"),
_("And they picked you to lead them on there journey around the\n"
@@ -117,7 +119,7 @@
"Island. According to the eldest, this island has always been the\n"
"first stop of Pingus which where send out into the world.")));
- intro.push_back
+ intro.pages.push_back
(StoryPage
(ResDescriptor("Story/story5", "story"),
_("The island consists of many regions which are ideally to train the\n"
@@ -125,7 +127,7 @@
"to build bridges, climb, bash and all the rest of there talents\n"
"which they will surly need on there long and dangerous journey.")));
- intro.push_back
+ intro.pages.push_back
(StoryPage
(ResDescriptor("Story/story6", "story"),
_("While you on the other site can practice there your ability to\n"
@@ -134,7 +136,7 @@
"since you will need them all for sure an your journey around the\n"
"world.")));
- intro.push_back
+ intro.pages.push_back
(StoryPage
(ResDescriptor("Story/story6", "story"),
_("Now that you and the Pingus have arrive at tutorial island it\n"
@@ -142,7 +144,7 @@
"\n"
" Good Luck!")));
- std::reverse(intro.begin(), intro.end());
+ std::reverse(intro.pages.begin(), intro.pages.end());
}
/* EOF */
Index: story.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/story.hxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- story.hxx 5 Apr 2003 20:24:16 -0000 1.12
+++ story.hxx 6 Apr 2003 12:40:47 -0000 1.13
@@ -27,8 +27,11 @@
{
private:
public:
- static std::vector<StoryPage> credits;
- static std::vector<StoryPage> intro;
+ std::string title;
+ std::vector<StoryPage> pages;
+
+ static Story credits;
+ static Story intro;
static void init();
private:
Index: story_screen.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/story_screen.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- story_screen.cxx 5 Apr 2003 20:59:38 -0000 1.12
+++ story_screen.cxx 6 Apr 2003 12:40:47 -0000 1.13
@@ -33,6 +33,7 @@
#include "res_descriptor.hxx"
#include "worldmap/manager.hxx"
#include "stat_manager.hxx"
+#include "story.hxx"
#include "sound/sound.hxx"
class StoryScreenComponent : public GUI::Component
@@ -44,11 +45,11 @@
bool page_displayed_completly;
- std::vector<StoryPage> pages;
+ Story story;
CL_Surface page_surface;
StoryPage current_page;
public:
- StoryScreenComponent (const std::vector<StoryPage>&);
+ StoryScreenComponent (const Story&);
virtual ~StoryScreenComponent () {}
void draw (GraphicContext& gc);
@@ -64,14 +65,20 @@
StoryScreenComponent* story_comp;
public:
StoryScreenContinueButton(StoryScreenComponent* arg_story_comp)
- : GUI::SurfaceButton(600, 550,
- ResDescriptor("result/ok", "core",
ResDescriptor::RD_RESOURCE),
- ResDescriptor("result/ok", "core",
ResDescriptor::RD_RESOURCE),
- ResDescriptor("result/ok", "core",
ResDescriptor::RD_RESOURCE)),
+ : GUI::SurfaceButton(620, 460,
+ ResDescriptor("misc/next", "core",
ResDescriptor::RD_RESOURCE),
+ ResDescriptor("misc/next", "core",
ResDescriptor::RD_RESOURCE),
+ ResDescriptor("misc/next_hover", "core",
ResDescriptor::RD_RESOURCE)),
story_comp(arg_story_comp)
{
}
+ void on_pointer_enter()
+ {
+ SurfaceButton::on_pointer_enter();
+ PingusSound::play_sound ("tick", .3);
+ }
+
void on_click()
{
story_comp->next_text();
@@ -80,7 +87,7 @@
};
-StoryScreen::StoryScreen(const std::vector<StoryPage>& arg_pages)
+StoryScreen::StoryScreen(const Story& arg_pages)
{
story_comp = new StoryScreenComponent(arg_pages);
gui_manager->add (story_comp);
@@ -91,13 +98,13 @@
{
}
-StoryScreenComponent::StoryScreenComponent (const std::vector<StoryPage>&
arg_pages)
- : pages(arg_pages)
+StoryScreenComponent::StoryScreenComponent (const Story& arg_story)
+ : story(arg_story)
{
page_displayed_completly = false;
time_passed = 0;
- current_page = pages.back();
+ current_page = story.pages.back();
page_surface = PingusResource::load_surface(current_page.image);
background = PingusResource::load_surface("menu/startscreenbg", "core");
}
@@ -106,7 +113,7 @@
StoryScreenComponent::draw (GraphicContext& gc)
{
gc.draw(background, 0, 0);
- gc.print_center(Fonts::chalk_large, 400, 100, "Chapter I - Tutorial Island");
+ gc.print_center(Fonts::chalk_large, 400, 100, story.title);
gc.draw(page_surface, gc.get_width()/2 - page_surface.get_width()/2,
160);
gc.print_left(Fonts::chalk_normal, 120, 335, display_text);
@@ -146,7 +153,7 @@
StoryScreen::on_startup()
{
//PingusSound::play_sound ("letsgo");
- PingusSound::play_music("pingus-4.it", .5f);
+ PingusSound::play_music("pingus-4.it", .7f);
}
void
@@ -159,10 +166,10 @@
}
else
{
- pages.pop_back();
- if (!pages.empty())
+ story.pages.pop_back();
+ if (!story.pages.empty())
{
- current_page = pages.back();
+ current_page = story.pages.back();
page_surface = PingusResource::load_surface(current_page.image);
display_text = "";
time_passed = 0;
Index: story_screen.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/story_screen.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- story_screen.hxx 5 Apr 2003 20:24:16 -0000 1.4
+++ story_screen.hxx 6 Apr 2003 12:40:47 -0000 1.5
@@ -24,6 +24,7 @@
#include "res_descriptor.hxx"
#include "gui/gui_screen.hxx"
+class Story;
class StoryScreenComponent;
class StoryPage
@@ -46,7 +47,7 @@
private:
StoryScreenComponent* story_comp;
public:
- StoryScreen(const std::vector<StoryPage>& pages);
+ StoryScreen(const Story& pages);
~StoryScreen();
void on_startup();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src story.cxx,1.16,1.17 story.hxx,1.12,1.13 story_screen.cxx,1.12,1.13 story_screen.hxx,1.4,1.5,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/gui screen_manager.cxx,1.5,1.6
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/data/images/core/misc next.png,NONE,1.1 next_hover.png,NONE,1.1
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/gui screen_manager.cxx,1.5,1.6
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/data/images/core/misc next.png,NONE,1.1 next_hover.png,NONE,1.1
- Index(es):