Skip to content

Commit

Permalink
BR60 + Mk5a coaches - Made the set push pull because it's cool
Browse files Browse the repository at this point in the history
  • Loading branch information
audigex committed Mar 23, 2024
1 parent b1d3571 commit b766e05
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 9 deletions.
Binary file modified .nmlcache/gfx/br_68_5a.png.cache
Binary file not shown.
2 changes: 1 addition & 1 deletion .nmlcache/gfx/br_68_5a.png.cacheindex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [25, 2, 8, 23], "offset": 0, "pixel_stats": {"alpha": 0, "anim": 0, "total": 184, "white": 0}, "size": 101}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [35, 2, 21, 18], "offset": 101, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 237}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [58, 2, 32, 12], "offset": 338, "pixel_stats": {"alpha": 0, "anim": 0, "total": 384, "white": 0}, "size": 223}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [92, 2, 21, 18], "offset": 561, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 246}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [115, 2, 8, 23], "offset": 807, "pixel_stats": {"alpha": 0, "anim": 0, "total": 184, "white": 0}, "size": 101}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [125, 2, 21, 18], "offset": 908, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 237}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [148, 2, 32, 12], "offset": 1145, "pixel_stats": {"alpha": 0, "anim": 0, "total": 384, "white": 0}, "size": 223}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [182, 2, 21, 18], "offset": 1368, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 246}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [25, 60, 8, 23], "offset": 1614, "pixel_stats": {"alpha": 0, "anim": 0, "total": 184, "white": 0}, "size": 118}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [35, 60, 21, 18], "offset": 1732, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 238}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [58, 60, 32, 12], "offset": 1970, "pixel_stats": {"alpha": 0, "anim": 0, "total": 384, "white": 0}, "size": 248}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [92, 60, 21, 18], "offset": 2218, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 207}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [115, 60, 8, 23], "offset": 2425, "pixel_stats": {"alpha": 0, "anim": 0, "total": 184, "white": 0}, "size": 129}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [125, 60, 21, 18], "offset": 2554, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 195}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [148, 60, 32, 12], "offset": 2749, "pixel_stats": {"alpha": 0, "anim": 0, "total": 384, "white": 0}, "size": 249}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [182, 60, 21, 18], "offset": 2998, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 228}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [25, 31, 8, 23], "offset": 3226, "pixel_stats": {"alpha": 0, "anim": 0, "total": 184, "white": 0}, "size": 96}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [35, 31, 21, 18], "offset": 3322, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 202}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [58, 31, 32, 12], "offset": 3524, "pixel_stats": {"alpha": 0, "anim": 0, "total": 384, "white": 0}, "size": 209}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [92, 31, 21, 18], "offset": 3733, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 203}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [115, 31, 8, 23], "offset": 3936, "pixel_stats": {"alpha": 0, "anim": 0, "total": 184, "white": 0}, "size": 92}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [125, 31, 21, 18], "offset": 4028, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 207}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [148, 31, 32, 12], "offset": 4235, "pixel_stats": {"alpha": 0, "anim": 0, "total": 384, "white": 0}, "size": 209}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [182, 31, 21, 18], "offset": 4444, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 205}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [2, 89, 91, 12], "offset": 4649, "pixel_stats": {"alpha": 0, "anim": 0, "total": 1092, "white": 0}, "size": 553}]
[{"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [25, 60, 8, 23], "offset": 0, "pixel_stats": {"alpha": 0, "anim": 0, "total": 184, "white": 0}, "size": 118}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [35, 60, 21, 18], "offset": 118, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 238}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [58, 60, 32, 12], "offset": 356, "pixel_stats": {"alpha": 0, "anim": 0, "total": 384, "white": 0}, "size": 248}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [92, 60, 21, 18], "offset": 604, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 207}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [115, 60, 8, 23], "offset": 811, "pixel_stats": {"alpha": 0, "anim": 0, "total": 184, "white": 0}, "size": 129}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [125, 60, 21, 18], "offset": 940, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 195}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [148, 60, 32, 12], "offset": 1135, "pixel_stats": {"alpha": 0, "anim": 0, "total": 384, "white": 0}, "size": 249}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [182, 60, 21, 18], "offset": 1384, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 228}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [25, 2, 8, 23], "offset": 1612, "pixel_stats": {"alpha": 0, "anim": 0, "total": 184, "white": 0}, "size": 101}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [35, 2, 21, 18], "offset": 1713, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 237}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [58, 2, 32, 12], "offset": 1950, "pixel_stats": {"alpha": 0, "anim": 0, "total": 384, "white": 0}, "size": 223}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [92, 2, 21, 18], "offset": 2173, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 246}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [115, 2, 8, 23], "offset": 2419, "pixel_stats": {"alpha": 0, "anim": 0, "total": 184, "white": 0}, "size": 101}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [125, 2, 21, 18], "offset": 2520, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 237}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [148, 2, 32, 12], "offset": 2757, "pixel_stats": {"alpha": 0, "anim": 0, "total": 384, "white": 0}, "size": 223}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [182, 2, 21, 18], "offset": 2980, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 246}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [25, 31, 8, 23], "offset": 3226, "pixel_stats": {"alpha": 0, "anim": 0, "total": 184, "white": 0}, "size": 96}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [35, 31, 21, 18], "offset": 3322, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 202}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [58, 31, 32, 12], "offset": 3524, "pixel_stats": {"alpha": 0, "anim": 0, "total": 384, "white": 0}, "size": 209}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [92, 31, 21, 18], "offset": 3733, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 203}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [115, 31, 8, 23], "offset": 3936, "pixel_stats": {"alpha": 0, "anim": 0, "total": 184, "white": 0}, "size": 92}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [125, 31, 21, 18], "offset": 4028, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 207}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [148, 31, 32, 12], "offset": 4235, "pixel_stats": {"alpha": 0, "anim": 0, "total": 384, "white": 0}, "size": 209}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [182, 31, 21, 18], "offset": 4444, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 205}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [2, 89, 91, 12], "offset": 4649, "pixel_stats": {"alpha": 0, "anim": 0, "total": 1092, "white": 0}, "size": 553}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [115, 108, 8, 23], "offset": 5202, "pixel_stats": {"alpha": 0, "anim": 0, "total": 184, "white": 0}, "size": 129}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [125, 108, 21, 18], "offset": 5331, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 195}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [148, 108, 32, 12], "offset": 5526, "pixel_stats": {"alpha": 0, "anim": 0, "total": 384, "white": 0}, "size": 249}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [182, 108, 21, 18], "offset": 5775, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 228}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [25, 108, 8, 23], "offset": 6003, "pixel_stats": {"alpha": 0, "anim": 0, "total": 184, "white": 0}, "size": 118}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [35, 108, 21, 18], "offset": 6121, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 238}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [58, 108, 32, 12], "offset": 6359, "pixel_stats": {"alpha": 0, "anim": 0, "total": 384, "white": 0}, "size": 248}, {"info": 4, "mask_file": "gfx/br_68_5a.png", "mask_pal": "DEFAULT", "mask_rect": [92, 108, 21, 18], "offset": 6607, "pixel_stats": {"alpha": 0, "anim": 0, "total": 378, "white": 0}, "size": 207}]
Binary file modified gfx/br_68_5a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lang/english.lng
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ STR_NAME_EyeCandy :Invisible Locomotive (Eyecandy)
STR_DESC_EyeCandy :An invisible locomotive intended for use for eyecandy (eg putting freight wagons in a siding)
STR_EyeCandy_NoAttachedUnit :Cannot start Eye Candy locomotive without an attached unit

STR_BR_68_5A :British Rail Class 68 (Mark 5A) (4-Car)
STR_BR_68_5A :British Rail Class 68 (Mark 5A) (5-Car + locomotive)

STR_BR_195_2CAR :British Rail Class 195/0 'Civity' (2-Car)
STR_BR_195_3CAR :British Rail Class 195/1 'Civity' (3-Car)
Expand Down
14 changes: 14 additions & 0 deletions src/templates.pnml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// Train sprite template

// Wtf are these offsets?
template tmpl_train_8(x, y) {
//leftx, topy, width, height, offsetx, offsety
[x + 25, y + 2, 8, 23, -3, -11] //n
Expand All @@ -10,6 +12,18 @@ template tmpl_train_8(x, y) {
[x + 148, y + 2, 32, 12, -16, -7] //w
[x + 182, y + 2, 21, 18, -12, -12] //nw
}
// Reverse of the above
template tmpl_train_8_reversed(x, y) {
//leftx, topy, width, height, offsetx, offsety
[x + 115, y + 2, 8, 23, -3, -11] //n
[x + 125, y + 2, 21, 18, -11, -11] //ne
[x + 148, y + 2, 32, 12, -16, -7] //e
[x + 182, y + 2, 21, 18, -12, -12] // se
[x + 25, y + 2, 8, 23, -3, -11] // s
[x + 35, y + 2, 21, 18, -11, -11] // sw
[x + 58, y + 2, 32, 12, -16, -7] //w
[x + 92, y + 2, 21, 18, -12, -12] // nw
}

template template_train20px(x,y){ // Clone to 4view when changed
//left_x, upper_y, width, height, offset_x, offset_y
Expand Down
28 changes: 21 additions & 7 deletions src/trains/diesel/BR068_Mk5a.pnml
Original file line number Diff line number Diff line change
@@ -1,19 +1,33 @@
// Spriteset car definitions
spriteset (spriteset_br_68_5a_front, "gfx/br_68_5a.png") { tmpl_train_8(0, 0) }
spriteset (spriteset_br_68_5a_middle, "gfx/br_68_5a.png") { tmpl_train_8(0, 29) }
spriteset (spriteset_br_68_5a_middle_reversed, "gfx/br_68_5a.png") { tmpl_train_8_reversed(0, 29) }
spriteset (spriteset_br_68_5a_rear, "gfx/br_68_5a.png") { tmpl_train_8(0, 58) }
spriteset (spriteset_br_68_5a_rear_reversed, "gfx/br_68_5a.png") { tmpl_train_8_reversed(0, 106) }
spriteset (spriteset_br_68_5a_purchase, "gfx/br_68_5a.png") {
[2, 89, 91, 12, -25, -6]
}

// Choose sprites depending on car position
switch(FEAT_TRAINS, SELF, switch_br_68_5a_spriteset, position_in_articulated_veh % 6) {
// 0 is first car, 1 is second car, so on...
// % 2 means that the graphics will repeat properly if another train is added to the end
// so that we get: (front,end);(front,end)...
switch(FEAT_TRAINS, PARENT, sw_br_68_5a_rear, vehicle_is_reversed) {
0: spriteset_br_68_5a_rear;
1: spriteset_br_68_5a_front;
}

switch(FEAT_TRAINS, PARENT, sw_br_68_5a_front, vehicle_is_reversed) {
0: spriteset_br_68_5a_front;
5: spriteset_br_68_5a_rear;
spriteset_br_68_5a_middle;
1: spriteset_br_68_5a_rear_reversed;
}

switch(FEAT_TRAINS, PARENT, sw_br_68_5a_middle, vehicle_is_reversed) {
0: spriteset_br_68_5a_middle;
1: spriteset_br_68_5a_middle_reversed;
}

// Choose sprites depending on car position
switch(FEAT_TRAINS, SELF, switch_br_68_5a_spriteset, position_in_articulated_veh % 6) {
0: sw_br_68_5a_front;
5: sw_br_68_5a_rear;
sw_br_68_5a_middle;
}

// Define articulations
Expand Down

0 comments on commit b766e05

Please sign in to comment.