From ad81ecc67d71a530c3b6c2c3b0fd7309ce8d8327 Mon Sep 17 00:00:00 2001 From: Jordan Cristiano Date: Sun, 3 May 2015 20:16:13 -0400 Subject: [PATCH] Removed game event file loading, as stv demos have a game event list in them --- demboyz/demboyz.cpp | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/demboyz/demboyz.cpp b/demboyz/demboyz.cpp index c7680de..e229efa 100644 --- a/demboyz/demboyz.cpp +++ b/demboyz/demboyz.cpp @@ -3,17 +3,6 @@ #include "demofilebitbuf.h" #include "netmessages.h" #include -#include -#include - -std::vector eventNames; - -void ParseGameEvent(const std::string& eventBuf) -{ - CBitRead bitBuf(eventBuf.data(), eventBuf.size()); - uint32 eventId = bitBuf.ReadUBitLong(9); - printf("%s\n", eventNames[eventId].c_str()); -} void ParsePacket(const char* packetBuf, const int numBytes) { @@ -24,29 +13,6 @@ void ParsePacket(const char* packetBuf, const int numBytes) uint32 typeId = bitBuf.ReadUBitLong(NETMSG_TYPE_BITS); printf("%i\n", typeId); ProcessNetMsg(typeId, bitBuf); - /*if (typeId != 25) - { - break; - } - - uint32 length = bitBuf.ReadUBitLong(11); - int numBytes = (length / 8) + (length % 8 > 0); - - std::string subpacket; - subpacket.resize(numBytes); - - bitBuf.ReadBits(&subpacket[0], length); - ParseGameEvent(subpacket);*/ - } -} - -void ParseEventNames(const char* eventfile, std::vector& eventNames) -{ - using namespace std; - ifstream eventStream(eventfile); - if (eventStream) - { - move(istream_iterator(eventStream), istream_iterator(), back_inserter(eventNames)); } } @@ -70,13 +36,11 @@ void ParseSignonData(const std::string& signonData) int main(const int argc, const char* argv[]) { - if (argc < 3) + if (argc < 2) { return -1; } - ParseEventNames(argv[1], eventNames); - CDemoFile demoFile; if (!demoFile.Open(argv[2])) {