git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

docs/api/cgb_8h_source.html

      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.9.2"/>
      9 <meta name="viewport" content="width=device-width, initial-scale=1"/>
     10 <title>GBDK 2020 Docs: gbdk-lib/include/gb/cgb.h Source File</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-awesome.css" rel="stylesheet" type="text/css"/>
     23 <link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
     24 <link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
     25 <!-- BEGIN: doxygen-awesome-css -->
     26         <script type="text/javascript" src="doxygen-awesome-darkmode-toggle.js"></script>
     27         <script type="text/javascript">
     28             DoxygenAwesomeDarkModeToggle.init()
     29         </script>
     30         <script type="text/javascript" src="doxygen-awesome-paragraph-link.js"></script>
     31         <script type="text/javascript">
     32             DoxygenAwesomeParagraphLink.init()
     33         </script>        
     34 <!-- END: doxygen-awesome-css -->
     35 </head>
     36 <body>
     37 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
     38 <div id="titlearea">
     39 <table cellspacing="0" cellpadding="0">
     40  <tbody>
     41  <tr style="height: 56px;">
     42   <td id="projectalign" style="padding-left: 0.5em;">
     43    <div id="projectname">GBDK 2020 Docs
     44    &#160;<span id="projectnumber">4.5.0</span>
     45    </div>
     46    <div id="projectbrief">API Documentation for GBDK 2020</div>
     47   </td>
     48  </tr>
     49  </tbody>
     50 </table>
     51 </div>
     52 <!-- end header part -->
     53 <!-- Generated by Doxygen 1.9.2 -->
     54 <script type="text/javascript">
     55 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
     56 var searchBox = new SearchBox("searchBox", "search",'Search','.html');
     57 /* @license-end */
     58 </script>
     59 <script type="text/javascript" src="menudata.js"></script>
     60 <script type="text/javascript" src="menu.js"></script>
     61 <script type="text/javascript">
     62 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
     63 $(function() {
     64   initMenu('',true,false,'search.php','Search');
     65   $(document).ready(function() { init_search(); });
     66 });
     67 /* @license-end */
     68 </script>
     69 <div id="main-nav"></div>
     70 </div><!-- top -->
     71 <div id="side-nav" class="ui-resizable side-nav-resizable">
     72   <div id="nav-tree">
     73     <div id="nav-tree-contents">
     74       <div id="nav-sync" class="sync"></div>
     75     </div>
     76   </div>
     77   <div id="splitbar" style="-moz-user-select:none;" 
     78        class="ui-resizable-handle">
     79   </div>
     80 </div>
     81 <script type="text/javascript">
     82 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
     83 $(document).ready(function(){initNavTree('cgb_8h_source.html',''); initResizable(); });
     84 /* @license-end */
     85 </script>
     86 <div id="doc-content">
     87 <!-- window showing the filter options -->
     88 <div id="MSearchSelectWindow"
     89      onmouseover="return searchBox.OnSearchSelectShow()"
     90      onmouseout="return searchBox.OnSearchSelectHide()"
     91      onkeydown="return searchBox.OnSearchSelectKey(event)">
     92 </div>
     93 
     94 <!-- iframe showing the search results (closed by default) -->
     95 <div id="MSearchResultsWindow">
     96 <iframe src="javascript:void(0)" frameborder="0" 
     97         name="MSearchResults" id="MSearchResults">
     98 </iframe>
     99 </div>
    100 
    101 <div class="header">
    102   <div class="headertitle"><div class="title">cgb.h</div></div>
    103 </div><!--header-->
    104 <div class="contents">
    105 <a href="cgb_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
    106 <div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="preprocessor">#ifndef _CGB_H</span></div>
    107 <div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="preprocessor">#define _CGB_H</span></div>
    108 <div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span> </div>
    109 <div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span><span class="preprocessor">#include &lt;types.h&gt;</span></div>
    110 <div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="preprocessor">#include &lt;<a class="code" href="stdint_8h.html">stdint.h</a>&gt;</span></div>
    111 <div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span> </div>
    112 <div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB">   33</a></span><span class="preprocessor">#define RGB(r, g, b) ((uint16_t)((((b) &amp; 0x1f) &lt;&lt; 10) | ((uint16_t)(((g) &amp; 0x1f) &lt;&lt; 5)) | ((r) &amp; 0x1f)))</span></div>
    113 <div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span> </div>
    114 <div class="line"><a id="l00047" name="l00047"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB8">   47</a></span><span class="preprocessor">#define RGB8(r, g, b) (((uint16_t)((((b) &gt;&gt; 3) &amp; 0x1f) &lt;&lt; 10)) | ((uint16_t)((((g) &gt;&gt; 3) &amp; 0x1f) &lt;&lt; 5)) | (((r) &gt;&gt; 3) &amp; 0x1f))</span></div>
    115 <div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span> </div>
    116 <div class="line"><a id="l00059" name="l00059"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGBHTML">   59</a></span><span class="preprocessor">#define RGBHTML(RGB24bit) (RGB8((((RGB24bit) &gt;&gt; 16) &amp; 0xff), (((RGB24bit) &gt;&gt; 8) &amp; 0xff), ((RGB24bit) &amp; 0xff)))</span></div>
    117 <div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span> </div>
    118 <div class="line"><a id="l00063" name="l00063"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB_RED">   63</a></span><span class="preprocessor">#define RGB_RED        RGB(31,  0,  0)</span></div>
    119 <div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB_DARKRED">   64</a></span><span class="preprocessor">#define RGB_DARKRED    RGB(15,  0,  0)</span></div>
    120 <div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB_GREEN">   65</a></span><span class="preprocessor">#define RGB_GREEN      RGB( 0, 31,  0)</span></div>
    121 <div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB_DARKGREEN">   66</a></span><span class="preprocessor">#define RGB_DARKGREEN  RGB( 0, 15,  0)</span></div>
    122 <div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB_BLUE">   67</a></span><span class="preprocessor">#define RGB_BLUE       RGB( 0,  0, 31)</span></div>
    123 <div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB_DARKBLUE">   68</a></span><span class="preprocessor">#define RGB_DARKBLUE   RGB( 0,  0, 15)</span></div>
    124 <div class="line"><a id="l00069" name="l00069"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB_YELLOW">   69</a></span><span class="preprocessor">#define RGB_YELLOW     RGB(31, 31,  0)</span></div>
    125 <div class="line"><a id="l00070" name="l00070"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB_DARKYELLOW">   70</a></span><span class="preprocessor">#define RGB_DARKYELLOW RGB(21, 21,  0)</span></div>
    126 <div class="line"><a id="l00071" name="l00071"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB_CYAN">   71</a></span><span class="preprocessor">#define RGB_CYAN       RGB( 0, 31, 31)</span></div>
    127 <div class="line"><a id="l00072" name="l00072"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB_AQUA">   72</a></span><span class="preprocessor">#define RGB_AQUA       RGB(28,  5, 22)</span></div>
    128 <div class="line"><a id="l00073" name="l00073"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB_PINK">   73</a></span><span class="preprocessor">#define RGB_PINK       RGB(31,  0, 31)</span></div>
    129 <div class="line"><a id="l00074" name="l00074"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB_PURPLE">   74</a></span><span class="preprocessor">#define RGB_PURPLE     RGB(21,  0, 21)</span></div>
    130 <div class="line"><a id="l00075" name="l00075"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB_BLACK">   75</a></span><span class="preprocessor">#define RGB_BLACK      RGB( 0,  0,  0)</span></div>
    131 <div class="line"><a id="l00076" name="l00076"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB_DARKGRAY">   76</a></span><span class="preprocessor">#define RGB_DARKGRAY   RGB(10, 10, 10)</span></div>
    132 <div class="line"><a id="l00077" name="l00077"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB_LIGHTGRAY">   77</a></span><span class="preprocessor">#define RGB_LIGHTGRAY  RGB(21, 21, 21)</span></div>
    133 <div class="line"><a id="l00078" name="l00078"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB_WHITE">   78</a></span><span class="preprocessor">#define RGB_WHITE      RGB(31, 31, 31)</span></div>
    134 <div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span> </div>
    135 <div class="line"><a id="l00080" name="l00080"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB_LIGHTFLESH">   80</a></span><span class="preprocessor">#define RGB_LIGHTFLESH RGB(30, 20, 15)</span></div>
    136 <div class="line"><a id="l00081" name="l00081"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB_BROWN">   81</a></span><span class="preprocessor">#define RGB_BROWN      RGB(10, 10,  0)</span></div>
    137 <div class="line"><a id="l00082" name="l00082"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB_ORANGE">   82</a></span><span class="preprocessor">#define RGB_ORANGE     RGB(30, 20,  0)</span></div>
    138 <div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="cgb_8h.html#RGB_TEAL">   83</a></span><span class="preprocessor">#define RGB_TEAL       RGB(15, 15,  0)</span></div>
    139 <div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span> </div>
    140 <div class="line"><a id="l00085" name="l00085"></a><span class="lineno"><a class="line" href="cgb_8h.html#palette_color_t">   85</a></span><span class="keyword">typedef</span> <a class="code hl_typedef" href="stdint_8h.html#uint16_t">uint16_t</a> <a class="code hl_typedef" href="cgb_8h.html#palette_color_t">palette_color_t</a>;   </div>
    141 <div class="line"><a id="l00104" name="l00104"></a><span class="lineno"><a class="line" href="cgb_8h.html#set_bkg_palette">  104</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="cgb_8h.html#set_bkg_palette">set_bkg_palette</a>(<a class="code hl_typedef" href="stdint_8h.html#uint8_t">uint8_t</a> first_palette, <a class="code hl_typedef" href="stdint_8h.html#uint8_t">uint8_t</a> nb_palettes, <span class="keyword">const</span> <a class="code hl_typedef" href="cgb_8h.html#palette_color_t">palette_color_t</a> *rgb_data) <a class="code hl_define" href="asm_2types_8h.html#OLDCALL">OLDCALL</a>;</div>
    142 <div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span> </div>
    143 <div class="line"><a id="l00123" name="l00123"></a><span class="lineno"><a class="line" href="cgb_8h.html#set_sprite_palette">  123</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="cgb_8h.html#set_sprite_palette">set_sprite_palette</a>(<a class="code hl_typedef" href="stdint_8h.html#uint8_t">uint8_t</a> first_palette, <a class="code hl_typedef" href="stdint_8h.html#uint8_t">uint8_t</a> nb_palettes, <span class="keyword">const</span> <a class="code hl_typedef" href="cgb_8h.html#palette_color_t">palette_color_t</a> *rgb_data) <a class="code hl_define" href="asm_2types_8h.html#OLDCALL">OLDCALL</a>;</div>
    144 <div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span> </div>
    145 <div class="line"><a id="l00136" name="l00136"></a><span class="lineno"><a class="line" href="cgb_8h.html#set_bkg_palette_entry">  136</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="cgb_8h.html#set_bkg_palette_entry">set_bkg_palette_entry</a>(<a class="code hl_typedef" href="stdint_8h.html#uint8_t">uint8_t</a> palette, <a class="code hl_typedef" href="stdint_8h.html#uint8_t">uint8_t</a> entry, <a class="code hl_typedef" href="stdint_8h.html#uint16_t">uint16_t</a> rgb_data) <a class="code hl_define" href="asm_2types_8h.html#OLDCALL">OLDCALL</a>;</div>
    146 <div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span> </div>
    147 <div class="line"><a id="l00148" name="l00148"></a><span class="lineno"><a class="line" href="cgb_8h.html#set_sprite_palette_entry">  148</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="cgb_8h.html#set_sprite_palette_entry">set_sprite_palette_entry</a>(<a class="code hl_typedef" href="stdint_8h.html#uint8_t">uint8_t</a> palette, <a class="code hl_typedef" href="stdint_8h.html#uint8_t">uint8_t</a> entry, <a class="code hl_typedef" href="stdint_8h.html#uint16_t">uint16_t</a> rgb_data) <a class="code hl_define" href="asm_2types_8h.html#OLDCALL">OLDCALL</a>;</div>
    148 <div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span> </div>
    149 <div class="line"><a id="l00160" name="l00160"></a><span class="lineno"><a class="line" href="cgb_8h.html#cpu_slow">  160</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="cgb_8h.html#cpu_slow">cpu_slow</a>(<span class="keywordtype">void</span>);</div>
    150 <div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span> </div>
    151 <div class="line"><a id="l00174" name="l00174"></a><span class="lineno">  174</span><span class="keywordtype">void</span> <a class="code hl_function" href="cgb_8h.html#cpu_fast">cpu_fast</a>(<span class="keywordtype">void</span>);</div>
    152 <div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span> </div>
    153 <div class="line"><a id="l00184" name="l00184"></a><span class="lineno"><a class="line" href="cgb_8h.html#set_default_palette">  184</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="cgb_8h.html#set_default_palette">set_default_palette</a>(<span class="keywordtype">void</span>);</div>
    154 <div class="line"><a id="l00185" name="l00185"></a><span class="lineno">  185</span> </div>
    155 <div class="line"><a id="l00188" name="l00188"></a><span class="lineno">  188</span><span class="keywordtype">void</span> <a class="code hl_function" href="cgb_8h.html#cgb_compatibility">cgb_compatibility</a>(<span class="keywordtype">void</span>);</div>
    156 <div class="line"><a id="l00189" name="l00189"></a><span class="lineno">  189</span> </div>
    157 <div class="line"><a id="l00190" name="l00190"></a><span class="lineno">  190</span><span class="preprocessor">#endif </span><span class="comment">/* _CGB_H */</span><span class="preprocessor"></span></div>
    158 <div class="ttc" id="aasm_2types_8h_html_OLDCALL"><div class="ttname"><a href="asm_2types_8h.html#OLDCALL">OLDCALL</a></div><div class="ttdeci">#define OLDCALL</div><div class="ttdef"><b>Definition:</b> types.h:21</div></div>
    159 <div class="ttc" id="acgb_8h_html_cgb_compatibility"><div class="ttname"><a href="cgb_8h.html#cgb_compatibility">cgb_compatibility</a></div><div class="ttdeci">void cgb_compatibility(void)</div><div class="ttdef"><b>Definition:</b> sms.h:588</div></div>
    160 <div class="ttc" id="acgb_8h_html_cpu_fast"><div class="ttname"><a href="cgb_8h.html#cpu_fast">cpu_fast</a></div><div class="ttdeci">void cpu_fast(void)</div><div class="ttdef"><b>Definition:</b> msx.h:551</div></div>
    161 <div class="ttc" id="acgb_8h_html_cpu_slow"><div class="ttname"><a href="cgb_8h.html#cpu_slow">cpu_slow</a></div><div class="ttdeci">void cpu_slow(void)</div></div>
    162 <div class="ttc" id="acgb_8h_html_palette_color_t"><div class="ttname"><a href="cgb_8h.html#palette_color_t">palette_color_t</a></div><div class="ttdeci">uint16_t palette_color_t</div><div class="ttdef"><b>Definition:</b> cgb.h:85</div></div>
    163 <div class="ttc" id="acgb_8h_html_set_bkg_palette"><div class="ttname"><a href="cgb_8h.html#set_bkg_palette">set_bkg_palette</a></div><div class="ttdeci">void set_bkg_palette(uint8_t first_palette, uint8_t nb_palettes, const palette_color_t *rgb_data) OLDCALL</div></div>
    164 <div class="ttc" id="acgb_8h_html_set_bkg_palette_entry"><div class="ttname"><a href="cgb_8h.html#set_bkg_palette_entry">set_bkg_palette_entry</a></div><div class="ttdeci">void set_bkg_palette_entry(uint8_t palette, uint8_t entry, uint16_t rgb_data) OLDCALL</div></div>
    165 <div class="ttc" id="acgb_8h_html_set_default_palette"><div class="ttname"><a href="cgb_8h.html#set_default_palette">set_default_palette</a></div><div class="ttdeci">void set_default_palette(void)</div></div>
    166 <div class="ttc" id="acgb_8h_html_set_sprite_palette"><div class="ttname"><a href="cgb_8h.html#set_sprite_palette">set_sprite_palette</a></div><div class="ttdeci">void set_sprite_palette(uint8_t first_palette, uint8_t nb_palettes, const palette_color_t *rgb_data) OLDCALL</div></div>
    167 <div class="ttc" id="acgb_8h_html_set_sprite_palette_entry"><div class="ttname"><a href="cgb_8h.html#set_sprite_palette_entry">set_sprite_palette_entry</a></div><div class="ttdeci">void set_sprite_palette_entry(uint8_t palette, uint8_t entry, uint16_t rgb_data) OLDCALL</div></div>
    168 <div class="ttc" id="astdint_8h_html"><div class="ttname"><a href="stdint_8h.html">stdint.h</a></div></div>
    169 <div class="ttc" id="astdint_8h_html_uint16_t"><div class="ttname"><a href="stdint_8h.html#uint16_t">uint16_t</a></div><div class="ttdeci">unsigned short int uint16_t</div><div class="ttdef"><b>Definition:</b> stdint.h:52</div></div>
    170 <div class="ttc" id="astdint_8h_html_uint8_t"><div class="ttname"><a href="stdint_8h.html#uint8_t">uint8_t</a></div><div class="ttdeci">unsigned char uint8_t</div><div class="ttdef"><b>Definition:</b> stdint.h:51</div></div>
    171 </div><!-- fragment --></div><!-- contents -->
    172 </div><!-- doc-content -->
    173 <!-- start footer part -->
    174 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
    175   <ul>
    176     <li class="navelem"><a class="el" href="dir_8bd3092e915ccc8a773a74e0a10d4d15.html">gbdk-lib</a></li><li class="navelem"><a class="el" href="dir_a9f896cff747ba031115e41245385c17.html">include</a></li><li class="navelem"><a class="el" href="dir_bdfe001eb73b667f67d57fb851301eb1.html">gb</a></li><li class="navelem"><a class="el" href="cgb_8h.html">cgb.h</a></li>
    177     <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
    178   </ul>
    179 </div>
    180 </body>
    181 </html>

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.