syntax = "proto3"; package smmdb; message SMM2Course { uint32 version = 1; SMM2CourseHeader header = 2; SMM2CourseArea course_area = 3; SMM2CourseArea course_sub_area = 4; } message SMM2CourseHeader { uint64 modified = 1; // unix timestamp string title = 2; // 64 bytes ucs-2 offset 0xF4 string description = 3; // 150 bytes ucs-2 offset 0x136 uint32 start_y = 4; // u8 at offset 0x00 uint32 finish_y = 5; // u8 at offset 0x01 uint32 finish_x = 6; // u16 at offset 0x02 uint32 time = 7; // u16 at offset 0x04 enum GameStyle { M1 = 0; // Super Mario Bros M3 = 1; // Super Mario Bros 3 MW = 2; // Super Mario World WU = 3; // New Super Mario Bros U W3 = 4; // Super Mario 3D World = 3W } GameStyle game_style = 8; // two chars at offset 0xF1 enum ClearConditionType { NONE = 0; PARTS = 1; STATUS = 2; ACTION = 3; } ClearConditionType clear_condition_type = 9; // u8 at offset 0xF uint32 clear_condition = 10; // crc32 at offset 0x10 uint32 clear_condition_amount = 11; // u16 at offset 0x6 uint32 clear_check_tries = 12; // u32 at offset 0x1C uint32 clear_check_time = 13; // u32 at offset 0x20 uint32 game_version = 14; // u32 bitmask at offset 0x14 uint32 management_flags = 15; // u32 bitmask at offset 0x18 uint32 creation_id = 16; // u32 at offset 0x24 uint64 upload_id = 17; // u64 at offset 0x28 uint32 completion_version = 18; // u32 at offset 0x30 } message SMM2CourseArea { enum CourseTheme { GROUND = 0; UNDERGROUND = 1; CASTLE = 2; AIRSHIP = 3; UNDERWATER = 4; GHOUST_HOUSE = 5; SNOW = 6; DESERT = 7; SKY = 8; FOREST = 9; } CourseTheme course_theme = 1; // u8 at offset 0x0 enum AutoScroll { NONE = 0; SLOW = 1; MEDIUM = 2; FAST = 3; CUSTOM = 4; } AutoScroll auto_scroll = 2; // u8 at offset 0x01 enum ScreenBoundary { ABOVE_LINE = 0; UNDER_LINE = 1; } ScreenBoundary screen_boundary = 3; // u8 at offset 0x2 enum Orientation { HORIZONTAL = 0; VERTICAL = 1; } Orientation orientation = 4; // u8 at 0x03 uint32 liquid_max = 5; // u8 at offset 0x04 enum LiquidMode { FIXED = 0; ONE_WAY = 1; OSCILLATING = 2; } LiquidMode liquid_mode = 6; // u8 at offset 0x05 enum LiquidSpeed { NONE = 0; SLOW = 1; MEDIUM = 2; FAST = 3; } LiquidSpeed liquid_speed = 7; // u8 at offset 0x06 uint32 liquid_min = 8; // u8 at offset 0x07 uint32 right_boundary = 9; // u32 at offset 0x08, always 0x300 for vertical uint32 top_boundary = 10; // u32 at offset 0x0C, always 0x1B0 for vertical uint32 left_boundary = 11; // u32 at offset 0x10, always 0 uint32 bottom_boundary = 12; // u32 at offset 0x14, always 0 except for certain vertical sub-areas enum DayTime { DAY = 0; UNKNOWN0 = 1; NIGHT = 2; UNKNOWN1 = 3; } DayTime day_time = 13; // u32 at offset 0x18 uint32 object_count = 14; // u32 at offset 0x1C uint32 sound_effect_count = 15; // u32 at offset 0x20 uint32 snake_block_count = 16; // u32 at offset 0x24 uint32 clear_pipe_count = 17; // u32 at offset 0x28 uint32 piranha_creeper_count = 18; // u32 at offset 0x2C uint32 exclamation_block_count = 19; // u32 at offset 0x30 uint32 track_block_count = 20; // u32 at offset 0x34 uint32 tile_count = 21; // u32 at offset 0x3C uint32 track_count = 22; // u32 at offset 0x40 uint32 icicle_count = 23; // u32 at offset 0x44 }