Skip to content

Commit

Permalink
Unify version strings between parser, analyzer, and compressor into S…
Browse files Browse the repository at this point in the history
…LIPPC_VERSION
  • Loading branch information
pcrain committed Aug 15, 2023
1 parent 4a7e5d4 commit 46ef8c0
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/analyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions src/analyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion src/compressor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#include <string>

//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
Expand Down
2 changes: 1 addition & 1 deletion src/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<const unsigned char *>(&_rb[_bp+O_GAMEBITS_1]),312));
_replay.metadata = "";
Expand Down
2 changes: 0 additions & 2 deletions src/parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 46ef8c0

Please sign in to comment.