Difference between revisions of "ToDoNewRoutes"

From TTWiki
Jump to navigationJump to search
Line 239: Line 239:
   
 
or not convert old games and tell the newroutes we work an old version and cross convert on the fly the systems.
 
or not convert old games and tell the newroutes we work an old version and cross convert on the fly the systems.
  +
  +
-=Additonal Stuff=-
  +
  +
We should add support for busstops and road stations aswell with direct support for newroutes.
   
 
-=Other=-
 
-=Other=-

Revision as of 17:48, 3 May 2006

ToDoNewRoutes -ToDo List for newroutes, newrails-enhancetunnels

ToDoNewRoutes

(WARNING: This is a dev scratchpad to collect ideas for a newroute grf system)

This page is for collecting ideas for newroads (Lakie) and enhancetunnels(eis_os)

to get a united system for allowing more flexible sprite content = newroutes

-=Action 0=-

All TTD routes get devided into logical groups:

For roads:

||ID|Description|Default Number Of Sprites Needed

00|roads|19 (4 halfs, 4 slope, 2 straight, 4 corners, 5 junctions)

01|road depot|6 (4 roofs, 2 little corner pieces)

02|road crossing ground|2

03|road pieces on bridges|6 (4 Ramp, 2 flat)

04|road tunnel rail ground|4

05|road tunnel|8||

Roadworks?

For rails:

||ID|Description|Default Number Of Sprites Needed

00|railroad|?

01|monorail|?

02|maglev|?

03|electric|? (layout shared with railroad!)

04|type 4|0/?

05|type 5|0/?

06|type 6|0/?

07|type 7|0/?

08|railroad depot|6

09|monorail depot|6

10|maglev depot|6

11|electric depot|0/6 (layout shared with railroad!)

12|type 4 depot|0

13|type 5 depot|0

14|type 6 depot|0

15|type 7 depot|0

16|railroad on crossing|0/2

17|monorail on crossing|0/2

18|maglev on crossing|0/2

19|electric on crossing|0/2 (layout shared with railroad!)

20|type 4 on crossing|0

21|type 5 on crossing|0

22|type 6 on crossing|0

23|type 7 on crossing|0

24|railroad tunnel|6

25|monorail tunnel|6

26|maglev tunnel|6

27|electric tunnel|0/6 (layout shared with railroad!)

28|type 4 tunnel|0

29|type 5 tunnel|0

30|type 6 tunnel|0

31|type 7 tunnel|0

24|railroad tunnel rail|0/2

25|monorail tunnel rail|0/2

26|maglev tunnel rail|0/2

27|electric tunnel rail|0/2

28|type 4 tunnel rail|0/2

29|type 5 tunnel rail|0/2

30|type 6 tunnel rail|0/2

31|type 7 tunnel rail|0/2

32|railroad tunnel rail top|0/2

33|monorail tunnel rail top|0/2

34|maglev tunnel rail top|0/2

35|electric tunnel rail top|0/2

36|type 4 tunnel rail top|0/2

37|type 5 tunnel rail top|0/2

38|type 6 tunnel rail top|0/2

39|type 7 tunnel rail top|0/2

40|railroad bridge rail top|0/6(4 Ramp, 2 flat)

41|monorail bridge rail top|0/6(4 Ramp, 2 flat)

42|maglev bridge rail top|0/6 (4 Ramp, 2 flat)

43|electric bridge rail top|0/6 (4 Ramp, 2 flat)

44|type 4 bridge rail top|0/6 (4 Ramp, 2 flat)

45|type 5 bridge rail top|0/6 (4 Ramp, 2 flat)

46|type 6 bridge rail top|0/6 (4 Ramp, 2 flat)

47|type 7 bridge rail top|0/6 (4 Ramp, 2 flat)||

Type 4 till type 7 are fair game for grf authors.

Action 0 for first 8 rail ids:

- names

- compatible mask for rails, aka rail type 3(electric) is compatible to 0 (via or mask)

- system flags, will draw catenary, makes electrif traction engines work, copy of action 0(train) traction type?

(Idea: The caternary could be added into the sprite table system, so even two caternary systems could be done, very hard)

Action 0 for railvehicles:

- a flag for supporting newroutes (prop 05, set bit 7 maybe)

- need a new way to have the real type specifc

(sample an narrow gauge isn't allowed to work on normal rail, but doesn't depend anymore on maglev)

- prop 05 for Track type is now allowed to have 0-7 as value.

(The run on wrong track system code  - electric on non electric rails - can get screwey)

Action 0 for bridges:

- deny new route system

Action 0 has to support for each of the above IDs, serveral standard/default layouts and custom layouts. The custom layouts can be used for more advanced stuff and are selectable via action 2 callback.

How drawing works:

TTDPatch will use a callback (if enabled for id) to get a spritelayout number.

If not, it will use the default number for the layout.

Get Ground Sprite, dword 0 for none

Draw normal sprites until we find 80h (as stations)

Each entry allows some special bit settings in the spritenumber.

(sprite number in recent action 0, TTD Sprite, Special Sprite from other ID !)

-=Action 2=-

Variational Action 2 Variables for New Routes

||Variable|Content

40|Height above ground

41|Terrain type: 0 normal, 1 desert, 2 rainforest, 4 on or above snowline

42|Height above snowline? (for roads and rails, the snow grade could be adjusted then)

43|Townzone: 0 none

44|Is under bridge

45|Build year (problem where to store that info, see L8)

46|last used counter (abadoneroads/something like abadonerails, L7 is free), for stations not possible

-|Only for roads:

47|ttd road type 0 - on bare land, 1 - on grass, 2 - paved, 3 - with streetlights, 5 - tree-lined, 6 - on grass with road works, 7 - paved with road works

48|oneway bits

49|town owned tile||

-=Landscape 8=-

For each tile it would be nice to store the buildyear, maybe year / 10 for support later years, post 2010...

The L8 Array could be a word or a byte value

-=Landscape usage=-

L8 = low byte: date of build/10

L7 (rail tile) = abadone counter

L7 (tunnels) = used by enhancetunnels already!

-=Compatibility=-

The new rail stuff is incompatible to the old, unimaglev could be used to have old games fit to the new system,

or not convert old games and tell the newroutes we work an old version and cross convert on the fly the systems.

-=Additonal Stuff=-

We should add support for busstops and road stations aswell with direct support for newroutes.

-=Other=-

Content by Lakie and eis_os