(svn r6922) -Feature: Add proper cloning sprites and cursors, different for each vehicle. Big thanks
to MB for the initial design and skidd13 for the iconified version(s). -Codechange: Change the autorenew sprites from recycle to upgrade (skidd13) -Codechange: Change the shared orders icon (MeusH) -Add missing table/files.h file to VS project file.
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								data/openttd.grf
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								data/openttd.grf
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -692,8 +692,13 @@ static void DepotWndProc(Window *w, WindowEvent *e)
 | 
			
		||||
					ToggleWidgetLoweredState(w, DEPOT_WIDGET_CLONE);
 | 
			
		||||
 | 
			
		||||
					if (IsWindowWidgetLowered(w, DEPOT_WIDGET_CLONE)) {
 | 
			
		||||
						static const CursorID clone_icons[] = {
 | 
			
		||||
							SPR_CURSOR_CLONE_TRAIN, SPR_CURSOR_CLONE_ROADVEH,
 | 
			
		||||
							SPR_CURSOR_CLONE_SHIP, SPR_CURSOR_CLONE_AIRPLANE
 | 
			
		||||
						};
 | 
			
		||||
 | 
			
		||||
						_place_clicked_vehicle = NULL;
 | 
			
		||||
						SetObjectToPlaceWnd(SPR_CURSOR_CLONE, VHM_RECT, w);
 | 
			
		||||
						SetObjectToPlaceWnd(clone_icons[WP(w, depot_d).type - VEH_Train], VHM_RECT, w);
 | 
			
		||||
					} else {
 | 
			
		||||
						ResetObjectToPlace();
 | 
			
		||||
					}
 | 
			
		||||
 
 | 
			
		||||
@@ -281,7 +281,7 @@ static const SpriteID _openttd_grf_indexes[] = {
 | 
			
		||||
	616, 616, // nordic char: <20>
 | 
			
		||||
	666, 666, // nordic char: <20>
 | 
			
		||||
	634, 634, // nordic char: <20>
 | 
			
		||||
	SPR_PIN_UP, SPR_CURSOR_CLONE, // more icons
 | 
			
		||||
	SPR_PIN_UP, SPR_CURSOR_CLONE_TRAIN, // more icons
 | 
			
		||||
	382, 383, // <20> <20> tiny
 | 
			
		||||
	158, 159, // <20> <20> medium
 | 
			
		||||
	606, 607, // <20> <20> large
 | 
			
		||||
@@ -314,7 +314,7 @@ static const SpriteID _openttd_grf_indexes[] = {
 | 
			
		||||
	594, 597, // <20> <20> <20> <20> large
 | 
			
		||||
	633, 633, // <20> large
 | 
			
		||||
	665, 665, // <20> large
 | 
			
		||||
	SPR_SELL_TRAIN, SPR_SELL_CHAIN_TRAIN,
 | 
			
		||||
	SPR_SELL_TRAIN, SPR_SHARED_ORDERS_ICON,
 | 
			
		||||
	END
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -859,6 +859,9 @@
 | 
			
		||||
			<File
 | 
			
		||||
				RelativePath=".\table\engines.h">
 | 
			
		||||
			</File>
 | 
			
		||||
			<File
 | 
			
		||||
				RelativePath=".\table\files.h">
 | 
			
		||||
			</File>
 | 
			
		||||
			<File
 | 
			
		||||
				RelativePath=".\table\genland.h">
 | 
			
		||||
			</File>
 | 
			
		||||
 
 | 
			
		||||
@@ -1443,6 +1443,10 @@
 | 
			
		||||
				RelativePath=".\table\engines.h"
 | 
			
		||||
				>
 | 
			
		||||
			</File>
 | 
			
		||||
			<File
 | 
			
		||||
				RelativePath=".\table\files.h"
 | 
			
		||||
				>
 | 
			
		||||
			</File>
 | 
			
		||||
			<File
 | 
			
		||||
				RelativePath=".\table\genland.h"
 | 
			
		||||
				>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										13
									
								
								order_gui.c
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								order_gui.c
									
									
									
									
									
								
							@@ -63,15 +63,6 @@ static void DrawOrdersWindow(Window *w)
 | 
			
		||||
	v = GetVehicle(w->window_number);
 | 
			
		||||
	not_localplayer = v->owner != _local_player;
 | 
			
		||||
 | 
			
		||||
	if (v->type != VEH_Train) {
 | 
			
		||||
		switch (v->type) {
 | 
			
		||||
			case VEH_Road:     w->widget[11].data = STR_LORRY; break;
 | 
			
		||||
			case VEH_Ship:     w->widget[11].data = STR_SHIP;  break;
 | 
			
		||||
			case VEH_Aircraft: w->widget[11].data = STR_PLANE; break;
 | 
			
		||||
			default: NOT_REACHED(); break;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	shared_orders = IsOrderListShared(v);
 | 
			
		||||
 | 
			
		||||
	SetVScrollCount(w, v->num_orders + 1);
 | 
			
		||||
@@ -572,7 +563,7 @@ static const Widget _orders_train_widgets[] = {
 | 
			
		||||
{ WWT_PUSHTXTBTN,   RESIZE_TB,      14,   212,   264,    76,    87, STR_FULLLOAD_OR_SERVICE, STR_NULL},
 | 
			
		||||
{ WWT_PUSHTXTBTN,   RESIZE_TB,      14,   265,   319,    76,    87, STR_8828_UNLOAD,         STR_8858_MAKE_THE_HIGHLIGHTED_ORDER},
 | 
			
		||||
{ WWT_PUSHTXTBTN,   RESIZE_TB,      14,   320,   372,    76,    87, STR_886F_TRANSFER,       STR_886D_MAKE_THE_HIGHLIGHTED_ORDER},
 | 
			
		||||
{ WWT_PUSHTXTBTN,   RESIZE_TB,      14,   373,   386,    76,    87, STR_TRAIN,               STR_VEH_WITH_SHARED_ORDERS_LIST_TIP},
 | 
			
		||||
{ WWT_PUSHIMGBTN,   RESIZE_TB,      14,   373,   386,    76,    87, SPR_SHARED_ORDERS_ICON,  STR_VEH_WITH_SHARED_ORDERS_LIST_TIP},
 | 
			
		||||
{ WWT_PUSHTXTBTN,   RESIZE_TB,      14,   320,   372,    76,    87, STR_REFIT,               STR_REFIT_TIP},
 | 
			
		||||
{      WWT_PANEL,   RESIZE_RTB,     14,   387,   386,    76,    87, 0x0,                     STR_NULL},
 | 
			
		||||
{  WWT_RESIZEBOX,   RESIZE_LRTB,    14,   387,   398,    76,    87, 0x0,                     STR_RESIZE_BUTTON},
 | 
			
		||||
@@ -599,7 +590,7 @@ static const Widget _orders_widgets[] = {
 | 
			
		||||
{ WWT_PUSHTXTBTN,   RESIZE_TB,      14,   193,   256,    76,    87, STR_FULLLOAD_OR_SERVICE, STR_NULL},
 | 
			
		||||
{ WWT_PUSHTXTBTN,   RESIZE_TB,      14,   257,   319,    76,    87, STR_8828_UNLOAD,         STR_8858_MAKE_THE_HIGHLIGHTED_ORDER},
 | 
			
		||||
{ WWT_PUSHTXTBTN,   RESIZE_TB,      14,   320,   383,    76,    87, STR_886F_TRANSFER,       STR_886D_MAKE_THE_HIGHLIGHTED_ORDER},
 | 
			
		||||
{ WWT_PUSHTXTBTN,   RESIZE_TB,      14,   384,   397,    76,    87, STR_EMPTY,               STR_VEH_WITH_SHARED_ORDERS_LIST_TIP},
 | 
			
		||||
{ WWT_PUSHIMGBTN,   RESIZE_TB,      14,   384,   397,    76,    87, SPR_SHARED_ORDERS_ICON,  STR_VEH_WITH_SHARED_ORDERS_LIST_TIP},
 | 
			
		||||
{ WWT_PUSHTXTBTN,   RESIZE_TB,      14,   320,   383,    76,    87, STR_REFIT,               STR_REFIT_TIP},
 | 
			
		||||
{      WWT_PANEL,   RESIZE_RTB,     14,   397,   396,    76,    87, 0x0,                     STR_NULL},
 | 
			
		||||
{  WWT_RESIZEBOX,   RESIZE_LRTB,    14,   398,   409,    76,    87, 0x0,                     STR_RESIZE_BUTTON},
 | 
			
		||||
 
 | 
			
		||||
@@ -60,6 +60,6 @@ static MD5File files_openttd[] = {
 | 
			
		||||
	{ "autorail.grf",  { 0xed, 0x44, 0x7f, 0xbb, 0x19, 0x44, 0x48, 0x4c, 0x07, 0x8a, 0xb1, 0xc1, 0x5c, 0x12, 0x3a, 0x60 } },
 | 
			
		||||
	{ "canalsw.grf",   { 0x13, 0x9c, 0x98, 0xcf, 0xb8, 0x7c, 0xd7, 0x1f, 0xca, 0x34, 0xa5, 0x6b, 0x65, 0x31, 0xec, 0x0f } },
 | 
			
		||||
	{ "elrailsw.grf",  { 0x4f, 0xf9, 0xac, 0x79, 0x50, 0x28, 0x9b, 0xe2, 0x15, 0x30, 0xa8, 0x1e, 0xd5, 0xfd, 0xe1, 0xda } },
 | 
			
		||||
	{ "openttd.grf",   { 0x3c, 0x9f, 0x90, 0xb1, 0xf2, 0x45, 0xc3, 0xb4, 0xb5, 0xbb, 0xed, 0x30, 0xec, 0x07, 0x95, 0x9e } },
 | 
			
		||||
	{ "openttd.grf",   { 0xd9, 0x68, 0xb3, 0x59, 0xd9, 0xfe, 0x39, 0xdc, 0x23, 0xe9, 0xe9, 0x3e, 0xf1, 0x65, 0x55, 0x09 } },
 | 
			
		||||
	{ "trkfoundw.grf", { 0x12, 0x33, 0x3f, 0xa3, 0xd1, 0x86, 0x8b, 0x04, 0x53, 0x18, 0x9c, 0xee, 0xf9, 0x2d, 0xf5, 0x95 } },
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
@@ -48,7 +48,7 @@ enum Sprites {
 | 
			
		||||
	SPR_ASCII_SPACE_BIG   = 450,
 | 
			
		||||
 | 
			
		||||
	/* Extra graphic spritenumbers */
 | 
			
		||||
	OPENTTD_SPRITES_COUNT = 109, // number of gfx-sprites in openttd.grf
 | 
			
		||||
	OPENTTD_SPRITES_COUNT = 116, // number of gfx-sprites in openttd.grf
 | 
			
		||||
	SPR_CANALS_BASE   = 5382,
 | 
			
		||||
	SPR_SLOPES_BASE   = SPR_CANALS_BASE + 70,
 | 
			
		||||
	SPR_AUTORAIL_BASE = SPR_SLOPES_BASE + 78,
 | 
			
		||||
@@ -71,10 +71,10 @@ enum Sprites {
 | 
			
		||||
	SPR_ARROW_RIGHT   = SPR_OPENTTD_BASE + 91,
 | 
			
		||||
 | 
			
		||||
	/* Clone vehicles stuff */
 | 
			
		||||
	SPR_CLONE_AIRCRAFT = SPR_OPENTTD_BASE + 92,
 | 
			
		||||
	SPR_CLONE_ROADVEH  = SPR_OPENTTD_BASE + 92,
 | 
			
		||||
	SPR_CLONE_SHIP     = SPR_OPENTTD_BASE + 92,
 | 
			
		||||
	SPR_CLONE_TRAIN    = SPR_OPENTTD_BASE + 92,
 | 
			
		||||
	SPR_CLONE_ROADVEH  = SPR_OPENTTD_BASE + 109,
 | 
			
		||||
	SPR_CLONE_SHIP     = SPR_OPENTTD_BASE + 111,
 | 
			
		||||
	SPR_CLONE_AIRCRAFT = SPR_OPENTTD_BASE + 113,
 | 
			
		||||
 | 
			
		||||
	SPR_SELL_TRAIN        = SPR_OPENTTD_BASE + 96,
 | 
			
		||||
	SPR_SELL_ROADVEH      = SPR_OPENTTD_BASE + 97,
 | 
			
		||||
@@ -90,6 +90,8 @@ enum Sprites {
 | 
			
		||||
	SPR_REPLACE_AIRCRAFT  = SPR_OPENTTD_BASE + 107,
 | 
			
		||||
	SPR_SELL_CHAIN_TRAIN  = SPR_OPENTTD_BASE + 108,
 | 
			
		||||
 | 
			
		||||
	SPR_SHARED_ORDERS_ICON = SPR_OPENTTD_BASE + 115,
 | 
			
		||||
 | 
			
		||||
	/* Network GUI sprites */
 | 
			
		||||
	SPR_SQUARE = SPR_OPENTTD_BASE + 20,     // colored square (used for newgrf compatibility)
 | 
			
		||||
	SPR_LOCK = SPR_OPENTTD_BASE + 19,       // lock icon (for password protected servers)
 | 
			
		||||
@@ -1186,7 +1188,10 @@ typedef enum CursorSprites {
 | 
			
		||||
	SPR_CURSOR_TRUCK_STATION  = 2726,
 | 
			
		||||
	SPR_CURSOR_ROAD_TUNNEL    = 2433,
 | 
			
		||||
 | 
			
		||||
	SPR_CURSOR_CLONE = SPR_OPENTTD_BASE + 93,
 | 
			
		||||
	SPR_CURSOR_CLONE_TRAIN    = SPR_OPENTTD_BASE +  93,
 | 
			
		||||
	SPR_CURSOR_CLONE_ROADVEH  = SPR_OPENTTD_BASE + 110,
 | 
			
		||||
	SPR_CURSOR_CLONE_SHIP     = SPR_OPENTTD_BASE + 112,
 | 
			
		||||
	SPR_CURSOR_CLONE_AIRPLANE = SPR_OPENTTD_BASE + 114,
 | 
			
		||||
} CursorSprite;
 | 
			
		||||
 | 
			
		||||
/// Animation macro in table/animcursors.h (_animcursors[])
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user