diff --git a/src/game/g_basic.pas b/src/game/g_basic.pas
index bdeb090420fa88c415b9144f3703a286ccdbe6e0..bd3f50e76b3f2049e0ce6d9b41d63db4da9c8cf8 100644 (file)
--- a/src/game/g_basic.pas
+++ b/src/game/g_basic.pas
const
GAME_VERSION = '0.667';
+ GAME_BUILDDATE = {$I %DATE%};
+ GAME_BUILDTIME = {$I %TIME%};
UID_GAME = 1;
UID_PLAYER = 2;
UID_MONSTER = 3;
procedure SortSArray(var S: SSArray);
function b_Text_Format(S: string): string;
function b_Text_Unformat(S: string): string;
-
+function b_Text_Wrap(S: string; LineLen: Integer): string;
+function b_Text_LineCount(S: string): Integer;
var
gmon_dbg_los_enabled: Boolean = true;
end;
end;
+function b_Text_Wrap(S: string; LineLen: Integer): string;
+begin
+ Result := WrapText(S, ''#10, [#10, ' ', '-'], LineLen);
+end;
+
+function b_Text_LineCount(S: string): Integer;
+var
+ I: Integer;
+begin
+ Result := IfThen(S = '', 0, 1);
+ for I := 1 to High(S) do
+ if S[I] = #10 then
+ Inc(Result);
+end;
+
end.