mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Axe NETWORK_
[set
/get
]AchievementProgress()
These are unused. Ethan originally added them in case Terry wanted achievement percentages. But he didn't add them, and I don't think the achievements are changing anytime soon, so it's safe to remove this dead code.
This commit is contained in:
parent
e13d3af2eb
commit
4eb7f973ef
3 changed files with 2 additions and 80 deletions
|
@ -23,13 +23,4 @@ void GOG_unlockAchievement(const char *name)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t GOG_getAchievementProgress(const char *name)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void GOG_setAchievementProgress(const char *name, int32_t stat)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* MAKEANDPLAY */
|
#endif /* MAKEANDPLAY */
|
||||||
|
|
|
@ -28,9 +28,7 @@
|
||||||
int32_t name##_init(void); \
|
int32_t name##_init(void); \
|
||||||
void name##_shutdown(void); \
|
void name##_shutdown(void); \
|
||||||
void name##_update(void); \
|
void name##_update(void); \
|
||||||
void name##_unlockAchievement(const char *name); \
|
void name##_unlockAchievement(const char *name);
|
||||||
int32_t name##_getAchievementProgress(const char *name); \
|
|
||||||
void name##_setAchievementProgress(const char *name, int32_t stat);
|
|
||||||
#ifdef STEAM_NETWORK
|
#ifdef STEAM_NETWORK
|
||||||
DECLARE_BACKEND(STEAM)
|
DECLARE_BACKEND(STEAM)
|
||||||
#endif
|
#endif
|
||||||
|
@ -46,8 +44,6 @@ typedef struct NetworkBackend
|
||||||
void (*Shutdown)(void);
|
void (*Shutdown)(void);
|
||||||
void (*Update)(void);
|
void (*Update)(void);
|
||||||
void (*UnlockAchievement)(const char*);
|
void (*UnlockAchievement)(const char*);
|
||||||
int32_t (*GetAchievementProgress)(const char*);
|
|
||||||
void (*SetAchievementProgress)(const char*, int32_t);
|
|
||||||
} NetworkBackend;
|
} NetworkBackend;
|
||||||
|
|
||||||
#if NUM_BACKENDS > 0
|
#if NUM_BACKENDS > 0
|
||||||
|
@ -61,9 +57,7 @@ int NETWORK_init(void)
|
||||||
backends[index].Init = name##_init; \
|
backends[index].Init = name##_init; \
|
||||||
backends[index].Shutdown = name##_shutdown; \
|
backends[index].Shutdown = name##_shutdown; \
|
||||||
backends[index].Update = name##_update; \
|
backends[index].Update = name##_update; \
|
||||||
backends[index].UnlockAchievement = name##_unlockAchievement; \
|
backends[index].UnlockAchievement = name##_unlockAchievement;
|
||||||
backends[index].GetAchievementProgress = name##_getAchievementProgress; \
|
|
||||||
backends[index].SetAchievementProgress = name##_setAchievementProgress;
|
|
||||||
#ifdef STEAM_NETWORK
|
#ifdef STEAM_NETWORK
|
||||||
ASSIGN_BACKEND(STEAM, 0)
|
ASSIGN_BACKEND(STEAM, 0)
|
||||||
#endif
|
#endif
|
||||||
|
@ -120,39 +114,3 @@ void NETWORK_unlockAchievement(const char *name)
|
||||||
UNUSED(name);
|
UNUSED(name);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t NETWORK_getAchievementProgress(const char *name)
|
|
||||||
{
|
|
||||||
/* The highest stat gets priority, will eventually pass to the others */
|
|
||||||
int32_t max = 0;
|
|
||||||
#if NUM_BACKENDS > 0
|
|
||||||
int32_t i, stat;
|
|
||||||
for (i = 0; i < NUM_BACKENDS; i += 1)
|
|
||||||
if (backends[i].IsInit)
|
|
||||||
{
|
|
||||||
stat = backends[i].GetAchievementProgress(name);
|
|
||||||
if (stat > max)
|
|
||||||
{
|
|
||||||
max = stat;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
UNUSED(name);
|
|
||||||
#endif
|
|
||||||
return max;
|
|
||||||
}
|
|
||||||
|
|
||||||
void NETWORK_setAchievementProgress(const char *name, int32_t stat)
|
|
||||||
{
|
|
||||||
#if NUM_BACKENDS > 0
|
|
||||||
int32_t i;
|
|
||||||
for (i = 0; i < NUM_BACKENDS; i += 1)
|
|
||||||
if (backends[i].IsInit)
|
|
||||||
{
|
|
||||||
backends[i].SetAchievementProgress(name, stat);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
UNUSED(name);
|
|
||||||
UNUSED(stat);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
|
@ -168,31 +168,4 @@ void STEAM_unlockAchievement(const char *name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t STEAM_getAchievementProgress(const char *name)
|
|
||||||
{
|
|
||||||
int32_t result = -1;
|
|
||||||
if (libHandle)
|
|
||||||
{
|
|
||||||
SteamAPI_ISteamUserStats_GetStat(
|
|
||||||
steamUserStats,
|
|
||||||
name,
|
|
||||||
&result
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void STEAM_setAchievementProgress(const char *name, int32_t stat)
|
|
||||||
{
|
|
||||||
if (libHandle)
|
|
||||||
{
|
|
||||||
SteamAPI_ISteamUserStats_SetStat(
|
|
||||||
steamUserStats,
|
|
||||||
name,
|
|
||||||
stat
|
|
||||||
);
|
|
||||||
SteamAPI_ISteamUserStats_StoreStats(steamUserStats);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* MAKEANDPLAY */
|
#endif /* MAKEANDPLAY */
|
||||||
|
|
Loading…
Reference in a new issue