cscg22-gearboy

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

sms_2metasprites_8h_source.html (19398B)


      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: sms/metasprites.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_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('sms_2metasprites_8h_source.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="headertitle">
     90<div class="title">metasprites.h</div>  </div>
     91</div><!--header-->
     92<div class="contents">
     93<a href="sms_2metasprites_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
     94<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#ifndef _METASPRITES_H_INCLUDE</span></div>
     95<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#define _METASPRITES_H_INCLUDE</span></div>
     96<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160; </div>
     97<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="sms_2hardware_8h.html">sms/hardware.h</a>&gt;</span></div>
     98<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#include &lt;types.h&gt;</span></div>
     99<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="stdint_8h.html">stdint.h</a>&gt;</span></div>
    100<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160; </div>
    101<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structmetasprite__t.html">metasprite_t</a> {</div>
    102<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <a class="code" href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a>  <a class="code" href="structmetasprite__t.html#a2c3fea1f6b3354352823320c69a3e4bb">dy</a>, <a class="code" href="structmetasprite__t.html#a67d2a6fb62059da39b54e975c4fbb324">dx</a>;</div>
    103<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="structmetasprite__t.html#ad68b2f80c08f2f7fc603c56af2e75a6f">dtile</a>;</div>
    104<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="sms_2metasprites_8h.html#aba6401cc8173158a9f37ee22094c03d3">   56</a></span>&#160;} <a class="code" href="gb_2metasprites_8h.html#aba6401cc8173158a9f37ee22094c03d3">metasprite_t</a>;</div>
    105<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160; </div>
    106<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="sms_2metasprites_8h.html#a9f9f390a57460914e27c7604b7d8379a">   58</a></span>&#160;<span class="preprocessor">#define metasprite_end -128 </span></div>
    107<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="sms_2metasprites_8h.html#aa88dc4d5e35045509b8955a4a23a30aa">   59</a></span>&#160;<span class="preprocessor">#define METASPR_ITEM(dy,dx,dt,a) {(dy),(dx),(dt)}</span></div>
    108<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="sms_2metasprites_8h.html#aa1d425dcce3cd104751744535b6a389a">   60</a></span>&#160;<span class="preprocessor">#define METASPR_TERM {metasprite_end}</span></div>
    109<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160; </div>
    110<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">void</span> * <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a>;</div>
    111<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="keyword">extern</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a>;</div>
    112<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="keyword">extern</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a4bfe4d95031b67951cf6bc342110db39">__render_shadow_OAM</a>;</div>
    113<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160; </div>
    114<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160; </div>
    115<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="sms_2metasprites_8h.html#af279c752a3b15c4bd5c67f54b92e553f">   67</a></span>&#160;<span class="keyword">static</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> __move_metasprite(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <span class="keywordtype">id</span>, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y) <a class="code" href="asm_2z80_2types_8h.html#aa19670cfef9fe1cc31f28fafb0e1000a">Z88DK_CALLEE</a> <a class="code" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="code" href="sms_8h.html#aade844cba18122ad48cb2f92b1c87ab0">iyh</a>, <a class="code" href="sms_2metasprites_8h.html#af279c752a3b15c4bd5c67f54b92e553f">iyl</a>);</div>
    116<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> __hide_metasprite(<a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <span class="keywordtype">id</span>) <a class="code" href="asm_2z80_2types_8h.html#af45e54cf59a5202abc9125c07b64abf1">Z88DK_FASTCALL</a> <a class="code" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="code" href="sms_8h.html#aade844cba18122ad48cb2f92b1c87ab0">iyh</a>, <a class="code" href="sms_2metasprites_8h.html#af279c752a3b15c4bd5c67f54b92e553f">iyl</a>);</div>
    117<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160; </div>
    118<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="sms_2metasprites_8h.html#a0c668f442b4764275a1dade597a59e20">   75</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="gb_2metasprites_8h.html#a77bb622fa362f2e04be1bafaa099a709">hide_sprites_range</a>(<a class="code" href="asm_2gbz80_2types_8h.html#ab27e9918b538ce9d8ca692479b375b6a">UINT8</a> from, <a class="code" href="asm_2gbz80_2types_8h.html#ab27e9918b538ce9d8ca692479b375b6a">UINT8</a> to) <a class="code" href="asm_2z80_2types_8h.html#aa19670cfef9fe1cc31f28fafb0e1000a">Z88DK_CALLEE</a> <a class="code" href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a>(<a class="code" href="sms_8h.html#aade844cba18122ad48cb2f92b1c87ab0">iyh</a>, <a class="code" href="sms_2metasprites_8h.html#af279c752a3b15c4bd5c67f54b92e553f">iyl</a>);</div>
    119<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160; </div>
    120<div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="sms_2metasprites_8h.html#a77475e913bf0a19df28bdbf9d1cf392b">   96</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code" href="gb_2metasprites_8h.html#a77475e913bf0a19df28bdbf9d1cf392b">move_metasprite</a>(<span class="keyword">const</span> <a class="code" href="structmetasprite__t.html">metasprite_t</a> * metasprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_tile, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_sprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> x, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> y) {</div>
    121<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a> = metasprite; </div>
    122<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a> = base_tile;</div>
    123<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <span class="keywordflow">return</span> __move_metasprite(base_sprite, x, y); </div>
    124<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;}</div>
    125<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160; </div>
    126<div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="sms_2metasprites_8h.html#af8de5a888d65448b9d34027a0e1ce906">  111</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="gb_2metasprites_8h.html#af8de5a888d65448b9d34027a0e1ce906">hide_metasprite</a>(<span class="keyword">const</span> <a class="code" href="structmetasprite__t.html">metasprite_t</a> * metasprite, <a class="code" href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> base_sprite) {</div>
    127<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <a class="code" href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a> = metasprite; </div>
    128<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    __hide_metasprite(base_sprite);</div>
    129<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;}</div>
    130<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160; </div>
    131<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<span class="preprocessor">#endif</span></div>
    132</div><!-- fragment --></div><!-- contents -->
    133</div><!-- doc-content -->
    134<div class="ttc" id="aasm_2gbz80_2types_8h_html_ab27e9918b538ce9d8ca692479b375b6a"><div class="ttname"><a href="asm_2gbz80_2types_8h.html#ab27e9918b538ce9d8ca692479b375b6a">UINT8</a></div><div class="ttdeci">unsigned char UINT8</div><div class="ttdef"><b>Definition:</b> types.h:46</div></div>
    135<div class="ttc" id="astdint_8h_html_aba7bc1797add20fe3efdf37ced1182c5"><div class="ttname"><a href="stdint_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a></div><div class="ttdeci">unsigned char uint8_t</div><div class="ttdef"><b>Definition:</b> stdint.h:51</div></div>
    136<div class="ttc" id="astdint_8h_html_aef44329758059c91c76d334e8fc09700"><div class="ttname"><a href="stdint_8h.html#aef44329758059c91c76d334e8fc09700">int8_t</a></div><div class="ttdeci">signed char int8_t</div><div class="ttdef"><b>Definition:</b> stdint.h:43</div></div>
    137<div class="ttc" id="astructmetasprite__t_html"><div class="ttname"><a href="structmetasprite__t.html">metasprite_t</a></div><div class="ttdef"><b>Definition:</b> metasprites.h:87</div></div>
    138<div class="ttc" id="asms_2hardware_8h_html"><div class="ttname"><a href="sms_2hardware_8h.html">hardware.h</a></div></div>
    139<div class="ttc" id="astructmetasprite__t_html_a2c3fea1f6b3354352823320c69a3e4bb"><div class="ttname"><a href="structmetasprite__t.html#a2c3fea1f6b3354352823320c69a3e4bb">metasprite_t::dy</a></div><div class="ttdeci">int8_t dy</div><div class="ttdef"><b>Definition:</b> metasprites.h:88</div></div>
    140<div class="ttc" id="aasm_2z80_2types_8h_html_aa19670cfef9fe1cc31f28fafb0e1000a"><div class="ttname"><a href="asm_2z80_2types_8h.html#aa19670cfef9fe1cc31f28fafb0e1000a">Z88DK_CALLEE</a></div><div class="ttdeci">#define Z88DK_CALLEE</div><div class="ttdef"><b>Definition:</b> types.h:42</div></div>
    141<div class="ttc" id="agb_2metasprites_8h_html_a345fa52509387bd18a4092178a18286f"><div class="ttname"><a href="gb_2metasprites_8h.html#a345fa52509387bd18a4092178a18286f">__current_base_tile</a></div><div class="ttdeci">uint8_t __current_base_tile</div></div>
    142<div class="ttc" id="astructmetasprite__t_html_a67d2a6fb62059da39b54e975c4fbb324"><div class="ttname"><a href="structmetasprite__t.html#a67d2a6fb62059da39b54e975c4fbb324">metasprite_t::dx</a></div><div class="ttdeci">int8_t dx</div><div class="ttdef"><b>Definition:</b> metasprites.h:88</div></div>
    143<div class="ttc" id="agb_2metasprites_8h_html_a77475e913bf0a19df28bdbf9d1cf392b"><div class="ttname"><a href="gb_2metasprites_8h.html#a77475e913bf0a19df28bdbf9d1cf392b">move_metasprite</a></div><div class="ttdeci">uint8_t move_metasprite(const metasprite_t *metasprite, uint8_t base_tile, uint8_t base_sprite, uint8_t x, uint8_t y)</div><div class="ttdef"><b>Definition:</b> metasprites.h:137</div></div>
    144<div class="ttc" id="agb_2metasprites_8h_html_af8de5a888d65448b9d34027a0e1ce906"><div class="ttname"><a href="gb_2metasprites_8h.html#af8de5a888d65448b9d34027a0e1ce906">hide_metasprite</a></div><div class="ttdeci">void hide_metasprite(const metasprite_t *metasprite, uint8_t base_sprite)</div><div class="ttdef"><b>Definition:</b> metasprites.h:240</div></div>
    145<div class="ttc" id="astdint_8h_html"><div class="ttname"><a href="stdint_8h.html">stdint.h</a></div></div>
    146<div class="ttc" id="agb_2metasprites_8h_html_a77bb622fa362f2e04be1bafaa099a709"><div class="ttname"><a href="gb_2metasprites_8h.html#a77bb622fa362f2e04be1bafaa099a709">hide_sprites_range</a></div><div class="ttdeci">void hide_sprites_range(UINT8 from, UINT8 to) OLDCALL PRESERVES_REGS(b</div></div>
    147<div class="ttc" id="agb_2metasprites_8h_html_aba6401cc8173158a9f37ee22094c03d3"><div class="ttname"><a href="gb_2metasprites_8h.html#aba6401cc8173158a9f37ee22094c03d3">metasprite_t</a></div><div class="ttdeci">struct metasprite_t metasprite_t</div></div>
    148<div class="ttc" id="aasm_2z80_2types_8h_html_af45e54cf59a5202abc9125c07b64abf1"><div class="ttname"><a href="asm_2z80_2types_8h.html#af45e54cf59a5202abc9125c07b64abf1">Z88DK_FASTCALL</a></div><div class="ttdeci">#define Z88DK_FASTCALL</div><div class="ttdef"><b>Definition:</b> types.h:43</div></div>
    149<div class="ttc" id="asms_2metasprites_8h_html_af279c752a3b15c4bd5c67f54b92e553f"><div class="ttname"><a href="sms_2metasprites_8h.html#af279c752a3b15c4bd5c67f54b92e553f">iyl</a></div><div class="ttdeci">static uint8_t iyl</div><div class="ttdef"><b>Definition:</b> metasprites.h:67</div></div>
    150<div class="ttc" id="agb_2metasprites_8h_html_aae51f066cc5436457f62351847bfc64b"><div class="ttname"><a href="gb_2metasprites_8h.html#aae51f066cc5436457f62351847bfc64b">__current_metasprite</a></div><div class="ttdeci">const void * __current_metasprite</div></div>
    151<div class="ttc" id="astructmetasprite__t_html_ad68b2f80c08f2f7fc603c56af2e75a6f"><div class="ttname"><a href="structmetasprite__t.html#ad68b2f80c08f2f7fc603c56af2e75a6f">metasprite_t::dtile</a></div><div class="ttdeci">uint8_t dtile</div><div class="ttdef"><b>Definition:</b> metasprites.h:89</div></div>
    152<div class="ttc" id="aasm_2types_8h_html_acb825e83a33fcc06482c59b4ab2cf961"><div class="ttname"><a href="asm_2types_8h.html#acb825e83a33fcc06482c59b4ab2cf961">PRESERVES_REGS</a></div><div class="ttdeci">#define PRESERVES_REGS(...)</div><div class="ttdef"><b>Definition:</b> types.h:29</div></div>
    153<div class="ttc" id="asms_8h_html_aade844cba18122ad48cb2f92b1c87ab0"><div class="ttname"><a href="sms_8h.html#aade844cba18122ad48cb2f92b1c87ab0">iyh</a></div><div class="ttdeci">void iyh</div><div class="ttdef"><b>Definition:</b> sms.h:86</div></div>
    154<div class="ttc" id="agb_2metasprites_8h_html_a4bfe4d95031b67951cf6bc342110db39"><div class="ttname"><a href="gb_2metasprites_8h.html#a4bfe4d95031b67951cf6bc342110db39">__render_shadow_OAM</a></div><div class="ttdeci">uint8_t __render_shadow_OAM</div></div>
    155<!-- HTML footer for doxygen 1.8.14-->
    156<!-- start footer part -->
    157<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
    158</div>
    159</body>
    160</html>