62 lines
1.5 KiB
C++
62 lines
1.5 KiB
C++
#include "textures.hpp"
|
|
#include "sound.hpp"
|
|
#include "autowalker.hpp"
|
|
#include "ai.hpp"
|
|
#include "animation.hpp"
|
|
#include <iostream>
|
|
#include "shaders.hpp"
|
|
#include "backend.hpp"
|
|
#include "game_level.hpp"
|
|
#include "boss/system.hpp"
|
|
#include "events.hpp"
|
|
#include "constants.hpp"
|
|
#include "gui/event_router.hpp"
|
|
#include "camera.hpp"
|
|
|
|
void craft_weapon() {
|
|
auto world = GameDB::current_world();
|
|
auto& the_belt = world->get_the<ritual::Belt>();
|
|
ritual::Action action{1.0, 20, ritual::Kind::MAGICK, ritual::Element::FIRE, {"fake"}};
|
|
the_belt.equip(the_belt.next(), action);
|
|
}
|
|
|
|
int main(int, char*[]) {
|
|
components::init();
|
|
sfml::Backend backend;
|
|
guecs::init(&backend);
|
|
ai::init("ai");
|
|
animation::init();
|
|
GameDB::init();
|
|
cinematic::init();
|
|
|
|
sf::RenderWindow window(sf::VideoMode({SCREEN_WIDTH, SCREEN_HEIGHT}), "Bossfight Testing Arena");
|
|
window.setVerticalSyncEnabled(VSYNC);
|
|
|
|
if(FRAME_LIMIT) window.setFramerateLimit(FRAME_LIMIT);
|
|
window.setPosition({0,0});
|
|
|
|
sound::mute(true);
|
|
sound::play("ambient_1", true);
|
|
|
|
GameDB::create_level();
|
|
craft_weapon();
|
|
|
|
auto main = boss::System::create_bossfight();
|
|
main->set_window(&window);
|
|
|
|
auto world = GameDB::current_world();
|
|
dbc::check(main->$world == world, "GameDB::current_world doesn't match boss fight world.");
|
|
|
|
while(!main->in_state(boss::State::END)) {
|
|
if(main->handle_keyboard_mouse() ||
|
|
main->handle_world_events())
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
main->render(window);
|
|
window.display();
|
|
}
|
|
|
|
return 0;
|
|
}
|