1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-06-30 11:47:45 +00:00

Add the various sizes of EventScene

This isn't hooked up to the Lua API yet, it's just the
needed opcode bits.
This commit is contained in:
Joshua Goins 2025-06-28 16:05:36 -04:00
parent 2762407585
commit 5b8a61c1ce
2 changed files with 77 additions and 0 deletions

View file

@ -130,6 +130,41 @@
"opcode": 480, "opcode": 480,
"size": 40 "size": 40
}, },
{
"name": "EventScene4",
"opcode": 964,
"size": 48
},
{
"name": "EventScene8",
"opcode": 787,
"size": 64
},
{
"name": "EventScene16",
"opcode": 186,
"size": 96
},
{
"name": "EventScene32",
"opcode": 281,
"size": 160
},
{
"name": "EventScene64",
"opcode": 988,
"size": 288
},
{
"name": "EventScene128",
"opcode": 880,
"size": 544
},
{
"name": "EventScene255",
"opcode": 243,
"size": 1052
},
{ {
"name": "EventStart", "name": "EventStart",
"opcode": 656, "opcode": 656,

View file

@ -245,6 +245,20 @@ pub enum ServerZoneIpcData {
/// Sent to tell the client to play a scene /// Sent to tell the client to play a scene
#[br(pre_assert(*magic == ServerZoneIpcType::EventScene))] #[br(pre_assert(*magic == ServerZoneIpcType::EventScene))]
EventScene(EventScene<2>), EventScene(EventScene<2>),
#[br(pre_assert(*magic == ServerZoneIpcType::EventScene4))]
EventScene4(EventScene<4>),
#[br(pre_assert(*magic == ServerZoneIpcType::EventScene8))]
EventScene8(EventScene<8>),
#[br(pre_assert(*magic == ServerZoneIpcType::EventScene16))]
EventScene16(EventScene<16>),
#[br(pre_assert(*magic == ServerZoneIpcType::EventScene32))]
EventScene32(EventScene<32>),
#[br(pre_assert(*magic == ServerZoneIpcType::EventScene64))]
EventScene64(EventScene<64>),
#[br(pre_assert(*magic == ServerZoneIpcType::EventScene128))]
EventScene128(EventScene<128>),
#[br(pre_assert(*magic == ServerZoneIpcType::EventScene255))]
EventScene255(EventScene<255>),
/// Sent to tell the client to load a scene, but not play it /// Sent to tell the client to load a scene, but not play it
#[br(pre_assert(*magic == ServerZoneIpcType::EventStart))] #[br(pre_assert(*magic == ServerZoneIpcType::EventStart))]
EventStart(EventStart), EventStart(EventStart),
@ -558,6 +572,34 @@ mod tests {
ServerZoneIpcType::EventScene, ServerZoneIpcType::EventScene,
ServerZoneIpcData::EventScene(EventScene::default()), ServerZoneIpcData::EventScene(EventScene::default()),
), ),
(
ServerZoneIpcType::EventScene4,
ServerZoneIpcData::EventScene4(EventScene::<4>::default()),
),
(
ServerZoneIpcType::EventScene8,
ServerZoneIpcData::EventScene8(EventScene::<8>::default()),
),
(
ServerZoneIpcType::EventScene16,
ServerZoneIpcData::EventScene16(EventScene::<16>::default()),
),
(
ServerZoneIpcType::EventScene32,
ServerZoneIpcData::EventScene32(EventScene::<32>::default()),
),
(
ServerZoneIpcType::EventScene64,
ServerZoneIpcData::EventScene64(EventScene::<64>::default()),
),
(
ServerZoneIpcType::EventScene128,
ServerZoneIpcData::EventScene128(EventScene::<128>::default()),
),
(
ServerZoneIpcType::EventScene255,
ServerZoneIpcData::EventScene255(EventScene::<255>::default()),
),
( (
ServerZoneIpcType::EventStart, ServerZoneIpcType::EventStart,
ServerZoneIpcData::EventStart(EventStart::default()), ServerZoneIpcData::EventStart(EventStart::default()),