game counter reset
This commit is contained in:
parent
2827046b8b
commit
9a0e3be4fe
@ -38,6 +38,15 @@ static void configHandleResetHighScore() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void configHandleResetGameCounter() {
|
||||||
|
displaySetValue(eepromReadGameCounter());
|
||||||
|
|
||||||
|
if (buttonsConfig2Pressed()) {
|
||||||
|
configChanged = true;
|
||||||
|
eepromClearGameCounter(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void configHandleBrightness() {
|
static void configHandleBrightness() {
|
||||||
displaySetValue(eepromReadBrightness());
|
displaySetValue(eepromReadBrightness());
|
||||||
stoneDrawConfigPattern();
|
stoneDrawConfigPattern();
|
||||||
@ -71,8 +80,13 @@ static void configHandleAmplitude() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void (*configHandler[])(void) = { configHandleResetHighScore, configHandleFlash, configHandleBrightness, configHandleAmplitude };
|
void (*configHandler[])(void) = {
|
||||||
|
configHandleResetHighScore,
|
||||||
|
configHandleResetGameCounter,
|
||||||
|
configHandleFlash,
|
||||||
|
configHandleBrightness,
|
||||||
|
configHandleAmplitude
|
||||||
|
};
|
||||||
|
|
||||||
void configExec(void *handle) {
|
void configExec(void *handle) {
|
||||||
static uint8_t configState = 0;
|
static uint8_t configState = 0;
|
||||||
|
@ -137,9 +137,17 @@ void eepromSetAmplitude(uint8_t v) {
|
|||||||
buf.v.amplitude = v;
|
buf.v.amplitude = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint16_t eepromReadGameCounter() {
|
||||||
|
return buf.v.gameCounter;
|
||||||
|
}
|
||||||
|
|
||||||
void eepromIncGameCounter() {
|
void eepromIncGameCounter() {
|
||||||
buf.v.gameCounter += 1;
|
buf.v.gameCounter += 1;
|
||||||
writeBuf();
|
writeBuf();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void eepromClearGameCounter() {
|
||||||
|
buf.v.gameCounter = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@ void eepromSetBrightness(uint8_t v);
|
|||||||
uint8_t eepromReadAmplitude();
|
uint8_t eepromReadAmplitude();
|
||||||
void eepromSetAmplitude(uint8_t v);
|
void eepromSetAmplitude(uint8_t v);
|
||||||
void eepromIncGameCounter();
|
void eepromIncGameCounter();
|
||||||
|
uint16_t eepromReadGameCounter();
|
||||||
|
void eepromClearGameCounter();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user