Fission FSN
Loading...
Searching...
No Matches
gfCHogLevelProgress.h
Go to the documentation of this file.
1/********************************************************************
2*
3* File: gfCHogLevelProgress.h
4*
5* Purpose: Per level progress recorded in the user's saved data: finished, plus partial steps
6* completed out of a total. The map, level pop up and games share it; the game's own
7* saved level format is read through gfIHogLevelProgress.
8*
9*********************************************************************/
10
11#ifndef gfCHogLevelProgresshdr
12#define gfCHogLevelProgresshdr
13
14#include <fsCore/fsStr.h>
15
16
18{
19public:
20
21 static fsBool finishedGet(const fsStr& pLevel);
22 static void finishedSet(const fsStr& pLevel, fsBool pFinished);
23
24 static fsS32 stepCountGet(const fsStr& pLevel);
25 static fsS32 stepsCompletedGet(const fsStr& pLevel);
26 static fsBool anyStepCompletedGet(const fsStr& pLevel);
27
28 // Milestones only ever increase, so a replayed step cannot downgrade earned progress.
29 static void stepsCompletedSet(const fsStr& pLevel, fsS32 pCount);
30 static void stepsReset(const fsStr& pLevel);
31
32 // Test aid: one more step, the last finishes the level, and a finished level is reset.
33 // Marks the level so the advance wins over what the saved level data says.
34 static void testAdvance(const fsStr& pLevel);
35
36 // Key prefixes, so a reset can clear every level's progress.
37 static fsStr stepsKeyPrefixGet();
38 static fsStr testKeyPrefixGet();
39};
40
41#endif
Definition fsStr.h:23
Definition gfCHogLevelProgress.h:18
static fsBool finishedGet(const fsStr &pLevel)
Definition gfCHogLevelProgress.cpp:30
static fsStr stepsKeyPrefixGet()
Definition gfCHogLevelProgress.cpp:12
static void finishedSet(const fsStr &pLevel, fsBool pFinished)
Definition gfCHogLevelProgress.cpp:35
static fsStr testKeyPrefixGet()
Definition gfCHogLevelProgress.cpp:17
static void stepsCompletedSet(const fsStr &pLevel, fsS32 pCount)
Definition gfCHogLevelProgress.cpp:74
static void testAdvance(const fsStr &pLevel)
Definition gfCHogLevelProgress.cpp:89
static void stepsReset(const fsStr &pLevel)
Definition gfCHogLevelProgress.cpp:82
static fsS32 stepCountGet(const fsStr &pLevel)
Definition gfCHogLevelProgress.cpp:45
static fsBool anyStepCompletedGet(const fsStr &pLevel)
Definition gfCHogLevelProgress.cpp:69
static fsS32 stepsCompletedGet(const fsStr &pLevel)
Definition gfCHogLevelProgress.cpp:54
bool fsBool
Definition fsBaseTypes.h:26
int fsS32
Definition fsBaseTypes.h:20