Commit Graph

297 Commits (b7643b1d36cb41eb6712042761c13b9819fcbe74)

Author SHA1 Message Date
smatz 1da745c9ad (svn r17612) -Feature: possibility to choose (randomise or enter custom) town name before its creation (original patch by Terkhen) 15 years ago
smatz 93d275f1be (svn r17608) -Codechange: use CmdFoundTown when founding 'Random town' too 15 years ago
smatz 15511678e3 (svn r17603) -Codechange: since now, towns are 'founded' instead of 'built' 15 years ago
alberth bae15616f7 (svn r17587) -Codechange: Town authority window uses pure nested widgets. 15 years ago
alberth 46cd3ee944 (svn r17586) -Codechange: Adding documentation, and replacing some numbers with constants in the town authority window. 15 years ago
alberth 17a52eb852 (svn r17582) -Codechange: Move TownActions and _town_action_costs[] to a header file to allow sharing. 15 years ago
alberth 116c77c342 (svn r17572) -Codechange: Use the Window::GetWidget() function to access nested widgets through the nested_array. 15 years ago
rubidium 9d7fe9bd86 (svn r17571) -Fix [FS#3213] (r17569): town view didn't show the right town in most of the cases 15 years ago
alberth fa33b92b0f (svn r17569) -Codechange: Town view window runs with nested widgets. 15 years ago
smatz 95dd198053 (svn r17540) -Codechange: move functionality of PlaceProc_Town() to FoundTownWindow::OnPlaceObject() 15 years ago
alberth 9fd22f727f (svn r17423) -Fix [FS#3174]: Show '- None -' with empty town or industry list, and use that text in the size computation as well. 15 years ago
rubidium 900aedf270 (svn r17374) -Codechange: make the town and vehicle GUIs use the scrollbar wrappers 15 years ago
smatz 352d07b1b5 (svn r17348) -Fix: don't mix 'sort by' strings used for buttons and dropdowns 15 years ago
rubidium 0d3ab7c72d (svn r17323) -Codechange: replace some magic numbers with constants in the town directory. 15 years ago
rubidium 0007a599c3 (svn r17321) -Codechange: minor coding style fixes for the town directory 15 years ago
rubidium aca7ba714a (svn r17271) -Fix: SetFill sometimes used 1/0 when it should be using true/false 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
smatz e707c82412 (svn r17131) -Codechange: apply coding style to some switch statements 15 years ago
rubidium 1fe3ad3288 (svn r17075) -Codechange: rename ~750 strings to be more uniform with their relatives 15 years ago
alberth e3033ee895 (svn r16953) -Codechange: Use SetStringParameters() for simple parameterized strings. 15 years ago
alberth e5bfc5660d (svn r16952) -Codechange: Use a label for the world population in the town directory window. 15 years ago
rubidium e3053660c6 (svn r16886) -Codechange: unify naming of some string IDs related to string codes and group them logically 15 years ago
alberth 36576371c0 (svn r16871) -Codechange: Generalize GetWidgetContentSize to UpdateWidgetSize for better control over widget size and resize steps. 15 years ago
smatz 1f29e38b83 (svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get() 15 years ago
rubidium 594070194f (svn r16842) -Cleanup: add some spaces around a few operators 15 years ago
alberth 6767a59827 (svn r16840) -Codechange: Small merge in town directory widget content method. 15 years ago
alberth d65c6cae54 (svn r16740) -Codechange: Self-sizing widgets in intro screen, town directory, and found town windows. 15 years ago
alberth 2385aeae3c (svn r16739) -Codechange: Initialize internal data before computing the widgets. 15 years ago
alberth 527dd3dcf7 (svn r16734) -Codechange: Prepare intro, town directory, and found town windows for more flexible widget contents. 15 years ago
alberth 50ca187524 (svn r16733) -Codechange: Move rebuilding and sorting the town list out of TownDirectoryWindow::OnPaint. 15 years ago
alberth baab325b54 (svn r16689) -Codechange: Allow for rendering of parameterized text of nested widgets in Window::DrawWidget, adapt intro and town directory windows. 15 years ago
alberth d5a42ee825 (svn r16688) -Codechange: Some cleanup of intro screen and town directory. 15 years ago
alberth bc7e9514d2 (svn r16558) -Codechange: Switch found-town window to nested widgets. 15 years ago
alberth 19ccf6912c (svn r16517) -Codechange: Switched intro-screen and town directory window to nested widget trees. 15 years ago
smatz 871107f529 (svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index) 15 years ago
smatz 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 15 years ago
rubidium 53887e07bb (svn r16160) -Codechange: remove the need for explicit TC_FROMSTRING for DrawString. 15 years ago
rubidium 59d45a04d6 (svn r16118) -Change/cleanup: remove the hexadecimal 'in TTD the string had this ID' from 'some' strings and replace the string name with something more sensible. 15 years ago
rubidium 329cabab4f (svn r16088) -Codechange: merge HighLightStyle and ViewportHighlightMode as they are basically the same thing 15 years ago
alberth eaa98482e4 (svn r16049) -Codechange: Added nested widgets to town windows. 15 years ago
alberth 848404eea5 (svn r16047) -Codechange: Extracting widget number enums from their window classes. 15 years ago
alberth f17d6df0a6 (svn r16043) -Codechange: Prepare town-view widgets for nesting. 15 years ago
alberth d0f91fbea2 (svn r16040) -Codechange: Use coordinates from the widget for the town-view viewport instead of magic constants. 15 years ago
alberth 0196f06744 (svn r16039) -Codechange: Completing widget number enums of town windows and adding them as comment to the widget arrays. 15 years ago
alberth e85e8ca4db (svn r16036) -Codechange [FS#2825]: Renamed TVW_SHOWAUTORITY to TVW_SHOWAUTHORITY (bilbo) 15 years ago
alberth 9d2738b9c4 (svn r15885) -Codechange: Removed new_size parameter of Window::OnResize() callback 15 years ago
rubidium 57174a9301 (svn r15808) -Codechange: use the new DrawString API in a number of GUIs 15 years ago
rubidium d837fc4d03 (svn r15797) -Codechange: make users of the old DrawStringMultiLine use the new one. 15 years ago
rubidium f9def73be6 (svn r15723) -Codechange: use a constructor for WindowDescs as that makes expanding them much easier (Alberth) 16 years ago
rubidium b25a4f8231 (svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too 16 years ago
frosch a987c7299b (svn r15559) -Feature: Show required/already-delivered cargo needed for town-growth in town-view-window. (and only if it is really needed) 16 years ago
smatz 42747e222c (svn r15506) -Codechange: rename ScenarioEditorTownGenerationWindow to FoundTownWindow 16 years ago
smatz 0878541cf2 (svn r15505) -Codechange: pass name of new town as parameter to CMD_BUILD_TOWN 16 years ago
rubidium 8dae160d0f (svn r15425) -Codechange: some color->colour changes and type safety. 16 years ago
smatz 6dff31d34b (svn r15357) -Codechange: unify the way buttons are updated in the 'found town' window 16 years ago
smatz ef4282f8de (svn r15356) -Codechange: make PlaceProc_Town and some global variables a static function/variables of the scenedit window 16 years ago
smatz 324b54132c (svn r15353) -Feature(tte): make it possible to have cities of various sizes 16 years ago
smatz aa692a99a9 (svn r15352) -Codechange: make the arguments passed around while founding a town a bit more readable 16 years ago
smatz df2a387fc3 (svn r15342) -Feature: allow changing town layout in the 'Found new town' window 16 years ago
rubidium 7da743a0dc (svn r15336) -Fix: do not use _current_company in the GUI as there are no guarantees that _current_company is the same as _local_company. 16 years ago
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 16 years ago
peter1138 481c2164d0 (svn r15149) -Codechange: GetMaskOfTownActions() is used by a Cmd handler, therefore it does not belong in _gui. 16 years ago
peter1138 1ee0c4caf4 (svn r15088) -Fix [FS#2536]: Resize company list in town authority window if required. 16 years ago
peter1138 4f4408f37e (svn r15087) -Codechange: Less hardcoding of y positions in town authority window. 16 years ago
frosch cf1e926e37 (svn r14902) -Feature: Advanced setting to keep various building tools active, which are usually closed after placing an object. (planetmaker) 16 years ago
smatz 254e19da91 (svn r14807) -Codechange: use INVALID_TILE instead of 0 to mark invalid depots, industries, towns and waypoints 16 years ago
rubidium 87e5a8b52b (svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter. 16 years ago
smatz 07e3c096b3 (svn r14591) -Fix [FS#2388](r14528): cached nearest town could be invalid after importing older savegame and during town generation
-Codechange: rewrite parts of code responsible for caching index of nearest town
16 years ago
rubidium a14ad77a36 (svn r14528) -Codechange: cache the closest town for all road tiles instead of only roads owned by tiles. This replaces a O(n) search over all towns from the road's tileloop with a O(1) lookup (PhilSophus) 16 years ago
rubidium b650a86e58 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 16 years ago
rubidium 3b798599b6 (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 16 years ago
smatz 1266b1a73f (svn r14334) -Feature: ability to reset name to default/automatic value (for vehicles, engines, towns, groups, stations, waypoints, managers and companies) 16 years ago
smatz 606f4defdc (svn r14331) -Codechange: use an enum as additional parameter for ShowQueryString() 16 years ago
rubidium 97c184f8f8 (svn r14063) -Codechange: replace some "magic" constants with enumified constants. 16 years ago
belugas c5cecdd2e3 (svn r13919) -Codechange: Replace numbers with Colours enum on osk(forgot 2 assignations), statusbar, subsidy, terraform, timetable, toolbar, town, tree and vehicle guis. 16 years ago
rubidium 3a799389eb (svn r13731) -Codechange: make a pool of the array of players. 16 years ago
rubidium d06529ef4d (svn r13719) -Codechange: rename IsValidPlayer to IsValidPlayerID in line with all other structs/classes that are in a pool. 16 years ago
belugas 33150af3e2 (svn r13683) -Codechange: privatize a function that is not used outside of the class who calls it 16 years ago
skidd13 6b8a758339 (svn r13533) -Codechange: Replace direct class member access of GUIList with the appropriate function calls 16 years ago
rubidium 923e21129c (svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games. 16 years ago
rubidium 5c5ee7eb57 (svn r13301) -Fix [FS#1997]: resolve more MSVC 9 x64 warnings. 16 years ago
peter1138 cfb962c7f1 (svn r13297) -Codechange: Use GUIList for the town directory window 16 years ago
rubidium 4625695653 (svn r13251) -Codechange: rename _patches to _settings as that is more logic.
-Codechange: move all Settings into substructs of _settings in a way that they are logically grouped.
16 years ago
smatz 32380e257c (svn r13244) -Fix: allow only one town directory window to be opened 16 years ago
belugas fc35ad9ee9 (svn r13226) -Feature: Allow to have more than only two airports per town. The number of airports is now controlled by the noise each of them generates, the distance from town's center and how tolerant the town is.
Initial concept : TTDPatch (moreairpots),  Initial code : Pasky
Thanks to BigBB (help coding), Smatz Skidd13 and frosch for bugcatches and advices
16 years ago
peter1138 6f233b1f8f (svn r13225) -Fix (r13041): Missing calls to FindWindowPlacementAndResize() from lots
of windows causing 'two stage' opening effect.
16 years ago
belugas 1e79665b45 (svn r13210) -Codechange: make town (previously named t) a private member of the different Town guis and assign it only once, at creation 16 years ago
belugas b4128cbc25 (svn r13209) -Codechange: Privatize what should be private. 16 years ago
rubidium 27c38052b7 (svn r13185) -Codechange: remove everything related to the WindowProc callbacks. 16 years ago
peter1138 b1e324dd47 (svn r13180) -Codechange: make a window class of the TownDirectoryWindow. 16 years ago
smatz 290cedade2 (svn r13176) -Fix (r13153): town window was glitchy while opening 16 years ago
rubidium 33b822faf7 (svn r13153) -Codechange: make classes of the TownViewWindow and the ScenarioEditorTownGenerationWindow. 16 years ago
rubidium 8b54212900 (svn r13139) -Codechange: move DrawWindowWidgets and DrawWindowViewport to the Window class and remove Window from their naming. 16 years ago
rubidium 7c7a4de3e5 (svn r13113) -Codechange: make a class of the TownAuthorityWindow. 16 years ago
rubidium f23026cce8 (svn r13027) -Codechange: use StrEmpty instead of arr[0] == '\0' and remove the need for WE_ON_EDIT_TEXT_CANCEL. 16 years ago
rubidium f438700402 (svn r13024) -Codechange: do not use WE_MOUSELOOP when WE_TICK suffices, rename WE_4 to something more descriptive and correct some (completely incorrect) comments. 16 years ago
rubidium 23fc96c3e8 (svn r13005) -Codechange: prepare AllocateWindowDescFront for subclassing of Window. 16 years ago
rubidium 3d5567ccf7 (svn r12987) -Codechange: split viewport and tile selection. 16 years ago
rubidium 9bf519f26b (svn r12976) -Codechange: use w->SetDirty() instead of SetWindowDirty(w) when it's certain that w != NULL. 16 years ago
rubidium d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 16 years ago
peter1138 4595d2c3b1 (svn r12953) -Feature: Open a new viewport when ctrl-clicking on a 'Location' button, a town/station/industry list, or some news items. 16 years ago
rubidium 24b5c91039 (svn r12789) -Codechange: rename AssignWindowViewport to InitializeWindowViewport because the viewport is now part of the window struct. Patch by Alberth. 16 years ago
rubidium 9d8fa486af (svn r12761) -Codechange: lots of minor whitespace coding style fixes around operators. 16 years ago
belugas 8a669f04cd (svn r12733) -Codechange: Merge two more Widgets arrays (town views ) into one. 16 years ago
belugas a8008db23d (svn r12705) -Codechange: enumification of some more widgets 16 years ago
belugas 8418bc5050 (svn r12704) -Codechange: code style cleanup, mostly switch case alignment 16 years ago
rubidium 65c7ef9629 (svn r12398) -Codechange [FS#1770]: Move toolbar related code to it's own little neighbourhood. Based on a patch by Dominik. 17 years ago
maedhros 292cfc56f6 (svn r12391) -Feature: Show whether a town is a "city" in the town description title bar. 17 years ago
belugas e7173d3ba4 (svn r12159) -Codechange: Enumify some widget magical numbers
-Cleanup: apply a bit of code style.  Mostly re-indenting switch cases
17 years ago
peter1138 68707808c0 (svn r11915) -Codechange: Add a function to draw a sort button's up/down arrow. Arrows are now drawn in a consistent position based on the widget, instead of randomly positioned by pixel. 17 years ago
rubidium dc87b05e8c (svn r11834) -Codechange: only include settings_type.h if needed. 17 years ago
rubidium d4e6a6bf57 (svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h. 17 years ago
rubidium ac528411df (svn r11818) -Codechange: split player.h into smaller pieces. 17 years ago
rubidium 0e517fe023 (svn r11787) -Codechange: more header rewrites. This time related to viewport.h. 17 years ago
rubidium 429521a7d1 (svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h' 17 years ago
rubidium bf98e25e43 (svn r11691) -Codechange: move+rename helpers.hpp and only include it when it is really needed. 17 years ago
rubidium 8f0e68285b (svn r11682) -Codechange: move some 'generic' geometry related types into a single file and do not include gfx.h everywhere to get a Point type. 17 years ago
rubidium 9e9cfe6e59 (svn r11677) -Codechange: move price and command related types/functions to their respective places. 17 years ago
rubidium 433a9f3c09 (svn r11675) -Codechange: split the string types from the string functions. 17 years ago
rubidium d582aea639 (svn r11668) -Codechange: more refactoring aimed at reducing compile time and making it more logic where function definitions can be found. 17 years ago
rubidium 8896bea306 (svn r11667) -Codechange: split window.h into a header that defines some 'global' window related types, on that defined 'global' window functions and one that defines functions and types only used by *_gui.cpps. 17 years ago
rubidium ec90ce7e98 (svn r11643) -Codechange: conform with the coding style for the WP macro uses. 17 years ago
glx b47bce651e (svn r11600) -Cleanup: remove extra out-of-memory checks, since it's now done in *allocT functions. 17 years ago
skidd13 82913a2134 (svn r11564) -Codechange: Increase the usage of the for_each_bit macro and rename it fitting to the naming style 17 years ago
rubidium 527b72749d (svn r11555) -Codechange: use the new members introduced in r11551. 17 years ago
skidd13 6e511188ae (svn r11538) -Codechange: Rewrite GetNthSetBit in a more uncontroversial way and add its documentation 17 years ago
skidd13 bf959f926f (svn r11510) -Codechange: merge the IS_*INSIDE* functions and rename them fitting to the naming style 17 years ago
skidd13 71c4325c50 (svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style 17 years ago
belugas 56e6282f2f (svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
Patch heavily based on BiBB's work (FS#1383)
17 years ago
rubidium ff14665f6e (svn r11188) -Codechange: rewrite of the town action related code (remove some of the magic).
-Feature: possibility to disable exclusive rights and giving money. Both by skidd13.
17 years ago
rubidium db374f600c (svn r10755) -Codechange: make the town struct use the pool item class as super class. 17 years ago
rubidium c03cb2c8db (svn r10704) -Codechange: provide an infrastructure to have resizable windows that are smaller than the default window size. 17 years ago
peter1138 eb6594caa8 (svn r10323) -Codechange: reference company name, number and player (president) name
by index
17 years ago
truelight 2d591ec1af (svn r10291) -Fix [FS#920]: double click in town-GUI didn't work as expected 17 years ago
truelight 6159f58948 (svn r10265) -Feature: allow double-clicking on certain places: build-vehicle and town-action 17 years ago
rubidium 9c0944aa09 (svn r10258) -Codechange: as we are now using int64 all over the place, it's better to use int64 variables in the string generating too instead of packing them into two int32s.
-Fix: some displays of money were wrong.
17 years ago
rubidium eb1472a82d (svn r10247) -Fix (r10210): *always* call SetDParamMoney when you want to place money in some string. 17 years ago
rubidium f806b46cc9 (svn r10246) -Fix (r10297): some forgotten money conversions and truncation issues. Thanks to benc for providing the patch. 17 years ago
truelight d3f375231f (svn r9844) -Codechange: replace zoomlevel with an enum
-Codechange: use predefined enums for viewport zoomlevels
17 years ago
belugas f81217bcf4 (svn r9558) -Documentation: doxygen and comment changes: 'T' now. Almost done 17 years ago
rubidium 36bb92ae24 (svn r9050) -Codechange: Foo(void) -> Foo() 18 years ago
rubidium c8882bd3d2 (svn r8511) -Codechange: make WindowClass an enumerated value. 18 years ago
maedhros 7a7562d8e2 (svn r8300) -Codechange: Add a prototype for DrawPlayerIcon to players.h and include that
instead of using externs. Also move DrawPlayerIcon from graph_gui.cpp to
players.cpp.
18 years ago
peter1138 92d418b031 (svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
This lets us increase the sprite width from 14 to up to 29 bits, 
effectively nulling the old sprite limit. Table changes in next commit.
18 years ago
KUDr 33be1ecfb1 (svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter 18 years ago
rubidium f35ed4bbc2 (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b. 18 years ago
KUDr e373ea7096 (svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp) 18 years ago