DEADSOFTWARE

Res Downloader: Display WAD and resource names
[d2df-sdl.git] / src / game / g_res_downloader.pas
index 6d112ee446e280555e4776edb2dad57561e887d0..fcb4ad9047279574b9622aa6158f23ed4373e7a1 100644 (file)
@@ -1,4 +1,4 @@
-(* Copyright (C)  DooM 2D:Forever Developers
+(* Copyright (C)  Doom 2D: Forever Developers
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -13,7 +13,7 @@
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *)
-{$MODE DELPHI}
+{$INCLUDE ../shared/a_modes.inc}
 unit g_res_downloader;
 
 interface
@@ -25,7 +25,7 @@ function g_Res_DownloadWAD(const FileName: string): string;
 
 implementation
 
-uses g_language, sfs, utils, wadreader;
+uses g_language, sfs, utils, wadreader, g_game;
 
 const DOWNLOAD_DIR = 'downloads';
 
@@ -131,7 +131,8 @@ var
 begin
   SetLength(mapData.ExternalResources, 0);
   g_Console_Add(Format(_lc[I_NET_MAP_DL], [FileName]));
-  e_WriteLog('Downloading map `' + FileName + '` from server', MSG_NOTIFY);
+  e_WriteLog('Downloading map `' + FileName + '` from server', TMsgType.Notify);
+  g_Game_SetLoadingText(FileName + '...', 0, False);
   MC_SEND_MapRequest();
 
   msgStream := g_Net_Wait_Event(NET_MSG_MAP_RESPONSE);
@@ -150,7 +151,8 @@ begin
       g_Console_Add(Format(_lc[I_NET_WAD_DL],
                            [mapData.ExternalResources[i].Name]));
       e_WriteLog('Downloading Wad `' + mapData.ExternalResources[i].Name +
-                 '` from server', MSG_NOTIFY);
+                 '` from server', TMsgType.Notify);
+      g_Game_SetLoadingText(mapData.ExternalResources[i].Name + '...', 0, False);
       MC_SEND_ResRequest(mapData.ExternalResources[i].Name);
 
       msgStream := g_Net_Wait_Event(NET_MSG_RES_RESPONSE);