ResizeBank.htm 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <html>
  2. <head>
  3. <title>Blitz3D Docs</title>
  4. <link rel=stylesheet href=../css/commands.css type=text/css>
  5. </head>
  6. <body>
  7. <h1>ResizeBank bankhandle,new_size</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. bankhandle = handle assigned to bank when created <br />
  13. new_size = new size of bank in bytes
  14. </td>
  15. </tr>
  16. </table>
  17. <h1>Description</h1>
  18. <table>
  19. <tr>
  20. <td>
  21. Resizes a previously created memory bank. Existing bank data is unmodified, but may be moved in memory. Also see CreateBank, CopyBank, and BankSize.
  22. </td>
  23. </tr>
  24. </table>
  25. <h1><a href=../2d_examples/ResizeBank.bb>Example</a></h1>
  26. <table>
  27. <tr>
  28. <td>
  29. ; BankSize, ResizeBank, CopyBank Example <br />
  30. <br />
  31. ; create a bank <br />
  32. bnkTest=CreateBank(5000) <br />
  33. <br />
  34. ; Fill it with rand Integers <br />
  35. For t = 0 To 4999 <br />
  36. PokeByte bnkTest,t,Rand(9) <br />
  37. Next <br />
  38. <br />
  39. ; Resize the bank <br />
  40. ResizeBank bnkTest,10000 <br />
  41. <br />
  42. ; Copy the first half of the bank to the second half <br />
  43. CopyBank bnkTest,0,bnkTest,5000,5000 <br />
  44. <br />
  45. ; Print final banksize <br />
  46. Print BankSize(bnkTest) <br />
  47. </td>
  48. </tr>
  49. </table>
  50. <br>
  51. <a target=_top href=../index.htm>Index</a><br>
  52. <br>
  53. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=ResizeBank&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  54. </html>