Results 1 to 3 of 3

Thread: copying into var buffer

  1. #1

    copying into var buffer

    Delphi 2005 Pro / Windows XP Home
    Pointer / var buffer / TStream

    for addressing memory inside a pointer i now use: TBuffer = array of byte;
    it works nicely but i need to use a for loop and a temp buffer.
    So i do a read from a TSream into a tempbuffer and copy it using the TBuffer trick into my var buffer.

    Now i would like to move larger blocks of memory at once. E.g. directly from into the var buffer without the temp buffer.
    Now how do i control the position inside the var buffer? Using the TBuffer to assign a start does not work. - create adventure games without programming

  2. #2

    copying into var buffer

    Is it something like this you are after?

      Buf : array of byte;
      Str : TStream;
    Str.Read(Buf[0],1000);   //Read a chunk of data to the beginning of buf
    Str.Read(Buf[500],1000);  //Read a chunk of data to position 500 in buf
    ZGameEditor - Develop 64kb games for Windows.
    Thrust for Vectrex - ROM-file and 6809 source code.

  3. #3

    copying into var buffer

    thanks, but i needed to do it diffently.

    solved it:
    does the trick

    the @ before buffer is essential as it is a var buffer and not yet a pointer. And i forgot that the first time ops: - create adventure games without programming


Posting Permissions

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