void GameInitHistory() { if( ( FileExists( HISTORY_DATA_FILE ) ) ) { // unlink history file FileClearAttributes( HISTORY_DATA_FILE ); FileDelete( HISTORY_DATA_FILE ); } AddHistoryToPlayersLog(HISTORY_ACCEPTED_ASSIGNMENT_FROM_ENRICO, 0, GetWorldTotalMin( ), -1, -1); }
UINT32 ProcessLoadSaveScreenMessageBoxResult() { FDLG_LIST *curr, *temp; gfRenderWorld = TRUE; RemoveMessageBox(); if( gfIllegalName ) { fEnteringLoadSaveScreen = TRUE; RemoveFileDialog(); MarkWorldDirty(); return gfMessageBoxResult ? LOADSAVE_SCREEN : EDIT_SCREEN; } if( gfDeleteFile ) { if( gfMessageBoxResult ) { //delete file INT32 x; curr = FileList; for( x = 0; x < iCurrFileShown && x < iTotalFiles && curr; x++ ) { curr = curr->pNext; } if( curr ) { if( gfReadOnly ) { FileClearAttributes( gszCurrFilename ); gfReadOnly = FALSE; } FileDelete( gszCurrFilename ); //File is deleted so redo the text fields so they show the //next file in the list. temp = curr->pNext; if( !temp ) temp = curr->pPrev; if( !temp ) wcscpy( gzFilename, L"" ); else swprintf( gzFilename, L"%S", temp->FileInfo.zFileName ); if( ValidFilename() ) { SetInputFieldStringWith16BitString( 0, gzFilename ); } else { SetInputFieldStringWith16BitString( 0, L"" ); wcscpy( gzFilename, L"" ); } RemoveFromFDlgList( &FileList, curr ); iTotalFiles--; if( !iTotalFiles ) { gfNoFiles = TRUE; if( iCurrentAction == ACTION_LOAD_MAP ) DisableButton( iFileDlgButtons[0] ); } if( iCurrFileShown >= iTotalFiles ) iCurrFileShown--; if( iCurrFileShown < iTopFileShown ) iTopFileShown -= 8; if( iTopFileShown < 0 ) iTopFileShown = 0; } } MarkWorldDirty(); RenderWorld(); gfDeleteFile = FALSE; iFDlgState = DIALOG_NONE; return LOADSAVE_SCREEN; } if(gfLoadError || gfSaveError)//dnl ch37 200909 { MarkWorldDirty(); RenderWorld(); fEnteringLoadSaveScreen = TRUE; return(gfMessageBoxResult ? LOADSAVE_SCREEN : EDIT_SCREEN); } if( gfReadOnly ) { //file is readonly. Result will determine if the file dialog stays up. fEnteringLoadSaveScreen = TRUE; RemoveFileDialog(); return gfMessageBoxResult ? LOADSAVE_SCREEN : EDIT_SCREEN; } if( gfFileExists ) { if( gfMessageBoxResult ) { //okay to overwrite file RemoveFileDialog(); gbCurrentFileIOStatus = INITIATE_MAP_SAVE; return LOADSAVE_SCREEN; } fEnteringLoadSaveScreen = TRUE; RemoveFileDialog(); return(LOADSAVE_SCREEN);//dnl ch36 210909 } // Assert( 0 ); return LOADSAVE_SCREEN; }