1
0
Fork 0

cleanup mainmenu_action

pull/38/head
Lundar 2018-06-21 03:09:01 -04:00
parent 4da009b67a
commit 66e6966f5b
2 changed files with 10 additions and 46 deletions

View File

@ -269,11 +269,15 @@ void __cdecl init_archives()
fileinfo.originalarchivefile = diabdat_mpq_path;
fileinfo.patcharchivefile = patch_rt_mpq_path;
init_get_file_info();
#ifdef COPYPROT
while ( 1 )
{
#endif
diabdat_mpq = init_test_access(diabdat_mpq_path, "\\diabdat.mpq", "DiabloCD", 1000, 1);
#ifdef COPYPROT
if (! diabdat_mpq ){
UiCopyProtError(&v1);
if ( diabdat_mpq )
break;
UiCopyProtError((int)&v1);
if ( v1 == COPYPROT_CANCEL )
FileErrDlg("diabdat.mpq");
}

View File

@ -108,46 +108,6 @@ LABEL_6:
void __fastcall mainmenu_action(int option)
{
/* int v1; // eax
int a2; // [esp+0h] [ebp-4h]
a2 = option;
mainmenu_refresh_music();
do
{
while ( 1 )
{
a2 = 0;
if ( !UiMainMenuDialog("Diablo v1.09", &a2, effects_play_sound, 30) )
TermMsg("Unable to display mainmenu");
if ( a2 == 1 )
break;
switch ( a2 )
{
case MAINMENU_MULTIPLAYER:
v1 = mainmenu_multi_player();
goto LABEL_15;
case MAINMENU_REPLAY_INTRO:
goto LABEL_10;
case MAINMENU_SHOW_CREDITS:
UiCreditsDialog(16);
break;
case MAINMENU_EXIT_DIABLO:
goto LABEL_16;
case MAINMENU_ATTRACT_MODE:
LABEL_10:
if ( window_activated )
mainmenu_play_intro();
break;
}
}
v1 = mainmenu_single_player();
LABEL_15:
;
}
while ( v1 );
LABEL_16:
music_stop();*/
int quit; // eax
int a2; // [esp+0h] [ebp-4h]
@ -159,7 +119,7 @@ LABEL_16:
a2 = 0;
if ( !UiMainMenuDialog("Diablo v1.09", &a2, effects_play_sound, 30) ){
TermMsg("Unable to display mainmenu");
//old code would go directly to single player here...
//old code would loop endlessly here (probably)
break;//new code will quit.
}