d1zzy / pvpgn Goto Github PK
View Code? Open in Web Editor NEWPlayer vs Player Gaming Network
Player vs Player Gaming Network
Noticed someone was complaining about str_to_hex and hex_to_str in the file, maybe they'll like this a little better.
void StringToHex(const UCHAR *datainput, UINT32 datalength, std::string &outbuffer)
{
static const char *values = "0123456789ABCDEF";
outbuffer = "";
for (UINT i = 0; i < datalength; i++) {
const UCHAR c = datainput[i];
outbuffer += values[c >> 4];
outbuffer += values[c & 15];
}
}
void HexToString(const UCHAR *datainput, UINT32 datalength, UCHAR *OutPut)
{
if (datalength & 1) throw std::invalid_argument("HexToString: Bad length!");
static const char *values = "0123456789ABCDEF";
for (UINT i = 0; i < datalength; i += 2)
{
char a = datainput[i];
char b = datainput[i + 1];
const char* c = std::lower_bound(values, values + 16, a);
if (*c != a) throw std::invalid_argument("HexToString: [a] not a hex digit");
const char* d = std::lower_bound(values, values + 16, b);
if (*d != b) throw std::invalid_argument("HexToString: [b] not a hex digit");
OutPut[i / 2] = ((c - values) << 4) | (d - values);
}
}
Hello,
What's up with forum: http://forums.pvpgn.org/ ?
Regards.
Recent versions of GCC and clang are starting to turn on -Werror=implicit-function-declaration
by default. This is leading to build errors like fink/fink-distributions#1101. The proper fix is just to include the necessary headers.
Hello, sorry for my horrible English, I am Argentine. I was looking about TrackPHP, although it is a dead code seems to work and that part can optimize it. But for that to work you would need to add that "track.h" file that includes the pvpgn server (attached). I wondered if they could add it to the project so work on the new version of TrackPHP then share the code. Of course, I would appreciate an answer.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.