diff --git a/src/ArmsItem.h b/src/ArmsItem.h index be9bc84b..8f777a6a 100644 --- a/src/ArmsItem.h +++ b/src/ArmsItem.h @@ -11,7 +11,7 @@ extern "C" { // "Num" often means "ammo" here /// Weapon struct -struct ARMS +typedef struct ARMS { /// ID of the weapon int code; @@ -27,13 +27,13 @@ struct ARMS /// Current ammunition int num; -}; +} ARMS; -struct ITEM +typedef struct ITEM { /// ID of the item int code; -}; +} ITEM; // Limits for the amount of weapons and items diff --git a/src/Dialog.cpp b/src/Dialog.cpp index f57fe31f..ab33b6ca 100644 --- a/src/Dialog.cpp +++ b/src/Dialog.cpp @@ -19,8 +19,6 @@ static const char *version_string = // TODO - Inaccurate stack frame INT_PTR __stdcall VersionDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { - (void)lParam; - char string_buffer[104]; int year; @@ -32,6 +30,8 @@ INT_PTR __stdcall VersionDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lPara int version3; int version4; + (void)lParam; + switch (Msg) { case WM_INITDIALOG: @@ -104,10 +104,10 @@ INT_PTR __stdcall DebugMuteDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lPa INT_PTR __stdcall DebugSaveDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { - (void)lParam; - char string[100]; + (void)lParam; + switch (Msg) { case WM_INITDIALOG: diff --git a/src/Dialog.h b/src/Dialog.h index 6ff69e82..35b1a6ad 100644 --- a/src/Dialog.h +++ b/src/Dialog.h @@ -2,7 +2,15 @@ #include "WindowsWrapper.h" +#ifdef __cplusplus +extern "C" { +#endif + INT_PTR __stdcall VersionDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); INT_PTR __stdcall DebugMuteDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); INT_PTR __stdcall DebugSaveDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); INT_PTR __stdcall QuitDialog(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); + +#ifdef __cplusplus +} +#endif diff --git a/src/Generic.h b/src/Generic.h index 9259689e..cb3ec376 100644 --- a/src/Generic.h +++ b/src/Generic.h @@ -2,6 +2,10 @@ #include "WindowsWrapper.h" +#ifdef __cplusplus +extern "C" { +#endif + void GetCompileDate(int *year, int *month, int *day); BOOL GetCompileVersion(int *v1, int *v2, int *v3, int *v4); BOOL OpenVolumeConfiguration(HWND hWnd); @@ -16,3 +20,7 @@ BOOL CenterWindow(HWND hWnd); BOOL LoadWindowRect(HWND hWnd, const char *filename, BOOL unknown); BOOL SaveWindowRect(HWND hWnd, const char *filename); BOOL IsEnableBitmap(const char *path); + +#ifdef __cplusplus +} +#endif diff --git a/src/Profile.h b/src/Profile.h index 7298a230..a2efac5e 100644 --- a/src/Profile.h +++ b/src/Profile.h @@ -6,7 +6,11 @@ #include "SelStage.h" #include "Stage.h" -struct PROFILE +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct PROFILE { char code[8]; int stage; @@ -29,9 +33,13 @@ struct PROFILE signed char permit_mapping[0x80]; char FLAG[4]; unsigned char flags[1000]; -}; +} PROFILE; BOOL IsProfile(void); BOOL SaveProfile(const char *name); BOOL LoadProfile(const char *name); BOOL InitializeGame(HWND hWnd); + +#ifdef __cplusplus +} +#endif diff --git a/src/SelStage.h b/src/SelStage.h index 419b94b7..b7c47b53 100644 --- a/src/SelStage.h +++ b/src/SelStage.h @@ -2,11 +2,15 @@ #include "WindowsWrapper.h" -struct PERMIT_STAGE +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct PERMIT_STAGE { int index; int event; -}; +} PERMIT_STAGE; extern PERMIT_STAGE gPermitStage[8]; @@ -16,3 +20,7 @@ BOOL SubPermitStage(int index); void MoveStageSelectCursor(void); void PutStageSelectObject(void); int StageSelectLoop(int *p_event); + +#ifdef __cplusplus +} +#endif diff --git a/vs2003/CSE2.vcproj b/vs2003/CSE2.vcproj index 47797702..033252f3 100644 --- a/vs2003/CSE2.vcproj +++ b/vs2003/CSE2.vcproj @@ -243,6 +243,12 @@ + + +