mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-07-27 17:41:49 +03:00
Compare commits
5 Commits
191b989116
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 391148415c | |||
| 05a5abbfbd | |||
| 8c70c9eb97 | |||
| 85dae94d2e | |||
| 08aa7c9087 |
@@ -51,18 +51,18 @@ endif()
|
|||||||
# RPATH
|
# RPATH
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||||
set(BIN_LIBROOT "Frameworks")
|
|
||||||
set(BIN_RPATH "@executable_path/Frameworks")
|
set(BIN_RPATH "@executable_path/Frameworks")
|
||||||
elseif(APPLE)
|
elseif(APPLE)
|
||||||
set(BIN_LIBROOT "osx")
|
|
||||||
set(BIN_RPATH "@executable_path/osx")
|
set(BIN_RPATH "@executable_path/osx")
|
||||||
elseif(CMAKE_SIZEOF_VOID_P MATCHES "8")
|
|
||||||
set(BIN_LIBROOT "lib64")
|
|
||||||
set(BIN_RPATH "\$ORIGIN/lib64")
|
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--disable-new-dtags")
|
|
||||||
else()
|
else()
|
||||||
set(BIN_LIBROOT "lib")
|
SET(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} "-Wl,--disable-new-dtags")
|
||||||
set(BIN_RPATH "\$ORIGIN/lib")
|
|
||||||
|
if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
||||||
|
# Naming quirk for backward compatibility
|
||||||
|
SET(BIN_RPATH "\$ORIGIN/lib64")
|
||||||
|
else()
|
||||||
|
SET(BIN_RPATH "\$ORIGIN/lib${CMAKE_SYSTEM_PROCESSOR}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_SKIP_BUILD_RPATH TRUE)
|
set(CMAKE_SKIP_BUILD_RPATH TRUE)
|
||||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||||
|
|||||||
@@ -381,15 +381,22 @@ public:
|
|||||||
MusicTrack(SDL_RWops *rw, const char* _id, bool _loose_extra)
|
MusicTrack(SDL_RWops *rw, const char* _id, bool _loose_extra)
|
||||||
{
|
{
|
||||||
SDL_zerop(this);
|
SDL_zerop(this);
|
||||||
|
|
||||||
|
id = SDL_strdup(_id);
|
||||||
|
loose_extra = _loose_extra;
|
||||||
|
|
||||||
|
if (rw->size(rw) <= 1)
|
||||||
|
{
|
||||||
|
// Don't bother
|
||||||
|
vlog_debug("Skipping empty music track");
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
read_buf = (Uint8*) SDL_malloc(rw->size(rw));
|
read_buf = (Uint8*) SDL_malloc(rw->size(rw));
|
||||||
SDL_RWread(rw, read_buf, rw->size(rw), 1);
|
SDL_RWread(rw, read_buf, rw->size(rw), 1);
|
||||||
int err;
|
int err;
|
||||||
stb_vorbis_info vorbis_info;
|
stb_vorbis_info vorbis_info;
|
||||||
stb_vorbis_comment vorbis_comment;
|
stb_vorbis_comment vorbis_comment;
|
||||||
|
|
||||||
id = SDL_strdup(_id);
|
|
||||||
|
|
||||||
loose_extra = _loose_extra;
|
|
||||||
vorbis = stb_vorbis_open_memory(read_buf, rw->size(rw), &err, NULL);
|
vorbis = stb_vorbis_open_memory(read_buf, rw->size(rw), &err, NULL);
|
||||||
if (vorbis == NULL)
|
if (vorbis == NULL)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -347,7 +347,7 @@ void scriptclass::run(void)
|
|||||||
int current = 0;
|
int current = 0;
|
||||||
|
|
||||||
// Crawl through the string
|
// Crawl through the string
|
||||||
for (int i = 0; i < words[1].size(); i++)
|
for (size_t i = 0; i < words[1].size(); i++)
|
||||||
{
|
{
|
||||||
// If the current character is a number, add it to the current version part
|
// If the current character is a number, add it to the current version part
|
||||||
if (words[1][i] >= '0' && words[1][i] <= '9')
|
if (words[1][i] >= '0' && words[1][i] <= '9')
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
/* Steamworks interface versions */
|
/* Steamworks interface versions */
|
||||||
|
|
||||||
#define VVVVVV_STEAMCLIENT "SteamClient017"
|
#define VVVVVV_STEAMCLIENT "SteamClient023"
|
||||||
#define VVVVVV_STEAMUSERSTATS "STEAMUSERSTATS_INTERFACE_VERSION011"
|
#define VVVVVV_STEAMUSERSTATS "STEAMUSERSTATS_INTERFACE_VERSION013"
|
||||||
#define VVVVVV_STEAMSCREENSHOTS "STEAMSCREENSHOTS_INTERFACE_VERSION003"
|
#define VVVVVV_STEAMSCREENSHOTS "STEAMSCREENSHOTS_INTERFACE_VERSION003"
|
||||||
|
|
||||||
/* Shared object file name */
|
/* Shared object file name */
|
||||||
@@ -45,8 +45,16 @@ struct SteamAPICallCompleted_t
|
|||||||
uint32_t m_cubParam;
|
uint32_t m_cubParam;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef enum ESteamAPIInitResult
|
||||||
|
{
|
||||||
|
k_ESteamAPIInitResult_OK = 0,
|
||||||
|
k_ESteamAPIInitResult_FailedGeneric = 1,
|
||||||
|
k_ESteamAPIInitResult_NoSteamClient = 2,
|
||||||
|
k_ESteamAPIInitResult_VersionMismatch = 3,
|
||||||
|
} ESteamAPIInitResult;
|
||||||
|
|
||||||
#define FUNC_LIST \
|
#define FUNC_LIST \
|
||||||
FOREACH_FUNC(uint8_t, SteamAPI_Init, (void)) \
|
FOREACH_FUNC(ESteamAPIInitResult, SteamAPI_InitFlat, (void*)) \
|
||||||
FOREACH_FUNC(void, SteamAPI_Shutdown, (void)) \
|
FOREACH_FUNC(void, SteamAPI_Shutdown, (void)) \
|
||||||
FOREACH_FUNC(void, SteamAPI_RunCallbacks, (void)) \
|
FOREACH_FUNC(void, SteamAPI_RunCallbacks, (void)) \
|
||||||
FOREACH_FUNC(struct ISteamClient*, SteamInternal_CreateInterface, (const char*)) \
|
FOREACH_FUNC(struct ISteamClient*, SteamInternal_CreateInterface, (const char*)) \
|
||||||
@@ -58,7 +66,6 @@ struct SteamAPICallCompleted_t
|
|||||||
int32_t, \
|
int32_t, \
|
||||||
const char* \
|
const char* \
|
||||||
)) \
|
)) \
|
||||||
FOREACH_FUNC(uint8_t, SteamAPI_ISteamUserStats_RequestCurrentStats, (struct ISteamUserStats*)) \
|
|
||||||
FOREACH_FUNC(uint8_t, SteamAPI_ISteamUserStats_StoreStats, (struct ISteamUserStats*)) \
|
FOREACH_FUNC(uint8_t, SteamAPI_ISteamUserStats_StoreStats, (struct ISteamUserStats*)) \
|
||||||
FOREACH_FUNC(uint8_t, SteamAPI_ISteamUserStats_SetAchievement, ( \
|
FOREACH_FUNC(uint8_t, SteamAPI_ISteamUserStats_SetAchievement, ( \
|
||||||
struct ISteamUserStats*, \
|
struct ISteamUserStats*, \
|
||||||
@@ -177,7 +184,7 @@ int32_t STEAM_init(void)
|
|||||||
FUNC_LIST
|
FUNC_LIST
|
||||||
#undef FOREACH_FUNC
|
#undef FOREACH_FUNC
|
||||||
|
|
||||||
if (!SteamAPI_Init())
|
if (SteamAPI_InitFlat(NULL) != k_ESteamAPIInitResult_OK)
|
||||||
{
|
{
|
||||||
vlog_error("Steamworks not initialized!");
|
vlog_error("Steamworks not initialized!");
|
||||||
ClearPointers();
|
ClearPointers();
|
||||||
@@ -207,7 +214,6 @@ int32_t STEAM_init(void)
|
|||||||
ClearPointers();
|
ClearPointers();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
SteamAPI_ISteamUserStats_RequestCurrentStats(steamUserStats);
|
|
||||||
steamScreenshots = SteamAPI_ISteamClient_GetISteamScreenshots(
|
steamScreenshots = SteamAPI_ISteamClient_GetISteamScreenshots(
|
||||||
steamClient,
|
steamClient,
|
||||||
steamUser,
|
steamUser,
|
||||||
|
|||||||
Reference in New Issue
Block a user