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
30typedef struct
31{
32 int m_iID;
33 string m_strName;
38
42void Achievement_Set(string strName);
43
47void Achievement_Clear(string strName);
48
53bool Achievement_Get(string strName);
54
59string Achievement_GetIcon(string strName);
60
65float Achievement_GetPercentage(string strName);
66
73void Achievement_IndicateProgress(string strName, int iCurrent, int iMax);
74
79bool Achievement_RequestStats(achievement_t *ptr, int count);
80 // 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:31
int m_iID
Unique numeric ID of an achievement.
Definition: achievements.h:32
int m_iAchieved
Indicator if it's been achieved or not.
Definition: achievements.h:35
string m_strMaterial
An image or icon depicting the achivement.
Definition: achievements.h:36
string m_strDescription
Description of the achivement.
Definition: achievements.h:34
string m_strName
Name of the achivement.
Definition: achievements.h:33