H-uru / Plasma

Cyan Worlds's Plasma game engine
http://h-uru.github.io/Plasma/
GNU General Public License v3.0
205 stars 81 forks source link

Move most pnUtils code into more appropriate places #1513

Closed dgelessus closed 11 months ago

dgelessus commented 11 months ago

pnUtils is a pretty random mix of unrelated things. This PR cleans things up a bit by moving code to more appropriate places (plEncryption.h/.cpp into pnEncryption) and removing duplicate APIs (TimeGetMs replaced by hsTimer::GetMilliSeconds).

The only thing left in pnUtils now is the UTF-16 StrCopy. I left that where it is for now, because it's not trivial to replace with ST::string or standard C++ APIs and it's still used in a couple of different places. (I could move it into CoreLib, but I don't want more weird string functions implicitly pulled in everywhere...)

dpogue commented 11 months ago

(I could move it into CoreLib, but I don't want more weird string functions implicitly pulled in everywhere...)

CoreLib is where I had begrudgingly settled on StrCopy landing when I thought about doing this change myself.

Part of me would like to see plEncryption turned into something more like plRC4Encryption (and clean it up a bit to removed the unimplemented RSA code and maybe turn it into a class instance), but that could be work for another PR.