| 1 |
program makeanimationforchar; |
| 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: Crewgen ball animation |
| 21 |
|
| 22 |
Copyright: |
| 23 |
1994 Channel 7, Destiny: Virtual |
| 24 |
2020 Matija Nalis <[email protected]> |
| 25 |
**********************************************} |
| 26 |
|
| 27 |
uses data, utils_; |
| 28 |
type |
| 29 |
aniscrtype= array[0..34,0..48] of byte; |
| 30 |
aniarray= array[0..30] of aniscrtype; |
| 31 |
var |
| 32 |
ani: aniscrtype; |
| 33 |
anifile: file of aniscrtype; |
| 34 |
index,i,j: integer; |
| 35 |
allani: ^aniarray; |
| 36 |
|
| 37 |
begin |
| 38 |
if paramstr(1)='/test' then |
| 39 |
begin |
| 40 |
init_everything; |
| 41 |
loadscreen('data/char',@screen); |
| 42 |
if ioresult<>0 then errorhandler('data/char',1); |
| 43 |
while not fastkeypressed do delay(1); |
| 44 |
readkey; |
| 45 |
end; |
| 46 |
loadscreen('Data_Generators/makedata/charani',@screen); |
| 47 |
if ioresult<>0 then errorhandler('Data_Generators/makedata/charani',1); |
| 48 |
assign(anifile,'data/charani.dta'); |
| 49 |
if ioresult<>0 then errorhandler('data/charani.dta',1); |
| 50 |
rewrite(anifile); |
| 51 |
ani[0,0]:=0; { move() will initialize it, this is just so compiler does not warn } |
| 52 |
for index:=0 to 29 do |
| 53 |
begin |
| 54 |
for i:=0 to 34 do |
| 55 |
move(screen[i+(index div 6)*35,(index mod 6)*50],ani[i],49); |
| 56 |
write(anifile,ani); |
| 57 |
end; |
| 58 |
index:=0; |
| 59 |
for i:=0 to 34 do |
| 60 |
move(screen[i+(index div 6)*35,(index mod 6)*50],ani[i],49); |
| 61 |
for j:=12 to 35 do |
| 62 |
for i:=1 to 20 do |
| 63 |
ani[i,j]:=0; |
| 64 |
write(anifile,ani); |
| 65 |
reset(anifile); |
| 66 |
new(allani); |
| 67 |
for j:=0 to 30 do |
| 68 |
read(anifile,allani^[j]); |
| 69 |
close(anifile); |
| 70 |
if paramstr(1)='/test' then |
| 71 |
begin |
| 72 |
j:=0; |
| 73 |
repeat |
| 74 |
inc(j); |
| 75 |
if j=31 then j:=0; |
| 76 |
for i:=0 to 34 do |
| 77 |
move(allani^[j,i],screen[i],49); |
| 78 |
delay(150); |
| 79 |
until fastkeypressed; |
| 80 |
end; |
| 81 |
dispose(allani); |
| 82 |
end. |