summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d64cda3)
raw | patch | inline | side by side (parent: d64cda3)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Mon, 11 Sep 2017 14:03:29 +0000 (17:03 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Mon, 11 Sep 2017 14:03:53 +0000 (17:03 +0300) |
src/game/g_map.pas | patch | blob | history | |
src/game/g_options.pas | patch | blob | history |
diff --git a/src/game/g_map.pas b/src/game/g_map.pas
index 9c696cb656b766b347129617d92d92e523ad32a4..1b92a967f0c31115b5101b3db1be3c003c1ae070 100644 (file)
--- a/src/game/g_map.pas
+++ b/src/game/g_map.pas
TextureData: Pointer;
WADName: String;
a, ResLength: Integer;
- oldFilter: Integer;
begin
RecName := toLowerCase1251(RecName);
if (TextNameHash = nil) then TextNameHash := hashNewStrInt();
end;
}
- oldFilter := TEXTUREFILTER;
- TEXTUREFILTER := GL_NEAREST;
- try
- if WAD.GetResource(g_ExtractFilePathName(RecName), TextureData, ResLength, log) then
+ if WAD.GetResource(g_ExtractFilePathName(RecName), TextureData, ResLength, log) then
+ begin
+ SetLength(Textures, Length(Textures)+1);
+ if not e_CreateTextureMem(TextureData, ResLength, Textures[High(Textures)].TextureID) then
begin
- SetLength(Textures, Length(Textures)+1);
- if not e_CreateTextureMem(TextureData, ResLength, Textures[High(Textures)].TextureID) then
- begin
- SetLength(Textures, Length(Textures)-1);
- Exit;
- end;
- e_GetTextureSize(Textures[High(Textures)].TextureID, @Textures[High(Textures)].Width, @Textures[High(Textures)].Height);
- FreeMem(TextureData);
- Textures[High(Textures)].TextureName := RecName;
- Textures[High(Textures)].Anim := False;
+ SetLength(Textures, Length(Textures)-1);
+ Exit;
+ end;
+ e_GetTextureSize(Textures[High(Textures)].TextureID, @Textures[High(Textures)].Width, @Textures[High(Textures)].Height);
+ FreeMem(TextureData);
+ Textures[High(Textures)].TextureName := RecName;
+ Textures[High(Textures)].Anim := False;
- result := High(Textures);
- TextNameHash.put(RecName, result);
- end
- else // Íåò òàêîãî ðåóñðñà â WAD'å
+ result := High(Textures);
+ TextNameHash.put(RecName, result);
+ end
+ else // Íåò òàêîãî ðåóñðñà â WAD'å
+ begin
+ //e_WriteLog(Format('SHIT! Error loading texture %s : %s', [RecName, g_ExtractFilePathName(RecName)]), MSG_WARNING);
+ if (BadTextNameHash = nil) then BadTextNameHash := hashNewStrInt();
+ if log and (not BadTextNameHash.get(RecName, a)) then
begin
- //e_WriteLog(Format('SHIT! Error loading texture %s : %s', [RecName, g_ExtractFilePathName(RecName)]), MSG_WARNING);
- if (BadTextNameHash = nil) then BadTextNameHash := hashNewStrInt();
- if log and (not BadTextNameHash.get(RecName, a)) then
- begin
- e_WriteLog(Format('Error loading texture %s', [RecName]), MSG_WARNING);
- //e_WriteLog(Format('WAD Reader error: %s', [WAD.GetLastErrorStr]), MSG_WARNING);
- end;
- BadTextNameHash.put(RecName, -1);
+ e_WriteLog(Format('Error loading texture %s', [RecName]), MSG_WARNING);
+ //e_WriteLog(Format('WAD Reader error: %s', [WAD.GetLastErrorStr]), MSG_WARNING);
end;
- finally
- TEXTUREFILTER := oldFilter;
+ BadTextNameHash.put(RecName, -1);
end;
WAD.Free();
if (FileName <> '') then FileName := GameDir+'/wads/'+FileName else FileName := g_ExtractWadName(Res);
- s := FileName+':'+g_ExtractFilePathName(gMapInfo.SkyName);
- if g_Texture_CreateWAD(BackID, s) then
- begin
- g_Game_SetupScreenSize();
- end
- else
- begin
- g_FatalError(Format(_lc[I_GAME_ERROR_SKY], [s]));
+ if gTextureFilter then TEXTUREFILTER := GL_LINEAR else TEXTUREFILTER := GL_NEAREST;
+ try
+ s := FileName+':'+g_ExtractFilePathName(gMapInfo.SkyName);
+ if g_Texture_CreateWAD(BackID, s) then
+ begin
+ g_Game_SetupScreenSize();
+ end
+ else
+ begin
+ g_FatalError(Format(_lc[I_GAME_ERROR_SKY], [s]));
+ end;
+ finally
+ TEXTUREFILTER := GL_NEAREST;
end;
end;
diff --git a/src/game/g_options.pas b/src/game/g_options.pas
index 623c10a5bb8c11b797914a9457529b2d51eede6e..13de0c499d13e7a82df4b8c30e6404e1c271f286 100644 (file)
--- a/src/game/g_options.pas
+++ b/src/game/g_options.pas
config.Free();
- if gTextureFilter then
- TEXTUREFILTER := GL_LINEAR
- else
- TEXTUREFILTER := GL_NEAREST;
+ //if gTextureFilter then TEXTUREFILTER := GL_LINEAR else TEXTUREFILTER := GL_NEAREST;
end;
procedure g_Options_Write(FileName: String);