train_gui.c
changeset 1019 6bae6c11e865
parent 1017 b09bae77a850
child 1067 3ba7987a004e
equal deleted inserted replaced
1018:3212d4365653 1019:6bae6c11e865
   356 
   356 
   357 			DrawTrainImage(v, x+21, y, w->hscroll.cap, w->hscroll.pos, WP(w,traindepot_d).sel);
   357 			DrawTrainImage(v, x+21, y, w->hscroll.cap, w->hscroll.pos, WP(w,traindepot_d).sel);
   358 			/* Draw the train number */
   358 			/* Draw the train number */
   359 			SetDParam(0, v->unitnumber);
   359 			SetDParam(0, v->unitnumber);
   360 			DrawString(x, y, (v->max_age - 366 < v->age) ? STR_00E3 : STR_00E2, 0);
   360 			DrawString(x, y, (v->max_age - 366 < v->age) ? STR_00E3 : STR_00E2, 0);
   361 			
   361 
   362 			/*Draw the train counter */
   362 			/*Draw the train counter */
   363 			i = 0;
   363 			i = 0;
   364 			u = v;
   364 			u = v;
   365 			do i++; while ( (u=u->next) != NULL);		//Determine length of train
   365 			do i++; while ( (u=u->next) != NULL);		//Determine length of train
   366 			SetDParam(0, i);				//Set the counter
   366 			SetDParam(0, i);				//Set the counter
   367 			i = (w->hscroll.cap * 29) + (x + 26);		//Calculate position of text according to window size
   367 			i = (w->hscroll.cap * 29) + (x + 26);		//Calculate position of text according to window size
   368 			DrawStringCentered(i, y+5, STR_TINY_BLACK, 0);	//Draw the counter
   368 			DrawStringCentered(i, y+5, STR_TINY_BLACK, 0);	//Draw the counter
   369 			
   369 
   370 			/* Draw the pretty flag */
   370 			/* Draw the pretty flag */
   371 			DrawSprite(v->vehstatus&VS_STOPPED ? 0xC12 : 0xC13, x+15, y);
   371 			DrawSprite(v->vehstatus&VS_STOPPED ? 0xC12 : 0xC13, x+15, y);
   372 
   372 
   373 			y += 14;
   373 			y += 14;
   374 		}
   374 		}
   382 				v->u.rail.track == 0x80 &&
   382 				v->u.rail.track == 0x80 &&
   383 				--num < 0 && num >= -w->vscroll.cap) {
   383 				--num < 0 && num >= -w->vscroll.cap) {
   384 
   384 
   385 			DrawTrainImage(v, x+50, y, w->hscroll.cap - 1, 0, WP(w,traindepot_d).sel);
   385 			DrawTrainImage(v, x+50, y, w->hscroll.cap - 1, 0, WP(w,traindepot_d).sel);
   386 			DrawString(x, y+2, STR_8816, 0);
   386 			DrawString(x, y+2, STR_8816, 0);
   387 			
   387 
   388 			/*Draw the train counter */
   388 			/*Draw the train counter */
   389 			i = 0;
   389 			i = 0;
   390 			u = v;
   390 			u = v;
   391 			do i++; while ( (u=u->next) != NULL);		//Determine length of train
   391 			do i++; while ( (u=u->next) != NULL);		//Determine length of train
   392 			SetDParam(0, i);				//Set the counter
   392 			SetDParam(0, i);				//Set the counter