Skip to content

Commit

Permalink
add static
Browse files Browse the repository at this point in the history
  • Loading branch information
toxieainc committed Dec 22, 2024
1 parent 3f10196 commit 0cec539
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions src/libpinmame/libpinmame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,29 @@ PINMAME_SOUND_MODE g_fSoundMode = PINMAME_SOUND_MODE_DEFAULT;
char g_szGameName[256] = {0}; //!! not set yet
}

int _isRunning = 0;
int _timeToQuit = 0;
PinmameConfig* _p_Config = nullptr;
std::thread* _p_gameThread = nullptr;
void* _p_userData = nullptr;
static int _isRunning = 0;
static int _timeToQuit = 0;
static PinmameConfig* _p_Config = nullptr;
static std::thread* _p_gameThread = nullptr;
static void* _p_userData = nullptr;

int _mechInit[MECH_MAXMECH];
PinmameMechInfo _mechInfo[MECH_MAXMECH];
static int _mechInit[MECH_MAXMECH];
static PinmameMechInfo _mechInfo[MECH_MAXMECH];

PinmameAudioInfo _audioInfo;
float _audioData[PINMAME_ACCUMULATOR_SAMPLES * 2];
static PinmameAudioInfo _audioInfo;
static float _audioData[PINMAME_ACCUMULATOR_SAMPLES * 2];

int _nvramInit = 0;
uint8_t _nvram[CORE_MAXNVRAM];
PinmameNVRAMState _nvramState[CORE_MAXNVRAM];
static int _nvramInit = 0;
static uint8_t _nvram[CORE_MAXNVRAM];
static PinmameNVRAMState _nvramState[CORE_MAXNVRAM];

typedef struct {
PinmameDisplayLayout layout;
void* pData;
int size;
} PinmameDisplay;

std::vector<PinmameDisplay*> _displays;
static std::vector<PinmameDisplay*> _displays;

static const PinmameKeyboardInfo _keyboardInfo[] = {
{ "A", PINMAME_KEYCODE_A, KEYCODE_A },
Expand Down Expand Up @@ -235,8 +235,8 @@ int GetDisplayCount()

GetDisplayCount(core_gameData->lcdLayout, &index, &hasDMDOrVideo);

if (!hasDMDOrVideo)
index += 1;
if (!hasDMDOrVideo)
index += 1;

return index;
}
Expand Down Expand Up @@ -1075,8 +1075,8 @@ PINMAMEAPI int PinmameGetSolenoid(const int solNo)
if (!_isRunning)
return 0;

if (options.usemodsol & (CORE_MODOUT_FORCE_ON | CORE_MODOUT_ENABLE_PHYSOUT_SOLENOIDS | CORE_MODOUT_ENABLE_MODSOL))
core_update_pwm_outputs(CORE_MODOUT_SOL0 + solNo - 1, 1);
if (options.usemodsol & (CORE_MODOUT_FORCE_ON | CORE_MODOUT_ENABLE_PHYSOUT_SOLENOIDS | CORE_MODOUT_ENABLE_MODSOL))
core_update_pwm_outputs(CORE_MODOUT_SOL0 + solNo - 1, 1);

return vp_getSolenoid(solNo);
}
Expand All @@ -1090,7 +1090,7 @@ PINMAMEAPI int PinmameGetChangedSolenoids(PinmameSolenoidState* const p_changedS
if (!_isRunning)
return -1;

core_update_pwm_solenoids();
core_update_pwm_solenoids();

vp_tChgSols chgSols;
const int count = vp_getChangedSolenoids(chgSols);
Expand All @@ -1117,8 +1117,8 @@ PINMAMEAPI int PinmameGetLamp(const int lampNo)
if (!_isRunning)
return 0;

if (options.usemodsol & (CORE_MODOUT_FORCE_ON | CORE_MODOUT_ENABLE_PHYSOUT_LAMPS))
core_update_pwm_outputs(CORE_MODOUT_LAMP0 + lampNo - 1, 1);
if (options.usemodsol & (CORE_MODOUT_FORCE_ON | CORE_MODOUT_ENABLE_PHYSOUT_LAMPS))
core_update_pwm_outputs(CORE_MODOUT_LAMP0 + lampNo - 1, 1);

return vp_getLamp(lampNo);
}
Expand All @@ -1132,7 +1132,7 @@ PINMAMEAPI int PinmameGetChangedLamps(PinmameLampState* const p_changedStates)
if (!_isRunning)
return -1;

core_update_pwm_lamps();
core_update_pwm_lamps();

vp_tChgLamps chgLamps;
const int count = vp_getChangedLamps(chgLamps);
Expand All @@ -1158,9 +1158,9 @@ PINMAMEAPI int PinmameGetGI(const int giNo)
{
if (!_isRunning)
return 0;
if (options.usemodsol & (CORE_MODOUT_FORCE_ON | CORE_MODOUT_ENABLE_PHYSOUT_GI))
core_update_pwm_outputs(CORE_MODOUT_GI0 + giNo - 1, 1);

if (options.usemodsol & (CORE_MODOUT_FORCE_ON | CORE_MODOUT_ENABLE_PHYSOUT_GI))
core_update_pwm_outputs(CORE_MODOUT_GI0 + giNo - 1, 1);

return vp_getGI(giNo);
}
Expand All @@ -1174,7 +1174,7 @@ PINMAMEAPI int PinmameGetChangedGIs(PinmameGIState* const p_changedStates)
if (!_isRunning)
return -1;

core_update_pwm_gis();
core_update_pwm_gis();

vp_tChgGIs chgGIs;
const int count = vp_getChangedGI(chgGIs);
Expand All @@ -1201,7 +1201,7 @@ PINMAMEAPI int PinmameGetChangedLEDs(const uint64_t mask, const uint64_t mask2,
if (!_isRunning)
return -1;

core_update_pwm_segments();
core_update_pwm_segments();

vp_tChgLED chgLEDs;
const int count = vp_getChangedLEDs(chgLEDs, mask, mask2);
Expand Down

0 comments on commit 0cec539

Please sign in to comment.