mirror of
https://github.com/italicsjenga/gba.git
synced 2024-12-24 11:11:31 +11:00
Merge branch 'lokathor' of https://github.com/rust-console/gba into lokathor
This commit is contained in:
commit
2196c15fa9
|
@ -249,16 +249,22 @@ between looping over indexes and then indexing each loop (slow) compared to
|
||||||
using an iterator that just stores an internal pointer and does +1 offset per
|
using an iterator that just stores an internal pointer and does +1 offset per
|
||||||
loop until it reaches the end (fast). The repeated indexing itself can by itself
|
loop until it reaches the end (fast). The repeated indexing itself can by itself
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
be an expensive step. If you've got a slice of data to process, be sure to go
|
be an expensive step. If you've got a slice of data to process, be sure to go
|
||||||
over it with <code>.iter()</code> and <code>.iter_mut()</code> if you can, instead of looping by
|
over it with <code>.iter()</code> and <code>.iter_mut()</code> if you can, instead of looping by
|
||||||
index. This is Rust and all, so probably you were gonna do that anyway, but just
|
index. This is Rust and all, so probably you were gonna do that anyway, but just
|
||||||
a heads up.</p>
|
a heads up.</p>
|
||||||
=======
|
=======
|
||||||
|
=======
|
||||||
|
>>>>>>> 6b631474faca0645ad16822187c230b813ab6793
|
||||||
be an expensive step. If it's like a 3 element array it's no big deal, but if
|
be an expensive step. If it's like a 3 element array it's no big deal, but if
|
||||||
you've got a big slice of data to process, be sure to go over it with <code>.iter()</code>
|
you've got a big slice of data to process, be sure to go over it with <code>.iter()</code>
|
||||||
and <code>.iter_mut()</code> if you can, instead of looping by index. This is Rust and all,
|
and <code>.iter_mut()</code> if you can, instead of looping by index. This is Rust and all,
|
||||||
so probably you were gonna do that anyway, but just a heads up.</p>
|
so probably you were gonna do that anyway, but just a heads up.</p>
|
||||||
|
<<<<<<< HEAD
|
||||||
>>>>>>> object attribute stuff
|
>>>>>>> object attribute stuff
|
||||||
|
=======
|
||||||
|
>>>>>>> 6b631474faca0645ad16822187c230b813ab6793
|
||||||
<a class="header" href="#get-your-tilemap-ready" id="get-your-tilemap-ready"><h2>Get your Tilemap ready</h2></a>
|
<a class="header" href="#get-your-tilemap-ready" id="get-your-tilemap-ready"><h2>Get your Tilemap ready</h2></a>
|
||||||
<p>I believe that at one point I alluded to a tilemap existing. Well, just as the
|
<p>I believe that at one point I alluded to a tilemap existing. Well, just as the
|
||||||
tiles are arranged into charblocks, the data describing what tile to show in
|
tiles are arranged into charblocks, the data describing what tile to show in
|
||||||
|
@ -367,12 +373,16 @@ separate groups of related registers.</p>
|
||||||
the important details that we've been putting off.</p>
|
the important details that we've been putting off.</p>
|
||||||
<ul>
|
<ul>
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
<li>2 bits for the priority of each background (0 being highest). If two
|
<li>2 bits for the priority of each background (0 being highest). If two
|
||||||
backgrounds are set to the same priority the the lower numbered background
|
backgrounds are set to the same priority the the lower numbered background
|
||||||
layer takes prescience.</li>
|
layer takes prescience.</li>
|
||||||
=======
|
=======
|
||||||
<li>2 bits for the priority.</li>
|
<li>2 bits for the priority.</li>
|
||||||
>>>>>>> object attribute stuff
|
>>>>>>> object attribute stuff
|
||||||
|
=======
|
||||||
|
<li>2 bits for the priority.</li>
|
||||||
|
>>>>>>> 6b631474faca0645ad16822187c230b813ab6793
|
||||||
<li>2 bits for "character base block", the charblock that all of the tile indexes
|
<li>2 bits for "character base block", the charblock that all of the tile indexes
|
||||||
for this background are offset from.</li>
|
for this background are offset from.</li>
|
||||||
<li>1 bit for mosaic effect being enabled (we'll get to that below).</li>
|
<li>1 bit for mosaic effect being enabled (we'll get to that below).</li>
|
||||||
|
|
|
@ -1773,16 +1773,22 @@ between looping over indexes and then indexing each loop (slow) compared to
|
||||||
using an iterator that just stores an internal pointer and does +1 offset per
|
using an iterator that just stores an internal pointer and does +1 offset per
|
||||||
loop until it reaches the end (fast). The repeated indexing itself can by itself
|
loop until it reaches the end (fast). The repeated indexing itself can by itself
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
be an expensive step. If you've got a slice of data to process, be sure to go
|
be an expensive step. If you've got a slice of data to process, be sure to go
|
||||||
over it with <code>.iter()</code> and <code>.iter_mut()</code> if you can, instead of looping by
|
over it with <code>.iter()</code> and <code>.iter_mut()</code> if you can, instead of looping by
|
||||||
index. This is Rust and all, so probably you were gonna do that anyway, but just
|
index. This is Rust and all, so probably you were gonna do that anyway, but just
|
||||||
a heads up.</p>
|
a heads up.</p>
|
||||||
=======
|
=======
|
||||||
|
=======
|
||||||
|
>>>>>>> 6b631474faca0645ad16822187c230b813ab6793
|
||||||
be an expensive step. If it's like a 3 element array it's no big deal, but if
|
be an expensive step. If it's like a 3 element array it's no big deal, but if
|
||||||
you've got a big slice of data to process, be sure to go over it with <code>.iter()</code>
|
you've got a big slice of data to process, be sure to go over it with <code>.iter()</code>
|
||||||
and <code>.iter_mut()</code> if you can, instead of looping by index. This is Rust and all,
|
and <code>.iter_mut()</code> if you can, instead of looping by index. This is Rust and all,
|
||||||
so probably you were gonna do that anyway, but just a heads up.</p>
|
so probably you were gonna do that anyway, but just a heads up.</p>
|
||||||
|
<<<<<<< HEAD
|
||||||
>>>>>>> object attribute stuff
|
>>>>>>> object attribute stuff
|
||||||
|
=======
|
||||||
|
>>>>>>> 6b631474faca0645ad16822187c230b813ab6793
|
||||||
<a class="header" href="#get-your-tilemap-ready" id="get-your-tilemap-ready"><h2>Get your Tilemap ready</h2></a>
|
<a class="header" href="#get-your-tilemap-ready" id="get-your-tilemap-ready"><h2>Get your Tilemap ready</h2></a>
|
||||||
<p>I believe that at one point I alluded to a tilemap existing. Well, just as the
|
<p>I believe that at one point I alluded to a tilemap existing. Well, just as the
|
||||||
tiles are arranged into charblocks, the data describing what tile to show in
|
tiles are arranged into charblocks, the data describing what tile to show in
|
||||||
|
@ -1891,12 +1897,16 @@ separate groups of related registers.</p>
|
||||||
the important details that we've been putting off.</p>
|
the important details that we've been putting off.</p>
|
||||||
<ul>
|
<ul>
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
<li>2 bits for the priority of each background (0 being highest). If two
|
<li>2 bits for the priority of each background (0 being highest). If two
|
||||||
backgrounds are set to the same priority the the lower numbered background
|
backgrounds are set to the same priority the the lower numbered background
|
||||||
layer takes prescience.</li>
|
layer takes prescience.</li>
|
||||||
=======
|
=======
|
||||||
<li>2 bits for the priority.</li>
|
<li>2 bits for the priority.</li>
|
||||||
>>>>>>> object attribute stuff
|
>>>>>>> object attribute stuff
|
||||||
|
=======
|
||||||
|
<li>2 bits for the priority.</li>
|
||||||
|
>>>>>>> 6b631474faca0645ad16822187c230b813ab6793
|
||||||
<li>2 bits for "character base block", the charblock that all of the tile indexes
|
<li>2 bits for "character base block", the charblock that all of the tile indexes
|
||||||
for this background are offset from.</li>
|
for this background are offset from.</li>
|
||||||
<li>1 bit for mosaic effect being enabled (we'll get to that below).</li>
|
<li>1 bit for mosaic effect being enabled (we'll get to that below).</li>
|
||||||
|
@ -1963,12 +1973,15 @@ target pixel. You can't change the target pixel on a block by block basis.</p>
|
||||||
For this section we'll focus on the non-affine elements, and then we'll do all
|
For this section we'll focus on the non-affine elements, and then we'll do all
|
||||||
the affine stuff in a later chapter.</p>
|
the affine stuff in a later chapter.</p>
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
<p>TODO: tio afero ke mi diris</p>
|
<p>TODO: tio afero ke mi diris</p>
|
||||||
<a class="header" href="#objects-vs-sprites" id="objects-vs-sprites"><h2>Objects vs Sprites</h2></a>
|
<a class="header" href="#objects-vs-sprites" id="objects-vs-sprites"><h2>Objects vs Sprites</h2></a>
|
||||||
<a class="header" href="#ready-the-palette" id="ready-the-palette"><h2>Ready the Palette</h2></a>
|
<a class="header" href="#ready-the-palette" id="ready-the-palette"><h2>Ready the Palette</h2></a>
|
||||||
<a class="header" href="#ready-the-tiles" id="ready-the-tiles"><h2>Ready the Tiles</h2></a>
|
<a class="header" href="#ready-the-tiles" id="ready-the-tiles"><h2>Ready the Tiles</h2></a>
|
||||||
<a class="header" href="#set-the-object-attributes" id="set-the-object-attributes"><h2>Set the Object Attributes</h2></a>
|
<a class="header" href="#set-the-object-attributes" id="set-the-object-attributes"><h2>Set the Object Attributes</h2></a>
|
||||||
=======
|
=======
|
||||||
|
=======
|
||||||
|
>>>>>>> 6b631474faca0645ad16822187c230b813ab6793
|
||||||
<a class="header" href="#objects-vs-sprites" id="objects-vs-sprites"><h2>Objects vs Sprites</h2></a>
|
<a class="header" href="#objects-vs-sprites" id="objects-vs-sprites"><h2>Objects vs Sprites</h2></a>
|
||||||
<p>As <a href="https://www.coranac.com/tonc/text/regobj.htm">TONC</a> helpfully reminds us
|
<p>As <a href="https://www.coranac.com/tonc/text/regobj.htm">TONC</a> helpfully reminds us
|
||||||
(and then proceeds to not follow its own advice), we should always try to think
|
(and then proceeds to not follow its own advice), we should always try to think
|
||||||
|
@ -2334,7 +2347,10 @@ impl ObjectAttributes {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#}</code></pre></pre>
|
#}</code></pre></pre>
|
||||||
|
<<<<<<< HEAD
|
||||||
>>>>>>> object attribute stuff
|
>>>>>>> object attribute stuff
|
||||||
|
=======
|
||||||
|
>>>>>>> 6b631474faca0645ad16822187c230b813ab6793
|
||||||
<a class="header" href="#gba-rng" id="gba-rng"><h1>GBA RNG</h1></a>
|
<a class="header" href="#gba-rng" id="gba-rng"><h1>GBA RNG</h1></a>
|
||||||
<p>TODO</p>
|
<p>TODO</p>
|
||||||
<a class="header" href="#memory_game" id="memory_game"><h1>memory_game</h1></a>
|
<a class="header" href="#memory_game" id="memory_game"><h1>memory_game</h1></a>
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue