From fa1be6230668c318a419e438a8a4d973d66ae197 Mon Sep 17 00:00:00 2001 From: He4eT Date: Mon, 16 Jun 2025 10:19:53 +0200 Subject: [PATCH] game: tune colors --- game.js | 66 ++++++++++++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/game.js b/game.js index 3dfcf28..f6d116d 100644 --- a/game.js +++ b/game.js @@ -571,6 +571,8 @@ function drawEnemies() { function drawEnemyLetters() { enemies.forEach((enemy) => { + const bgColor = 2 + const borderColor = 5 const enemyPosition = enemy.positions[0] const d = getDirection(player.position, enemyPosition) @@ -581,9 +583,9 @@ function drawEnemyLetters() { const screenPos = worldToScreen(letterPos) - rect(screenPos.x - 4, screenPos.y - 5, 10, 11, 2) + rect(screenPos.x - 4, screenPos.y - 5, 10, 11, bgColor) font(enemy.letter, screenPos.x - 3, screenPos.y - 3, 0, 8, 8, true) - rectb(screenPos.x - 4, screenPos.y - 5, 10, 11, 4) + rectb(screenPos.x - 4, screenPos.y - 5, 10, 11, borderColor) if (getDistance(player.position, enemy.positions[0]) < HINT_DISTANCE) { const code = letterToMorse[enemy.letter] @@ -596,7 +598,13 @@ function drawEnemyLetters() { y: screenPos.y + 8, } - rect(hintPosition.x, hintPosition.y - 1, Math.max(10, hintWidth), 3, 4) + rect( + hintPosition.x, + hintPosition.y - 1, + Math.max(10, hintWidth), + 3, + borderColor, + ) drawMorse(code, hintPosition.x, hintPosition.y, 2, hintWidth) } }) @@ -781,32 +789,32 @@ const BTN_Y = 7 // 018:00a0a00000000000a0aaa0a000aaa000a0aaa0a00000000000a0a00000000000 // 019:aa000aa0aa000aa000aaa00000aaa00000aaa000aa000aa0aa000aa000000000 // 020:aa000aa0aaaaaaa00aaaaa000aaaaa000aaaaa00aaaaaaa0aa000aa000000000 -// 065:0666666006600060066000600666666006600060066000600660006000000000 -// 066:0666660006600600066006000666666006600060066000600666666000000000 -// 067:0666666006600060066000000660000006600000066000600666666000000000 -// 068:0666660006600060066000600660006006600060066000600666660000000000 -// 069:0666666006600000066000000666600006600000066000000666666000000000 -// 070:0666666006600000066000000666660006600000066000000660000000000000 -// 071:0666666006600060066000000660066006600060066000600666666000000000 -// 072:0660006006600060066000600666666006600060066000600660006000000000 -// 073:0066660000066000000660000006600000066000000660000066660000000000 -// 074:0066666000006600000066000000660006006600060066000666660000000000 -// 075:0660006006600600066060000666060006600060066000600660006000000000 -// 076:0660000006600000066000000660000006600000066000600666666000000000 -// 077:0666066006666660066060600660606006600060066000600660006000000000 -// 078:0660006006660060066060600660066006600060066000600660006000000000 -// 079:0666666006600060066000600660006006600060066000600666666000000000 -// 080:0666666006600060066000600660006006666660066000000660000000000000 -// 081:0666666006600060066000600660006006600060066006000666606000000000 -// 082:0666666006600060066000600660006006666660066006000660006000000000 -// 083:0666666006600060066000000666666000000660060006600666666000000000 -// 084:0666666000066000000660000006600000066000000660000006600000000000 -// 085:0660006006600060066000600660006006600060066000600066660000000000 -// 086:0660006006600060066000600660006006600060006606000006600000000000 -// 087:0660006006600060066000600660606006606060066666600066060000000000 -// 088:0660066006600660006666000006600000666600066006600660066000000000 -// 089:0660066006600660066006600066660000066000000660000006600000000000 -// 090:0666666006000660000066000006600000660000066000600666666000000000 +// 065:0eeeeee00ee000e00ee000e00eeeeee00ee000e00ee000e00ee000e000000000 +// 066:0eeeee000ee00e000ee00e000eeeeee00ee000e00ee000e00eeeeee000000000 +// 067:0eeeeee00ee000e00ee000000ee000000ee000000ee000e00eeeeee000000000 +// 068:0eeeee000ee000e00ee000e00ee000e00ee000e00ee000e00eeeee0000000000 +// 069:0eeeeee00ee000000ee000000eeee0000ee000000ee000000eeeeee000000000 +// 070:0eeeeee00ee000000ee000000eeeee000ee000000ee000000ee0000000000000 +// 071:0eeeeee00ee000e00ee000000ee00ee00ee000e00ee000e00eeeeee000000000 +// 072:0ee000e00ee000e00ee000e00eeeeee00ee000e00ee000e00ee000e000000000 +// 073:00eeee00000ee000000ee000000ee000000ee000000ee00000eeee0000000000 +// 074:00eeeee00000ee000000ee000000ee000e00ee000e00ee000eeeee0000000000 +// 075:0ee000e00ee00e000ee0e0000eee0e000ee000e00ee000e00ee000e000000000 +// 076:0ee000000ee000000ee000000ee000000ee000000ee000e00eeeeee000000000 +// 077:0eee0ee00eeeeee00ee0e0e00ee0e0e00ee000e00ee000e00ee000e000000000 +// 078:0ee000e00eee00e00ee0e0e00ee00ee00ee000e00ee000e00ee000e000000000 +// 079:0eeeeee00ee000e00ee000e00ee000e00ee000e00ee000e00eeeeee000000000 +// 080:0eeeeee00ee000e00ee000e00ee000e00eeeeee00ee000000ee0000000000000 +// 081:0eeeeee00ee000e00ee000e00ee000e00ee000e00ee00e000eeee0e000000000 +// 082:0eeeeee00ee000e00ee000e00ee000e00eeeeee00ee00e000ee000e000000000 +// 083:0eeeeee00ee000e00ee000000eeeeee000000ee00e000ee00eeeeee000000000 +// 084:0eeeeee0000ee000000ee000000ee000000ee000000ee000000ee00000000000 +// 085:0ee000e00ee000e00ee000e00ee000e00ee000e00ee000e000eeee0000000000 +// 086:0ee000e00ee000e00ee000e00ee000e00ee000e000ee0e00000ee00000000000 +// 087:0ee000e00ee000e00ee000e00ee0e0e00ee0e0e00eeeeee000ee0e0000000000 +// 088:0ee00ee00ee00ee000eeee00000ee00000eeee000ee00ee00ee00ee000000000 +// 089:0ee00ee00ee00ee00ee00ee000eeee00000ee000000ee000000ee00000000000 +// 090:0eeeeee00e000ee00000ee00000ee00000ee00000ee000e00eeeeee000000000 // //