Import extra large maps patch.
http://www.tt-forums.net/viewtopic.php?f=33&t=33137
This commit is contained in:

committed by
Jonathan G Rennison

parent
2816a65365
commit
7d2b4bd3ea
@@ -47,7 +47,7 @@ NewGrfDebugSpritePicker _newgrf_debug_sprite_picker = { SPM_NONE, NULL, 0, Small
|
||||
*/
|
||||
static inline uint GetFeatureIndex(uint window_number)
|
||||
{
|
||||
return GB(window_number, 0, 24);
|
||||
return GB(window_number, 0, 27);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -59,8 +59,8 @@ static inline uint GetFeatureIndex(uint window_number)
|
||||
*/
|
||||
static inline uint GetInspectWindowNumber(GrfSpecFeature feature, uint index)
|
||||
{
|
||||
assert((index >> 24) == 0);
|
||||
return (feature << 24) | index;
|
||||
assert((index >> 27) == 0);
|
||||
return (feature << 27) | index;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -251,7 +251,7 @@ struct NIFeature {
|
||||
*/
|
||||
static inline GrfSpecFeature GetFeatureNum(uint window_number)
|
||||
{
|
||||
return (GrfSpecFeature)GB(window_number, 24, 8);
|
||||
return (GrfSpecFeature)GB(window_number, 27, 5);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -470,7 +470,7 @@ struct NewGRFInspectWindow : Window {
|
||||
case WID_NGRFI_PARENT: {
|
||||
const NIHelper *nih = GetFeatureHelper(this->window_number);
|
||||
uint index = nih->GetParent(GetFeatureIndex(this->window_number));
|
||||
::ShowNewGRFInspectWindow((GrfSpecFeature)GB(index, 24, 8), GetFeatureIndex(index), nih->GetGRFID(GetFeatureIndex(this->window_number)));
|
||||
::ShowNewGRFInspectWindow((GrfSpecFeature)GB(index, 27, 5), GetFeatureIndex(index), nih->GetGRFID(GetFeatureIndex(this->window_number)));
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user