Nuclide
Software Development Kit for id Tech
achievements.h
Go to the documentation of this file.
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
27typedef struct
28{
29 int m_iID;
30 string m_strName;
35
39void Achievement_Set(string strName);
40
44void Achievement_Clear(string strName);
45
50bool Achievement_Get(string strName);
51
56string Achievement_GetIcon(string strName);
57
62float Achievement_GetPercentage(string strName);
63
70void Achievement_IndicateProgress(string strName, int iCurrent, int iMax);
71
76bool Achievement_RequestStats(achievement_t *ptr, int count);
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:28
int m_iID
Unique numeric ID of an achievement.
Definition: achievements.h:29
int m_iAchieved
Indicator if it's been achieved or not.
Definition: achievements.h:32
string m_strMaterial
An image or icon depicting the achivement.
Definition: achievements.h:33
string m_strDescription
Description of the achivement.
Definition: achievements.h:31
string m_strName
Name of the achivement.
Definition: achievements.h:30