From 46ef8c063c2c8966de7b71bd4b5678e0d83afdf4 Mon Sep 17 00:00:00 2001 From: Patrick Crain Date: Mon, 14 Aug 2023 20:56:36 -0400 Subject: [PATCH] Unify version strings between parser, analyzer, and compressor into SLIPPC_VERSION --- src/analyzer.cpp | 2 +- src/analyzer.h | 2 -- src/compressor.h | 1 - src/enums.h | 2 ++ src/parser.cpp | 2 +- src/parser.h | 2 -- 6 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/analyzer.cpp b/src/analyzer.cpp index 96a642f..a9fba2c 100644 --- a/src/analyzer.cpp +++ b/src/analyzer.cpp @@ -45,7 +45,7 @@ void Analyzer::getBasicGameInfo(const SlippiReplay &s, Analysis* a) const { a->original_file = s.original_file; a->slippi_version = s.slippi_version; a->parser_version = s.parser_version; - a->analyzer_version = ANALYZER_VERSION; + a->analyzer_version = SLIPPC_VERSION; a->parse_errors = s.errors; a->game_time = s.start_time; a->game_length = s.frame_count; diff --git a/src/analyzer.h b/src/analyzer.h index 2117a73..53cfc0c 100644 --- a/src/analyzer.h +++ b/src/analyzer.h @@ -11,8 +11,6 @@ #include "analysis.h" //Version number for the analyzer -const std::string ANALYZER_VERSION = "0.8.0"; - const unsigned TIMER_MINS = 8; //Assuming a fixed 8 minute time for now (TODO: might need to change later) const unsigned SHARK_THRES = 15; //Minimum frames to be out of hitstun before comboing becomes sharking const unsigned POKE_THRES = 30; //Frames since either player entered hitstun to consider neutral a poke diff --git a/src/compressor.h b/src/compressor.h index 00b4158..dd94192 100644 --- a/src/compressor.h +++ b/src/compressor.h @@ -19,7 +19,6 @@ // Replay File (.slp) Spec: https://github.com/project-slippi/slippi-wiki/blob/master/SPEC.md const uint8_t COMPRETZ_VERSION = 2; //Internal version of this compressor -const std::string COMPRESSOR_VERSION = "0.8.0"; //External version of this compressor const uint32_t RAW_RNG_MASK = 0x40000000; //Second bit of unsigned int const uint32_t MAGIC_FLOAT = 0xFF000000; //First 8 bits of float diff --git a/src/enums.h b/src/enums.h index 4ced6e3..3fa736d 100644 --- a/src/enums.h +++ b/src/enums.h @@ -3,6 +3,8 @@ #include +//Unified slippc version number +const std::string SLIPPC_VERSION = "0.8.1"; //Frame count starts at -123, so there are 123 startup frames const int LOAD_FRAME = -123; //First playable frame is -39, according to Fizzi's parser diff --git a/src/parser.cpp b/src/parser.cpp index cdcc1fc..419b733 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -320,7 +320,7 @@ namespace slip { } //Write to replay data structure - _replay.parser_version = PARSER_VERSION; + _replay.parser_version = SLIPPC_VERSION; _replay.slippi_version = std::string(_slippi_version); _replay.game_start_raw = std::string(base64_encode(reinterpret_cast(&_rb[_bp+O_GAMEBITS_1]),312)); _replay.metadata = ""; diff --git a/src/parser.h b/src/parser.h index f196409..b622a9c 100644 --- a/src/parser.h +++ b/src/parser.h @@ -14,8 +14,6 @@ // Replay File (.slp) Spec: https://github.com/project-slippi/slippi-wiki/blob/master/SPEC.md -const std::string PARSER_VERSION = "0.8.0"; - namespace slip { class Parser {