From: Ketmar Dark Date: Wed, 4 Oct 2017 18:58:07 +0000 (+0300) Subject: Merge branch 'master' of ssh://repo.or.cz/d2df-sdl X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=82a1406ad9697d26709a7aa1aeb7c78441bee530;hp=dcddacd6f339e310c23663bd7e0b6ec7733ccf0f;p=d2df-sdl.git Merge branch 'master' of ssh://repo.or.cz/d2df-sdl --- diff --git a/src/game/Doom2DF.lpi b/src/game/Doom2DF.lpi index b26122e..0f76a25 100644 --- a/src/game/Doom2DF.lpi +++ b/src/game/Doom2DF.lpi @@ -66,8 +66,10 @@ - + + + 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;