Tried to implement suggestions.

This commit is contained in:
DarwinNE 2020-01-13 00:20:40 +01:00
parent b901a50bce
commit 7a2f3df561
4 changed files with 4 additions and 51 deletions

View File

@ -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

View File

@ -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;
}
}

View File

@ -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;
}

View File

@ -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