From: Dmitry D. Chernov Date: Wed, 4 Oct 2017 18:50:50 +0000 (+1000) Subject: Remove old hack that work-arounds wrong texture names X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=b3ac6ffec7a28592931cbac93187634ff0d236a3;p=d2df-sdl.git Remove old hack that work-arounds wrong texture names --- diff --git a/src/game/g_game.pas b/src/game/g_game.pas index a505edc..4135b5a 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -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); diff --git a/src/game/g_textures.pas b/src/game/g_textures.pas index 5958e93..1ef64f0 100644 --- a/src/game/g_textures.pas +++ b/src/game/g_textures.pas @@ -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;