clang-format: pcsx2/IopBios.h and pcsx2/IopBios.cpp

This commit is contained in:
Francisco Javier Trujillo Mata 2021-04-18 01:50:52 +02:00 committed by refractionpcsx2
parent 4bf3819778
commit 4402bbda55
2 changed files with 857 additions and 778 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
/* PCSX2 - PS2 Emulator for PCs /* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2010 PCSX2 Dev Team * Copyright (C) 2002-2021 PCSX2 Dev Team
* *
* PCSX2 is free software: you can redistribute it and/or modify it under the terms * PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found- * of the GNU Lesser General Public License as published by the Free Software Found-
@ -16,30 +16,31 @@
#ifndef __PSXBIOS_H__ #ifndef __PSXBIOS_H__
#define __PSXBIOS_H__ #define __PSXBIOS_H__
#define IOP_ENOENT 2 #define IOP_ENOENT 2
#define IOP_EIO 5 #define IOP_EIO 5
#define IOP_ENOMEM 12 #define IOP_ENOMEM 12
#define IOP_EACCES 13 #define IOP_EACCES 13
#define IOP_ENODEV 19 #define IOP_ENODEV 19
#define IOP_EISDIR 21 #define IOP_EISDIR 21
#define IOP_EMFILE 24 #define IOP_EMFILE 24
#define IOP_EROFS 30 #define IOP_EROFS 30
#define IOP_O_RDONLY 0x001 #define IOP_O_RDONLY 0x001
#define IOP_O_WRONLY 0x002 #define IOP_O_WRONLY 0x002
#define IOP_O_RDWR 0x003 #define IOP_O_RDWR 0x003
#define IOP_O_APPEND 0x100 #define IOP_O_APPEND 0x100
#define IOP_O_CREAT 0x200 #define IOP_O_CREAT 0x200
#define IOP_O_TRUNC 0x400 #define IOP_O_TRUNC 0x400
#define IOP_O_EXCL 0x800 #define IOP_O_EXCL 0x800
#define IOP_SEEK_SET 0 #define IOP_SEEK_SET 0
#define IOP_SEEK_CUR 1 #define IOP_SEEK_CUR 1
#define IOP_SEEK_END 2 #define IOP_SEEK_END 2
class IOManFile { class IOManFile
{
public: public:
static int open(IOManFile **file, const std::string &path, s32 flags, u16 mode) static int open(IOManFile** file, const std::string& path, s32 flags, u16 mode)
{ {
return -IOP_ENODEV; return -IOP_ENODEV;
} }
@ -47,22 +48,23 @@ public:
virtual void close() = 0; virtual void close() = 0;
virtual int lseek(s32 offset, s32 whence) { return -IOP_EIO; } virtual int lseek(s32 offset, s32 whence) { return -IOP_EIO; }
virtual int read(void *buf, u32 count) { return -IOP_EIO; } virtual int read(void* buf, u32 count) { return -IOP_EIO; }
virtual int write(void *buf, u32 count) { return -IOP_EIO; } virtual int write(void* buf, u32 count) { return -IOP_EIO; }
}; };
class IOManDir { class IOManDir
{
// Don't think about it until we know the loaded ioman version. // Don't think about it until we know the loaded ioman version.
// The dirent structure changed between versions. // The dirent structure changed between versions.
public: public:
static int open(IOManDir **dir, const std::string &full_path) static int open(IOManDir** dir, const std::string& full_path)
{ {
return -IOP_ENODEV; return -IOP_ENODEV;
} }
virtual void close() = 0; virtual void close() = 0;
virtual int read(void *buf) { return -IOP_EIO; } virtual int read(void* buf) { return -IOP_EIO; }
}; };
typedef int (*irxHLE)(); // return 1 if handled, otherwise 0 typedef int (*irxHLE)(); // return 1 if handled, otherwise 0
@ -71,18 +73,18 @@ typedef void (*irxDEBUG)();
namespace R3000A namespace R3000A
{ {
u32 irxImportTableAddr(u32 entrypc); u32 irxImportTableAddr(u32 entrypc);
const char* irxImportFuncname(const std::string &libname, u16 index); const char* irxImportFuncname(const std::string& libname, u16 index);
irxHLE irxImportHLE(const std::string &libnam, u16 index); irxHLE irxImportHLE(const std::string& libnam, u16 index);
irxDEBUG irxImportDebug(const std::string & libname, u16 index); irxDEBUG irxImportDebug(const std::string& libname, u16 index);
void irxImportLog(const std::string &libnameptr, u16 index, const char *funcname); void irxImportLog(const std::string& libnameptr, u16 index, const char* funcname);
void __fastcall irxImportLog_rec(u32 import_table, u16 index, const char *funcname); void __fastcall irxImportLog_rec(u32 import_table, u16 index, const char* funcname);
int irxImportExec(u32 import_table, u16 index); int irxImportExec(u32 import_table, u16 index);
namespace ioman namespace ioman
{ {
void reset(); void reset();
} }
} } // namespace R3000A
extern void Hle_SetElfPath(const char* elfFileName); extern void Hle_SetElfPath(const char* elfFileName);