| 1 |
program convertplanicons; |
| 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: Icons generator |
| 21 |
|
| 22 |
Copyright: |
| 23 |
1994 Channel 7, Destiny: Virtual |
| 24 |
2020 Matija Nalis <[email protected]> |
| 25 |
**********************************************} |
| 26 |
|
| 27 |
{$PACKRECORDS 1} |
| 28 |
|
| 29 |
uses crt, data, utils_; |
| 30 |
|
| 31 |
type |
| 32 |
weaponicontype= array[0..19,0..19] of byte; |
| 33 |
|
| 34 |
var |
| 35 |
ft: file of smallbuffer; |
| 36 |
fw: file of weaponicontype; |
| 37 |
t: ^smallbuffer; |
| 38 |
s: pscreentype; |
| 39 |
w: ^weaponicontype; |
| 40 |
i,a: integer; |
| 41 |
|
| 42 |
begin |
| 43 |
new(t); |
| 44 |
new(w); |
| 45 |
set256colors(colors); |
| 46 |
new(s); |
| 47 |
loadscreen('Data_Generators/makedata/planicon',s); |
| 48 |
|
| 49 |
assign(ft,'data/planicon.dta'); |
| 50 |
rewrite(ft); |
| 51 |
move(s^,t^,sizeof(smallbuffer)); |
| 52 |
write(ft,t^); |
| 53 |
close(ft); |
| 54 |
|
| 55 |
assign(fw,'data/weapicon.dta'); |
| 56 |
rewrite(fw); |
| 57 |
for a:=0 to 80 do |
| 58 |
begin |
| 59 |
for i:=0 to 19 do |
| 60 |
move(s^[i+10+(a div 15)*20,(a mod 15)*20],w^[i],20); |
| 61 |
write(fw,w^); |
| 62 |
for i:=0 to 19 do |
| 63 |
move(w^[i],screen[i],20); |
| 64 |
end; |
| 65 |
for a:=0 to 5 do |
| 66 |
begin |
| 67 |
for i:=0 to 19 do |
| 68 |
move(s^[i+110,a*20],w^[i],20); |
| 69 |
write(fw,w^); |
| 70 |
for i:=0 to 19 do |
| 71 |
move(w^[i],screen[i],20); |
| 72 |
end; |
| 73 |
for a:=0 to 2 do |
| 74 |
begin |
| 75 |
for i:=0 to 19 do |
| 76 |
move(s^[i+130,a*16],w^[i],20); |
| 77 |
write(fw,w^); |
| 78 |
for i:=0 to 19 do |
| 79 |
move(w^[i],screen[i],20); |
| 80 |
end; |
| 81 |
close(fw); |
| 82 |
dispose(s); |
| 83 |
end. |