From 7a2f3df561bd89e342a48bd15925b4edfafcd7f1 Mon Sep 17 00:00:00 2001 From: DarwinNE Date: Mon, 13 Jan 2020 00:20:40 +0100 Subject: [PATCH] Tried to implement suggestions. --- Console/Makefile | 26 -------------------------- Console/retro/Console.cc | 6 ++---- Console/retro/ConsoleWindow.cc | 3 ++- Console/retro/Makefile | 20 -------------------- 4 files changed, 4 insertions(+), 51 deletions(-) delete mode 100644 Console/Makefile delete mode 100644 Console/retro/Makefile diff --git a/Console/Makefile b/Console/Makefile deleted file mode 100644 index c9a0114ab4..0000000000 --- a/Console/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# path to RETRO68 -RETRO68=../../Retro68-build/toolchain - -PREFIX=$(RETRO68)/m68k-apple-macos -CC=$(RETRO68)/bin/m68k-apple-macos-gcc -CXX=$(RETRO68)/bin/m68k-apple-macos-g++ -REZ=$(RETRO68)/bin/Rez - -LDFLAGS=retro/libConsole.a -RINCLUDES=$(PREFIX)/RIncludes -REZFLAGS=-I$(RINCLUDES) - -ConsoleTest.bin ConsoleTest.APPL ConsoleTest.dsk: ConsoleTest.code.bin - $(REZ) $(REZFLAGS) \ - --copy "ConsoleTest.code.bin" \ - "$(RINCLUDES)/Retro68APPL.r" \ - -t "APPL" -c "????" \ - -o ConsoleTest.bin --cc ConsoleTest.APPL --cc ConsoleTest.dsk - - -ConsoleTest.code.bin: ConsoleTest.o - $(CXX) $< -o $@ $(LDFLAGS) # C++ used for linking because RetroConsole needs it - -.PHONY: clean -clean: - rm -f ConsoleTest.bin ConsoleTest.APPL ConsoleTest.dsk ConsoleTest.code.bin ConsoleTest.code.bin.gdb ConsoleTest.o diff --git a/Console/retro/Console.cc b/Console/retro/Console.cc index 5e5b997062..428052e35d 100644 --- a/Console/retro/Console.cc +++ b/Console/retro/Console.cc @@ -235,9 +235,8 @@ void Console::Draw(Rect r) short minRow = std::max(0, (r.top - bounds.top) / cellSizeY); short maxRow = std::min((int)rows, (r.bottom - bounds.top + cellSizeY - 1) / cellSizeY); - short minCol = 0;// std::max(0, (r.left - bounds.left) / cellSizeX); - - short maxCol = cols; //;std::min((int)cols, (r.right - bounds.left + cellSizeX - 1) / cellSizeX); + short minCol = std::max(0, (r.left - bounds.left) / cellSizeX); + short maxCol = std::min((int)cols, (r.right - bounds.left + cellSizeX - 1) / cellSizeX); EraseRect(&r); for(short row = minRow; row < maxRow; ++row) @@ -352,7 +351,6 @@ void Console::PutCharNoUpdate(char c) cursorX++; if(cursorX >= cols) PutCharNoUpdate('\n'); - // This is to make sure the cursor width is calculated correctly chars[cursorY * cols + cursorX].attrs = currentAttr; } } diff --git a/Console/retro/ConsoleWindow.cc b/Console/retro/ConsoleWindow.cc index 880fe63499..5740ede97f 100644 --- a/Console/retro/ConsoleWindow.cc +++ b/Console/retro/ConsoleWindow.cc @@ -36,7 +36,7 @@ ConsoleWindow::ConsoleWindow(Rect r, ConstStr255Param title) { GrafPtr port; //Retro68 Improved Console - win = NewWindow(NULL, &r, "\pThe Queen's Footsteps", true, 0, (WindowPtr)-1, true, 0); + win = NewWindow(NULL, &r, "\pRetro68 Console", true, 0, (WindowPtr)-1, true, 0); #if !TARGET_API_MAC_CARBON port = win; @@ -126,6 +126,7 @@ char ConsoleWindow::WaitNextChar() if (TrackGoAway(eventWin,event.where)) exit(0); } + break; } break; } diff --git a/Console/retro/Makefile b/Console/retro/Makefile deleted file mode 100644 index 6e413e98e3..0000000000 --- a/Console/retro/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# path to RETRO68 -RETRO68=../../../Retro68-build/toolchain - -PREFIX=$(RETRO68)/m68k-apple-macos -CC=$(RETRO68)/bin/m68k-apple-macos-gcc -CXX=$(RETRO68)/bin/m68k-apple-macos-g++ -REZ=$(RETRO68)/bin/Rez -AR=$(RETRO68)/bin/m68k-apple-macos-gcc-ar - -LDFLAGS= -RINCLUDES=$(PREFIX)/RIncludes -REZFLAGS=-I$(RINCLUDES) - - -libConsole.a: Console.o ConsoleWindow.o InitConsole.o - $(AR) rcs $@ $? - -.PHONY: clean -clean: - rm -f Console.o ConsoleWindow.o InitConsole.o