git.y1.nz

gbdk-2020

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

docs/api/rand_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/rand.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('rand_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">rand.h</div></div>
    103 </div><!--header-->
    104 <div class="contents">
    105 <a href="rand_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="l00006" name="l00006"></a><span class="lineno">    6</span><span class="preprocessor">#ifndef RAND_INCLUDE</span></div>
    107 <div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="preprocessor">#define RAND_INCLUDE</span></div>
    108 <div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span> </div>
    109 <div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="preprocessor">#include &lt;<a class="code" href="types_8h.html">types.h</a>&gt;</span></div>
    110 <div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</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="l00011" name="l00011"></a><span class="lineno">   11</span> </div>
    112 <div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span><span class="preprocessor">#if defined(__PORT_sm83) || defined(__PORT_mos6502)</span></div>
    113 <div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="rand_8h.html#initrand">   28</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="rand_8h.html#initrand">initrand</a>(<a class="code hl_typedef" href="stdint_8h.html#uint16_t">uint16_t</a> seed) <a class="code hl_define" href="asm_2types_8h.html#OLDCALL">OLDCALL</a>;</div>
    114 <div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span><span class="preprocessor">#elif defined(__PORT_z80)</span></div>
    115 <div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span><span class="keywordtype">void</span> <a class="code hl_function" href="rand_8h.html#initrand">initrand</a>(<a class="code hl_typedef" href="stdint_8h.html#uint16_t">uint16_t</a> seed) <a class="code hl_define" href="asm_2z80_2types_8h.html#Z88DK_FASTCALL">Z88DK_FASTCALL</a>;</div>
    116 <div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span><span class="preprocessor">#endif</span></div>
    117 <div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span> </div>
    118 <div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="rand_8h.html#RAND_MAX">   33</a></span><span class="preprocessor">#define RAND_MAX 255</span></div>
    119 <div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="rand_8h.html#RANDW_MAX">   34</a></span><span class="preprocessor">#define RANDW_MAX 65535</span></div>
    120 <div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span> </div>
    121 <div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span><span class="keyword">extern</span> <a class="code hl_typedef" href="stdint_8h.html#uint16_t">uint16_t</a> <a class="code hl_variable" href="rand_8h.html#__rand_seed">__rand_seed</a>;</div>
    122 <div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span> </div>
    123 <div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span><span class="preprocessor">#if defined(__PORT_sm83)</span></div>
    124 <div class="line"><a id="l00054" name="l00054"></a><span class="lineno"><a class="line" href="rand_8h.html#c">   54</a></span><a class="code hl_typedef" href="stdint_8h.html#uint8_t">uint8_t</a> <a class="code hl_function" href="rand_8h.html#rand">rand</a>(<span class="keywordtype">void</span>) <a class="code hl_define" href="asm_2types_8h.html#OLDCALL">OLDCALL</a> <a class="code hl_define" href="asm_2types_8h.html#PRESERVES_REGS">PRESERVES_REGS</a>(<a class="code hl_variable" href="gb_8h.html#b">b</a>, <a class="code hl_variable" href="rand_8h.html#c">c</a>);</div>
    125 <div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span><span class="preprocessor">#elif defined(__PORT_z80)</span></div>
    126 <div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span><a class="code hl_typedef" href="stdint_8h.html#uint8_t">uint8_t</a> <a class="code hl_function" href="rand_8h.html#rand">rand</a>(<span class="keywordtype">void</span>) <a class="code hl_define" href="asm_2types_8h.html#OLDCALL">OLDCALL</a> <a class="code hl_define" href="asm_2types_8h.html#PRESERVES_REGS">PRESERVES_REGS</a>(<a class="code hl_variable" href="gb_8h.html#b">b</a>, <a class="code hl_variable" href="rand_8h.html#c">c</a>, <a class="code hl_variable" href="msx_8h.html#iyh">iyh</a>, <a class="code hl_variable" href="msx_2metasprites_8h.html#iyl">iyl</a>);</div>
    127 <div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span><span class="preprocessor">#elif defined(__PORT_mos6502)</span></div>
    128 <div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span><a class="code hl_typedef" href="stdint_8h.html#uint8_t">uint8_t</a> <a class="code hl_function" href="rand_8h.html#rand">rand</a>(<span class="keywordtype">void</span>);</div>
    129 <div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span><span class="preprocessor">#endif</span></div>
    130 <div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span> </div>
    131 <div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span><span class="preprocessor">#if defined(__PORT_sm83)</span></div>
    132 <div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="rand_8h.html#randw">   66</a></span><a class="code hl_typedef" href="stdint_8h.html#uint16_t">uint16_t</a> <a class="code hl_function" href="rand_8h.html#randw">randw</a>(<span class="keywordtype">void</span>) <a class="code hl_define" href="asm_2types_8h.html#OLDCALL">OLDCALL</a> <a class="code hl_define" href="asm_2types_8h.html#PRESERVES_REGS">PRESERVES_REGS</a>(<a class="code hl_variable" href="gb_8h.html#b">b</a>, <a class="code hl_variable" href="rand_8h.html#c">c</a>);</div>
    133 <div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span><span class="preprocessor">#elif defined(__PORT_z80)</span></div>
    134 <div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span><a class="code hl_typedef" href="stdint_8h.html#uint16_t">uint16_t</a> <a class="code hl_function" href="rand_8h.html#randw">randw</a>(<span class="keywordtype">void</span>) <a class="code hl_define" href="asm_2types_8h.html#OLDCALL">OLDCALL</a> <a class="code hl_define" href="asm_2types_8h.html#PRESERVES_REGS">PRESERVES_REGS</a>(<a class="code hl_variable" href="gb_8h.html#b">b</a>, <a class="code hl_variable" href="rand_8h.html#c">c</a>, <a class="code hl_variable" href="msx_8h.html#iyh">iyh</a>, <a class="code hl_variable" href="msx_2metasprites_8h.html#iyl">iyl</a>);</div>
    135 <div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span><span class="preprocessor">#elif defined(__PORT_mos6502)</span></div>
    136 <div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span><a class="code hl_typedef" href="stdint_8h.html#uint16_t">uint16_t</a> <a class="code hl_function" href="rand_8h.html#randw">randw</a>(<span class="keywordtype">void</span>);</div>
    137 <div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span><span class="preprocessor">#endif</span></div>
    138 <div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span> </div>
    139 <div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span><span class="preprocessor">#if defined(__PORT_sm83) || defined(__PORT_mos6502)</span></div>
    140 <div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="rand_8h.html#initarand">   83</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="rand_8h.html#initarand">initarand</a>(<a class="code hl_typedef" href="stdint_8h.html#uint16_t">uint16_t</a> seed) <a class="code hl_define" href="asm_2types_8h.html#OLDCALL">OLDCALL</a>;</div>
    141 <div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span><span class="preprocessor">#elif defined(__PORT_z80)</span></div>
    142 <div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span><span class="keywordtype">void</span> <a class="code hl_function" href="rand_8h.html#initarand">initarand</a>(<a class="code hl_typedef" href="stdint_8h.html#uint16_t">uint16_t</a> seed) <a class="code hl_define" href="asm_2z80_2types_8h.html#Z88DK_FASTCALL">Z88DK_FASTCALL</a>;</div>
    143 <div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span><span class="preprocessor">#endif</span></div>
    144 <div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span> </div>
    145 <div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span><span class="preprocessor">#if defined(__PORT_sm83)</span></div>
    146 <div class="line"><a id="l00093" name="l00093"></a><span class="lineno"><a class="line" href="rand_8h.html#arand">   93</a></span><a class="code hl_typedef" href="stdint_8h.html#uint8_t">uint8_t</a> <a class="code hl_function" href="rand_8h.html#arand">arand</a>(<span class="keywordtype">void</span>) <a class="code hl_define" href="asm_2types_8h.html#OLDCALL">OLDCALL</a> <a class="code hl_define" href="asm_2types_8h.html#PRESERVES_REGS">PRESERVES_REGS</a>(<a class="code hl_variable" href="gb_8h.html#b">b</a>, <a class="code hl_variable" href="rand_8h.html#c">c</a>);</div>
    147 <div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span><span class="preprocessor">#elif defined(__PORT_z80)</span></div>
    148 <div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span><a class="code hl_typedef" href="stdint_8h.html#uint8_t">uint8_t</a> <a class="code hl_function" href="rand_8h.html#arand">arand</a>(<span class="keywordtype">void</span>) <a class="code hl_define" href="asm_2types_8h.html#OLDCALL">OLDCALL</a> <a class="code hl_define" href="asm_2types_8h.html#PRESERVES_REGS">PRESERVES_REGS</a>(<a class="code hl_variable" href="gb_8h.html#b">b</a>, <a class="code hl_variable" href="rand_8h.html#c">c</a>, <a class="code hl_variable" href="msx_8h.html#iyh">iyh</a>, <a class="code hl_variable" href="msx_2metasprites_8h.html#iyl">iyl</a>);</div>
    149 <div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span><span class="preprocessor">#elif defined(__PORT_mos6502)</span></div>
    150 <div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span><a class="code hl_typedef" href="stdint_8h.html#uint8_t">uint8_t</a> <a class="code hl_function" href="rand_8h.html#arand">arand</a>(<span class="keywordtype">void</span>);</div>
    151 <div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span><span class="preprocessor">#endif</span></div>
    152 <div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span> </div>
    153 <div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span><span class="preprocessor">#endif</span></div>
    154 <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>
    155 <div class="ttc" id="aasm_2types_8h_html_PRESERVES_REGS"><div class="ttname"><a href="asm_2types_8h.html#PRESERVES_REGS">PRESERVES_REGS</a></div><div class="ttdeci">#define PRESERVES_REGS(...)</div><div class="ttdef"><b>Definition:</b> types.h:32</div></div>
    156 <div class="ttc" id="aasm_2z80_2types_8h_html_Z88DK_FASTCALL"><div class="ttname"><a href="asm_2z80_2types_8h.html#Z88DK_FASTCALL">Z88DK_FASTCALL</a></div><div class="ttdeci">#define Z88DK_FASTCALL</div><div class="ttdef"><b>Definition:</b> types.h:47</div></div>
    157 <div class="ttc" id="agb_8h_html_b"><div class="ttname"><a href="gb_8h.html#b">b</a></div><div class="ttdeci">void b</div><div class="ttdef"><b>Definition:</b> gb.h:748</div></div>
    158 <div class="ttc" id="amsx_2metasprites_8h_html_iyl"><div class="ttname"><a href="msx_2metasprites_8h.html#iyl">iyl</a></div><div class="ttdeci">static uint8_t iyl</div><div class="ttdef"><b>Definition:</b> metasprites.h:49</div></div>
    159 <div class="ttc" id="amsx_8h_html_iyh"><div class="ttname"><a href="msx_8h.html#iyh">iyh</a></div><div class="ttdeci">void iyh</div><div class="ttdef"><b>Definition:</b> msx.h:102</div></div>
    160 <div class="ttc" id="arand_8h_html___rand_seed"><div class="ttname"><a href="rand_8h.html#__rand_seed">__rand_seed</a></div><div class="ttdeci">uint16_t __rand_seed</div></div>
    161 <div class="ttc" id="arand_8h_html_arand"><div class="ttname"><a href="rand_8h.html#arand">arand</a></div><div class="ttdeci">uint8_t arand(void) OLDCALL PRESERVES_REGS(b</div></div>
    162 <div class="ttc" id="arand_8h_html_c"><div class="ttname"><a href="rand_8h.html#c">c</a></div><div class="ttdeci">uint8_t c</div><div class="ttdef"><b>Definition:</b> rand.h:54</div></div>
    163 <div class="ttc" id="arand_8h_html_initarand"><div class="ttname"><a href="rand_8h.html#initarand">initarand</a></div><div class="ttdeci">void initarand(uint16_t seed) OLDCALL</div></div>
    164 <div class="ttc" id="arand_8h_html_initrand"><div class="ttname"><a href="rand_8h.html#initrand">initrand</a></div><div class="ttdeci">void initrand(uint16_t seed) OLDCALL</div></div>
    165 <div class="ttc" id="arand_8h_html_rand"><div class="ttname"><a href="rand_8h.html#rand">rand</a></div><div class="ttdeci">uint8_t rand(void) OLDCALL PRESERVES_REGS(b</div></div>
    166 <div class="ttc" id="arand_8h_html_randw"><div class="ttname"><a href="rand_8h.html#randw">randw</a></div><div class="ttdeci">uint16_t randw(void) OLDCALL PRESERVES_REGS(b</div></div>
    167 <div class="ttc" id="astdint_8h_html"><div class="ttname"><a href="stdint_8h.html">stdint.h</a></div></div>
    168 <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>
    169 <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>
    170 <div class="ttc" id="atypes_8h_html"><div class="ttname"><a href="types_8h.html">types.h</a></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="rand_8h.html">rand.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.