diff options
Diffstat (limited to 'csgo-loader/csgo-client/Client.cpp')
| -rw-r--r-- | csgo-loader/csgo-client/Client.cpp | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/csgo-loader/csgo-client/Client.cpp b/csgo-loader/csgo-client/Client.cpp index 69920bb..dc08da2 100644 --- a/csgo-loader/csgo-client/Client.cpp +++ b/csgo-loader/csgo-client/Client.cpp @@ -9,6 +9,8 @@ #define SERVER_IP 0xE53CA523 // Hexadecimal representation of the server IP, obtained by inet_addr()
#define SERVER_PORT 0xF2C // Hexadecimal representation of the server port.
+// hey nave just wanna let u know u r epic
+// yea
#if 0
void hhahahaha()
{
@@ -43,23 +45,49 @@ void hhahahaha() }
#endif
-int __stdcall WinMain(HINSTANCE inst, HINSTANCE prev, char* str, int cmdshow)
+// is this loss/
+__forceinline void OpenConsole()
{
#ifdef DEBUG
+ // ;ddDDDDdDDDd
AllocConsole();
+
+ // yo dude
+ // get this handles
FILE *file;
freopen_s(&file, "CONOUT$", "w", stdout);
-#endif
+#endif // DEBUG
+}
+
+int __stdcall WinMain(HINSTANCE inst, HINSTANCE prev, char* str, int cmdshow)
+{
+ OpenConsole();
+
Networking::TCPClient Client;
// Initialize the syscall manager.
if(!Syscalls->Start())
ERROR_ASSERT("[000F:00001A00] Failed to initialize. Please contact an administrator.");
-
+
+ // Wait for connection.
UserInterface->m_Data.m_ExecutionState = UserExperience::EXECUTION_WAITING;
+ // Create a thread to handle UI.
+ std::thread WindowThread([]
+ {
+ // Create a window, initialise DirectX context.
+ if(!UserInterface->Start())
+ ERROR_ASSERT("[000F:00001B00] Failed to initialize. Please contact an administrator.");
+
+ // Create a loop to draw our UI.
+ UserInterface->RunUiFrame();
+ }); WindowThread.detach();
+
+ // Attempt to connect to the remote server.
if(!Client.Start(LOCAL_IP, SERVER_PORT))
ERROR_ASSERT("[000F:0002A000] Server did not accept the connection.");
+ // Allow the user to input their log-in data.
+ UserInterface->m_Data.m_ExecutionState = UserExperience::EXECUTION_LOG_IN;
// TODO: Add game selection.
|
