part way through switch to cin parser
This commit is contained in:
@@ -1,37 +1,37 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"directory": "C:/Users/seth/Documents/repos/LivePlotter/",
|
"directory": "C:/Users/sethh/Documents/repos/LivePlotter/",
|
||||||
"command": "\"C:/Users/seth/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c++ \"C:/Users/seth/Documents/repos/LivePlotter/src/util.cpp\" -std=c++20 -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/atlmfc/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/cppwinrt\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/inc\"",
|
"command": "\"C:/Users/sethh/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c++ \"C:/Users/sethh/Documents/repos/LivePlotter/src/shaders.cpp\" -std=c++20 -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/atlmfc/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/cppwinrt\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/inc\"",
|
||||||
"file": "C:/Users/seth/Documents/repos/LivePlotter/src/util.cpp"
|
"file": "C:/Users/sethh/Documents/repos/LivePlotter/src/shaders.cpp"
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
{
|
{
|
||||||
"directory": "C:/Users/seth/Documents/repos/LivePlotter/",
|
"directory": "C:/Users/sethh/Documents/repos/LivePlotter/",
|
||||||
"command": "\"C:/Users/seth/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c++ \"C:/Users/seth/Documents/repos/LivePlotter/src/shaders.cpp\" -std=c++20 -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/atlmfc/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/cppwinrt\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/inc\"",
|
"command": "\"C:/Users/sethh/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c++ \"C:/Users/sethh/Documents/repos/LivePlotter/src/main.cpp\" -std=c++20 -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/atlmfc/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/cppwinrt\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/inc\"",
|
||||||
"file": "C:/Users/seth/Documents/repos/LivePlotter/src/shaders.cpp"
|
"file": "C:/Users/sethh/Documents/repos/LivePlotter/src/main.cpp"
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
{
|
{
|
||||||
"directory": "C:/Users/seth/Documents/repos/LivePlotter/",
|
"directory": "C:/Users/sethh/Documents/repos/LivePlotter/",
|
||||||
"command": "\"C:/Users/seth/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c++ \"C:/Users/seth/Documents/repos/LivePlotter/src/tcp_server.cpp\" -std=c++20 -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/atlmfc/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/cppwinrt\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/inc\"",
|
"command": "\"C:/Users/sethh/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c++ \"C:/Users/sethh/Documents/repos/LivePlotter/src/util.cpp\" -std=c++20 -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/atlmfc/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/cppwinrt\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/inc\"",
|
||||||
"file": "C:/Users/seth/Documents/repos/LivePlotter/src/tcp_server.cpp"
|
"file": "C:/Users/sethh/Documents/repos/LivePlotter/src/util.cpp"
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
{
|
{
|
||||||
"directory": "C:/Users/seth/Documents/repos/LivePlotter/",
|
"directory": "C:/Users/sethh/Documents/repos/LivePlotter/",
|
||||||
"command": "\"C:/Users/seth/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c++ \"C:/Users/seth/Documents/repos/LivePlotter/src/body.cpp\" -std=c++20 -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/atlmfc/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/cppwinrt\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/inc\"",
|
"command": "\"C:/Users/sethh/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c++ \"C:/Users/sethh/Documents/repos/LivePlotter/src/tcp_server.cpp\" -std=c++20 -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/atlmfc/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/cppwinrt\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/inc\"",
|
||||||
"file": "C:/Users/seth/Documents/repos/LivePlotter/src/body.cpp"
|
"file": "C:/Users/sethh/Documents/repos/LivePlotter/src/tcp_server.cpp"
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
{
|
{
|
||||||
"directory": "C:/Users/seth/Documents/repos/LivePlotter/",
|
"directory": "C:/Users/sethh/Documents/repos/LivePlotter/",
|
||||||
"command": "\"C:/Users/seth/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c++ \"C:/Users/seth/Documents/repos/LivePlotter/src/main.cpp\" -std=c++20 -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/atlmfc/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/cppwinrt\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/inc\"",
|
"command": "\"C:/Users/sethh/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c \"C:/Users/sethh/Documents/repos/LivePlotter/src/glad.c\" -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/atlmfc/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/cppwinrt\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/inc\"",
|
||||||
"file": "C:/Users/seth/Documents/repos/LivePlotter/src/main.cpp"
|
"file": "C:/Users/sethh/Documents/repos/LivePlotter/src/glad.c"
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
{
|
{
|
||||||
"directory": "C:/Users/seth/Documents/repos/LivePlotter/",
|
"directory": "C:/Users/sethh/Documents/repos/LivePlotter/",
|
||||||
"command": "\"C:/Users/seth/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c \"C:/Users/seth/Documents/repos/LivePlotter/src/glad.c\" -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/atlmfc/include\" -isystem\"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.26100.0/cppwinrt\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/seth/Documents/repos/LivePlotter/inc\"",
|
"command": "\"C:/Users/sethh/AppData/Roaming/ClangPowerTools/LLVM_Lite/Bin/clang++.exe\" -x c++ \"C:/Users/sethh/Documents/repos/LivePlotter/src/body.cpp\" -std=c++20 -Wall -fms-compatibility-version=19.10 -Wmicrosoft -Wno-invalid-token-paste -Wno-unknown-pragmas -Wno-unused-value -fsyntax-only \"-DUNICODE\" \"-D_UNICODE\" \"-D_MT\" \"-D_DLL\" \"-D_DEBUG\" \"-D_CONSOLE\" \"-D_DEBUG_FUNCTIONAL_MACHINERY\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/atlmfc/include\" -isystem\"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/VS/include\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/ucrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/um\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/shared\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/winrt\" -isystem\"C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/cppwinrt\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/pthreads4w-code\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glm\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/ext/glfw/include\" -isystem\"C:/Users/sethh/Documents/repos/LivePlotter/inc\"",
|
||||||
"file": "C:/Users/seth/Documents/repos/LivePlotter/src/glad.c"
|
"file": "C:/Users/sethh/Documents/repos/LivePlotter/src/body.cpp"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include <WinSock2.h>
|
|
||||||
#include <pthread.h>
|
|
||||||
#include "util.hpp"
|
|
||||||
|
|
||||||
typedef void (*data_received_cb_t)(SOCKET client, array<char> data);
|
|
||||||
|
|
||||||
struct tcpserver {
|
|
||||||
SOCKET sock;
|
|
||||||
array<SOCKET> client_socks;
|
|
||||||
int max_connections;
|
|
||||||
addrinfo* addr;
|
|
||||||
array<data_received_cb_t> cbs;
|
|
||||||
|
|
||||||
pthread_mutex_t lock;
|
|
||||||
pthread_cond_t connection_ended;
|
|
||||||
pthread_cond_t stop_requested;
|
|
||||||
};
|
|
||||||
|
|
||||||
bool create_server(tcpserver* server_out, const char* hostname, int port, int max_connections);
|
|
||||||
void start_server(tcpserver& s);
|
|
||||||
void stop_server(tcpserver& s);
|
|
||||||
void send_data(tcpserver& s, SOCKET client, array<char> data);
|
|
||||||
void register_recv_cb(tcpserver& s, data_received_cb_t cb);
|
|
||||||
@@ -3,6 +3,9 @@
|
|||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define min(a, b) ((a < b) ? a : b)
|
||||||
|
#define max(a, b) ((a > b) ? a : b)
|
||||||
|
|
||||||
typedef unsigned int uint;
|
typedef unsigned int uint;
|
||||||
|
|
||||||
template<class T> struct array {
|
template<class T> struct array {
|
||||||
@@ -15,4 +18,7 @@ template<class T> struct array {
|
|||||||
template<class T> void append(array<T>& a, T el);
|
template<class T> void append(array<T>& a, T el);
|
||||||
template<class T> T pop(array<T>& a);
|
template<class T> T pop(array<T>& a);
|
||||||
template<class T> void resize(array<T>& a, size_t new_cap);
|
template<class T> void resize(array<T>& a, size_t new_cap);
|
||||||
|
template<class T> void free(array<T>& a);
|
||||||
bool read_file(array<char>* out, const char* filepath);
|
bool read_file(array<char>* out, const char* filepath);
|
||||||
|
array<char*> split_str(const char *s, char delimiter);
|
||||||
|
array<char*> split_str(const char *s);
|
||||||
|
|||||||
38
src/main.cpp
38
src/main.cpp
@@ -3,12 +3,16 @@
|
|||||||
#include <glm/ext/matrix_clip_space.hpp>
|
#include <glm/ext/matrix_clip_space.hpp>
|
||||||
#include <glm/ext/matrix_transform.hpp>
|
#include <glm/ext/matrix_transform.hpp>
|
||||||
#include <glm/ext/vector_float3.hpp>
|
#include <glm/ext/vector_float3.hpp>
|
||||||
|
#include <iostream>
|
||||||
|
#include <map>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include "util.hpp"
|
#include "util.hpp"
|
||||||
#include "shaders.hpp"
|
#include "shaders.hpp"
|
||||||
#include "body.hpp"
|
#include "body.hpp"
|
||||||
#include "tcp_server.hpp"
|
|
||||||
|
|
||||||
static GLFWwindow* window;
|
static GLFWwindow* window;
|
||||||
static float width, height;
|
static float width, height;
|
||||||
@@ -24,6 +28,32 @@ void process_input() {
|
|||||||
glfwSetWindowShouldClose(window, true);
|
glfwSetWindowShouldClose(window, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool stop = false;
|
||||||
|
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
static std::map<char*, std::pair<body, int>> camera_name_to_bodies;
|
||||||
|
|
||||||
|
enum class LineParserState {
|
||||||
|
NAME,
|
||||||
|
X,
|
||||||
|
Y,
|
||||||
|
Z
|
||||||
|
};
|
||||||
|
// name x y z\n
|
||||||
|
void process_cin(void* args) {
|
||||||
|
size_t len = 256;
|
||||||
|
std::string line;
|
||||||
|
while (true) {
|
||||||
|
std::getline(std::cin, line);
|
||||||
|
array<char*> words = split_str(line.c_str());
|
||||||
|
assert(words.len == 4);
|
||||||
|
pthread_mutex_lock(&lock);
|
||||||
|
for (int i = 0; i < words.len; i++) {
|
||||||
|
if (camera_name_to_bodies.find(words
|
||||||
|
}
|
||||||
|
pthread_mutex_unlock(&lock);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static bool mouse_pressed = false;
|
static bool mouse_pressed = false;
|
||||||
static bool scroll_pressed = false;
|
static bool scroll_pressed = false;
|
||||||
static double prev_cursor_x, prev_cursor_y;
|
static double prev_cursor_x, prev_cursor_y;
|
||||||
@@ -107,11 +137,6 @@ bool glfw_setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
//tcpserver server;
|
|
||||||
//if (!create_server(&server, "127.0.0.1", 5000, 1)) {
|
|
||||||
// //return -1;
|
|
||||||
//}
|
|
||||||
|
|
||||||
if (!glfw_setup())
|
if (!glfw_setup())
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@@ -163,6 +188,7 @@ int main() {
|
|||||||
|
|
||||||
while (!glfwWindowShouldClose(window)) {
|
while (!glfwWindowShouldClose(window)) {
|
||||||
process_input();
|
process_input();
|
||||||
|
process_cin();
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
set_uniform(shader, "camera_t", camera_t);
|
set_uniform(shader, "camera_t", camera_t);
|
||||||
set_uniform(shader, "projection_t", projection_t);
|
set_uniform(shader, "projection_t", projection_t);
|
||||||
|
|||||||
@@ -1,105 +0,0 @@
|
|||||||
#include <WS2tcpip.h>
|
|
||||||
#include <cstring>
|
|
||||||
#pragma comment(lib, "pthreadVC3d.lib")
|
|
||||||
#pragma comment(lib, "WS2_32.Lib")
|
|
||||||
|
|
||||||
// I hate windows. I hate windows. I hate windows.
|
|
||||||
|
|
||||||
#include <WinSock2.h>
|
|
||||||
#include <ws2tcpip.h>
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <pthread.h>
|
|
||||||
|
|
||||||
#include "tcp_server.hpp"
|
|
||||||
|
|
||||||
static WSADATA wsadata;
|
|
||||||
static bool winsock_initialized = false; // First tcp server created will initialize this
|
|
||||||
static int init_result;
|
|
||||||
|
|
||||||
void _server_loop(void* args);
|
|
||||||
void _conn_loop(void* args);
|
|
||||||
void _start_conn_loop(SOCKET client_s);
|
|
||||||
|
|
||||||
bool create_server(tcpserver* server_out, const char* hostname, int port, int max_connections = 1) {
|
|
||||||
if (!winsock_initialized && (init_result = WSAStartup(MAKEWORD(2, 2), &wsadata)) != 0) {
|
|
||||||
printf("WSAStartup failed: %d\n", init_result);
|
|
||||||
winsock_initialized = true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
SOCKET sock;
|
|
||||||
|
|
||||||
// ********** Addr Info Creation **********
|
|
||||||
addrinfo *result, hints;
|
|
||||||
char port_str[16];
|
|
||||||
_itoa_s(port, port_str, 10);
|
|
||||||
// TODO: Ensure hostname is null-terminated
|
|
||||||
int status = getaddrinfo(hostname, port_str, &hints, &result);
|
|
||||||
if (status != 0) {
|
|
||||||
printf("Error at getaddrinfo(): %d\n", status);
|
|
||||||
goto fail_cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
// *********** Socket Creation ************
|
|
||||||
sock = socket(result->ai_family, result->ai_socktype, result->ai_protocol);
|
|
||||||
if (sock == INVALID_SOCKET) {
|
|
||||||
printf("Error at socket(): %d\n", WSAGetLastError());
|
|
||||||
freeaddrinfo(result);
|
|
||||||
goto fail_cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
// *********** Socket Binding ************
|
|
||||||
status = bind(sock, result->ai_addr, (int)result->ai_addrlen);
|
|
||||||
if (status == SOCKET_ERROR) {
|
|
||||||
printf("Error at bind(): %d\n", WSAGetLastError());
|
|
||||||
freeaddrinfo(result);
|
|
||||||
goto fail_cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
|
|
||||||
fail_cleanup:
|
|
||||||
WSACleanup();
|
|
||||||
winsock_initialized = false;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void start_server(tcpserver& s) { }
|
|
||||||
void stop_server(tcpserver& s) { }
|
|
||||||
void send_data(tcpserver& s, SOCKET client, array<char> data) { }
|
|
||||||
//void register_recv_cb(tcpserver& s, data_received_cb_t cb) { append(s.cbs, cb); }
|
|
||||||
|
|
||||||
//void _server_loop(void* args) {
|
|
||||||
// tcpserver* s = static_cast<tcpserver*>(args);
|
|
||||||
//
|
|
||||||
// int num_connections = 0;
|
|
||||||
// int mc = s->max_connections;
|
|
||||||
// array<int> open_slots = {
|
|
||||||
// .data = (int*)malloc(sizeof(int)*mc), .len = (size_t)mc, .cap = (size_t)mc
|
|
||||||
// };
|
|
||||||
// for (int i = 0; i < open_slots.len; i++) {
|
|
||||||
// open_slots[i] = open_slots.len - (i + 1);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// array<SOCKET> clients = { (SOCKET*)malloc(sizeof(SOCKET) * mc), (size_t)mc, (size_t)mc };
|
|
||||||
// memset(clients.data, INVALID_SOCKET, sizeof(SOCKET)*mc);
|
|
||||||
// while (true) {
|
|
||||||
// while (num_connections < s->max_connections) {
|
|
||||||
// int slot = pop(open_slots);
|
|
||||||
// clients[slot] = accept(s->sock, NULL, NULL);
|
|
||||||
// // TODO: More robust handling of bad client sockets
|
|
||||||
// if (clients[slot] == INVALID_SOCKET) {
|
|
||||||
// printf("Error at accept(): %d\n", WSAGetLastError());
|
|
||||||
// stop_server(*s);
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// _start_conn_loop(clients[slot]);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
void _start_conn_loop(SOCKET client_s) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void _conn_loop(void* args) { }
|
|
||||||
56
src/util.cpp
56
src/util.cpp
@@ -1,33 +1,44 @@
|
|||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <cwctype>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "util.hpp"
|
#include "util.hpp"
|
||||||
|
|
||||||
|
array<char*> _split_str_inner(const char* s, char delim, bool just_check_ws);
|
||||||
|
|
||||||
template<class T> void append(array<T>& a, T el) {
|
template<class T> void append(array<T>& a, T el) {
|
||||||
if (a.len == a.cap) {
|
if (a.len == a.cap) {
|
||||||
resize(a, a.cap*2);
|
resize(a, a.cap * 2);
|
||||||
}
|
}
|
||||||
a[a.len] = el;
|
a[a.len] = el;
|
||||||
a.len++;
|
a.len++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class T> T pop(array<T>& a) {
|
template<class T> T pop(array<T>& a) {
|
||||||
assert(a.len >= 1);
|
assert(a.len >= 1);
|
||||||
a.len--;
|
a.len--;
|
||||||
return a.data[a.len+1];
|
return a.data[a.len + 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T> void resize(array<T> &a, size_t new_cap) {
|
template<class T> void resize(array<T>& a, size_t new_cap) {
|
||||||
T* new_data = (T*)malloc(new_cap);
|
T* new_data = (T*)malloc(new_cap);
|
||||||
memcpy(new_data, a.data, min(a.len, new_cap));
|
if (a.len > 0) {
|
||||||
|
memcpy(new_data, a.data, min(a.len, new_cap));
|
||||||
|
}
|
||||||
free(a.data);
|
free(a.data);
|
||||||
a.len = min(a.len, new_cap);
|
a.len = min(a.len, new_cap);
|
||||||
a.cap = new_cap;
|
a.cap = new_cap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class T> void free(array<T>& a) {
|
||||||
|
if (a.len > 0)
|
||||||
|
free(a.data);
|
||||||
|
a.len = 0;
|
||||||
|
a.cap = 0;
|
||||||
|
}
|
||||||
|
|
||||||
bool read_file(array<char>* out, const char* filepath) {
|
bool read_file(array<char>* out, const char* filepath) {
|
||||||
FILE* fp = NULL;
|
FILE* fp = NULL;
|
||||||
if (fopen_s(&fp, filepath, "rb") != 0) {
|
if (fopen_s(&fp, filepath, "rb") != 0) {
|
||||||
@@ -46,3 +57,38 @@ bool read_file(array<char>* out, const char* filepath) {
|
|||||||
out->len = sz;
|
out->len = sz;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
array<char*> split_str(const char* s, char delimiter) { return _split_str_inner(s, delimiter, false); }
|
||||||
|
|
||||||
|
array<char*> split_str(const char* s) { return _split_str_inner(s, ' ', true); }
|
||||||
|
|
||||||
|
array<char*> _split_str_inner(const char* s, char delim, bool just_check_ws) {
|
||||||
|
array<char*> res = { NULL, 0, 0 };
|
||||||
|
|
||||||
|
char c;
|
||||||
|
int i = 0;
|
||||||
|
array<char> cur_word = { NULL, 0, 0 };
|
||||||
|
while (true) {
|
||||||
|
c = s[i++];
|
||||||
|
bool is_delim = just_check_ws ? iswspace(c) : c == delim;
|
||||||
|
if ((is_delim || c == '\0') && cur_word.len > 0) {
|
||||||
|
char* word = (char*)malloc(sizeof(char) * cur_word.len + 1);
|
||||||
|
memcpy(word, cur_word.data, cur_word.len);
|
||||||
|
word[cur_word.len] = '\0';
|
||||||
|
append(res, word);
|
||||||
|
free(cur_word);
|
||||||
|
if (c == '\0') {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
append(cur_word, c);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (c == '\0') {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
free(cur_word);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user