mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Warning fixes for new LLVM on mac (warns on inconsistent usage of override)
This commit is contained in:
parent
a3eb31994b
commit
a71fbccfbc
23 changed files with 125 additions and 136 deletions
|
@ -783,7 +783,7 @@ void ARM64XEmitter::EncodeLoadStorePair(u32 op, u32 load, IndexType type, ARM64R
|
|||
imm >>= 2;
|
||||
}
|
||||
|
||||
_assert_msg_(JIT, imm >= -64 && imm <= 63, "%s recieved too large imm: %d", imm);
|
||||
_assert_msg_(JIT, imm >= -64 && imm <= 63, "%s recieved too large imm: %d", __FUNCTION__, imm);
|
||||
|
||||
Rt = DecodeReg(Rt);
|
||||
Rt2 = DecodeReg(Rt2);
|
||||
|
@ -867,11 +867,11 @@ void ARM64XEmitter::SetJumpTarget(FixupBranch const& branch)
|
|||
}
|
||||
break;
|
||||
case 5: // B (uncoditional)
|
||||
_assert_msg_(DYNA_REC, IsInRangeImm26(distance), "%s(%d): Received too large distance: %lx", __FUNCTION__, branch.type, distance);
|
||||
_assert_msg_(DYNA_REC, IsInRangeImm26(distance), "%s(%d): Received too large distance: %llx", __FUNCTION__, branch.type, distance);
|
||||
inst = (0x5 << 26) | MaskImm26(distance);
|
||||
break;
|
||||
case 6: // BL (unconditional)
|
||||
_assert_msg_(DYNA_REC, IsInRangeImm26(distance), "%s(%d): Received too large distance: %lx", __FUNCTION__, branch.type, distance);
|
||||
_assert_msg_(DYNA_REC, IsInRangeImm26(distance), "%s(%d): Received too large distance: %llx", __FUNCTION__, branch.type, distance);
|
||||
inst = (0x25 << 26) | MaskImm26(distance);
|
||||
break;
|
||||
}
|
||||
|
@ -959,7 +959,7 @@ void ARM64XEmitter::B(CCFlags cond, const void* ptr)
|
|||
|
||||
distance >>= 2;
|
||||
|
||||
_assert_msg_(DYNA_REC, IsInRangeImm19(distance), "%s: Received too large distance: %p->%p %ld %lx", __FUNCTION__, m_code, ptr, distance, distance);
|
||||
_assert_msg_(DYNA_REC, IsInRangeImm19(distance), "%s: Received too large distance: %p->%p %lld %llx", __FUNCTION__, m_code, ptr, distance, distance);
|
||||
Write32((0x54 << 24) | (MaskImm19(distance) << 5) | cond);
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
int Abort();
|
||||
|
||||
protected:
|
||||
virtual bool UseAutoStatus() {
|
||||
virtual bool UseAutoStatus() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Core/Dialog/PSPDialog.h"
|
||||
#include "Core/MemMap.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
|
@ -212,7 +214,7 @@ public:
|
|||
virtual pspUtilityDialogCommon *GetCommonParam() override;
|
||||
|
||||
protected:
|
||||
virtual bool UseAutoStatus() {
|
||||
virtual bool UseAutoStatus() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ public:
|
|||
void ExecuteIOAction();
|
||||
|
||||
protected:
|
||||
virtual bool UseAutoStatus() {
|
||||
virtual bool UseAutoStatus() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,10 +18,11 @@
|
|||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include "Core/HLE/sceKernel.h"
|
||||
|
||||
enum FileAccess
|
||||
{
|
||||
enum FileAccess {
|
||||
FILEACCESS_NONE = 0,
|
||||
FILEACCESS_READ = 1,
|
||||
FILEACCESS_WRITE = 2,
|
||||
|
@ -30,28 +31,24 @@ enum FileAccess
|
|||
FILEACCESS_TRUNCATE = 16,
|
||||
};
|
||||
|
||||
enum FileMove
|
||||
{
|
||||
enum FileMove {
|
||||
FILEMOVE_BEGIN = 0,
|
||||
FILEMOVE_CURRENT = 1,
|
||||
FILEMOVE_END = 2
|
||||
};
|
||||
|
||||
enum FileType
|
||||
{
|
||||
enum FileType {
|
||||
FILETYPE_NORMAL = 1,
|
||||
FILETYPE_DIRECTORY = 2
|
||||
};
|
||||
|
||||
enum DevType
|
||||
{
|
||||
enum DevType {
|
||||
PSP_DEV_TYPE_BLOCK = 0x04,
|
||||
PSP_DEV_TYPE_FILE = 0x10,
|
||||
PSP_DEV_TYPE_ALIAS = 0x20,
|
||||
};
|
||||
|
||||
enum FileSystemFlags
|
||||
{
|
||||
enum FileSystemFlags {
|
||||
FILESYSTEM_SIMULATE_FAT32 = 1,
|
||||
};
|
||||
|
||||
|
@ -65,20 +62,19 @@ public:
|
|||
class SequentialHandleAllocator : public IHandleAllocator {
|
||||
public:
|
||||
SequentialHandleAllocator() : handle_(1) {}
|
||||
virtual u32 GetNewHandle() {
|
||||
virtual u32 GetNewHandle() override {
|
||||
u32 res = handle_++;
|
||||
if (handle_ < 0) {
|
||||
handle_ = 0;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
virtual void FreeHandle(u32 handle) {}
|
||||
virtual void FreeHandle(u32 handle) override {}
|
||||
private:
|
||||
int handle_;
|
||||
};
|
||||
|
||||
struct PSPFileInfo
|
||||
{
|
||||
struct PSPFileInfo {
|
||||
PSPFileInfo()
|
||||
: size(0), access(0), exists(false), type(FILETYPE_NORMAL), isOnSectorSystem(false), startSector(0), numSectors(0) {}
|
||||
|
||||
|
@ -101,14 +97,13 @@ struct PSPFileInfo
|
|||
};
|
||||
|
||||
|
||||
class IFileSystem
|
||||
{
|
||||
class IFileSystem {
|
||||
public:
|
||||
virtual ~IFileSystem() {}
|
||||
|
||||
virtual void DoState(PointerWrap &p) = 0;
|
||||
virtual std::vector<PSPFileInfo> GetDirListing(std::string path) = 0;
|
||||
virtual u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL) = 0;
|
||||
virtual u32 OpenFile(std::string filename, FileAccess access, const char *devicename=nullptr) = 0;
|
||||
virtual void CloseFile(u32 handle) = 0;
|
||||
virtual size_t ReadFile(u32 handle, u8 *pointer, s64 size) = 0;
|
||||
virtual size_t ReadFile(u32 handle, u8 *pointer, s64 size, int &usec) = 0;
|
||||
|
@ -132,25 +127,25 @@ public:
|
|||
class EmptyFileSystem : public IFileSystem
|
||||
{
|
||||
public:
|
||||
virtual void DoState(PointerWrap &p) {}
|
||||
std::vector<PSPFileInfo> GetDirListing(std::string path) {std::vector<PSPFileInfo> vec; return vec;}
|
||||
u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL) {return 0;}
|
||||
void CloseFile(u32 handle) {}
|
||||
size_t ReadFile(u32 handle, u8 *pointer, s64 size) {return 0;}
|
||||
size_t ReadFile(u32 handle, u8 *pointer, s64 size, int &usec) {return 0;}
|
||||
size_t WriteFile(u32 handle, const u8 *pointer, s64 size) {return 0;}
|
||||
size_t WriteFile(u32 handle, const u8 *pointer, s64 size, int &usec) {return 0;}
|
||||
size_t SeekFile(u32 handle, s32 position, FileMove type) {return 0;}
|
||||
PSPFileInfo GetFileInfo(std::string filename) {PSPFileInfo f; return f;}
|
||||
bool OwnsHandle(u32 handle) {return false;}
|
||||
virtual bool MkDir(const std::string &dirname) {return false;}
|
||||
virtual bool RmDir(const std::string &dirname) {return false;}
|
||||
virtual int RenameFile(const std::string &from, const std::string &to) {return -1;}
|
||||
virtual bool RemoveFile(const std::string &filename) {return false;}
|
||||
virtual bool GetHostPath(const std::string &inpath, std::string &outpath) {return false;}
|
||||
virtual int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec) {return SCE_KERNEL_ERROR_ERRNO_FUNCTION_NOT_SUPPORTED; }
|
||||
virtual int DevType(u32 handle) { return 0; }
|
||||
virtual int Flags() { return 0; }
|
||||
virtual void DoState(PointerWrap &p) override {}
|
||||
std::vector<PSPFileInfo> GetDirListing(std::string path) override {std::vector<PSPFileInfo> vec; return vec;}
|
||||
u32 OpenFile(std::string filename, FileAccess access, const char *devicename=nullptr) override {return 0;}
|
||||
void CloseFile(u32 handle) override {}
|
||||
size_t ReadFile(u32 handle, u8 *pointer, s64 size) override {return 0;}
|
||||
size_t ReadFile(u32 handle, u8 *pointer, s64 size, int &usec) override {return 0;}
|
||||
size_t WriteFile(u32 handle, const u8 *pointer, s64 size) override {return 0;}
|
||||
size_t WriteFile(u32 handle, const u8 *pointer, s64 size, int &usec) override {return 0;}
|
||||
size_t SeekFile(u32 handle, s32 position, FileMove type) override {return 0;}
|
||||
PSPFileInfo GetFileInfo(std::string filename) override {PSPFileInfo f; return f;}
|
||||
bool OwnsHandle(u32 handle) override {return false;}
|
||||
virtual bool MkDir(const std::string &dirname) override {return false;}
|
||||
virtual bool RmDir(const std::string &dirname) override {return false;}
|
||||
virtual int RenameFile(const std::string &from, const std::string &to) override {return -1;}
|
||||
virtual bool RemoveFile(const std::string &filename) override {return false;}
|
||||
virtual bool GetHostPath(const std::string &inpath, std::string &outpath) override {return false;}
|
||||
virtual int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec) override {return SCE_KERNEL_ERROR_ERRNO_FUNCTION_NOT_SUPPORTED; }
|
||||
virtual int DevType(u32 handle) override { return 0; }
|
||||
virtual int Flags() override { return 0; }
|
||||
virtual u64 FreeSpace(const std::string &path) override { return 0; }
|
||||
};
|
||||
|
||||
|
|
|
@ -26,8 +26,7 @@
|
|||
|
||||
bool parseLBN(std::string filename, u32 *sectorStart, u32 *readSize);
|
||||
|
||||
class ISOFileSystem : public IFileSystem
|
||||
{
|
||||
class ISOFileSystem : public IFileSystem {
|
||||
public:
|
||||
ISOFileSystem(IHandleAllocator *_hAlloc, BlockDevice *_blockDevice, std::string _restrictPath = "");
|
||||
~ISOFileSystem();
|
||||
|
@ -49,15 +48,14 @@ public:
|
|||
size_t WriteFile(u32 handle, const u8 *pointer, s64 size) override;
|
||||
size_t WriteFile(u32 handle, const u8 *pointer, s64 size, int &usec) override;
|
||||
|
||||
bool GetHostPath(const std::string &inpath, std::string &outpath) {return false;}
|
||||
bool GetHostPath(const std::string &inpath, std::string &outpath) override {return false;}
|
||||
bool MkDir(const std::string &dirname) override {return false;}
|
||||
bool RmDir(const std::string &dirname) override { return false; }
|
||||
int RenameFile(const std::string &from, const std::string &to) override { return -1; }
|
||||
bool RemoveFile(const std::string &filename) override { return false; }
|
||||
|
||||
private:
|
||||
struct TreeEntry
|
||||
{
|
||||
struct TreeEntry {
|
||||
TreeEntry(){}
|
||||
~TreeEntry();
|
||||
|
||||
|
@ -71,8 +69,7 @@ private:
|
|||
std::vector<TreeEntry*> children;
|
||||
};
|
||||
|
||||
struct OpenFileEntry
|
||||
{
|
||||
struct OpenFileEntry {
|
||||
TreeEntry *file;
|
||||
unsigned int seekPos; // TODO: Make 64-bit?
|
||||
bool isRawSector; // "/sce_lbn" mode
|
||||
|
@ -147,7 +144,7 @@ public:
|
|||
size_t WriteFile(u32 handle, const u8 *pointer, s64 size, int &usec) override {
|
||||
return isoFileSystem_->WriteFile(handle, pointer, size, usec);
|
||||
}
|
||||
bool GetHostPath(const std::string &inpath, std::string &outpath) { return false; }
|
||||
bool GetHostPath(const std::string &inpath, std::string &outpath) override { return false; }
|
||||
bool MkDir(const std::string &dirname) override { return false; }
|
||||
bool RmDir(const std::string &dirname) override { return false; }
|
||||
int RenameFile(const std::string &from, const std::string &to) override { return -1; }
|
||||
|
|
|
@ -17,23 +17,24 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/mutex.h"
|
||||
#include "Core/FileSystems/FileSystem.h"
|
||||
|
||||
class MetaFileSystem : public IHandleAllocator, public IFileSystem
|
||||
{
|
||||
class MetaFileSystem : public IHandleAllocator, public IFileSystem {
|
||||
private:
|
||||
s32 current;
|
||||
struct MountPoint
|
||||
{
|
||||
struct MountPoint {
|
||||
std::string prefix;
|
||||
IFileSystem *system;
|
||||
|
||||
bool operator == (const MountPoint &other) const
|
||||
{
|
||||
bool operator == (const MountPoint &other) const {
|
||||
return prefix == other.prefix && system == other.system;
|
||||
}
|
||||
};
|
||||
|
||||
std::vector<MountPoint> fileSystems;
|
||||
|
||||
typedef std::map<int, std::string> currentDir_t;
|
||||
|
@ -44,8 +45,7 @@ private:
|
|||
recursive_mutex lock;
|
||||
|
||||
public:
|
||||
MetaFileSystem()
|
||||
{
|
||||
MetaFileSystem() {
|
||||
current = 6; // what?
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ public:
|
|||
|
||||
void Shutdown();
|
||||
|
||||
u32 GetNewHandle() {
|
||||
u32 GetNewHandle() override {
|
||||
u32 res = current++;
|
||||
if (current < 0) {
|
||||
current = 0;
|
||||
|
@ -74,11 +74,9 @@ public:
|
|||
IFileSystem *GetHandleOwner(u32 handle);
|
||||
bool MapFilePath(const std::string &inpath, std::string &outpath, MountPoint **system);
|
||||
|
||||
inline bool MapFilePath(const std::string &_inpath, std::string &outpath, IFileSystem **system)
|
||||
{
|
||||
inline bool MapFilePath(const std::string &_inpath, std::string &outpath, IFileSystem **system) {
|
||||
MountPoint *mountPoint;
|
||||
if (MapFilePath(_inpath, outpath, &mountPoint))
|
||||
{
|
||||
if (MapFilePath(_inpath, outpath, &mountPoint)) {
|
||||
*system = mountPoint->system;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -75,9 +75,9 @@ public:
|
|||
transformDraw_ = td;
|
||||
}
|
||||
|
||||
virtual void MakePixelTexture(const u8 *srcPixels, GEBufferFormat srcPixelFormat, int srcStride, int width, int height) override;
|
||||
virtual void DrawPixels(VirtualFramebuffer *vfb, int dstX, int dstY, const u8 *srcPixels, GEBufferFormat srcPixelFormat, int srcStride, int width, int height) override;
|
||||
virtual void DrawFramebuffer(const u8 *srcPixels, GEBufferFormat srcPixelFormat, int srcStride, bool applyPostShader) override;
|
||||
void MakePixelTexture(const u8 *srcPixels, GEBufferFormat srcPixelFormat, int srcStride, int width, int height) override;
|
||||
void DrawPixels(VirtualFramebuffer *vfb, int dstX, int dstY, const u8 *srcPixels, GEBufferFormat srcPixelFormat, int srcStride, int width, int height) override;
|
||||
void DrawFramebuffer(const u8 *srcPixels, GEBufferFormat srcPixelFormat, int srcStride, bool applyPostShader) override;
|
||||
|
||||
// If texture != 0, will bind it.
|
||||
// x,y,w,h are relative to destW, destH which fill out the target completely.
|
||||
|
@ -105,10 +105,10 @@ public:
|
|||
|
||||
std::vector<FramebufferInfo> GetFramebufferList();
|
||||
|
||||
bool NotifyStencilUpload(u32 addr, int size, bool skipZero = false);
|
||||
bool NotifyStencilUpload(u32 addr, int size, bool skipZero = false) override;
|
||||
|
||||
void DestroyFramebuf(VirtualFramebuffer *vfb);
|
||||
void ResizeFramebufFBO(VirtualFramebuffer *vfb, u16 w, u16 h, bool force = false);
|
||||
void DestroyFramebuf(VirtualFramebuffer *vfb) override;
|
||||
void ResizeFramebufFBO(VirtualFramebuffer *vfb, u16 w, u16 h, bool force = false) override;
|
||||
|
||||
bool GetFramebuffer(u32 fb_address, int fb_stride, GEBufferFormat format, GPUDebugBuffer &buffer);
|
||||
bool GetDepthbuffer(u32 fb_address, int fb_stride, u32 z_address, int z_stride, GPUDebugBuffer &buffer);
|
||||
|
|
|
@ -76,14 +76,14 @@ public:
|
|||
primaryInfo = reportingPrimaryInfo_;
|
||||
fullInfo = reportingFullInfo_;
|
||||
}
|
||||
std::vector<FramebufferInfo> GetFramebufferList();
|
||||
std::vector<FramebufferInfo> GetFramebufferList() override;
|
||||
|
||||
bool GetCurrentFramebuffer(GPUDebugBuffer &buffer);
|
||||
bool GetCurrentDepthbuffer(GPUDebugBuffer &buffer);
|
||||
bool GetCurrentStencilbuffer(GPUDebugBuffer &buffer);
|
||||
bool GetCurrentTexture(GPUDebugBuffer &buffer, int level);
|
||||
bool GetCurrentFramebuffer(GPUDebugBuffer &buffer) override;
|
||||
bool GetCurrentDepthbuffer(GPUDebugBuffer &buffer) override;
|
||||
bool GetCurrentStencilbuffer(GPUDebugBuffer &buffer) override;
|
||||
bool GetCurrentTexture(GPUDebugBuffer &buffer, int level) override;
|
||||
static bool GetDisplayFramebuffer(GPUDebugBuffer &buffer);
|
||||
bool GetCurrentSimpleVertices(int count, std::vector<GPUDebugVertex> &vertices, std::vector<u16> &indices);
|
||||
bool GetCurrentSimpleVertices(int count, std::vector<GPUDebugVertex> &vertices, std::vector<u16> &indices) override;
|
||||
|
||||
bool DescribeCodePtr(const u8 *ptr, std::string &name) override;
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ public:
|
|||
}
|
||||
void InitDeviceObjects();
|
||||
void DestroyDeviceObjects();
|
||||
void GLLost();
|
||||
void GLLost() override;
|
||||
void Resized();
|
||||
|
||||
void DecimateTrackedVertexArrays();
|
||||
|
|
|
@ -84,7 +84,7 @@ public:
|
|||
bool GetCurrentDepthbuffer(GPUDebugBuffer &buffer) override;
|
||||
bool GetCurrentStencilbuffer(GPUDebugBuffer &buffer) override;
|
||||
bool GetCurrentTexture(GPUDebugBuffer &buffer, int level) override;
|
||||
bool GetCurrentSimpleVertices(int count, std::vector<GPUDebugVertex> &vertices, std::vector<u16> &indices);
|
||||
bool GetCurrentSimpleVertices(int count, std::vector<GPUDebugVertex> &vertices, std::vector<u16> &indices) override;
|
||||
|
||||
protected:
|
||||
void FastRunLoop(DisplayList &list) override;
|
||||
|
|
|
@ -356,13 +356,13 @@ class JoystickHistoryView : public UI::InertView {
|
|||
public:
|
||||
JoystickHistoryView(int xAxis, int xDevice, int yAxis, int yDevice, UI::LayoutParams *layoutParams = nullptr)
|
||||
: UI::InertView(layoutParams),
|
||||
xAxis_(xAxis), xDevice_(xDevice),
|
||||
xAxis_(xAxis), xDevice_(xDevice),
|
||||
yAxis_(yAxis), yDevice_(yDevice),
|
||||
curX_(0.0f), curY_(0.0f),
|
||||
maxCount_(500) {}
|
||||
void Draw(UIContext &dc) override;
|
||||
void Update(const InputState &input_state) override;
|
||||
void Axis(const AxisInput &input) {
|
||||
void Axis(const AxisInput &input) override{
|
||||
if (input.axisId == xAxis_) {
|
||||
curX_ = input.value;
|
||||
} else if (input.axisId == yAxis_) {
|
||||
|
@ -379,8 +379,8 @@ private:
|
|||
};
|
||||
|
||||
int xAxis_;
|
||||
int yAxis_;
|
||||
int xDevice_;
|
||||
int yAxis_;
|
||||
int yDevice_;
|
||||
|
||||
float curX_;
|
||||
|
|
|
@ -97,7 +97,7 @@ public:
|
|||
|
||||
protected:
|
||||
virtual void CreatePopupContents(UI::ViewGroup *parent) override;
|
||||
virtual void OnCompleted(DialogResult result);
|
||||
virtual void OnCompleted(DialogResult result) override;
|
||||
UI::EventReturn OnDigitButton(UI::EventParams &e);
|
||||
UI::EventReturn OnBackspace(UI::EventParams &e);
|
||||
|
||||
|
@ -114,7 +114,7 @@ private:
|
|||
class JitCompareScreen : public UIDialogScreenWithBackground {
|
||||
public:
|
||||
JitCompareScreen() : currentBlock_(-1) {}
|
||||
virtual void CreateViews();
|
||||
virtual void CreateViews() override;
|
||||
|
||||
private:
|
||||
void UpdateDisasm();
|
||||
|
|
|
@ -46,7 +46,7 @@ public:
|
|||
virtual bool axis(const AxisInput &axis) override;
|
||||
|
||||
protected:
|
||||
virtual void CreateViews();
|
||||
virtual void CreateViews() override;
|
||||
UI::EventReturn OnDevTools(UI::EventParams ¶ms);
|
||||
|
||||
private:
|
||||
|
|
|
@ -29,11 +29,11 @@ public:
|
|||
: UI::View(layoutParams), pointerDownMask_(0), scale_(scale), bgImg_(bgImg), img_(img), angle_(0.0f), flipImageH_(false) {
|
||||
}
|
||||
|
||||
virtual bool Key(const KeyInput &input) { return false; }
|
||||
virtual void Update(const InputState &input) {}
|
||||
virtual void Touch(const TouchInput &input);
|
||||
virtual void Draw(UIContext &dc);
|
||||
virtual void GetContentDimensions(const UIContext &dc, float &w, float &h) const;
|
||||
virtual bool Key(const KeyInput &input) override { return false; }
|
||||
virtual void Update(const InputState &input) override {}
|
||||
virtual void Touch(const TouchInput &input) override;
|
||||
virtual void Draw(UIContext &dc) override;
|
||||
virtual void GetContentDimensions(const UIContext &dc, float &w, float &h) const override;
|
||||
virtual bool IsDown() { return pointerDownMask_ != 0; }
|
||||
// chainable
|
||||
MultiTouchButton *FlipImageH(bool flip) { flipImageH_ = flip; return this; }
|
||||
|
@ -57,7 +57,7 @@ public:
|
|||
|
||||
}
|
||||
virtual void Touch(const TouchInput &input) override;
|
||||
virtual bool IsDown() { return *value_; }
|
||||
virtual bool IsDown() override { return *value_; }
|
||||
|
||||
private:
|
||||
bool *value_;
|
||||
|
@ -69,7 +69,7 @@ public:
|
|||
: MultiTouchButton(bgImg, img, scale, layoutParams), pspButtonBit_(pspButtonBit) {
|
||||
}
|
||||
void Touch(const TouchInput &input) override;
|
||||
virtual bool IsDown();
|
||||
virtual bool IsDown() override;
|
||||
|
||||
private:
|
||||
int pspButtonBit_;
|
||||
|
|
|
@ -34,7 +34,7 @@ class UIScreenWithBackground : public UIScreen {
|
|||
public:
|
||||
UIScreenWithBackground() : UIScreen() {}
|
||||
protected:
|
||||
virtual void DrawBackground(UIContext &dc);
|
||||
virtual void DrawBackground(UIContext &dc) override;
|
||||
virtual void sendMessage(const char *message, const char *value) override;
|
||||
virtual UI::EventReturn OnLanguageChange(UI::EventParams &e);
|
||||
};
|
||||
|
@ -52,7 +52,7 @@ class UIDialogScreenWithBackground : public UIDialogScreen {
|
|||
public:
|
||||
UIDialogScreenWithBackground() : UIDialogScreen() {}
|
||||
protected:
|
||||
virtual void DrawBackground(UIContext &dc);
|
||||
virtual void DrawBackground(UIContext &dc) override;
|
||||
virtual void sendMessage(const char *message, const char *value) override;
|
||||
virtual UI::EventReturn OnLanguageChange(UI::EventParams &e);
|
||||
|
||||
|
@ -63,7 +63,7 @@ class UIDialogScreenWithGameBackground : public UIDialogScreenWithBackground {
|
|||
public:
|
||||
UIDialogScreenWithGameBackground(const std::string &gamePath)
|
||||
: UIDialogScreenWithBackground(), gamePath_(gamePath) {}
|
||||
virtual void DrawBackground(UIContext &dc);
|
||||
virtual void DrawBackground(UIContext &dc) override;
|
||||
protected:
|
||||
std::string gamePath_;
|
||||
};
|
||||
|
@ -90,7 +90,7 @@ public:
|
|||
NewLanguageScreen(const std::string &title);
|
||||
|
||||
private:
|
||||
virtual void OnCompleted(DialogResult result);
|
||||
virtual void OnCompleted(DialogResult result) override;
|
||||
virtual bool ShowButtons() const override { return true; }
|
||||
std::map<std::string, std::pair<std::string, int>> langValuesMapping;
|
||||
std::map<std::string, std::string> titleCodeMapping;
|
||||
|
@ -102,7 +102,7 @@ public:
|
|||
PostProcScreen(const std::string &title);
|
||||
|
||||
private:
|
||||
virtual void OnCompleted(DialogResult result);
|
||||
virtual void OnCompleted(DialogResult result) override;
|
||||
virtual bool ShowButtons() const override { return true; }
|
||||
std::vector<ShaderInfo> shaders_;
|
||||
};
|
||||
|
@ -115,7 +115,7 @@ public:
|
|||
virtual void update(InputState &input) override;
|
||||
virtual void render() override;
|
||||
virtual void sendMessage(const char *message, const char *value) override;
|
||||
virtual void CreateViews() {}
|
||||
virtual void CreateViews() override {}
|
||||
|
||||
private:
|
||||
void Next();
|
||||
|
@ -129,7 +129,7 @@ public:
|
|||
virtual void update(InputState &input) override;
|
||||
virtual void render() override;
|
||||
|
||||
virtual void CreateViews();
|
||||
virtual void CreateViews() override;
|
||||
|
||||
private:
|
||||
UI::EventReturn OnOK(UI::EventParams &e);
|
||||
|
|
|
@ -128,7 +128,7 @@ protected:
|
|||
virtual bool FillVertical() const override { return false; }
|
||||
bool ShowButtons() const override { return true; }
|
||||
|
||||
virtual void CreatePopupContents(UI::ViewGroup *parent) {
|
||||
virtual void CreatePopupContents(UI::ViewGroup *parent) override {
|
||||
// TODO: Find an appropriate size for the image view
|
||||
parent->Add(new AsyncImageFileView(filename_, UI::IS_DEFAULT, NULL, new UI::LayoutParams(480, 272)))->SetCanBeFocused(false);
|
||||
}
|
||||
|
|
|
@ -31,10 +31,6 @@ int json_value::numSiblings() const {
|
|||
}
|
||||
|
||||
const json_value *json_value::get(const char *child_name) const {
|
||||
if (!this) {
|
||||
FLOG("Cannot get from null node");
|
||||
return 0;
|
||||
}
|
||||
if (!child_name) {
|
||||
FLOG("JSON: Cannot get from null child name");
|
||||
return 0;
|
||||
|
|
|
@ -251,8 +251,8 @@ void GLSLProgram::GLLost() {
|
|||
// glDeleteShader(this->fsh_);
|
||||
// glDeleteProgram(this->program_);
|
||||
ILOG("Restoring GLSL program %s/%s",
|
||||
this->vshader_filename ? this->vshader_filename : "(mem)",
|
||||
this->fshader_filename ? this->fshader_filename : "(mem)");
|
||||
strlen(this->vshader_filename) > 0 ? this->vshader_filename : "(mem)",
|
||||
strlen(this->fshader_filename) > 0 ? this->fshader_filename : "(mem)");
|
||||
this->program_ = 0;
|
||||
this->vsh_ = 0;
|
||||
this->fsh_ = 0;
|
||||
|
|
|
@ -274,10 +274,10 @@ public:
|
|||
|
||||
int GetUniformLoc(const char *name);
|
||||
|
||||
void SetVector(const char *name, float *value, int n);
|
||||
void SetVector(const char *name, float *value, int n) override;
|
||||
void SetMatrix4x4(const char *name, const Matrix4x4 &value) override;
|
||||
|
||||
void GLLost() {
|
||||
void GLLost() override {
|
||||
vshader->Compile(vshader->GetSource().c_str());
|
||||
fshader->Compile(fshader->GetSource().c_str());
|
||||
Link();
|
||||
|
@ -317,8 +317,8 @@ public:
|
|||
}
|
||||
|
||||
// The implementation makes the choice of which shader code to use.
|
||||
Thin3DShader *CreateVertexShader(const char *glsl_source, const char *hlsl_source);
|
||||
Thin3DShader *CreateFragmentShader(const char *glsl_source, const char *hlsl_source);
|
||||
Thin3DShader *CreateVertexShader(const char *glsl_source, const char *hlsl_source) override;
|
||||
Thin3DShader *CreateFragmentShader(const char *glsl_source, const char *hlsl_source) override;
|
||||
|
||||
void SetScissorEnabled(bool enable) override {
|
||||
if (enable) {
|
||||
|
@ -424,7 +424,7 @@ public:
|
|||
glGenTextures(1, &tex_);
|
||||
register_gl_resource_holder(this);
|
||||
}
|
||||
Thin3DGLTexture(T3DTextureType type, T3DImageFormat format, int width, int height, int depth, int mipLevels) : format_(format), tex_(0), target_(TypeToTarget(type)), mipLevels_(mipLevels) {
|
||||
Thin3DGLTexture(T3DTextureType type, T3DImageFormat format, int width, int height, int depth, int mipLevels) : tex_(0), target_(TypeToTarget(type)), format_(format), mipLevels_(mipLevels) {
|
||||
width_ = width;
|
||||
height_ = height;
|
||||
depth_ = depth;
|
||||
|
@ -436,7 +436,7 @@ public:
|
|||
Destroy();
|
||||
}
|
||||
|
||||
bool Create(T3DTextureType type, T3DImageFormat format, int width, int height, int depth, int mipLevels) {
|
||||
bool Create(T3DTextureType type, T3DImageFormat format, int width, int height, int depth, int mipLevels) override {
|
||||
format_ = format;
|
||||
target_ = TypeToTarget(type);
|
||||
mipLevels_ = mipLevels;
|
||||
|
@ -459,7 +459,7 @@ public:
|
|||
glBindTexture(target_, tex_);
|
||||
}
|
||||
|
||||
void GLLost() {
|
||||
void GLLost() override {
|
||||
if (!filename_.empty()) {
|
||||
if (LoadFromFile(filename_.c_str())) {
|
||||
ILOG("Reloaded lost texture %s", filename_.c_str());
|
||||
|
@ -471,7 +471,7 @@ public:
|
|||
tex_ = 0;
|
||||
}
|
||||
}
|
||||
void Finalize(int zim_flags);
|
||||
void Finalize(int zim_flags) override;
|
||||
|
||||
private:
|
||||
GLuint tex_;
|
||||
|
|
|
@ -27,7 +27,7 @@ protected:
|
|||
virtual void CreateViews() = 0;
|
||||
virtual void DrawBackground(UIContext &dc) {}
|
||||
|
||||
virtual void RecreateViews() { recreateViews_ = true; }
|
||||
virtual void RecreateViews() override { recreateViews_ = true; }
|
||||
|
||||
UI::ViewGroup *root_;
|
||||
|
||||
|
|
|
@ -337,6 +337,7 @@ public:
|
|||
|
||||
virtual bool CanBeFocused() const { return true; }
|
||||
virtual bool SubviewFocused(View *view) { return false; }
|
||||
|
||||
bool HasFocus() const {
|
||||
return GetFocusedView() == this;
|
||||
}
|
||||
|
@ -583,7 +584,7 @@ public:
|
|||
|
||||
protected:
|
||||
// hackery
|
||||
virtual bool IsSticky() const { return true; }
|
||||
bool IsSticky() const override { return true; }
|
||||
};
|
||||
|
||||
class InfoItem : public Item {
|
||||
|
@ -655,7 +656,7 @@ public:
|
|||
: InertView(layoutParams), size_(0.0f) {}
|
||||
Spacer(float size, LayoutParams *layoutParams = 0)
|
||||
: InertView(layoutParams), size_(size) {}
|
||||
virtual void GetContentDimensions(const UIContext &dc, float &w, float &h) const {
|
||||
void GetContentDimensions(const UIContext &dc, float &w, float &h) const override {
|
||||
w = size_; h = size_;
|
||||
}
|
||||
void Draw(UIContext &dc) override {}
|
||||
|
|
|
@ -29,9 +29,9 @@ public:
|
|||
virtual void Axis(const AxisInput &input) override;
|
||||
|
||||
// By default, a container will layout to its own bounds.
|
||||
virtual void Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert) = 0;
|
||||
virtual void Layout() = 0;
|
||||
virtual void Update(const InputState &input_state);
|
||||
virtual void Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert) override = 0;
|
||||
virtual void Layout() override = 0;
|
||||
virtual void Update(const InputState &input_state) override;
|
||||
|
||||
virtual void Draw(UIContext &dc) override;
|
||||
|
||||
|
@ -48,7 +48,7 @@ public:
|
|||
}
|
||||
|
||||
virtual bool SetFocus() override;
|
||||
virtual bool SubviewFocused(View *view);
|
||||
virtual bool SubviewFocused(View *view) override;
|
||||
virtual void RemoveSubview(View *view);
|
||||
|
||||
void SetDefaultFocusView(View *view) { defaultFocusView_ = view; }
|
||||
|
@ -57,8 +57,8 @@ public:
|
|||
// Assumes that layout has taken place.
|
||||
NeighborResult FindNeighbor(View *view, FocusDirection direction, NeighborResult best);
|
||||
|
||||
virtual bool CanBeFocused() const { return false; }
|
||||
virtual bool IsViewGroup() const { return true; }
|
||||
virtual bool CanBeFocused() const override { return false; }
|
||||
virtual bool IsViewGroup() const override { return true; }
|
||||
|
||||
virtual void SetBG(const Drawable &bg) { bg_ = bg; }
|
||||
|
||||
|
@ -85,8 +85,8 @@ protected:
|
|||
// It simply centers the child view.
|
||||
class FrameLayout : public ViewGroup {
|
||||
public:
|
||||
void Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert);
|
||||
void Layout();
|
||||
void Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert) override;
|
||||
void Layout() override;
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -342,7 +342,7 @@ public:
|
|||
virtual View *CreateItemView(int index) override;
|
||||
virtual int GetNumItems() override { return (int)items_.size(); }
|
||||
virtual bool AddEventCallback(View *view, std::function<EventReturn(EventParams&)> callback) override;
|
||||
void SetSelected(int sel) { selected_ = sel; }
|
||||
void SetSelected(int sel) override { selected_ = sel; }
|
||||
virtual std::string GetTitle(int index) const override { return items_[index]; }
|
||||
virtual int GetSelected() override { return selected_; }
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue