Skip to content

Commit

Permalink
feat: add demo2 to launcher
Browse files Browse the repository at this point in the history
  • Loading branch information
buxx committed Mar 27, 2024
1 parent 300e63f commit caa21ce
Show file tree
Hide file tree
Showing 17 changed files with 11,967 additions and 7 deletions.
5,506 changes: 5,506 additions & 0 deletions assets/demo2_deployment.json

Large diffs are not rendered by default.

5,506 changes: 5,506 additions & 0 deletions assets/demo2_deployment2.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions oc_launcher/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ impl eframe::App for Launcher {
ui.horizontal(|ui|{
let texture: &egui::TextureHandle = self.map1_preview.get_or_insert_with(|| {
ui.ctx().load_texture(
"Demo1Preview.png",
load_image_from_path(Path::new("resources/maps/Demo1/Demo1Preview.png")).unwrap(),
"Demo2Preview.png",
load_image_from_path(Path::new("resources/maps/Demo2/Demo2Preview.png")).unwrap(),
Default::default()
)
});
Expand Down Expand Up @@ -103,18 +103,18 @@ impl eframe::App for Launcher {
impl Launcher {
fn launch_attack_from_west(&self) -> Result<()> {
self.launch(
"Demo1",
"assets/demo1_deployment.json",
"Demo2",
"assets/demo2_deployment.json",
vec!["W", "NW", "SW"],
vec!["ALL"],
)?;
Ok(())
}
fn launch_attack_from_north_est(&self) -> Result<()> {
self.launch(
"Demo1",
"assets/demo1_deployment2.json",
vec!["N", "NE", "E"],
"Demo2",
"assets/demo2_deployment2.json",
vec!["S", "SE", "E"],
vec!["ALL"],
)?;
Ok(())
Expand Down
6 changes: 6 additions & 0 deletions resources/maps/Demo2/CREDITS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Original background, Creative Commons (BY) : https://rpgmapshare.com/piwigo/gallery/picture.php?/8327/category/55
Trees, Creative Commons (BY): https://rpgmapshare.com/piwigo/gallery/index.php?/category/22
House1, Creative Commons (BY) : https://rpgmapshare.com/piwigo/gallery/index.php?/category/19
Tree stump : https://www.kindpng.com/imgv/wThwhx_tree-wellness-alpharetta-ga-top-tree-stump-png/
Wood : https://rpgmapshare.com/piwigo/gallery/index.php
Rock & Stones : https://rpgmapshare.com/piwigo/gallery/index.php?/category/23
Binary file added resources/maps/Demo2/Demo2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
859 changes: 859 additions & 0 deletions resources/maps/Demo2/Demo2.tmx

Large diffs are not rendered by default.

Binary file added resources/maps/Demo2/Demo2Preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/maps/Demo2/Demo2__HD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/maps/Demo2/interiors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/maps/Demo2/interiors__HD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/maps/Demo2/terrain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 79 additions & 0 deletions resources/maps/Demo2/terrain.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?xml version = "1.0" encoding = "UTF-8" ?>
<tileset version="1.5" tiledversion="1.6.0" name="terrain" tilewidth="5" tileheight="5" tilecount="2000" columns="100">
<image source="terrain.png" width="500" height="100" />
<tile id="0">
<properties>
<property name="ID" value="ShortGrass" />
</properties>
</tile>
<tile id="1">
<properties>
<property name="ID" value="MiddleGrass" />
</properties>
</tile>
<tile id="2">
<properties>
<property name="ID" value="HighGrass" />
</properties>
</tile>
<tile id="3">
<properties>
<property name="ID" value="Dirt" />
</properties>
</tile>
<tile id="4">
<properties>
<property name="ID" value="Mud" />
</properties>
</tile>
<tile id="5">
<properties>
<property name="ID" value="Concrete" />
</properties>
</tile>
<tile id="6">
<properties>
<property name="ID" value="BrickWall" />
</properties>
</tile>
<tile id="100">
<properties>
<property name="ID" value="Trunk" />
</properties>
</tile>
<tile id="101">
<properties>
<property name="ID" value="Water" />
</properties>
</tile>
<tile id="102">
<properties>
<property name="ID" value="DeepWater" />
</properties>
</tile>
<tile id="103">
<properties>
<property name="ID" value="Underbrush" />
</properties>
</tile>
<tile id="104">
<properties>
<property name="ID" value="LightUnderbrush" />
</properties>
</tile>
<tile id="200">
<properties>
<property name="ID" value="MiddleWoodLogs" />
</properties>
</tile>
<tile id="201">
<properties>
<property name="ID" value="Hedge" />
</properties>
</tile>
<tile id="202">
<properties>
<property name="ID" value="MiddleRock" />
</properties>
</tile>
</tileset>
Binary file added resources/maps/Demo2/terrain.xcf
Binary file not shown.
Binary file added resources/maps/Demo2/trees.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions resources/maps/Demo2/trees.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.5" tiledversion="1.6.0" name="trees" tilewidth="64" tileheight="64" tilecount="20" columns="10">
<image source="trees.png" width="640" height="128"/>
</tileset>
Binary file added resources/maps/Demo2/trees__HD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/maps/Demo2/trees__HD.xcf
Binary file not shown.

0 comments on commit caa21ce

Please sign in to comment.