| 1 |
program makeship; |
| 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: Alien ship stats |
| 21 |
|
| 22 |
Copyright: |
| 23 |
1994 Channel 7, Destiny: Virtual |
| 24 |
2020 Matija Nalis <[email protected]> |
| 25 |
**********************************************} |
| 26 |
|
| 27 |
{$PACKRECORDS 1} |
| 28 |
|
| 29 |
type |
| 30 |
alienshiptype= |
| 31 |
record |
| 32 |
relx,rely,relz,range: longint; |
| 33 |
techlevel,skill,shield,battery,shieldlevel,hulldamage, |
| 34 |
dx,dy,dz,maxhull,accelmax,regen,picx: integer; |
| 35 |
damages: array[1..7] of byte; |
| 36 |
gunnodes: array[1..5] of byte; |
| 37 |
charges: array[1..20] of byte; |
| 38 |
end; |
| 39 |
var |
| 40 |
ship: alienshiptype; |
| 41 |
ft: text; |
| 42 |
i,j,a,b: integer; |
| 43 |
f: file of alienshiptype; |
| 44 |
|
| 45 |
procedure display; |
| 46 |
begin |
| 47 |
assign(f,'data/ships.dta'); |
| 48 |
reset(f); |
| 49 |
assign(ft,'Data_Generators/other/shipdata.txt'); |
| 50 |
rewrite(ft); |
| 51 |
for b:=0 to 10 do |
| 52 |
begin |
| 53 |
for a:=1 to 11 do |
| 54 |
begin |
| 55 |
read(f,ship); |
| 56 |
with ship do |
| 57 |
begin |
| 58 |
i:=gunnodes[1]+gunnodes[2]+gunnodes[3]+gunnodes[4]; |
| 59 |
writeln(ft,skill,#9,maxhull,#9,shield-1500,#9,accelmax,#9,i); |
| 60 |
end; |
| 61 |
end; |
| 62 |
writeln(ft); |
| 63 |
end; |
| 64 |
close(ft); |
| 65 |
close(f); |
| 66 |
end; |
| 67 |
|
| 68 |
begin |
| 69 |
assign(ft,'Data_Generators/makedata/alienshp.txt'); |
| 70 |
reset(ft); |
| 71 |
assign(f,'data/ships.dta'); |
| 72 |
rewrite(f); |
| 73 |
readln(ft); |
| 74 |
readln(ft); |
| 75 |
readln(ft); |
| 76 |
for b:=0 to 10 do |
| 77 |
begin |
| 78 |
for a:=1 to 11 do |
| 79 |
begin |
| 80 |
read(ft,i); |
| 81 |
ship.techlevel:=i*256; |
| 82 |
read(ft,i); |
| 83 |
ship.techlevel:=ship.techlevel+i; |
| 84 |
read(ft,ship.skill); |
| 85 |
read(ft,ship.shieldlevel); |
| 86 |
read(ft,ship.hulldamage); |
| 87 |
read(ft,ship.accelmax); |
| 88 |
read(ft,ship.regen); |
| 89 |
read(ft,ship.shield); |
| 90 |
for j:=1 to 5 do read(ft,ship.gunnodes[j]); |
| 91 |
fillchar(ship.charges,20,255); |
| 92 |
for i:=0 to 3 do |
| 93 |
for j:=1 to ship.gunnodes[i+1] do |
| 94 |
ship.charges[i*5+j]:=ship.shieldlevel; |
| 95 |
readln(ft,ship.range); |
| 96 |
ship.battery:=32000; |
| 97 |
fillchar(ship.damages,7,0); |
| 98 |
ship.dx:=0; |
| 99 |
ship.maxhull:=ship.hulldamage; |
| 100 |
ship.dy:=0; |
| 101 |
ship.dz:=0; |
| 102 |
write(f,ship); |
| 103 |
writeln(ship.range); |
| 104 |
end; |
| 105 |
readln(ft); |
| 106 |
end; |
| 107 |
close(ft); |
| 108 |
close(f); |
| 109 |
|
| 110 |
display; |
| 111 |
|
| 112 |
end. |