Resurrect ShogiSVG theme and make it use the shogi lib.
[tagua/yd.git] / data / themes / pieces / ShogiSVG / theme.lua
blob70f56d3adf8df472ccb7750d2161c4ad00e237e5
1 import("piece_theme.lua")
2 import("shogi_themelib.lua")
4 shadow=7.0
5 shadow_color="#404050"
6 shadow_offset_x=6
7 shadow_offset_y=4
8 shadow_grow=5
10 function addGlyph(file)
11 return function(i, size)
12 i:draw_svg(Rect(0,0,size,size), file)
13 return i
14 end
15 end
17 function shogi_piece(file, white, ratio)
18 return addShadow(overlay(tile(white, ratio),
19 addGlyph(file)))
20 end
22 theme.black_king = shogi_piece("king.svg", false, 1)
23 theme.black_rook = shogi_piece("rook.svg", false, 0.96)
24 theme.black_p_rook = shogi_piece("prook.svg", false, 0.96)
25 theme.black_bishop = shogi_piece("bishop.svg", false, 0.93)
26 theme.black_p_bishop = shogi_piece("pbishop.svg", false, 0.93)
27 theme.black_gold = shogi_piece("gold.svg", false, 0.9)
28 theme.black_silver = shogi_piece("silver.svg", false, 0.9)
29 theme.black_p_silver = shogi_piece("psilver.svg", false, 0.9)
30 theme.black_knight = shogi_piece("horse.svg", false, 0.86)
31 theme.black_p_knight = shogi_piece("phorse.svg", false, 0.86)
32 theme.black_lance = shogi_piece("lance.svg", false, 0.83)
33 theme.black_p_lance = shogi_piece("plance.svg", false, 0.83)
34 theme.black_pawn = shogi_piece("pawn.svg", false, 0.8)
35 theme.black_p_pawn = shogi_piece("ppawn.svg", false, 0.8)
37 theme.white_king = shogi_piece("king.svg", true, 1)
38 theme.white_rook = shogi_piece("rook.svg", true, 0.96)
39 theme.white_p_rook = shogi_piece("prook.svg", true, 0.96)
40 theme.white_bishop = shogi_piece("bishop.svg", true, 0.93)
41 theme.white_p_bishop = shogi_piece("pbishop.svg", true, 0.93)
42 theme.white_gold = shogi_piece("gold.svg", true, 0.9)
43 theme.white_silver = shogi_piece("silver.svg", true, 0.9)
44 theme.white_p_silver = shogi_piece("psilver.svg", true, 0.9)
45 theme.white_knight = shogi_piece("horse.svg", true, 0.86)
46 theme.white_p_knight = shogi_piece("phorse.svg", true, 0.86)
47 theme.white_lance = shogi_piece("lance.svg", true, 0.83)
48 theme.white_p_lance = shogi_piece("plance.svg", true, 0.83)
49 theme.white_pawn = shogi_piece("pawn.svg", true, 0.8)
50 theme.white_p_pawn = shogi_piece("ppawn.svg", true, 0.8)
52 -- To be able to adapt this theme to chess too
53 theme.black_queen = shogi_piece("gold.svg", false, 0.9)
54 theme.white_queen = shogi_piece("gold.svg", true, 0.9)