diff --git a/Game/data/sprites/blockattack.sprite b/Game/data/sprites/blockattack.sprite index db83ba8..0e43732 100644 --- a/Game/data/sprites/blockattack.sprite +++ b/Game/data/sprites/blockattack.sprite @@ -166,6 +166,16 @@ "frame_time" : 400, "originx" : 4, //This tells the game that the top left corner is placed a little different "originy" : 4 +}, + +"touchcursor" : { + "texture" : "touchcursor", + "topx" : 0, + "topy" : 0, + "height" : 52, + "width" : 52, + "originx" : 1, + "originy" : 1 } } diff --git a/Game/data/textures/touchcursor.png b/Game/data/textures/touchcursor.png new file mode 100644 index 0000000..734cb37 Binary files /dev/null and b/Game/data/textures/touchcursor.png differ diff --git a/source/code/BlockGame.cpp b/source/code/BlockGame.cpp index 85e7cd0..71aadd2 100644 --- a/source/code/BlockGame.cpp +++ b/source/code/BlockGame.cpp @@ -1161,8 +1161,11 @@ void BlockGame::MoveCursor(char way) { //switches the two blocks at the cursor position, unless game over void BlockGame::SwitchAtCursor() { - Update(); //Ensure that everything is in a stable state. - if ((board[cursorx][cursory+1]<7) && (board[cursorx+1][cursory+1]<7) && (!bGameOver) && ((!puzzleMode)||(MovesLeft>0)) && (gameStartedAt0)) && (gameStartedAtGetMouseCursor(touched, mx, my); + if (touched) { + DrawImgBoard(spriteHolder->GetSprite("touchcursor"),mx*bsize, 11*bsize-my*bsize-pixels); + } + else { + DrawImgBoard(cursor,cursorx*bsize-4,11*bsize-cursory*bsize-pixels-4); + } } if (ticks