The lib not already implemented extracttostreamOriginally Posted by Robert Kosek
The lib not already implemented extracttostreamOriginally Posted by Robert Kosek
From brazil (:
Pascal pownz!
Since when? [pascal]TAbUnZipper.ExtractToStream(ItemName,Stream);[/pascal]
The method exist, but when you use it -> it raises anerror :lol:Originally Posted by Robert Kosek
From brazil (:
Pascal pownz!
Show me your code and the string you're looking for. I'll tell you how to get it right. Wicked Defense uses my zip handler that uses that exact line of code.
ThereOriginally Posted by Robert Kosek
[pascal]procedure Loadresources;
var
ZIP: TAbUnZipper;
RESZIP: TStream;
a: Cardinal;
path: string;
begin
a := SDL_GetTicks;
ZIP := TAbUnZipper.Create(nil);
path := ExtractFileDir(ParamStr(0)) + '\';
Writeln(path);
ZIP.OpenArchive(path+'res.zip');
RESZIP := TStream.Create;
ZIP.ExtractToStream('minefield.bmp',RESZIP);
g_minefield := LoadSDLBMPFromStream(RESZIP);
ZIP.Free;
RESZIP.free;
end;
[/pascal]
ERROR:
EstreamError with message 'Tstream.seek not implemented'
From brazil (:
Pascal pownz!
TStream is an abstract class, which means that you'll have to use a TMemoryStream instead
Peregrinus, expectavi pedes meos in cymbalis
Nullus norvegicorum sole urinat
It compiled sucefull but theOriginally Posted by JSoftware
g_minefield := LoadSDLBMPFromStream(RESZIP);
does not work now ;/
From brazil (:
Pascal pownz!
how do you know it doesn't work? Does it throw an accessviolation or another exception?
or does it just not load anything?
Peregrinus, expectavi pedes meos in cymbalis
Nullus norvegicorum sole urinat
Try this:[pascal]procedure Loadresources;
var
ZIP: TAbUnZipper;
RESZIP: TMemoryStream;
a: Cardinal;
path: string;
begin
a := SDL_GetTicks;
ZIP := TAbUnZipper.Create(nil);
path := ExtractFileDir(ParamStr(0)) + '\';
Writeln(path);
ZIP.OpenArchive(path+'res.zip');
RESZIP := TMemoryStream.Create;
ZIP.ExtractToStream('minefield.bmp',RESZIP);
g_minefield := LoadSDLBMPFromStream(TStream(RESZIP));
ZIP.Free;
RESZIP.free;
end; [/pascal]
JSoftware :~
Function does not return nothing
Robert Kosek :~
Same thing ;/ the function return nil
From brazil (:
Pascal pownz!
Bookmarks