home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Game Killer
/
Game_Killer.bin
/
288.NOTESTUF.INC
< prev
next >
Wrap
Text File
|
1991-07-08
|
1KB
|
53 lines
procedure AddNote( var BaseChanged : boolean );
var s : SectorIndex;
n : NoteIndex;
begin
write('Add note for ');
s := GetSector;
if s = 0 then
exit;
n := noteNumber( s );
if (n=0) and (space.notes.top = MaxNote) then
begin
writeln('Sorry, notes full. You must delete a note first');
exit;
end; {if}
BaseChanged := true;
if n = 0 then
begin
space.notes.top := space.notes.top + 1;
n := space.notes.top;
end; {if}
with space.notes.data[ n ] do
repeat
reference := s;
write('Note: ');
readln( info );
writeln('Sector ',reference : 5, ' ', info );
until prompt('Is this okay? ');
space.sectors[s].etc := space.sectors[s].etc or NoteExists;
end; {Add Note}
procedure RemoveNote( var BaseChanged : boolean);
var
s : sectorIndex;
n : NoteIndex;
begin
write('Remove note for ');
s := GetSector;
n := NoteNumber( s );
if n = 0 then
writeln('no note for sector ', s, ' was found!')
else
begin
writeln('Current note: ', space.notes.data[n].info );
if prompt('Remove it? ') then
begin
space.notes.data[n] := space.notes.data[ space.notes.top ];
space.notes.top := space.notes.top - 1;
space.sectors[s].etc := space.sectors[s].etc and ( not NoteExists);
BaseChanged := true;
end; {if}
end; {else}
end; {RemoveNote}