Files
FC1/BinkSDK/htmlhelp/BinkBufferBlit.html
romkazvo 34d6c5d489 123
2023-08-07 19:29:24 +08:00

60 lines
3.9 KiB
HTML

<!-- This page was created with the RAD auto-doc generator. -->
<!doctype html public "-//w3c//dtd html 3.2 final//en">
<html>
<head>
<title>BinkBufferBlit</title>
<meta http-equiv="content-type" content="text/html; charset=iso8859-1">
<meta name="ms.locale" content="en-us">
<meta name="description" content="copies the pixel data onto the screen (for the off-screen variety of BinkBuffers).">
<meta name="ms-hkwd" content="BinkBufferBlit">
<link rel="stylesheet" title="default" href="reference.css" type="text/css" media="screen">
</head>
<body topmargin="0">
<table cellspacing=0 cellpadding=0 class=bar width=100% height=25>
<tr class=bar>
<td class=bar>
<i>&nbsp;<a href="index.html" class=trn>Bink SDK 1.5v</a></i>
</td>
</tr>
</table>
<h1>BinkBufferBlit</h1>
<p>The function <b>BinkBufferBlit</b> copies the pixel data onto the screen (for the off-screen variety of BinkBuffers).</p>
<table width=100% cellspacing=0 class=pre>
<tr class=pre>
<td class=pre>
<pre><b><a href="void.html" class=trn>void</a> <a href="BinkBufferBlit.html" class=trn>BinkBufferBlit</a>(</b>
<b>&nbsp&nbsp<a href="HBINKBUFFER.html" class=trn>HBINKBUFFER</a>&nbsp</b><i>bink_buf</i><b>,</b>
<b>&nbsp&nbsp<a href="BINKRECT_ARRAY.html" class=trn>BINKRECT_ARRAY</a>&nbsp</b><i>rects</i><b>,</b>
<b>&nbsp&nbsp<a href="U32.html" class=trn>U32</a>&nbsp</b><i>num_rects</i>
<b>);</b></pre>
</td>
</tr>
</table>
<h4>In Parameters</h4>
<dl>
<dt><i>bink_buf</i></dt>
<dd>Specifies the BinkBuffer handle.</dd>
<dt><i>rects</i></dt>
<dd>Specifies a pointer to an array of rectangular areas to copy.</dd>
<dt><i>num_rects</i></dt>
<dd>Specifies the number rectangles pointed to by the rects parameter.</dd>
</dl>
<h4>Discussion</h4>
<p>This function blits the pixel data onto the screen for the off-screen style BinkBuffers. For overlay BinkBuffers, this function blits the color key pixels into your window (this allows the overlay to appear on the screen). For primary surface BinkBuffers, this function simply returns without doing anything. You will almost always call this function with the FrameRects field from the Bink structure after calling <a href="BinkGetRects.html">BinkGetRects</a>. <a href="BinkGetRects.html">BinkGetRects</a> fills the FrameRects field with the dirty rectangles from the most recently decompressed Bink frame. So, the blitting logic would look something like this: </p><code><font size=3 color=#006000><pre>BinkDoFrame( bink ); <i>// decompress a frame</i><br>if ( BinkBufferLock( bink_buf ) ){ BinkCopyToBuffer( bink, <i>// copy into the BinkBuffer</i> bink_buf->Buffer, bink_buf->BufferPitch, bink_buf->Height, 0,0, bink_buf->SurfaceType ); BinkBufferUnlock( bink_buf );}<br><i>// blit the data onto the screen</i>BinkBufferBlit( bink_buf, bink->FrameRects, BinkGetRects( bink, bink_buf->SurfaceType ) );</pre></font></code><p>Note that you shouldn't call the BinkBufferBlit function while the buffer is locked - always call <a href="BinkBufferUnlock.html">BinkBufferUnlock</a> before calling BinkBufferBlit. </p>
<p>
<br>
<b>Group:</b>
<a href="BinkBuffer API.html">BinkBuffer API</a><br>
<b>Related Functions:</b>
<a href="BinkBufferLock.html">BinkBufferLock</a>, <a href="BinkBufferOpen.html">BinkBufferOpen</a>, <a href="BinkBufferUnlock.html">BinkBufferUnlock</a>, <a href="BinkGetRects.html">BinkGetRects</a><br>
<b>Related Basic Types:</b>
<a href="BINKBUFFER_OPEN_FLAGS.html">BINKBUFFER_OPEN_FLAGS</a>, <a href="BINKRECT_ARRAY.html">BINKRECT_ARRAY</a>, <a href="HBINKBUFFER.html">HBINKBUFFER</a>, <a href="U32.html">U32</a>, <a href="void.html">void</a></p>
<p align=center>
<a href="mailto:Bink1@radgametools.com">For technical support, e-mail Bink1@radgametools.com</a>
<br>
<a href="http://www.radgametools.com/bnkmain.htm?from=help1.5v">&#169; Copyright 1994-2003 RAD Game Tools, Inc. All Rights Reserved.</a>
</p>
<br>
</body>
</html>