X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fscreens.c;h=425c35e86f014dfbc4c079166e7bb76c1d7ccdd7;hb=cee436b68cda95e13abc810235a11ce94bc79c95;hp=7952e8b8b1d4ef286dff3603d0b3bae03301341e;hpb=8a0ac1d204ca31a92875d378138e3ec4889ef37c;p=rocksndiamonds.git diff --git a/src/screens.c b/src/screens.c index 7952e8b8..425c35e8 100644 --- a/src/screens.c +++ b/src/screens.c @@ -270,7 +270,7 @@ void DrawMainMenu() leveldir_last_valid = leveldir_current; /* needed if last screen (level choice) changed graphics, sounds or music */ - ReloadCustomArtwork(); + ReloadCustomArtwork(0); #ifdef TARGET_SDL SetDrawtoField(DRAW_BACKBUFFER); @@ -495,7 +495,7 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button) if (setup.autorecord) TapeStartRecording(); -#if defined(PLATFORM_UNIX) +#if defined(NETWORK_AVALIABLE) if (options.network) SendToServer_StartPlaying(); else @@ -1869,7 +1869,7 @@ static void execSetupArtwork() setup.music_set = artwork.mus_current->identifier; /* needed if last screen (setup choice) changed graphics, sounds or music */ - ReloadCustomArtwork(); + ReloadCustomArtwork(0); /* needed for displaying artwork name instead of artwork identifier */ graphics_set_name = artwork.gfx_current->name; @@ -1952,7 +1952,9 @@ static struct TokenInfo setup_info_game[] = static struct TokenInfo setup_info_editor[] = { +#if 0 { TYPE_STRING, NULL, "Offer Special Elements:"}, +#endif { TYPE_SWITCH, &setup.editor.el_boulderdash, "BoulderDash:" }, { TYPE_SWITCH, &setup.editor.el_emerald_mine, "Emerald Mine:" }, { TYPE_SWITCH, &setup.editor.el_more, "More:" }, @@ -2208,8 +2210,14 @@ static void DrawSetupScreen_Generic() (value_ptr == &setup.fullscreen && !video.fullscreen_available)) setup_info[i].type |= TYPE_GHOSTED; +#if 0 + if (setup_info[i].type & TYPE_STRING || + (setup_info[i].type & TYPE_SWITCH && setup_mode == SETUP_MODE_EDITOR)) + font_nr = FONT_MENU_2; +#else if (setup_info[i].type & TYPE_STRING) font_nr = FONT_MENU_2; +#endif DrawText(mSX + 32, mSY + ypos * 32, setup_info[i].text, font_nr); @@ -2387,7 +2395,7 @@ static void drawPlayerSetupInputInfo(int player_nr) { &custom_key.up, "Joystick Up" }, { &custom_key.down, "Joystick Down" }, { &custom_key.snap, "Button 1" }, - { &custom_key.bomb, "Button 2" } + { &custom_key.drop, "Button 2" } }; static char *joystick_name[MAX_PLAYERS] = { @@ -2401,6 +2409,8 @@ static void drawPlayerSetupInputInfo(int player_nr) DrawText(mSX+11*32, mSY+2*32, int2str(player_nr +1, 1), FONT_INPUT_1_ACTIVE); #if 1 + ClearRectangleOnBackground(drawto, mSX + 8 * TILEX, mSY + 2 * TILEY, + TILEX, TILEY); DrawGraphicThruMaskExt(drawto, mSX + 8 * TILEX, mSY + 2 * TILEY, PLAYER_NR_GFX(IMG_PLAYER_1, player_nr), 0); #else @@ -2432,7 +2442,7 @@ static void drawPlayerSetupInputInfo(int player_nr) DrawText(mSX+2*32, mSY+8*32, ":", FONT_VALUE_OLD); DrawText(mSX+2*32, mSY+9*32, ":", FONT_VALUE_OLD); DrawText(mSX+32, mSY+10*32, "Snap Field:", FONT_VALUE_OLD); - DrawText(mSX+32, mSY+12*32, "Place Bomb:", FONT_VALUE_OLD); + DrawText(mSX+32, mSY+12*32, "Drop Element:", FONT_VALUE_OLD); for (i = 0; i < 6; i++) { @@ -2578,12 +2588,12 @@ void CustomizeKeyboard(int player_nr) char *text; } customize_step[] = { - { &custom_key.left, "Move Left" }, - { &custom_key.right, "Move Right" }, - { &custom_key.up, "Move Up" }, - { &custom_key.down, "Move Down" }, - { &custom_key.snap, "Snap Field" }, - { &custom_key.bomb, "Place Bomb" } + { &custom_key.left, "Move Left" }, + { &custom_key.right, "Move Right" }, + { &custom_key.up, "Move Up" }, + { &custom_key.down, "Move Down" }, + { &custom_key.snap, "Snap Field" }, + { &custom_key.drop, "Drop Element" } }; /* read existing key bindings from player setup */ @@ -2934,17 +2944,35 @@ void HandleGameActions() if (game_status != GAME_MODE_PLAYING) return; - if (local_player->LevelSolved) - GameWon(); + /* !!! FIX THIS (START) !!! */ + if (level.file_info.type == LEVEL_FILE_TYPE_EM) + { + byte summarized_player_action = 0; + int i; - if (AllPlayersGone && !TAPE_IS_STOPPED(tape)) - TapeStop(); + for (i = 0; i < MAX_PLAYERS; i++) + summarized_player_action |= stored_player[i].action; - GameActions(); - BackToFront(); + if (em_main_handle_game(summarized_player_action) != 0) + { + game_status = GAME_MODE_MAIN; + DrawMainMenu(); + } + } + else + { + if (local_player->LevelSolved) + GameWon(); - if (tape.auto_play && !tape.playing) - AutoPlayTape(); /* continue automatically playing next tape */ + if (AllPlayersGone && !TAPE_IS_STOPPED(tape)) + TapeStop(); + + GameActions(); + BackToFront(); + + if (tape.auto_play && !tape.playing) + AutoPlayTape(); /* continue automatically playing next tape */ + } } /* ---------- new screen button stuff -------------------------------------- */