| 1 |
program eventmake; |
| 2 |
(******************************************************************** |
| 3 |
This file is part of Ironseed. |
| 4 |
|
| 5 |
Ironseed is free software: you can redistribute it and/or modify |
| 6 |
it under the terms of the GNU General Public License as published by |
| 7 |
the Free Software Foundation, either version 3 of the License, or |
| 8 |
(at your option) any later version. |
| 9 |
|
| 10 |
Ironseed is distributed in the hope that it will be useful, |
| 11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
GNU General Public License for more details. |
| 14 |
|
| 15 |
You should have received a copy of the GNU General Public License |
| 16 |
along with Ironseed. If not, see <https://www.gnu.org/licenses/>. |
| 17 |
********************************************************************) |
| 18 |
|
| 19 |
{********************************************* |
| 20 |
Data Generator: Extra events dependencies |
| 21 |
|
| 22 |
Copyright: |
| 23 |
1994 Channel 7, Destiny: Virtual |
| 24 |
2020 Matija Nalis <[email protected]> |
| 25 |
**********************************************} |
| 26 |
|
| 27 |
{$PACKRECORDS 1} |
| 28 |
|
| 29 |
uses crt; |
| 30 |
|
| 31 |
type |
| 32 |
eventtype= |
| 33 |
record |
| 34 |
want,give: integer; |
| 35 |
msg: string[255]; |
| 36 |
end; |
| 37 |
var |
| 38 |
t: eventtype; |
| 39 |
ft: text; |
| 40 |
f: file of eventtype; |
| 41 |
j,i: integer; |
| 42 |
ans: char; |
| 43 |
|
| 44 |
begin |
| 45 |
clrscr; |
| 46 |
assign(ft,'Data_Generators/makedata/event.txt'); |
| 47 |
reset(ft); |
| 48 |
assign(f,'data/event.dta'); |
| 49 |
rewrite(f); |
| 50 |
for j:=0 to 10 do |
| 51 |
begin |
| 52 |
readln(ft,t.msg); |
| 53 |
for i:=0 to 9 do |
| 54 |
begin |
| 55 |
fillchar(t.msg,255,$20); |
| 56 |
read(ft,t.want); |
| 57 |
read(ft,t.give); |
| 58 |
if (t.want>0) or (t.give>0) then |
| 59 |
begin |
| 60 |
read(ft,ans); |
| 61 |
read(ft,ans); |
| 62 |
readln(ft,t.msg); |
| 63 |
t.msg := UpCase(t.msg); |
| 64 |
end |
| 65 |
else |
| 66 |
begin |
| 67 |
t.msg:='Nothing happens.'; |
| 68 |
readln(ft); |
| 69 |
end; |
| 70 |
writeln(t.want:6,t.give:6,' ',t.msg); |
| 71 |
write(f,t); |
| 72 |
end; |
| 73 |
end; |
| 74 |
close(f); |
| 75 |
close(ft); |
| 76 |
end. |