mark all local variables as static

This commit is contained in:
degasus
2014-07-08 15:58:25 +02:00
parent 9560ecdbec
commit 6d3f249dcc
64 changed files with 283 additions and 266 deletions

View File

@ -24,21 +24,21 @@
namespace CommandProcessor
{
int et_UpdateInterrupts;
static int et_UpdateInterrupts;
// TODO(ector): Warn on bbox read/write
// STATE_TO_SAVE
SCPFifoStruct fifo;
UCPStatusReg m_CPStatusReg;
UCPCtrlReg m_CPCtrlReg;
UCPClearReg m_CPClearReg;
static UCPStatusReg m_CPStatusReg;
static UCPCtrlReg m_CPCtrlReg;
static UCPClearReg m_CPClearReg;
u16 m_bboxleft;
u16 m_bboxtop;
u16 m_bboxright;
u16 m_bboxbottom;
u16 m_tokenReg;
static u16 m_bboxleft;
static u16 m_bboxtop;
static u16 m_bboxright;
static u16 m_bboxbottom;
static u16 m_tokenReg;
volatile bool isPossibleWaitingSetDrawDone = false;
volatile bool interruptSet= false;

View File

@ -32,14 +32,14 @@ namespace DriverDetails
const u32 m_os = OS_ALL | OS_LINUX;
#endif
Vendor m_vendor = VENDOR_UNKNOWN;
Driver m_driver = DRIVER_UNKNOWN;
s32 m_family = 0;
double m_version = 0.0;
static Vendor m_vendor = VENDOR_UNKNOWN;
static Driver m_driver = DRIVER_UNKNOWN;
static s32 m_family = 0;
static double m_version = 0.0;
// This is a list of all known bugs for each vendor
// We use this to check if the device and driver has a issue
BugInfo m_known_bugs[] = {
static BugInfo m_known_bugs[] = {
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_NODYNUBOACCESS, 14.0, -1.0, true},
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_BROKENCENTROID, 14.0, 46.0, true},
{OS_ALL, VENDOR_QUALCOMM, DRIVER_QUALCOMM_3XX, -1, BUG_BROKENINFOLOG, -1.0, 46.0, true},
@ -59,7 +59,7 @@ namespace DriverDetails
{OS_LINUX, VENDOR_NVIDIA, DRIVER_NVIDIA, -1, BUG_BROKENUNSYNCMAPPING, -1.0, -1.0, true},
};
std::map<Bug, BugInfo> m_bugs;
static std::map<Bug, BugInfo> m_bugs;
void Init(Vendor vendor, Driver driver, const double version, const s32 family)
{

View File

@ -18,7 +18,7 @@
namespace HiresTextures
{
std::map<std::string, std::string> textureMap;
static std::map<std::string, std::string> textureMap;
void Init(const std::string& gameCode)
{

View File

@ -22,8 +22,8 @@ volatile u32 s_swapRequested = false;
u32 s_efbAccessRequested = false;
volatile u32 s_FifoShuttingDown = false;
std::condition_variable s_perf_query_cond;
std::mutex s_perf_query_lock;
static std::condition_variable s_perf_query_cond;
static std::mutex s_perf_query_lock;
static volatile bool s_perf_query_requested;
static volatile struct

View File

@ -97,14 +97,14 @@ static UPEAlphaReadReg m_AlphaRead;
static UPECtrlReg m_Control;
//static u16 m_Token; // token value most recently encountered
volatile u32 g_bSignalTokenInterrupt;
volatile u32 g_bSignalFinishInterrupt;
static volatile u32 g_bSignalTokenInterrupt;
static volatile u32 g_bSignalFinishInterrupt;
static int et_SetTokenOnMainThread;
static int et_SetFinishOnMainThread;
volatile u32 interruptSetToken = 0;
volatile u32 interruptSetFinish = 0;
static volatile u32 interruptSetToken = 0;
static volatile u32 interruptSetFinish = 0;
u16 bbox[4];
bool bbox_active;

View File

@ -40,7 +40,8 @@
// TODO: Move these out of here.
int frameCount;
int OSDChoice, OSDTime;
int OSDChoice;
static int OSDTime;
Renderer *g_renderer = nullptr;
@ -350,9 +351,6 @@ void Renderer::DrawDebugText()
g_renderer->RenderText(final_yellow, 20, 20, 0xFFFFFF00);
}
// TODO: remove
extern bool g_aspect_wide;
void Renderer::UpdateDrawRectangle(int backbuffer_width, int backbuffer_height)
{
float FloatGLWidth = (float)backbuffer_width;

View File

@ -36,7 +36,7 @@ TextureCache::TexCache TextureCache::textures;
TextureCache::BackupConfig TextureCache::backup_config;
bool invalidate_texture_cache_requested;
static bool invalidate_texture_cache_requested;
TextureCache::TCacheEntryBase::~TCacheEntryBase()
{

View File

@ -32,8 +32,8 @@
#pragma clang diagnostic ignored "-Wshadow"
#endif
bool TexFmt_Overlay_Enable=false;
bool TexFmt_Overlay_Center=false;
static bool TexFmt_Overlay_Enable=false;
static bool TexFmt_Overlay_Center=false;
extern const char* texfmt[];
extern const unsigned char sfont_map[];

View File

@ -23,6 +23,15 @@
#endif
#endif
// They are used for the communication with the loader functions
extern NativeVertexFormat *g_nativeVertexFmt;
extern int tcIndex;
extern int colIndex;
extern TVtxAttr* pVtxAttr;
extern int colElements[2];
extern float posScale;
extern float tcScale[8];
class VertexLoaderUID
{
u32 vid[5];

View File

@ -18,7 +18,7 @@
#include "VideoCommon/VideoConfig.h"
#include "VideoCommon/XFMemory.h"
float GC_ALIGNED16(g_fProjectionMatrix[16]);
static float GC_ALIGNED16(g_fProjectionMatrix[16]);
// track changes
static bool bTexMatricesChanged[2], bPosNormalMatrixChanged, bProjectionChanged, bViewportChanged;