mirror of
https://github.com/libsm64/libsm64.git
synced 2025-01-22 07:32:04 -05:00
Merge pull request #36 from Brawmario/feature/cpp-include
Add infamous `#ifdef __cplusplus` idiom
This commit is contained in:
commit
cf01dcddfb
2 changed files with 13 additions and 4 deletions
|
@ -15,6 +15,10 @@
|
|||
#define SM64_LIB_FN
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct SM64Surface
|
||||
{
|
||||
int16_t type;
|
||||
|
@ -105,9 +109,9 @@ struct SM64SurfaceCollisionData
|
|||
int8_t room;
|
||||
int32_t lowerY; // libsm64: 32 bit
|
||||
int32_t upperY; // libsm64: 32 bit
|
||||
int32_t vertex1[3]; // libsm64: 32 bit
|
||||
int32_t vertex2[3]; // libsm64: 32 bit
|
||||
int32_t vertex3[3]; // libsm64: 32 bit
|
||||
int32_t vertex1[3]; // libsm64: 32 bit
|
||||
int32_t vertex2[3]; // libsm64: 32 bit
|
||||
int32_t vertex3[3]; // libsm64: 32 bit
|
||||
struct {
|
||||
float x;
|
||||
float y;
|
||||
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue