Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 31

Thread: Making a Package for the game? [sounds,graphics]

  1. #11

    Making a Package for the game? [sounds,graphics]

    Quote Originally Posted by Robert Kosek
    http://tpabbrevia.sourceforge.net/
    The lib not already implemented extracttostream
    From brazil (:

    Pascal pownz!

  2. #12

    Making a Package for the game? [sounds,graphics]

    Since when? [pascal]TAbUnZipper.ExtractToStream(ItemName,Stream);[/pascal]

  3. #13

    Making a Package for the game? [sounds,graphics]

    Quote Originally Posted by Robert Kosek
    Since when? [pascal]TAbUnZipper.ExtractToStream(ItemName,Stream);[/pascal]
    The method exist, but when you use it -> it raises anerror :lol:
    From brazil (:

    Pascal pownz!

  4. #14

    Making a Package for the game? [sounds,graphics]

    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.

  5. #15

    Making a Package for the game? [sounds,graphics]

    Quote Originally Posted by Robert Kosek
    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.
    There
    [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!

  6. #16

    Making a Package for the game? [sounds,graphics]

    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

  7. #17

    Making a Package for the game? [sounds,graphics]

    Quote Originally Posted by JSoftware
    TStream is an abstract class, which means that you'll have to use a TMemoryStream instead
    It compiled sucefull but the
    g_minefield := LoadSDLBMPFromStream(RESZIP);
    does not work now ;/
    From brazil (:

    Pascal pownz!

  8. #18

    Making a Package for the game? [sounds,graphics]

    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

  9. #19

    Making a Package for the game? [sounds,graphics]

    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]

  10. #20

    Making a Package for the game? [sounds,graphics]

    JSoftware :~
    Function does not return nothing

    Robert Kosek :~
    Same thing ;/ the function return nil
    From brazil (:

    Pascal pownz!

Page 2 of 4 FirstFirst 1234 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •