DEADSOFTWARE

Remove old hack that work-arounds wrong texture names
authorDmitry D. Chernov <blackdoomer@yandex.ru>
Wed, 4 Oct 2017 18:50:50 +0000 (04:50 +1000)
committerDmitry D. Chernov <blackdoomer@yandex.ru>
Wed, 4 Oct 2017 18:50:50 +0000 (04:50 +1000)
src/game/g_game.pas
src/game/g_textures.pas

index a505edc1cb44adbedd6af288142b102a4acd815f..4135b5af5794f8f3aeeaf8275e764f08a32f9dfa 100644 (file)
@@ -2054,12 +2054,12 @@ begin
   g_Texture_CreateWADEx('TEXTURE_PLAYER_HUDJET', GameWAD+':TEXTURES\JETBAR');
   g_Texture_CreateWADEx('TEXTURE_PLAYER_HUDBG', GameWAD+':TEXTURES\HUDBG');
   g_Texture_CreateWADEx('TEXTURE_PLAYER_ARMORHUD', GameWAD+':TEXTURES\ARMORHUD');
-  g_Texture_CreateWADEx('TEXTURE_PLAYER_REDFLAG', GameWAD+':TEXTURES\FLAGHUD_RB', GameWAD+':TEXTURES\FLAGHUD_R_BASE');
-  g_Texture_CreateWADEx('TEXTURE_PLAYER_REDFLAG_S', GameWAD+':TEXTURES\FLAGHUD_RS', GameWAD+':TEXTURES\FLAGHUD_R_STOLEN');
-  g_Texture_CreateWADEx('TEXTURE_PLAYER_REDFLAG_D', GameWAD+':TEXTURES\FLAGHUD_RD', GameWAD+':TEXTURES\FLAGHUD_R_DROP');
-  g_Texture_CreateWADEx('TEXTURE_PLAYER_BLUEFLAG', GameWAD+':TEXTURES\FLAGHUD_BB', GameWAD+':TEXTURES\FLAGHUD_B_BASE');
-  g_Texture_CreateWADEx('TEXTURE_PLAYER_BLUEFLAG_S', GameWAD+':TEXTURES\FLAGHUD_BS', GameWAD+':TEXTURES\FLAGHUD_B_STOLEN');
-  g_Texture_CreateWADEx('TEXTURE_PLAYER_BLUEFLAG_D', GameWAD+':TEXTURES\FLAGHUD_BD', GameWAD+':TEXTURES\FLAGHUD_B_DROP');
+  g_Texture_CreateWADEx('TEXTURE_PLAYER_REDFLAG', GameWAD+':TEXTURES\FLAGHUD_R_BASE');
+  g_Texture_CreateWADEx('TEXTURE_PLAYER_REDFLAG_S', GameWAD+':TEXTURES\FLAGHUD_R_STOLEN');
+  g_Texture_CreateWADEx('TEXTURE_PLAYER_REDFLAG_D', GameWAD+':TEXTURES\FLAGHUD_R_DROP');
+  g_Texture_CreateWADEx('TEXTURE_PLAYER_BLUEFLAG', GameWAD+':TEXTURES\FLAGHUD_B_BASE');
+  g_Texture_CreateWADEx('TEXTURE_PLAYER_BLUEFLAG_S', GameWAD+':TEXTURES\FLAGHUD_B_STOLEN');
+  g_Texture_CreateWADEx('TEXTURE_PLAYER_BLUEFLAG_D', GameWAD+':TEXTURES\FLAGHUD_B_DROP');
   g_Texture_CreateWADEx('TEXTURE_PLAYER_TALKBUBBLE', GameWAD+':TEXTURES\TALKBUBBLE');
   g_Texture_CreateWADEx('TEXTURE_PLAYER_INVULPENTA', GameWAD+':TEXTURES\PENTA');
   g_Frames_CreateWAD(nil, 'FRAMES_TELEPORT', GameWAD+':TEXTURES\TELEPORT', 64, 64, 10, False);
index 5958e93b498f15d27a74e878e4850d32bb835942..1ef64f0d2b95816e134ab95529bf250cd7ee138b 100644 (file)
@@ -88,7 +88,7 @@ type
 
 function g_Texture_CreateWAD (var ID: LongWord; const Resource: AnsiString): Boolean;
 function g_Texture_CreateFile (var ID: LongWord; const FileName: AnsiString): Boolean;
-function g_Texture_CreateWADEx (const textureName, Resource: AnsiString; const altrsrc: AnsiString=''): Boolean;
+function g_Texture_CreateWADEx (const textureName, Resource: AnsiString): Boolean;
 function g_Texture_CreateFileEx (const textureName, FileName: AnsiString): Boolean;
 function g_Texture_Get (const textureName: AnsiString; var ID: LongWord): Boolean;
 procedure g_Texture_Delete (const textureName: AnsiString);
@@ -247,7 +247,7 @@ begin
 end;
 
 
-function texture_CreateWADExInternal (const textureName, Resource: AnsiString; showmsg: Boolean): Boolean;
+function g_Texture_CreateWADEx (const textureName, Resource: AnsiString): Boolean;
 var
   WAD: TWADFile;
   FileName: AnsiString;
@@ -278,10 +278,7 @@ begin
   end
   else
   begin
-    if showmsg then
-    begin
-      e_WriteLog(Format('Error loading texture %s', [Resource]), TMsgType.Warning);
-    end;
+    e_WriteLog(Format('Error loading texture %s', [Resource]), TMsgType.Warning);
     //e_WriteLog(Format('WAD Reader error: %s', [WAD.GetLastErrorStr]), MSG_WARNING);
     result := false;
   end;
@@ -289,17 +286,6 @@ begin
 end;
 
 
-function g_Texture_CreateWADEx (const textureName, Resource: AnsiString; const altrsrc: AnsiString=''): Boolean;
-begin
-  if (Length(altrsrc) > 0) then
-  begin
-    result := texture_CreateWADExInternal(textureName, altrsrc, false);
-    if result then exit;
-  end;
-  result := texture_CreateWADExInternal(textureName, Resource, true);
-end;
-
-
 function g_Texture_CreateFileEx (const textureName, FileName: AnsiString): Boolean;
 var
   find_id: LongWord;