| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <html>
- <head>
- <title>Blitz3D Docs</title>
- <link rel=stylesheet href=../css/commands.css type=text/css>
- </head>
- <body>
- <h1>CopyBank src_bank,src_offset,dest_bank,dest_offset,count</h1>
- <h1>Parameters</h1>
- <table>
- <tr>
- <td>
- src_bank = handle of source memory bank
<br />
- src_offset = offset location to start copying from
<br />
- dest_bank = handle of destination memory bank
<br />
- dest_offset = offset location to start writing to
<br />
- count = how many bytes to copy
- </td>
- </tr>
- </table>
- <h1>Description</h1>
- <table>
- <tr>
- <td>
- Copies data from one memory bank to another.
- </td>
- </tr>
- </table>
- <h1><a href=../2d_examples/CopyBank.bb>Example</a></h1>
- <table>
- <tr>
- <td>
- ; BankSize, ResizeBank, CopyBank Example
<br />
-
<br />
- ; create a bank
<br />
- bnkTest=CreateBank(5000)
<br />
-
<br />
- ; Fill it with rand Integers
<br />
- For t = 0 To 4999
<br />
- PokeByte bnkTest,t,Rand(9)
<br />
- Next
<br />
-
<br />
- ; Resize the bank
<br />
- ResizeBank bnkTest,10000
<br />
-
<br />
- ; Copy the first half of the bank to the second half
<br />
- CopyBank bnkTest,0,bnkTest,5000,5000
<br />
-
<br />
- ; Print final banksize
<br />
- Print BankSize(bnkTest)
- </td>
- </tr>
- </table>
- <br>
- <a target=_top href=../index.htm>Index</a><br>
- <br>
- Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=CopyBank&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
- </html>
|