mirror of
https://github.com/tschak909/platotermClassicMac.git
synced 2024-06-15 21:29:30 +00:00
Add PLTO creator code, so icon works. Add more menu items to resource file. Temporarily comment out mono paint.
This commit is contained in:
parent
0b77f5bf80
commit
b3610d1484
|
@ -18,6 +18,7 @@ add_application(PLATOTERM
|
||||||
terminal.c
|
terminal.c
|
||||||
touch.c
|
touch.c
|
||||||
trace.c
|
trace.c
|
||||||
|
CREATOR "PLTO"
|
||||||
)
|
)
|
||||||
target_link_libraries(PLATOTERM "-lm")
|
target_link_libraries(PLATOTERM "-lm")
|
||||||
|
|
||||||
|
|
25
PLATOTERM.r
25
PLATOTERM.r
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
type 'PLTO' as 'STR ';
|
type 'PLTO' as 'STR ';
|
||||||
resource 'PLTO' (0, purgeable) {
|
resource 'PLTO' (0, purgeable) {
|
||||||
"PLATOTerm 0.1"
|
"PLATOTerm 0.5"
|
||||||
};
|
};
|
||||||
|
|
||||||
resource 'MENU' (128) {
|
resource 'MENU' (128) {
|
||||||
|
@ -22,8 +22,12 @@ resource 'MENU' (128) {
|
||||||
resource 'MENU' (129) {
|
resource 'MENU' (129) {
|
||||||
129, textMenuProc;
|
129, textMenuProc;
|
||||||
allEnabled, enabled;
|
allEnabled, enabled;
|
||||||
"File";
|
"Terminal";
|
||||||
{
|
{
|
||||||
|
"PLATO Mode", noIcon, "P", noMark, plain;
|
||||||
|
"TTY Mode", noIcon, "T", noMark, plain;
|
||||||
|
"-",noIcon, noKey, noMark, plain;
|
||||||
|
"Hang Up",noIcon, "H", noMark, plain;
|
||||||
"Quit", noIcon, "Q", noMark, plain;
|
"Quit", noIcon, "Q", noMark, plain;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -42,8 +46,23 @@ resource 'MENU' (130) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
resource 'MENU' (131) {
|
||||||
|
131, textMenuProc;
|
||||||
|
0, enabled;
|
||||||
|
"Settings";
|
||||||
|
{
|
||||||
|
"300 baud", noIcon, "3", noMark, plain;
|
||||||
|
"1200 baud", noIcon, "1", noMark, plain;
|
||||||
|
"2400 baud", noIcon, "2", noMark, plain;
|
||||||
|
"9600 baud", noIcon, "6", noMark, plain;
|
||||||
|
"19200 baud", noIcon, "9", noMark, plain;
|
||||||
|
"38400 baud", noIcon, "8", noMark, plain;
|
||||||
|
"57600 baud", noIcon, "7", noMark, plain;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
resource 'MBAR' (128) {
|
resource 'MBAR' (128) {
|
||||||
{ 128, 129, 130 };
|
{ 128, 129, 130, 131 };
|
||||||
};
|
};
|
||||||
|
|
||||||
resource 'SIZE' (-1) {
|
resource 'SIZE' (-1) {
|
||||||
|
|
108
screen.c
108
screen.c
|
@ -186,7 +186,7 @@ void screen_menu_command(long menu_command)
|
||||||
switch(menuItem)
|
switch(menuItem)
|
||||||
{
|
{
|
||||||
|
|
||||||
case 1:
|
case 5:
|
||||||
done();
|
done();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -614,65 +614,65 @@ void screen_paint(padPt* Coord)
|
||||||
*/
|
*/
|
||||||
void screen_mono_paint(padPt* Coord)
|
void screen_mono_paint(padPt* Coord)
|
||||||
{
|
{
|
||||||
static unsigned short xStack[512];
|
/* static unsigned short xStack[512]; */
|
||||||
static unsigned short yStack[512];
|
/* static unsigned short yStack[512]; */
|
||||||
int x=screen_scale_x(Coord->x);
|
/* int x=screen_scale_x(Coord->x); */
|
||||||
int y=screen_scale_y(Coord->y);
|
/* int y=screen_scale_y(Coord->y); */
|
||||||
unsigned char stackentry = 1;
|
/* unsigned char stackentry = 1; */
|
||||||
unsigned short spanAbove, spanBelow;
|
/* unsigned short spanAbove, spanBelow; */
|
||||||
unsigned char oldColor=GetPixel(x,y);
|
/* unsigned char oldColor=GetPixel(x,y); */
|
||||||
|
|
||||||
if (oldColor==1)
|
/* if (oldColor==1) */
|
||||||
return;
|
/* return; */
|
||||||
|
|
||||||
do
|
/* do */
|
||||||
{
|
/* { */
|
||||||
unsigned short startx;
|
/* unsigned short startx; */
|
||||||
while (x > 0 && GetPixel(x-1,y)==oldColor)
|
/* while (x > 0 && GetPixel(x-1,y)==oldColor) */
|
||||||
--x;
|
/* --x; */
|
||||||
|
|
||||||
spanAbove = spanBelow = false;
|
/* spanAbove = spanBelow = false; */
|
||||||
startx=x;
|
/* startx=x; */
|
||||||
|
|
||||||
|
|
||||||
while(GetPixel(x,y)==oldColor)
|
/* while(GetPixel(x,y)==oldColor) */
|
||||||
{
|
/* { */
|
||||||
if (y < (512))
|
/* if (y < (512)) */
|
||||||
{
|
/* { */
|
||||||
unsigned char belowColor=GetPixel(x,y);
|
/* unsigned char belowColor=GetPixel(x,y); */
|
||||||
if (!spanBelow && belowColor==oldColor)
|
/* if (!spanBelow && belowColor==oldColor) */
|
||||||
{
|
/* { */
|
||||||
xStack[stackentry] = x;
|
/* xStack[stackentry] = x; */
|
||||||
yStack[stackentry] = y+1;
|
/* yStack[stackentry] = y+1; */
|
||||||
++stackentry;
|
/* ++stackentry; */
|
||||||
spanBelow = true;
|
/* spanBelow = true; */
|
||||||
}
|
/* } */
|
||||||
else if (spanBelow && belowColor!=oldColor)
|
/* else if (spanBelow && belowColor!=oldColor) */
|
||||||
spanBelow = false;
|
/* spanBelow = false; */
|
||||||
}
|
/* } */
|
||||||
|
|
||||||
if (y > 0)
|
/* if (y > 0) */
|
||||||
{
|
/* { */
|
||||||
unsigned char aboveColor=GetPixel(x,y);
|
/* unsigned char aboveColor=GetPixel(x,y); */
|
||||||
if (!spanAbove && aboveColor==oldColor)
|
/* if (!spanAbove && aboveColor==oldColor) */
|
||||||
{
|
/* { */
|
||||||
xStack[stackentry] = x;
|
/* xStack[stackentry] = x; */
|
||||||
yStack[stackentry] = y-1;
|
/* yStack[stackentry] = y-1; */
|
||||||
++stackentry;
|
/* ++stackentry; */
|
||||||
spanAbove = true;
|
/* spanAbove = true; */
|
||||||
}
|
/* } */
|
||||||
else if (spanAbove && aboveColor!=oldColor)
|
/* else if (spanAbove && aboveColor!=oldColor) */
|
||||||
spanAbove = false;
|
/* spanAbove = false; */
|
||||||
}
|
/* } */
|
||||||
++x;
|
/* ++x; */
|
||||||
}
|
/* } */
|
||||||
MoveTo(startx,y);
|
/* MoveTo(startx,y); */
|
||||||
LineTo(x-1,y);
|
/* LineTo(x-1,y); */
|
||||||
--stackentry;
|
/* --stackentry; */
|
||||||
x = xStack[stackentry];
|
/* x = xStack[stackentry]; */
|
||||||
y = yStack[stackentry];
|
/* y = yStack[stackentry]; */
|
||||||
}
|
/* } */
|
||||||
while (stackentry);
|
/* while (stackentry); */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user