Quote:Code:
function LoadTileSet(var tilelib: tilelibtype; filename :string) :boolean; {success}
var
size : word;
datafile : file;
ctr : byte;
dud : word;
begin
Assign(datafile, filename + '.TIL');
Reset(datafile, 1);
size := filesize(datafile);
ctr := 0;
While (FilePos(datafile) < size - 768) do
begin
getmem(tilelib.images[ctr], 258);
BlockRead(datafile, tilelib.images[ctr]^, 258);
inc(ctr);
end;
tilelib.tilemax := ctr - 1;
BlockRead(datafile, curpal^, 768);
SetPal(curpal);
LoadTileSet := true;
Close(Datafile);
end;
Well I decided to attempt to break down your code into QB. Please help me from here
1. umm not sure what that line does
2. Declare variables I guess. I'm not sure how.
3. Whatever begin means, I think your creating an array? Or is that a type?
4. The next array or type I guess clears something, not sure what.
5. Your setting variable size to filesize(datafile), yea I definatly I understand this but where in qb can I find commands like these
6. ctr umm?
7. This loop I suppose extracts the tiles, I don't have a clue on how to get this out. Oh I have an idea is this like storing a part of the screen into an array? Damn not easy not easy at all.
8. No idea what your doing here. See I knew it had a type and not an array. Still lost
9. Next it stores the tiles and closes the file opened. Nice I think I got the gist of things now what about the syntax of things?
Thanks allot guys, I'm trying as hard as I can. No I think I can try harder. I'll look into the help file in QB. See what I can get out if it. By any chance is getfile replaced with OPEN?
·····································LINEAR INC·····································
Ã-----------------------------------------------------------------------O
From Problem to Solution - We take the shortest distance