-
Notifications
You must be signed in to change notification settings - Fork 16
/
gh2gimp.pas
34 lines (27 loc) · 823 Bytes
/
gh2gimp.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Program gh2gimp;
uses gears,texutil,colormenu;
Function B3Str( N: Integer ): String;
{ Return the value as a string which is exactly three characters }
{ wide. Pad the front of the string with spaces, if needed. }
var
msg: String;
begin
msg := BStr( N );
while Length( msg ) < 3 do msg := ' ' + msg;
B3Str := msg;
end;
var
T: Integer;
F: Text;
begin
Assign( F , 'GH2_Game.gpl' );
Rewrite( F );
writeln( F , 'GIMP Palette' );
writeln( F , 'Name: GH2_Game.gpl' );
writeln( F , 'Columns: 0' );
writeln( F , '#' );
for T := 0 to ( Num_Available_Colors - 1 ) do begin
writeln( F , B3Str( Available_Colors[ t ].rgb.r ) + ' ' + B3Str( Available_Colors[ t ].rgb.g ) + ' ' + B3Str( Available_Colors[ t ].rgb.b ) + ' ' + Available_Colors[ t ].name );
end;
Close( F );
end.