update some comments

This commit is contained in:
Martin Michelsen
2024-09-01 15:13:53 -07:00
parent 07308b192c
commit eaa982aae9
3 changed files with 23 additions and 23 deletions
+18 -19
View File
@@ -7003,11 +7003,10 @@ struct G_ServerVersionStrings_Ep3_6xB4x46 {
// battle, and contains the current time (in the format "YYYY/MM/DD hh:mm:ss")
// when ending a battle. This may have been used for identifying debug logs.
pstring<TextEncoding::MARKED, 0x40> date_str2;
// It seems Sega used to send 0 here when starting a battle, and 0x04157580
// when ending a battle. Since the field is unused by the client, it's not
// clear what that value means, if anything. This behavior may be another
// uninitialized memory bug in the server implementation (of which there are
// many other examples).
// This field contains uninitialized memory when the client generates this
// command. In normal operation, however, the client would never send this;
// it would be handled locally in offline mode, and generated by the server
// in online mode. The client completely ignores this field in either case.
le_uint32_t unused = 0;
} __packed_ws__(G_ServerVersionStrings_Ep3_6xB4x46, 0xCC);
@@ -7061,8 +7060,8 @@ struct G_CardCounts_Ep3_CAx49 {
// This command is not valid on Episode 3 Trial Edition.
// TODO: Document this from Episode 3 client/server disassembly
struct G_AddToSetCardlog_Ep3_6xB4x4A {
G_CardBattleCommandHeader header = {0xB4, sizeof(G_AddToSetCardlog_Ep3_6xB4x4A) / 4, 0, 0x4A, 0, 0, 0};
struct G_AddToSetCardLog_Ep3_6xB4x4A {
G_CardBattleCommandHeader header = {0xB4, sizeof(G_AddToSetCardLog_Ep3_6xB4x4A) / 4, 0, 0x4A, 0, 0, 0};
// Note: entry_count appears not to be bounds-checked; presumably the server
// could send up to 0xFF entries, but those after the 8th would not be
// byteswapped before the client handles them.
@@ -7070,22 +7069,22 @@ struct G_AddToSetCardlog_Ep3_6xB4x4A {
uint8_t entry_count = 0;
le_uint16_t round_num = 0;
parray<le_uint16_t, 8> card_refs;
} __packed_ws__(G_AddToSetCardlog_Ep3_6xB4x4A, 0x1C);
} __packed_ws__(G_AddToSetCardLog_Ep3_6xB4x4A, 0x1C);
// 6xB4x4B: Set EX result values
// This command is not valid on Episode 3 Trial Edition.
// This command specifies how much EX the player should get based on the
// difference between their level and the levels of the players they defeated or
// were defeated by. (For multi-player opponent teams, the average of the
// opponents' levels is used.) The game scans the appropriate list for the entry
// whose threshold is less than or equal to than the level difference, and
// returns the corresponding value. For example, if the first two entries in the
// win list are {20, 40} and {10, 30}, and the player defeats an opponent who is
// 15 levels above the player's level, the player will get 30 EX when they win
// the battle. If all thresholds are greater than the level difference, the last
// entry's value is used. Finally, if the opponent team has no humans on it, the
// resulting EX values are divided by 2 (so in the example above, the player
// would only get 15 EX for defeating COMs).
// difference between their level and the levels of their opponents. (For
// multi-player opponent teams, the average of the opponents' levels is used.)
// The game scans the appropriate list for the entry whose threshold is less
// than or equal to than the level difference, and returns the corresponding
// value. For example, if the first two entries in the win list are {20, 40}
// and {10, 30}, and the player defeats an opponent who is 15 levels above the
// player's level, the player will get 30 EX when they win the battle. If all
// thresholds are greater than the level difference, the last entry's value is
// used. Finally, if the opponent team has no humans on it, the resulting EX
// values are divided by 2 (so in the example above, the player would only get
// 15 EX for defeating COMs).
// If any entry in either list has .value < -100 or > 100, the entire command is
// ignored and the EX thresholds and values are reset to their default values.
+3 -3
View File
@@ -1415,7 +1415,7 @@ bool PlayerState::set_card_from_hand(
s->send_6xB4x05();
if (!is_nte) {
G_AddToSetCardlog_Ep3_6xB4x4A cmd;
G_AddToSetCardLog_Ep3_6xB4x4A cmd;
cmd.card_refs.clear(0xFFFF);
cmd.card_refs[0] = card_ref;
cmd.client_id = this->client_id;
@@ -1782,7 +1782,7 @@ bool PlayerState::set_action_cards_for_action_state(const ActionState& pa) {
card->loc.direction = pa.facing_direction;
log.debug("set facing direction to %s", phosg::name_for_enum(card->loc.direction));
G_AddToSetCardlog_Ep3_6xB4x4A cmd;
G_AddToSetCardLog_Ep3_6xB4x4A cmd;
cmd.card_refs.clear(0xFFFF);
cmd.client_id = this->client_id;
cmd.round_num = s->get_round_num();
@@ -1842,7 +1842,7 @@ bool PlayerState::set_action_cards_for_action_state(const ActionState& pa) {
}
}
if (!is_nte) {
G_AddToSetCardlog_Ep3_6xB4x4A cmd;
G_AddToSetCardLog_Ep3_6xB4x4A cmd;
cmd.card_refs.clear(0xFFFF);
cmd.client_id = this->client_id;
cmd.round_num = s->get_round_num();
+2 -1
View File
@@ -12,7 +12,8 @@ using namespace std;
namespace Episode3 {
// This is (obviously) not the original string. The original string is:
// "[V1][FINAL2.0] 03/09/13 15:30 by K.Toya"
// "03/05/29 18:00 by K.Toya" (NTE)
// "[V1][FINAL2.0] 03/09/13 15:30 by K.Toya" (Final)
static const char* VERSION_SIGNATURE =
"newserv Ep3 based on [V1][FINAL2.0] 03/09/13 15:30 by K.Toya";
static const char* VERSION_SIGNATURE_NTE =