Rename "Real Zapper" to "LCD Compatible Zapper"

Per feedback, "Real Zapper" was renamed to "LCD Compatible Zapper" to better reflect the purpose of this input device.
This commit is contained in:
Jason W. Thompson 2020-07-20 22:28:29 -05:00
parent ca472ee6ae
commit 79d3396d6e
9 changed files with 37 additions and 36 deletions

View File

@ -352,6 +352,7 @@ set(SRC_CORE
${CMAKE_CURRENT_SOURCE_DIR}/input/suborkb.cpp
${CMAKE_CURRENT_SOURCE_DIR}/input/toprider.cpp
${CMAKE_CURRENT_SOURCE_DIR}/input/virtualboy.cpp
${CMAKE_CURRENT_SOURCE_DIR}/input/lcdcompzapper.cpp
${CMAKE_CURRENT_SOURCE_DIR}/input/zapper.cpp
${CMAKE_CURRENT_SOURCE_DIR}/utils/backward.cpp
${CMAKE_CURRENT_SOURCE_DIR}/utils/ConvertUTF.c

View File

@ -438,11 +438,11 @@ static uint32 UpdateVirtualBoyData(int w)
return r;
}
// Holds the button configurations for the "Real" Zapper.
// Holds the button configurations for the LCD Compatible Zapper.
// Two collections of two buttons.
// One for each controller port.
// The defaults shouldn't matter since this is intended to be configured by the user to match their custom hardware.
ButtConfig realzappersc[2][2] = {
ButtConfig lcdcompzappersc[2][2] = {
{
MK(A), MK(B)
},
@ -452,18 +452,18 @@ ButtConfig realzappersc[2][2] = {
};
// buffer to hold the state of the zapper.
static uint32 realzapperbuf[2];
static uint32 lcdcompzapperbuf[2];
// Determines if the zapper trigger is pressed and/or if it's sensing light based on the button config and return
// the result as a two bit value.
static uint32 UpdateRealZapperData(int w)
static uint32 UpdateLCDCompatibleZapperData(int w)
{
uint32 r = 0;
ButtConfig* realzappertsc = realzappersc[w];
ButtConfig* lcdcompzappertsc = lcdcompzappersc[w];
int x;
for (x = 0; x < 2; x++)
if (DTestButton(&realzappertsc[x])) r |= 1 << x;
if (DTestButton(&lcdcompzappertsc[x])) r |= 1 << x;
return r;
}
@ -517,8 +517,8 @@ void FCEUD_UpdateInput()
case SI_VIRTUALBOY:
virtualboybuf[x]=UpdateVirtualBoyData(x);
break;
case SI_REAL_ZAPPER:
realzapperbuf[x] = UpdateRealZapperData(x);
case SI_LCDCOMP_ZAPPER:
lcdcompzapperbuf[x] = UpdateLCDCompatibleZapperData(x);
break;
}
@ -616,8 +616,8 @@ void InitInputPorts(bool fourscore)
case SI_VIRTUALBOY:
InputDPtr=&virtualboybuf[i];
break;
case SI_REAL_ZAPPER:
InputDPtr = &realzapperbuf[i];
case SI_LCDCOMP_ZAPPER:
InputDPtr = &lcdcompzapperbuf[i];
break;
}
FCEUI_SetInput(i,(ESI)InputType[i],InputDPtr,attrib);
@ -870,7 +870,7 @@ CFGSTRUCT InputConfig[]={
AC(fkbmap),
AC(suborkbmap),
AC(virtualboysc),
AC(realzappersc),
AC(lcdcompzappersc),
ENDCFGSTRUCT
};
@ -909,7 +909,7 @@ void InitInputStuff(void)
for (x = 0; x < 2; x++)
for (y = 0; y < 2; y++)
JoyClearBC(&realzappersc[x][y]);
JoyClearBC(&lcdcompzappersc[x][y]);
}
static char *MakeButtString(ButtConfig *bc)
@ -1579,8 +1579,8 @@ INT_PTR CALLBACK InputConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lP
case SI_VIRTUALBOY:
DoTBConfig(hwndDlg, text, "VIRTUALBOYDIALOG", virtualboysc[which], 14);
break;
case SI_REAL_ZAPPER:
DoTBConfig(hwndDlg, text, "REALZAPPERDIALOG", realzappersc[which], 2);
case SI_LCDCOMP_ZAPPER:
DoTBConfig(hwndDlg, text, "LCDCOMPZAPPERDIALOG", lcdcompzappersc[which], 2);
break;
}
}

BIN
src/drivers/win/res.aps Normal file

Binary file not shown.

View File

@ -1102,7 +1102,7 @@ BEGIN
PUSHBUTTON "A", 313,162,19,32,12
END
REALZAPPERDIALOG DIALOGEX 4, 109, 129, 116
LCDCOMPZAPPERDIALOG DIALOGEX 4, 109, 129, 116
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Zapper Configuration"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
@ -2484,7 +2484,7 @@ BEGIN
BEGIN
END
"REALZAPPERDIALOG", DIALOG
"LCDCOMPZAPPERDIALOG", DIALOG
BEGIN
END

View File

@ -39,9 +39,9 @@ enum ESI
SI_SNES = 7,
SI_SNES_MOUSE = 8,
SI_VIRTUALBOY = 9,
SI_REAL_ZAPPER = 10,
SI_LCDCOMP_ZAPPER = 10,
SI_COUNT = SI_REAL_ZAPPER
SI_COUNT = SI_LCDCOMP_ZAPPER
};
inline const char* ESI_Name(ESI esi)
@ -58,7 +58,7 @@ inline const char* ESI_Name(ESI esi)
"SNES Pad",
"SNES Mouse",
"Virtual Boy",
"Real Zapper"
"LCD Zapper (Advance)"
};
if(esi >= SI_NONE && esi <= SI_COUNT)

View File

@ -65,7 +65,7 @@ extern INPUTC *FCEU_InitArkanoid(int w);
extern INPUTC *FCEU_InitMouse(int w);
extern INPUTC *FCEU_InitSNESMouse(int w);
extern INPUTC *FCEU_InitVirtualBoy(int w);
extern INPUTC *FCEU_InitRealZapper(int w);
extern INPUTC *FCEU_InitLCDCompZapper(int w);
extern INPUTCFC *FCEU_InitArkanoidFC(void);
extern INPUTCFC *FCEU_InitSpaceShadow(void);
@ -484,8 +484,8 @@ static void SetInputStuff(int port)
case SI_VIRTUALBOY:
joyports[port].driver=FCEU_InitVirtualBoy(port);
break;
case SI_REAL_ZAPPER:
joyports[port].driver = FCEU_InitRealZapper(port);
case SI_LCDCOMP_ZAPPER:
joyports[port].driver = FCEU_InitLCDCompZapper(port);
break;
case SI_NONE:
case SI_UNSET:

View File

@ -17,32 +17,32 @@
#include "share.h"
static uint32 realZapperStrobe[2];
static uint32 realZapperData[2];
static uint32 lcdCompZapperStrobe[2];
static uint32 lcdCompZapperData[2];
static uint8 ReadRealZapper(int w)
static uint8 ReadLCDCompZapper(int w)
{
return realZapperData[w];
return lcdCompZapperData[w];
}
static void StrobeRealZapper(int w)
static void StrobeLCDCompZapper(int w)
{
realZapperStrobe[w] = 0;
lcdCompZapperStrobe[w] = 0;
}
void UpdateRealZapper(int w, void* data, int arg)
void UpdateLCDCompZapper(int w, void* data, int arg)
{
// In the '(*(uint32*)data)' variable, bit 0 holds the trigger value and bit 1 holds the light sense value.
// Ultimately this needs to be converted from 0000 00lt to 000t l000 where l is the light bit and t
// is the trigger bit.
realZapperData[w] = ((((*(uint32*)data) & 1) << 4) |
lcdCompZapperData[w] = ((((*(uint32*)data) & 1) << 4) |
(((*(uint32*)data) & 2) << 2));
}
static INPUTC RealZapperCtrl = { ReadRealZapper,0,StrobeRealZapper,UpdateRealZapper,0,0 };
static INPUTC LCDCompZapperCtrl = { ReadLCDCompZapper,0,StrobeLCDCompZapper,UpdateLCDCompZapper,0,0 };
INPUTC* FCEU_InitRealZapper(int w)
INPUTC* FCEU_InitLCDCompZapper(int w)
{
realZapperStrobe[w] = realZapperData[w] = 0;
return(&RealZapperCtrl);
lcdCompZapperStrobe[w] = lcdCompZapperData[w] = 0;
return(&LCDCompZapperCtrl);
}

View File

@ -710,7 +710,7 @@
<ClCompile Include="..\src\input\toprider.cpp" />
<ClCompile Include="..\src\input\virtualboy.cpp" />
<ClCompile Include="..\src\input\zapper.cpp" />
<ClCompile Include="..\src\input\realzapper.cpp" />
<ClCompile Include="..\src\input\lcdcompzapper.cpp" />
<ClCompile Include="..\src\boards\emu2413.c" />
<ClCompile Include="..\src\utils\ConvertUTF.c" />
<ClCompile Include="..\src\utils\crc32.cpp" />

View File

@ -1105,7 +1105,7 @@
<ClCompile Include="..\src\input\virtualboy.cpp">
<Filter>input</Filter>
</ClCompile>
<ClCompile Include="..\src\input\realzapper.cpp">
<ClCompile Include="..\src\input\lcdcompzapper.cpp">
<Filter>input</Filter>
</ClCompile>
</ItemGroup>