if (leveldir_current->readonly)
{
- DrawTextF(mSX + level_width + 9 * 32 - 2,
+ DrawTextS(mSX + level_width + 9 * 32 - 2,
mSY + 3 * 32 + 1 - 7, FONT_TEXT_3, "READ");
- DrawTextF(mSX + level_width + 9 * 32 - 2,
+ DrawTextS(mSX + level_width + 9 * 32 - 2,
mSY + 3 * 32 + 1 + 7, FONT_TEXT_3, "ONLY");
}
static int helpscreen_step[MAX_HELPSCREEN_ELS];
static int helpscreen_frame[MAX_HELPSCREEN_ELS];
+#if 0
static int helpscreen_action[] =
{
IMG_PLAYER_1_MOVING_DOWN, 16,
HA_END
};
+#endif
+
static char *helpscreen_eltext[][2] =
{
{"THE HERO:", "(Is _this_ guy good old Rockford?)"},
};
static int num_helpscreen_els = sizeof(helpscreen_eltext) / (2*sizeof(char *));
+#if 0
static char *helpscreen_music[][3] =
{
{ "Alchemy", "Ian Boddy", "Drive" },
{ "Voyager", "The Alan Parsons Project","Pyramid" },
{ "Twilight Painter", "Tangerine Dream", "Heartbreakers" }
};
+#endif
+
static int num_helpscreen_music = 7;
static int helpscreen_musicpos;
-#if 0
-void OLD_DrawHelpScreenElAction(int start)
+#if 1
+void DrawHelpScreenElAction(int start)
{
int i = 0, j = 0;
- int frame, graphic;
- int xstart = SX+16, ystart = SY+64+2*32, ystep = TILEY+4;
+ int xstart = mSX + 16;
+ int ystart = mSY + 64 + 2 * 32;
+ int ystep = TILEY + 4;
+ int element, action, direction;
+ int graphic;
+ int delay;
+ int sync_frame;
- while(helpscreen_action[j] != HA_END)
+ while (info_animation_info[j].element != -999)
{
- if (i>=start+MAX_HELPSCREEN_ELS || i>=num_helpscreen_els)
+ if (i >= start + MAX_HELPSCREEN_ELS || i >= num_helpscreen_els)
break;
- else if (i<start || helpscreen_delay[i-start])
+ else if (i < start)
{
- if (i>=start && helpscreen_delay[i-start])
- helpscreen_delay[i-start]--;
-
- while(helpscreen_action[j] != HA_NEXT)
+ while (info_animation_info[j].element != -1)
j++;
+
j++;
i++;
+
continue;
}
- j += 3*helpscreen_step[i-start];
- graphic = helpscreen_action[j++];
+ j += helpscreen_step[i - start];
+
+ element = info_animation_info[j].element;
+ action = info_animation_info[j].action;
+ direction = info_animation_info[j].direction;
- if (helpscreen_frame[i-start])
+ if (action != -1 && direction != -1)
+ graphic = el_act_dir2img(element, action, direction);
+ else if (action != -1)
+ graphic = el_act2img(element, action);
+ else if (direction != -1)
+ graphic = el_act2img(element, direction);
+ else
+ graphic = el2img(element);
+
+ delay = info_animation_info[j++].delay;
+
+ if (delay == -1)
+ delay = 1000000;
+
+ if (helpscreen_frame[i - start] == 0)
{
- frame = helpscreen_action[j++] - helpscreen_frame[i-start];
- helpscreen_frame[i-start]--;
+ sync_frame = 0;
+ helpscreen_frame[i - start] = delay - 1;
}
else
{
- frame = 0;
- helpscreen_frame[i-start] = helpscreen_action[j++]-1;
+ sync_frame = delay - helpscreen_frame[i - start];
+ helpscreen_frame[i - start]--;
}
- helpscreen_delay[i-start] = helpscreen_action[j++] - 1;
-
- if (helpscreen_action[j] == HA_NEXT)
+ if (info_animation_info[j].element == -1)
{
- if (!helpscreen_frame[i-start])
- helpscreen_step[i-start] = 0;
+ if (!helpscreen_frame[i - start])
+ helpscreen_step[i - start] = 0;
}
else
{
- if (!helpscreen_frame[i-start])
- helpscreen_step[i-start]++;
- while(helpscreen_action[j] != HA_NEXT)
+ if (!helpscreen_frame[i - start])
+ helpscreen_step[i - start]++;
+ while(info_animation_info[j].element != -1)
j++;
}
+
j++;
- DrawOldGraphicExt(drawto, xstart, ystart+(i-start)*ystep, graphic+frame);
+ ClearRectangleOnBackground(drawto, xstart, ystart + (i - start) * ystep,
+ TILEX, TILEY);
+ DrawGraphicAnimationExt(drawto, xstart, ystart + (i - start) * ystep,
+ graphic, sync_frame, USE_MASKING);
+
i++;
}
- for(i=2;i<16;i++)
- {
- MarkTileDirty(0,i);
- MarkTileDirty(1,i);
- }
+ redraw_mask |= REDRAW_FIELD;
+
+ FrameCounter++;
}
-#endif
+
+#else
void DrawHelpScreenElAction(int start)
{
FrameCounter++;
}
+#endif
void DrawHelpScreenElText(int start)
{
ClearWindow();
DrawHeadline();
- DrawTextFCentered(100, FONT_TEXT_1, "The game elements:");
+ DrawTextSCentered(100, FONT_TEXT_1, "The game elements:");
for(i=start; i < start + MAX_HELPSCREEN_ELS && i < num_helpscreen_els; i++)
{
helpscreen_eltext[i][1], FONT_TEXT_2);
}
- DrawTextFCentered(ybottom, FONT_TEXT_4,
+ DrawTextSCentered(ybottom, FONT_TEXT_4,
"Press any key or button for next page");
}
void DrawHelpScreenMusicText(int num)
{
+ struct MusicFileInfo *list = music_file_info;
int ystart = 150, ystep = 30;
int ybottom = SYSIZE - 20;
+ int i;
+
+ for (i=0; i < num && list; i++)
+ list = list->next;
FadeSoundsAndMusic();
ClearWindow();
DrawHeadline();
- DrawTextFCentered(100, FONT_TEXT_1, "The game background music loops:");
+ DrawTextSCentered(100, FONT_TEXT_1, "The game background music loops:");
- DrawTextFCentered(ystart + 0 * ystep, FONT_TEXT_2, "Excerpt from");
+#if 1
+ DrawTextSCentered(ystart + 0 * ystep, FONT_TEXT_2, "Excerpt from");
+ DrawTextFCentered(ystart + 1 * ystep, FONT_TEXT_3, "\"%s\"", list->title);
+ DrawTextSCentered(ystart + 2 * ystep, FONT_TEXT_2, "by");
+ DrawTextFCentered(ystart + 3 * ystep, FONT_TEXT_3, "%s", list->artist);
+ DrawTextSCentered(ystart + 4 * ystep, FONT_TEXT_2, "from the album");
+ DrawTextFCentered(ystart + 5 * ystep, FONT_TEXT_3, "\"%s\"", list->album);
+#else
+ DrawTextSCentered(ystart + 0 * ystep, FONT_TEXT_2, "Excerpt from");
DrawTextFCentered(ystart + 1 * ystep, FONT_TEXT_3,
"\"%s\"", helpscreen_music[num][0]);
- DrawTextFCentered(ystart + 2 * ystep, FONT_TEXT_2, "by");
+ DrawTextSCentered(ystart + 2 * ystep, FONT_TEXT_2, "by");
DrawTextFCentered(ystart + 3 * ystep, FONT_TEXT_3,
"%s", helpscreen_music[num][1]);
- DrawTextFCentered(ystart + 4 * ystep, FONT_TEXT_2, "from the album");
+ DrawTextSCentered(ystart + 4 * ystep, FONT_TEXT_2, "from the album");
DrawTextFCentered(ystart + 5 * ystep, FONT_TEXT_3,
"\"%s\"", helpscreen_music[num][2]);
+#endif
- DrawTextFCentered(ybottom, FONT_TEXT_4,
+ DrawTextSCentered(ybottom, FONT_TEXT_4,
"Press any key or button for next page");
#if 0
ClearWindow();
DrawHeadline();
- DrawTextFCentered(100, FONT_TEXT_1, "Credits:");
- DrawTextFCentered(ystart + 0 * ystep, FONT_TEXT_2, "DOS port of the game:");
- DrawTextFCentered(ystart + 1 * ystep, FONT_TEXT_3, "Guido Schulz");
- DrawTextFCentered(ystart + 2 * ystep, FONT_TEXT_2, "Additional toons:");
- DrawTextFCentered(ystart + 3 * ystep, FONT_TEXT_3, "Karl Hörnell");
- DrawTextFCentered(ystart + 5 * ystep, FONT_TEXT_2,
+ DrawTextSCentered(100, FONT_TEXT_1, "Credits:");
+ DrawTextSCentered(ystart + 0 * ystep, FONT_TEXT_2, "DOS port of the game:");
+ DrawTextSCentered(ystart + 1 * ystep, FONT_TEXT_3, "Guido Schulz");
+ DrawTextSCentered(ystart + 2 * ystep, FONT_TEXT_2, "Additional toons:");
+ DrawTextSCentered(ystart + 3 * ystep, FONT_TEXT_3, "Karl Hörnell");
+ DrawTextSCentered(ystart + 5 * ystep, FONT_TEXT_2,
"...and many thanks to all contributors");
- DrawTextFCentered(ystart + 6 * ystep, FONT_TEXT_2, "of new levels!");
+ DrawTextSCentered(ystart + 6 * ystep, FONT_TEXT_2, "of new levels!");
- DrawTextFCentered(ybottom, FONT_TEXT_4,
+ DrawTextSCentered(ybottom, FONT_TEXT_4,
"Press any key or button for next page");
}
ClearWindow();
DrawHeadline();
- DrawTextFCentered(100, FONT_TEXT_1, "Program information:");
+ DrawTextSCentered(100, FONT_TEXT_1, "Program information:");
- DrawTextFCentered(ystart + 0 * ystep, FONT_TEXT_2,
+ DrawTextSCentered(ystart + 0 * ystep, FONT_TEXT_2,
"This game is Freeware!");
- DrawTextFCentered(ystart + 1 * ystep, FONT_TEXT_2,
+ DrawTextSCentered(ystart + 1 * ystep, FONT_TEXT_2,
"If you like it, send e-mail to:");
- DrawTextFCentered(ystart + 2 * ystep, FONT_TEXT_3,
+ DrawTextSCentered(ystart + 2 * ystep, FONT_TEXT_3,
"info@artsoft.org");
- DrawTextFCentered(ystart + 3 * ystep, FONT_TEXT_2,
+ DrawTextSCentered(ystart + 3 * ystep, FONT_TEXT_2,
"or SnailMail to:");
- DrawTextFCentered(ystart + 4 * ystep + 0, FONT_TEXT_3,
+ DrawTextSCentered(ystart + 4 * ystep + 0, FONT_TEXT_3,
"Holger Schemel");
- DrawTextFCentered(ystart + 4 * ystep + 20, FONT_TEXT_3,
+ DrawTextSCentered(ystart + 4 * ystep + 20, FONT_TEXT_3,
"Detmolder Strasse 189");
- DrawTextFCentered(ystart + 4 * ystep + 40, FONT_TEXT_3,
+ DrawTextSCentered(ystart + 4 * ystep + 40, FONT_TEXT_3,
"33604 Bielefeld");
- DrawTextFCentered(ystart + 4 * ystep + 60, FONT_TEXT_3,
+ DrawTextSCentered(ystart + 4 * ystep + 60, FONT_TEXT_3,
"Germany");
- DrawTextFCentered(ystart + 7 * ystep, FONT_TEXT_2,
+ DrawTextSCentered(ystart + 7 * ystep, FONT_TEXT_2,
"If you have created new levels,");
- DrawTextFCentered(ystart + 8 * ystep, FONT_TEXT_2,
+ DrawTextSCentered(ystart + 8 * ystep, FONT_TEXT_2,
"send them to me to include them!");
- DrawTextFCentered(ystart + 9 * ystep, FONT_TEXT_2,
+ DrawTextSCentered(ystart + 9 * ystep, FONT_TEXT_2,
":-)");
- DrawTextFCentered(ybottom, FONT_TEXT_4,
+ DrawTextSCentered(ybottom, FONT_TEXT_4,
"Press any key or button for main menu");
}
void DrawHelpScreen()
{
+ struct MusicFileInfo *list;
int i;
UnmapAllGadgets();
helpscreen_musicpos = 0;
helpscreen_state = 0;
+ LoadInfoAnimations();
+ LoadMusicInfo();
+
+ num_helpscreen_els = 0;
+ for (i=0; info_animation_info[i].element != -999; i++)
+ if (info_animation_info[i].element == -1)
+ num_helpscreen_els++;
+
+ num_helpscreen_music = 0;
+ for (list = music_file_info; list != NULL; list = list->next)
+ num_helpscreen_music++;
+
DrawHelpScreenElText(0);
DrawHelpScreenElAction(0);
{ TYPE_SWITCH, &setup.editor.el_custom, "Custom:" },
{ TYPE_SWITCH, &setup.editor.el_custom_more, "More Custom:" },
{ TYPE_SWITCH, &setup.editor.el_headlines, "Headlines:" },
+ { TYPE_SWITCH, &setup.editor.el_user_defined, "User defined:" },
{ TYPE_EMPTY, NULL, "" },
{ TYPE_LEAVE_MENU, execSetupMain, "Back" },
{ 0, NULL, NULL }
#if 0
DeactivateJoystickForCalibration();
- DrawTextFCentered(SYSIZE - 20, FONT_TEXT_4,
+ DrawTextSCentered(SYSIZE - 20, FONT_TEXT_4,
"Joysticks deactivated on this screen");
#endif