| 1 |
program generateweapondata; |
| 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: weapons |
| 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 |
weapontype= |
| 33 |
record |
| 34 |
damage,energy: integer; |
| 35 |
cents: array[1..4] of byte; |
| 36 |
range: longint; |
| 37 |
end; |
| 38 |
var |
| 39 |
weapons: weapontype; |
| 40 |
f: file of weapontype; |
| 41 |
ft: text; |
| 42 |
index,j: integer; |
| 43 |
c: char; |
| 44 |
dummy: string[20]; |
| 45 |
|
| 46 |
begin |
| 47 |
assign(f,'data/weapon.dta'); |
| 48 |
rewrite(f); |
| 49 |
assign(ft,'Data_Generators/makedata/weapon.txt'); |
| 50 |
reset(ft); |
| 51 |
readln(ft); |
| 52 |
read(ft,index); |
| 53 |
repeat |
| 54 |
for j:=1 to 12 do read(ft,c); |
| 55 |
read(ft,dummy); |
| 56 |
{ read(ft,weapons.name); |
| 57 |
for j:=1 to 20 do weapons.name[j]:=upcase(weapons.name[j]);} |
| 58 |
read(ft,weapons.energy); |
| 59 |
read(ft,weapons.damage); |
| 60 |
for j:=1 to 4 do read(ft,weapons.cents[j]); |
| 61 |
readln(ft,weapons.range); |
| 62 |
read(ft,index); |
| 63 |
write(f,weapons); |
| 64 |
writeln(dummy,'/',weapons.energy,'/',weapons.damage,'/',weapons.cents[1],'/',weapons.cents[2], |
| 65 |
'/',weapons.cents[3],'/',weapons.cents[4],':',weapons.range); |
| 66 |
until index=0; |
| 67 |
close(f); |
| 68 |
close(ft); |
| 69 |
end. |