Nuclide
Software Development Kit for id Technology
achievements.h
1/*
2 * Copyright (c) 2016-2022 Vera Visions LLC.
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
13 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
14 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*/
16
31typedef struct
32{
33 int m_iID;
34 string m_strName;
39
43void Achievement_Set(string strName);
44
48void Achievement_Clear(string strName);
49
54bool Achievement_Get(string strName);
55
60string Achievement_GetIcon(string strName);
61
66float Achievement_GetPercentage(string strName);
67
74void Achievement_IndicateProgress(string strName, int iCurrent, int iMax);
75
80bool Achievement_RequestStats(achievement_t *ptr, int count);
81 // end of achievements
void Achievement_IndicateProgress(string strName, int iCurrent, int iMax)
Requests an overlay to be drawn.
Definition: achievements.qc:52
string Achievement_GetIcon(string strName)
Get the icon of an achievement.
Definition: achievements.qc:38
void Achievement_Clear(string strName)
Clear an achievement (development purposes mainly).
Definition: achievements.qc:25
void Achievement_Set(string strName)
Unlock an achievement.
Definition: achievements.qc:19
bool Achievement_Get(string strName)
Returns whether or not an achievement has been achieved.
Definition: achievements.qc:31
bool Achievement_RequestStats(achievement_t *ptr, int count)
Updates the achievement_t pointer with what's been achieved and what's not been achieved from a remot...
Definition: achievements.qc:58
float Achievement_GetPercentage(string strName)
STUB, returns how many other users achieved this.
Definition: achievements.qc:45
Data for an achievement definition.
Definition: achievements.h:32
int m_iID
Unique numeric ID of an achievement.
Definition: achievements.h:33
int m_iAchieved
Indicator if it's been achieved or not.
Definition: achievements.h:36
string m_strMaterial
An image or icon depicting the achivement.
Definition: achievements.h:37
string m_strDescription
Description of the achivement.
Definition: achievements.h:35
string m_strName
Name of the achivement.
Definition: achievements.h:34