cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

cgb_8h.html (51713B)


      1<!-- HTML header for doxygen 1.8.14-->
      2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      3<html xmlns="http://www.w3.org/1999/xhtml">
      4<head>
      5<meta http-equiv="cache-control" content="max-age=86400"/>
      6<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
      7<meta http-equiv="X-UA-Compatible" content="IE=9"/>
      8<meta name="generator" content="Doxygen 1.8.20"/>
      9<meta name="viewport" content="width=device-width, initial-scale=1"/>
     10<title>GBDK 2020 Docs: gb/cgb.h File Reference</title>
     11<link href="tabs.css" rel="stylesheet" type="text/css"/>
     12<script type="text/javascript" src="jquery.js"></script>
     13<script type="text/javascript" src="dynsections.js"></script>
     14<link href="navtree.css" rel="stylesheet" type="text/css"/>
     15<script type="text/javascript" src="resize.js"></script>
     16<script type="text/javascript" src="navtreedata.js"></script>
     17<script type="text/javascript" src="navtree.js"></script>
     18<link href="search/search.css" rel="stylesheet" type="text/css"/>
     19<script type="text/javascript" src="search/searchdata.js"></script>
     20<script type="text/javascript" src="search/search.js"></script>
     21<link href="doxygen.css" rel="stylesheet" type="text/css" />
     22<link href="doxygen_extra.css" rel="stylesheet" type="text/css"/>
     23</head>
     24<body>
     25<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
     26<div id="titlearea">
     27<table cellspacing="0" cellpadding="0">
     28 <tbody>
     29 <tr style="height: 56px;">
     30  <td id="projectalign" style="padding-left: 0.5em;">
     31   <div id="projectname">GBDK 2020 Docs
     32   &#160;<span id="projectnumber">4.0.6</span>
     33   </div>
     34   <div id="projectbrief">API Documentation for GBDK 2020</div>
     35  </td>
     36 </tr>
     37 </tbody>
     38</table>
     39</div>
     40<!-- end header part -->
     41<!-- Generated by Doxygen 1.8.20 -->
     42<script type="text/javascript">
     43/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
     44var searchBox = new SearchBox("searchBox", "search",false,'Search');
     45/* @license-end */
     46</script>
     47<script type="text/javascript" src="menudata.js"></script>
     48<script type="text/javascript" src="menu.js"></script>
     49<script type="text/javascript">
     50/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
     51$(function() {
     52  initMenu('',true,false,'search.php','Search');
     53  $(document).ready(function() { init_search(); });
     54});
     55/* @license-end */</script>
     56<div id="main-nav"></div>
     57</div><!-- top -->
     58<div id="side-nav" class="ui-resizable side-nav-resizable">
     59  <div id="nav-tree">
     60    <div id="nav-tree-contents">
     61      <div id="nav-sync" class="sync"></div>
     62    </div>
     63  </div>
     64  <div id="splitbar" style="-moz-user-select:none;" 
     65       class="ui-resizable-handle">
     66  </div>
     67</div>
     68<script type="text/javascript">
     69/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
     70$(document).ready(function(){initNavTree('cgb_8h.html',''); initResizable(); });
     71/* @license-end */
     72</script>
     73<div id="doc-content">
     74<!-- window showing the filter options -->
     75<div id="MSearchSelectWindow"
     76     onmouseover="return searchBox.OnSearchSelectShow()"
     77     onmouseout="return searchBox.OnSearchSelectHide()"
     78     onkeydown="return searchBox.OnSearchSelectKey(event)">
     79</div>
     80
     81<!-- iframe showing the search results (closed by default) -->
     82<div id="MSearchResultsWindow">
     83<iframe src="javascript:void(0)" frameborder="0" 
     84        name="MSearchResults" id="MSearchResults">
     85</iframe>
     86</div>
     87
     88<div class="header">
     89  <div class="summary">
     90<a href="#define-members">Macros</a> &#124;
     91<a href="#typedef-members">Typedefs</a> &#124;
     92<a href="#func-members">Functions</a>  </div>
     93  <div class="headertitle">
     94<div class="title">cgb.h File Reference</div>  </div>
     95</div><!--header-->
     96<div class="contents">
     97<div class="textblock"><code>#include &lt;types.h&gt;</code><br />
     98<code>#include &lt;<a class="el" href="stdint_8h_source.html">stdint.h</a>&gt;</code><br />
     99</div>
    100<p><a href="cgb_8h_source.html">Go to the source code of this file.</a></p>
    101<table class="memberdecls">
    102<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
    103Macros</h2></td></tr>
    104<tr class="memitem:a4a118ad3ee36468a3fa616977a64864e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(r,  g,  <a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)&#160;&#160;&#160;((((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)(<a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>) &amp; 0x1f) &lt;&lt; 10) | (((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)(g) &amp; 0x1f) &lt;&lt; 5) | (((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)(r) &amp; 0x1f) &lt;&lt; 0))</td></tr>
    105<tr class="separator:a4a118ad3ee36468a3fa616977a64864e"><td class="memSeparator" colspan="2">&#160;</td></tr>
    106<tr class="memitem:a7d2ed0f10b2b74123a544327bbfd7564"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a7d2ed0f10b2b74123a544327bbfd7564">RGB8</a>(r,  g,  <a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>)&#160;&#160;&#160;((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)((r) &gt;&gt; 3) | ((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)((g) &gt;&gt; 3) &lt;&lt; 5) | ((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)((<a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>) &gt;&gt; 3) &lt;&lt; 10))</td></tr>
    107<tr class="separator:a7d2ed0f10b2b74123a544327bbfd7564"><td class="memSeparator" colspan="2">&#160;</td></tr>
    108<tr class="memitem:ab5a6e450fcf10402278fe585a421dbbd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#ab5a6e450fcf10402278fe585a421dbbd">RGBHTML</a>(RGB24bit)&#160;&#160;&#160;(<a class="el" href="cgb_8h.html#a7d2ed0f10b2b74123a544327bbfd7564">RGB8</a>((((RGB24bit) &gt;&gt; 16) &amp; 0xFF), (((RGB24bit) &gt;&gt; 8) &amp; 0xFF), ((RGB24bit) &amp; 0xFF)))</td></tr>
    109<tr class="separator:ab5a6e450fcf10402278fe585a421dbbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
    110<tr class="memitem:aa039288455af8a3812a35aa1e7b903e4"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#aa039288455af8a3812a35aa1e7b903e4">RGB_RED</a>&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(31,  0,  0)</td></tr>
    111<tr class="separator:aa039288455af8a3812a35aa1e7b903e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
    112<tr class="memitem:ae29b6947ac7dca7db513e59f1cfcbf51"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#ae29b6947ac7dca7db513e59f1cfcbf51">RGB_DARKRED</a>&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(15,  0,  0)</td></tr>
    113<tr class="separator:ae29b6947ac7dca7db513e59f1cfcbf51"><td class="memSeparator" colspan="2">&#160;</td></tr>
    114<tr class="memitem:ab6c97468034c02fe204fd37036d9be15"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#ab6c97468034c02fe204fd37036d9be15">RGB_GREEN</a>&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>( 0, 31,  0)</td></tr>
    115<tr class="separator:ab6c97468034c02fe204fd37036d9be15"><td class="memSeparator" colspan="2">&#160;</td></tr>
    116<tr class="memitem:a1ee7a5d8fd635e9132a2820a60f9789d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a1ee7a5d8fd635e9132a2820a60f9789d">RGB_DARKGREEN</a>&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>( 0, 15,  0)</td></tr>
    117<tr class="separator:a1ee7a5d8fd635e9132a2820a60f9789d"><td class="memSeparator" colspan="2">&#160;</td></tr>
    118<tr class="memitem:a0eff802f1ca228046476209dc01c76ad"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a0eff802f1ca228046476209dc01c76ad">RGB_BLUE</a>&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>( 0,  0, 31)</td></tr>
    119<tr class="separator:a0eff802f1ca228046476209dc01c76ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
    120<tr class="memitem:ad44385fc245bbabf6da787dcc8930385"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#ad44385fc245bbabf6da787dcc8930385">RGB_DARKBLUE</a>&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>( 0,  0, 15)</td></tr>
    121<tr class="separator:ad44385fc245bbabf6da787dcc8930385"><td class="memSeparator" colspan="2">&#160;</td></tr>
    122<tr class="memitem:ad74a18fca945f257dc9d1b99f9edbd40"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#ad74a18fca945f257dc9d1b99f9edbd40">RGB_YELLOW</a>&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(31, 31,  0)</td></tr>
    123<tr class="separator:ad74a18fca945f257dc9d1b99f9edbd40"><td class="memSeparator" colspan="2">&#160;</td></tr>
    124<tr class="memitem:a2727da9f8c0b09a67375575a00186e2a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a2727da9f8c0b09a67375575a00186e2a">RGB_DARKYELLOW</a>&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(21, 21,  0)</td></tr>
    125<tr class="separator:a2727da9f8c0b09a67375575a00186e2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
    126<tr class="memitem:a2ce30ac984869b55594447722b9d0579"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a2ce30ac984869b55594447722b9d0579">RGB_CYAN</a>&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>( 0, 31, 31)</td></tr>
    127<tr class="separator:a2ce30ac984869b55594447722b9d0579"><td class="memSeparator" colspan="2">&#160;</td></tr>
    128<tr class="memitem:ae4fe0c6cfa46b0c4804425f23bb48f4c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#ae4fe0c6cfa46b0c4804425f23bb48f4c">RGB_AQUA</a>&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(28,  5, 22)</td></tr>
    129<tr class="separator:ae4fe0c6cfa46b0c4804425f23bb48f4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
    130<tr class="memitem:a59fb596d3d65cfc4d3cb7e5044b8b10a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a59fb596d3d65cfc4d3cb7e5044b8b10a">RGB_PINK</a>&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(31,  0, 31)</td></tr>
    131<tr class="separator:a59fb596d3d65cfc4d3cb7e5044b8b10a"><td class="memSeparator" colspan="2">&#160;</td></tr>
    132<tr class="memitem:a9d5a5f880df6bd4b64e6546839d41101"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a9d5a5f880df6bd4b64e6546839d41101">RGB_PURPLE</a>&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(21,  0, 21)</td></tr>
    133<tr class="separator:a9d5a5f880df6bd4b64e6546839d41101"><td class="memSeparator" colspan="2">&#160;</td></tr>
    134<tr class="memitem:ae168f0f9864d4ed4be7807b9783f17f1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#ae168f0f9864d4ed4be7807b9783f17f1">RGB_BLACK</a>&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>( 0,  0,  0)</td></tr>
    135<tr class="separator:ae168f0f9864d4ed4be7807b9783f17f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
    136<tr class="memitem:a29b47e2361025eabcdc3bcbff2308044"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a29b47e2361025eabcdc3bcbff2308044">RGB_DARKGRAY</a>&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(10, 10, 10)</td></tr>
    137<tr class="separator:a29b47e2361025eabcdc3bcbff2308044"><td class="memSeparator" colspan="2">&#160;</td></tr>
    138<tr class="memitem:a80efbf7b13421922fb174f3e6a3e235c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a80efbf7b13421922fb174f3e6a3e235c">RGB_LIGHTGRAY</a>&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(21, 21, 21)</td></tr>
    139<tr class="separator:a80efbf7b13421922fb174f3e6a3e235c"><td class="memSeparator" colspan="2">&#160;</td></tr>
    140<tr class="memitem:ac1771f95d9887118764bd8a074e537e1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#ac1771f95d9887118764bd8a074e537e1">RGB_WHITE</a>&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(31, 31, 31)</td></tr>
    141<tr class="separator:ac1771f95d9887118764bd8a074e537e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
    142<tr class="memitem:a90ef6e9a3d95516b1fef15076b1b4999"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a90ef6e9a3d95516b1fef15076b1b4999">RGB_LIGHTFLESH</a>&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(30, 20, 15)</td></tr>
    143<tr class="separator:a90ef6e9a3d95516b1fef15076b1b4999"><td class="memSeparator" colspan="2">&#160;</td></tr>
    144<tr class="memitem:a7c2a437dfb89d663a1c2f0a7a9256474"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a7c2a437dfb89d663a1c2f0a7a9256474">RGB_BROWN</a>&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(10, 10,  0)</td></tr>
    145<tr class="separator:a7c2a437dfb89d663a1c2f0a7a9256474"><td class="memSeparator" colspan="2">&#160;</td></tr>
    146<tr class="memitem:a0a85d8d0da8edc5cce98f48701f903f7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a0a85d8d0da8edc5cce98f48701f903f7">RGB_ORANGE</a>&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(30, 20,  0)</td></tr>
    147<tr class="separator:a0a85d8d0da8edc5cce98f48701f903f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
    148<tr class="memitem:a9c8c3710151b2258ea8269850498703f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a9c8c3710151b2258ea8269850498703f">RGB_TEAL</a>&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(15, 15,  0)</td></tr>
    149<tr class="separator:a9c8c3710151b2258ea8269850498703f"><td class="memSeparator" colspan="2">&#160;</td></tr>
    150</table><table class="memberdecls">
    151<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
    152Typedefs</h2></td></tr>
    153<tr class="memitem:af868d7cdbd052c6b972ef137e02f6495"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#af868d7cdbd052c6b972ef137e02f6495">palette_color_t</a></td></tr>
    154<tr class="separator:af868d7cdbd052c6b972ef137e02f6495"><td class="memSeparator" colspan="2">&#160;</td></tr>
    155</table><table class="memberdecls">
    156<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
    157Functions</h2></td></tr>
    158<tr class="memitem:aa8851ca1f515ca55cbf9f6ff53b08e8a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#aa8851ca1f515ca55cbf9f6ff53b08e8a">set_bkg_palette</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_palette, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_palettes, <a class="el" href="cgb_8h.html#af868d7cdbd052c6b972ef137e02f6495">palette_color_t</a> *rgb_data) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
    159<tr class="separator:aa8851ca1f515ca55cbf9f6ff53b08e8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
    160<tr class="memitem:a9ca9f825284da0db522d15aa2e42a4af"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a9ca9f825284da0db522d15aa2e42a4af">set_sprite_palette</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> first_palette, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> nb_palettes, <a class="el" href="cgb_8h.html#af868d7cdbd052c6b972ef137e02f6495">palette_color_t</a> *rgb_data) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
    161<tr class="separator:a9ca9f825284da0db522d15aa2e42a4af"><td class="memSeparator" colspan="2">&#160;</td></tr>
    162<tr class="memitem:aa8881ff123f364f2e7d1e88c18f9fbca"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#aa8881ff123f364f2e7d1e88c18f9fbca">set_bkg_palette_entry</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> palette, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> entry, <a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> rgb_data) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
    163<tr class="separator:aa8881ff123f364f2e7d1e88c18f9fbca"><td class="memSeparator" colspan="2">&#160;</td></tr>
    164<tr class="memitem:aebeb7431ebd400baed34796a8f50ea58"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#aebeb7431ebd400baed34796a8f50ea58">set_sprite_palette_entry</a> (<a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> palette, <a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> entry, <a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> rgb_data) <a class="el" href="asm_2types_8h.html#a0971918860055db2e50dacea4da8f3bc">OLDCALL</a></td></tr>
    165<tr class="separator:aebeb7431ebd400baed34796a8f50ea58"><td class="memSeparator" colspan="2">&#160;</td></tr>
    166<tr class="memitem:a6a36fb9584e4a123f6164530a3b1e5e2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a6a36fb9584e4a123f6164530a3b1e5e2">cpu_slow</a> ()</td></tr>
    167<tr class="separator:a6a36fb9584e4a123f6164530a3b1e5e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
    168<tr class="memitem:a884a743919b234cd9c37789380784d08"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#a884a743919b234cd9c37789380784d08">cpu_fast</a> ()</td></tr>
    169<tr class="separator:a884a743919b234cd9c37789380784d08"><td class="memSeparator" colspan="2">&#160;</td></tr>
    170<tr class="memitem:abd34836339579013c097ae4dea10c014"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#abd34836339579013c097ae4dea10c014">set_default_palette</a> ()</td></tr>
    171<tr class="separator:abd34836339579013c097ae4dea10c014"><td class="memSeparator" colspan="2">&#160;</td></tr>
    172<tr class="memitem:ac2dd234782ac786758952496b017ab97"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="cgb_8h.html#ac2dd234782ac786758952496b017ab97">cgb_compatibility</a> ()</td></tr>
    173<tr class="separator:ac2dd234782ac786758952496b017ab97"><td class="memSeparator" colspan="2">&#160;</td></tr>
    174</table>
    175<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
    176<div class="textblock"><p>Support for the Color GameBoy (CGB).</p>
    177<p><b>Enabling CGB features</b></p>
    178<p>To unlock and use CGB features and registers you need to change byte 0143h in the cartridge header. Otherwise, the CGB will operate in monochrome "Non CGB" compatibility mode. </p><ul>
    179<li>Use a value of <b>80h</b> for games that support CGB and monochrome gameboys <br  />
    180 (with Lcc: <b>-Wm-yc</b>, or makebin directly: <b>-yc</b>) </li>
    181<li>Use a value of <b>C0h</b> for CGB only games. <br  />
    182 (with Lcc: <b>-Wm-yC</b>, or makebin directly: <b>-yC</b>)</li>
    183</ul>
    184<p>See the Pan Docs for more information CGB features. </p>
    185</div><h2 class="groupheader">Macro Definition Documentation</h2>
    186<a id="a4a118ad3ee36468a3fa616977a64864e"></a>
    187<h2 class="memtitle"><span class="permalink"><a href="#a4a118ad3ee36468a3fa616977a64864e">&#9670;&nbsp;</a></span>RGB</h2>
    188
    189<div class="memitem">
    190<div class="memproto">
    191      <table class="memname">
    192        <tr>
    193          <td class="memname">#define RGB</td>
    194          <td>(</td>
    195          <td class="paramtype">&#160;</td>
    196          <td class="paramname">r, </td>
    197        </tr>
    198        <tr>
    199          <td class="paramkey"></td>
    200          <td></td>
    201          <td class="paramtype">&#160;</td>
    202          <td class="paramname">g, </td>
    203        </tr>
    204        <tr>
    205          <td class="paramkey"></td>
    206          <td></td>
    207          <td class="paramtype">&#160;</td>
    208          <td class="paramname"><a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>&#160;</td>
    209        </tr>
    210        <tr>
    211          <td></td>
    212          <td>)</td>
    213          <td></td><td>&#160;&#160;&#160;((((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)(<a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>) &amp; 0x1f) &lt;&lt; 10) | (((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)(g) &amp; 0x1f) &lt;&lt; 5) | (((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)(r) &amp; 0x1f) &lt;&lt; 0))</td>
    214        </tr>
    215      </table>
    216</div><div class="memdoc">
    217<p>Macro to create a CGB palette color entry out of 5-bit color components.</p>
    218<dl class="params"><dt>Parameters</dt><dd>
    219  <table class="params">
    220    <tr><td class="paramname">r</td><td>5-bit Red Component, range 0 - 31 (31 brightest) </td></tr>
    221    <tr><td class="paramname">g</td><td>5-bit Green Component, range 0 - 31 (31 brightest) </td></tr>
    222    <tr><td class="paramname">b</td><td>5-bit Blue Component, range 0 - 31 (31 brightest)</td></tr>
    223  </table>
    224  </dd>
    225</dl>
    226<p>The resulting format is bitpacked BGR-555 in a uint16_t.</p>
    227<dl class="section see"><dt>See also</dt><dd><a class="el" href="cgb_8h.html#aa8851ca1f515ca55cbf9f6ff53b08e8a">set_bkg_palette()</a>, <a class="el" href="cgb_8h.html#a9ca9f825284da0db522d15aa2e42a4af">set_sprite_palette()</a>, <a class="el" href="cgb_8h.html#a7d2ed0f10b2b74123a544327bbfd7564">RGB8()</a>, <a class="el" href="cgb_8h.html#ab5a6e450fcf10402278fe585a421dbbd">RGBHTML()</a> </dd></dl>
    228
    229</div>
    230</div>
    231<a id="a7d2ed0f10b2b74123a544327bbfd7564"></a>
    232<h2 class="memtitle"><span class="permalink"><a href="#a7d2ed0f10b2b74123a544327bbfd7564">&#9670;&nbsp;</a></span>RGB8</h2>
    233
    234<div class="memitem">
    235<div class="memproto">
    236      <table class="memname">
    237        <tr>
    238          <td class="memname">#define RGB8</td>
    239          <td>(</td>
    240          <td class="paramtype">&#160;</td>
    241          <td class="paramname">r, </td>
    242        </tr>
    243        <tr>
    244          <td class="paramkey"></td>
    245          <td></td>
    246          <td class="paramtype">&#160;</td>
    247          <td class="paramname">g, </td>
    248        </tr>
    249        <tr>
    250          <td class="paramkey"></td>
    251          <td></td>
    252          <td class="paramtype">&#160;</td>
    253          <td class="paramname"><a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>&#160;</td>
    254        </tr>
    255        <tr>
    256          <td></td>
    257          <td>)</td>
    258          <td></td><td>&#160;&#160;&#160;((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)((r) &gt;&gt; 3) | ((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)((g) &gt;&gt; 3) &lt;&lt; 5) | ((<a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>)((<a class="el" href="gb_8h.html#a4c2e4adef74067fdbb49005bc73de937">b</a>) &gt;&gt; 3) &lt;&lt; 10))</td>
    259        </tr>
    260      </table>
    261</div><div class="memdoc">
    262<p>Macro to create a CGB palette color entry out of 8-bit color components.</p>
    263<dl class="params"><dt>Parameters</dt><dd>
    264  <table class="params">
    265    <tr><td class="paramname">r</td><td>8-bit Red Component, range 0 - 255 (255 brightest) </td></tr>
    266    <tr><td class="paramname">g</td><td>8-bit Green Component, range 0 - 255 (255 brightest) </td></tr>
    267    <tr><td class="paramname">b</td><td>8-bit Blue Component, range 0 - 255 (255 brightest)</td></tr>
    268  </table>
    269  </dd>
    270</dl>
    271<p>The resulting format is bitpacked BGR-555 in a uint16_t.</p>
    272<p>The lowest 3 bits of each color component are dropped during conversion.</p>
    273<dl class="section see"><dt>See also</dt><dd><a class="el" href="cgb_8h.html#aa8851ca1f515ca55cbf9f6ff53b08e8a">set_bkg_palette()</a>, <a class="el" href="cgb_8h.html#a9ca9f825284da0db522d15aa2e42a4af">set_sprite_palette()</a>, <a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB()</a>, <a class="el" href="cgb_8h.html#ab5a6e450fcf10402278fe585a421dbbd">RGBHTML()</a> </dd></dl>
    274
    275</div>
    276</div>
    277<a id="ab5a6e450fcf10402278fe585a421dbbd"></a>
    278<h2 class="memtitle"><span class="permalink"><a href="#ab5a6e450fcf10402278fe585a421dbbd">&#9670;&nbsp;</a></span>RGBHTML</h2>
    279
    280<div class="memitem">
    281<div class="memproto">
    282      <table class="memname">
    283        <tr>
    284          <td class="memname">#define RGBHTML</td>
    285          <td>(</td>
    286          <td class="paramtype">&#160;</td>
    287          <td class="paramname">RGB24bit</td><td>)</td>
    288          <td>&#160;&#160;&#160;(<a class="el" href="cgb_8h.html#a7d2ed0f10b2b74123a544327bbfd7564">RGB8</a>((((RGB24bit) &gt;&gt; 16) &amp; 0xFF), (((RGB24bit) &gt;&gt; 8) &amp; 0xFF), ((RGB24bit) &amp; 0xFF)))</td>
    289        </tr>
    290      </table>
    291</div><div class="memdoc">
    292<p>Macro to convert a 24 Bit RGB color to a CGB palette color entry.</p>
    293<dl class="params"><dt>Parameters</dt><dd>
    294  <table class="params">
    295    <tr><td class="paramname">RGB24bit</td><td>Bit packed RGB-888 color (0-255 for each color component).</td></tr>
    296  </table>
    297  </dd>
    298</dl>
    299<p>The resulting format is bitpacked BGR-555 in a uint16_t.</p>
    300<p>The lowest 3 bits of each color component are dropped during conversion.</p>
    301<dl class="section see"><dt>See also</dt><dd><a class="el" href="cgb_8h.html#aa8851ca1f515ca55cbf9f6ff53b08e8a">set_bkg_palette()</a>, <a class="el" href="cgb_8h.html#a9ca9f825284da0db522d15aa2e42a4af">set_sprite_palette()</a>, <a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB()</a>, <a class="el" href="cgb_8h.html#a7d2ed0f10b2b74123a544327bbfd7564">RGB8()</a> </dd></dl>
    302
    303</div>
    304</div>
    305<a id="aa039288455af8a3812a35aa1e7b903e4"></a>
    306<h2 class="memtitle"><span class="permalink"><a href="#aa039288455af8a3812a35aa1e7b903e4">&#9670;&nbsp;</a></span>RGB_RED</h2>
    307
    308<div class="memitem">
    309<div class="memproto">
    310      <table class="memname">
    311        <tr>
    312          <td class="memname">#define RGB_RED&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(31,  0,  0)</td>
    313        </tr>
    314      </table>
    315</div><div class="memdoc">
    316<p>Common colors based on the EGA default palette. </p>
    317
    318</div>
    319</div>
    320<a id="ae29b6947ac7dca7db513e59f1cfcbf51"></a>
    321<h2 class="memtitle"><span class="permalink"><a href="#ae29b6947ac7dca7db513e59f1cfcbf51">&#9670;&nbsp;</a></span>RGB_DARKRED</h2>
    322
    323<div class="memitem">
    324<div class="memproto">
    325      <table class="memname">
    326        <tr>
    327          <td class="memname">#define RGB_DARKRED&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(15,  0,  0)</td>
    328        </tr>
    329      </table>
    330</div><div class="memdoc">
    331
    332</div>
    333</div>
    334<a id="ab6c97468034c02fe204fd37036d9be15"></a>
    335<h2 class="memtitle"><span class="permalink"><a href="#ab6c97468034c02fe204fd37036d9be15">&#9670;&nbsp;</a></span>RGB_GREEN</h2>
    336
    337<div class="memitem">
    338<div class="memproto">
    339      <table class="memname">
    340        <tr>
    341          <td class="memname">#define RGB_GREEN&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>( 0, 31,  0)</td>
    342        </tr>
    343      </table>
    344</div><div class="memdoc">
    345
    346</div>
    347</div>
    348<a id="a1ee7a5d8fd635e9132a2820a60f9789d"></a>
    349<h2 class="memtitle"><span class="permalink"><a href="#a1ee7a5d8fd635e9132a2820a60f9789d">&#9670;&nbsp;</a></span>RGB_DARKGREEN</h2>
    350
    351<div class="memitem">
    352<div class="memproto">
    353      <table class="memname">
    354        <tr>
    355          <td class="memname">#define RGB_DARKGREEN&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>( 0, 15,  0)</td>
    356        </tr>
    357      </table>
    358</div><div class="memdoc">
    359
    360</div>
    361</div>
    362<a id="a0eff802f1ca228046476209dc01c76ad"></a>
    363<h2 class="memtitle"><span class="permalink"><a href="#a0eff802f1ca228046476209dc01c76ad">&#9670;&nbsp;</a></span>RGB_BLUE</h2>
    364
    365<div class="memitem">
    366<div class="memproto">
    367      <table class="memname">
    368        <tr>
    369          <td class="memname">#define RGB_BLUE&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>( 0,  0, 31)</td>
    370        </tr>
    371      </table>
    372</div><div class="memdoc">
    373
    374</div>
    375</div>
    376<a id="ad44385fc245bbabf6da787dcc8930385"></a>
    377<h2 class="memtitle"><span class="permalink"><a href="#ad44385fc245bbabf6da787dcc8930385">&#9670;&nbsp;</a></span>RGB_DARKBLUE</h2>
    378
    379<div class="memitem">
    380<div class="memproto">
    381      <table class="memname">
    382        <tr>
    383          <td class="memname">#define RGB_DARKBLUE&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>( 0,  0, 15)</td>
    384        </tr>
    385      </table>
    386</div><div class="memdoc">
    387
    388</div>
    389</div>
    390<a id="ad74a18fca945f257dc9d1b99f9edbd40"></a>
    391<h2 class="memtitle"><span class="permalink"><a href="#ad74a18fca945f257dc9d1b99f9edbd40">&#9670;&nbsp;</a></span>RGB_YELLOW</h2>
    392
    393<div class="memitem">
    394<div class="memproto">
    395      <table class="memname">
    396        <tr>
    397          <td class="memname">#define RGB_YELLOW&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(31, 31,  0)</td>
    398        </tr>
    399      </table>
    400</div><div class="memdoc">
    401
    402</div>
    403</div>
    404<a id="a2727da9f8c0b09a67375575a00186e2a"></a>
    405<h2 class="memtitle"><span class="permalink"><a href="#a2727da9f8c0b09a67375575a00186e2a">&#9670;&nbsp;</a></span>RGB_DARKYELLOW</h2>
    406
    407<div class="memitem">
    408<div class="memproto">
    409      <table class="memname">
    410        <tr>
    411          <td class="memname">#define RGB_DARKYELLOW&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(21, 21,  0)</td>
    412        </tr>
    413      </table>
    414</div><div class="memdoc">
    415
    416</div>
    417</div>
    418<a id="a2ce30ac984869b55594447722b9d0579"></a>
    419<h2 class="memtitle"><span class="permalink"><a href="#a2ce30ac984869b55594447722b9d0579">&#9670;&nbsp;</a></span>RGB_CYAN</h2>
    420
    421<div class="memitem">
    422<div class="memproto">
    423      <table class="memname">
    424        <tr>
    425          <td class="memname">#define RGB_CYAN&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>( 0, 31, 31)</td>
    426        </tr>
    427      </table>
    428</div><div class="memdoc">
    429
    430</div>
    431</div>
    432<a id="ae4fe0c6cfa46b0c4804425f23bb48f4c"></a>
    433<h2 class="memtitle"><span class="permalink"><a href="#ae4fe0c6cfa46b0c4804425f23bb48f4c">&#9670;&nbsp;</a></span>RGB_AQUA</h2>
    434
    435<div class="memitem">
    436<div class="memproto">
    437      <table class="memname">
    438        <tr>
    439          <td class="memname">#define RGB_AQUA&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(28,  5, 22)</td>
    440        </tr>
    441      </table>
    442</div><div class="memdoc">
    443
    444</div>
    445</div>
    446<a id="a59fb596d3d65cfc4d3cb7e5044b8b10a"></a>
    447<h2 class="memtitle"><span class="permalink"><a href="#a59fb596d3d65cfc4d3cb7e5044b8b10a">&#9670;&nbsp;</a></span>RGB_PINK</h2>
    448
    449<div class="memitem">
    450<div class="memproto">
    451      <table class="memname">
    452        <tr>
    453          <td class="memname">#define RGB_PINK&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(31,  0, 31)</td>
    454        </tr>
    455      </table>
    456</div><div class="memdoc">
    457
    458</div>
    459</div>
    460<a id="a9d5a5f880df6bd4b64e6546839d41101"></a>
    461<h2 class="memtitle"><span class="permalink"><a href="#a9d5a5f880df6bd4b64e6546839d41101">&#9670;&nbsp;</a></span>RGB_PURPLE</h2>
    462
    463<div class="memitem">
    464<div class="memproto">
    465      <table class="memname">
    466        <tr>
    467          <td class="memname">#define RGB_PURPLE&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(21,  0, 21)</td>
    468        </tr>
    469      </table>
    470</div><div class="memdoc">
    471
    472</div>
    473</div>
    474<a id="ae168f0f9864d4ed4be7807b9783f17f1"></a>
    475<h2 class="memtitle"><span class="permalink"><a href="#ae168f0f9864d4ed4be7807b9783f17f1">&#9670;&nbsp;</a></span>RGB_BLACK</h2>
    476
    477<div class="memitem">
    478<div class="memproto">
    479      <table class="memname">
    480        <tr>
    481          <td class="memname">#define RGB_BLACK&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>( 0,  0,  0)</td>
    482        </tr>
    483      </table>
    484</div><div class="memdoc">
    485
    486</div>
    487</div>
    488<a id="a29b47e2361025eabcdc3bcbff2308044"></a>
    489<h2 class="memtitle"><span class="permalink"><a href="#a29b47e2361025eabcdc3bcbff2308044">&#9670;&nbsp;</a></span>RGB_DARKGRAY</h2>
    490
    491<div class="memitem">
    492<div class="memproto">
    493      <table class="memname">
    494        <tr>
    495          <td class="memname">#define RGB_DARKGRAY&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(10, 10, 10)</td>
    496        </tr>
    497      </table>
    498</div><div class="memdoc">
    499
    500</div>
    501</div>
    502<a id="a80efbf7b13421922fb174f3e6a3e235c"></a>
    503<h2 class="memtitle"><span class="permalink"><a href="#a80efbf7b13421922fb174f3e6a3e235c">&#9670;&nbsp;</a></span>RGB_LIGHTGRAY</h2>
    504
    505<div class="memitem">
    506<div class="memproto">
    507      <table class="memname">
    508        <tr>
    509          <td class="memname">#define RGB_LIGHTGRAY&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(21, 21, 21)</td>
    510        </tr>
    511      </table>
    512</div><div class="memdoc">
    513
    514</div>
    515</div>
    516<a id="ac1771f95d9887118764bd8a074e537e1"></a>
    517<h2 class="memtitle"><span class="permalink"><a href="#ac1771f95d9887118764bd8a074e537e1">&#9670;&nbsp;</a></span>RGB_WHITE</h2>
    518
    519<div class="memitem">
    520<div class="memproto">
    521      <table class="memname">
    522        <tr>
    523          <td class="memname">#define RGB_WHITE&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(31, 31, 31)</td>
    524        </tr>
    525      </table>
    526</div><div class="memdoc">
    527
    528</div>
    529</div>
    530<a id="a90ef6e9a3d95516b1fef15076b1b4999"></a>
    531<h2 class="memtitle"><span class="permalink"><a href="#a90ef6e9a3d95516b1fef15076b1b4999">&#9670;&nbsp;</a></span>RGB_LIGHTFLESH</h2>
    532
    533<div class="memitem">
    534<div class="memproto">
    535      <table class="memname">
    536        <tr>
    537          <td class="memname">#define RGB_LIGHTFLESH&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(30, 20, 15)</td>
    538        </tr>
    539      </table>
    540</div><div class="memdoc">
    541
    542</div>
    543</div>
    544<a id="a7c2a437dfb89d663a1c2f0a7a9256474"></a>
    545<h2 class="memtitle"><span class="permalink"><a href="#a7c2a437dfb89d663a1c2f0a7a9256474">&#9670;&nbsp;</a></span>RGB_BROWN</h2>
    546
    547<div class="memitem">
    548<div class="memproto">
    549      <table class="memname">
    550        <tr>
    551          <td class="memname">#define RGB_BROWN&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(10, 10,  0)</td>
    552        </tr>
    553      </table>
    554</div><div class="memdoc">
    555
    556</div>
    557</div>
    558<a id="a0a85d8d0da8edc5cce98f48701f903f7"></a>
    559<h2 class="memtitle"><span class="permalink"><a href="#a0a85d8d0da8edc5cce98f48701f903f7">&#9670;&nbsp;</a></span>RGB_ORANGE</h2>
    560
    561<div class="memitem">
    562<div class="memproto">
    563      <table class="memname">
    564        <tr>
    565          <td class="memname">#define RGB_ORANGE&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(30, 20,  0)</td>
    566        </tr>
    567      </table>
    568</div><div class="memdoc">
    569
    570</div>
    571</div>
    572<a id="a9c8c3710151b2258ea8269850498703f"></a>
    573<h2 class="memtitle"><span class="permalink"><a href="#a9c8c3710151b2258ea8269850498703f">&#9670;&nbsp;</a></span>RGB_TEAL</h2>
    574
    575<div class="memitem">
    576<div class="memproto">
    577      <table class="memname">
    578        <tr>
    579          <td class="memname">#define RGB_TEAL&#160;&#160;&#160;<a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB</a>(15, 15,  0)</td>
    580        </tr>
    581      </table>
    582</div><div class="memdoc">
    583
    584</div>
    585</div>
    586<h2 class="groupheader">Typedef Documentation</h2>
    587<a id="af868d7cdbd052c6b972ef137e02f6495"></a>
    588<h2 class="memtitle"><span class="permalink"><a href="#af868d7cdbd052c6b972ef137e02f6495">&#9670;&nbsp;</a></span>palette_color_t</h2>
    589
    590<div class="memitem">
    591<div class="memproto">
    592      <table class="memname">
    593        <tr>
    594          <td class="memname">typedef <a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a> <a class="el" href="cgb_8h.html#af868d7cdbd052c6b972ef137e02f6495">palette_color_t</a></td>
    595        </tr>
    596      </table>
    597</div><div class="memdoc">
    598<p>16 bit color entry </p>
    599
    600</div>
    601</div>
    602<h2 class="groupheader">Function Documentation</h2>
    603<a id="aa8851ca1f515ca55cbf9f6ff53b08e8a"></a>
    604<h2 class="memtitle"><span class="permalink"><a href="#aa8851ca1f515ca55cbf9f6ff53b08e8a">&#9670;&nbsp;</a></span>set_bkg_palette()</h2>
    605
    606<div class="memitem">
    607<div class="memproto">
    608      <table class="memname">
    609        <tr>
    610          <td class="memname">void set_bkg_palette </td>
    611          <td>(</td>
    612          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
    613          <td class="paramname"><em>first_palette</em>, </td>
    614        </tr>
    615        <tr>
    616          <td class="paramkey"></td>
    617          <td></td>
    618          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
    619          <td class="paramname"><em>nb_palettes</em>, </td>
    620        </tr>
    621        <tr>
    622          <td class="paramkey"></td>
    623          <td></td>
    624          <td class="paramtype"><a class="el" href="cgb_8h.html#af868d7cdbd052c6b972ef137e02f6495">palette_color_t</a> *&#160;</td>
    625          <td class="paramname"><em>rgb_data</em>&#160;</td>
    626        </tr>
    627        <tr>
    628          <td></td>
    629          <td>)</td>
    630          <td></td><td></td>
    631        </tr>
    632      </table>
    633</div><div class="memdoc">
    634<p>Set CGB background palette(s).</p>
    635<dl class="params"><dt>Parameters</dt><dd>
    636  <table class="params">
    637    <tr><td class="paramname">first_palette</td><td>Index of the first palette to write (0-7) </td></tr>
    638    <tr><td class="paramname">nb_palettes</td><td>Number of palettes to write (1-8, max depends on first_palette) </td></tr>
    639    <tr><td class="paramname">rgb_data</td><td>Pointer to source palette data</td></tr>
    640  </table>
    641  </dd>
    642</dl>
    643<p>Writes <b>nb_palettes</b> to background palette data starting at <b>first_palette</b>, Palette data is sourced from <b>rgb_data</b>.</p>
    644<ul>
    645<li>Each Palette is 8 bytes in size: 4 colors x 2 bytes per palette color entry. </li>
    646<li>Each color (4 per palette) is packed as BGR-555 format (1:5:5:5, MSBit [15] is unused). </li>
    647<li>Each component (R, G, B) may have values from 0 - 31 (5 bits), 31 is brightest.</li>
    648</ul>
    649<dl class="section see"><dt>See also</dt><dd><a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB()</a>, <a class="el" href="cgb_8h.html#aa8881ff123f364f2e7d1e88c18f9fbca">set_bkg_palette_entry()</a> </dd></dl>
    650
    651</div>
    652</div>
    653<a id="a9ca9f825284da0db522d15aa2e42a4af"></a>
    654<h2 class="memtitle"><span class="permalink"><a href="#a9ca9f825284da0db522d15aa2e42a4af">&#9670;&nbsp;</a></span>set_sprite_palette()</h2>
    655
    656<div class="memitem">
    657<div class="memproto">
    658      <table class="memname">
    659        <tr>
    660          <td class="memname">void set_sprite_palette </td>
    661          <td>(</td>
    662          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
    663          <td class="paramname"><em>first_palette</em>, </td>
    664        </tr>
    665        <tr>
    666          <td class="paramkey"></td>
    667          <td></td>
    668          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
    669          <td class="paramname"><em>nb_palettes</em>, </td>
    670        </tr>
    671        <tr>
    672          <td class="paramkey"></td>
    673          <td></td>
    674          <td class="paramtype"><a class="el" href="cgb_8h.html#af868d7cdbd052c6b972ef137e02f6495">palette_color_t</a> *&#160;</td>
    675          <td class="paramname"><em>rgb_data</em>&#160;</td>
    676        </tr>
    677        <tr>
    678          <td></td>
    679          <td>)</td>
    680          <td></td><td></td>
    681        </tr>
    682      </table>
    683</div><div class="memdoc">
    684<p>Set CGB sprite palette(s).</p>
    685<dl class="params"><dt>Parameters</dt><dd>
    686  <table class="params">
    687    <tr><td class="paramname">first_palette</td><td>Index of the first palette to write (0-7) </td></tr>
    688    <tr><td class="paramname">nb_palettes</td><td>Number of palettes to write (1-8, max depends on first_palette) </td></tr>
    689    <tr><td class="paramname">rgb_data</td><td>Pointer to source palette data</td></tr>
    690  </table>
    691  </dd>
    692</dl>
    693<p>Writes <b>nb_palettes</b> to sprite palette data starting at <b>first_palette</b>, Palette data is sourced from <b>rgb_data</b>.</p>
    694<ul>
    695<li>Each Palette is 8 bytes in size: 4 colors x 2 bytes per palette color entry. </li>
    696<li>Each color (4 per palette) is packed as BGR-555 format (1:5:5:5, MSBit [15] is unused). </li>
    697<li>Each component (R, G, B) may have values from 0 - 31 (5 bits), 31 is brightest.</li>
    698</ul>
    699<dl class="section see"><dt>See also</dt><dd><a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB()</a>, <a class="el" href="cgb_8h.html#aebeb7431ebd400baed34796a8f50ea58">set_sprite_palette_entry()</a> </dd></dl>
    700
    701</div>
    702</div>
    703<a id="aa8881ff123f364f2e7d1e88c18f9fbca"></a>
    704<h2 class="memtitle"><span class="permalink"><a href="#aa8881ff123f364f2e7d1e88c18f9fbca">&#9670;&nbsp;</a></span>set_bkg_palette_entry()</h2>
    705
    706<div class="memitem">
    707<div class="memproto">
    708      <table class="memname">
    709        <tr>
    710          <td class="memname">void set_bkg_palette_entry </td>
    711          <td>(</td>
    712          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
    713          <td class="paramname"><em>palette</em>, </td>
    714        </tr>
    715        <tr>
    716          <td class="paramkey"></td>
    717          <td></td>
    718          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
    719          <td class="paramname"><em>entry</em>, </td>
    720        </tr>
    721        <tr>
    722          <td class="paramkey"></td>
    723          <td></td>
    724          <td class="paramtype"><a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>&#160;</td>
    725          <td class="paramname"><em>rgb_data</em>&#160;</td>
    726        </tr>
    727        <tr>
    728          <td></td>
    729          <td>)</td>
    730          <td></td><td></td>
    731        </tr>
    732      </table>
    733</div><div class="memdoc">
    734<p>Sets a single color in the specified CGB background palette.</p>
    735<dl class="params"><dt>Parameters</dt><dd>
    736  <table class="params">
    737    <tr><td class="paramname">palette</td><td>Index of the palette to modify (0-7) </td></tr>
    738    <tr><td class="paramname">entry</td><td>Index of color in palette to modify (0-3) </td></tr>
    739    <tr><td class="paramname">rgb_data</td><td>New color data in BGR 15bpp format.</td></tr>
    740  </table>
    741  </dd>
    742</dl>
    743<dl class="section see"><dt>See also</dt><dd><a class="el" href="cgb_8h.html#aa8851ca1f515ca55cbf9f6ff53b08e8a">set_bkg_palette()</a>, <a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB()</a> </dd></dl>
    744
    745</div>
    746</div>
    747<a id="aebeb7431ebd400baed34796a8f50ea58"></a>
    748<h2 class="memtitle"><span class="permalink"><a href="#aebeb7431ebd400baed34796a8f50ea58">&#9670;&nbsp;</a></span>set_sprite_palette_entry()</h2>
    749
    750<div class="memitem">
    751<div class="memproto">
    752      <table class="memname">
    753        <tr>
    754          <td class="memname">void set_sprite_palette_entry </td>
    755          <td>(</td>
    756          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
    757          <td class="paramname"><em>palette</em>, </td>
    758        </tr>
    759        <tr>
    760          <td class="paramkey"></td>
    761          <td></td>
    762          <td class="paramtype"><a class="el" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td>
    763          <td class="paramname"><em>entry</em>, </td>
    764        </tr>
    765        <tr>
    766          <td class="paramkey"></td>
    767          <td></td>
    768          <td class="paramtype"><a class="el" href="stdint_8h.html#adf4d876453337156dde61095e1f20223">uint16_t</a>&#160;</td>
    769          <td class="paramname"><em>rgb_data</em>&#160;</td>
    770        </tr>
    771        <tr>
    772          <td></td>
    773          <td>)</td>
    774          <td></td><td></td>
    775        </tr>
    776      </table>
    777</div><div class="memdoc">
    778<p>Sets a single color in the specified CGB sprite palette.</p>
    779<dl class="params"><dt>Parameters</dt><dd>
    780  <table class="params">
    781    <tr><td class="paramname">palette</td><td>Index of the palette to modify (0-7) </td></tr>
    782    <tr><td class="paramname">entry</td><td>Index of color in palette to modify (0-3) </td></tr>
    783    <tr><td class="paramname">rgb_data</td><td>New color data in BGR 15bpp format.</td></tr>
    784  </table>
    785  </dd>
    786</dl>
    787<dl class="section see"><dt>See also</dt><dd><a class="el" href="cgb_8h.html#a9ca9f825284da0db522d15aa2e42a4af">set_sprite_palette()</a>, <a class="el" href="cgb_8h.html#a4a118ad3ee36468a3fa616977a64864e">RGB()</a> </dd></dl>
    788
    789</div>
    790</div>
    791<a id="a6a36fb9584e4a123f6164530a3b1e5e2"></a>
    792<h2 class="memtitle"><span class="permalink"><a href="#a6a36fb9584e4a123f6164530a3b1e5e2">&#9670;&nbsp;</a></span>cpu_slow()</h2>
    793
    794<div class="memitem">
    795<div class="memproto">
    796      <table class="memname">
    797        <tr>
    798          <td class="memname">void cpu_slow </td>
    799          <td>(</td>
    800          <td class="paramname"></td><td>)</td>
    801          <td></td>
    802        </tr>
    803      </table>
    804</div><div class="memdoc">
    805<p>Set CPU speed to slow (Normal Speed) operation.</p>
    806<p>Interrupts are temporarily disabled and then re-enabled during this call.</p>
    807<p>In this mode the CGB operates at the same speed as the DMG/Pocket/SGB models.</p>
    808<ul>
    809<li>You can check to see if <a class="el" href="gb_8h.html#a874b9bd95b0a05d6a6072feabc879e45">_cpu</a> == <a class="el" href="gb_8h.html#aee435a3a0dde3dbd7b6112dbb456cde8">CGB_TYPE</a> before using this function.</li>
    810</ul>
    811<dl class="section see"><dt>See also</dt><dd><a class="el" href="cgb_8h.html#a884a743919b234cd9c37789380784d08">cpu_fast()</a> </dd></dl>
    812
    813</div>
    814</div>
    815<a id="a884a743919b234cd9c37789380784d08"></a>
    816<h2 class="memtitle"><span class="permalink"><a href="#a884a743919b234cd9c37789380784d08">&#9670;&nbsp;</a></span>cpu_fast()</h2>
    817
    818<div class="memitem">
    819<div class="memproto">
    820<table class="mlabels">
    821  <tr>
    822  <td class="mlabels-left">
    823      <table class="memname">
    824        <tr>
    825          <td class="memname">void cpu_fast </td>
    826          <td>(</td>
    827          <td class="paramname"></td><td>)</td>
    828          <td></td>
    829        </tr>
    830      </table>
    831  </td>
    832  <td class="mlabels-right">
    833<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
    834  </tr>
    835</table>
    836</div><div class="memdoc">
    837<p>Set CPU speed to fast (CGB Double Speed) operation.</p>
    838<p>On startup the CGB operates in Normal Speed Mode and can be switched into Double speed mode (faster processing but also higher power consumption). See the Pan Docs for more information about which hardware features operate faster and which remain at Normal Speed.</p>
    839<ul>
    840<li>Interrupts are temporarily disabled and then re-enabled during this call. </li>
    841<li>You can check to see if <a class="el" href="gb_8h.html#a874b9bd95b0a05d6a6072feabc879e45">_cpu</a> == <a class="el" href="gb_8h.html#aee435a3a0dde3dbd7b6112dbb456cde8">CGB_TYPE</a> before using this function.</li>
    842</ul>
    843<dl class="section see"><dt>See also</dt><dd><a class="el" href="cgb_8h.html#a6a36fb9584e4a123f6164530a3b1e5e2">cpu_slow()</a>, <a class="el" href="gb_8h.html#a874b9bd95b0a05d6a6072feabc879e45">_cpu</a> </dd></dl>
    844
    845</div>
    846</div>
    847<a id="abd34836339579013c097ae4dea10c014"></a>
    848<h2 class="memtitle"><span class="permalink"><a href="#abd34836339579013c097ae4dea10c014">&#9670;&nbsp;</a></span>set_default_palette()</h2>
    849
    850<div class="memitem">
    851<div class="memproto">
    852      <table class="memname">
    853        <tr>
    854          <td class="memname">void set_default_palette </td>
    855          <td>(</td>
    856          <td class="paramname"></td><td>)</td>
    857          <td></td>
    858        </tr>
    859      </table>
    860</div><div class="memdoc">
    861<p>Set palette, compatible with the DMG/GBP.</p>
    862<p>The default/first CGB palettes for sprites and backgrounds are set to a similar default appearance as on the DMG/Pocket/SGB models. (White, Light Gray, Dark Gray, Black)</p>
    863<ul>
    864<li>You can check to see if <a class="el" href="gb_8h.html#a874b9bd95b0a05d6a6072feabc879e45">_cpu</a> == <a class="el" href="gb_8h.html#aee435a3a0dde3dbd7b6112dbb456cde8">CGB_TYPE</a> before using this function. </li>
    865</ul>
    866
    867</div>
    868</div>
    869<a id="ac2dd234782ac786758952496b017ab97"></a>
    870<h2 class="memtitle"><span class="permalink"><a href="#ac2dd234782ac786758952496b017ab97">&#9670;&nbsp;</a></span>cgb_compatibility()</h2>
    871
    872<div class="memitem">
    873<div class="memproto">
    874      <table class="memname">
    875        <tr>
    876          <td class="memname">void cgb_compatibility </td>
    877          <td>(</td>
    878          <td class="paramname"></td><td>)</td>
    879          <td></td>
    880        </tr>
    881      </table>
    882</div><div class="memdoc">
    883<p>This function is obsolete </p>
    884
    885</div>
    886</div>
    887</div><!-- contents -->
    888</div><!-- doc-content -->
    889<!-- HTML footer for doxygen 1.8.14-->
    890<!-- start footer part -->
    891<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
    892</div>
    893</body>
    894</html>