Skip to content

Commit

Permalink
Adds window icon
Browse files Browse the repository at this point in the history
- Fixes bug where you could move when falling.
  • Loading branch information
LiquidityC committed Aug 15, 2018
1 parent 6af8d9d commit 9a610d5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
Binary file added assets/Extras/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include "input.h"
#include "screen.h"
#include "hiscore.h"
#include "io_util.h"

typedef enum Turn_t {
PLAYER,
Expand Down Expand Up @@ -143,6 +144,9 @@ bool initSDL(void)
return false;
}

// Set the window icon
SDL_SetWindowIcon(gWindow, IMG_Load_RW(io_load_rwops("Extras/icon.png"), true));

gRenderer = SDL_CreateRenderer(gWindow, -1,
SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
if (gRenderer == NULL)
Expand Down
2 changes: 1 addition & 1 deletion src/player.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ void player_update(UpdateData *data)
return;

check_skill_activation(data);
if (!check_skill_trigger(data))
if (player->state != FALLING && !check_skill_trigger(data))
handle_next_move(data);

if (player->state == FALLING && player->stats.hp > 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/skill.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ skill_create(enum SkillType t)
return NULL;
}

#ifdef DEBUG
#ifdef DEBUG_SKILLS
skill->levelcap = 1;
#endif
return skill;
Expand Down

0 comments on commit 9a610d5

Please sign in to comment.