Add infamous #ifdef __cplusplus idiom

This commit is contained in:
Renato Rotenberg
2023-02-06 21:47:13 -03:00
parent c3eadb01b1
commit b873542526
2 changed files with 14 additions and 5 deletions
+8
View File
@@ -15,6 +15,10 @@
#define SM64_LIB_FN
#endif
#ifdef __cplusplus
extern "C" {
#endif
struct SM64Surface
{
int16_t type;
@@ -186,4 +190,8 @@ extern SM64_LIB_FN void sm64_play_sound(int32_t soundBits, float *pos);
extern SM64_LIB_FN void sm64_play_sound_global(int32_t soundBits);
extern SM64_LIB_FN void sm64_set_sound_volume(float vol);
#ifdef __cplusplus
}
#endif
#endif//LIB_SM64_H
+2 -1
View File
@@ -9,8 +9,9 @@
#include <unistd.h>
#include <pthread.h>
extern "C" {
#include "../src/libsm64.h"
extern "C" {
#define SDL_MAIN_HANDLED
#include "level.h"
#include "context.h"