38 ref.command_id =
stream.ReadInt();
39 const auto cmd =
static_cast<rpg::MoveCommand::Code
>(ref.command_id);
41 case rpg::MoveCommand::Code::switch_on:
42 stream.Read(ref.parameter_a);
44 case rpg::MoveCommand::Code::switch_off:
45 stream.Read(ref.parameter_a);
47 case rpg::MoveCommand::Code::change_graphic:
48 stream.ReadString(ref.parameter_string,
stream.ReadInt());
49 stream.Read(ref.parameter_a);
51 case rpg::MoveCommand::Code::play_sound_effect:
52 stream.ReadString(ref.parameter_string,
stream.ReadInt());
53 stream.Read(ref.parameter_a);
54 stream.Read(ref.parameter_b);
55 stream.Read(ref.parameter_c);
62 stream.WriteInt(ref.command_id);
63 const auto cmd =
static_cast<rpg::MoveCommand::Code
>(ref.command_id);
65 case rpg::MoveCommand::Code::switch_on:
66 stream.Write(ref.parameter_a);
68 case rpg::MoveCommand::Code::switch_off:
69 stream.Write(ref.parameter_a);
71 case rpg::MoveCommand::Code::change_graphic:
72 stream.WriteInt(
stream.Decode(ref.parameter_string).size());
73 stream.Write(ref.parameter_string);
74 stream.Write(ref.parameter_a);
76 case rpg::MoveCommand::Code::play_sound_effect:
77 stream.WriteInt(
stream.Decode(ref.parameter_string).size());
78 stream.Write(ref.parameter_string);
79 stream.Write(ref.parameter_a);
80 stream.Write(ref.parameter_b);
81 stream.Write(ref.parameter_c);
89 result += LcfReader::IntSize(ref.command_id);
90 const auto cmd =
static_cast<rpg::MoveCommand::Code
>(ref.command_id);
92 case rpg::MoveCommand::Code::switch_on:
93 result += LcfReader::IntSize(ref.parameter_a);
95 case rpg::MoveCommand::Code::switch_off:
96 result += LcfReader::IntSize(ref.parameter_a);
98 case rpg::MoveCommand::Code::change_graphic:
99 result += LcfReader::IntSize(
stream.Decode(ref.parameter_string).size());
101 result += LcfReader::IntSize(ref.parameter_a);
103 case rpg::MoveCommand::Code::play_sound_effect:
104 result += LcfReader::IntSize(
stream.Decode(ref.parameter_string).size());
106 result += LcfReader::IntSize(ref.parameter_a);
107 result += LcfReader::IntSize(ref.parameter_b);
108 result += LcfReader::IntSize(ref.parameter_c);