initial commit

This commit is contained in:
2025-02-25 12:07:16 +01:00
commit 0657bc9b25
34 changed files with 3069 additions and 0 deletions

49
src/Core/Player.cpp Normal file
View File

@@ -0,0 +1,49 @@
#include "Player.h"
static const int DAS_MIN_VALUE = 0;
static const int DAS_MAX_VALUE = 30;
static const int ARR_MIN_VALUE = 0;
static const int ARR_MAX_VALUE = 30;
static const int SDR_MIN_VALUE = 0;
static const int SDR_MAX_VALUE = 6;
Player::Player() {
// default settings
this->DAS = 15; // 250ms
this->ARR = 3; // 50ms
this->SDR = 2; // 33ms
}
bool Player::setDAS(int DAS) {
if (DAS < DAS_MIN_VALUE || DAS > DAS_MAX_VALUE) return false;
this->DAS = DAS;
return true;
}
bool Player::setARR(int ARR) {
if (ARR < ARR_MIN_VALUE || ARR > ARR_MAX_VALUE) return false;
this->ARR = ARR;
return true;
}
bool Player::setSDR(int SDR) {
if (SDR < SDR_MIN_VALUE || SDR > SDR_MAX_VALUE) return false;
this->SDR = SDR;
return true;
}
int Player::getDAS() {
return this->DAS;
}
int Player::getARR() {
return this->ARR;
}
int Player::getSDR() {
return this->SDR;
}