mirror of
https://github.com/He4eT/DotDashPit.git
synced 2026-05-04 17:37:23 +00:00
game: extract sprites
This commit is contained in:
parent
2a21043fcc
commit
4e2319bd1c
1 changed files with 14 additions and 12 deletions
26
game.js
26
game.js
|
|
@ -101,12 +101,15 @@ const player = {
|
|||
const playerStates = {
|
||||
default: {
|
||||
speed: 1,
|
||||
sprite: 256,
|
||||
},
|
||||
dot: {
|
||||
speed: 1.5,
|
||||
sprite: 257,
|
||||
},
|
||||
dash: {
|
||||
speed: 2,
|
||||
sprite: 258,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -286,11 +289,7 @@ function handleMorse() {
|
|||
|
||||
function drawPlayer() {
|
||||
drawSprite(
|
||||
{
|
||||
default: 64,
|
||||
dot: 65,
|
||||
dash: 66,
|
||||
}[player.state],
|
||||
playerStates[player.state].sprite,
|
||||
player.position.x,
|
||||
player.position.y,
|
||||
)
|
||||
|
|
@ -743,15 +742,18 @@ const BTN_Y = 7
|
|||
// 048:0000012300000122000001110000000000000000000000000000000000000000
|
||||
// 049:3333333322222222111111110000000000000000000000000000000000000000
|
||||
// 050:3210000022100000111000000000000000000000000000000000000000000000
|
||||
// 064:8800088080000080008880000088800000888000800000808800088000000000
|
||||
// 065:8800088080000080000000000008000000000000800000808800088000000000
|
||||
// 066:0000000008808800080008000008000008000800088088000000000000000000
|
||||
// 080:aaaaaaa0aaaaaaa0aa000aa0aa000aa0aa000aa0aaaaaaa0aaaaaaa000000000
|
||||
// 081:aaaaaaa0a00a00a0a00a00a0aaaaaaa0a00a00a0a00a00a0aaaaaaa000000000
|
||||
// 082:00a0a00000000000a0aaa0a000aaa000a0aaa0a00000000000a0a00000000000
|
||||
// 083:aa000aa0aaaaaaa00aaaaa000aaaaa000aaaaa00aaaaaaa0aa000aa000000000
|
||||
// </TILES>
|
||||
|
||||
// <SPRITES>
|
||||
// 000:8800088080000080008880000088800000888000800000808800088000000000
|
||||
// 001:8800088080000080000000000008000000000000800000808800088000000000
|
||||
// 002:0000000008808800080008000008000008000800088088000000000000000000
|
||||
// 016:aaaaaaa0aaaaaaa0aa000aa0aa000aa0aa000aa0aaaaaaa0aaaaaaa000000000
|
||||
// 017:aaaaaaa0a00a00a0a00a00a0aaaaaaa0a00a00a0a00a00a0aaaaaaa000000000
|
||||
// 018:00a0a00000000000a0aaa0a000aaa000a0aaa0a00000000000a0a00000000000
|
||||
// 019:aa000aa0aaaaaaa00aaaaa000aaaaa000aaaaa00aaaaaaa0aa000aa000000000
|
||||
// </SPRITES>
|
||||
|
||||
// <MAP>
|
||||
// 000:011111111111111111111111111111111111111111111111111111111121000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
// 001:021212121212121212121212121212121212121212121212121212121222000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue