Loading

Paste #p4vxlnqap

  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)
  18.  }
  19.  building {
  20.   sprite: spritegroup2(0)
  21.   orientation_offset: 0 // Default: 1
  22.  }
  23. }
  24.  
  25. switch (FEAT_STATION, SELF, switch3, [ ... ] {
  26.   ...
  27.   stationlayout2;
  28. }
  29.  
  30. item(FEAT_STATION, station4) {
  31.   property {
  32.     ... nothing about layouts here ...
  33.   }
  34.   graphics {
  35.     switch3;
  36.   }
  37. }
  38.  
  39.  
  40. output grf:
  41.  
  42. action0:
  43.   layout0: stationlayout2 using var10=0 for ground, var10=1 for building1
  44.   layout1: stationlayout2 using var10=0 for ground, var10=1 for building1 and an additional 1 offset in the building for the Y orientation
  45.  
  46. action3
  47. ->  varactions according to switch3
  48.     -> varaction(var0C)
  49.          14: return layout0
  50.          default:
  51.            -> varaction(var10)
  52.               0: return stationgroup1
  53.               1: return stationgroup2

Version history

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

Comments