Permalink
Browse files

Remove Globals.h

  • Loading branch information...
hrydgard committed Aug 31, 2017
1 parent ff3d799 commit 6a1fa728d85d9a13b575b84fa2360a25e50462f4
Showing with 99 additions and 193 deletions.
  1. +0 −2 CMakeLists.txt
  2. +1 −0 Common/ChunkFile.h
  3. +4 −1 Common/CodeBlock.h
  4. +7 −13 Common/Common.h
  5. +1 −0 Common/CommonFuncs.h
  6. +6 −6 Common/FileUtil.h
  7. +2 −0 Common/Hashmaps.h
  8. +5 −1 Common/LogManager.h
  9. +4 −0 Common/Swap.h
  10. +1 −0 Core/Dialog/PSPDialog.h
  11. +2 −0 Core/Dialog/PSPMsgDialog.h
  12. +1 −0 Core/ELF/ElfTypes.h
  13. +1 −0 Core/ELF/PBPReader.h
  14. +1 −0 Core/ELF/PrxDecrypter.cpp
  15. +1 −0 Core/FileLoaders/DiskCachingFileLoader.h
  16. +1 −0 Core/FileSystems/BlockDevices.cpp
  17. +2 −0 Core/HLE/KernelWaitHelpers.h
  18. +0 −1 Core/HLE/__sceAudio.cpp
  19. +1 −1 Core/HLE/sceCtrl.cpp
  20. +2 −3 Core/HLE/sceKernel.h
  21. +1 −1 Core/HLE/sceMpeg.cpp
  22. +1 −0 Core/HLE/sceMpeg.h
  23. +3 −3 Core/HW/SasAudio.cpp
  24. +1 −2 Core/HW/SasReverb.cpp
  25. +1 −1 Core/HW/StereoResampler.cpp
  26. +1 −0 Core/MemMap.h
  27. +0 −1 Core/Util/AudioFormat.cpp
  28. +27 −1 Core/Util/AudioFormat.h
  29. +1 −0 GPU/Common/SplineCommon.h
  30. +1 −0 GPU/Common/TextureDecoder.h
  31. +1 −0 GPU/Common/VertexDecoderCommon.cpp
  32. +0 −1 GPU/Common/VertexDecoderCommon.h
  33. +0 −2 GPU/D3D11/FramebufferManagerD3D11.h
  34. +0 −1 GPU/D3D11/ShaderManagerD3D11.h
  35. +0 −2 GPU/Directx9/FramebufferDX9.h
  36. +0 −1 GPU/Directx9/ShaderManagerDX9.h
  37. +0 −1 GPU/Directx9/TextureCacheDX9.h
  38. +0 −2 GPU/Directx9/VertexShaderGeneratorDX9.h
  39. +0 −2 GPU/GLES/FragmentShaderGeneratorGLES.h
  40. +1 −3 GPU/GLES/FramebufferManagerGLES.h
  41. +2 −2 GPU/GLES/ShaderManagerGLES.h
  42. +0 −1 GPU/GLES/TextureCacheGLES.h
  43. +1 −0 GPU/GPUInterface.h
  44. +2 −2 GPU/GPUState.h
  45. +1 −2 GPU/Math3D.h
  46. +0 −2 GPU/Vulkan/FragmentShaderGeneratorVulkan.h
  47. +0 −1 GPU/Vulkan/ShaderManagerVulkan.h
  48. +0 −1 GPU/Vulkan/TextureCacheVulkan.h
  49. +0 −63 Globals.h
  50. +0 −1 Windows/Debugger/CtrlDisAsmView.cpp
  51. +0 −2 Windows/Debugger/CtrlMemView.cpp
  52. +0 −1 Windows/Debugger/CtrlRegisterList.cpp
  53. +0 −1 Windows/Debugger/Debugger_Disasm.h
  54. +0 −1 Windows/EmuThread.cpp
  55. +0 −1 Windows/GEDebugger/CtrlDisplayListView.h
  56. +0 −1 Windows/GEDebugger/GEDebugger.h
  57. +0 −1 Windows/GEDebugger/SimpleGLWindow.h
  58. +0 −1 Windows/GEDebugger/TabDisplayLists.h
  59. +0 −29 Windows/Globals.cpp
  60. +1 −0 Windows/InputBox.cpp
  61. +0 −2 Windows/InputBox.h
  62. +0 −2 Windows/MainWindow.cpp
  63. +0 −2 Windows/PPSSPP.vcxproj
  64. +0 −2 Windows/PPSSPP.vcxproj.filters
  65. +3 −0 Windows/main.cpp
  66. +6 −19 ext/native/base/basictypes.h
  67. +1 −1 headless/Compare.h
View
@@ -140,7 +140,6 @@ if(APPLE)
find_library(COCOA_LIBRARY Cocoa)
endif()
# Needed for Globals.h
include_directories("${CMAKE_SOURCE_DIR}")
if(USING_EGL)
@@ -1604,7 +1603,6 @@ add_library(${CoreLibName} ${CoreLinkType}
Core/Util/ppge_atlas.h
${CORE_NEON}
${GPU_SOURCES}
Globals.h
git-version.cpp
ext/disarm.cpp
git-version.cpp)
View
@@ -37,6 +37,7 @@
#include <type_traits>
#include "Common.h"
#include "Swap.h"
#include "FileUtil.h"
template <class T>
View
@@ -38,8 +38,11 @@ class CodeBlockCommon {
size_t region_size;
};
template<class T> class CodeBlock : public CodeBlockCommon, public T, NonCopyable {
template<class T> class CodeBlock : public CodeBlockCommon, public T {
private:
CodeBlock(const CodeBlock &) = delete;
void operator=(const CodeBlock &) = delete;
// A privately used function to set the executable RAM space to something invalid.
// For debugging usefulness it should be used to set the RAM to a host specific breakpoint instruction
virtual void PoisonMemory(int offset) = 0;
View
@@ -20,7 +20,6 @@
// DO NOT EVER INCLUDE <windows.h> directly _or indirectly_ from this file
// since it slows down the build a lot.
#include <stdlib.h>
#include <stdarg.h>
#ifdef _MSC_VER
@@ -36,19 +35,16 @@
#define STACKALIGN
// An inheritable class to disallow the copy constructor and operator= functions
class NonCopyable {
protected:
NonCopyable() {}
private:
NonCopyable(const NonCopyable&);
void operator=(const NonCopyable&);
};
#include "Log.h"
#include "CommonTypes.h"
#include "CommonFuncs.h"
#ifndef DISALLOW_COPY_AND_ASSIGN
#define DISALLOW_COPY_AND_ASSIGN(t) \
t(const t &other) = delete; \
void operator =(const t &other) = delete;
#endif
#ifdef __APPLE__
// The Darwin ABI requires that stack frames be aligned to 16-byte boundaries.
// This is only needed on i386 gcc - x86_64 already aligns to 16 bytes.
@@ -100,6 +96,4 @@ class NonCopyable {
# elif defined __SSE2__
# define _M_SSE 0x200
# endif
#endif
#include "Swap.h"
#endif
View
@@ -25,6 +25,7 @@
#if !defined(_WIN32)
#include <unistd.h>
#include <errno.h>
View
@@ -124,14 +124,17 @@ const std::string &GetExeDirectory();
// simple wrapper for cstdlib file functions to
// hopefully will make error checking easier
// and make forgetting an fclose() harder
class IOFile : NonCopyable {
class IOFile {
public:
IOFile();
IOFile(std::FILE* file);
IOFile(const std::string& filename, const char openmode[]);
~IOFile();
// Prevent copies.
IOFile(const IOFile &) = delete;
void operator=(const IOFile &) = delete;
bool Open(const std::string& filename, const char openmode[]);
bool Close();
@@ -189,10 +192,7 @@ class IOFile : NonCopyable {
}
private:
IOFile& operator=(const IOFile&) /*= delete*/;
IOFile(const IOFile&) /*= delete*/;
std::FILE* m_file;
std::FILE *m_file;
bool m_good;
};
View
@@ -1,6 +1,8 @@
#pragma once
#include <cstring>
#include <vector>
#include "ext/xxhash.h"
#include "Common/CommonFuncs.h"
View
@@ -103,11 +103,15 @@ struct LogChannel {
class ConsoleListener;
class LogManager : NonCopyable {
class LogManager {
private:
LogManager();
~LogManager();
// Prevent copies.
LogManager(const LogManager &) = delete;
void operator=(const LogManager &) = delete;
LogChannel log_[LogTypes::NUMBER_OF_LOGS];
FileLogListener *fileLog_ = nullptr;
ConsoleListener *consoleLog_ = nullptr;
View
@@ -17,6 +17,10 @@
#pragma once
#include <cstdlib>
#include "Common/CommonTypes.h"
// Android
#if defined(__ANDROID__)
#include <sys/endian.h>
View
@@ -19,6 +19,7 @@
#include "Common/Common.h"
#include "Common/CommonTypes.h"
#include "Common/Swap.h"
class PointerWrap;
@@ -18,6 +18,8 @@
#pragma once
#include <string>
#include "Common/Swap.h"
#include "Core/Dialog/PSPDialog.h"
#define SCE_UTILITY_MSGDIALOG_OPTION_ERRORSOUND 0x00000000
View
@@ -18,6 +18,7 @@
#pragma once
#include "Common/Common.h"
#include "Common/Swap.h"
///////////////////////
// ELF Header Constants
View
@@ -19,6 +19,7 @@
#pragma once
#include "Common/Common.h"
#include "Common/Swap.h"
enum PBPSubFile {
PBP_PARAM_SFO,
@@ -5,6 +5,7 @@ extern "C"
#include "ext/libkirk/kirk_engine.h"
}
#include "Common/Common.h"
#include "Common/Swap.h"
#include "Core/ELF/PrxDecrypter.h"
#define ROUNDUP16(x) (((x)+15)&~15)
@@ -22,6 +22,7 @@
#include <mutex>
#include "Common/Common.h"
#include "Common/Swap.h"
#include "Core/Loaders.h"
class DiskCachingFileLoaderCache;
@@ -17,6 +17,7 @@
#include "Common/FileUtil.h"
#include "Common/Swap.h"
#include "Core/Loaders.h"
#include "Core/FileSystems/BlockDevices.h"
#include <cstdio>
@@ -20,6 +20,8 @@
#include <vector>
#include <map>
#include <algorithm>
#include "Common/CommonTypes.h"
#include "Core/HLE/sceKernelThread.h"
namespace HLEKernel
View
@@ -18,7 +18,6 @@
#include <atomic>
#include <mutex>
#include "Globals.h" // only for clamp_s16
#include "Common/CommonTypes.h"
#include "Common/ChunkFile.h"
#include "Common/FixedSizeQueue.h"
View
@@ -19,13 +19,13 @@
#include <cmath>
#include <mutex>
#include "Globals.h"
#include "Core/HLE/HLE.h"
#include "Core/HLE/FunctionWrappers.h"
#include "Core/MIPS/MIPS.h"
#include "Core/CoreTiming.h"
#include "Core/MemMapHelpers.h"
#include "Common/ChunkFile.h"
#include "Core/Util/AudioFormat.h" // for clamp_u8
#include "Core/HLE/sceCtrl.h"
#include "Core/HLE/sceDisplay.h"
#include "Core/HLE/sceKernel.h"
View
@@ -20,12 +20,11 @@
#include <map>
#include "Common/Common.h"
#include "Common/CommonTypes.h"
#include "Common/Swap.h"
class PointerWrap;
enum
{
enum {
SCE_KERNEL_ERROR_OK = 0,
SCE_KERNEL_ERROR_ALREADY = 0x80000020,
SCE_KERNEL_ERROR_BUSY = 0x80000021,
View
@@ -15,12 +15,12 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
// This code is part shamelessly "inspired" from JPSCP.
#include <map>
#include <algorithm>
#include <memory>
#include "Common/Swap.h"
#include "Core/HLE/sceMpeg.h"
#include "Core/HLE/sceKernelModule.h"
#include "Core/HLE/sceKernelThread.h"
View
@@ -18,6 +18,7 @@
#pragma once
#include "Common/Common.h"
#include "Common/Swap.h"
class PointerWrap;
View
@@ -15,18 +15,18 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include <algorithm>
#include "base/basictypes.h"
#include "profiler/profiler.h"
#include "Globals.h"
#include "Core/MemMapHelpers.h"
#include "Core/HLE/sceAtrac.h"
#include "Core/Config.h"
#include "Core/Reporting.h"
#include "Core/Util/AudioFormat.h"
#include "SasAudio.h"
#include <algorithm>
// #define AUDIO_TO_FILE
static const u8 f[16][2] = {
View
@@ -18,9 +18,8 @@
#include <stdint.h>
#include "base/basictypes.h"
#include "Globals.h"
#include "Core/HW/SasReverb.h"
#include "Core/Util/AudioFormat.h"
// This is under the assumption that the reverb used in Sas is the same as the PSX SPU reverb.
@@ -39,8 +39,8 @@
#include "Core/Config.h"
#include "Core/HW/StereoResampler.h"
#include "Core/HLE/__sceAudio.h"
#include "Core/Util/AudioFormat.h" // for clamp_u8
#include "Core/System.h"
#include "Globals.h"
#ifdef _M_SSE
#include <emmintrin.h>
View
@@ -27,6 +27,7 @@
// Includes
#include "Common/Common.h"
#include "Common/CommonTypes.h"
#include "Common/Swap.h"
#include "Core/Opcode.h"
// PPSSPP is very aggressive about trying to do memory accesses directly, for speed.
@@ -19,7 +19,6 @@
#include "Common/CPUDetect.h"
#include "Core/Util/AudioFormat.h"
#include "Core/Util/AudioFormatNEON.h"
#include "Globals.h"
#ifdef _M_SSE
#include <emmintrin.h>
View
@@ -19,7 +19,33 @@
#include "ppsspp_config.h"
#include "Common/Common.h"
#include "Globals.h"
#include "Common/CommonTypes.h"
#define IS_LITTLE_ENDIAN (*(const u16 *)"\0\xff" >= 0x100)
static inline u8 clamp_u8(int i) {
#if PPSSPP_ARCH(ARM) && !defined(_MSC_VER)
asm("usat %0, #8, %1" : "=r"(i) : "r"(i));
#else
if (i > 255)
return 255;
if (i < 0)
return 0;
#endif
return i;
}
static inline s16 clamp_s16(int i) {
#if PPSSPP_ARCH(ARM) && !defined(_MSC_VER)
asm("ssat %0, #16, %1" : "=r"(i) : "r"(i));
#else
if (i > 32767)
return 32767;
if (i < -32768)
return -32768;
#endif
return i;
}
static inline s16 ApplySampleVolume(s16 sample, int vol) {
#if PPSSPP_ARCH(ARM) && !defined(_MSC_VER)
@@ -18,6 +18,7 @@
#pragma once
#include "Common/CommonTypes.h"
#include "Common/Swap.h"
#include "GPU/Math3D.h"
#include "GPU/ge_constants.h"
@@ -25,6 +25,7 @@ enum CheckAlphaResult {
};
#include "Common/Common.h"
#include "Common/Swap.h"
#include "Core/MemMap.h"
#include "GPU/ge_constants.h"
#include "GPU/Common/TextureDecoderNEON.h"
Oops, something went wrong.

0 comments on commit 6a1fa72

Please sign in to comment.