mirror of
https://github.com/ran-j/PS2Recomp.git
synced 2026-09-26 08:51:05 -04:00
44 lines
927 B
C++
44 lines
927 B
C++
#pragma once
|
|
|
|
#include <string_view>
|
|
#include "ps2_call_list.h"
|
|
|
|
namespace ps2_runtime_calls
|
|
{
|
|
inline constexpr std::string_view kSyscallNames[] = {
|
|
#define PS2_SYSCALL_NAME(name) std::string_view{#name},
|
|
PS2_SYSCALL_LIST(PS2_SYSCALL_NAME)
|
|
#undef PS2_SYSCALL_NAME
|
|
};
|
|
|
|
inline constexpr std::string_view kStubNames[] = {
|
|
#define PS2_STUB_NAME(name) std::string_view{#name},
|
|
PS2_STUB_LIST(PS2_STUB_NAME)
|
|
#undef PS2_STUB_NAME
|
|
};
|
|
|
|
inline bool isSyscallName(std::string_view name)
|
|
{
|
|
for (auto entry : kSyscallNames)
|
|
{
|
|
if (entry == name)
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
inline bool isStubName(std::string_view name)
|
|
{
|
|
for (auto entry : kStubNames)
|
|
{
|
|
if (entry == name)
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
}
|