Adds window icon

- Fixes bug where you could move when falling.
This commit is contained in:
Linus Probert 2018-08-15 08:08:18 +02:00
parent 6af8d9dd8f
commit 9a610d5f88
4 changed files with 6 additions and 2 deletions

BIN
assets/Extras/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

View File

@ -51,6 +51,7 @@
#include "input.h"
#include "screen.h"
#include "hiscore.h"
#include "io_util.h"
typedef enum Turn_t {
PLAYER,
@ -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)

View File

@ -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) {

View File

@ -434,7 +434,7 @@ skill_create(enum SkillType t)
return NULL;
}
#ifdef DEBUG
#ifdef DEBUG_SKILLS
skill->levelcap = 1;
#endif
return skill;