From 3a2c5e10da4f416478b30bf8729a5a3e8b1e817b Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 24 May 2024 20:50:05 +0100 Subject: [PATCH] Switched to BRTrains standard templates --- src/templates.pnml | 237 ++++++++++++++++++--------------------------- 1 file changed, 94 insertions(+), 143 deletions(-) diff --git a/src/templates.pnml b/src/templates.pnml index 1500354..55f8ebc 100644 --- a/src/templates.pnml +++ b/src/templates.pnml @@ -1,149 +1,100 @@ -template tmpl_purchase(x, y) { - //xpos, ypos, width, height, xoffset, yoffset, Flags - [x, y, 68, 12, -25, -6, NOWHITE] -} - -template tmpl_purchase_dual_head(x, y, w) { - //xpos, ypos, width, height, xoffset, yoffset, Flags - [x, y, 1, 1, 0, 0, NOWHITE] - [x, y, 1, 1, 0, 0, NOWHITE] - [x+w, y, 68-w, 12, -11, -6, NOWHITE] - [x, y, 1, 1, 0, 0, NOWHITE] - [x, y, 1, 1, 0, 0, NOWHITE] - [x, y, 1, 1, 0, 0, NOWHITE] - [x, y, w, 12, -11, -6, NOWHITE] - [x, y, 1, 1, 0, 0, NOWHITE] -} - - -// Used for Gordon and Henry -template tmpl_loco_29(x,y) { - //leftx, topy, width, height, offsetx, offsety - [x, y, 8, 22, -3, -14] // N - [x+9, y, 18, 15, -8, -8] // NE - [x+28, y, 29, 12, -2, -8] // E - [x+58, y, 18, 15, 5, -3] // SE - [x+77, y, 8, 22, -3, -3] // S - [x+86, y, 18, 15, -23, -1] // SW - [x+105, y, 29, 12, -28, -8] // W - [x+135, y, 18, 14, -11, -9] // NW -} - -template tmpl_James(x,y) { - //leftx, topy, width, height, offsetx, offsety - [x, y, 8, 18, -3, -14] // N - [x+9, y, 14, 13, -7, -8] // NE - [x+24, y, 21, 11, -3, -7] // E - [x+46, y, 15, 13, 4, -3] // SE - [x+62, y, 8, 16, -3, -2] // S - [x+71, y, 15, 13, -20, -1] // SW - [x+87, y, 21, 11, -19, -7] // W - [x+109, y, 14, 13, -8, -9] // NW -} - -template tmpl_Edward(x,y) { - //leftx, topy, width, height, offsetx, offsety - [x, y, 8, 19, -3, -11] // N - [x+9, y, 16, 14, -8, -8] // NE - [x+26, y, 25, 11, -6, -7] // E - [x+52, y, 16, 14, 2, -4] // SE - [x+69, y, 8, 18, -3, -7] // S - [x+78, y, 16, 14, -19, -3] // SW - [x+95, y, 25, 11, -20, -7] // W - [x+121, y, 16, 14, -7, -7] // NW -} - -// Tenders for Gordon, Henry, James, Edward -template tmpl_tender_16(x, y) { - //leftx, topy, width, height, offsetx, offsety - [x, y, 8, 14, -3, -10] // N - [x+9, y, 12, 10, -6, -5] // NE - [x+22, y, 16, 10, 2, -6] // E - [x+39, y, 12, 10, 5, -1] // SE - [x+52, y, 8, 14, -3, -1] // S - [x+61, y, 12, 10, -18, 0] // SW - [x+74, y, 16, 10, -19, -6] // W - [x+91, y, 12, 10, -6, -6] // NW -} - -template tmpl_thomas(x, y) { - //leftx, topy, width, height, offsetx, offsety - [x, y, 8, 17, -3, -10] // N - [x+9, y, 14, 13, -9, -6] // NE - [x+24, y, 21, 12, -6, -8] // E - [x+46, y, 15, 13, 2, -4] // SE - [x+62, y, 8, 16, -3, -6] // S - [x+71, y, 14, 13, -17, -3] // SW - [x+86, y, 21, 11, -16, -7] // W - [x+108, y, 14, 13, -5, -7] // NW -} - -template tmpl_percy(x, y) { - //leftx, topy, width, height, offsetx, offsety - [x, y, 8, 15, -3, -7] // N - [x+9, y, 13, 12, -9, -5] // NE - [x+23, y, 17, 12, -6, -8] // E - [x+41, y, 12, 12, 2, -4] // SE - [x+54, y, 8, 14, -3, -5] // S - [x+63, y, 12, 12, -15, -2] // SW - [x+76, y, 17, 12, -12, -8] // W - [x+94, y, 13, 12, -6, -7] // NW -} - -template tmpl_toby(x, y) { - //leftx, topy, width, height, offsetx, offsety - [x, y, 8, 14, -3, -10] // N - [x+9, y, 14, 12, -7, -7] // NE - [x+24, y, 17, 11, -6, -6] // E - [x+42, y, 14, 12, 3, -4] // SE - [x+57, y, 8, 14, -3, 0] // S - [x+66, y, 14, 12, -18, -2] // SW - [x+81, y, 17, 11, -12, -6] // W - [x+99, y, 14, 12, -6, -6] // NW -} - -template tmpl_coach_21(x, y) { - //leftx, topy, width, height, offsetx, offsety - [x, y, 8, 16, -3, -8] // N - [x+9, y, 14, 12, -7, -7] // NE - [x+24, y, 21, 10, -6, -5] // E - [x+46, y, 14, 12, 3, -3] // SE - [x+61, y, 8, 16, -3, 0] // S - [x+70, y, 14, 12, -17, -2] // SW - [x+85, y, 21, 10, -16, -4] // W - [x+107, y, 14, 12, -6, -6] // NW -} - -template tmpl_brake_van(x, y) { - //leftx, topy, width, height, offsetx, offsety - [x, y, 8, 12, -3, -8] // N - [x+9, y, 10, 10, -4, -5] // NE - [x+20, y, 13, 10, 2, -5] // E - [x+34, y, 10, 10, 5, -2] // SE - [x+45, y, 8, 12, -3, 0] // S - [x+54, y, 10, 10, -16, 0] // SW - [x+65, y, 13, 10, -16, -5] // W - [x+79, y, 10, 10, -5, -6] // NW -} - -template tmpl_coach_33(x, y) { - //leftx, topy, width, height, offsetx, offsety - [x, y, 8, 24, -3, -8] // N - [x+9, y, 20, 16, -16, -6] // NE - [x+30, y, 33, 11, -18, -6] // E - [x+64, y, 20, 16, -5, -8] // SE - [x+85, y, 8, 24, -3, -13] // S - [x+94, y, 20, 16, -16, -6] // SW - [x+115, y, 33, 11, -16, -6] // W - [x+149, y, 20, 16, -4, -7] // NW +template template_train4px(x,y){ + //left_x, upper_y, width, height, offset_x, offset_y + [ x, y, 8, 11, -3, -12] //n + [ x+9, y, 8, 12, 1, -12] //ne + [ x+18, y, 5, 13, 8, -9] //e + [ x+24, y, 8, 12, 9, -4] //se + [ x+33, y, 8, 11, -3, -5] //s + [ x+42, y, 8, 12, -13, -5] //sw + [ x+51, y, 5, 13, -15, -9] //w + [ x+57, y, 8, 12, -5, -11] //nw +} + +template template_train8px(x,y){ + //left_x, upper_y, width, height, offset_x, offset_y + [ x, y, 8, 13, -3, -12] //n + [ x+9, y, 10, 13, -1, -12] //ne + [ x+20, y, 9, 13, 4, -9] //e + [ x+30, y, 10, 13, 7, -5] //se + [ x+41, y, 8, 13, -3, -7] //s + [ x+50, y, 10, 13, -13, -6] //sw + [ x+61, y, 9, 13, -15, -9] //w + [ x+71, y, 10, 13, -5, -11] //nw +} + +template template_train12px(x,y){ + //left_x, upper_y, width, height, offset_x, offset_y + [ x, y, 8, 15, -3, -12] //n + [ x+9, y, 12, 14, -3, -12] //ne + [ x+22, y, 13, 13, 0, -9] //e + [ x+36, y, 12, 14, 5, -6] //se + [ x+49, y, 8, 15, -3, -9] //s + [ x+58, y, 12, 14, -13, -7] //sw + [ x+71, y, 13, 13, -15, -9] //w + [ x+85, y, 12, 14, -5, -11] //nw +} + +template template_train16px(x,y){ + //left_x, upper_y, width, height, offset_x, offset_y + [ x, y, 8, 17, -3, -13] //n + [ x+9, y, 14, 15, -5, -12] //ne + [ x+24, y, 17, 13, -4, -9] //e + [ x+42, y, 14, 15, 3, -7] //se + [ x+57, y, 8, 17, -3, -10] //s + [ x+66, y, 14, 15, -13, -8] //sw + [ x+81, y, 17, 13, -15, -9] //w + [ x+99, y, 14, 15, -5, -11] //nw +} + +template template_train20px(x,y){ // Clone to 4view when changed + //left_x, upper_y, width, height, offset_x, offset_y + [ x, y, 8, 19, -3, -13] // n + [ x+9, y, 16, 16, -7, -12] //ne + [ x+26, y, 21, 13, -8, -9] //e + [ x+48, y, 16, 16, 1, -8] //se + [ x+65, y, 8, 19, -3, -13] //s + [ x+74, y, 16, 16, -13, -9] //sw + [ x+91, y, 21, 13, -15, -9] //w + [ x+113, y, 16, 16, -5, -11] //nw +} + +template template_train24px(x,y){ + //left_x, upper_y, width, height, offset_x, offset_y + [ x, y, 8, 21, -3, -12] //n + [ x+9, y, 18, 17, -9, -12] //ne + [ x+28, y, 25, 13, -12, -9] //e + [ x+54, y, 18, 17, -1, -9] //se + [ x+73, y, 8, 21, -3, -15] //s + [ x+82, y, 18, 17, -13, -10] //sw + [ x+101, y, 25, 13, -15, -9] //w + [ x+127, y, 18, 17, -5, -11] //nw +} + +template template_train28px(x,y){ + //left_x, upper_y, width, height, offset_x, offset_y + [ x, y, 8, 23, -3, -12] //n + [ x+9, y, 20, 18, -11, -12] //ne + [ x+30, y, 29, 13, -16, -9] //e + [ x+60, y, 20, 18, -3, -10] //se + [ x+81, y, 8, 23, -3, -17] //s + [ x+90, y, 20, 18, -13, -11] //sw + [ x+111, y, 29, 13, -15, -9] //w + [ x+141, y, 20, 18, -5, -11] //nw +} + +template template_train32px(x,y){ + //left_x, upper_y, width, height, offset_x, offset_y + [ x, y, 8, 25, -3, -12, NOANIM] //n + [ x+9, y, 22, 19, -13, -12, NOANIM] //ne + [ x+32, y, 33, 13, -20, -9, NOANIM] //e + [ x+66, y, 22, 19, -5, -11, NOANIM] //se + [ x+89, y, 8, 25, -3, -19, NOANIM] //s + [ x+98, y, 22, 19, -13, -12, NOANIM] //sw + [ x+121, y, 33, 13, -15, -9, NOANIM] //w + [ x+155, y, 22, 19, -5, -11, NOANIM] //nw } - - - - - switch (FEAT_TRAINS, SELF, diesel_create_visual_effect, [STORE_TEMP(create_effect(EFFECT_SPRITE_DIESEL, 0, 0, 10), 0x100)]) { return 1; }