summaryrefslogtreecommitdiff
path: root/src/main/game/game.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/game/game.c')
-rw-r--r--src/main/game/game.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/game/game.c b/src/main/game/game.c
index 0aa4888..2bd0bb5 100644
--- a/src/main/game/game.c
+++ b/src/main/game/game.c
@@ -17,12 +17,19 @@
* along with Tris Game. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <stdio.h>
#include <stdlib.h>
#include "../engine/engine.h"
#include "game.h"
#include "../util.h"
#include "../engine/ui/ui.h"
+static void
+game_mouse_button_pressed(int x, int y)
+{
+ printf("mouse pressed %d %d\n", x, y);
+}
+
TrisGame *
game_init(int width, int height)
{
@@ -33,6 +40,7 @@ game_init(int width, int height)
}
engine_init(width, height);
ui_set_title("Tris Game");
+ engine_set_mouse_button_listener(game_mouse_button_pressed);
game_draw_field(0.5, 0, 0);