abandon
This commit is contained in:
@@ -12,6 +12,7 @@ InGameAppMenu::InGameAppMenu(std::shared_ptr<MenuStack> menuStack, std::shared_p
|
||||
game(this->settings->getMenu().startGame(this->settings->getGamemode()))
|
||||
{
|
||||
|
||||
this->game.start();
|
||||
this->paused = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ GraphApp::GraphApp() {
|
||||
|
||||
void GraphApp::run() {
|
||||
changeVideoMode(*this->renderWindow, this->settings->getVideoMode());
|
||||
std::cout << renderWindow->getSize().x << " " << renderWindow->getSize().y << std::endl;
|
||||
this->menuStack->push(std::make_shared<MainAppMenu>(this->menuStack, this->settings, this->renderWindow));
|
||||
|
||||
bool quit = false;
|
||||
|
||||
@@ -26,11 +26,15 @@ void Keybinds::loadKeybindsFromFile() {
|
||||
}
|
||||
|
||||
char byte;
|
||||
while (layoutFile.get(&byte, 1)) {
|
||||
while (layoutFile.get(byte)) {
|
||||
if (layoutFile.eof()) break;
|
||||
|
||||
Action action = Action(byte);
|
||||
|
||||
do {
|
||||
layoutFile.get(&byte, 1);
|
||||
layoutFile.get(byte);
|
||||
if (layoutFile.eof()) break;
|
||||
|
||||
if (byte != 0xFF) {
|
||||
this->keybinds.at(action).insert(sfKey(byte));
|
||||
}
|
||||
|
||||
@@ -29,35 +29,39 @@ void Settings::loadSettingsFromFile() {
|
||||
char byte;
|
||||
|
||||
// keybind layout
|
||||
settingsFile.get(&byte, 1);
|
||||
settingsFile.get(byte);
|
||||
this->chosenKeybinds = byte;
|
||||
|
||||
// window size mode
|
||||
settingsFile.get(&byte, 1);
|
||||
settingsFile.get(byte);
|
||||
std::cout << (int) byte;
|
||||
this->windowSizeMode = byte;
|
||||
|
||||
// gamemode
|
||||
settingsFile.get(&byte, 1);
|
||||
settingsFile.get(byte);
|
||||
this->gamemode = Gamemode(byte);
|
||||
|
||||
// board width
|
||||
settingsFile.get(&byte, 1);
|
||||
settingsFile.get(byte);
|
||||
std::cout << (int) byte;
|
||||
this->menu.setBoardWidth(byte);
|
||||
|
||||
// board height
|
||||
settingsFile.get(&byte, 1);
|
||||
settingsFile.get(byte);
|
||||
this->menu.setBoardHeight(byte);
|
||||
|
||||
// piece distribution
|
||||
settingsFile.get(&byte, 1);
|
||||
settingsFile.get(byte);
|
||||
//TODO
|
||||
|
||||
// selected pieces
|
||||
char pieceType;
|
||||
char pieceValue;
|
||||
this->selectedPieces.clear();
|
||||
while (settingsFile.get(&pieceType, 1)) {
|
||||
settingsFile.get(&pieceValue, 1);
|
||||
while (settingsFile.get(pieceType)) {
|
||||
if (settingsFile.eof()) break;
|
||||
|
||||
settingsFile.get(pieceValue);
|
||||
this->selectedPieces.push_back({PiecesType(pieceType), pieceValue});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ int main() {
|
||||
}
|
||||
|
||||
// before compiling release version
|
||||
//resetConfigFiles();
|
||||
resetConfigFiles();
|
||||
|
||||
GraphApp UI;
|
||||
UI.run();
|
||||
|
||||
@@ -58,7 +58,7 @@ void TextApp::run() {
|
||||
default : std::cout << "Invalid answer!" << std::endl;
|
||||
}
|
||||
}
|
||||
std::cout << "===| SEE YA NEXT TIME! |===";
|
||||
std::cout << "===| SEE YA NEXT TIME! |===" << std::endl;
|
||||
}
|
||||
|
||||
void TextApp::choosePieces() {
|
||||
|
||||
Reference in New Issue
Block a user