summaryrefslogtreecommitdiff
path: root/viewport.c
AgeCommit message (Collapse)Author
2005-07-19(svn r2635) Fix: [ntp/misc] Improve the old pathfinder. Changed it to A* ↵ludde
instead of Dijkstra. - Benchmark shows that NTP is now around 10x faster than NPF. - Made IsTunnelTile macro to determine if a tile is a tunnel. - Added some useful debugging functions for making tiles red / getting accurate timestamps. - Remove old depot finding algorithm. - Disable warning for signed/unsigned comparisons.
2005-07-17(svn r2626) static, const, misc.tron
2005-07-17(svn r2619) Fix: [viewport] Fix potential buffer overflow reported by Tronludde
2005-07-16(svn r2595) -Codechange: Introduced "IsSteepTileh" to find whether a tile is ↵celestar
steep (i.e. spans two height levels) and use it throughout the code. -Codechange: Add CanBuildDepotByTileh to find if a tile is suitable to build a depot on it. Wraps some bitmagic which seems quite unreadable at first glance
2005-07-15(svn r2580) Change: Added {INDUSTRY} command for printing industry names ↵ludde
instead of the old {TOWN} {STRING} way. - The formatting of the industry name can be controlled with the string STR_INDUSTRY_FORMAT. Change: Changed several occurences of {STRING1} into {TOWN} to get rid of townnametype being used directly.
2005-07-08(svn r2535) Tabstron
2005-07-08(svn r2532) - Fix: Don't waste space using an int where a byte would ↵hackykid
suffice. (ludde)
2005-07-05(svn r2521) -Codechange: Removed trailing "\n"s from DEBUG statementscelestar
2005-06-29(svn r2496) -Fix: [1179933] When toggling build/remove via keyboard the ↵tron
selection wasn't correctly redrawn
2005-06-25(svn r2486) Turn TILE_FROM_XY into an inline function and rename it to ↵tron
TileVirtXY
2005-06-24(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"tron
2005-06-21(svn r2470) - Fix: Display station signs correctly in smallest zoom level ↵hackykid
in transparent buildings or tranparant station signs mode. (Peter1138)
2005-06-20(svn r2465) Remove some unreachable codetron
2005-06-15(svn r2444) - CodeChange: Add an enum for demagicifying the values of the ↵hackykid
'flags' parameter of DrawFrameRect(). (_Abraxa_)
2005-06-15(svn r2440) - Fix: [newgrf] Fix the spritesorter to handle overlapping ↵hackykid
sprites properly, this fixes display problems with really short wagons. (algorithm by patchman, ported by therax) - Fix: [newgrf] Too short wagons could break the 'follow next vehicle' code used in the traincontroller. Clamp better to prevent this.
2005-06-14(svn r2438) - Feature: New display option, 'transparent station signs', ↵hackykid
makes station signs transparent instead of using a solid bar to draw text on (peter1138)
2005-06-06(svn r2420) - Codechange: magic number elminitation of cursorsprites.Darkvater
2005-06-02(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.Darkvater
2005-05-28(svn r2370) Replace some magic numbers with symbolic namestron
2005-05-27(svn r2369) Remove _thd_ptr: It always holds the address of _thdtron
2005-03-24(svn r2046) -Codechange: moved all waypoint code to waypoint.c/waypoint.htruelight
-Codechange: rewrote some functions while moving waypoint-stuff -Add: added support for 64k waypoints -Fix: made the waypoint struct a bit more logic (no bit-fucking)
2005-02-21(svn r1894) - Codechange: cleaned up the console a bit, wholly unified ↵Darkvater
handling of text with that of editboxes - Codechange: Introduction of Textbuf struct which not only holds physical data as length but also pixel-constrains (width) and information about the caret - Codechange: Move Clipboard function to OS specific file. Currently only Windows has clipboard actions - Feature: Editboxes, console and exit screen also accept the numeric-enter as a yes - Feature: Navigation through text with cursor keys is possible, as well as arbitrary insertion (also paste) and deletion; both backspace and del keys. Functions DeleteTextBufferChar, InsertTextBufferChar and InsertTextBufferClipboard handle input and deletion. Navigation is done through MoveTextBufferPos. - Fix: OTTD crash when opening 'add server' editbox - CodeChange: fix up some stringwidth calculations in gfx.c. You can get the width in pixels of a character by calling GetCharacterWidth().
2005-02-13(svn r1867) Include tables/sprites.h only in files which need ittron
2005-02-10(svn r1853) Move spritecache function declarations into a header of their ↵tron
own and use SpriteID as parameter type where appropriate
2005-02-06(svn r1813) Declare functions implemented in strings.c in their own shiny ↵tron
new header (though i think some of these function don't belong into strings.c)
2005-02-05(svn r1803) Move debugging stuff into files of it's owntron
2005-01-25(svn r1674) - Fix: Signs are now displayed in the correct color at all zoom ↵dominik
levels
2005-01-25(svn r1667) - Feature: Signs are now shown in the color of the player who ↵dominik
created them (Note: The player information is currently not stored in savegames. Upon loading a game the signs will all be gray again)
2005-01-23(svn r1610) Remove trailing whitespace (last time ever, i hope)tron
2005-01-22(svn r1596) Add some more staticstron
2005-01-22(svn r1594) Convert all undefined parameter lists to (void) and add the ↵tron
appropriate warning flags in the Makefile
2005-01-22(svn r1584) Fix: Highlighlighting tiles under bridges works again correctly ↵dominik
for square selection tools.
2005-01-19(svn r1571) Feature: Visually enhanced autorail placingdominik
When using the autorail tool, the rail pieces which are going to be build are highlighted. If a piece is shown in red, this indicates that the slope/rail combination is impossible. It does not tell you if the rail line construction might not be possible because of other obstacles, e.g. houses or water.
2005-01-12(svn r1486) -Codechange: moved all 'signs' stuff to signs.c/h and prepared ↵truelight
it for dynamic arrays
2005-01-10(svn r1477) -Fix: finally zooming in/out always works. The problem was that ↵darkvater
the zoomed in/out coordinates were used for checking if the area was a zoomable viewport in the not zoomed in/out position. The chances were high that there was a window.
2005-01-10(svn r1475) Fix some more signed/unsigned comparison warningstron
2005-01-07(svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn ↵tron
the latter into inline functions names Tile[XY]
2005-01-06(svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns ↵truelight
and _industries (in prepare of dynamic arrays): - DEREF_XXX is changed into GetXXX - All direct call are directed via GetXXX - struct Industry has now an index-field - ENUM'd some stuff - Replaced home built loops with FOR_ALL_XXX - Added _stations_size, _vehicles_size, ... which gives the length of the array (which will be dynamic in the near future) - Changed lengtof(XXX) to _XXX_size (e.g. _stations_size) - Removed all endof(XXX) (because mostly it was part of a FOR_ALL_XXX) - Made the sort-functions of all 4 dynamic - Made all 4 Initialize functions more of the same - Some minor tab-fixing and stuff (tnx to Tron for proof-reading my 100kb patch ;)) Note for all: please do NOT directly call _stations, _vehicles, _towns and _industries, but use the right wrapper to access them. Thank you. Ps: please also do not use 'v++', where v is of type Vehicle *.
2005-01-03(svn r1354) Use WindowClass/WindowNumber to store/pass window class/number, ↵tron
not some arbitrary data types
2005-01-03(svn r1344) Use MapSize[XY]() (or MapSize()/MapMax[XY]() where appropriate) ↵tron
instead of TILES_[XY]
2005-01-03(svn r1337) Use MapMax[XY]() (or MapSize[XY]() if appropriate) instead of ↵tron
TILE_MAX_[XY] While here replace one erroneous TILE_MAX_X with MapMaxY()
2005-01-03(svn r1330) Increase size of some vars from int16 to int32 to guard against ↵tron
future overflows
2004-12-31(svn r1312) -Add: Patch which is on by default: population in label of the towntruelight
-Fix: Expand town is a bit more agressive -Fix: Fixed a bug in growing algorithm
2004-12-15(svn r1117) Move map arrays and some related macros into their own files ↵tron
map.c and map.h
2004-12-14(svn r1091) Fix: Finally station names use 100% the correct color in ↵dominik
transparent mode
2004-12-13(svn r1063) Improve scrolling limits a bit. You now can scroll further away ↵tron
from the map at the NW and NE edge. Hopefully this new code is also a bit more comprehensible than the old. (;
2004-12-02(svn r901) Small step in the process to clean up the DPARAM mess:tron
- reduce to 2 sizes (*DParam64 for 64bit values, *DParam for the rest) - use inline functions instead of macros - add assert()s to check for buffer overruns
2004-11-25(svn r815) Include strings.h only in the files which need it.tron
This should reduce the compile time after altering english.txt by about 1/3, because "only" 62 instead of 90 .c files must be recompiled.
2004-11-24(svn r793) Merge INLINE -> inline replacement (revision 376)tron
2004-11-23(svn r787) Invert the sense of the DO_TRANS_BUILDINGS flag to be consistent ↵tron
with its own name and all other DO_* flags. Now it is active-true.