Aadhavan Srinivasan
cfbc726dca
Renamed functions to make their purpose more explicit
9 months ago
Aadhavan Srinivasan
ec2f3320e3
Replaced display_text_centered() with the environment-agnostic display_text() function; Changed function to include parameter to indicate environment type
9 months ago
Aadhavan Srinivasan
43ba4aba0c
Created a file that contains functions for agnostic text output
9 months ago
Aadhavan Srinivasan
8401f74922
Define WIN32_LEAN_AND_MEAN to avoid including windows.h, when including winsock2.h
9 months ago
Aadhavan Srinivasan
839efc3c44
Replaced all instances of struct sockaddr with struct sockaddr_storage, since it can fit v6 addresses as well. Cast values accordingly.
10 months ago
Aadhavan Srinivasan
24b2a83044
Used a sockaddr_storage struct instead of a sockaddr struct, since the latter is not big enough for IPv6
10 months ago
Aadhavan Srinivasan
54f7dbe7ee
Modified recvAllNB() to return an empty string (instead of NULL) if there is nothing to read
10 months ago
Aadhavan Srinivasan
6f292699f8
Updated header file to reflect new function
10 months ago
Aadhavan Srinivasan
4001135451
Integrated upstream changes, since I forgot to pull before making local changes.
10 months ago
Aadhavan Srinivasan
0058e7e411
Removed ip_ver parameter
...
I removed this because I realized I could just check the IP version inside
the constructor. The Sock constructor now checks the address passed to it.
Like before, if the address is neither v4 nor v6, an exception is thrown.
Since the Server and Client constructors call the Sock constructor, no change
was required in these files, except passing the right number of parameters.
10 months ago
Aadhavan Srinivasan
6acbf90d80
Updated UNIX macro checks, to account for MacOS
10 months ago
Aadhavan Srinivasan
eeae444b1d
Moved display_text_centered() into a separate file, since I could possibly extend this file with other raygui helper functions
10 months ago
Aadhavan Srinivasan
f9d5e8cdeb
Converted easysock from CPP to C, because it was mostly just C code anyways
10 months ago
Aadhavan Srinivasan
07ac3f9166
Filled out implementation of check_client function
10 months ago
Aadhavan Srinivasan
1423cc19a0
Split timer into header and implementation file
10 months ago
Aadhavan Srinivasan
788b334e7c
Removed sign file, since it only contained one function. This function has been moved to main.cpp
10 months ago
Aadhavan Srinivasan
9de9353936
Added include guards to timer header file
10 months ago
Aadhavan Srinivasan
7812611fe6
Created an implementation and header file to check the user input, if it is entered through the GUI
10 months ago
Aadhavan Srinivasan
f4bbb6ef6a
Added a rudimentary timer implementation
10 months ago
Aadhavan Srinivasan
e9da48d9a0
Added raygui header file, and dark mode header file
10 months ago
Aadhavan Srinivasan
64aa4b1850
Replaced 'linux' with '__unix__' because the same header files are included on macOS as well.
10 months ago
Aadhavan Srinivasan
50c090cd88
Added a boolean field to the struct, to indicate whether the game should be quit or not
10 months ago
Aadhavan Srinivasan
2c735896df
Used unsigned int instead of int when converting to base-10
10 months ago
Aadhavan Srinivasan
8e3488b904
Added a virtual destructor to the Sock class, which would allow Server and Client to override it
10 months ago
Aadhavan Srinivasan
047ff602ed
Changed 'char*' to 'const char*' because that's what the underlying functions use
10 months ago
Aadhavan Srinivasan
4b3d5387a1
Changed code to support Windows libraries and functions as well
10 months ago
Aadhavan Srinivasan
69e70eb206
Changed the recvAll return type from std::string to char pointer, and created a non-blocking version of the function
10 months ago
Aadhavan Srinivasan
349b0b78db
Created method to set position of paddle
10 months ago
Aadhavan Srinivasan
a37ec79f09
Changed 'recvAll' return type from std::string to char pointer, and created a non-blocking version of the function
10 months ago
Aadhavan Srinivasan
c6bbe82d25
Made the 'recvAll' function return a char pointer instead of a std::string, this is better for portability. Also created a non-blocking version of the function.
10 months ago
Aadhavan Srinivasan
edfd70c3cc
Created a simple data serialization library, to serialize and deserialize the data to be sent
10 months ago
Aadhavan Srinivasan
b47b0eab28
Added new exception constants
10 months ago
Aadhavan Srinivasan
0c726be147
Updated header file to reflect recent change in implementation file
10 months ago
Aadhavan Srinivasan
f3ad4fbf99
Defined constants for TCP and UDP, instead of using the characters themselves
10 months ago
Aadhavan Srinivasan
f0e30f28e9
Updated header files to reflect recent change in implementation files
10 months ago
Aadhavan Srinivasan
350b51e28b
Added additional code to easysock library
10 months ago
Aadhavan Srinivasan
b07b3fc584
Renamed 'connect-helpers' to 'connect_code'
10 months ago
Aadhavan Srinivasan
41f44797a1
Split connect_code file into header and implementation
10 months ago
Aadhavan Srinivasan
11d0a1a5ab
Completely rewrote Client class, and split the class into header and implementation
10 months ago
Aadhavan Srinivasan
98abf50da5
Completely rewrote Server class, and split the class into header and implementation
10 months ago
Aadhavan Srinivasan
98160f0071
Renamed 'math-helpers.hpp' to 'sign.hpp'
10 months ago
Aadhavan Srinivasan
cacc4f9d33
Included string header instead of iostream header, as this file doesn't need iostream
10 months ago
Aadhavan Srinivasan
acf8271126
Renamed 'math-helpers.hpp' to 'sign.hpp' and updated main.cpp to reflect the change
10 months ago
Aadhavan Srinivasan
3a7793bde8
Renamed header file include
10 months ago
Aadhavan Srinivasan
13da015683
Renamed base-helpers to numeric_base, and separated numeric_base into header and implementation files
10 months ago
Aadhavan Srinivasan
a47e598b5c
Removed unnecessary comments
10 months ago
Aadhavan Srinivasan
17b391c1c3
Split 'paddle' class into header and implementation files
10 months ago
Aadhavan Srinivasan
86411ae907
Split 'Ball' class into header and implementation files
10 months ago
Aadhavan Srinivasan
26427fa257
Added include guards to header files
10 months ago
Aadhavan Srinivasan
195d6c4b4b
Separated 'Sock' file into header and implementation file, and added include guards to header file
10 months ago