From a5328d0be6d342568e7084b1bb059d3e0b455632 Mon Sep 17 00:00:00 2001 From: SlyVTT Date: Wed, 16 Aug 2023 19:36:31 +0200 Subject: [PATCH] Added support for Player actions and interaction with the items within the map --- assets/level0.tmx | 2 +- src/player.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/assets/level0.tmx b/assets/level0.tmx index 9e150be..d01c166 100644 --- a/assets/level0.tmx +++ b/assets/level0.tmx @@ -12,7 +12,7 @@ 301,2,2,2,2,2,385,2,2,2,2,2,2,2,2,2,301,2,386,2,2,2,2,2,2,2,2,2,2,2,2,297,298,299,300,49,9,10,134,135,52,393,394,395,396,337,338,2, 325,149,150,151,152,2,2,327,374,375,327,2,2,185,374,375,325,387,2,297,298,299,300,2,2,2,2,2,2,2,2,2,2,2,2,73,33,34,74,219,76,2,2,2,2,361,362,2, 257,2,2,385,2,2,385,2,265,266,2,2,208,209,352,353,257,2,2,2,2,2,2,297,298,299,300,2,2,2,2,25,26,27,27,97,98,99,98,99,100,26,26,27,28,131,2,2, -281,176,2,2,2,2,2,385,289,290,2,2,232,233,376,377,281,2,326,2,154,153,190,2,2,2,2,2,2,2,2,49,2,2,2,121,59,60,60,61,124,2,2,2,52,132,2,2, +281,176,2,2,2,2,176,385,289,290,2,2,232,233,376,377,281,2,326,2,154,153,190,2,2,2,2,2,2,2,2,49,2,2,2,121,59,60,60,61,124,2,2,2,52,132,2,2, 2,2,2,2,2,385,2,2,265,266,2,385,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,297,298,299,300,73,2,2,2,145,83,84,84,85,148,2,2,2,76,132,2,2, 2,2,2,2,326,2,385,2,265,266,2,2,2,2,2,2,2,2,2,2,2,2,190,2,2,2,2,2,2,385,2,49,404,405,2,169,107,108,108,109,172,2,402,403,76,132,2,2, 2,2,2,2,2,2,2,2,289,290,2,258,259,260,238,239,260,260,261,262,262,263,264,2,2,2,2,2,2,2,385,49,134,135,2,2,2,2,2,2,2,2,134,135,52,132,297,298, diff --git a/src/player.c b/src/player.c index 777a6b4..db0c28d 100644 --- a/src/player.c +++ b/src/player.c @@ -97,13 +97,15 @@ void player_action(Game *game) { else if (strcmp("NPC", game->map_level->extradata[game->player.whichAction].type)==0) face = &NPC_Icon_img; else if (strcmp("SGN", game->map_level->extradata[game->player.whichAction].type)==0) - face = &NPC_Icon_img; + face = &SGN_Icon_img; else face = &demo_player_img; showtext_dialog( game, face, text, true, true ); + + game->player.isDoingAction = false; } }