2020-05-25 06:17:10 +02:00
|
|
|
#ifndef _SM64_PLATFORM_H_
|
|
|
|
#define _SM64_PLATFORM_H_
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
2020-05-25 23:54:51 +02:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2020-05-25 06:17:10 +02:00
|
|
|
|
|
|
|
/* Platform-specific functions and whatnot */
|
|
|
|
|
|
|
|
#define SYS_MAX_PATH 1024 // FIXME: define this on different platforms
|
|
|
|
|
2020-06-07 20:05:26 +02:00
|
|
|
// NULL terminated list of platform specific read-only data paths
|
|
|
|
extern const char *sys_ropaths[];
|
|
|
|
|
2020-05-25 23:54:51 +02:00
|
|
|
// crossplatform impls of misc stuff
|
|
|
|
char *sys_strdup(const char *src);
|
|
|
|
char *sys_strlwr(char *src);
|
|
|
|
int sys_strcasecmp(const char *s1, const char *s2);
|
|
|
|
|
|
|
|
// path stuff
|
2020-06-07 20:05:26 +02:00
|
|
|
const char *sys_user_path(void);
|
2020-05-25 06:17:10 +02:00
|
|
|
const char *sys_exe_path(void);
|
2020-06-07 20:05:26 +02:00
|
|
|
const char *sys_file_extension(const char *fname);
|
|
|
|
|
|
|
|
// shows an error message in some way and terminates the game
|
|
|
|
void sys_fatal(const char *fmt, ...) __attribute__ ((noreturn));
|
2020-05-25 06:17:10 +02:00
|
|
|
|
|
|
|
#endif // _SM64_PLATFORM_H_
|