(svn r10005) -Codechange: Merge two flags (2cc and newhouses) indicating some newgrf features have been loaded, and introduce the newindustry one.

This commit is contained in:
belugas
2007-05-31 19:13:41 +00:00
parent 4a62006c39
commit 4c243d099c
5 changed files with 28 additions and 24 deletions

View File

@@ -324,7 +324,7 @@ static void SelectPlayerLiveryWndProc(Window *w, WindowEvent *e)
switch (e->event) {
case WE_CREATE:
LowerWindowWidget(w, WP(w, livery_d).livery_class + 2);
if (!_have_2cc) {
if (!HASBIT(_loaded_newgrf_features, GRFLOADED_2CC)) {
HideWindowWidget(w, 11);
HideWindowWidget(w, 12);
}
@@ -366,7 +366,7 @@ static void SelectPlayerLiveryWndProc(Window *w, WindowEvent *e)
DrawSprite(SPR_SQUARE, GENERAL_SPRITE_COLOR(p->livery[scheme].colour1), 152, y);
DrawString(165, y, STR_00D1_DARK_BLUE + p->livery[scheme].colour1, sel ? 0xC : 2);
if (_have_2cc) {
if (HASBIT(_loaded_newgrf_features, GRFLOADED_2CC)) {
DrawSprite(SPR_SQUARE, GENERAL_SPRITE_COLOR(p->livery[scheme].colour2), 277, y);
DrawString(290, y, STR_00D1_DARK_BLUE + p->livery[scheme].colour2, sel ? 0xC : 2);
}
@@ -794,7 +794,7 @@ static void PlayerCompanyWndProc(Window *w, WindowEvent *e)
}
case PCW_WIDGET_COLOR_SCHEME: {
Window *wf = AllocateWindowDescFront(_have_2cc ? &_select_player_livery_2cc_desc : &_select_player_livery_desc, w->window_number);
Window *wf = AllocateWindowDescFront(HASBIT(_loaded_newgrf_features, GRFLOADED_2CC) ? &_select_player_livery_2cc_desc : &_select_player_livery_desc, w->window_number);
if (wf != NULL) {
wf->caption_color = wf->window_number;
WP(wf, livery_d).livery_class = LC_OTHER;