Mercurial > mm7
changeset 2365:65789351a537
OutdoorLocation::_47F04C and OutdoorLocation::_47F097 to OutdoorLocation::IsMapCellFullyRevealed and OutdoorLocation::IsMapCellPartiallyRevealed
author | Grumpy7 |
---|---|
date | Sun, 11 May 2014 22:55:26 +0200 |
parents | 94e5a9740727 |
children | a2f1c2fd23f3 |
files | Outdoor.cpp Outdoor.h UI/Books/UIMapBook.cpp |
diffstat | 3 files changed, 11 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/Outdoor.cpp Sun May 11 22:49:19 2014 +0200 +++ b/Outdoor.cpp Sun May 11 22:55:26 2014 +0200 @@ -2399,27 +2399,21 @@ //----- (0047F04C) -------------------------------------------------------- -bool OutdoorLocation::_47F04C(signed int x_pos, signed int y_pos) +bool OutdoorLocation::IsMapCellFullyRevealed(signed int x_pos, signed int y_pos) { - bool result; // eax@5 - if ( x_pos < 0 || x_pos >= 88 || y_pos < 0 || y_pos >= 88 ) - result = 0; + return false; else - result = (uFullyRevealedCellOnMap[y_pos][x_pos/8] & (unsigned __int8)(1 << (7 - (x_pos) % 8))) != 0; - return result; + return (uFullyRevealedCellOnMap[y_pos][x_pos/8] & (1 << (7 - (x_pos) % 8))) != 0; } //----- (0047F097) -------------------------------------------------------- -bool OutdoorLocation::_47F097(signed int x_pos, signed int y_pos) +bool OutdoorLocation::IsMapCellPartiallyRevealed(signed int x_pos, signed int y_pos) { - bool result; // eax@5 - if ( x_pos < 0 || x_pos >= 88 || y_pos < 0 || y_pos >= 88 ) - result = 0; + return false; else - result = (uPartiallyRevealedCellOnMap[y_pos][x_pos/8] & (unsigned __int8)(1 << (7 - (x_pos) % 8))) != 0; - return result; + return (uPartiallyRevealedCellOnMap[y_pos][x_pos/8] & (1 << (7 - (x_pos) % 8))) != 0; } //----- (0047F0E2) --------------------------------------------------------
--- a/Outdoor.h Sun May 11 22:49:19 2014 +0200 +++ b/Outdoor.h Sun May 11 22:55:26 2014 +0200 @@ -146,8 +146,8 @@ int DoGetHeightOnTerrain(signed int sX, signed int sZ); int GetSoundIdByPosition(signed int X_pos, signed int Y_pos, int a4); int UpdateDiscoveredArea(int a2, int a3, int a4); - bool _47F04C(signed int a2, signed int a3); - bool _47F097(signed int a2, signed int a3); + bool IsMapCellFullyRevealed(signed int a2, signed int a3); + bool IsMapCellPartiallyRevealed(signed int a2, signed int a3); bool _47F0E2(); bool PrepareDecorations(); void ArrangeSpriteObjects();
--- a/UI/Books/UIMapBook.cpp Sun May 11 22:49:19 2014 +0200 +++ b/UI/Books/UIMapBook.cpp Sun May 11 22:55:26 2014 +0200 @@ -571,9 +571,9 @@ for (int x = 0; x < screenCenterY; ++x) { map_tile_X = (v64 - 80) / 4; - if ( !pOutdoor->_47F04C(map_tile_X, map_tile_Y) ) + if ( !pOutdoor->IsMapCellFullyRevealed(map_tile_X, map_tile_Y) ) { - if ( pOutdoor->_47F097(map_tile_X, map_tile_Y) ) + if ( pOutdoor->IsMapCellPartiallyRevealed(map_tile_X, map_tile_Y) ) { if ( !((x + screenCenter_X) % 2) ) //*a4a = Color16(12, 12, 12); @@ -678,7 +678,7 @@ result = 0; map_tile_X = abs(global_coord_X + 22528) / 512;//In the mapbook only lady Margaret dispays for defoult zoom(В книге карты только Леди Маргарита всплывает при дефолтном зуме) map_tile_Y = abs(global_coord_Y - 22528) / 512; - if ( pOutdoor->_47F04C(map_tile_X, map_tile_Y) && uCurrentlyLoadedLevelType == LEVEL_Outdoor && (signed int)pOutdoor->uNumBModels > 0 ) + if ( pOutdoor->IsMapCellFullyRevealed(map_tile_X, map_tile_Y) && uCurrentlyLoadedLevelType == LEVEL_Outdoor && (signed int)pOutdoor->uNumBModels > 0 ) { for(int i = 0; i < pOutdoor->uNumBModels && !result; i++) {