Commit Graph

316 Commits (fd84f733236e6288d7b4b007eb976753c0ae19e2)

Author SHA1 Message Date
rubidium d685ca0619 (svn r16220) -Fix [FS#2862]: possible crashes when quiting OpenTTD or forcing resizes/redraws of the screen during map generation 15 years ago
rubidium 85b653bafc (svn r16163) -Codechange: instead of SetDParamStr(0, string); DrawString(..., STR_JUST_RAW_STRING, ...) use DrawString(..., string, ...). 15 years ago
rubidium 7dd677ced2 (svn r16162) -Codechange: remove needless TC_ colours from DrawString when they are part of strings and add some colours to a few strings. 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
alberth 9af4047eee (svn r15927) -Codechange: Added nested widget for generate-world windows 15 years ago
alberth 64fe9fb7c2 (svn r15906) -Codechange: Completed widget number enum of world-generation windows. 15 years ago
alberth 861c29364c (svn r15899) -Fix (r15898): Removed widget number comments used for debugging. 15 years ago
alberth 6c02f9208f (svn r15898) -Codechange: Added nested widgets for create-scenrario window 15 years ago
alberth 70246b3d91 (svn r15897) -Codechange: Completed widget numbers and comment of create-scenario window. 15 years ago
alberth 7284ae3f77 (svn r15882) -Codechange: New widgets for generation progress window. 15 years ago
rubidium 57174a9301 (svn r15808) -Codechange: use the new DrawString API in a number of GUIs 15 years ago
rubidium 9003641095 (svn r15790) -Codechange: remove the *Centered part of the old text drawing API. 15 years ago
rubidium 45f189fdca (svn r15785) -Codechange: remove the *Truncated part of the old text drawing API. 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 9d018723b7 (svn r15711) -Codechange: lots of whitespace cleanup/fixes 16 years ago
rubidium 2adbf67968 (svn r15697) -Fix (r15695): warning about comparing signed vs unsigned. 16 years ago
belugas f6e4bc765a (svn r15695) -Feature [FS#2672]: Allow the number of towns that will be generated in the generate world window to be customized.
Some warnings: 
-the maximum number of towns to be accepted is set to 5000
-the minimum number of towns to be accepted is set to 1
-the number that is specified is NOT guaranteed to be the exact number of towns generated.  The normal mechanism of town creation has not been modified.  So town placement can still fail.
-setting a custom number of town will change your difficulty settings to custom as well
16 years ago
yexo 3bb872e7dd (svn r15576) -Codechange: rename SwitchModes to SwitchMode and don't hardcode the values for that enum. 16 years ago
yexo 901230bde1 (svn r15575) -Codechange: Rename GameModes to GameMode and store _game_mode as GameMode instead of as byte. 16 years ago
yexo 1104e10695 (svn r15573) -Fix (r15538): Terrain type and sea level couldn't be changed in the scenario editor. 16 years ago
yexo c3c549f731 (svn r15538) -Fix (r15334): The difficulty level wasn't set to custom when changing the amount of towns/industries from the newgame gui. 16 years ago
yexo 1f9ec758aa (svn r15495) -Revert (r15383,r15422): Loading NewGRFs depends on correct settings, but the economy can only be started after loading NewGRFs. In short: r15383 causes more problems then it's worth. 16 years ago
rubidium 861e9cefb3 (svn r15424) -Codechange: make it possible to have multiple windows with edit box open simultaniously (Zuu). 16 years ago
rubidium 377ce6c5bf (svn r15410) -Cleanup: get rid of most of the references to the 'patches' except where it's used for backward compatability. 16 years ago
Yexo 4301278514 (svn r15383) -Cleanup: Don't call MakeNewgameSettingsLive more often than necessary. 16 years ago
smatz 832e392855 (svn r15340) -Fix [FS#2121]: changing town road layout in-game caused ugly road networks
-Fix: use a flag instead of TL_NO_ROADS to forbid towns to build roads. The flag is ignored during world generation, so there won't be 'ghost' towns anymore
-Feature: town layout is now stored per town, so it is possible to (manually) set different layout for each town
16 years ago
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 16 years ago
Yexo 8877a0c9ae (svn r15288) -Fix (r15212): Don't set the newgame setting for water borders to a random value if it's 'random' when the newgame gui is opened. 16 years ago
Yexo 7b5bccb329 (svn r15240) -Fix (r15212): Loading heightmaps resulted in an assert. 16 years ago
Yexo 08670da54a (svn r15212) -Feature [FS#2566]: Change the dropdown box where you can chose which edges will be water to 4 pushbuttons (based on patch by planetmaker). 16 years ago
Yexo db3ee34b44 (svn r15190) -Feature: Allow terraforming of the tiles at the edges of the map. 16 years ago
belugas 6b25bc0e0c (svn r15117) -Codechange: enlarge a few text boxes in the Create Scenario window, allowing them to be more visible. 16 years ago
belugas c9fab1c314 (svn r15115) -Documentation: Add some widget enums to the widget array definition (Terkhen). 16 years ago
truebrain a3dd7506d3 (svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
NoAI is an API (a framework) to build your own AIs in. See:
   http://wiki.openttd.org/wiki/index.php/AI:Main_Page
 With many thanks to:
  - glx and Rubidium for their syncing, feedback and hard work
  - Yexo for his feedback, patches, and AIs which tested the system very deep
  - Morloth for his feedback and patches
  - TJIP for hosting a challenge which kept NoAI on track
  - All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
16 years ago
belugas 63e47ed480 (svn r14855) -Documentation: Apply some widget naming to the widget arrays. Based on Yorick's work 16 years ago
rubidium e5c1a7b5c3 (svn r14804) -Codechange: unify opening the OSK (Zuu) 16 years ago
smatz c10f7db576 (svn r14514) -Codechange: use 'size' instead of 'length' for querystring and textbuf, explicitly say it includes the terminating zero
-Fix: one couldn't rename things with too long default/automatic name
-Fix: buffer overflow in console when too long (1024 bytes) command was entered
16 years ago
rubidium 6a931d67cd (svn r14390) -Codechange: replace magic constants with symbolic constants. 16 years ago
smatz 606f4defdc (svn r14331) -Codechange: use an enum as additional parameter for ShowQueryString() 16 years ago
belugas f2f2bcf23c (svn r14105) -Fix: Some typos that are more grammatical errors, as it seems.
Provided by ln
I've added a little fix on currency.cpp too, why not :)
16 years ago
belugas 931f16cfa8 (svn r14060) -Codechange: Replace numbers with Colours enum on Gen world gui.
Note that some WWT_TEXT widgets have received a COLOUR_x value.
It is not a valid colour a per say.  THe strings been displayed there do have their own colours encoded.
IT is currently just for the sake of ease of writing, as TextColour and Colours are not really related.
16 years ago
rubidium 6995365535 (svn r14046) -Codechange: make the size of querystring "widgets" more configurable. 16 years ago
rubidium ab234cf90c (svn r13715) -Fix [FS#2129]: C-like strings had to be rebound each time they were printed, otherwise the text could change due to the few number of slots that could be used to bind.
-Codechange: remove all BindCString and related functions and replace it by RAW_STRING which prints the C-string raw pointer that is on the 'print stack'.
16 years ago
skidd13 9335a28cb5 (svn r13647) -Codechange: replace MAX_UVALUE() for std types with the equivalent constant 16 years ago
glx fd08e7b51a (svn r13508) -Fix (r7733): incorrect usage of strtoul 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 495ca8fdb9 (svn r13277) -Fix: opntitle 'jumping' to the temperate climate when closing the NewGRF settings window. 16 years ago
rubidium cd8e589fa9 (svn r13256) -Codechange: merge the OPTS and PATS chuncks.
-Codechange: split the diff_custom variable.
-Feature: allow changing some of the diff_custom variables via the console in network games.
16 years ago
rubidium 8c9cc415e3 (svn r13255) -Codechange: move _opt to _settings. 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
rubidium 5fa0946c08 (svn r13242) -Codechange: remove _opt_ptr. 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
rubidium 27c38052b7 (svn r13185) -Codechange: remove everything related to the WindowProc callbacks. 16 years ago
rubidium f5681547ef (svn r13151) -Codechange: use an enum instead of bool as return type of OnKeyPress/OnCTRLStateChange to make it obvious what the return values mean. 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
glx 5199f5ff47 (svn r13132) -Codechange: make a class of the GenerateProgressWindow. 16 years ago
rubidium dddfaaac7d (svn r13069) -Codechange: it is no longer needed to pass a void *data pointer with the WE_CREATE message because nothing uses it anymore. 16 years ago
rubidium eb2d47b547 (svn r13042) -Codechange: make a class of CreateScenarioWindow, GenerateLandscapeWindow, NetworkChatWindow, NetworkCompanyPasswordWindow, NetworkGameWindow, NetworkStartServerWindow, QueryStringWindow, SaveLoadWindow. All these classes depended on the 'querystr_d' object which is now put into QueryStringBaseWindow. As a side effect this removes quite a lot of WP macro usages and a few global variables. 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 23fc96c3e8 (svn r13005) -Codechange: prepare AllocateWindowDescFront for subclassing of Window. 16 years ago
rubidium 7ccda80b0b (svn r12986) -Codechange: move the landscape and transport related types from openttd.h to their own headers. 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 e6c944a6c4 (svn r12975) -Codechange: replace DeleteWindow(w) with delete w. 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 ffe07b9292 (svn r12445) -Fix: Add missing compile asserts for window data structs 16 years ago
rubidium 327e870962 (svn r12425) -Feature [FS#1846]: On Screen Keyboard for input fields so someone without a keyboard can enter text too. Patch by Dominik. 16 years ago
rubidium fde33b5547 (svn r12003) -Codechange: don't declare InteractiveRandom[Range] in multiple places. 17 years ago
maedhros 21eef65e77 (svn r11994) -Codechange: Remove numbers from string names where the strings aren't present in TTD, since they don't correspond to either TTD's TextIDs or OpenTTD's StringIDs. 17 years ago
peter1138 14416791af (svn r11921) -Cleanup: correct indenting and switch case line spacing. 17 years ago
peter1138 b6d0684826 (svn r11919) -Codechange: Assign numbered parameters to world generator widgets to avoid separate DrawString()s, and do the same for the scenario flat-land window. 17 years ago
peter1138 35135222b5 (svn r11907) -Codechange: clean up of worldgen/heightmap ui: replace many separate DrawString() calls with widgets, use dropdown widgets, and use consistent positioning/sizing. 17 years ago
peter1138 68fc3b35da (svn r11893) -Codechange: build map size drop downs dynamically and remove unneeded strings 17 years ago
peter1138 e4c05f8d78 (svn r11848) -Codechange: New class-based drop down list functionality. Lists are now dynamically generated, and can include parameters, or be extended however needed. 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 a3ccdcea36 (svn r11777) -Codechange: split the string header and make do not include it when it's not necessary. 17 years ago
rubidium acc7c9eb01 (svn r11771) -Codechange: split settings.h into better separated headers. 17 years ago
rubidium e5e75bd8f8 (svn r11719) -Codechange: split sound.h in a header with types and one with functions. 17 years ago
belugas 5087a6cdd7 (svn r11713) -Codechange: Move some declarations and definitions in a more logical disposition 17 years ago
rubidium b9046c97fb (svn r11702) -Codechange: move all date related stuff to date*. 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 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 5b49e75453 (svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h 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
belugas 73c58d8a40 (svn r11596) -Codechange: Use the Window member HandleButtonClick and remove its now useless counterpart function 17 years ago
glx c21f588a14 (svn r11588) -Codechange: use the new member introduced in r11551 17 years ago
belugas 6c70cf2d82 (svn r11579) -Revert(r11578): some cases of key propagation are not handled correctly.
A better solution will be deviced, but not now.  Let's not cause a ton of bug reports
17 years ago
belugas 7edf28529d (svn r11578) -Codechange: Introduce the window default flag WDF_TEXTENTRY which specifies that the window holding it is actually one that enables an edit box.
Use this flag when dispatching a key event instead of using some hard coded window IDs.
This should ease a little bit the creation of new edit aware windows.
17 years ago
rubidium 527b72749d (svn r11555) -Codechange: use the new members introduced in r11551. 17 years ago
skidd13 8be526e499 (svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding 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 c03cb2c8db (svn r10704) -Codechange: provide an infrastructure to have resizable windows that are smaller than the default window size. 17 years ago
truelight b0d618c66b (svn r10665) -Codechange: replace magic 15 with MAX_TILE_HEIGHT (bilbo)
-Codechange: replace magic 13 with MAX_SNOWLINE_HEIGHT (bilbo)
-Codechange: assure _map_height_bits is always of correct size (Rubidium)
17 years ago
peter1138 9d6136e89e (svn r10396) -Fix: When landscape generating, allow for 200ms between screen updates instead of updating every 200ms. Previously slow screen updates would result in very slow map generation (GeekToo) 17 years ago
peter1138 81170b5206 (svn r10370) -Fix: Heightmap GUI abused custom name system and used unnecessary globals. All details are now kept within the window's custom data. 17 years ago
truelight 2e19d3cf78 (svn r10276) -Codechange: made a counter based on milliseconds and independent of the game-state to base double-click and TGP Generation Process on
-Codechange: renamed _timer_counter to _palette_animation_counter, as that is what it is
17 years ago
belugas aff49954bf (svn r9779) -Feature: Add the possiblity to choose different road patterns for towns to use.
Possible patterns are : 
No Road (not available in scenario editor)
Original (for the nostalgics)
Better Roads (same as original, but based on distance of 2 tiles instead of one)
2x2 grids
3x3 grids
Patch by skiddl13
17 years ago
belugas 9b7a615887 (svn r9762) -Feature: Two new difficulty settings : Very low number of towns and very low number of industries
Based on FS#289, by pitt2
17 years ago
belugas 607a55f4ec (svn r9662) -Documentation: Doxygen corrections and @file omissions 17 years ago
belugas 06d3669bb5 (svn r9400) -Codechange: Use some more representative enum names for landscape types. 18 years ago
rubidium 24c4d5b06d (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {}; 18 years ago
rubidium 36bb92ae24 (svn r9050) -Codechange: Foo(void) -> Foo() 18 years ago
belugas 978d7da818 (svn r8950) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style. 18 years ago
Darkvater 4ebb009ab4 (svn r8524) -Cleanup: Ala r8509 add some enum names to the generate landscape window 18 years ago
Darkvater 19c90a3bc0 (svn r8522) -Regression (r8512): The flat/random window moved the to scenario editor did not use the right settings for generating land 18 years ago
Darkvater cace026c1b (svn r8512) -Codechange: From the intro window enter the scenario editor. From the scenario editor dialog, remove the 'load heightmap' option and put that with the other options like 'load scenario', 'save scenario', etc. Play a little bit with positioning of elements inside the scenario editor dialog so it looks better. 18 years ago
rubidium c8882bd3d2 (svn r8511) -Codechange: make WindowClass an enumerated value. 18 years ago
Darkvater 01a9abc7e5 (svn r8509) -Cleanup: Add some enum names to the create scenario window 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
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