From ec95776771d061c21af17686491181c78b7955c9 Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Sat, 20 Mar 2021 12:35:38 +0100 Subject: draw grid --- src/constants.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/constants.rs') diff --git a/src/constants.rs b/src/constants.rs index f9a5003..5952fa5 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -1,5 +1,5 @@ pub const TILE_SCALE: f32 = 3.0; -pub const TILE_HEIGHT: f32 = 16.0; +pub const TILE_SIZE: f32 = 16.0; pub const TILE_WIDTH: f32 = 16.0; pub const BORDER_SIZE: f32 = 3.0; pub const SHIFT_X: f32 = 50.0; -- cgit v1.2.3 From 4312f3b7eedbf6cdbe012be6eea1d45afd82de12 Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Sun, 21 Mar 2021 18:29:09 +0100 Subject: start using constants for the tilesheet indexes --- src/constants.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/constants.rs') diff --git a/src/constants.rs b/src/constants.rs index 5952fa5..c33e30b 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -6,3 +6,28 @@ pub const SHIFT_X: f32 = 50.0; pub const SHIFT_Y: f32 = 50.0; pub const COLUMNS: usize = 8; pub const ROWS: usize = 8; + +pub const TILESHEET_GREEN: u32 = 0; +pub const TILESHEET_YELLOW: u32 = 1; +pub const TILESHEET_BLUE: u32 = 2; +pub const TILESHEET_RED: u32 = 3; + +pub const TILESHEET_EXPLOSION1: u32 = 4; +pub const TILESHEET_EXPLOSION2: u32 = 5; +pub const TILESHEET_EXPLOSION3: u32 = 6; +pub const TILESHEET_EXPLOSION4: u32 = 7; + +pub const TILESHEET_COSMONAUT1: u32 = 8; +pub const TILESHEET_VISOR1: u32 = 9; +pub const TILESHEET_VISOR2: u32 = 10; +pub const TILESHEET_NONE1: u32 = 11; + +pub const TILESHEET_COSMONAUT2: u32 = 12; +pub const TILESHEET_VISOR3: u32 = 13; +pub const TILESHEET_VISOR4: u32 = 14; +pub const TILESHEET_NONE2: u32 = 15; + +pub const TILESHEET_STAR1: u32 = 16; +pub const TILESHEET_STAR2: u32 = 17; +pub const TILESHEET_STAR3: u32 = 18; +pub const TILESHEET_NONE3: u32 = 19; -- cgit v1.2.3 From 585d82473ccf566965ded0e50eea1669c3e1cdf3 Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Sun, 21 Mar 2021 19:33:05 +0100 Subject: moving more to constants --- src/constants.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/constants.rs') diff --git a/src/constants.rs b/src/constants.rs index c33e30b..d8effa8 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -1,11 +1,8 @@ -pub const TILE_SCALE: f32 = 3.0; +pub const TILE_SCALE: f32 = 3.5; pub const TILE_SIZE: f32 = 16.0; -pub const TILE_WIDTH: f32 = 16.0; -pub const BORDER_SIZE: f32 = 3.0; -pub const SHIFT_X: f32 = 50.0; -pub const SHIFT_Y: f32 = 50.0; -pub const COLUMNS: usize = 8; -pub const ROWS: usize = 8; +pub const WINDOW_HEIGHT: f32 = 600.0; +pub const WINDOW_WIDTH: f32 = 800.0; +pub const GRID_SIZE: usize = 8; pub const TILESHEET_GREEN: u32 = 0; pub const TILESHEET_YELLOW: u32 = 1; -- cgit v1.2.3 From 6f2cf244f8d92068963207205125f2167768ff53 Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Sat, 10 Apr 2021 12:28:16 +0200 Subject: setup for new tileset --- src/constants.rs | 45 +++++++++++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 20 deletions(-) (limited to 'src/constants.rs') diff --git a/src/constants.rs b/src/constants.rs index d8effa8..7eed139 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -4,27 +4,32 @@ pub const WINDOW_HEIGHT: f32 = 600.0; pub const WINDOW_WIDTH: f32 = 800.0; pub const GRID_SIZE: usize = 8; -pub const TILESHEET_GREEN: u32 = 0; -pub const TILESHEET_YELLOW: u32 = 1; -pub const TILESHEET_BLUE: u32 = 2; -pub const TILESHEET_RED: u32 = 3; +pub const TILESHEET_EXPLOSION1: u32 = 0; +pub const TILESHEET_EXPLOSION2: u32 = 1; +pub const TILESHEET_EXPLOSION3: u32 = 2; +pub const TILESHEET_EXPLOSION4: u32 = 3; +pub const TILESHEET_EXPLOSION5: u32 = 4; -pub const TILESHEET_EXPLOSION1: u32 = 4; -pub const TILESHEET_EXPLOSION2: u32 = 5; -pub const TILESHEET_EXPLOSION3: u32 = 6; -pub const TILESHEET_EXPLOSION4: u32 = 7; +pub const TILESHEET_GREEN: u32 = 5; +pub const TILESHEET_YELLOW: u32 = 6; +pub const TILESHEET_BLUE: u32 = 7; +pub const TILESHEET_RED: u32 = 8; +pub const TILESHEET_PURPLE: u32 = 9; -pub const TILESHEET_COSMONAUT1: u32 = 8; -pub const TILESHEET_VISOR1: u32 = 9; -pub const TILESHEET_VISOR2: u32 = 10; -pub const TILESHEET_NONE1: u32 = 11; +pub const TILESHEET_STAR1: u32 = 10; +pub const TILESHEET_STAR2: u32 = 11; +pub const TILESHEET_STAR3: u32 = 12; +pub const TILESHEET_NONE1: u32 = 13; +pub const TILESHEET_NONE2: u32 = 14; -pub const TILESHEET_COSMONAUT2: u32 = 12; -pub const TILESHEET_VISOR3: u32 = 13; -pub const TILESHEET_VISOR4: u32 = 14; -pub const TILESHEET_NONE2: u32 = 15; +pub const TILESHEET_COSMONAUT1: u32 = 15; +pub const TILESHEET_VISOR1: u32 = 16; +pub const TILESHEET_VISOR2: u32 = 17; +pub const TILESHEET_NONE3: u32 = 18; +pub const TILESHEET_NONE4: u32 = 19; -pub const TILESHEET_STAR1: u32 = 16; -pub const TILESHEET_STAR2: u32 = 17; -pub const TILESHEET_STAR3: u32 = 18; -pub const TILESHEET_NONE3: u32 = 19; +pub const TILESHEET_COSMONAUT2: u32 = 20; +pub const TILESHEET_VISOR3: u32 = 21; +pub const TILESHEET_VISOR4: u32 = 22; +pub const TILESHEET_NONE6: u32 = 23; +pub const TILESHEET_NONE7: u32 = 24; -- cgit v1.2.3 From 893805baa14972dc6c1c28170856097bb54bf280 Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Sat, 10 Apr 2021 13:06:25 +0200 Subject: redid how visibility works, moved setting occupants to a fucntion, setup animation function better --- src/constants.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/constants.rs') diff --git a/src/constants.rs b/src/constants.rs index 7eed139..86bbe5e 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -19,17 +19,17 @@ pub const TILESHEET_PURPLE: u32 = 9; pub const TILESHEET_STAR1: u32 = 10; pub const TILESHEET_STAR2: u32 = 11; pub const TILESHEET_STAR3: u32 = 12; -pub const TILESHEET_NONE1: u32 = 13; -pub const TILESHEET_NONE2: u32 = 14; +//pub const TILESHEET_X: u32 = 13; +//pub const TILESHEET_X: u32 = 14; pub const TILESHEET_COSMONAUT1: u32 = 15; pub const TILESHEET_VISOR1: u32 = 16; pub const TILESHEET_VISOR2: u32 = 17; -pub const TILESHEET_NONE3: u32 = 18; -pub const TILESHEET_NONE4: u32 = 19; +//pub const TILESHEET_X: u32 = 18; +//pub const TILESHEET_X: u32 = 19; pub const TILESHEET_COSMONAUT2: u32 = 20; pub const TILESHEET_VISOR3: u32 = 21; pub const TILESHEET_VISOR4: u32 = 22; -pub const TILESHEET_NONE6: u32 = 23; -pub const TILESHEET_NONE7: u32 = 24; +//pub const TILESHEET_X: u32 = 23; +//pub const TILESHEET_X: u32 = 24; -- cgit v1.2.3