====== Information ====== Don't link to this file directly, instead please use: http://www.bytetransfer.de/projects/ttdpatch/todo/ ========================= ====== Very Urgent ====== - change the current path variable so it isn't limited to 64 bytes, looks like it even uses sometimes more then the 64 bytes so certain game variables like current expenses type may be overwritten. - new rail station stuff enable road routeing. (4bits) add slave busstop bit when road routeing is enabled. (instead of checking the XY, check if it's the right station type and number which is how [Josef] changed trains to work with irrstations) - fix autoslope, create maybe a temporary landscape snapshot and work on it. - enhancetunnels for road tunnels, needs to change PBS to use differnet bits - write newroutes maybe newroutes sprite layout: recolorflags(1): 0=none, 1=company color, 2=2cc company color, 3=transparent, C=callback company color, FF=recolor map sprite follows sourceid(1): 0=ttd 1=action1 2=apply grf parameter value spriteid(5-6): [] boundingbox(6): offset(2): opcodes: 00 // draw ground sprite 01 // drawsprite 02 // drawrelsprite 0C 80 quit allow influence of buildonslopes? - write new additonal map array system: For each XY maintain extra data in two lists: Tags, Bytedata which have a unknown number of slots. (unknown means, in Windows the whole data is dynamic alloced and can be resized) The data gets accessed by ptrlist[xy] -> at the pointed to location we find tags. A tag consists of the height, a reversed byte, a word information what feature it is. Reversed is a used for indicateing the end of the list and can be used for settings prioritys, like for pathfinding. A feature is a word value, a high number less important then low number Say we want to store pbs informations we would give it a quite low value as it needs to be sorted into it quite at the top. Bytedata: For the bytedata we need to transform the place of the tag to the bytedata location. Accessing: To access landscape data you would give it the feature in the high 16 bits of edx, in dl, the height to store it. and edx, 0xFFFF or edx, LANDSCAPE_PBS<<16 push DONTADDLANDSCAPE call getlandscapedata // sets carry flag if data is set. Carry flag should be set for features that need to know if there is really data, say the pathfinder trys to find out if there is some routeing informations. This should not create the actually data! or features should silently create zero data or even maybe with an init handler. Adding / Removeing: When new data is added to the list, we move all data under it one slot advance. Then we add the tagsize to all ptrlist which are higher in the XY list. Removing works simple the opposite. We never get a fragmented Landscape data... - write newpathfinder needs for every class a new routemap function, needs to additional pass the height, how should routes handle height differences, say slope with signals? _ add system for more ship slots, have to remap vehicle, nfo info ids... atleast ships don't so much stats... - fix buildonslopes steep slopes - rewrite buildonslopes to allow steep slope and other possible slope combinations that are unsafe and avoid jumping of trains/vehicles at the edges of a tile if z difference is higher then 4 high levels. Seperate buildonslopes for diagonal rail pieces. So one piece can be build on the slope, the other below. Needs a bunch of additonal sprites. ====== Urgent ====== - fix gui code to allow more then 255 list entries - fix consit numbering when vehicle array gets redesigned, displaying already does byte to word mov, shouldn't be a problem - when gui and consit number are fixed extend the vehicleconsit switch to cover road vehicles - additonal spritestream support for effects, if they would get a z value then tunnel entrance highlight could work maybe we could pass somehow the spritestreams a action2 parameter, so a spritestream could have normal / snow sprites, could drastical reduce the sprite usage. (And would allow ageing on vehicles with not more sprites) - find a way to store station tile flags like not-passable in the landscape - load new graphics for ttd like stations to allow slopes and curves in stations, maybe add callback to station grf actions for possible different layout? - PBS should alloc paths past signals when the next signal block has the station of the order, should fix two trains entering same station ====== Not so Urgent ====== - allow station buildings on slopes, graphic selection maybe via action2, see industry tiles for code reuse... (wouldn't need any extra bits, so it should be quite safe to do) - autoslope: make it somehow possible to rise land under bridges and bridgeheads - when rail station tile flags can be saved, hack routeing to allow road vehicle useing them, store height difference for roads so station tunnels, with roads on top are possible - add dynamic landscape bits (for real tunnels and bridges) needs newpathfinder would make the rail/road tunnel on station idea obsolute - should bus-stop post sign to use different sprite, as it used for landscape processing and may be overwritten. - make an option to show transparent, or recolor one-way marker always - add dyanmic transparent option so no need for toggle key t anymore - allow bridges in newroutes to say what parts shouldn't be drawn in transparent mode - Internet Multiplayer (needs enhancemultiplayer by Csaba) A server component: It maintains timestamps and the DoAction Data, will send the data to all clients directly... (well not to the one it recieved the data) For each client it recieves Random Numbers with timestamp so it can see dsyncs. TTDPatch: Disable all directx network stuff in TTD, and create an interface to a ttdpatch network client dll (when stable can be moved into ttdpatch.dll like newsounds) The connection init routines will call the dll instead doing the internal network connection dialogs. All DoActions get transmitted from the client to the ttdpatch network client dll, and throws the Action away. (or it's a quit message) The random generator values are send to the client dll for testing of dsync. When TTD would normally get the recieve buffer, it ask the dll. Cht: has to be converted to DoActions Player DoActions need to be splitted into pre functions (send to network) and callbacks. ClientNetworkDll: Gets Actions from TTDPatch and adds timestamps on them in the near future. Creates a dummy package for TTDPatch as heartbeat (The sync package TTD normally wants), if something stalls, the heartbeat can be used to throttle TTDPatch. Gets Data via TCP/IP from the server and buffers it. When TTDPatch asks for new data, it looks at the timestamp and delivers the data if the time is reached, it sends the random values to the server so the server can check it. - Rail/Road crossing: crossing diagonal roads, need 4 extra bits for routeing information..., check if L2 could be used. Would a junction be possible? 6 Bits would be needed.. ====== Could be done ====== - find a way to have a -1 zoom level, should be easier when z sorting - Remap the vehicle ids to allow 255 vehicle id's per vehicle class - Add a real dynamic malloc system under windows, maybe make it possible to reload grfs? - add md5sum routines to keep a blacklist of broken grfs - use the c palette conversation routines of grfcodec to convert dos to windows grfs or other way. needs a way to flag graphics to be in dos / windows format, this would mean we only need to distribute one grf. the grfs are loaded in memory anyway. Changeing compressed sprites should work aswell, as the compression doesn't need to be changed. ====== Zero important ====== - fix the gigant screenshot function - Sandbox mode - rethink about long file support in windows