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
27 {$IFDEF ENABLE_MENU}
28 g_menu,
29 {$ENDIF}
32 conbuf,
34 ;
36 (* ====== Console ====== *)
38 const
41 var
52 var
59 var
62 begin
66 begin
69 //e_TextureFontPrintChar(X, Y: Integer; Ch: Char; FontID: DWORD; Shadow: Boolean = False);
74 // now print our part
76 begin
81 begin
88 end
89 else
90 begin
95 begin
100 repeat
107 var
111 begin
115 offset_y := CHeight
116 else
126 begin
129 else
132 begin
135 end
136 else
137 begin
140 end
144 Exit;
147 begin
155 e_DrawSize(ID, 0, Cons_Y, Round(ConsoleTrans * 255), False, False, gScreenWidth, Floor(gScreenHeight * ConsoleHeight));
156 e_TextureFontPrint(0, Cons_Y + Floor(gScreenHeight * ConsoleHeight) - CHeight - 4, '> ' + Line, gStdFont);
159 (*
160 if ConsoleHistory <> nil then
161 begin
162 b := 0;
163 if CHeight > 0 then
164 if Length(ConsoleHistory) > (Floor(gScreenHeight * ConsoleHeight) div CHeight) - 1 then
165 b := Length(ConsoleHistory) - (Floor(gScreenHeight * ConsoleHeight) div CHeight) + 1;
167 b := Max(b-Offset, 0);
168 d := Max(High(ConsoleHistory)-Offset, 0);
170 c := 2;
171 for a := d downto b do
172 begin
173 e_TextureFontPrintFmt(0, Floor(gScreenHeight * ConsoleHeight) - 4 - c * CHeight - Abs(Cons_Y), ConsoleHistory[a], gStdFont, True);
174 c := c + 1;
175 end;
176 end;
177 *)
179 e_TextureFontPrint((CPos + 1) * CWidth, Cons_Y + Floor(gScreenHeight * ConsoleHeight) - 21, '_', gStdFont);
184 begin
189 else
197 begin
203 initialization
206 conRegVar('console_step', @ConsoleStep, 0.0, 1.0, 'set console animation speed', 'set console animation speed');
207 conRegVar('console_trans', @ConsoleTrans, 0.0, 1.0, 'set console transparency', 'set console transparency');
208 {$IFDEF ANDROID}
211 {$ELSE}
214 {$ENDIF}