avoid the extern keyword in .cpp files

This commit is contained in:
degasus 2014-07-08 16:49:33 +02:00
parent 6d3f249dcc
commit 81ed17be53
42 changed files with 28 additions and 104 deletions

View File

@ -916,7 +916,7 @@ u32 EncodeVm(ARMReg Vm)
}
// Double/single, Neon
extern const VFPEnc VFPOps[16][2] = {
const VFPEnc VFPOps[16][2] = {
{{0xE0, 0xA0}, { -1, -1}}, // 0: VMLA
{{0xE1, 0xA4}, { -1, -1}}, // 1: VNMLA
{{0xE0, 0xA4}, { -1, -1}}, // 2: VMLS

View File

@ -22,7 +22,7 @@ typedef std::string (*StringTranslator)(const char* text);
void RegisterMsgAlertHandler(MsgAlertHandler handler);
void RegisterStringTranslator(StringTranslator translator);
extern bool MsgAlert(bool yes_no, int Style, const char* format, ...)
bool MsgAlert(bool yes_no, int Style, const char* format, ...)
#ifdef __GNUC__
__attribute__((format(printf, 3, 4)))
#endif

View File

@ -136,4 +136,4 @@ private:
bool m_needs_resume_mail;
};
extern UCodeInterface* UCodeFactory(u32 crc, DSPHLE *dsphle, bool wii);
UCodeInterface* UCodeFactory(u32 crc, DSPHLE *dsphle, bool wii);

View File

@ -53,4 +53,4 @@ public:
TEXIDevices m_deviceType;
};
extern IEXIDevice* EXIDevice_Create(const TEXIDevices device_type, const int channel_num);
IEXIDevice* EXIDevice_Create(const TEXIDevices device_type, const int channel_num);

View File

@ -47,7 +47,6 @@ extern u8 *m_pEXRAM;
extern u8 *m_pL1Cache;
extern u8 *m_pVirtualFakeVMEM;
extern u8 *m_pFakeVMEM;
extern bool bFakeVMEM;
enum
{

View File

@ -22,6 +22,7 @@
#include "Core/HW/GPFifo.h"
#include "Core/HW/Memmap.h"
#include "Core/HW/MMIO.h"
#include "Core/PowerPC/JitInterface.h"
#include "Core/PowerPC/PowerPC.h"
#include "VideoCommon/VideoBackendBase.h"
@ -53,15 +54,6 @@ GXPeekZ
// From Memmap.cpp
// ----------------
// Pointers to low memory
extern u8 *m_pFakeVMEM;
extern u8 *m_pEXRAM; // Wii
extern u8 *m_pEFB;
// Init
extern bool m_IsInitialized;
extern bool bFakeVMEM;
// Overloaded byteswap functions, for use within the templated functions below.
inline u8 bswap(u8 val) {return val;}
inline u16 bswap(u16 val) {return Common::swap16(val);}

View File

@ -95,4 +95,4 @@ public:
}
};
extern ISIDevice* SIDevice_Create(const SIDevices device, const int port_number);
ISIDevice* SIDevice_Create(const SIDevices device, const int port_number);

View File

@ -50,8 +50,6 @@ typedef struct pollfd pollfd_t;
#include <errno.h>
#endif
extern std::queue<std::pair<u32,std::string> > g_ReplyQueueLater;
// **********************************************************************************
// Handle /dev/net/kd/request requests
CWII_IPC_HLE_Device_net_kd_request::CWII_IPC_HLE_Device_net_kd_request(u32 _DeviceID, const std::string& _rDeviceName)

View File

@ -142,11 +142,6 @@ ps_adds1
static int CODE_SIZE = 1024*1024*32;
namespace CPUCompare
{
extern u32 m_BlockStart;
}
void Jit64::Init()
{
jo.optimizeStack = true;

View File

@ -234,11 +234,6 @@ namespace JitILProfiler
static int CODE_SIZE = 1024*1024*32;
namespace CPUCompare
{
extern u32 m_BlockStart;
}
void JitIL::Init()
{
jo.optimizeStack = true;

View File

@ -26,10 +26,6 @@ using namespace ArmGen;
using namespace PowerPC;
static int CODE_SIZE = 1024*1024*32;
namespace CPUCompare
{
extern u32 m_BlockStart;
}
void JitArm::Init()
{

View File

@ -14,8 +14,6 @@
#include "Core/PowerPC/JitArm32/JitAsm.h"
#include "Core/PowerPC/JitArm32/JitRegCache.h"
extern u32 Helper_Mask(u8 mb, u8 me);
// Assumes that Sign and Zero flags were set by the last operation. Preserves all flags and registers.
// Jit64 ComputerRC is signed
// JIT64 GenerateRC is unsigned

View File

@ -25,10 +25,7 @@ using namespace ArmGen;
using namespace PowerPC;
static int CODE_SIZE = 1024*1024*32;
namespace CPUCompare
{
extern u32 m_BlockStart;
}
void JitArmIL::Init()
{
AllocCodeSpace(CODE_SIZE);

View File

@ -19,8 +19,6 @@
using namespace Gen;
extern u8 *trampolineCodePtr;
#if _M_X86_64
static void BackPatchError(const std::string &text, u8 *codePtr, u32 emAddress) {
u64 code_addr = (u64)codePtr;

View File

@ -44,13 +44,12 @@
#include "DolphinWX/Frame.h"
#include "DolphinWX/GeckoCodeDiag.h"
#include "DolphinWX/ISOProperties.h"
#include "DolphinWX/Main.h"
#include "DolphinWX/WxUtils.h"
class wxWindow;
#define MAX_CHEAT_SEARCH_RESULTS_DISPLAY 256
extern std::vector<ActionReplay::ARCode> arCodes;
extern CFrame* main_frame;
// meh
static wxCheatsWindow *g_cheat_window;

View File

@ -71,8 +71,6 @@ const CPUCore CPUCores[] = {
#endif
};
extern CFrame* main_frame;
// keep these in sync with CConfigMain::InitializeGUILists
static const wxLanguage langIds[] =
{

View File

@ -43,12 +43,6 @@ BEGIN_EVENT_TABLE(GFXDebuggerPanel, wxPanel)
EVT_BUTTON(ID_CLEAR_PIXEL_SHADER_CACHE,GFXDebuggerPanel::OnClearPixelShaderCacheButton)
END_EVENT_TABLE()
// From VideoCommon
extern GFXDebuggerBase *g_pdebugger;
extern volatile bool GFXDebuggerPauseFlag;
extern volatile PauseEvent GFXDebuggerToPauseAtNext;
extern volatile int GFXDebuggerEventToPauseCount;
GFXDebuggerPanel::GFXDebuggerPanel(wxWindow *parent, wxWindowID id, const wxPoint &position,
const wxSize& size, long style, const wxString &title)
: wxPanel(parent, id, position, size, style, title)

View File

@ -61,6 +61,7 @@
#include "DolphinWX/GameListCtrl.h"
#include "DolphinWX/Globals.h"
#include "DolphinWX/LogWindow.h"
#include "DolphinWX/Main.h"
#include "DolphinWX/TASInputDlg.h"
#include "DolphinWX/WxUtils.h"
#include "DolphinWX/Debugger/CodeWindow.h"
@ -88,9 +89,6 @@ HWND MSWGetParent_(HWND Parent)
// ---------------
// The CPanel class to receive MSWWindowProc messages from the video backend.
extern CFrame* main_frame;
BEGIN_EVENT_TABLE(CPanel, wxPanel)
END_EVENT_TABLE()

View File

@ -84,8 +84,6 @@ size_t CGameListCtrl::m_numberItem = 0;
std::string CGameListCtrl::m_currentFilename;
static bool sorted = false;
extern CFrame* main_frame;
static int CompareGameListItems(const GameListItem* iso1, const GameListItem* iso2,
long sortData = CGameListCtrl::COLUMN_TITLE)
{

View File

@ -42,6 +42,7 @@
#include "DolphinWX/Frame.h"
#include "DolphinWX/GameListCtrl.h"
#include "DolphinWX/ISOFile.h"
#include "DolphinWX/Main.h"
#include "DolphinWX/NetWindow.h"
#include "DolphinWX/WxUtils.h"
@ -56,7 +57,6 @@ END_EVENT_TABLE()
static NetPlayServer* netplay_server = nullptr;
static NetPlayClient* netplay_client = nullptr;
extern CFrame* main_frame;
NetPlayDiag *NetPlayDiag::npd = nullptr;
static std::string BuildGameName(const GameListItem& game)

View File

@ -28,6 +28,7 @@
#include "Core/Core.h"
#include "Core/CoreParameter.h"
#include "DolphinWX/Frame.h"
#include "DolphinWX/Main.h"
#include "DolphinWX/VideoConfigDiag.h"
#include "DolphinWX/WxUtils.h"
#include "VideoCommon/VideoBackendBase.h"
@ -37,8 +38,6 @@
#include <ApplicationServices/ApplicationServices.h>
#endif
extern CFrame* main_frame;
// template instantiation
template class BoolSetting<wxCheckBox>;
template class BoolSetting<wxRadioButton>;

View File

@ -21,9 +21,6 @@
#include "VideoCommon/Statistics.h"
#include "VideoCommon/VideoConfig.h"
extern int frameCount;
namespace DX11
{

View File

@ -16,12 +16,10 @@
#include "VideoCommon/RenderBase.h"
#include "VideoCommon/Statistics.h"
#include "VideoCommon/TextureCacheBase.h"
#include "VideoCommon/VertexLoader.h"
#include "VideoCommon/VertexShaderManager.h"
#include "VideoCommon/VideoConfig.h"
// internal state for loading vertices
extern NativeVertexFormat *g_nativeVertexFmt;
namespace DX11
{

View File

@ -17,7 +17,7 @@ enum GLSL_VERSION {
};
// ogl-only config, so not in VideoConfig.h
extern struct VideoConfig {
struct VideoConfig {
bool bSupportsGLSLCache;
bool bSupportsGLPinnedMemory;
bool bSupportsGLSync;
@ -35,7 +35,8 @@ extern struct VideoConfig {
const char* glsl_version;
s32 max_samples;
} g_ogl_config;
};
extern VideoConfig g_ogl_config;
class Renderer : public ::Renderer
{

View File

@ -29,9 +29,6 @@
#include "VideoCommon/VertexShaderManager.h"
#include "VideoCommon/VideoConfig.h"
// internal state for loading vertices
extern NativeVertexFormat *g_nativeVertexFmt;
namespace OGL
{
//This are the initially requested size for the buffers expressed in bytes

View File

@ -15,6 +15,7 @@
#include "VideoBackends/Software/SWVideoConfig.h"
#include "VideoBackends/Software/TextureSampler.h"
#include "VideoCommon/Fifo.h"
#include "VideoCommon/ImageWrite.h"

View File

@ -14,6 +14,7 @@
#include "VideoBackends/Software/SWStatistics.h"
#include "VideoBackends/Software/SWVideoConfig.h"
#include "VideoBackends/Software/TextureEncoder.h"
#include "VideoCommon/Fifo.h"
static const float s_gammaLUT[] =
{

View File

@ -14,6 +14,7 @@
#include "VideoBackends/Software/SWVideoConfig.h"
#include "VideoBackends/Software/XFMemLoader.h"
#include "VideoCommon/DataReader.h"
#include "VideoCommon/Fifo.h"
typedef void (*DecodingFunction)(u32);

View File

@ -20,6 +20,8 @@
#include "VideoBackends/Software/SWCommandProcessor.h"
#include "VideoBackends/Software/VideoBackend.h"
#include "VideoCommon/DataReader.h"
#include "VideoCommon/Fifo.h"
namespace SWCommandProcessor
{

View File

@ -11,9 +11,6 @@
class PointerWrap;
namespace MMIO { class Mapping; }
extern volatile bool g_bSkipCurrentFrame;
extern u8* g_pVideoData;
namespace SWCommandProcessor
{
using UCPStatusReg = CommandProcessor::UCPStatusReg;

View File

@ -12,20 +12,13 @@
#include "VideoBackends/Software/XFMemLoader.h"
#include "VideoCommon/DataReader.h"
#include "VideoCommon/VertexLoader.h"
#include "VideoCommon/VertexLoader_Color.h"
#include "VideoCommon/VertexLoader_Normal.h"
#include "VideoCommon/VertexLoader_Position.h"
#include "VideoCommon/VertexLoader_TextCoord.h"
#include "VideoCommon/VertexManagerBase.h"
// Vertex loaders read these
extern int tcIndex;
extern int colIndex;
extern int colElements[2];
extern float posScale;
extern float tcScale[8];
SWVertexLoader::SWVertexLoader() :
m_VertexSize(0),
m_NumAttributeLoaders(0)

View File

@ -35,6 +35,7 @@
#include "VideoBackends/Software/VideoConfigDialog.h"
#endif // HAVE_WX
#include "VideoCommon/Fifo.h"
#include "VideoCommon/OnScreenDisplay.h"
#include "VideoCommon/PixelEngine.h"
#include "VideoCommon/XFMemory.h"

View File

@ -11,6 +11,7 @@
#include "VideoCommon/BPFunctions.h"
#include "VideoCommon/BPStructs.h"
#include "VideoCommon/Fifo.h"
#include "VideoCommon/PerfQueryBase.h"
#include "VideoCommon/PixelEngine.h"
#include "VideoCommon/PixelShaderManager.h"
@ -24,8 +25,6 @@
using namespace BPFunctions;
extern volatile bool g_bSkipCurrentFrame;
static const float s_gammaLUT[] =
{
1.0f,

View File

@ -15,7 +15,6 @@
#include "VideoCommon/VideoConfig.h"
//void UpdateFPSDisplay(const char *text);
extern NativeVertexFormat *g_nativeVertexFmt;
GFXDebuggerBase *g_pdebugger = nullptr;
volatile bool GFXDebuggerPauseFlag = false; // if true, the GFX thread will be spin locked until it's false again

View File

@ -13,13 +13,13 @@
#include "Core/HW/Memmap.h"
#include "VideoCommon/CommandProcessor.h"
#include "VideoCommon/DataReader.h"
#include "VideoCommon/Fifo.h"
#include "VideoCommon/OpcodeDecoding.h"
#include "VideoCommon/PixelEngine.h"
#include "VideoCommon/VideoConfig.h"
volatile bool g_bSkipCurrentFrame = false;
extern u8* g_pVideoData;
namespace
{

View File

@ -19,9 +19,6 @@
#include "VideoCommon/TextureCacheBase.h"
#include "VideoCommon/VideoConfig.h"
// ugly
extern int frameCount;
enum
{
TEXTURE_KILL_THRESHOLD = 200,

View File

@ -52,6 +52,10 @@ enum TextureFormat
GX_CTF_Z16L = 0xC | _GX_TF_ZTF | _GX_TF_CTF,
};
extern const char* texfmt[];
extern const unsigned char sfont_map[];
extern const unsigned char sfont_raw[][9*10];
int TexDecoder_GetTexelSizeInNibbles(int format);
int TexDecoder_GetTextureSizeInBytes(int width, int height, int format);
int TexDecoder_GetBlockWidthInTexels(u32 format);

View File

@ -15,10 +15,6 @@
bool TexFmt_Overlay_Enable=false;
bool TexFmt_Overlay_Center=false;
extern const char* texfmt[];
extern const unsigned char sfont_map[];
extern const unsigned char sfont_raw[][9*10];
// TRAM
// STATE_TO_SAVE
GC_ALIGNED16(u8 texMem[TMEM_SIZE]);

View File

@ -35,10 +35,6 @@
static bool TexFmt_Overlay_Enable=false;
static bool TexFmt_Overlay_Center=false;
extern const char* texfmt[];
extern const unsigned char sfont_map[];
extern const unsigned char sfont_raw[][9*10];
// TRAM
// STATE_TO_SAVE
GC_ALIGNED16(u8 texMem[TMEM_SIZE]);

View File

@ -16,10 +16,6 @@
#define ASHIFT 24
#define AMASK 0xFF000000
extern int colIndex;
extern int colElements[2];
__forceinline void _SetCol(u32 val)
{
DataWrite(val);

View File

@ -12,9 +12,6 @@
#include "VideoCommon/VertexManagerBase.h"
#include "VideoCommon/VideoCommon.h"
extern float posScale;
extern TVtxAttr *pVtxAttr;
// Thoughts on the implementation of a vertex loader compiler.
// s_pCurBufferPointer should definitely be in a register.
// Could load the position scale factor in XMM7, for example.

View File

@ -34,9 +34,6 @@ __forceinline void LOG_TEX<2>()
// PRIM_LOG("tex: %f %f, ", ((float*)VertexManager::s_pCurBufferPointer)[-2], ((float*)VertexManager::s_pCurBufferPointer)[-1]);
}
extern int tcIndex;
extern float tcScale[8];
static void LOADERDECL TexCoord_Read_Dummy()
{
tcIndex++;