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