diff options
| author | 2014-04-10 22:15:07 -0400 | |
|---|---|---|
| committer | 2014-04-10 22:15:07 -0400 | |
| commit | 3bd041f5b0cd481ded892594d569462492679e39 (patch) | |
| tree | 6f4c64d1ae09983b8c4d2b8c10f3fa51bef01507 /src | |
| parent | - removed syscall classes (will just use HLEFunction) (diff) | |
| download | yuzu-3bd041f5b0cd481ded892594d569462492679e39.tar.gz yuzu-3bd041f5b0cd481ded892594d569462492679e39.tar.xz yuzu-3bd041f5b0cd481ded892594d569462492679e39.zip | |
changed some naming/misc cleanups
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/hle.h | 28 | ||||
| -rw-r--r-- | src/core/hle/hle_syscall.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/hle_syscall.h | 3 |
4 files changed, 20 insertions, 21 deletions
diff --git a/src/core/hle.cpp b/src/core/hle.cpp index f0c7d2178..8dad7695b 100644 --- a/src/core/hle.cpp +++ b/src/core/hle.cpp | |||
| @@ -11,10 +11,10 @@ | |||
| 11 | 11 | ||
| 12 | namespace HLE { | 12 | namespace HLE { |
| 13 | 13 | ||
| 14 | static std::vector<HLEModule> g_module_db; | 14 | static std::vector<ModuleDef> g_module_db; |
| 15 | 15 | ||
| 16 | void RegisterModule(const char *name, int num_functions, const HLEFunction *func_table) { | 16 | void RegisterModule(std::string name, int num_functions, const FunctionDef* func_table) { |
| 17 | HLEModule module = {name, num_functions, func_table}; | 17 | ModuleDef module = {name, num_functions, func_table}; |
| 18 | g_module_db.push_back(module); | 18 | g_module_db.push_back(module); |
| 19 | } | 19 | } |
| 20 | 20 | ||
diff --git a/src/core/hle/hle.h b/src/core/hle/hle.h index 6648c787f..35c8a4621 100644 --- a/src/core/hle/hle.h +++ b/src/core/hle/hle.h | |||
| @@ -9,29 +9,31 @@ | |||
| 9 | 9 | ||
| 10 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 10 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 11 | 11 | ||
| 12 | typedef void (*HLEFunc)(); | 12 | #define PARAM(n) Core::g_app_core->GetReg(n) |
| 13 | #define RETURN(n) Core::g_app_core->SetReg(0, n) | ||
| 14 | |||
| 15 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 16 | |||
| 17 | namespace HLE { | ||
| 13 | 18 | ||
| 14 | struct HLEFunction { | 19 | typedef void (*Func)(); |
| 20 | |||
| 21 | struct FunctionDef { | ||
| 15 | u32 id; | 22 | u32 id; |
| 16 | HLEFunc func; | 23 | Func func; |
| 17 | const char* name; | 24 | std::string name; |
| 18 | }; | 25 | }; |
| 19 | 26 | ||
| 20 | struct HLEModule { | 27 | struct ModuleDef { |
| 21 | const char* name; | 28 | std::string name; |
| 22 | int num_funcs; | 29 | int num_funcs; |
| 23 | const HLEFunction* func_table; | 30 | const FunctionDef* func_table; |
| 24 | }; | 31 | }; |
| 25 | 32 | ||
| 26 | #define PARAM(n) Core::g_app_core->GetReg(n) | ||
| 27 | #define RETURN(n) Core::g_app_core->SetReg(0, n) | ||
| 28 | |||
| 29 | namespace HLE { | ||
| 30 | |||
| 31 | void Init(); | 33 | void Init(); |
| 32 | 34 | ||
| 33 | void Shutdown(); | 35 | void Shutdown(); |
| 34 | 36 | ||
| 35 | void RegisterModule(const char *name, int num_functions, const HLEFunction *func_table); | 37 | void RegisterModule(std::string name, int num_functions, const FunctionDef *func_table); |
| 36 | 38 | ||
| 37 | } // namespace | 39 | } // namespace |
diff --git a/src/core/hle/hle_syscall.cpp b/src/core/hle/hle_syscall.cpp index b17a2e220..fdcaa914f 100644 --- a/src/core/hle/hle_syscall.cpp +++ b/src/core/hle/hle_syscall.cpp | |||
| @@ -15,10 +15,10 @@ Result SVC_ConnectToPort(void* out, const char* port_name) { | |||
| 15 | return 0; | 15 | return 0; |
| 16 | } | 16 | } |
| 17 | 17 | ||
| 18 | const HLEFunction SysCallTable[] = { | 18 | const HLE::FunctionDef SysCall_Table[] = { |
| 19 | {0x2D, WrapI_VC<SVC_ConnectToPort>, "svcConnectToPort"}, | 19 | {0x2D, WrapI_VC<SVC_ConnectToPort>, "svcConnectToPort"}, |
| 20 | }; | 20 | }; |
| 21 | 21 | ||
| 22 | void Register_SysCall() { | 22 | void Register_SysCall() { |
| 23 | HLE::RegisterModule("SysCallTable", ARRAY_SIZE(SysCallTable), SysCallTable); | 23 | HLE::RegisterModule("SysCallTable", ARRAY_SIZE(SysCall_Table), SysCall_Table); |
| 24 | } | 24 | } |
diff --git a/src/core/hle/hle_syscall.h b/src/core/hle/hle_syscall.h index 643af0bf4..4faa14535 100644 --- a/src/core/hle/hle_syscall.h +++ b/src/core/hle/hle_syscall.h | |||
| @@ -34,7 +34,4 @@ | |||
| 34 | // } | 34 | // } |
| 35 | //}; | 35 | //}; |
| 36 | 36 | ||
| 37 | |||
| 38 | |||
| 39 | |||
| 40 | void Register_SysCall(); | 37 | void Register_SysCall(); |