mirror of
https://github.com/dborth/fceugx.git
synced 2025-01-25 06:51:10 +01:00
revert upstream change to zapper code - fixes zapper
This commit is contained in:
parent
330c9f46a5
commit
e2a4c7425a
@ -77,10 +77,11 @@ static void ZapperFrapper(int w, uint8 *bg, uint8 *spr, uint32 linets, int final
|
|||||||
endo:
|
endo:
|
||||||
ZD[w].zappo=final;
|
ZD[w].zappo=final;
|
||||||
|
|
||||||
|
#ifndef GEKKO
|
||||||
//if this was a miss, clear out the hit
|
//if this was a miss, clear out the hit
|
||||||
if(ZD[w].mzb&2)
|
if(ZD[w].mzb&2)
|
||||||
ZD[w].zaphit=0;
|
ZD[w].zaphit=0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static INLINE int CheckColor(int w)
|
static INLINE int CheckColor(int w)
|
||||||
@ -116,10 +117,15 @@ static INLINE int CheckColor(int w)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef GEKKO
|
||||||
|
if((ZD[w].zaphit+100)>=(timestampbase+timestamp)
|
||||||
|
&& !(ZD[w].mzb&2)) return 0;
|
||||||
|
#else
|
||||||
if((ZD[w].zaphit+100)>=(timestampbase+timestamp))
|
if((ZD[w].zaphit+100)>=(timestampbase+timestamp))
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -168,7 +174,16 @@ static void DrawZapper(int w, uint8 *buf, int arg)
|
|||||||
static void UpdateZapper(int w, void *data, int arg)
|
static void UpdateZapper(int w, void *data, int arg)
|
||||||
{
|
{
|
||||||
uint32 *ptr=(uint32 *)data;
|
uint32 *ptr=(uint32 *)data;
|
||||||
|
#ifdef GEKKO
|
||||||
|
if(ZD[w].bogo)
|
||||||
|
ZD[w].bogo--;
|
||||||
|
if(ptr[2]&3 && (!(ZD[w].mzb&3)))
|
||||||
|
ZD[w].bogo=5;
|
||||||
|
|
||||||
|
ZD[w].mzx=ptr[0];
|
||||||
|
ZD[w].mzy=ptr[1];
|
||||||
|
ZD[w].mzb=ptr[2];
|
||||||
|
#else
|
||||||
bool newclicked = (ptr[2]&3)!=0;
|
bool newclicked = (ptr[2]&3)!=0;
|
||||||
bool oldclicked = (ZD[w].lastInput)!=0;
|
bool oldclicked = (ZD[w].lastInput)!=0;
|
||||||
|
|
||||||
@ -187,7 +202,7 @@ static void UpdateZapper(int w, void *data, int arg)
|
|||||||
ZD[w].mzx=ptr[0];
|
ZD[w].mzx=ptr[0];
|
||||||
ZD[w].mzy=ptr[1];
|
ZD[w].mzy=ptr[1];
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void LogZapper(int w, MovieRecord* mr)
|
static void LogZapper(int w, MovieRecord* mr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user