MCPcopy Create free account
hub / github.com/TASEmulators/fceux / ReadZapper

Function ReadZapper

src/input/shadow.cpp:97–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95
96
97static uint8 ReadZapper(int w, uint8 ret)
98{
99 if(w)
100 {
101 ret&=~0x18;
102 if(ZD.bogo)
103 ret|=0x10;
104 if(CheckColor())
105 ret|=0x8;
106 }
107 else
108 {
109 //printf("Kayo: %d\n",ZD.zap_readbit);
110 ret&=~2;
111 //if(ZD.zap_readbit==4) ret|=ZD.mzb&2;
112 ret|=(ret&1)<<1;
113 //ZD.zap_readbit++;
114 }
115 return ret;
116}
117
118static void DrawZapper(uint8 *buf, int arg)
119{

Callers

nothing calls this directly

Calls 1

CheckColorFunction · 0.70

Tested by

no test coverage detected