int main() { // try { // AssetManager::instance(); // ScoreHandler test; // test.debug(); // test << "Dany;3"; // test << "jon;123"; // test << "Tom;9999"; // test.debug(); // test >> "Dany"; // test.debug(); // BestScores *top = test.top(3); // for (BestScores::iterator i = top->begin(); i != top->end(); i++) // std::cout << (*i).best << std::endl; UIManager(); // Bomberman(); // } catch (std::exception &e) { // std::cerr << e.what() << std::endl; // } return (0); }
GameOptionsState::GameOptionsState(Urho3D::Context *context, std::unique_ptr<Options> const &options) : GameState(context), m_options(options) { Urho3D::ResourceCache *cache = GetSubsystem<Urho3D::ResourceCache>(); ui_factory = UIManager(context_, cache->GetResource<Urho3D::Font>("Fonts/Anonymous Pro.ttf", 20), Urho3D::Color(), cache->GetResource<Urho3D::XMLFile>("UI/DefaultStyle.xml"), GetSubsystem<Urho3D::UI>()->GetRoot()); create_ui(); }
MainGameState::MainGameState(Urho3D::Context *context) : GameState(context) { Urho3D::ResourceCache *cache = GetSubsystem<Urho3D::ResourceCache>(); ui_factory = UIManager(context_, cache->GetResource<Urho3D::Font>("Fonts/Anonymous Pro.ttf", 20), Urho3D::Color(), cache->GetResource<Urho3D::XMLFile>("UI/DefaultStyle.xml"), GetSubsystem<Urho3D::UI>()->GetRoot()); create_ui(); subscribe_to_events(); m_systems.add<TestSystem>(); m_systems.configure(); }
// D8 (PB0) LCD RS //~D9 (PB1) LCD E //~D10(PB2) LCD Backlight ctr //~D11(PB3) PWM for heat lamp // D12(PB4) Power ON sensor // D13(PB5) Alarm buzzer // A0 (PC0) Keys sensor // A1 (PC1) Light sensor // A2 (PC2) Debug LED // A3 (PC3) // A4 (PC4) RTC SDA // A5 (PC5) RTC SCL OneWire oneWire = OneWire(2); // D2 DS1307 RTC = DS1307(); LCD4Bit_mod LCD = LCD4Bit_mod(); KeyPad KEYS = KeyPad(A0); Alarm ALARM = Alarm(); TempManager TEMP = TempManager(oneWire); UIManager UI = UIManager(); System SYSTEM = System(); EpromManager EEPROM = EpromManager(); ////////////////////////////////////////////////////////////////////////// byte range_cycle(byte min, byte max, byte val) { if(val > max) return min; if(val < min) return max; return val; }