1 (* Copyright (C) Doom 2D: Forever Developers
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, version 3 of the License ONLY.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 *)
15 {$INCLUDE ../../shared/a_modes.inc}
18 interface
24 implementation
26 uses
29 conbuf,
31 ;
33 (* ====== Console ====== *)
35 const
38 var
49 var
56 var
59 begin
63 begin
66 //e_TextureFontPrintChar(X, Y: Integer; Ch: Char; FontID: DWORD; Shadow: Boolean = False);
71 // now print our part
73 begin
78 begin
85 end
86 else
87 begin
92 begin
97 repeat
104 var
108 begin
112 offset_y := CHeight
113 else
123 begin
126 else
129 begin
132 end
133 else
134 begin
137 end
141 Exit;
144 begin
152 e_DrawSize(ID, 0, Cons_Y, Round(ConsoleTrans * 255), False, False, gScreenWidth, Floor(gScreenHeight * ConsoleHeight));
153 e_TextureFontPrint(0, Cons_Y + Floor(gScreenHeight * ConsoleHeight) - CHeight - 4, '> ' + Line, gStdFont);
156 (*
157 if ConsoleHistory <> nil then
158 begin
159 b := 0;
160 if CHeight > 0 then
161 if Length(ConsoleHistory) > (Floor(gScreenHeight * ConsoleHeight) div CHeight) - 1 then
162 b := Length(ConsoleHistory) - (Floor(gScreenHeight * ConsoleHeight) div CHeight) + 1;
164 b := Max(b-Offset, 0);
165 d := Max(High(ConsoleHistory)-Offset, 0);
167 c := 2;
168 for a := d downto b do
169 begin
170 e_TextureFontPrintFmt(0, Floor(gScreenHeight * ConsoleHeight) - 4 - c * CHeight - Abs(Cons_Y), ConsoleHistory[a], gStdFont, True);
171 c := c + 1;
172 end;
173 end;
174 *)
176 e_TextureFontPrint((CPos + 1) * CWidth, Cons_Y + Floor(gScreenHeight * ConsoleHeight) - 21, '_', gStdFont);
181 begin
186 else
194 begin
200 initialization
203 conRegVar('console_step', @ConsoleStep, 0.0, 1.0, 'set console animation speed', 'set console animation speed');
204 conRegVar('console_trans', @ConsoleTrans, 0.0, 1.0, 'set console transparency', 'set console transparency');
205 {$IFDEF ANDROID}
208 {$ELSE}
211 {$ENDIF}