Add SVG assets.

This commit is contained in:
yukirij 2024-08-11 22:41:25 -07:00
parent 7ba9ce7ba0
commit e3fd0c703a
21 changed files with 1565 additions and 108 deletions

View File

@ -1,81 +0,0 @@
fn handle_packet(data:&Vec<u8>) -> Result<Vec<u8>,()>
{
use game::protocol::{
prelude::*,
code::*,
packet::*,
};
let response = Vec::<u8>::new();
let mut status = STATUS_OK;
let mut index = 2;
if data.len() < 2 { return Err(()); }
match ((data[0] as u16) << 8) + data[1] as u16 {
CODE_AUTH => {
status = STATUS_BAD;
match PacketAuth::decode(data, index) {
Ok(data) => {
// check if handle exists
status = STATUS_OK;
}
Err(_) => { }
}
}
CODE_REGISTER => {
}
CODE_RESUME => {
}
CODE_EXIT => {
}
CODE_LIST_GAME => {
}
CODE_LIST_OPEN => {
}
CODE_LIST_LIVE => {
}
CODE_JOIN => {
}
CODE_SPECTATE => {
}
CODE_LEAVE => {
}
CODE_RETIRE => {
}
CODE_PLAY => {
}
_ => {
status = STATUS_NOT_IMPL;
}
}
Ok([
pack_u16(status),
response,
].concat())
}

View File

@ -43,6 +43,50 @@ async fn service_http(mut request:hyper::Request<hyper::body::Incoming>, args:Ht
.header(CONTENT_TYPE, "image/png") .header(CONTENT_TYPE, "image/png")
.body(Full::new(Bytes::from(args.cache.favicon()))).unwrap()), .body(Full::new(Bytes::from(args.cache.favicon()))).unwrap()),
// Assets
"/asset/omen_dawn.svg" => Ok(Response::builder()
.header(CONTENT_TYPE, "image/svg")
.body(Full::new(Bytes::from(args.cache.asset(0, 6)))).unwrap()),
"/asset/dragon_dawn.svg" => Ok(Response::builder()
.header(CONTENT_TYPE, "image/svg")
.body(Full::new(Bytes::from(args.cache.asset(0, 5)))).unwrap()),
"/asset/castle_dawn.svg" => Ok(Response::builder()
.header(CONTENT_TYPE, "image/svg")
.body(Full::new(Bytes::from(args.cache.asset(0, 4)))).unwrap()),
"/asset/tower_dawn.svg" => Ok(Response::builder()
.header(CONTENT_TYPE, "image/svg")
.body(Full::new(Bytes::from(args.cache.asset(0, 3)))).unwrap()),
"/asset/lance_dawn.svg" => Ok(Response::builder()
.header(CONTENT_TYPE, "image/svg")
.body(Full::new(Bytes::from(args.cache.asset(0, 2)))).unwrap()),
"/asset/knight_dawn.svg" => Ok(Response::builder()
.header(CONTENT_TYPE, "image/svg")
.body(Full::new(Bytes::from(args.cache.asset(0, 1)))).unwrap()),
"/asset/militia_dawn.svg" => Ok(Response::builder()
.header(CONTENT_TYPE, "image/svg")
.body(Full::new(Bytes::from(args.cache.asset(0, 0)))).unwrap()),
"/asset/omen_dusk.svg" => Ok(Response::builder()
.header(CONTENT_TYPE, "image/svg")
.body(Full::new(Bytes::from(args.cache.asset(1, 6)))).unwrap()),
"/asset/dragon_dusk.svg" => Ok(Response::builder()
.header(CONTENT_TYPE, "image/svg")
.body(Full::new(Bytes::from(args.cache.asset(1, 5)))).unwrap()),
"/asset/castle_dusk.svg" => Ok(Response::builder()
.header(CONTENT_TYPE, "image/svg")
.body(Full::new(Bytes::from(args.cache.asset(1, 4)))).unwrap()),
"/asset/tower_dusk.svg" => Ok(Response::builder()
.header(CONTENT_TYPE, "image/svg")
.body(Full::new(Bytes::from(args.cache.asset(1, 3)))).unwrap()),
"/asset/lance_dusk.svg" => Ok(Response::builder()
.header(CONTENT_TYPE, "image/svg")
.body(Full::new(Bytes::from(args.cache.asset(1, 2)))).unwrap()),
"/asset/knight_dusk.svg" => Ok(Response::builder()
.header(CONTENT_TYPE, "image/svg")
.body(Full::new(Bytes::from(args.cache.asset(1, 1)))).unwrap()),
"/asset/militia_dusk.svg" => Ok(Response::builder()
.header(CONTENT_TYPE, "image/svg")
.body(Full::new(Bytes::from(args.cache.asset(1, 0)))).unwrap()),
_ => { _ => {
if hyper_tungstenite::is_upgrade_request(&request) { if hyper_tungstenite::is_upgrade_request(&request) {
if let Ok((response, websocket)) = hyper_tungstenite::upgrade(&mut request, None) { if let Ok((response, websocket)) = hyper_tungstenite::upgrade(&mut request, None) {

View File

@ -7,6 +7,22 @@ struct WebCacheData {
css:String, css:String,
js:String, js:String,
favicon:Vec<u8>, favicon:Vec<u8>,
dawn_omen:Vec<u8>,
dawn_dragon:Vec<u8>,
dawn_castle:Vec<u8>,
dawn_tower:Vec<u8>,
dawn_lance:Vec<u8>,
dawn_knight:Vec<u8>,
dawn_militia:Vec<u8>,
dusk_omen:Vec<u8>,
dusk_dragon:Vec<u8>,
dusk_castle:Vec<u8>,
dusk_tower:Vec<u8>,
dusk_lance:Vec<u8>,
dusk_knight:Vec<u8>,
dusk_militia:Vec<u8>,
} }
#[derive(Clone)] #[derive(Clone)]
@ -18,19 +34,14 @@ impl WebCache {
{ {
use std::fs::File; use std::fs::File;
// HTML
let mut html = String::new(); let mut html = String::new();
let mut favicon = Vec::<u8>::new(); if let Ok(mut file) = File::open("www/.html") {
file.read_to_string(&mut html).ok();
// Cache html file
match File::open("www/.html") {
Ok(mut file) => {
file.read_to_string(&mut html).ok();
html = minimize_whitespace(&html); html = minimize_whitespace(&html);
}
Err(_) => { }
} }
// Cache js file // CSS
let css_path = std::path::Path::new("www/css/"); let css_path = std::path::Path::new("www/css/");
let css: String = [ let css: String = [
"main.css", "main.css",
@ -40,14 +51,13 @@ impl WebCache {
"game.css", "game.css",
].map(|path| { ].map(|path| {
let mut buffer = String::new(); let mut buffer = String::new();
match File::open(css_path.join(path)) { if let Ok(mut file) = File::open(css_path.join(path)) {
Ok(mut file) => { file.read_to_string(&mut buffer).ok(); } file.read_to_string(&mut buffer).ok();
Err(_) => { }
} }
buffer buffer
}).concat(); }).concat();
// Cache js file // JavaScript
let js_path = std::path::Path::new("www/js/"); let js_path = std::path::Path::new("www/js/");
let js = [ let js = [
"const.js", "const.js",
@ -61,24 +71,109 @@ impl WebCache {
"main.js", "main.js",
].map(|path| { ].map(|path| {
let mut buffer = String::new(); let mut buffer = String::new();
match File::open(js_path.join(path)) { if let Ok(mut file) = File::open(js_path.join(path)) {
Ok(mut file) => { file.read_to_string(&mut buffer).ok(); } file.read_to_string(&mut buffer).ok();
Err(_) => { }
} }
buffer buffer
}).concat(); }).concat();
// Cache favicon file // Favicon
match File::open("www/favicon.png") { let mut favicon = Vec::<u8>::new();
Ok(mut file) => { if let Ok(mut file) = File::open("www/favicon.png") {
file.read_to_end(&mut favicon).ok(); file.read_to_end(&mut favicon).ok();
} }
Err(_) => { }
// Assets
let mut dawn_omen = Vec::<u8>::new();
if let Ok(mut file) = File::open("www/asset/omen_dawn.svg") {
file.read_to_end(&mut dawn_omen).ok();
}
let mut dawn_dragon = Vec::<u8>::new();
if let Ok(mut file) = File::open("www/asset/dragon_dawn.svg") {
file.read_to_end(&mut dawn_dragon).ok();
}
let mut dawn_castle = Vec::<u8>::new();
if let Ok(mut file) = File::open("www/asset/castle_dawn.svg") {
file.read_to_end(&mut dawn_castle).ok();
}
let mut dawn_tower = Vec::<u8>::new();
if let Ok(mut file) = File::open("www/asset/tower_dawn.svg") {
file.read_to_end(&mut dawn_tower).ok();
}
let mut dawn_lance = Vec::<u8>::new();
if let Ok(mut file) = File::open("www/asset/lance_dawn.svg") {
file.read_to_end(&mut dawn_lance).ok();
}
let mut dawn_knight = Vec::<u8>::new();
if let Ok(mut file) = File::open("www/asset/knight_dawn.svg") {
file.read_to_end(&mut dawn_knight).ok();
}
let mut dawn_militia = Vec::<u8>::new();
if let Ok(mut file) = File::open("www/asset/militia_dawn.svg") {
file.read_to_end(&mut dawn_militia).ok();
}
let mut dusk_omen = Vec::<u8>::new();
if let Ok(mut file) = File::open("www/asset/omen_dusk.svg") {
file.read_to_end(&mut dusk_omen).ok();
}
let mut dusk_dragon = Vec::<u8>::new();
if let Ok(mut file) = File::open("www/asset/dragon_dusk.svg") {
file.read_to_end(&mut dusk_dragon).ok();
}
let mut dusk_castle = Vec::<u8>::new();
if let Ok(mut file) = File::open("www/asset/castle_dusk.svg") {
file.read_to_end(&mut dusk_castle).ok();
}
let mut dusk_tower = Vec::<u8>::new();
if let Ok(mut file) = File::open("www/asset/tower_dusk.svg") {
file.read_to_end(&mut dusk_tower).ok();
}
let mut dusk_lance = Vec::<u8>::new();
if let Ok(mut file) = File::open("www/asset/lance_dusk.svg") {
file.read_to_end(&mut dusk_lance).ok();
}
let mut dusk_knight = Vec::<u8>::new();
if let Ok(mut file) = File::open("www/asset/knight_dusk.svg") {
file.read_to_end(&mut dusk_knight).ok();
}
let mut dusk_militia = Vec::<u8>::new();
if let Ok(mut file) = File::open("www/asset/militia_dusk.svg") {
file.read_to_end(&mut dusk_militia).ok();
} }
Self { Self {
data:Arc::new(RwLock::new(WebCacheData { data:Arc::new(RwLock::new(WebCacheData {
html, css, js, favicon, html, css, js, favicon,
dawn_omen,
dawn_dragon,
dawn_castle,
dawn_tower,
dawn_lance,
dawn_knight,
dawn_militia,
dusk_omen,
dusk_dragon,
dusk_castle,
dusk_tower,
dusk_lance,
dusk_knight,
dusk_militia,
})), })),
} }
} }
@ -114,4 +209,51 @@ impl WebCache {
Err(_) => Vec::new(), Err(_) => Vec::new(),
} }
} }
pub fn asset(&self, player:u8, id:u8) -> Vec<u8>
{
match self.data.read() {
Ok(reader) => {
match id {
0 => match player {
0 => reader.dawn_militia.clone(),
1 => reader.dusk_militia.clone(),
_ => Vec::new(),
}
1 => match player {
0 => reader.dawn_knight.clone(),
1 => reader.dusk_knight.clone(),
_ => Vec::new(),
}
2 => match player {
0 => reader.dawn_lance.clone(),
1 => reader.dusk_lance.clone(),
_ => Vec::new(),
}
3 => match player {
0 => reader.dawn_tower.clone(),
1 => reader.dusk_tower.clone(),
_ => Vec::new(),
}
4 => match player {
0 => reader.dawn_castle.clone(),
1 => reader.dusk_castle.clone(),
_ => Vec::new(),
}
5 => match player {
0 => reader.dawn_dragon.clone(),
1 => reader.dusk_dragon.clone(),
_ => Vec::new(),
}
6 => match player {
0 => reader.dawn_omen.clone(),
1 => reader.dusk_omen.clone(),
_ => Vec::new(),
}
_ => Vec::new(),
}
}
Err(_) => Vec::new(),
}
}
} }

82
www/asset/castle_dawn.svg Normal file
View File

@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="120"
height="120"
viewBox="0 0 120 120"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="castle_dawn.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#111111"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="true"
inkscape:zoom="6.9591092"
inkscape:cx="46.198442"
inkscape:cy="46.845076"
inkscape:window-width="2588"
inkscape:window-height="1368"
inkscape:window-x="1257"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="layer1">
<inkscape:grid
id="grid1"
units="px"
originx="0"
originy="0"
spacingx="1"
spacingy="1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
dotted="false"
gridanglex="30"
gridanglez="30"
visible="true" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#ffe082;fill-opacity:1;stroke-width:0.707108"
id="rect2-4-8-6"
width="60"
height="5"
x="30"
y="105" />
<path
style="display:inline;fill:#ffe082;fill-opacity:1"
d="M 23,95 V 75 l 2,-5 V 60 h 6 6 v -8 l -3,-2 -3,2 v 8 H 25 V 37 l -2,-2 v -7 l 1,-1 h 3 l 1,1 v 4 h 3 v -4 l 1,-1 h 4 l 1,1 v 4 h 3 v -4 l 1,-1 h 3 l 1,1 v 7 l -2,2 v 58 z"
id="path1-7-5"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccc" />
<path
style="display:inline;fill:#ffe082;fill-opacity:1"
d="M 97,95 V 75 L 95,70 V 60 h -6 -6 v -8 l 3,-2 3,2 v 8 h 6 V 37 l 2,-2 v -7 l -1,-1 h -3 l -1,1 v 4 h -3 v -4 l -1,-1 h -4 l -1,1 v 4 h -3 v -4 l -1,-1 h -3 l -1,1 v 7 l 2,2 v 58 z"
id="path1-7-5-8"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccc" />
<path
style="fill:#ffe082;fill-opacity:1"
d="M 46,95 V 37 l 2,-2 v -7 l -3,-3 v -7 l 1,-1 h 3 l 1,1 v 4 h 5 v -4 l 1,-1 h 8 l 1,1 v 4 h 5 v -4 l 1,-1 h 3 l 1,1 v 7 l -3,3 v 7 l 2,2 v 58 z m 19,0 V 70 l -1,-2 -2,-2 -2,-1 -2,1 -2,2 -1,2 v 25 z"
id="path5"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

82
www/asset/castle_dusk.svg Normal file
View File

@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="120"
height="120"
viewBox="0 0 120 120"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="castle_dusk.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#111111"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="true"
inkscape:zoom="6.9591092"
inkscape:cx="46.198442"
inkscape:cy="46.845076"
inkscape:window-width="2588"
inkscape:window-height="1368"
inkscape:window-x="1257"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="layer1">
<inkscape:grid
id="grid1"
units="px"
originx="0"
originy="0"
spacingx="1"
spacingy="1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
dotted="false"
gridanglex="30"
gridanglez="30"
visible="true" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#f6a1bd;fill-opacity:1;stroke-width:0.707108"
id="rect2-4-8-6"
width="60"
height="5"
x="30"
y="105" />
<path
style="display:inline;fill:#f6a1bd;fill-opacity:1"
d="M 23,95 V 75 l 2,-5 V 60 h 6 6 v -8 l -3,-2 -3,2 v 8 H 25 V 37 l -2,-2 v -7 l 1,-1 h 3 l 1,1 v 4 h 3 v -4 l 1,-1 h 4 l 1,1 v 4 h 3 v -4 l 1,-1 h 3 l 1,1 v 7 l -2,2 v 58 z"
id="path1-7-5"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccc" />
<path
style="display:inline;fill:#f6a1bd;fill-opacity:1"
d="M 97,95 V 75 L 95,70 V 60 h -6 -6 v -8 l 3,-2 3,2 v 8 h 6 V 37 l 2,-2 v -7 l -1,-1 h -3 l -1,1 v 4 h -3 v -4 l -1,-1 h -4 l -1,1 v 4 h -3 v -4 l -1,-1 h -3 l -1,1 v 7 l 2,2 v 58 z"
id="path1-7-5-8"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccc" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="M 46,95 V 37 l 2,-2 v -7 l -3,-3 v -7 l 1,-1 h 3 l 1,1 v 4 h 5 v -4 l 1,-1 h 8 l 1,1 v 4 h 5 v -4 l 1,-1 h 3 l 1,1 v 7 l -3,3 v 7 l 2,2 v 58 z m 19,0 V 70 l -1,-2 -2,-2 -2,-1 -2,1 -2,2 -1,2 v 25 z"
id="path5"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

85
www/asset/dragon_dawn.svg Normal file
View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="120"
height="120"
viewBox="0 0 120 120"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="dragon_dawn.svg"
inkscape:export-filename="dragon_dusk.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#111111"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="true"
inkscape:zoom="9.8416665"
inkscape:cx="33.480102"
inkscape:cy="60.762067"
inkscape:window-width="2584"
inkscape:window-height="1368"
inkscape:window-x="1261"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="layer1">
<inkscape:grid
id="grid1"
units="px"
originx="0"
originy="0"
spacingx="1"
spacingy="1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
dotted="false"
gridanglex="30"
gridanglez="30"
visible="true" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#ffe082;fill-opacity:1;stroke-width:0.707107"
id="rect2-4-8-6"
width="60"
height="5"
x="30"
y="105" />
<path
style="fill:#ffe082;fill-opacity:1"
d="m 45,100 5,-10 1,-15 -1,-5 -3,5 -1,5 v 10 l -5,-10 -1,-10 3,-15 2,-5 7,-20 5,-5 1,-1 1,-3 -1,-3 -3,-5 v -2 l 2,1 3,4 3,-4 2,-1 v 2 l -3,5 -1,3 1,3 1,1 5,5 7,20 2,5 3,15 -1,10 -5,10 V 80 l -1,-5 -3,-5 -1,5 1,15 5,10 z"
id="path1"
sodipodi:nodetypes="cccccccccccccccccccccccccccccccccccccccc" />
<path
style="fill:#ffe082;fill-opacity:1"
d="m 41,90 -5,-10 -1,-10 3,-15 2,-5 5,-10 -1,-3 -4,-8 -5,-1 3,3 1,3 -1,3 -15,-2 -10,3 -3,10 1,7 1,13 3,10 3,6 5,7 7,4 -3,-5 V 85 L 23,75 V 65 l 2,-10 8,-7 -3,7 -3,10 -1,10 4,10 5,15 h 5 l 3,-6 z"
id="path2"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccc" />
<path
style="fill:#ffe082;fill-opacity:1"
d="m 79,90 5,-10 1,-10 -3,-15 -2,-5 -5,-10 1,-3 4,-8 5,-1 -3,3 -1,3 1,3 15,-2 10,3 3,10 -1,7 -1,13 -3,10 -3,6 -5,7 -7,4 3,-5 V 85 L 97,75 V 65 l -2,-10 -8,-7 3,7 3,10 1,10 -4,10 -5,15 h -5 l -3,-6 z"
id="path2-0"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

85
www/asset/dragon_dusk.svg Normal file
View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="120"
height="120"
viewBox="0 0 120 120"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="dragon_dusk.svg"
inkscape:export-filename="dragon_dusk.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#111111"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="true"
inkscape:zoom="9.8416665"
inkscape:cx="33.480102"
inkscape:cy="60.762067"
inkscape:window-width="2584"
inkscape:window-height="1368"
inkscape:window-x="1261"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="layer1">
<inkscape:grid
id="grid1"
units="px"
originx="0"
originy="0"
spacingx="1"
spacingy="1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
dotted="false"
gridanglex="30"
gridanglez="30"
visible="true" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#f6a1bd;fill-opacity:1;stroke-width:0.707107"
id="rect2-4-8-6"
width="60"
height="5"
x="30"
y="105" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="m 45,100 5,-10 1,-15 -1,-5 -3,5 -1,5 v 10 l -5,-10 -1,-10 3,-15 2,-5 7,-20 5,-5 1,-1 1,-3 -1,-3 -3,-5 v -2 l 2,1 3,4 3,-4 2,-1 v 2 l -3,5 -1,3 1,3 1,1 5,5 7,20 2,5 3,15 -1,10 -5,10 V 80 l -1,-5 -3,-5 -1,5 1,15 5,10 z"
id="path1"
sodipodi:nodetypes="cccccccccccccccccccccccccccccccccccccccc" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="m 41,90 -5,-10 -1,-10 3,-15 2,-5 5,-10 -1,-3 -4,-8 -5,-1 3,3 1,3 -1,3 -15,-2 -10,3 -3,10 1,7 1,13 3,10 3,6 5,7 7,4 -3,-5 V 85 L 23,75 V 65 l 2,-10 8,-7 -3,7 -3,10 -1,10 4,10 5,15 h 5 l 3,-6 z"
id="path2"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccc" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="m 79,90 5,-10 1,-10 -3,-15 -2,-5 -5,-10 1,-3 4,-8 5,-1 -3,3 -1,3 1,3 15,-2 10,3 3,10 -1,7 -1,13 -3,10 -3,6 -5,7 -7,4 3,-5 V 85 L 97,75 V 65 l -2,-10 -8,-7 3,7 3,10 1,10 -4,10 -5,15 h -5 l -3,-6 z"
id="path2-0"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

73
www/asset/favicon.svg Normal file
View File

@ -0,0 +1,73 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="120"
height="120"
viewBox="0 0 120 120"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="favicon.svg"
inkscape:export-filename="favicon.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#111111"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="true"
inkscape:zoom="4.9208333"
inkscape:cx="90.127011"
inkscape:cy="51.210839"
inkscape:window-width="2588"
inkscape:window-height="1368"
inkscape:window-x="1257"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="layer1">
<inkscape:grid
id="grid1"
units="px"
originx="0"
originy="0"
spacingx="1"
spacingy="1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
dotted="false"
gridanglex="30"
gridanglez="30"
visible="true" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
style="fill:#621313;fill-opacity:1;stroke-width:1.10891"
d="M 62.871213,3.4652358 V 16.772189 L 35.148395,36.732618 29.603831,114.35651 H 96.138595 L 90.594031,36.732618 62.871213,16.772189 V 3.4652358 l 44.356507,27.7228182 5.54456,77.623896 -16.633685,11.08913 H 29.603831 l -16.63369,-11.08913 5.544563,-77.623896 z"
id="path2-3"
sodipodi:nodetypes="ccccccccccccccc" />
<path
style="fill:#ae5555;fill-opacity:1;stroke-width:1.10891"
d="M 59.356512,0.2638065 V 13.57076 L 31.633694,33.531188 26.08913,111.15508 H 92.623894 L 87.07933,33.531188 59.356512,13.57076 V 0.2638065 l 44.356508,27.7228185 5.54456,77.623895 -16.633686,11.08913 H 26.08913 L 9.4554395,105.61052 15.000003,27.986625 Z"
id="path2"
sodipodi:nodetypes="ccccccccccccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

72
www/asset/knight_dawn.svg Normal file
View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="120"
height="120"
viewBox="0 0 120 120"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="knight_dawn.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#111111"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="true"
inkscape:zoom="19.683333"
inkscape:cx="67.392042"
inkscape:cy="82.049112"
inkscape:window-width="2588"
inkscape:window-height="1368"
inkscape:window-x="1257"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="layer1">
<inkscape:grid
id="grid1"
units="px"
originx="0"
originy="0"
spacingx="1"
spacingy="1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
dotted="false"
gridanglex="30"
gridanglez="30"
visible="true" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#ffe082;fill-opacity:1;stroke-width:0.707108"
id="rect2-4-8-6"
width="60"
height="5"
x="30"
y="105" />
<path
style="fill:#ffe082;fill-opacity:1"
d="m 40,90 5,-25 v -5 l -5,5 -5,10 5,5 -5,5 -5,-10 5,-15 2,-5 2,-4 -4,-1 h -5 l -5,5 -10,-5 v -5 l 2,-4 -1,-6 v -4 l 2,4 2,3 5,-8 v -5 l 5,5 5,-5 5,5 15,5 h 30 l 10,5 5,14 2,9 -2,-1 -1,-2 -1,5 -3,8 v 7 l -1,10 h -6 l 1,-10 -1,-6 -5,-1 -2,7 -3,10 h -5 l 1,-2 2,-8 V 75 L 73,69 67,65 H 55 l -5,5 -5,20 z"
id="path4"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

72
www/asset/knight_dusk.svg Normal file
View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="120"
height="120"
viewBox="0 0 120 120"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="knight_dusk.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#111111"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="true"
inkscape:zoom="19.683333"
inkscape:cx="67.392042"
inkscape:cy="81.998308"
inkscape:window-width="2588"
inkscape:window-height="1368"
inkscape:window-x="1257"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="layer1">
<inkscape:grid
id="grid1"
units="px"
originx="0"
originy="0"
spacingx="1"
spacingy="1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
dotted="false"
gridanglex="30"
gridanglez="30"
visible="true" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#f6a1bd;fill-opacity:1;stroke-width:0.707108"
id="rect2-4-8-6"
width="60"
height="5"
x="30"
y="105" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="m 40,90 5,-25 v -5 l -5,5 -5,10 5,5 -5,5 -5,-10 5,-15 2,-5 2,-4 -4,-1 h -5 l -5,5 -10,-5 v -5 l 2,-4 -1,-6 v -4 l 2,4 2,3 5,-8 v -5 l 5,5 5,-5 5,5 15,5 h 30 l 10,5 5,14 2,9 -2,-1 -1,-2 -1,5 -3,8 v 7 l -1,10 h -6 l 1,-10 -1,-6 -5,-1 -2,7 -3,10 h -5 l 1,-2 2,-8 V 75 L 73,69 67,65 H 55 l -5,5 -5,20 z"
id="path4"
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

82
www/asset/lance_dawn.svg Normal file
View File

@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="120"
height="120"
viewBox="0 0 120 120"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="militia_dawn.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#111111"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="true"
inkscape:zoom="6.9591092"
inkscape:cx="51.084124"
inkscape:cy="44.545931"
inkscape:window-width="2588"
inkscape:window-height="1368"
inkscape:window-x="1257"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="layer1">
<inkscape:grid
id="grid1"
units="px"
originx="0"
originy="0"
spacingx="1"
spacingy="1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
dotted="false"
gridanglex="30"
gridanglez="30"
visible="true" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#ffe082;fill-opacity:1;stroke-width:0.707108"
id="rect2-4-8-6"
width="60"
height="5"
x="30"
y="105" />
<path
style="fill:#ffe082;fill-opacity:1"
d="M 55,100 H 65 V 85 l -5,5 -5,-5 z"
id="path13"
sodipodi:nodetypes="cccccc" />
<path
style="fill:#ffe082;fill-opacity:1"
d="M 70,85 80,80 85,70 H 70 l -5,5 H 55 L 50,70 H 35 l 5,10 10,5 5,-5 5,5 5,-5 z"
id="path14"
sodipodi:nodetypes="cccccccccccccc" />
<path
style="fill:#ffe082;fill-opacity:1"
d="M 55,70 H 65 L 70,65 65,30 60,10 55,30 50,65 Z"
id="path15"
sodipodi:nodetypes="cccccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

82
www/asset/lance_dusk.svg Normal file
View File

@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="120"
height="120"
viewBox="0 0 120 120"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="lance_dusk.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#111111"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="true"
inkscape:zoom="6.9591092"
inkscape:cx="51.084124"
inkscape:cy="44.545931"
inkscape:window-width="2588"
inkscape:window-height="1368"
inkscape:window-x="1257"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="layer1">
<inkscape:grid
id="grid1"
units="px"
originx="0"
originy="0"
spacingx="1"
spacingy="1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
dotted="false"
gridanglex="30"
gridanglez="30"
visible="true" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#f6a1bd;fill-opacity:1;stroke-width:0.707108"
id="rect2-4-8-6"
width="60"
height="5"
x="30"
y="105" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="M 55,100 H 65 V 85 l -5,5 -5,-5 z"
id="path13"
sodipodi:nodetypes="cccccc" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="M 70,85 80,80 85,70 H 70 l -5,5 H 55 L 50,70 H 35 l 5,10 10,5 5,-5 5,5 5,-5 z"
id="path14"
sodipodi:nodetypes="cccccccccccccc" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="M 55,70 H 65 L 70,65 65,30 60,10 55,30 50,65 Z"
id="path15"
sodipodi:nodetypes="cccccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="120"
height="120"
viewBox="0 0 120 120"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="militia_dawn.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#111111"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="true"
inkscape:zoom="13.918218"
inkscape:cx="61.466202"
inkscape:cy="54.173602"
inkscape:window-width="2588"
inkscape:window-height="1368"
inkscape:window-x="1257"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="layer1">
<inkscape:grid
id="grid1"
units="px"
originx="0"
originy="0"
spacingx="1"
spacingy="1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
dotted="false"
gridanglex="30"
gridanglez="30"
visible="true" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
style="fill:#ffe082;fill-opacity:1"
d="M 35,87 V 47 37 l 10,-10 10,-5 5,-5 5,5 10,5 10,10 V 47 87 H 77 V 52 l -5,-5 -6,2 -2,3 v 15 l -1,5 H 57 L 56,67 V 52 l -2,-3 -6,-2 -5,5 v 35 z"
id="path10"
sodipodi:nodetypes="cccccccccccccccccccccccccc" />
<rect
style="fill:#ffe082;fill-opacity:1;stroke-width:0.707107"
id="rect2-4-8-6"
width="60"
height="5"
x="30"
y="105" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="120"
height="120"
viewBox="0 0 120 120"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="militia_dusk.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#111111"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="true"
inkscape:zoom="9.8416666"
inkscape:cx="61.930568"
inkscape:cy="56.088061"
inkscape:window-width="2588"
inkscape:window-height="1368"
inkscape:window-x="1257"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="layer1">
<inkscape:grid
id="grid1"
units="px"
originx="0"
originy="0"
spacingx="1"
spacingy="1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
dotted="false"
gridanglex="30"
gridanglez="30"
visible="true" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
style="fill:#f6a1bd;fill-opacity:1"
d="M 35,87 V 47 37 l 10,-10 10,-5 5,-5 5,5 10,5 10,10 V 47 87 H 77 V 52 l -5,-5 -6,2 -2,3 v 15 l -1,5 H 57 L 56,67 V 52 l -2,-3 -6,-2 -5,5 v 35 z"
id="path10"
sodipodi:nodetypes="cccccccccccccccccccccccccc" />
<rect
style="fill:#f6a1bd;fill-opacity:1;stroke-width:0.707107"
id="rect2-4-8-6"
width="60"
height="5"
x="30"
y="105" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

90
www/asset/omen_dawn.svg Normal file
View File

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="120"
height="120"
viewBox="0 0 120 120"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="king_dawn.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#111111"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="true"
inkscape:zoom="6.9591092"
inkscape:cx="67.609228"
inkscape:cy="61.214731"
inkscape:window-width="2588"
inkscape:window-height="1368"
inkscape:window-x="1257"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="layer1">
<inkscape:grid
id="grid1"
units="px"
originx="0"
originy="0"
spacingx="1"
spacingy="1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
dotted="false"
gridanglex="30"
gridanglez="30"
visible="true" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#ffe082;fill-opacity:1;stroke-width:0.707107"
id="rect2-4-8-6"
width="60"
height="5"
x="30"
y="105" />
<path
style="fill:#ffe082;fill-opacity:1"
d="M 35,75 30,55 h 5 l 5,10 h 5 L 40,50 h 5 l 5,10 h 20 l 5,-10 h 5 l -5,15 h 5 l 5,-10 h 5 l -5,20 h -5 l -5,-5 h -5 l -5,5 H 55 l -5,-5 h -5 l -5,5 z"
id="path11"
sodipodi:nodetypes="ccccccccccccccccccccccccc" />
<path
style="fill:#ffe082;fill-opacity:1"
d="m 35,80 h 5 l 5,-5 h 5 l 5,5 h 10 l 5,-5 h 5 l 5,5 h 5 v 15 l -5,5 H 40 l -5,-5 z"
id="path12"
sodipodi:nodetypes="ccccccccccccccc" />
<path
style="fill:#ffe082;fill-opacity:1"
d="M 50,40 60,50 70,40 75,30 V 25 L 60,15 45,25 v 5 z"
id="path13"
sodipodi:nodetypes="ccccccccc" />
<path
style="fill:#ffe082;fill-opacity:1"
d="m 35,35 -5,5 5,5 5,-5 z"
id="path1" />
<path
style="fill:#ffe082;fill-opacity:1"
d="m 85,35 -5,5 5,5 5,-5 z"
id="path1-6" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

90
www/asset/omen_dusk.svg Normal file
View File

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="120"
height="120"
viewBox="0 0 120 120"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="king_dusk.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#111111"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="true"
inkscape:zoom="6.9591092"
inkscape:cx="67.609228"
inkscape:cy="61.214731"
inkscape:window-width="2588"
inkscape:window-height="1368"
inkscape:window-x="1257"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="layer1">
<inkscape:grid
id="grid1"
units="px"
originx="0"
originy="0"
spacingx="1"
spacingy="1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
dotted="false"
gridanglex="30"
gridanglez="30"
visible="true" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#f6a1bd;fill-opacity:1;stroke-width:0.707107"
id="rect2-4-8-6"
width="60"
height="5"
x="30"
y="105" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="M 35,75 30,55 h 5 l 5,10 h 5 L 40,50 h 5 l 5,10 h 20 l 5,-10 h 5 l -5,15 h 5 l 5,-10 h 5 l -5,20 h -5 l -5,-5 h -5 l -5,5 H 55 l -5,-5 h -5 l -5,5 z"
id="path11"
sodipodi:nodetypes="ccccccccccccccccccccccccc" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="m 35,80 h 5 l 5,-5 h 5 l 5,5 h 10 l 5,-5 h 5 l 5,5 h 5 v 15 l -5,5 H 40 l -5,-5 z"
id="path12"
sodipodi:nodetypes="ccccccccccccccc" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="M 50,40 60,50 70,40 75,30 V 25 L 60,15 45,25 v 5 z"
id="path13"
sodipodi:nodetypes="ccccccccc" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="m 35,35 -5,5 5,5 5,-5 z"
id="path1" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="m 85,35 -5,5 5,5 5,-5 z"
id="path1-6" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

65
www/asset/promote.svg Normal file
View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="120"
height="120"
viewBox="0 0 120 120"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="promote.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#111111"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="true"
inkscape:zoom="6.9591092"
inkscape:cx="45.336262"
inkscape:cy="47.707255"
inkscape:window-width="2588"
inkscape:window-height="1368"
inkscape:window-x="1257"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="layer1">
<inkscape:grid
id="grid1"
units="px"
originx="0"
originy="0"
spacingx="1"
spacingy="1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
dotted="false"
gridanglex="30"
gridanglez="30"
visible="true" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
style="fill:#8f1b1b;fill-opacity:1"
d="M 60,5 V 17 L 35,35 30,105 H 90 L 85,35 60,17 V 5 l 40,25 5,70 -15,10 H 30 L 15,100 20,30 Z"
id="path2"
sodipodi:nodetypes="ccccccccccccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

111
www/asset/tower_dawn.svg Normal file
View File

@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="120"
height="120"
viewBox="0 0 120 120"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="tower_dawn.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#111111"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="true"
inkscape:zoom="6.9591092"
inkscape:cx="35.708593"
inkscape:cy="58.628193"
inkscape:window-width="2588"
inkscape:window-height="1368"
inkscape:window-x="1257"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="layer1">
<inkscape:grid
id="grid1"
units="px"
originx="0"
originy="0"
spacingx="1"
spacingy="1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
dotted="false"
gridanglex="30"
gridanglez="30"
visible="true" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#ffe082;fill-opacity:1;stroke-width:0.707107"
id="rect2-4-8-6"
width="60"
height="5"
x="30"
y="105" />
<path
style="fill:#ffe082;fill-opacity:1"
d="M 40,50 35,95 H 85 L 80,50 h -5 l 5,40 H 40 l 5,-40 z"
id="path3"
sodipodi:nodetypes="ccccccccc" />
<path
style="fill:#ffe082;fill-opacity:1"
d="m 44,58 36,32 h 3 V 87 L 47,55 h -3 z"
id="path4"
sodipodi:nodetypes="ccccccc" />
<path
style="fill:#ffe082;fill-opacity:1"
d="M 73,55 37,87 v 3 h 3 L 76,58 v -3 z"
id="path5"
sodipodi:nodetypes="ccccccc" />
<path
style="fill:#ffe082;fill-opacity:1"
d="m 35,50 1,-25 h 3 L 38,45 H 82 L 81,25 h 3 l 1,25 z"
id="path6"
sodipodi:nodetypes="ccccccccc" />
<path
style="fill:#ffe082;fill-opacity:1"
d="M 35,25 H 30 V 20 L 45,10 h 30 l 15,10 v 5 H 75 l -5,-5 -5,5 H 55 l -5,-5 -5,5 z"
id="path9"
sodipodi:nodetypes="cccccccccccccc" />
<path
style="fill:#ffe082;fill-opacity:1"
d="M 42,32 41,42 H 79 L 78,32 Z"
id="path13"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#ffe082;fill-opacity:1"
d="m 35,95 -1,5 h 6 v -5 z"
id="path14"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#ffe082;fill-opacity:1"
d="m 85,95 1,5 h -6 v -5 z"
id="path14-3"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#ffe082;fill-opacity:1"
d="m 44,53 -1,5 h 34 l -1,-5 z"
id="path15" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

111
www/asset/tower_dusk.svg Normal file
View File

@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="120"
height="120"
viewBox="0 0 120 120"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20e, 2023-11-25, custom)"
sodipodi:docname="tower_dusk_v0.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#111111"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="true"
inkscape:zoom="6.9591092"
inkscape:cx="35.708593"
inkscape:cy="58.628193"
inkscape:window-width="2588"
inkscape:window-height="1368"
inkscape:window-x="1257"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="layer1">
<inkscape:grid
id="grid1"
units="px"
originx="0"
originy="0"
spacingx="1"
spacingy="1"
empcolor="#0099e5"
empopacity="0.30196078"
color="#0099e5"
opacity="0.14901961"
empspacing="5"
dotted="false"
gridanglex="30"
gridanglez="30"
visible="true" />
</sodipodi:namedview>
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#f6a1bd;fill-opacity:1;stroke-width:0.707107"
id="rect2-4-8-6"
width="60"
height="5"
x="30"
y="105" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="M 40,50 35,95 H 85 L 80,50 h -5 l 5,40 H 40 l 5,-40 z"
id="path3"
sodipodi:nodetypes="ccccccccc" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="m 44,58 36,32 h 3 V 87 L 47,55 h -3 z"
id="path4"
sodipodi:nodetypes="ccccccc" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="M 73,55 37,87 v 3 h 3 L 76,58 v -3 z"
id="path5"
sodipodi:nodetypes="ccccccc" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="m 35,50 1,-25 h 3 L 38,45 H 82 L 81,25 h 3 l 1,25 z"
id="path6"
sodipodi:nodetypes="ccccccccc" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="M 35,25 H 30 V 20 L 45,10 h 30 l 15,10 v 5 H 75 l -5,-5 -5,5 H 55 l -5,-5 -5,5 z"
id="path9"
sodipodi:nodetypes="cccccccccccccc" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="M 42,32 41,42 H 79 L 78,32 Z"
id="path13"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="m 35,95 -1,5 h 6 v -5 z"
id="path14"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="m 85,95 1,5 h -6 v -5 z"
id="path14-3"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#f6a1bd;fill-opacity:1"
d="m 44,53 -1,5 h 34 l -1,-5 z"
id="path15" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -5,8 +5,6 @@ GAME.Board = class {
constructor() { constructor() {
this.tiles = [ ]; for(let i = 0; i < 61; ++i) { this.tiles.push(new GAME.Tile()); } this.tiles = [ ]; for(let i = 0; i < 61; ++i) { this.tiles.push(new GAME.Tile()); }
this.pieces = [ ]; this.pieces = [ ];
this.dawn = new GAME.Player();
this.dusk = new GAME.Player();
this.init(); this.init();
} }
@ -113,9 +111,18 @@ GAME.Move = class {
GAME.GamePiece = class { GAME.GamePiece = class {
constructor(name, assets, moves, promote_moves) { constructor(name, assets, moves, promote_moves) {
this.name = name; this.name = name;
this.assets = assets;
this.moves = moves; this.moves = moves;
this.pmoves = promote_moves; this.pmoves = promote_moves;
this.assets = null;
if(assets !== null) {
this.assets = [
new Image(),
new Image()
];
this.assets[0].src = assets[0];
this.assets[1].src = assets[1];
}
} }
}; };
@ -158,7 +165,10 @@ GAME.Piece = class {
GAME.Game = class { GAME.Game = class {
constructor() { constructor() {
this.turn = 0; this.turn = 0;
this.board = new GAME.Board(); this.board = new GAME.Board();
this.dawn = new GAME.Player();
this.dusk = new GAME.Player();
} }
update_board() { update_board() {

View File

@ -77,6 +77,7 @@ const INTERFACE = {
let radius = INTERFACE.Radius * gui_scale; let radius = INTERFACE.Radius * gui_scale;
let basis_x = gui_offset.x + radius; let basis_x = gui_offset.x + radius;
let basis_y = gui_offset.y + (13 * gui_scale); let basis_y = gui_offset.y + (13 * gui_scale);
let icon_radius = 0.7 * radius;
const TILE_SCALE = 0.9; const TILE_SCALE = 0.9;
ctx.lineWidth = gui_scale * 0.06; ctx.lineWidth = gui_scale * 0.06;
@ -111,6 +112,7 @@ const INTERFACE = {
// Draw tile content // Draw tile content
if(tile.piece !== null) { if(tile.piece !== null) {
let piece = GAME_DATA.board.pieces[tile.piece]; let piece = GAME_DATA.board.pieces[tile.piece];
let game_piece = GAME.Const.Piece[piece.piece];
// Draw border // Draw border
if(piece.player == GAME.Const.Player.Dawn) { ctx.strokeStyle = INTERFACE.Color.DawnDark; } if(piece.player == GAME.Const.Player.Dawn) { ctx.strokeStyle = INTERFACE.Color.DawnDark; }
@ -122,7 +124,9 @@ const INTERFACE = {
// Draw border hints // Draw border hints
draw.hints(piece); draw.hints(piece);
// Draw piece // Draw piece icon
//if(piece.promoted) { ctx.drawImage(I_PROMOTE, -icon_radius, -icon_radius, icon_radius * 2., icon_radius * 2.); }
//ctx.drawImage(game_piece.assets[piece.player], -icon_radius, -icon_radius, icon_radius * 2., icon_radius * 2.);
} else { } else {
// Draw standard border // Draw standard border
@ -136,6 +140,8 @@ const INTERFACE = {
} }
ctx.font = Math.ceil(gui_scale / 2) + "px sans-serif";
// Draw player pool // Draw player pool
for(let i = 0; i < 6; ++i) { for(let i = 0; i < 6; ++i) {
let gui_x = basis_x + (radius * 14); let gui_x = basis_x + (radius * 14);
@ -158,6 +164,11 @@ const INTERFACE = {
draw.hex(); draw.hex();
ctx.stroke(); ctx.stroke();
ctx.fillStyle = INTERFACE.Color.Dawn;
ctx.textBaseline = "middle";
ctx.textAlign = "center";
ctx.fillText(GAME_DATA.dawn.pool.pieces[i], -0.5 * radius, 0);
ctx.restore(); ctx.restore();
} }
@ -186,12 +197,17 @@ const INTERFACE = {
draw.hex(); draw.hex();
ctx.stroke(); ctx.stroke();
ctx.fillStyle = INTERFACE.Color.Dusk;
ctx.textBaseline = "middle";
ctx.textAlign = "center";
ctx.fillText(GAME_DATA.dusk.pool.pieces[i], -0.5 * radius, 0);
ctx.restore(); ctx.restore();
} }
// Draw informational text // Draw informational text
ctx.font = Math.ceil(gui_scale / 24) + "px sans-serif"; ctx.font = Math.ceil(gui_scale / 2) + "px sans-serif";
/* /*