| 1 |
program getiteminfostuff; |
| 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: Item descriptions |
| 21 |
|
| 22 |
Copyright: |
| 23 |
1994 Channel 7, Destiny: Virtual |
| 24 |
2020 Matija Nalis <[email protected]> |
| 25 |
**********************************************} |
| 26 |
|
| 27 |
{$PACKRECORDS 1} |
| 28 |
|
| 29 |
type |
| 30 |
iteminfotype= |
| 31 |
record |
| 32 |
index: integer; |
| 33 |
info: array[0..3] of string[28]; |
| 34 |
end; |
| 35 |
var |
| 36 |
iteminfo: iteminfotype; |
| 37 |
f: file of iteminfotype; |
| 38 |
ft: text; |
| 39 |
i,j,count: integer; |
| 40 |
|
| 41 |
begin |
| 42 |
assign(ft,'Data_Generators/makedata/iteminfo.txt'); |
| 43 |
reset(ft); |
| 44 |
assign(f,'data/iteminfo.dta'); |
| 45 |
rewrite(f); |
| 46 |
readln(ft,iteminfo.index); |
| 47 |
count:=0; |
| 48 |
repeat |
| 49 |
for i:=0 to 3 do |
| 50 |
begin |
| 51 |
readln(ft,iteminfo.info[i]); |
| 52 |
if iteminfo.info[i,0]<chr(28) then |
| 53 |
for j:=length(iteminfo.info[i])+1 to 28 do |
| 54 |
iteminfo.info[i,j]:=' '; |
| 55 |
iteminfo.info[i,0]:=chr(28); |
| 56 |
end; |
| 57 |
inc(count); |
| 58 |
writeln(count,':',iteminfo.index); |
| 59 |
{ for i:=0 to 3 do |
| 60 |
for j:=1 to 28 do |
| 61 |
iteminfo.info[i,j]:=upcase(iteminfo.info[i,j]); } |
| 62 |
for i:=0 to 3 do writeln(iteminfo.info[i]); |
| 63 |
readln(ft); |
| 64 |
write(f,iteminfo); |
| 65 |
readln(ft,iteminfo.index); |
| 66 |
writeln; |
| 67 |
until iteminfo.index=0; |
| 68 |
close(ft); |
| 69 |
close(f); |
| 70 |
end. |