Japanese Simutrans Forum
日本語simutransフォーラム => バグレポート => 解決されたバグ => トピック開設者: z9999+ さんの発言 2011/07/30 15:13
-
ミニマップで都市の旅客の行き先が正しく描画されない。
正しく表示されるのは、表示位置の左端が(0,0)で、ズームを使用せず、45°回転を使用しないときのみ。
それ以外の場合、リアルタイムに旅客の行き先が描画されない。
[Since r2418] Passenger destination of town is not drawn correctly.
- It doesn't work with cur_pos != koord(0,0).
- It doesn't work with zoom-in/zoom-out.
- It doesn't work with isometric (rotate45).
Note:
The last one (isometric) may be intended. But if so, no need to calculate, because it doesn't draw correctly anyway.
for( uint16 i = 0; i < pax_dests->get_data_count(); i++ ) {
pax_dests->get_nonzero( i, pos, color );
min = koord((pos.x*welt->get_groesse_x())/PAX_DESTINATIONS_SIZE,
(pos.y*welt->get_groesse_y())/PAX_DESTINATIONS_SIZE);
max = koord(((pos.x+1)*welt->get_groesse_x())/PAX_DESTINATIONS_SIZE,
((pos.y+1)*welt->get_groesse_y())/PAX_DESTINATIONS_SIZE);
if( max.x >= cur_off.x && max.y>=cur_off.y && min.x<cur_size.x && min.y<cur_size.y ) {
for( pos.x = min.x; pos.x < max.x; pos.x++ ) {
for( pos.y = min.y; pos.y < max.y; pos.y++ ) {
set_relief_farbe(pos, color);
}
}
}
}
-
I do not understand, what is not drawn correctly. I cannot see anything false with the map ???
Do you have screenshots?
-
here.
-
I cannot reproduce it. How did you achieve that?
-
修正パッチ
Index: gui/karte.cc
===================================================================
--- gui/karte.cc (リビジョン 4753)
+++ gui/karte.cc (作業コピー)
@@ -836,11 +836,9 @@
(pos.y*welt->get_groesse_y())/PAX_DESTINATIONS_SIZE);
max = koord(((pos.x+1)*welt->get_groesse_x())/PAX_DESTINATIONS_SIZE,
((pos.y+1)*welt->get_groesse_y())/PAX_DESTINATIONS_SIZE);
- if( max.x >= cur_off.x && max.y>=cur_off.y && min.x<cur_size.x && min.y<cur_size.y ) {
- for( pos.x = min.x; pos.x < max.x; pos.x++ ) {
- for( pos.y = min.y; pos.y < max.y; pos.y++ ) {
- set_relief_farbe(pos, color);
- }
+ for( pos.x = min.x; pos.x < max.x; pos.x++ ) {
+ for( pos.y = min.y; pos.y < max.y; pos.y++ ) {
+ set_relief_farbe(pos, color);
}
}
}