me puse en un rato y lo hice, aqui tienes
import "mod_video"
import "mod_key"
import "mod_map"
import "mod_proc"
import "mod_grproc"
import "mod_text"
import "mod_file"
import "mod_string"
import "mod_regex"
import "mod_time"
import "mod_rand"
import "mod_say"
function load_png_cpt(string filename)
begin
graph = load_png(filename);
load_cpt(0,graph, substr (filename,0,Len(filename)-4)+".cpt");
return graph;
end
function load_cpt(file, graph, string filename)
private
int handle;
int longitud;
int i;
string line;
string ctPoint[2];
begin
if (not fexists (filename))
return 0;
end
handle=fopen(filename,O_READ);
line = fgets (handle);
if (line <> "CTRL-PTS")
fclose(handle);
return 0;
end
line = fgets (handle);
longitud = atoi(line);
for (i = 0; i< longitud; i++)
line = fgets (handle);
split(" ", line, &ctPoint,2);
point_set (file, graph, i, atoi(ctPoint[0]), atoi(ctPoint[1]));
end
fclose(handle);
return 1;
end
begin
x =200;
y =200;
graph = load_png_cpt("002.png");
while (!key(_esc))
frame;
end
end