ReactOS 0.4.15-dev-7674-gc0b4db1
xboxcons.c
Go to the documentation of this file.
1/*
2 * FreeLoader
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19#include <freeldr.h>
20
21static unsigned CurrentCursorX = 0;
22static unsigned CurrentCursorY = 0;
23static unsigned CurrentAttr = 0x0f;
24
25VOID
27{
29 BOOLEAN NeedScroll;
30
32
33 NeedScroll = (CurrentCursorY >= Height);
34 if (NeedScroll)
35 {
38 }
39
40 if (c == '\r')
41 {
43 }
44 else if (c == '\n')
45 {
47
48 if (!NeedScroll)
50 }
51 else if (c == '\t')
52 {
53 CurrentCursorX = (CurrentCursorX + 8) & ~ 7;
54 }
55 else
56 {
59 }
60
61 if (CurrentCursorX >= Width)
62 {
65 }
66}
67
70{
71 /* No keyboard support yet */
72 return FALSE;
73}
74
75int
77{
78 /* No keyboard support yet */
79 while (1) ;
80
81 return 0;
82}
83
84/* EOF */
unsigned char BOOLEAN
#define FALSE
Definition: types.h:117
const GLubyte * c
Definition: glext.h:8905
#define Unused(x)
Definition: atlwin.h:28
uint32_t ULONG
Definition: typedefs.h:59
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:89
_In_ HFONT _Out_ PUINT Height
Definition: font.h:88
BOOLEAN XboxConsKbHit(VOID)
Definition: xboxcons.c:69
VOID XboxConsPutChar(int c)
Definition: xboxcons.c:26
static unsigned CurrentAttr
Definition: xboxcons.c:23
static unsigned CurrentCursorX
Definition: xboxcons.c:21
static unsigned CurrentCursorY
Definition: xboxcons.c:22
int XboxConsGetCh(void)
Definition: xboxcons.c:76
VOID XboxVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y)
Definition: xboxvideo.c:136
VOID XboxVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth)
Definition: xboxvideo.c:243
VOID XboxVideoScrollUp(VOID)
Definition: xboxvideo.c:108