equal
deleted
inserted
replaced
254 MKCOLOR(0x1F271F27), |
254 MKCOLOR(0x1F271F27), |
255 MKCOLOR(0x27272727), |
255 MKCOLOR(0x27272727), |
256 MKCOLOR(0x27272727), |
256 MKCOLOR(0x27272727), |
257 }; |
257 }; |
258 |
258 |
259 typedef struct AndOr { |
259 struct AndOr { |
260 uint32 mor; |
260 uint32 mor; |
261 uint32 mand; |
261 uint32 mand; |
262 } AndOr; |
262 }; |
263 |
263 |
264 static inline uint32 ApplyMask(uint32 colour, const AndOr *mask) |
264 static inline uint32 ApplyMask(uint32 colour, const AndOr *mask) |
265 { |
265 { |
266 return (colour & mask->mand) | mask->mor; |
266 return (colour & mask->mand) | mask->mor; |
267 } |
267 } |
689 Vehicle *v; |
689 Vehicle *v; |
690 bool skip; |
690 bool skip; |
691 byte color; |
691 byte color; |
692 |
692 |
693 FOR_ALL_VEHICLES(v) { |
693 FOR_ALL_VEHICLES(v) { |
694 if (v->type != VEH_Special && |
694 if (v->type != VEH_SPECIAL && |
695 (v->vehstatus & (VS_HIDDEN | VS_UNCLICKABLE)) == 0) { |
695 (v->vehstatus & (VS_HIDDEN | VS_UNCLICKABLE)) == 0) { |
696 // Remap into flat coordinates. |
696 // Remap into flat coordinates. |
697 Point pt = RemapCoords( |
697 Point pt = RemapCoords( |
698 v->x_pos / TILE_SIZE - WP(w,smallmap_d).scroll_x / TILE_SIZE, // divide each one separately because (a-b)/c != a/c-b/c in integer world |
698 v->x_pos / TILE_SIZE - WP(w,smallmap_d).scroll_x / TILE_SIZE, // divide each one separately because (a-b)/c != a/c-b/c in integer world |
699 v->y_pos / TILE_SIZE - WP(w,smallmap_d).scroll_y / TILE_SIZE, // dtto |
699 v->y_pos / TILE_SIZE - WP(w,smallmap_d).scroll_y / TILE_SIZE, // dtto |
974 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_RESIZABLE, |
974 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON | WDF_RESIZABLE, |
975 _smallmap_widgets, |
975 _smallmap_widgets, |
976 SmallMapWindowProc |
976 SmallMapWindowProc |
977 }; |
977 }; |
978 |
978 |
979 void ShowSmallMap(void) |
979 void ShowSmallMap() |
980 { |
980 { |
981 Window *w; |
981 Window *w; |
982 |
982 |
983 w = AllocateWindowDescFront(&_smallmap_desc, 0); |
983 w = AllocateWindowDescFront(&_smallmap_desc, 0); |
984 if (w == NULL) return; |
984 if (w == NULL) return; |
1087 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE, |
1087 WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_STICKY_BUTTON | WDF_RESIZABLE, |
1088 _extra_view_port_widgets, |
1088 _extra_view_port_widgets, |
1089 ExtraViewPortWndProc |
1089 ExtraViewPortWndProc |
1090 }; |
1090 }; |
1091 |
1091 |
1092 void ShowExtraViewPortWindow(void) |
1092 void ShowExtraViewPortWindow() |
1093 { |
1093 { |
1094 Window *w, *v; |
1094 Window *w, *v; |
1095 int i = 0; |
1095 int i = 0; |
1096 |
1096 |
1097 // find next free window number for extra viewport |
1097 // find next free window number for extra viewport |