Fixes some buggs

- Fixes mapbuilder pit loading nullpointer
- Fixes black main menu bg after return to main menu
- Fixes skill sparkling on new game start
This commit is contained in:
Linus Probert 2018-06-14 00:12:49 +02:00
parent 6a9a3bdbcf
commit dff55a1978
3 changed files with 6 additions and 0 deletions

View File

@ -188,6 +188,7 @@ local function add_pits_to_room(map)
end
end
matrix = matrix[random(#matrix)]
for i=2,13 do
for j=2,10 do
if not tile_occupied(map, (i), (j)) and matrix[i][j] then

View File

@ -250,6 +250,7 @@ goToMainMenu(void *unused)
inGameMenu = NULL;
initMainMenu();
Position p = { 0, 0 };
gPlayer->sprite->pos = (Position) { 32, 32 };
map_set_current_room(gMap, &p);
camera_follow_position(gCamera, &p);
}

View File

@ -222,6 +222,10 @@ render_skill_sparkles(SkillBar *bar, Player *player)
return;
}
if (player->stats.lvl == 1) {
return;
}
Position pos = { 0, GAME_VIEW_HEIGHT };
Dimension dim = { 32, 32 };
for (int i = 0; i < PLAYER_SKILL_COUNT; ++i) {