{ "global.border", "RocksScreen.pcx" },
{ "global.door", "RocksDoor.pcx" },
+ { "editor.element_border", "RocksElements.pcx" },
+ { "editor.element_border.xpos", "0" },
+ { "editor.element_border.ypos", "0" },
+
{ "background", UNDEFINED_FILENAME },
{ "background.MAIN", UNDEFINED_FILENAME },
{ "background.LEVELS", UNDEFINED_FILENAME },
{ "global.num_toons", "20" },
- { "menu.main.hide_static_text", "false" },
-
{ NULL, NULL }
};
#define IMG_FONT_TAPE_RECORDER 822
#define IMG_GLOBAL_BORDER 823
#define IMG_GLOBAL_DOOR 824
-#define IMG_BACKGROUND 825
-#define IMG_BACKGROUND_MAIN 826
-#define IMG_BACKGROUND_LEVELS 827
-#define IMG_BACKGROUND_SCORES 828
-#define IMG_BACKGROUND_EDITOR 829
-#define IMG_BACKGROUND_INFO 830
-#define IMG_BACKGROUND_SETUP 831
-#define IMG_BACKGROUND_DOOR 832
-#define IMG_INFO_FONT_EM_1 833
-#define IMG_INFO_FONT_EM_2 834
-#define IMG_INFO_FONT_EM_3 835
-#define IMG_INFO_FONT_EM_4 836
-#define IMG_INFO_FONT_EM_5 837
+#define IMG_EDITOR_ELEMENT_BORDER 825
+#define IMG_BACKGROUND 826
+#define IMG_BACKGROUND_MAIN 827
+#define IMG_BACKGROUND_LEVELS 828
+#define IMG_BACKGROUND_SCORES 829
+#define IMG_BACKGROUND_EDITOR 830
+#define IMG_BACKGROUND_INFO 831
+#define IMG_BACKGROUND_SETUP 832
+#define IMG_BACKGROUND_DOOR 833
+#define IMG_INFO_FONT_EM_1 834
+#define IMG_INFO_FONT_EM_2 835
+#define IMG_INFO_FONT_EM_3 836
+#define IMG_INFO_FONT_EM_4 837
+#define IMG_INFO_FONT_EM_5 838
-#define NUM_IMAGE_FILES 838
+#define NUM_IMAGE_FILES 839
#endif /* CONF_GFX_H */
-#define COMPILE_DATE_STRING "[2003-03-04 02:56]"
+#define COMPILE_DATE_STRING "[2003-03-04 17:59]"
static void DrawElementBorder(int dest_x, int dest_y, int width, int height)
{
- int border_graphic = IMG_SAND;
+ int border_graphic = IMG_EDITOR_ELEMENT_BORDER;
Bitmap *src_bitmap;
int src_x, src_y;
int num_mini_tilex = width / MINI_TILEX + 1;
char *value;
/* !!! CHANGE THIS !!! (redundant initialization) !!! */
- gfx.menu_main_hide_static_text = FALSE;
global.num_toons = 20;
if ((setup_file_list = loadSetupFileList(filename)) == NULL)
return;
- value = getTokenValue(setup_file_list, "menu.main.hide_static_text");
- if (value != NULL)
- gfx.menu_main_hide_static_text = get_boolean_from_string(value);
-
value = getTokenValue(setup_file_list, "global.num_toons");
if (value != NULL)
global.num_toons = get_integer_from_string(value);
{
int i;
int element = Feld[ax][ay];
+ int graphic = el2img(element);
int newax = ax, neway = ay;
static int xy[4][2] =
{
return;
}
+ if (IS_ANIMATED(graphic))
+ DrawLevelGraphicAnimationIfNeeded(ax, ay, graphic);
+
if (!MovDelay[ax][ay]) /* start making new amoeba field */
MovDelay[ax][ay] = RND(FRAMES_PER_SECOND * 25 / (1 + level.amoeba_speed));
static int life[4] = { 2, 3, 3, 3 }; /* parameters for "game of life" */
int life_time = 40;
int element = Feld[ax][ay];
+ int graphic = el2img(element);
boolean changed = FALSE;
+ if (IS_ANIMATED(graphic))
+ DrawLevelGraphicAnimationIfNeeded(ax, ay, graphic);
+
if (Stop[ax][ay])
return;
if (local_player->gems_still_needed > 0 ||
local_player->sokobanfields_still_needed > 0 ||
local_player->lights_still_needed > 0)
+ {
+ int element = Feld[x][y];
+ int graphic = el2img(element);
+
+ if (IS_ANIMATED(graphic))
+ DrawLevelGraphicAnimationIfNeeded(x, y, graphic);
+
return;
+ }
Feld[x][y] = EL_EXIT_OPENING;
void CheckExitSP(int x, int y)
{
if (local_player->gems_still_needed > 0)
+ {
+ int element = Feld[x][y];
+ int graphic = el2img(element);
+
+ if (IS_ANIMATED(graphic))
+ DrawLevelGraphicAnimationIfNeeded(x, y, graphic);
+
return;
+ }
Feld[x][y] = EL_SP_EXIT_OPEN;
void MauerAbleger(int ax, int ay)
{
int element = Feld[ax][ay];
+ int graphic = el2img(element);
boolean oben_frei = FALSE, unten_frei = FALSE;
boolean links_frei = FALSE, rechts_frei = FALSE;
boolean oben_massiv = FALSE, unten_massiv = FALSE;
boolean links_massiv = FALSE, rechts_massiv = FALSE;
boolean new_wall = FALSE;
+ if (IS_ANIMATED(graphic))
+ DrawLevelGraphicAnimationIfNeeded(ax, ay, graphic);
+
if (!MovDelay[ax][ay]) /* start building new wall */
MovDelay[ax][ay] = 6;
element = Feld[x][y];
graphic = el2img(element);
-#if 1
if (graphic_info[graphic].anim_global_sync)
GfxFrame[x][y] = FrameCounter;
-#endif
if (ANIM_MODE(graphic) == ANIM_RANDOM &&
IS_NEXT_FRAME(GfxFrame[x][y], graphic))
if (IS_INACTIVE(element))
{
-
-#if 1
if (IS_ANIMATED(graphic))
DrawLevelGraphicAnimationIfNeeded(x, y, graphic);
-#endif
continue;
}
if (IS_GEM(element) || element == EL_SP_INFOTRON)
EdelsteinFunkeln(x, y);
}
-
-#if 1
else if ((element == EL_ACID ||
element == EL_EXIT_OPEN ||
element == EL_SP_EXIT_OPEN ||
element == EL_SHIELD_DEADLY) &&
IS_ANIMATED(graphic))
DrawLevelGraphicAnimationIfNeeded(x, y, graphic);
-#endif
-
else if (IS_MOVING(x, y))
ContinueMoving(x, y);
else if (IS_ACTIVE_BOMB(element))
AmoebeWaechst(x, y);
else if (element == EL_AMOEBA_SHRINKING)
AmoebaDisappearing(x, y);
-
#if !USE_NEW_AMOEBA_CODE
else if (IS_AMOEBALIVE(element))
AmoebeAbleger(x, y);
#endif
-
else if (element == EL_GAMEOFLIFE || element == EL_BIOMAZE)
Life(x, y);
-#if 0
- else if (element == EL_ROBOT_WHEEL_ACTIVE)
- RobotWheel(x, y);
- else if (element == EL_TIMEGATE_SWITCH_ACTIVE)
- TimegateWheel(x, y);
-#endif
-#if 0
- else if (element == EL_ACID_SPLASH_LEFT ||
- element == EL_ACID_SPLASH_RIGHT)
- SplashAcid(x, y);
-#endif
-#if 0
- else if (element == EL_NUT_CRACKING)
- NussKnacken(x, y);
- else if (element == EL_PEARL_BREAKING)
- BreakingPearl(x, y);
-#endif
else if (element == EL_EXIT_CLOSED)
CheckExit(x, y);
else if (element == EL_SP_EXIT_CLOSED)
CheckExitSP(x, y);
-#if 0
- else if (element == EL_EXIT_OPENING)
- AusgangstuerOeffnen(x, y);
-#endif
else if (element == EL_WALL_GROWING_ACTIVE)
MauerWaechst(x, y);
else if (element == EL_WALL_GROWING ||
MauerAbleger(x, y);
else if (element == EL_FLAMES)
CheckForDragon(x, y);
-#if 0
- else if (element == EL_SP_BUGGY_BASE ||
- element == EL_SP_BUGGY_BASE_ACTIVATING ||
- element == EL_SP_BUGGY_BASE_ACTIVE)
- CheckBuggyBase(x, y);
- else if (element == EL_TRAP ||
- element == EL_TRAP_ACTIVE)
- CheckTrap(x, y);
- else if (IS_BELT_ACTIVE(element))
- DrawBeltAnimation(x, y, element);
- else if (element == EL_SWITCHGATE_OPENING)
- OpenSwitchgate(x, y);
- else if (element == EL_SWITCHGATE_CLOSING)
- CloseSwitchgate(x, y);
- else if (element == EL_TIMEGATE_OPENING)
- OpenTimegate(x, y);
- else if (element == EL_TIMEGATE_CLOSING)
- CloseTimegate(x, y);
-#endif
-
else if (IS_AUTO_CHANGING(element))
ChangeElement(x, y);
-
-#if 1
else if (element == EL_EXPLOSION)
; /* drawing of correct explosion animation is handled separately */
else if (IS_ANIMATED(graphic))
DrawLevelGraphicAnimationIfNeeded(x, y, graphic);
-#endif
if (IS_BELT_ACTIVE(element))
PlaySoundLevelAction(x, y, ACTION_ACTIVE);
{
"name",
"sort_priority",
- "menu.main.hide_static_text",
"global.num_toons",
NULL
};
image_info->num_dynamic_file_list_entries = 0;
image_info->file_list =
- getFileListFromConfigList(config_list, config_suffix_list,
+ getFileListFromConfigList(config_list, config_suffix_list, ignore_tokens,
num_file_list_entries);
image_info->dynamic_file_list = NULL;
struct FileInfo *getFileListFromConfigList(struct ConfigInfo *config_list,
struct ConfigInfo *suffix_list,
+ char **ignore_tokens,
int num_file_list_entries)
{
struct FileInfo *file_list;
}
/* the following tokens are no file definitions, but other config tokens */
- if (strcmp(config_list[i].token, "global.num_toons") == 0 ||
- strcmp(config_list[i].token, "menu.main.hide_static_text") == 0)
- is_file_entry = FALSE;
+ for (j=0; ignore_tokens[j] != NULL; j++)
+ if (strcmp(config_list[i].token, ignore_tokens[j]) == 0)
+ is_file_entry = FALSE;
if (is_file_entry)
{
int get_parameter_value(char *, char *, int);
struct FileInfo *getFileListFromConfigList(struct ConfigInfo *,
- struct ConfigInfo *, int);
+ struct ConfigInfo *, char **, int);
void LoadArtworkConfig(struct ArtworkListInfo *);
void ReloadCustomArtworkList(struct ArtworkListInfo *);
void FreeCustomArtworkLists(struct ArtworkListInfo *);
sound_info->num_dynamic_file_list_entries = 0;
sound_info->file_list =
- getFileListFromConfigList(config_list, config_suffix_list,
+ getFileListFromConfigList(config_list, config_suffix_list, ignore_tokens,
num_file_list_entries);
sound_info->dynamic_file_list = NULL;
Bitmap *background_bitmap;
int background_bitmap_mask;
- boolean menu_main_hide_static_text;
-
int num_fonts;
struct FontBitmapInfo *font_bitmap_info;
int (*select_font_function)(int);
PlaySoundLoop(sound);
}
-void DrawTextStatic(int x, int y, char *text, int font_nr)
-{
- if (game_status == MAINMENU && gfx.menu_main_hide_static_text)
- return;
-
- DrawText(x, y, text, font_nr);
-}
-
void DrawHeadline()
{
int font1_xsize = getFontWidth(FONT_TITLE_1);
int x1 = SX + (SXSIZE - strlen(PROGRAM_TITLE_STRING) * font1_xsize) / 2;
int x2 = SX + (SXSIZE - strlen(WINDOW_SUBTITLE_STRING) * font2_xsize) / 2;
- DrawTextStatic(x1, SY + 8, PROGRAM_TITLE_STRING, FONT_TITLE_1);
- DrawTextStatic(x2, SY + 46, WINDOW_SUBTITLE_STRING, FONT_TITLE_2);
+ DrawText(x1, SY + 8, PROGRAM_TITLE_STRING, FONT_TITLE_1);
+ DrawText(x2, SY + 46, WINDOW_SUBTITLE_STRING, FONT_TITLE_2);
}
static void ToggleFullscreenIfNeeded()
DrawHeadline();
- DrawTextStatic(SX + 32, SY + 2*32, name_text, FONT_MENU_1);
+ DrawText(SX + 32, SY + 2*32, name_text, FONT_MENU_1);
DrawText(SX + 32 + name_width, SY + 2*32, setup.player_name, FONT_INPUT);
- DrawTextStatic(SX + 32, SY + 3*32, "Level:", FONT_MENU_1);
+ DrawText(SX + 32, SY + 3*32, "Level:", FONT_MENU_1);
DrawText(SX + 11 * 32, SY + 3*32, int2str(level_nr,3), FONT_VALUE_1);
- DrawTextStatic(SX + 32, SY + 4*32, "Hall Of Fame", FONT_MENU_1);
- DrawTextStatic(SX + 32, SY + 5*32, "Level Creator", FONT_MENU_1);
- DrawTextStatic(SY + 32, SY + 6*32, "Info Screen", FONT_MENU_1);
- DrawTextStatic(SX + 32, SY + 7*32, "Start Game", FONT_MENU_1);
- DrawTextStatic(SX + 32, SY + 8*32, "Setup", FONT_MENU_1);
- DrawTextStatic(SX + 32, SY + 9*32, "Quit", FONT_MENU_1);
+ DrawText(SX + 32, SY + 4*32, "Hall Of Fame", FONT_MENU_1);
+ DrawText(SX + 32, SY + 5*32, "Level Creator", FONT_MENU_1);
+ DrawText(SY + 32, SY + 6*32, "Info Screen", FONT_MENU_1);
+ DrawText(SX + 32, SY + 7*32, "Start Game", FONT_MENU_1);
+ DrawText(SX + 32, SY + 8*32, "Setup", FONT_MENU_1);
+ DrawText(SX + 32, SY + 9*32, "Quit", FONT_MENU_1);
DrawMicroLevel(MICROLEV_XPOS, MICROLEV_YPOS, TRUE);
drawCursorXY(14, 1, IMG_MENU_BUTTON_RIGHT);
#endif
- DrawTextStatic(SX + 56, SY + 326, "A Game by Artsoft Entertainment",
- FONT_TEXT_3);
+ DrawText(SX + 56, SY + 326, "A Game by Artsoft Entertainment", FONT_TITLE_2);
FadeToFront();
InitAnimation();
else
{
FadeSounds();
- DrawMainMenu();
+
game_status = MAINMENU;
+ DrawMainMenu();
}
}
else