cleanup mainmenu_action
parent
4da009b67a
commit
66e6966f5b
|
@ -269,11 +269,15 @@ void __cdecl init_archives()
|
||||||
fileinfo.originalarchivefile = diabdat_mpq_path;
|
fileinfo.originalarchivefile = diabdat_mpq_path;
|
||||||
fileinfo.patcharchivefile = patch_rt_mpq_path;
|
fileinfo.patcharchivefile = patch_rt_mpq_path;
|
||||||
init_get_file_info();
|
init_get_file_info();
|
||||||
|
#ifdef COPYPROT
|
||||||
|
while ( 1 )
|
||||||
|
{
|
||||||
|
#endif
|
||||||
diabdat_mpq = init_test_access(diabdat_mpq_path, "\\diabdat.mpq", "DiabloCD", 1000, 1);
|
diabdat_mpq = init_test_access(diabdat_mpq_path, "\\diabdat.mpq", "DiabloCD", 1000, 1);
|
||||||
#ifdef COPYPROT
|
#ifdef COPYPROT
|
||||||
if (! diabdat_mpq ){
|
if ( diabdat_mpq )
|
||||||
UiCopyProtError(&v1);
|
break;
|
||||||
|
UiCopyProtError((int)&v1);
|
||||||
if ( v1 == COPYPROT_CANCEL )
|
if ( v1 == COPYPROT_CANCEL )
|
||||||
FileErrDlg("diabdat.mpq");
|
FileErrDlg("diabdat.mpq");
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,46 +108,6 @@ LABEL_6:
|
||||||
|
|
||||||
void __fastcall mainmenu_action(int option)
|
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 quit; // eax
|
||||||
int a2; // [esp+0h] [ebp-4h]
|
int a2; // [esp+0h] [ebp-4h]
|
||||||
|
@ -159,7 +119,7 @@ LABEL_16:
|
||||||
a2 = 0;
|
a2 = 0;
|
||||||
if ( !UiMainMenuDialog("Diablo v1.09", &a2, effects_play_sound, 30) ){
|
if ( !UiMainMenuDialog("Diablo v1.09", &a2, effects_play_sound, 30) ){
|
||||||
TermMsg("Unable to display mainmenu");
|
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.
|
break;//new code will quit.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue