BIGGERBIGGER
This commit is contained in:
@@ -0,0 +1,148 @@
|
||||
/*
|
||||
______ __ __ __ __ ______ ______ ______ ________ ______ ______ __ __
|
||||
| \| \ | \| \ | \ / \ | \ / \| \ / \ / \ | \ | \
|
||||
\$$$$$$| $$\ | $$| $$ | $$| $$$$$$\ \$$$$$$| $$$$$$\\$$$$$$$$| $$$$$$\| $$$$$$\| $$ | $$
|
||||
| $$ | $$$\| $$| $$ | $$| $$ | $$ | $$ | $$ \$$ | $$ | $$ | $$| $$__| $$| $$__| $$
|
||||
| $$ | $$$$\ $$ \$$\ / $$| $$ | $$ | $$ | $$ | $$ | $$ | $$| $$ $$| $$ $$
|
||||
| $$ | $$\$$ $$ \$$\ $$ | $$ | $$ | $$ | $$ __ | $$ | $$ | $$| $$$$$$$$| $$$$$$$$
|
||||
_| $$_ | $$ \$$$$ \$$ $$ | $$__/ $$ _| $$_ | $$__/ \ | $$ | $$__/ $$| $$ | $$| $$ | $$
|
||||
| $$ \| $$ \$$$ \$$$ \$$ $$| $$ \ \$$ $$ | $$ \$$ $$| $$ | $$| $$ | $$
|
||||
\$$$$$$ \$$ \$$ \$ \$$$$$$ \$$$$$$ \$$$$$$ \$$ \$$$$$$ \$$ \$$ \$$ \$$
|
||||
*/
|
||||
/*
|
||||
+*%@@@@@%%%%%%%%%%%%%%%%%%%%%%%%%*%@@@@@@@%%@@@@@@@%%######%%%%%%@@@@@@%%@@@@@@@@@@@@@@@@%+=*%%@@@%%
|
||||
=#@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*#@@@@@@%**#%##*+================+%@@@%@@@@@@@@@@@@@@@@@%+-=#%%%%%%
|
||||
=#@@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%@@@@@@#========--------=========+%@@@@@@@@@@@@@@@@@@@@%*:-*%%%%##
|
||||
=%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@#%@@@@@@*=--------------===========*@@@@@@@@@@@@@@@@@@@@@#-:=#%%%##
|
||||
+%@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@%%@@@@@%*=------------=====--======*%@@@@@@@@@@@@@@@@@@@@%=:-*%%%%%
|
||||
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@%#***%@@%+------------------------==#@@@@@@@@@@@@@@@@@@@@@%+::+#%%%@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@@%+==++#%#=---=++++==-----------=====%@@@@@@@@@@@@@@@@@@@@@@*-:=*%%@@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@@%*=-+*++#*==+*###%%%#*==----=+##%%#++%@@@@@@@@@@@@@@@@@@@@@@#-:-+#%%@
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@%+::+**=+==+*###****###+===+#%@%%##**%@@@@@@@@@@@@@@@@@@@@@@%=::=*###
|
||||
@%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#=:-+=::--=======+***++++**#######*#%@@@@@@@@@@@@@@@@@@@@@@@+::-+#**
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#+---::--------====+==++***++==+++*%@@@@@@@@@@@@@@@@@@@@@@@#-.:=***
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#+:..-=================++========+*%@@@@@@@@@@@@@@@@@@@@@@%=::-+++
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*+-.:=+++==============++++++++==+#@@@@@@@@@@@@@@@@@@@@@@%+::-=+#
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@%%%%#*=::-+=---===========+++*++**+==+#@@@@@@@@@@@@@@@@@@@@@@@*-::-+#
|
||||
%%%%%%%%%%%%%%%%@@@%%%%%%%@@@@@%%%%%*=:.:=+**+=-------=======--=+===*%@@@@@@@@@@@@@@@@@@@@@@@#=::-=*
|
||||
%%%%%%%%%%%%%%%%@@@@%%%%%%@@@@@@@%%%*-:..-=*%%%%*+++++++==++*#%#+=+#%@@@@@@@@@@@@@@@@@@@@@@@@%+:::-=
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@@@%%%*--:.:=+*#@@@@@@@@@@@@@@@@%+=+%@@@@@@@@@@@@@@@@@@@@@@@@@@@*-::::
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%+-=-.:-=+*#%@@@@@@@@@@@@@#++*%@@@@@@@@@@@@@@@@@@@@@@@@@@@@#-:..:
|
||||
@@%%@@@@%%%%%%%%%%%%%%%%%%%%%%@@@%%#=--=-::===++#@@%%%###%%@%+=*%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%=:...
|
||||
@@@@@@@@@%%%%%%%%%%%%%%%%%%%@@@@@%*---:-+=---====+##******##+=+%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*:...
|
||||
%@@@@@@@@%%%%%%%%%%%%%%%%%%%%@@%#:.:-:.:-**+--====+#****++++=+%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#-:..
|
||||
@@@@@@@@%%%%%%%%%%%%%%%%%%%%@%%+:...::::-=+**====-=##***++==*###%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%=:..
|
||||
@@@@@@@@%%%%%%%%%%%%%%%%%%%%#+-.........-==+**+==-=*#****+=+*++++*#%%@@@@@@@@@@@@@@@@@@@@@@@@@@@+:..
|
||||
@@@@@@@@%%%%%%%%%%%%%%%%%%*=--...........:-=++**==+*#***+++*++=----=*#%@@@@@@@@@@@@@@@@@@@@@@@@@#=..
|
||||
@@@@@@@%%%%%%%%%%%%%%%#*=:..... .........::=+**+*##***++*+++==-:..::=#@@@@@@@@@@@@@@@@@@@@@@@@@#-.
|
||||
@@@@@@@%%%%%%%%%%%%#+=:.:--:.... .........:::-=*#%##****#*++++==-:....:-*%@@@@@@@@@@@@@@@@@@@@@@%=.
|
||||
@@@@@@%%%%%%%%%##+=-::=*****=:......:.....:::-==+*%%#*####*++++==--::....:-*%%@@@@@@@@@@@@@@@@@@@%+:
|
||||
@@%%%%%%%%%##*=---:..:+%@@%%#*-...:::::::::=*###%*%%#######*+++==---:-=--::=*%@@@@@@@@@@@@@@@@@@@%*:
|
||||
%%%%%%%%%%#*=::.....-=+#@@@@@%#+:.::-:::::-*#**#%@%#***#####+++===--+*+--:-+*%@@@@@@@@@@@@@@@@@@@@#-
|
||||
%%%%%%%%#+:.....:-=+#%@@@@@@@@%%*::::::::-=*****##%%##%%%%%%#*+====#*+*+--*#*+#@@@@@@@@@@@@@@@@@@@%=
|
||||
%%%%%#+-.....-==+**%@@@@@@@@@@@@@#=-::::-=+#*******#@@@@@@@@@@%##%%+===+*#@@%+==*%%%@@@@@@@@@@@@@@%+
|
||||
%%#+-:.....:-=*#%##%@@@@@@@@@@@@@@@#+++**##+++++====+#@@@@@@@@@%*+==-===#@@@@#+-:-+#@@@@@@@@@@%%%%%#
|
||||
*=:.....-=**###%@@%%@@@@@@@@@@@@@@@@@%*###*+=++++=====+#@@@@@@@#--------+%@@@%#*=---+%@@@@@@@%%%%%%%
|
||||
...:-++*#%%%%%#++%%++#@@@@@@@@@@@@@@@@%#*+====+++++++++=+%@@@@@+-----=--=#@@@@@%#*+=--+%@@@@@%%%%%%%
|
||||
::=*#%%@@@@%%%%%#**##*#%%%@@@@@@@@@@@@@@#++====+++===++++*%@@@@#=---===--*@@@@@@%%#**=:-+%@@@%%%%%%%
|
||||
+##%@@@@@@@@@%%#*#%@%##*%%@@@@@@@@@@@@@@%#*******#**+++==+#@@@@@%+===+===+%@@@@@@@%%%#+-:=+#%%%%%%%%
|
||||
#@@@@@@@@@@@@@@%%#%%%#*#%@@@@@@@@@@@@@@@@%#**######****++*%@@@@@@#++++++++#@@@@@@@@%@@%#++=-=#%%%%%%
|
||||
%@@@@@@@@@@@@@@@@@%#*#%##%@@@@@@@@@@@@@@@@%#*****##*****+*%@@@@@@%*+++++++*%@@@@@@@@@@@%%#*=::+#%%%%
|
||||
=#@@@@@@@@@@@@@@@@%#%%@@%##%@@@@@@@@@@@@@@@%#*+++*******+*%@@@@@@@#+++++++*%@@@@@@@@@@@@@%%#+-:-*%%%
|
||||
-=#@@@@@@@@@@@@@@@@%###%#*%%%%%@@@@@@@@@@@@@@*====+++====*@@@@@@@@%*++++==*%@@@@@@@@@@@@@@@%%*+==#%%
|
||||
--=*@@@@@@@@@@@@@@@@%%##%@%##%%%%%@@@@@@@@@@@%+=-==+=====*@@@@@@@@@*+=====+%@@@@@@@@@@@@@@@@%%#=:=#%
|
||||
====*%@@@@@@@@@@@@@@%##%%@@%##%%%%%%%%@@@@@@@@%+--==+++++#@@@@@@@@@#=---==+%@@@@@@@@@@@@@@@@@@%+:-*%
|
||||
++===+#@@@@@@@@@@@@@@@@%%###%%%%%%%%%%%@@@@@@@@#+===+++++#@@@@@@@@@#=---==+%@@@@@@@%@@@@@%%%%@%*--*#
|
||||
++++===*%@@@@@@@@@@@@@@@%#%@@%%%%%%%%%@@@@@@@@@@#*++***++#@@@@@@@@@%+=====*%@@@@@@@%@@@@%%%%%%%*==+#
|
||||
+++++==+*%@@@@@@@@@@@@%%##%@@@%#%@@@%%%@@@@@@@@@@#*****++%@@@@@@@@@%*+++++*%@@@@@@%%@@@@%%%%%%%#++*#
|
||||
***++++=+*%@@@@@@@@@@@%%%%%###%%@@@@@@@@@@@@@@@@@@%%@@@%#%@@@@@@@@@@*+++++#%@@@@@@%%@%%@@@@@@@%#**##
|
||||
*****+++++#@@@@@@@@@@@%%%%#*#%@%%%@@@@@@@@@@@@@@@@@@%#%@@@@@@@@@@@@@#+++++#%@@@@@@%%%%%@@@@@@@%###%%
|
||||
******++++*%@@@@@@@@@@@@%%%%@@@@@%@@@@@@@@@@@@@@@@@%%%@@@@@@@@@@@@@@%+++++#%@@@@@%%%%%%%@@@@@@@%##%%
|
||||
*/
|
||||
|
||||
//OVERARCHING LIBRARIES
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <random>
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
|
||||
|
||||
//OPENGL LIBRARIES
|
||||
#include<glad/glad.h>
|
||||
#include<GLFW/glfw3.h>
|
||||
|
||||
//MANMADE LIBRARIES
|
||||
|
||||
#include "common.h"
|
||||
#include "Engine.h"
|
||||
#include "Window.h"
|
||||
#include "Mouse.h"
|
||||
#include "Keyboard.h"
|
||||
#include "SoundSystem.h"
|
||||
#include "ResourceManager.h"
|
||||
#include "Net.h"
|
||||
|
||||
// Asks in the console whether to host, join or play offline (before the window opens,
|
||||
// so the window isn't frozen while waiting for typing).
|
||||
static void PromptNetworkMode() {
|
||||
std::cout << "\n=== EIIFWHRN ===\n"
|
||||
<< " 1) Host a LAN game\n"
|
||||
<< " 2) Join a LAN game\n"
|
||||
<< " 3) Offline\n"
|
||||
<< "Choice [3]: ";
|
||||
std::string choice;
|
||||
std::getline(std::cin, choice);
|
||||
|
||||
Lan::Mode mode = Lan::Mode::Off;
|
||||
std::string ip;
|
||||
if (choice == "1") {
|
||||
mode = Lan::Mode::Host;
|
||||
std::cout << "\nHosting on UDP port 27015. Tell the other player to join one of these addresses: "
|
||||
<< Lan::LocalAddresses() << "\n";
|
||||
}
|
||||
else if (choice == "2") {
|
||||
mode = Lan::Mode::Client;
|
||||
std::cout << "Host IP address [127.0.0.1]: ";
|
||||
std::getline(std::cin, ip);
|
||||
if (ip.empty()) ip = "127.0.0.1";
|
||||
}
|
||||
|
||||
lan = new Lan();
|
||||
if (mode != Lan::Mode::Off && !lan->Start(mode, ip)) {
|
||||
std::cout << "[net] could not start networking, continuing offline\n";
|
||||
}
|
||||
}
|
||||
|
||||
int main() {
|
||||
PromptNetworkMode();
|
||||
glfwInit();
|
||||
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
|
||||
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
|
||||
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
|
||||
glfwWindowHint(GLFW_SAMPLES, 4);
|
||||
|
||||
//WINDOW INITIALIZATION
|
||||
mouse = new Mouse();
|
||||
keyboard = new Keyboard();
|
||||
|
||||
window = new Window(1280,720,"EIIFWHRN");
|
||||
soundsystem = new SoundSystem();
|
||||
resourcemanager = new ResourceManager();
|
||||
|
||||
gladLoadGL();
|
||||
Engine* enginee = new Engine();
|
||||
engine->Initiate();
|
||||
|
||||
std::cout << "engine stopped\n";
|
||||
delete window;
|
||||
delete mouse;
|
||||
delete keyboard;
|
||||
delete engine;
|
||||
delete lan;
|
||||
glfwTerminate();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user