summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 740d7af)
raw | patch | inline | side by side (parent: 740d7af)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Thu, 17 Jan 2019 14:27:17 +0000 (17:27 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Thu, 17 Jan 2019 14:27:17 +0000 (17:27 +0300) |
src/game/g_map.pas | patch | blob | history |
diff --git a/src/game/g_map.pas b/src/game/g_map.pas
index 97c56d0c399f8682f3122caa345d79ac9a28aa05..35e8d46a6078d31326c79dc63af187ad03e74d17 100644 (file)
--- a/src/game/g_map.pas
+++ b/src/game/g_map.pas
// ////////////////////////////////////////////////////////////////////////// //
var
NNF_PureName: String; // Èìÿ òåêñòóðû áåç öèôð â êîíöå
+ NNF_PureExt: String; // extension postfix
NNF_FirstNum: Integer; // ×èñëî ó íà÷àëüíîé òåêñòóðû
NNF_CurrentNum: Integer; // Ñëåäóþùåå ÷èñëî ó òåêñòóðû
function g_Texture_NumNameFindStart(name: String): Boolean;
var
- i: Integer;
+ i, j: Integer;
begin
Result := False;
NNF_PureName := '';
+ NNF_PureExt := '';
NNF_FirstNum := -1;
NNF_CurrentNum := -1;
end
else
begin
+ j := i + 1;
+ while (j <= Length(name)) and (name[j] <> '.') do inc(j);
NNF_PureName := Copy(name, 1, i);
- Delete(name, 1, i);
+ NNF_PureExt := Copy(name, j);
+ name := Copy(name, i + 1, j - i - 1);
Break;
end;
end;
Exit;
end;
- newName := NNF_PureName + IntToStr(NNF_CurrentNum);
+ newName := NNF_PureName + IntToStr(NNF_CurrentNum) + NNF_PureExt;
if NNF_CurrentNum < NNF_FirstNum then
Result := NNF_NAME_BEFORE