<html>
<body>
<div id="body" style="background-color:#ffffff;" >
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head" style="border-bottom-width:1px;border-bottom-style:solid;" ><td class="headtd" style="padding:0;padding-top:.2em;" colspan="4">Commit in <b><tt>lxdream/src/pvr2</tt></b></td></tr>
<tr><td><tt><a href="#file1">rendsort.c</a></tt></td><td id="added" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ddffdd;" align="right">+19</td><td id="removed" class="headtd2" style="padding-left:.3em;padding-right:.3em; background-color:#ffdddd;" align="right">-3</td><td class="headtd2" style="padding-left:.3em;padding-right:.3em;" nowrap="nowrap">fd82bfba61c4 -> 8ec0f1f990aa</td></tr>
</table>
<pre class="comment" style="white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd;" >
Fix triangle extraction when the tile entry is a triangle but the polygon is
actually a strip (lead to extracting too many triangles)
</pre>
<hr /><a name="file1" /><div class="file" style="border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;" >
<span class="pathname" style="font-family:monospace; float:right;" >lxdream/src/pvr2</span><br />
<div class="fileheader" style="margin-bottom:.5em;" ><big><b>rendsort.c</b></big> <small id="info" style="color: #888888;" >fd82bfba61c4 -> 8ec0f1f990aa</small></div>
<pre class="diff" style="margin:0;" ><small id="info" style="color: #888888;" >--- lxdream/src/pvr2/rendsort.c
+++ lxdream/src/pvr2/rendsort.c
@@ -116,13 +116,29 @@
</small></pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > case 0x0E:
tile_list = (uint32_t *)(pvr2_main_ram + (entry&0x007FFFFF));
break;
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- case 0x08: case 0x09: case 0x0A: case 0x0B:
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ case 0x08: case 0x09:
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > strip_count = ((entry >> 25) & 0x0F)+1;
poly = pvr2_scene.buf_to_poly_map[entry&0x000FFFFF];
while( strip_count > 0 ) {
assert( poly != NULL );
</pre><pre id="removed" class="diff" style="margin:0; background-color:#ffdddd;" >- for( i=0; i+2<poly->vertex_count; i++ ) {
- /* Note: tris + quads can't have sub-polys */
</pre><pre id="added" class="diff" style="margin:0; background-color:#ddffdd;" >+ if( poly->vertex_count != 0 ) {
+ /* Triangle could point to a strip, but we only want
+ * the first one in this case
+ */
+ sort_add_triangle( &triangles[count], poly, 0 );
+ count++;
+ }
+ poly = poly->next;
+ strip_count--;
+ }
+ break;
+ case 0x0A: case 0x0B:
+ strip_count = ((entry >> 25) & 0x0F)+1;
+ poly = pvr2_scene.buf_to_poly_map[entry&0x000FFFFF];
+ while( strip_count > 0 ) {
+ assert( poly != NULL );
+ for( i=0; i+2<poly->vertex_count && i < 2; i++ ) {
+ /* Note: quads can't have sub-polys */
</pre><pre id="context" class="diff" style="margin:0; background-color:#eeeeee;" > sort_add_triangle( &triangles[count], poly, i );
count++;
}
</pre></div>
<center><small>Chaos Theory</small></center>
</div></body></html>