clean up comment about Ep3 reverse-engineering

This commit is contained in:
Martin Michelsen
2023-10-01 21:40:28 -07:00
parent 4aa156a322
commit 2dca523a4b
4 changed files with 16 additions and 15 deletions
+1 -5
View File
@@ -18,10 +18,6 @@
namespace Episode3 {
// The comment in Server.hh does not apply to this file (and DataIndexes.cc).
// Except for the Location structure, these structures and functions are not
// based on Sega's original implementation.
class CardIndex;
class MapIndex;
class COMDeckIndex;
@@ -638,7 +634,7 @@ struct CardDefinition {
// The game then samples N card IDs from the appropriate buckets (where N is
// the number chosen above), but for the first 1 or 2 cards, it applies the
// restriction described above and re-draws if the card is the wrong type.
// After sampling the N card IDs, it shuffles them and presents them to the
// After sampling the N card IDs, it sorts them and presents them to the
// player.
//
// There is one more effect to consider after cards are chosen: cards may
+2 -2
View File
@@ -1621,14 +1621,14 @@ void Server::on_server_data_input(const string& data) {
throw runtime_error("command is incomplete");
}
if (header.subcommand != 0xB3) {
throw runtime_error("server data command is not B3");
throw runtime_error("server data command is not 6xB3");
}
handler_t handler = nullptr;
try {
handler = this->subcommand_handlers.at(header.subsubcommand);
} catch (const out_of_range&) {
throw runtime_error("unknown CAxB3 subsubcommand");
throw runtime_error("unknown CAx subsubcommand");
}
string unmasked_data = data;
+13 -6
View File
@@ -19,17 +19,24 @@ struct Lobby;
namespace Episode3 {
/**
* This implementation of Episode 3 battles (contained in all files in the
* src/Episode3 directory, except for DataIndexes.hh/cc) is derived from Sega's
* original server implementation, reverse-engineered from the Episode 3 client
* This implementation of Episode 3 battles is derived from Sega's original
* server implementation, reverse-engineered from the Episode 3 client
* executable. The control flow, function breakdown, and structure definitions
* in these files map very closely to how their server implementation was
* written; notable differences (due to necessary environment differences or bug
* fixes) are described in the comments therein.
*
* Some debugging functions have been added which are not part of the original
* implementation. Notably, this applies to functions like debug message senders
* and loggers and all str() functions.
* The following files are direct reverse-engineerings of Sega's original code,
* except where noted in the comments:
* AssistServer.hh/cc
* Card.hh/cc
* CardSpecial.hh/cc
* DeckState.hh/cc
* MapState.hh/cc
* PlayerState.hh/cc
* PlayerStateSubordinates.hh/cc
* RulerServer.hh/cc
* Server.hh/cc
*
* There are likely undiscovered bugs in this code, some originally written by
* Sega, but more written by me as I manually transcribed and updated this code.
-2
View File
@@ -18,8 +18,6 @@ struct ServerState;
namespace Episode3 {
// The comment in Server.hh does not apply to this file (and Tournament.cc).
class Tournament : public std::enable_shared_from_this<Tournament> {
public:
enum Flag : uint8_t {