update default game data
This commit is contained in:
parent
dca191ccae
commit
3de82cbacc
94
src/mock.rs
94
src/mock.rs
|
@ -114,7 +114,7 @@ pub fn avatar() -> Sprite {
|
||||||
pub fn tile_default() -> Tile {
|
pub fn tile_default() -> Tile {
|
||||||
Tile {
|
Tile {
|
||||||
id: "a".to_string(),
|
id: "a".to_string(),
|
||||||
name: None,
|
name: Some("block".to_string()),
|
||||||
wall: None,
|
wall: None,
|
||||||
animation_frames: vec![Image {
|
animation_frames: vec![Image {
|
||||||
pixels: vec![
|
pixels: vec![
|
||||||
|
@ -155,7 +155,7 @@ pub fn sprite() -> Sprite {
|
||||||
0, 1, 1, 0, 1, 1, 1, 1,
|
0, 1, 1, 0, 1, 1, 1, 1,
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
dialogue_id: Some("SPR_0".to_string()),
|
dialogue_id: Some("0".to_string()),
|
||||||
room_id: Some("4".to_string()),
|
room_id: Some("4".to_string()),
|
||||||
position: Some(Position { x: 9, y: 7 }),
|
position: Some(Position { x: 9, y: 7 }),
|
||||||
colour_id: None,
|
colour_id: None,
|
||||||
|
@ -163,19 +163,49 @@ pub fn sprite() -> Sprite {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
pub mod item {
|
||||||
|
use crate::item::Item;
|
||||||
|
use crate::image::Image;
|
||||||
|
|
||||||
|
pub fn key() -> Item {
|
||||||
|
Item {
|
||||||
|
id: "1".to_string(),
|
||||||
|
animation_frames: vec![
|
||||||
|
Image { pixels: vec![
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 1, 1, 1, 1, 0, 0,
|
||||||
|
0, 0, 1, 0, 0, 1, 0, 0,
|
||||||
|
0, 0, 1, 1, 1, 1, 0, 0,
|
||||||
|
0, 0, 0, 1, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 1, 1, 0, 0, 0,
|
||||||
|
0, 0, 0, 1, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 1, 1, 0, 0, 0
|
||||||
|
]}
|
||||||
|
],
|
||||||
|
name: Some("key".to_string()),
|
||||||
|
dialogue_id: Some("2".to_string()),
|
||||||
|
colour_id: None
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn item() -> Item {
|
pub fn item() -> Item {
|
||||||
Item {
|
Item {
|
||||||
id: "6".to_string(),
|
id: "6".to_string(),
|
||||||
animation_frames: vec![Image {
|
animation_frames: vec![Image {
|
||||||
pixels: vec![
|
pixels: vec![
|
||||||
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 1, 0, 0, 0, 0, 0, 0,
|
||||||
0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 1, 0, 0,
|
||||||
|
0, 0, 1, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0, 0, 0, 0, 0, 1, 0,
|
0, 0, 0, 0, 0, 0, 1, 0,
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
name: Some("door".to_string()),
|
name: Some("door".to_string()),
|
||||||
dialogue_id: Some("ITM_2".to_string()),
|
dialogue_id: Some("2".to_string()),
|
||||||
colour_id: None,
|
colour_id: None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -488,7 +518,7 @@ pub fn room() -> Room {
|
||||||
pub fn game_default() -> Game {
|
pub fn game_default() -> Game {
|
||||||
Game {
|
Game {
|
||||||
name: "Write your game's title here".to_string(),
|
name: "Write your game's title here".to_string(),
|
||||||
version: Some(Version { major: 6, minor: 5 }),
|
version: Some(Version { major: 7, minor: 1 }),
|
||||||
room_format: Some(RoomFormat::CommaSeparated),
|
room_format: Some(RoomFormat::CommaSeparated),
|
||||||
room_type: RoomType::Room,
|
room_type: RoomType::Room,
|
||||||
font: Font::AsciiSmall,
|
font: Font::AsciiSmall,
|
||||||
|
@ -496,7 +526,7 @@ pub fn game_default() -> Game {
|
||||||
text_direction: TextDirection::LeftToRight,
|
text_direction: TextDirection::LeftToRight,
|
||||||
palettes: vec![Palette {
|
palettes: vec![Palette {
|
||||||
id: "0".to_string(),
|
id: "0".to_string(),
|
||||||
name: None,
|
name: Some("blueprint".to_string()),
|
||||||
colours: vec![
|
colours: vec![
|
||||||
Colour {
|
Colour {
|
||||||
red: 0,
|
red: 0,
|
||||||
|
@ -518,7 +548,7 @@ pub fn game_default() -> Game {
|
||||||
rooms: vec![Room {
|
rooms: vec![Room {
|
||||||
id: "0".to_string(),
|
id: "0".to_string(),
|
||||||
palette_id: Some("0".to_string()),
|
palette_id: Some("0".to_string()),
|
||||||
name: None,
|
name: Some("example room".to_string()),
|
||||||
tiles: vec![
|
tiles: vec![
|
||||||
"0".to_string(),
|
"0".to_string(),
|
||||||
"0".to_string(),
|
"0".to_string(),
|
||||||
|
@ -802,7 +832,7 @@ pub fn game_default() -> Game {
|
||||||
},
|
},
|
||||||
Sprite {
|
Sprite {
|
||||||
id: "a".to_string(),
|
id: "a".to_string(),
|
||||||
name: None,
|
name: Some("cat".to_string()),
|
||||||
animation_frames: vec![Image {
|
animation_frames: vec![Image {
|
||||||
pixels: vec![
|
pixels: vec![
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1,
|
||||||
|
@ -810,37 +840,45 @@ pub fn game_default() -> Game {
|
||||||
1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0,
|
1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0,
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
dialogue_id: Some("SPR_0".to_string()),
|
dialogue_id: Some("0".to_string()),
|
||||||
room_id: Some("0".to_string()),
|
room_id: Some("0".to_string()),
|
||||||
position: Some(Position { x: 8, y: 12 }),
|
position: Some(Position { x: 8, y: 12 }),
|
||||||
colour_id: None,
|
colour_id: None,
|
||||||
items: vec![]
|
items: vec![]
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
items: vec![Item {
|
items: vec![
|
||||||
id: "0".to_string(),
|
Item {
|
||||||
animation_frames: vec![Image {
|
id: "0".to_string(),
|
||||||
pixels: vec![
|
animation_frames: vec![Image {
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
pixels: vec![
|
||||||
1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1,
|
||||||
],
|
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
}],
|
],
|
||||||
name: Some("tea".to_string()),
|
}],
|
||||||
dialogue_id: Some("ITM_0".to_string()),
|
name: Some("tea".to_string()),
|
||||||
colour_id: None,
|
dialogue_id: Some("1".to_string()),
|
||||||
}],
|
colour_id: None,
|
||||||
|
},
|
||||||
|
item::key()
|
||||||
|
],
|
||||||
dialogues: vec![
|
dialogues: vec![
|
||||||
Dialogue {
|
Dialogue {
|
||||||
id: "SPR_0".to_string(),
|
id: "0".to_string(),
|
||||||
contents: "I'm a cat".to_string(),
|
contents: "I'm a cat".to_string(),
|
||||||
name: None
|
name: Some("cat dialog".to_string()),
|
||||||
},
|
},
|
||||||
Dialogue {
|
Dialogue {
|
||||||
id: "ITM_0".to_string(),
|
id: "1".to_string(),
|
||||||
contents: "You found a nice warm cup of tea".to_string(),
|
contents: "You found a nice warm cup of tea".to_string(),
|
||||||
name: None
|
name: Some("tea dialog".to_string()),
|
||||||
},
|
},
|
||||||
|
Dialogue {
|
||||||
|
id: "2".to_string(),
|
||||||
|
contents: "A key! {wvy}What does it open?{wvy}".to_string(),
|
||||||
|
name: Some("key dialog".to_string())
|
||||||
|
}
|
||||||
],
|
],
|
||||||
endings: vec![],
|
endings: vec![],
|
||||||
variables: vec![Variable {
|
variables: vec![Variable {
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
Write your game's title here
|
Write your game's title here
|
||||||
|
|
||||||
# BITSY VERSION 6.5
|
# BITSY VERSION 7.1
|
||||||
|
|
||||||
! ROOM_FORMAT 1
|
! ROOM_FORMAT 1
|
||||||
|
|
||||||
PAL 0
|
PAL 0
|
||||||
|
NAME blueprint
|
||||||
0,82,204
|
0,82,204
|
||||||
128,159,255
|
128,159,255
|
||||||
255,255,255
|
255,255,255
|
||||||
|
@ -26,6 +27,7 @@ ROOM 0
|
||||||
0,a,0,0,0,0,0,0,0,0,0,0,0,0,a,0
|
0,a,0,0,0,0,0,0,0,0,0,0,0,0,a,0
|
||||||
0,a,a,a,a,a,a,a,a,a,a,a,a,a,a,0
|
0,a,a,a,a,a,a,a,a,a,a,a,a,a,a,0
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||||
|
NAME example room
|
||||||
PAL 0
|
PAL 0
|
||||||
|
|
||||||
TIL a
|
TIL a
|
||||||
|
@ -37,6 +39,7 @@ TIL a
|
||||||
10000001
|
10000001
|
||||||
10000001
|
10000001
|
||||||
11111111
|
11111111
|
||||||
|
NAME block
|
||||||
|
|
||||||
SPR A
|
SPR A
|
||||||
00011000
|
00011000
|
||||||
|
@ -58,7 +61,8 @@ SPR a
|
||||||
01111100
|
01111100
|
||||||
00111100
|
00111100
|
||||||
00100100
|
00100100
|
||||||
DLG SPR_0
|
NAME cat
|
||||||
|
DLG 0
|
||||||
POS 0 8,12
|
POS 0 8,12
|
||||||
|
|
||||||
ITM 0
|
ITM 0
|
||||||
|
@ -71,13 +75,31 @@ ITM 0
|
||||||
00011000
|
00011000
|
||||||
00000000
|
00000000
|
||||||
NAME tea
|
NAME tea
|
||||||
DLG ITM_0
|
DLG 1
|
||||||
|
|
||||||
DLG SPR_0
|
ITM 1
|
||||||
|
00000000
|
||||||
|
00111100
|
||||||
|
00100100
|
||||||
|
00111100
|
||||||
|
00010000
|
||||||
|
00011000
|
||||||
|
00010000
|
||||||
|
00011000
|
||||||
|
NAME key
|
||||||
|
DLG 2
|
||||||
|
|
||||||
|
DLG 0
|
||||||
I'm a cat
|
I'm a cat
|
||||||
|
NAME cat dialog
|
||||||
|
|
||||||
DLG ITM_0
|
DLG 1
|
||||||
You found a nice warm cup of tea
|
You found a nice warm cup of tea
|
||||||
|
NAME tea dialog
|
||||||
|
|
||||||
|
DLG 2
|
||||||
|
A key! {wvy}What does it open?{wvy}
|
||||||
|
NAME key dialog
|
||||||
|
|
||||||
VAR a
|
VAR a
|
||||||
42
|
42
|
||||||
|
|
Loading…
Reference in New Issue