1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//! This file is parsed by a build script, don't modify the structure.
//! The following lines are generated from 'rask-engine/src/network/protocol/op-codes.rs`
pub const NONE: u32 = 0;
pub const KEY_DOWN: u32 = 1;
pub const KEY_UP: u32 = 2;
pub const KEY_PRESS: u32 = 3;
pub const MOUSE_DOWN: u32 = 4;
pub const MOUSE_UP: u32 = 5;
pub const REQUEST_ALLOCATION: u32 = 7;
pub const DONE_WRITING_RESOURCE: u32 = 8;
pub const ALLOCATED_BUFFER: u32 = 9;
pub const MEMORY_OFFSETS: u32 = 10;
pub const SET_TEXT_MODE: u32 = 11;
pub const PUSH_RESOURCE: u32 = 12;
pub const FETCH_RESOURCE: u32 = 13;
pub const PREPARE_AUDIO: u32 = 14;
pub const AUDIO_LOADED: u32 = 15;
pub const PLAY_SOUND: u32 = 16;
pub const STOP_SOUND: u32 = 17;
pub const PUSH_GAME_STATE: u32 = 18;
pub const PUSH_ENGINE_EVENT: u32 = 19;
pub const PUSH_SERVER_EVENT: u32 = 20;
// The following lines are inserted from `wasm/scripts/main.js`