{//-------------------------------------------------------------------------}\r
{/* }\r
+{Copyright (C) 2014 Jason Self <j@jxself.org> }\r
+{ }\r
+{This file is free software: you may copy, redistribute and/or modify it }\r
+{under the terms of the GNU Affero General Public License as published by }\r
+{the Free Software Foundation, either version 3 of the License, or (at your }\r
+{option) any later version. }\r
+{ }\r
+{This file is distributed in the hope that it will be useful, but WITHOUT }\r
+{ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or }\r
+{FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License}\r
+{for more details. }\r
+{ }\r
+{You should have received a copy of the GNU Affero General Public License }\r
+{along with this program; if not, see https://gnu.org/licenses or write to: }\r
+{ Free Software Foundation, Inc. }\r
+{ 51 Franklin Street, Fifth Floor }\r
+{ Boston, MA 02110-1301 }\r
+{ USA }\r
+{ }\r
+{This file incorporates work covered by the following copyright and }\r
+{permission notice: }\r
+{ }\r
+{Copyright (C) 1990, 2009 - Apogee Software, Ltd. }\r
+{ }\r
+{This file is part of Beyond The Titanic. Beyond The Titanic is free }\r
+{software; you can redistribute it and/or modify it under the terms of the }\r
+{GNU General Public License as published by the Free Software Foundation; }\r
+{either version 3 of the License, or (at your option) any later version. }\r
+{ }\r
+{This program is distributed in the hope that it will be useful, but WITHOUT}\r
+{ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or }\r
+{FITNESS FOR A PARTICULAR PURPOSE. }\r
+{ }\r
{Copyright (C) 1990, 2009 - Apogee Software, Ltd. }\r
{ }\r
{This file is part of Supernova. Supernova is free software; you can }\r
'rooms2'. If a description exceeds 240 letters (Max), then the file\r
'rooms2' is used. Otherwise 'rooms2' = ''.}\r
{This program has the line edit feature!}\r
+\r
+uses Crt, Printer;\r
+\r
const\r
Max = 240;\r
\r
begin\r
seek(rooms1,pointer); seek(rooms2,pointer);\r
WRITE(rooms1,text1); WRITE(rooms2,text2);\r
- writeln('Room decription ',pointer,\r
+ writeln('Room description ',pointer,\r
' is written! Size = ',filesize(rooms1));\r
close(rooms1); close(rooms2);\r
end; {End of Diskwrite.}\r
counter : integer;\r
text1, text2 : descriptionlength;\r
begin\r
- assign(rooms1,'rooms1');assign(rooms2,'rooms2');\r
- reset(rooms1); reset(rooms2);\r
- seek(rooms1,start); seek(rooms2,start);\r
+ assign(rooms1,'ROOMS1');\r
+ assign(rooms2,'ROOMS2');\r
+ reset(rooms1);\r
+ reset(rooms2);\r
+ seek(rooms1,start);\r
+ seek(rooms2,start);\r
for counter:= start to stop do\r
begin\r
highvideo;\r
READ(rooms1,text1); READ(rooms2,text2);\r
if list then\r
begin\r
- writeln(lst,'Discription # ',counter);\r
+ writeln(lst,'Description # ',counter);\r
writeln(lst,text1,text2);\r
end\r
else\r
highvideo;\r
end;\r
end;\r
+ write('The file contains ',FileSize(rooms1),' room descriptions.');\r
close(rooms1); close(rooms2);\r
- write('The file contains ',filesize(rooms1),' room descriptions.');\r
end; {End of Diskread.}\r
\r
procedure Beep;\r
\r
writeln;\r
writeln('Do you want to R)ead or W)rite?');\r
-read(kbd,answer);\r
+readln(answer);\r
if upcase(answer) <> 'R' then {Write to 'Rooms'.}\r
begin\r
writeln;writeln;\r
- assign(rooms1,'rooms1'); assign(rooms2,'rooms2');\r
+ assign(rooms1,'ROOMS1'); assign(rooms2,'ROOMS2');\r
writeln('Now RESETing room files.');\r
RESET(rooms1); RESET(rooms2);\r
writeln;\r
' ''\''-Ends string.');\r
lowvideo;\r
repeat\r
- read(trm,letter);\r
+ letter := ReadKey;\r
+ write(letter);\r
if letter = ^h then\r
begin\r
- write(^h,' ',^h);\r
- delete(text1,length(text1),2);\r
+ write(' ', ^h);\r
+ delete(text1,length(text1),1);\r
+\r
end;\r
beep;\r
- if (letter <> '\') and (letter <> ^h) then text1:=text1+letter\r
+ if (letter <> '\') and (letter <> ^h) then text1:=text1+letter;\r
until (length(text1)=Max) or (letter='\');\r
writeln;\r
if letter = '\' then\r
writeln('String #1 is full! Now writing to string #2.',^g);\r
lowvideo;\r
repeat\r
- read(trm,letter);\r
+ letter := ReadKey;\r
+ write(letter);\r
if letter = ^h then\r
begin\r
- write(^h,' ',^h);\r
- delete(text2,length(text2),2);\r
+ write(' ',^h);\r
+ delete(text2,length(text2),1);\r
end;\r
beep;\r
if (letter <> '\') and (letter <> ^h) then text2:=text2+letter\r
begin\r
writeln;writeln;\r
writeln('To the S)creen or the P)rinter');\r
- read(kbd,answer);\r
+ readln(answer);\r
if(upcase(answer)='P')then List:=True else List:=False;\r
- assign(rooms1,'rooms1');\r
+ assign(rooms1,'ROOMS1');\r
reset(rooms1);\r
writeln('Filesize = ',filesize(rooms1),\r
' (From 0 to ',filesize(rooms1)-1,')');\r
- close(rooms1);\r
+ // close(rooms1);\r
writeln('Enter starting position:');\r
readln(start);\r
+ writeln('Evo filesize rooms1: ');\r
+ writeln(filesize(rooms1));\r
+\r
if(start > filesize(rooms1)-5)then stop:=(filesize(rooms1)-1) else\r
begin\r
writeln('Enter final position:');\r
end;\r
Diskread(start,stop);\r
end; {End of else clause.}\r
-writeln;writeln('Another room description? Y)es or N)o');\r
-read(kbd,answer);\r
+writeln;\r
+writeln('Another room description? Y)es or N)o');\r
+read(answer);\r
until upcase(answer) = 'N'; {End of Main loop.}\r
writeln; writeln(^g,'You are now out of the program.')\r
END.\r
-\r
-\r
-\1a\r
{//-------------------------------------------------------------------------}\r
{/* }\r
+{Copyright (C) 2014 Jason Self <j@jxself.org> }\r
+{ }\r
+{This file is free software: you may copy, redistribute and/or modify it }\r
+{under the terms of the GNU Affero General Public License as published by }\r
+{the Free Software Foundation, either version 3 of the License, or (at your }\r
+{option) any later version. }\r
+{ }\r
+{This file is distributed in the hope that it will be useful, but WITHOUT }\r
+{ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or }\r
+{FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License}\r
+{for more details. }\r
+{ }\r
+{You should have received a copy of the GNU Affero General Public License }\r
+{along with this program; if not, see https://gnu.org/licenses or write to: }\r
+{ Free Software Foundation, Inc. }\r
+{ 51 Franklin Street, Fifth Floor }\r
+{ Boston, MA 02110-1301 }\r
+{ USA }\r
+{ }\r
+{This file incorporates work covered by the following copyright and }\r
+{permission notice: }\r
+{ }\r
{Copyright (C) 1990, 2009 - Apogee Software, Ltd. }\r
{ }\r
{This file is part of Supernova. Supernova is free software; you can }\r
'special1' and 'special2'. If a description exceeds 240 letters (Max),\r
then the file 'special2' is used. Otherwise 'special2' = ''.}\r
{This program has the line edit feature!}\r
+\r
+uses Crt, Printer;\r
+\r
const\r
Max = 240;\r
\r
highvideo;\r
end;\r
end;\r
- close(special1); close(special2);\r
+\r
write('The file contains ',filesize(special1),' special responces.');\r
+ close(special1); close(special2);\r
end; {End of Diskread.}\r
\r
procedure Beep;\r
\r
writeln;\r
writeln('Do you want to R)ead or W)rite?');\r
-read(kbd,answer);\r
+readln(answer);\r
if upcase(answer) <> 'R' then {Write to 'Special' files.}\r
begin\r
writeln;writeln;\r
' ''\''-Ends string.');\r
lowvideo;\r
repeat\r
- read(trm,letter);\r
+ letter := ReadKey;\r
+ write(letter);\r
if letter = ^h then\r
begin\r
- write(^h,' ',^h);\r
- delete(text1,length(text1),2);\r
+ write(' ',^h);\r
+ delete(text1,length(text1),1);\r
end;\r
beep;\r
if (letter <> '\') and (letter <> ^h) then text1:=text1+letter\r
writeln('String #1 is full! Now writing to string #2.',^g);\r
lowvideo;\r
repeat\r
- read(trm,letter);\r
+ letter := ReadKey;\r
+ write(letter);\r
if letter = ^h then\r
begin\r
- write(^h,' ',^h);\r
- delete(text2,length(text2),2);\r
+ write(' ',^h);\r
+ delete(text2,length(text2),1);\r
end;\r
beep;\r
if (letter <> '\') and (letter <> ^h) then text2:=text2+letter\r
begin\r
writeln;writeln;\r
writeln('To the S)creen or the P)rinter?');\r
- read(kbd,answer);\r
+ readln(answer);\r
if(upcase(answer)='P')then List:=True else List:=False;\r
assign(special1,'special1');\r
reset(special1);\r
writeln('Filesize = ',filesize(special1),\r
' (From 0 to ',filesize(special1)-1,')');\r
- close(special1);\r
+\r
writeln('Enter starting position:');\r
readln(start);\r
if(start > filesize(special1)-5)then stop:=(filesize(special1)-1) else\r
readln(stop);\r
end;\r
Diskread(start,stop);\r
+\r
end; {End of else clause.}\r
writeln;writeln('Another special responce? Y)es or N)o');\r
-read(kbd,answer);\r
+readln(answer);\r
until upcase(answer) = 'N'; {End of Main loop.}\r
writeln; writeln(^g,'You are now out of the program.')\r
END.\r
-\r
-\r
-\1a\r