mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
mark all local variables as static
This commit is contained in:
@@ -23,18 +23,18 @@
|
||||
#define M_SQRT1_2 0.70710678118654752440
|
||||
#endif
|
||||
|
||||
int olddelay = -1;
|
||||
unsigned int oldfreq = 0;
|
||||
unsigned int dlbuflen;
|
||||
int cyc_pos;
|
||||
float l_fwr, r_fwr, lpr_fwr, lmr_fwr;
|
||||
std::vector<float> fwrbuf_l, fwrbuf_r;
|
||||
float adapt_l_gain, adapt_r_gain, adapt_lpr_gain, adapt_lmr_gain;
|
||||
std::vector<float> lf, rf, lr, rr, cf, cr;
|
||||
float LFE_buf[256];
|
||||
unsigned int lfe_pos;
|
||||
float *filter_coefs_lfe;
|
||||
unsigned int len125;
|
||||
static int olddelay = -1;
|
||||
static unsigned int oldfreq = 0;
|
||||
static unsigned int dlbuflen;
|
||||
static int cyc_pos;
|
||||
static float l_fwr, r_fwr, lpr_fwr, lmr_fwr;
|
||||
static std::vector<float> fwrbuf_l, fwrbuf_r;
|
||||
static float adapt_l_gain, adapt_r_gain, adapt_lpr_gain, adapt_lmr_gain;
|
||||
static std::vector<float> lf, rf, lr, rr, cf, cr;
|
||||
static float LFE_buf[256];
|
||||
static unsigned int lfe_pos;
|
||||
static float *filter_coefs_lfe;
|
||||
static unsigned int len125;
|
||||
|
||||
template<class T,class _ftype_t> static _ftype_t dotproduct(int count,const T *buf,const _ftype_t *coefficients)
|
||||
{
|
||||
|
||||
@@ -18,9 +18,9 @@ namespace ActionReplay
|
||||
{
|
||||
|
||||
// Alphanumeric filter for text<->bin conversion
|
||||
const char *filter = "0123456789ABCDEFGHJKMNPQRTUVWXYZILOS";
|
||||
static const char *filter = "0123456789ABCDEFGHJKMNPQRTUVWXYZILOS";
|
||||
|
||||
u32 genseeds[0x20];
|
||||
static u32 genseeds[0x20];
|
||||
|
||||
const u8 gentable0[0x38] = {
|
||||
0x39, 0x31, 0x29, 0x21, 0x19, 0x11, 0x09, 0x01,
|
||||
|
||||
@@ -66,9 +66,9 @@ namespace Core
|
||||
{
|
||||
|
||||
// Declarations and definitions
|
||||
Common::Timer Timer;
|
||||
volatile u32 DrawnFrame = 0;
|
||||
u32 DrawnVideo = 0;
|
||||
static Common::Timer Timer;
|
||||
static volatile u32 DrawnFrame = 0;
|
||||
static u32 DrawnVideo = 0;
|
||||
|
||||
// Function forwarding
|
||||
const char *Callback_ISOName(void);
|
||||
@@ -77,12 +77,12 @@ void Callback_WiimoteInterruptChannel(int _number, u16 _channelID, const void* _
|
||||
// Function declarations
|
||||
void EmuThread();
|
||||
|
||||
bool g_bStopping = false;
|
||||
bool g_bHwInit = false;
|
||||
bool g_bStarted = false;
|
||||
void *g_pWindowHandle = nullptr;
|
||||
std::string g_stateFileName;
|
||||
std::thread g_EmuThread;
|
||||
static bool g_bStopping = false;
|
||||
static bool g_bHwInit = false;
|
||||
static bool g_bStarted = false;
|
||||
static void *g_pWindowHandle = nullptr;
|
||||
static std::string g_stateFileName;
|
||||
static std::thread g_EmuThread;
|
||||
static StoppedCallbackFunc s_onStoppedCb = nullptr;
|
||||
|
||||
static std::thread g_cpu_thread;
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
|
||||
// TODO: ugly, remove
|
||||
extern bool g_aspect_wide;
|
||||
|
||||
namespace Core
|
||||
{
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ struct EventType
|
||||
std::string name;
|
||||
};
|
||||
|
||||
std::vector<EventType> event_types;
|
||||
static std::vector<EventType> event_types;
|
||||
|
||||
struct BaseEvent
|
||||
{
|
||||
@@ -41,26 +41,26 @@ typedef LinkedListItem<BaseEvent> Event;
|
||||
// STATE_TO_SAVE
|
||||
static Event *first;
|
||||
static std::mutex tsWriteLock;
|
||||
Common::FifoQueue<BaseEvent, false> tsQueue;
|
||||
static Common::FifoQueue<BaseEvent, false> tsQueue;
|
||||
|
||||
// event pools
|
||||
Event *eventPool = nullptr;
|
||||
static Event *eventPool = nullptr;
|
||||
|
||||
int slicelength;
|
||||
int maxSliceLength = MAX_SLICE_LENGTH;
|
||||
static int maxSliceLength = MAX_SLICE_LENGTH;
|
||||
|
||||
s64 globalTimer;
|
||||
s64 idledCycles;
|
||||
static s64 globalTimer;
|
||||
static s64 idledCycles;
|
||||
|
||||
u32 fakeDecStartValue;
|
||||
u64 fakeDecStartTicks;
|
||||
u64 fakeTBStartValue;
|
||||
u64 fakeTBStartTicks;
|
||||
static u32 fakeDecStartValue;
|
||||
static u64 fakeDecStartTicks;
|
||||
static u64 fakeTBStartValue;
|
||||
static u64 fakeTBStartTicks;
|
||||
|
||||
int ev_lost;
|
||||
static int ev_lost;
|
||||
|
||||
|
||||
void (*advanceCallback)(int cyclesExecuted) = nullptr;
|
||||
static void (*advanceCallback)(int cyclesExecuted) = nullptr;
|
||||
|
||||
static Event* GetNewEvent()
|
||||
{
|
||||
|
||||
@@ -38,12 +38,12 @@
|
||||
|
||||
SDSP g_dsp;
|
||||
DSPBreakpoints dsp_breakpoints;
|
||||
DSPCoreState core_state = DSPCORE_STOP;
|
||||
static DSPCoreState core_state = DSPCORE_STOP;
|
||||
u16 cyclesLeft = 0;
|
||||
bool init_hax = false;
|
||||
DSPEmitter *dspjit = nullptr;
|
||||
std::unique_ptr<DSPCaptureLogger> g_dsp_cap;
|
||||
Common::Event step_event;
|
||||
static Common::Event step_event;
|
||||
|
||||
// Returns false if the hash fails and the user hits "Yes"
|
||||
static bool VerifyRoms()
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
namespace DSPInterpreter {
|
||||
|
||||
volatile u32 gdsp_running;
|
||||
static volatile u32 gdsp_running;
|
||||
|
||||
// NOTE: These have nothing to do with g_dsp.r.cr !
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ bool GeckoCode::Compare(GeckoCode compare) const
|
||||
|
||||
static bool code_handler_installed = false;
|
||||
// the currently active codes
|
||||
std::vector<GeckoCode> active_codes;
|
||||
static std::vector<GeckoCode> active_codes;
|
||||
static std::mutex active_codes_lock;
|
||||
|
||||
void SetActiveCodes(const std::vector<GeckoCode>& gcodes)
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
namespace HLE_Misc
|
||||
{
|
||||
|
||||
std::string args;
|
||||
u32 argsPtr;
|
||||
static std::string args;
|
||||
static u32 argsPtr;
|
||||
|
||||
// If you just want to kill a function, one of the three following are usually appropriate.
|
||||
// According to the PPC ABI, the return value is always in r3.
|
||||
|
||||
@@ -147,7 +147,7 @@ static void GenerateAudioInterrupt();
|
||||
static void UpdateInterrupts();
|
||||
static void IncreaseSampleCount(const u32 _uAmount);
|
||||
static u64 GetAIPeriod();
|
||||
int et_AI;
|
||||
static int et_AI;
|
||||
|
||||
void Init()
|
||||
{
|
||||
|
||||
@@ -175,7 +175,7 @@ static ARAM_Info g_ARAM_Info;
|
||||
static u16 g_AR_MODE;
|
||||
static u16 g_AR_REFRESH;
|
||||
|
||||
DSPEmulator *dsp_emulator;
|
||||
static DSPEmulator *dsp_emulator;
|
||||
|
||||
static int dsp_slice = 0;
|
||||
static bool dsp_is_lle = false;
|
||||
@@ -205,7 +205,7 @@ void WriteARAM(u8 _iValue, u32 _iAddress);
|
||||
bool Update_DSP_ReadRegister();
|
||||
void Update_DSP_WriteRegister();
|
||||
|
||||
int et_GenerateDSPInterrupt;
|
||||
static int et_GenerateDSPInterrupt;
|
||||
|
||||
static void GenerateDSPInterrupt_Wrapper(u64 userdata, int cyclesLate)
|
||||
{
|
||||
|
||||
@@ -37,8 +37,8 @@ DSPLLE::DSPLLE()
|
||||
m_cycle_count = 0;
|
||||
}
|
||||
|
||||
Common::Event dspEvent;
|
||||
Common::Event ppcEvent;
|
||||
static Common::Event dspEvent;
|
||||
static Common::Event ppcEvent;
|
||||
|
||||
void DSPLLE::DoState(PointerWrap &p)
|
||||
{
|
||||
|
||||
@@ -20,11 +20,11 @@ namespace DSPSymbols
|
||||
|
||||
DSPSymbolDB g_dsp_symbol_db;
|
||||
|
||||
std::map<u16, int> addr_to_line;
|
||||
std::map<int, u16> line_to_addr;
|
||||
std::map<int, const char *> line_to_symbol;
|
||||
std::vector<std::string> lines;
|
||||
int line_counter = 0;
|
||||
static std::map<u16, int> addr_to_line;
|
||||
static std::map<int, u16> line_to_addr;
|
||||
static std::map<int, const char *> line_to_symbol;
|
||||
static std::vector<std::string> lines;
|
||||
static int line_counter = 0;
|
||||
|
||||
int Addr2Line(u16 address) // -1 for not found
|
||||
{
|
||||
|
||||
@@ -206,11 +206,11 @@ static u32 CurrentStart;
|
||||
static u32 LoopLength;
|
||||
static u32 CurrentLength;
|
||||
|
||||
u32 g_ErrorCode = 0;
|
||||
bool g_bDiscInside = false;
|
||||
static u32 g_ErrorCode = 0;
|
||||
static bool g_bDiscInside = false;
|
||||
bool g_bStream = false;
|
||||
int tc = 0;
|
||||
int dtk = 0;
|
||||
static int tc = 0;
|
||||
static int dtk = 0;
|
||||
|
||||
static u64 g_last_read_offset;
|
||||
static u64 g_last_read_time;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace ExpansionInterface
|
||||
|
||||
static int changeDevice;
|
||||
|
||||
CEXIChannel *g_Channels[MAX_EXI_CHANNELS];
|
||||
static CEXIChannel *g_Channels[MAX_EXI_CHANNELS];
|
||||
void Init()
|
||||
{
|
||||
initSRAM();
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "DiscIO/Volume.h"
|
||||
|
||||
const int NO_INDEX = -1;
|
||||
const char *MC_HDR = "MC_SYSTEM_AREA";
|
||||
static const char *MC_HDR = "MC_SYSTEM_AREA";
|
||||
int GCMemcardDirectory::LoadGCI(std::string fileName, int region)
|
||||
{
|
||||
File::IOFile gcifile(fileName, "rb");
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Memory
|
||||
/* Enable the Translation Lookaside Buffer functions. TLBHack = 1 in Dolphin.ini or a
|
||||
<GameID>.ini file will set this to true */
|
||||
bool bFakeVMEM = false;
|
||||
bool bMMU = false;
|
||||
static bool bMMU = false;
|
||||
// ==============
|
||||
|
||||
|
||||
@@ -57,11 +57,11 @@ bool bMMU = false;
|
||||
u8* base = nullptr;
|
||||
|
||||
// The MemArena class
|
||||
MemArena g_arena;
|
||||
static MemArena g_arena;
|
||||
// ==============
|
||||
|
||||
// STATE_TO_SAVE
|
||||
bool m_IsInitialized = false; // Save the Init(), Shutdown() state
|
||||
static bool m_IsInitialized = false; // Save the Init(), Shutdown() state
|
||||
// END STATE_TO_SAVE
|
||||
|
||||
// 64-bit: Pointers to low-mem (sub-0x10000000) mirror
|
||||
@@ -74,14 +74,14 @@ u8 *m_pFakeVMEM;
|
||||
|
||||
// 64-bit: Pointers to high-mem mirrors
|
||||
// 32-bit: Same as above
|
||||
u8 *m_pPhysicalRAM;
|
||||
u8 *m_pVirtualCachedRAM;
|
||||
u8 *m_pVirtualUncachedRAM;
|
||||
u8 *m_pPhysicalEXRAM; // wii only
|
||||
u8 *m_pVirtualCachedEXRAM; // wii only
|
||||
u8 *m_pVirtualUncachedEXRAM; // wii only
|
||||
static u8 *m_pPhysicalRAM;
|
||||
static u8 *m_pVirtualCachedRAM;
|
||||
static u8 *m_pVirtualUncachedRAM;
|
||||
static u8 *m_pPhysicalEXRAM; // wii only
|
||||
static u8 *m_pVirtualCachedEXRAM; // wii only
|
||||
static u8 *m_pVirtualUncachedEXRAM; // wii only
|
||||
//u8 *m_pVirtualEFB;
|
||||
u8 *m_pVirtualL1Cache;
|
||||
static u8 *m_pVirtualL1Cache;
|
||||
u8 *m_pVirtualFakeVMEM;
|
||||
|
||||
// MMIO mapping object.
|
||||
|
||||
@@ -46,6 +46,8 @@ extern u8 *m_pRAM;
|
||||
extern u8 *m_pEXRAM;
|
||||
extern u8 *m_pL1Cache;
|
||||
extern u8 *m_pVirtualFakeVMEM;
|
||||
extern u8 *m_pFakeVMEM;
|
||||
extern bool bFakeVMEM;
|
||||
|
||||
enum
|
||||
{
|
||||
|
||||
@@ -43,10 +43,10 @@ u32 Fifo_CPUBase;
|
||||
u32 Fifo_CPUEnd;
|
||||
u32 Fifo_CPUWritePointer;
|
||||
|
||||
u32 m_Fifo_Reset;
|
||||
u32 m_ResetCode;
|
||||
u32 m_FlipperRev;
|
||||
u32 m_Unknown;
|
||||
static u32 m_Fifo_Reset;
|
||||
static u32 m_ResetCode;
|
||||
static u32 m_FlipperRev;
|
||||
static u32 m_Unknown;
|
||||
|
||||
|
||||
// ID and callback for scheduling reset button presses/releases
|
||||
|
||||
@@ -82,7 +82,7 @@ IPC_HLE_PERIOD: For the Wiimote this is the call schedule:
|
||||
namespace SystemTimers
|
||||
{
|
||||
|
||||
u32 CPU_CORE_CLOCK = 486000000u; // 486 mhz (its not 485, stop bugging me!)
|
||||
static u32 CPU_CORE_CLOCK = 486000000u; // 486 mhz (its not 485, stop bugging me!)
|
||||
|
||||
/*
|
||||
GameCube MHz
|
||||
@@ -109,19 +109,19 @@ enum
|
||||
TIMER_RATIO = 12
|
||||
};
|
||||
|
||||
int et_Dec;
|
||||
int et_VI;
|
||||
int et_SI;
|
||||
int et_CP;
|
||||
int et_AudioDMA;
|
||||
int et_DSP;
|
||||
int et_IPC_HLE;
|
||||
int et_PatchEngine; // PatchEngine updates every 1/60th of a second by default
|
||||
int et_Throttle;
|
||||
static int et_Dec;
|
||||
static int et_VI;
|
||||
static int et_SI;
|
||||
static int et_CP;
|
||||
static int et_AudioDMA;
|
||||
static int et_DSP;
|
||||
static int et_IPC_HLE;
|
||||
static int et_PatchEngine; // PatchEngine updates every 1/60th of a second by default
|
||||
static int et_Throttle;
|
||||
|
||||
// These are badly educated guesses
|
||||
// Feel free to experiment. Set these in Init below.
|
||||
int
|
||||
static int
|
||||
// This is a fixed value, don't change it
|
||||
AUDIO_DMA_PERIOD,
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user