[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/game campaign.c
From: |
address@hidden |
Subject: |
[Stratagus-CVS] stratagus/src/game campaign.c |
Date: |
17 Jan 2004 02:50:53 +1100 |
CVSROOT: /home/strat
Module name: stratagus
Changes by: <address@hidden> 04/01/17 02:50:53
Modified files:
src/game : campaign.c
Log message:
Campaign Saves correctly now
Patches:
Index: stratagus/src/game/campaign.c
diff -u stratagus/src/game/campaign.c:1.44 stratagus/src/game/campaign.c:1.45
--- stratagus/src/game/campaign.c:1.44 Sat Jan 17 02:17:23 2004
+++ stratagus/src/game/campaign.c Sat Jan 17 02:50:53 2004
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: campaign.c,v 1.44 2004/01/16 15:17:23 wizzard Exp $
+// $Id: campaign.c,v 1.45 2004/01/16 15:50:53 wizzard Exp $
//@{
@@ -561,51 +561,54 @@
int i;
CLprintf(file, "\n--- -----------------------------------------\n");
- CLprintf(file, "--- MODULE: campaign $Id: campaign.c,v 1.44 2004/01/16
15:17:23 wizzard Exp $\n\n");
+ CLprintf(file, "--- MODULE: campaign $Id: campaign.c,v 1.45 2004/01/16
15:50:53 wizzard Exp $\n\n");
if (!CurrentCampaign) {
return;
}
- CLprintf(file, "(define-campaign 'current");
+ CLprintf(file, "DefineCampaign(\"current\", ");
if (CurrentCampaign->Name) {
- CLprintf(file, " 'name \"%s\"", CurrentCampaign->Name);
+ CLprintf(file, " \"name\", \"%s\",", CurrentCampaign->Name);
}
- CLprintf(file, " 'players %d", CurrentCampaign->Players);
+ CLprintf(file, " \"players\", %d,", CurrentCampaign->Players);
CLprintf(file, "\n");
- CLprintf(file, " 'campaign (list\n");
+ CLprintf(file, " \"campaign\", {\n");
for (ch = CurrentCampaign->Chapters; ch; ch = ch->Next) {
if (ch->Type == ChapterShowPicture) {
- CLprintf(file, " 'show-picture (list\n");
- CLprintf(file, " 'image \"%s\"\n",
ch->Data.Picture.Image);
- CLprintf(file, " 'fade-in %d\n",
ch->Data.Picture.FadeIn);
- CLprintf(file, " 'fade-out %d\n",
ch->Data.Picture.FadeOut);
- CLprintf(file, " 'display-time %d\n",
+ CLprintf(file, " \"show-picture\", {\n");
+ CLprintf(file, " \"image\", \"%s\",\n",
ch->Data.Picture.Image);
+ CLprintf(file, " \"fade-in\", %d,\n",
ch->Data.Picture.FadeIn);
+ CLprintf(file, " \"fade-out\", %d,\n",
ch->Data.Picture.FadeOut);
+ CLprintf(file, " \"display-time\", %d,\n",
ch->Data.Picture.DisplayTime);
for (text = ch->Data.Picture.Text; text; text =
text->Next) {
- CLprintf(file, " 'text (list\n");
- CLprintf(file, " 'font '%s\n",
FontNames[text->Font]);
- CLprintf(file, " 'x %d\n", text->X);
- CLprintf(file, " 'y %d\n", text->Y);
- CLprintf(file, " 'width %d\n",
text->Width);
- CLprintf(file, " 'height %d\n",
text->Height);
+ CLprintf(file, " \"text\", {\n");
+ CLprintf(file, " \"font\", \"%s\",\n",
FontNames[text->Font]);
+ CLprintf(file, " \"x\", %d,\n", text->X);
+ CLprintf(file, " \"y\", %d,\n", text->Y);
+ CLprintf(file, " \"width\", %d,\n",
text->Width);
+ CLprintf(file, " \"height\", %d,\n",
text->Height);
if (text->Align == PictureTextAlignLeft) {
- CLprintf(file," 'align 'left\n");
+ CLprintf(file," \"align\",
\",left\",\n");
} else {
- CLprintf(file," 'align 'center\n");
+ CLprintf(file," \"align\",
\"center\",\n");
+ }
+ CLprintf(file, " \"text\", \"%s\"",
text->Text);
+ CLprintf(file, "}");
+ if (text->Next) {
+ CLprintf(file, ",");
}
- CLprintf(file, " 'text \"%s\"\n",
text->Text);
- CLprintf(file, ")\n");
}
- CLprintf(file," )\n");
+ CLprintf(file,"}, \n");
} else if (ch->Type == ChapterPlayLevel) {
- CLprintf(file, " 'play-level \"%s\"\n",
ch->Data.Level.Name);
+ CLprintf(file, " \"play-level\", \"%s\",\n",
ch->Data.Level.Name);
} else if (ch->Type == ChapterPlayVideo) {
- CLprintf(file, " 'play-movie \"%s\" %d\n",
+ CLprintf(file, " \"play-movie\", \"%s\", %d\n",
ch->Data.Movie.PathName, ch->Data.Movie.Flags);
}
}
- CLprintf(file, " )\n");
+ CLprintf(file, " }\n");
CLprintf(file, ")\n");
ch = CurrentCampaign->Chapters;
@@ -620,7 +623,7 @@
if (!ch) {
i = 0;
}
- CLprintf(file, "(set-current-chapter! %d)\n", i);
+ CLprintf(file, "SetCurrentChapter(%d)\n", i);
}
/**
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Stratagus-CVS] stratagus/src/game campaign.c,
address@hidden <=