X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fgame%2Fg_game.pas;h=325179744cf8228d7ab254f08722a8d77317e1eb;hp=d60a96054b453b02ef495e7a612377c6a00d8ba4;hb=7f57e4b195f1a553c5bb01638cc7d9908c992c88;hpb=c9fc9bdd334338e3f77750416c57fa55c5665fc0 diff --git a/src/game/g_game.pas b/src/game/g_game.pas index d60a960..3251797 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -1439,12 +1439,6 @@ begin end; procedure g_Game_Init(); -var - SR: TSearchRec; - knownFiles: array of AnsiString = nil; - found: Boolean; - wext, s: AnsiString; - f: Integer; begin gExit := 0; gMapToDelete := ''; @@ -1466,43 +1460,7 @@ begin g_Game_SetLoadingText(Format('Doom 2D: Forever %s', [GAME_VERSION]), 0, False); g_Game_SetLoadingText('', 0, False); - g_Game_SetLoadingText(_lc[I_LOAD_MODELS], 0, False); - // load models from all possible wad types, in all known directories - // this does a loosy job (linear search, ooph!), but meh - for wext in wadExtensions do - begin - for f := High(ModelDirs) downto Low(ModelDirs) do - begin - if (FindFirst(ModelDirs[f]+DirectorySeparator+'*'+wext, faAnyFile, SR) = 0) then - begin - repeat - found := false; - for s in knownFiles do - begin - if (strEquCI1251(forceFilenameExt(SR.Name, ''), forceFilenameExt(ExtractFileName(s), ''))) then - begin - found := true; - break; - end; - end; - if not found then - begin - SetLength(knownFiles, length(knownFiles)+1); - knownFiles[High(knownFiles)] := ModelDirs[f]+DirectorySeparator+SR.Name; - end; - until (FindNext(SR) <> 0); - end; - FindClose(SR); - end; - end; - - if (length(knownFiles) = 0) then raise Exception.Create('no player models found!'); - - if (length(knownFiles) = 1) then e_LogWriteln('1 player model found.', TMsgType.Notify) else e_LogWritefln('%d player models found.', [Integer(length(knownFiles))], TMsgType.Notify); - for s in knownFiles do - begin - if not g_PlayerModel_Load(s) then e_LogWritefln('Error loading model "%s"', [s], TMsgType.Warning); - end; +// g_Game_SetLoadingText(_lc[I_LOAD_MODELS], 0, False); gGameOn := false; gPauseMain := false;