-
-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
34 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/*************************************************************************** | ||
* fheroes2: https://github.com/ihhub/fheroes2 * | ||
* Copyright (C) 2019 - 2024 * | ||
* Copyright (C) 2019 - 2025 * | ||
* * | ||
* Free Heroes2 Engine: http://sourceforge.net/projects/fheroes2 * | ||
* Copyright (C) 2011 by Andrey Afletdinov <[email protected]> * | ||
|
@@ -1481,7 +1481,7 @@ void Dialog::selectMineType( int32_t & type, int32_t & color ) | |
uint32_t selectedResourceType = 0; | ||
|
||
const std::vector<Maps::ObjectInfo> & allObjectInfo = Maps::getObjectsByGroup( Maps::ObjectGroup::ADVENTURE_MINES ); | ||
if ( type > 0 ) { | ||
if ( type >= 0 ) { | ||
assert( static_cast<size_t>( type ) < allObjectInfo.size() ); | ||
|
||
if ( allObjectInfo[type].objectType == MP2::OBJ_ABANDONED_MINE ) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/*************************************************************************** | ||
* fheroes2: https://github.com/ihhub/fheroes2 * | ||
* Copyright (C) 2019 - 2024 * | ||
* Copyright (C) 2019 - 2025 * | ||
* * | ||
* Free Heroes2 Engine: http://sourceforge.net/projects/fheroes2 * | ||
* Copyright (C) 2009 by Andrey Afletdinov <[email protected]> * | ||
|
@@ -473,8 +473,6 @@ void Interface::GameArea::Redraw( fheroes2::Image & dst, int flag, bool isPuzzle | |
|
||
TileUnfitRenderObjectInfo tileUnfit; | ||
|
||
const Heroes * currentHero = drawHeroes ? GetFocusHeroes() : nullptr; | ||
|
||
// TODO: Dragon City with Object ICN Type OBJ_ICN_TYPE_OBJNMUL2 and object index 46 is a bottom layer sprite. | ||
// TODO: When a hero standing besides this turns a part of the hero is visible. This can be fixed only by some hack. | ||
|
||
|
@@ -695,6 +693,8 @@ void Interface::GameArea::Redraw( fheroes2::Image & dst, int flag, bool isPuzzle | |
// Draw hero's route. It should be drawn on top of everything. | ||
const bool drawRoutes = ( flag & LEVEL_ROUTES ) != 0; | ||
|
||
const Heroes * currentHero = drawHeroes ? GetFocusHeroes() : nullptr; | ||
|
||
if ( drawRoutes && ( currentHero != nullptr ) && currentHero->GetPath().isShow() ) { | ||
const Route::Path & path = currentHero->GetPath(); | ||
int32_t greenColorSteps = path.GetAllowedSteps(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters