some libc HLE functions needed for sonic mania
This commit is contained in:
parent
ad83c454a7
commit
189d177692
|
@ -54,7 +54,6 @@ void PS4_SYSV_ABI qsort(void* ptr, size_t count,size_t size, int(PS4_SYSV_ABI* c
|
||||||
std::qsort(ptr, count, size, qsort_compair);
|
std::qsort(ptr, count, size, qsort_compair);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LibC_Register(SymbolsResolver* sym) {
|
void LibC_Register(SymbolsResolver* sym) {
|
||||||
LIB_FUNCTION("bzQExy189ZI", "libc", 1, "libc", 1, 1, init_env);
|
LIB_FUNCTION("bzQExy189ZI", "libc", 1, "libc", 1, 1, init_env);
|
||||||
LIB_FUNCTION("3GPpjQdAMTw", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::Cxa::__cxa_guard_acquire);
|
LIB_FUNCTION("3GPpjQdAMTw", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::Cxa::__cxa_guard_acquire);
|
||||||
|
@ -79,7 +78,13 @@ void LibC_Register(SymbolsResolver* sym) {
|
||||||
LIB_FUNCTION("j4ViWNHEgww", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::strlen);
|
LIB_FUNCTION("j4ViWNHEgww", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::strlen);
|
||||||
LIB_FUNCTION("6sJWiWSRuqk", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::strncpy);
|
LIB_FUNCTION("6sJWiWSRuqk", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::strncpy);
|
||||||
LIB_FUNCTION("+P6FRGH4LfA", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::memmove);
|
LIB_FUNCTION("+P6FRGH4LfA", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::memmove);
|
||||||
|
LIB_FUNCTION("kiZSXIWd9vg", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::strcpy);
|
||||||
|
LIB_FUNCTION("Ls4tzzhimqQ", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::strcat);
|
||||||
LIB_FUNCTION("EH-x713A99c", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::atan2f);
|
LIB_FUNCTION("EH-x713A99c", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::atan2f);
|
||||||
|
LIB_FUNCTION("QI-x0SL8jhw", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::acosf);
|
||||||
|
LIB_FUNCTION("ZE6RNL+eLbk", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::tanf);
|
||||||
|
LIB_FUNCTION("GZWjF-YIFFk", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::asinf);
|
||||||
|
|
||||||
LIB_OBJ("P330P3dFF68", "libc", 1, "libc", 1, 1, &HLE::Libs::LibC::g_need_sceLibc);
|
LIB_OBJ("P330P3dFF68", "libc", 1, "libc", 1, 1, &HLE::Libs::LibC::g_need_sceLibc);
|
||||||
|
|
||||||
LIB_FUNCTION("z+P+xCnWLBk", "libc", 1, "libc", 1, 1, _ZdlPv);
|
LIB_FUNCTION("z+P+xCnWLBk", "libc", 1, "libc", 1, 1, _ZdlPv);
|
||||||
|
|
|
@ -43,6 +43,16 @@ char* PS4_SYSV_ABI strncpy(char* dest, const char* src, size_t count) { return s
|
||||||
|
|
||||||
void* PS4_SYSV_ABI memmove(void* dest, const void* src, std::size_t count) { return std::memmove(dest, src, count); }
|
void* PS4_SYSV_ABI memmove(void* dest, const void* src, std::size_t count) { return std::memmove(dest, src, count); }
|
||||||
|
|
||||||
|
char* PS4_SYSV_ABI strcpy(char* dest, const char* src) { return std::strcpy(dest, src); }
|
||||||
|
|
||||||
|
char* PS4_SYSV_ABI strcat(char* dest, const char* src) { return std::strcat(dest, src); }
|
||||||
|
|
||||||
|
// math
|
||||||
float PS4_SYSV_ABI atan2f(float y, float x) { return std::atan2f(y, x); }
|
float PS4_SYSV_ABI atan2f(float y, float x) { return std::atan2f(y, x); }
|
||||||
|
|
||||||
|
float PS4_SYSV_ABI acosf(float num) { return std::acosf(num); }
|
||||||
|
|
||||||
|
float PS4_SYSV_ABI tanf(float num) { return std::tanf(num); }
|
||||||
|
|
||||||
|
float PS4_SYSV_ABI asinf(float num) { return std::asinf(num); }
|
||||||
}; // namespace Emulator::HLE::Libraries::LibC
|
}; // namespace Emulator::HLE::Libraries::LibC
|
|
@ -20,6 +20,11 @@ int PS4_SYSV_ABI strcmp(const char* str1, const char* str2);
|
||||||
size_t PS4_SYSV_ABI strlen(const char* str);
|
size_t PS4_SYSV_ABI strlen(const char* str);
|
||||||
char* PS4_SYSV_ABI strncpy(char* dest, const char* src, size_t count);
|
char* PS4_SYSV_ABI strncpy(char* dest, const char* src, size_t count);
|
||||||
void* PS4_SYSV_ABI memmove(void* dest, const void* src, std::size_t count);
|
void* PS4_SYSV_ABI memmove(void* dest, const void* src, std::size_t count);
|
||||||
|
char* PS4_SYSV_ABI strcpy(char* destination, const char* source);
|
||||||
|
char* PS4_SYSV_ABI strcat(char* dest, const char* src);
|
||||||
float PS4_SYSV_ABI atan2f(float y, float x);
|
float PS4_SYSV_ABI atan2f(float y, float x);
|
||||||
|
float PS4_SYSV_ABI acosf(float num);
|
||||||
|
float PS4_SYSV_ABI tanf(float num);
|
||||||
|
float PS4_SYSV_ABI asinf(float num);
|
||||||
|
|
||||||
} // namespace Emulator::HLE::Libraries::LibC
|
} // namespace Emulator::HLE::Libraries::LibC
|
Loading…
Reference in New Issue