Loading

Paste #pfzxi8oiw

  1. input nml:
  2.  
  3. spriteset(stationset1, "src/gfx/cc_grid.png") { tmpl_groundsprites(1, 1) }
  4.  
  5. spritegroup spritegroup1 {
  6.   little: [ stationset1 ];
  7. }
  8.  
  9. spriteset(stationset2, "src/gfx/cc_build.png") { tmpl_buildingsprites(1, 1) }
  10.  
  11. spritegroup spritegroup2 {
  12.   little: [ stationset2 ];
  13. }
  14.  
  15. spritelayout stationlayout2 {
  16.  ground {
  17.   sprite: spritegroup1(0, WITHOUT_ORIENTATION) // use sprite 0 for both orientations
  18.  }
  19.  building {
  20.   sprite: spritegroup2(0, WITH_ORIENTATION)    // use sprite 0 for X and 0+1 for Y
  21.  }
  22. }
  23.  
  24. switch (FEAT_STATION, SELF, switch3, [ ... ] {
  25.   ...
  26.   stationlayout2;
  27. }
  28.  
  29. item(FEAT_STATION, station4) {
  30.   property {
  31.     ... nothing about layouts here ...
  32.   }
  33.   graphics {
  34.     switch3;
  35.   }
  36. }
  37.  
  38.  
  39. output grf:
  40.  
  41. action0:
  42.   layout0: stationlayout2 using var10=0 for ground, var10=1 for building1
  43.   layout1: stationlayout2 using var10=0 for ground, var10=1 for building1 and an additional 1 offset in the building for the Y orientation
  44.  
  45. action3
  46. ->  varactions according to switch3
  47.     -> varaction(var0C)
  48.          14: return layout0
  49.          default:
  50.            -> varaction(var10)
  51.               0: return stationgroup1
  52.               1: return stationgroup2

Version history

Revision # Author Created at
pzjtzla8o Anonymous 07 Jan 2015, 22:05:01 UTC Diff

Comments