mirror of
https://github.com/gbdk-2020/gbdk-2020.git
synced 2026-02-20 08:42:16 +01:00
182 lines
19 KiB
HTML
182 lines
19 KiB
HTML
<!-- HTML header for doxygen 1.8.14-->
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="cache-control" content="max-age=86400"/>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.9.2"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>GBDK 2020 Docs: gbdk-lib/include/rand.h Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
|
|
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
|
|
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
|
|
<!-- BEGIN: doxygen-awesome-css -->
|
|
<script type="text/javascript" src="doxygen-awesome-darkmode-toggle.js"></script>
|
|
<script type="text/javascript">
|
|
DoxygenAwesomeDarkModeToggle.init()
|
|
</script>
|
|
<script type="text/javascript" src="doxygen-awesome-paragraph-link.js"></script>
|
|
<script type="text/javascript">
|
|
DoxygenAwesomeParagraphLink.init()
|
|
</script>
|
|
<!-- END: doxygen-awesome-css -->
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">GBDK 2020 Docs
|
|
 <span id="projectnumber">4.5.0</span>
|
|
</div>
|
|
<div id="projectbrief">API Documentation for GBDK 2020</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.2 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(document).ready(function(){initNavTree('rand_8h_source.html',''); initResizable(); });
|
|
/* @license-end */
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="headertitle"><div class="title">rand.h</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<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>
|
|
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#ifndef RAND_INCLUDE</span></div>
|
|
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#define RAND_INCLUDE</span></div>
|
|
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> </div>
|
|
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="preprocessor">#include <<a class="code" href="types_8h.html">types.h</a>></span></div>
|
|
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#include <<a class="code" href="stdint_8h.html">stdint.h</a>></span></div>
|
|
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span> </div>
|
|
<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>
|
|
<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>
|
|
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="preprocessor">#elif defined(__PORT_z80)</span></div>
|
|
<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>
|
|
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#endif</span></div>
|
|
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
|
|
<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>
|
|
<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>
|
|
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
|
|
<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>
|
|
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div>
|
|
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span><span class="preprocessor">#if defined(__PORT_sm83)</span></div>
|
|
<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>
|
|
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="preprocessor">#elif defined(__PORT_z80)</span></div>
|
|
<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>
|
|
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span><span class="preprocessor">#elif defined(__PORT_mos6502)</span></div>
|
|
<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>
|
|
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span><span class="preprocessor">#endif</span></div>
|
|
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> </div>
|
|
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span><span class="preprocessor">#if defined(__PORT_sm83)</span></div>
|
|
<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>
|
|
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span><span class="preprocessor">#elif defined(__PORT_z80)</span></div>
|
|
<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>
|
|
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span><span class="preprocessor">#elif defined(__PORT_mos6502)</span></div>
|
|
<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>
|
|
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span><span class="preprocessor">#endif</span></div>
|
|
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
|
|
<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>
|
|
<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>
|
|
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span><span class="preprocessor">#elif defined(__PORT_z80)</span></div>
|
|
<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>
|
|
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span><span class="preprocessor">#endif</span></div>
|
|
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> </div>
|
|
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span><span class="preprocessor">#if defined(__PORT_sm83)</span></div>
|
|
<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>
|
|
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span><span class="preprocessor">#elif defined(__PORT_z80)</span></div>
|
|
<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>
|
|
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span><span class="preprocessor">#elif defined(__PORT_mos6502)</span></div>
|
|
<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>
|
|
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span><span class="preprocessor">#endif</span></div>
|
|
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> </div>
|
|
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span><span class="preprocessor">#endif</span></div>
|
|
<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>
|
|
<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>
|
|
<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>
|
|
<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>
|
|
<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>
|
|
<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>
|
|
<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>
|
|
<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>
|
|
<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>
|
|
<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>
|
|
<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>
|
|
<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>
|
|
<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>
|
|
<div class="ttc" id="astdint_8h_html"><div class="ttname"><a href="stdint_8h.html">stdint.h</a></div></div>
|
|
<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>
|
|
<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>
|
|
<div class="ttc" id="atypes_8h_html"><div class="ttname"><a href="types_8h.html">types.h</a></div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<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>
|
|
<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>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|