From 8ec080d0cd9fd62c0de20780581a4750d078ea94 Mon Sep 17 00:00:00 2001 From: alekseiplusplus Date: Fri, 1 Dec 2023 02:56:13 +1100 Subject: progress, still WIP --- src/video/ncurses.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src/video/ncurses.c') diff --git a/src/video/ncurses.c b/src/video/ncurses.c index e4a7613..0e261bb 100644 --- a/src/video/ncurses.c +++ b/src/video/ncurses.c @@ -23,12 +23,15 @@ byte UserInput() switch(c) { // Convert special characters - case KEY_BACKSPACE: + case KEY_F(1): //backspace r = 0xDF; - case KEY_ENTER: + break; + case KEY_F(2): //enter r = 0x8D; - case KEY_EXIT: //TODO: Figure out if this is Esc or not. + break; + case KEY_F(3): //exit. TODO: Figure out if this is Esc or not. r = 0x9B; + break; // Convert regular characters default: if (c < 0x20 || c >= 0x60) @@ -42,13 +45,13 @@ byte UserInput() break; } - SetMemory(KBD, r); + //SetMemory(KBD, r); - TerminalInput(r); + //TerminalInput(r); - return c; + return r; } @@ -135,7 +138,7 @@ void TerminalInput(byte n) { // Place character mvwaddch(AppleWindow, TermY, TermX, ' '); - mvwaddch(AppleWindow, TermY, TermX, CharacterROM[n]); + mvwaddch(AppleWindow, TermY, TermX, CharacterROM(n)); // Add character to register *TerminalShiftRegisterPosition = n; @@ -168,7 +171,7 @@ void TerminalInput(byte n) for (int j = 0; j < 40; j++) { if (offset >= (TerminalShiftRegister + 960)) offset -= TerminalShiftRegister; - mvwaddch(AppleWindow, i, j, CharacterROM[*offset] ); + mvwaddch(AppleWindow, i, j, CharacterROM(*offset) ); offset++; }} -- cgit v1.2.3