Fixed a bug I introduced in GPU and made cflash working again
(using the current directory instead of the rom directory, I think it should be ok)
This commit is contained in:
parent
9ba3d19cde
commit
e6491a5e0b
|
@ -1174,14 +1174,15 @@ void sprite2D(GPU * gpu, u16 l, u16 * dst, u8 * prioTab)
|
|||
|
||||
if((aux->attr0&(3<<10))==(3<<10))
|
||||
{
|
||||
u8 * src = (gpu->sprMem) +(aux->attr2&0x3E0)*64 + (aux->attr2&0x1F)*8 + (y<<8);
|
||||
u8 * src = (gpu->sprMem) + (((aux->attr2&0x3E0) * 64 + (aux->attr2&0x1F) * 8 + ( y << 8)) << 1);
|
||||
u16 i;
|
||||
|
||||
if(aux->attr1&(1<<12))
|
||||
{
|
||||
x = sprSize.x -x - 1;
|
||||
for(i = 0; i < lg; ++i, --x, ++sprX)
|
||||
{
|
||||
u8 c = src[x];
|
||||
u8 c = src[x << 1];
|
||||
if((c>>15) && (prioTab[sprX]>=prio))
|
||||
{
|
||||
dst[sprX] = c;
|
||||
|
|
|
@ -355,11 +355,11 @@ int NDS_LoadROM(const char *filename)
|
|||
NDS_Reset();
|
||||
NDS_SetROM(data, mask);
|
||||
|
||||
/* // Will be added later
|
||||
strcpy(szRomPath, dirname((char *) filename));
|
||||
/* I guess any directory can be used
|
||||
* so the current one should be ok */
|
||||
strcpy(szRomPath, ".");
|
||||
cflash_close();
|
||||
cflash_init();
|
||||
*/
|
||||
|
||||
return i;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue