blob: 05653e255b13a0dbcba1dad70b6910fba4d9f202 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// ncurses.c
// Implements interface.h
// Provides an in-terminal interface to the emulator.
#include"interface.h"
#include"signetics.c"
#include<ncurses.h>
int TermX = 0;
int TermY = 0;
void TerminalInit()
{
initscr();
cbreak();
noecho();
TerminalShiftRegister = (byte*)malloc(960);
TerminalShiftRegisterOffset = 0;
}
void TerminalClose()
{
free(TerminalShiftRegister);
endwin();
}
void TerminalInput()
{
if (TermX >= 40) {
TermX = 0;
TermY++;
}
if (TermY >= 24) {
}
}
void TerminalPrompt()
{
addch('@' | A_BLINK);
}
|