projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed tile selection cursor position for levels smaller than the playfield
[rocksndiamonds.git]
/
src
/
libgame
/
system.c
diff --git
a/src/libgame/system.c
b/src/libgame/system.c
index a35f91d6827b3ffd7d6a772614519c31c350c8d4..139ee57a562d6c2a046d7397c9df6e4d6c445e0e 100644
(file)
--- a/
src/libgame/system.c
+++ b/
src/libgame/system.c
@@
-318,6
+318,9
@@
void InitTileCursorInfo()
tile_cursor.y = 0;
tile_cursor.target_x = 0;
tile_cursor.target_y = 0;
tile_cursor.y = 0;
tile_cursor.target_x = 0;
tile_cursor.target_y = 0;
+
+ tile_cursor.sx = 0;
+ tile_cursor.sy = 0;
}
void InitOverlayInfo()
}
void InitOverlayInfo()
@@
-348,8
+351,8
@@
void SetTileCursorTargetXY(int x, int y)
tile_cursor.xpos = x;
tile_cursor.ypos = y;
tile_cursor.xpos = x;
tile_cursor.ypos = y;
- tile_cursor.target_x =
gfx
.sx + x * gfx.game_tile_size;
- tile_cursor.target_y =
gfx
.sy + y * gfx.game_tile_size;
+ tile_cursor.target_x =
tile_cursor
.sx + x * gfx.game_tile_size;
+ tile_cursor.target_y =
tile_cursor
.sy + y * gfx.game_tile_size;
tile_cursor.moving = TRUE;
}
tile_cursor.moving = TRUE;
}
@@
-366,6
+369,12
@@
void SetTileCursorXY(int x, int y)
tile_cursor.moving = FALSE;
}
tile_cursor.moving = FALSE;
}
+void SetTileCursorSXSY(int sx, int sy)
+{
+ tile_cursor.sx = sx;
+ tile_cursor.sy = sy;
+}
+
void SetOverlayEnabled(boolean enabled)
{
overlay.enabled = enabled;
void SetOverlayEnabled(boolean enabled)
{
overlay.enabled = enabled;