diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 365c0444c34fcb21c0517f25ee98a8008b22ca30..b78667168645fcef361ce6ca231569c3a4f911b3 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
{$IFDEF ENABLE_HOLMES}
g_holmes,
{$ENDIF}
{$IFDEF ENABLE_HOLMES}
g_holmes,
{$ENDIF}
- e_res, g_window, g_menu, r_render, r_textures, r_animations, r_gfx,
+ e_res, g_window, g_menu, r_render, r_textures, r_animations, r_gfx, r_map,
e_input, e_log, g_console, r_console, g_items, g_map, g_panel,
g_playermodel, g_gfx, g_options, Math,
g_triggers, g_monsters, e_sound, CONFIG,
e_input, e_log, g_console, r_console, g_items, g_map, g_panel,
g_playermodel, g_gfx, g_options, Math,
g_triggers, g_monsters, e_sound, CONFIG,
end;
procedure g_Game_Init();
end;
procedure g_Game_Init();
-var
- SR: TSearchRec;
- knownFiles: array of AnsiString = nil;
- found: Boolean;
- wext, s: AnsiString;
- f: Integer;
begin
gExit := 0;
gMapToDelete := '';
begin
gExit := 0;
gMapToDelete := '';
g_Game_SetLoadingText(Format('Doom 2D: Forever %s', [GAME_VERSION]), 0, False);
g_Game_SetLoadingText('', 0, False);
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;
gGameOn := false;
gPauseMain := false;
begin
//result := g_Map_Load(gGameSettings.WAD + ':\' + ResName);
result := g_Map_Load(NewWAD+':\'+ResName);
begin
//result := g_Map_Load(gGameSettings.WAD + ':\' + ResName);
result := g_Map_Load(NewWAD+':\'+ResName);
+ r_Map_LoadTextures;
end;
if Result then
begin
end;
if Result then
begin