diff --git a/LICENSE b/LICENSE index 7483d9f..0bbaa90 100644 --- a/LICENSE +++ b/LICENSE @@ -7,6 +7,10 @@ │ Textures (radio and speaker) by │ │ MCL (CC BY 4.0 Int'l) │ │ │ +│ Textures (Chess icons for the Chess notation) │ +│ originally by Wikimedia user Cbnurnett, │ +│ scaled down and edited by Wuzzy (CC BY-SA 3.0 Unported) │ +│ │ │ Textures (hanging candle) by │ │ Wuzzy (CC0) │ │ │ diff --git a/src/chess.lua b/src/chess.lua index 492fed5..497f609 100644 --- a/src/chess.lua +++ b/src/chess.lua @@ -802,7 +802,7 @@ local pieces_str, x = "", 0 for i = 1, #pieces do local p = pieces[i]:match(":(%w+_%w+)") if pieces[i]:find(":(%w+)_(%w+)") and not pieces_str:find(p) then - pieces_str = pieces_str .. x .. "=" .. p .. ".png," + pieces_str = pieces_str .. x .. "=chess_figurine_" .. p .. ".png," x = x + 1 end end @@ -900,9 +900,9 @@ local function get_moves_formstring(meta) if pieceFrom:sub(11,14) == "pawn" then pieceFrom_si_id = MOVES_LIST_SYMBOL_EMPTY else - pieceFrom_si_id = pieces_str:match("(%d+)=" .. pieceFrom_s) + pieceFrom_si_id = pieces_str:match("(%d+)=chess_figurine_" .. pieceFrom_s) end - local pieceTo_si_id = pieceTo_s ~= "" and pieces_str:match("(%d+)=" .. pieceTo_s) or "" + local pieceTo_si_id = pieceTo_s ~= "" and pieces_str:match("(%d+)=chess_figurine_" .. pieceTo_s) or "" local coordFrom = index_to_notation(from_idx) local coordTo = index_to_notation(to_idx) diff --git a/textures/chess_figurine_bishop_black.png b/textures/chess_figurine_bishop_black.png new file mode 100644 index 0000000..0e4895f Binary files /dev/null and b/textures/chess_figurine_bishop_black.png differ diff --git a/textures/chess_figurine_bishop_white.png b/textures/chess_figurine_bishop_white.png new file mode 100644 index 0000000..7d753d9 Binary files /dev/null and b/textures/chess_figurine_bishop_white.png differ diff --git a/textures/chess_figurine_king_black.png b/textures/chess_figurine_king_black.png new file mode 100644 index 0000000..974aeb0 Binary files /dev/null and b/textures/chess_figurine_king_black.png differ diff --git a/textures/chess_figurine_king_white.png b/textures/chess_figurine_king_white.png new file mode 100644 index 0000000..889932f Binary files /dev/null and b/textures/chess_figurine_king_white.png differ diff --git a/textures/chess_figurine_knight_black.png b/textures/chess_figurine_knight_black.png new file mode 100644 index 0000000..2ebb32a Binary files /dev/null and b/textures/chess_figurine_knight_black.png differ diff --git a/textures/chess_figurine_knight_white.png b/textures/chess_figurine_knight_white.png new file mode 100644 index 0000000..933bf34 Binary files /dev/null and b/textures/chess_figurine_knight_white.png differ diff --git a/textures/chess_figurine_pawn_black.png b/textures/chess_figurine_pawn_black.png new file mode 100644 index 0000000..ed4d185 Binary files /dev/null and b/textures/chess_figurine_pawn_black.png differ diff --git a/textures/chess_figurine_pawn_white.png b/textures/chess_figurine_pawn_white.png new file mode 100644 index 0000000..aeb4929 Binary files /dev/null and b/textures/chess_figurine_pawn_white.png differ diff --git a/textures/chess_figurine_queen_black.png b/textures/chess_figurine_queen_black.png new file mode 100644 index 0000000..452fde2 Binary files /dev/null and b/textures/chess_figurine_queen_black.png differ diff --git a/textures/chess_figurine_queen_white.png b/textures/chess_figurine_queen_white.png new file mode 100644 index 0000000..e888f00 Binary files /dev/null and b/textures/chess_figurine_queen_white.png differ diff --git a/textures/chess_figurine_rook_black.png b/textures/chess_figurine_rook_black.png new file mode 100644 index 0000000..5d2dba6 Binary files /dev/null and b/textures/chess_figurine_rook_black.png differ diff --git a/textures/chess_figurine_rook_white.png b/textures/chess_figurine_rook_white.png new file mode 100644 index 0000000..4d47369 Binary files /dev/null and b/textures/chess_figurine_rook_white.png differ