1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-13 01:29:10 +00:00

Compare commits

..

953 Commits

Author SHA1 Message Date
frosch
b5632149f4 (svn r25069) -Release 1.3.0-RC2 2013-03-05 19:24:35 +00:00
frosch
51f4d6d357 (svn r25067) [1.3] -Update: documentation 2013-03-05 18:29:18 +00:00
frosch
b0a9f0e638 (svn r25066) [1.3] -Backport from trunk: language updates 2013-03-05 18:09:31 +00:00
frosch
eb548884b8 (svn r25065) [1.3] -Backport from trunk:
-Fix: Make sizes of the station preview list and direction selection identical in the station build window [FS#5472] (r25064)
-Fix: When allocation of the sprite cache fails, try to allocate less memory and display an error message later on (r25061)
2013-03-05 18:04:05 +00:00
rubidium
b69d02ef4f (svn r25055) [1.3] -Backport from trunk:
- Fix: Refactor Script Debug GUI to only set widget states in OnInvalidateData [FS#5490] (r25052)
- Fix: Do not let gcc include files from the "standard C" include directories; newer gcc/libc seem to otherwise automatically include some header files at the top of the preprocessed nfo files which causes NFOrenum/GRFcodec to make invalid assumptions about the NFO version (r25050)
- Fix: Minimise gaps feature caused removal to only happen at the signal build interval instead of the implicit interval of 1 [FS#5479] (r25038)
- Fix: Green path signals would be shown when building them 'under' a train, and they would keep showing green until they were passed again [FS#5480] (r25037)
2013-02-28 06:55:22 +00:00
rubidium
bb4a82c8e1 (svn r25031) [1.3] -Update: documentation 2013-02-19 19:59:08 +00:00
rubidium
8ad76d2f8d (svn r25030) [1.3] -Backport from trunk: tamil was upgraded to finished 2013-02-19 19:58:46 +00:00
rubidium
e572eecc73 (svn r25029) [1.3] -Backport from trunk: language updates 2013-02-19 19:54:06 +00:00
rubidium
f393cecbf7 (svn r25028) [1.3] -Backport from trunk:
- Feature: Searching of (missing) content via GrfCrawler (r25024, r25023)
- Fix: [SDL] Crash after bootstrap download of 32bits base set due to referencing a deleted mutex [FS#5466] (r25017)
- Fix: [SDL] Improve 8bpp hardware palette support. Instead of always requesting SDL_HWPALETTE, it is now only done for 8bp blitters in fullscreen mode (r25003, r25002, r24993)
2013-02-19 19:46:46 +00:00
rubidium
5bc674b48d (svn r25000) [1.3] -Branch: time to get this thing done and do some new stuff in trunk 2013-02-14 18:52:05 +00:00
translators
a3b3db664e (svn r24999) -Update from WebTranslator v3.0:
english_US - 4 changes by Rubidium
french - 4 changes by glx
greek - 156 changes by Evropi
spanish - 5 changes by Terkhen
swedish - 9 changes by Joel_A, Zuu
2013-02-14 18:49:11 +00:00
rubidium
ced17303c2 (svn r24998) -Fix [FS#5137]: Set vehicle's service interval is percent flag appropriately on creation (peter1138) 2013-02-14 17:24:55 +00:00
rubidium
3d7860e0a5 (svn r24997) -Change: Use dropdown list to select between Default/Days/Percentage (peter1138) 2013-02-14 17:11:42 +00:00
rubidium
ef8d491d8f (svn r24996) -Change: Apply default service interval changes to vehicles without custom interval (peter1138) 2013-02-14 17:08:56 +00:00
rubidium
369a6f9d1b (svn r24995) -Codechange: Add flags to vehicle service interval for custom & ispercent (peter1138) 2013-02-14 17:06:49 +00:00
rubidium
c77cd1f409 (svn r24994) -Codechange: Replace access to service_interval with accessors (peter1138) 2013-02-14 17:04:01 +00:00
matthijs
328ed1cf94 (svn r24993) -Fix: [SDL] Improve 8bpp hardware palette support. Instead of always requesting SDL_HWPALETTE, it is now only done for 8bp blitters in fullscreen mode.
- This fixes 32bpp blitters on 8bpp X11, which would only render garbage with SDL_HWPALETTE.
  - This prevents the colors of other applications from being messed up when running a 8bpp blitter on a 8bpp system.
  - When running a 8bpp blitter on an 8bpp system without SDL_HWPALETTE (e.g., in windowed mode), this uses a new shadow surface with color approximation.
  - The use of a hardware palette can be forced on and off using -v sdl:hw_palette=1 or -v sdl:hw_palette=0
2013-02-14 11:06:12 +00:00
matthijs
afcb4a25b2 (svn r24992) -Codechange: [SDL] Make CreateMainSurface and PollEvent private methods instead of static functions. 2013-02-14 11:06:06 +00:00
matthijs
97decad061 (svn r24991) -Doc: Clarify comments regarding settings macros. 2013-02-14 11:06:01 +00:00
translators
b9b2b019c9 (svn r24990) -Update from WebTranslator v3.0:
czech - 36 changes by greem
greek - 24 changes by Evropi
japanese - 45 changes by Aknuth
vietnamese - 37 changes by myquartz
2013-02-13 18:45:20 +00:00
translators
37b03c06d6 (svn r24989) -Update from WebTranslator v3.0:
afrikaans - 53 changes by YsterVuis
danish - 4 changes by Elias
greek - 9 changes by Evropi
hebrew - 3 changes by yitzc
thai - 50 changes by khao9999
2013-02-12 18:46:26 +00:00
translators
d8c6a6fb59 (svn r24988) -Update from WebTranslator v3.0:
greek - 53 changes by Evropi
hebrew - 24 changes by yitzc
hungarian - 1 changes by IPG
korean - 1 changes by telk5093
slovak - 10 changes by greem
2013-02-11 18:49:03 +00:00
frosch
affd456995 (svn r24987) -Fix: When choosing a train in a depot to attach a newly purchased wagon to, do not consider trains currently moving in and out of the depot. 2013-02-10 21:05:24 +00:00
zuu
b1016f66ba (svn r24986) -Change: Cleanup goals and cargo monitors of companies when they go bankrupt or are taken over. 2013-02-10 19:49:04 +00:00
translators
e27582d104 (svn r24985) -Update from WebTranslator v3.0:
korean - 1 changes by telk5093
turkish - 21 changes by magnum06
ukrainian - 43 changes by Strategy
2013-02-10 18:48:04 +00:00
translators
ae9498da64 (svn r24984) -Update from WebTranslator v3.0:
esperanto - 1 changes by LaPingvino
greek - 5 changes by Evropi
thai - 38 changes by khao9999
ukrainian - 23 changes by Strategy
2013-02-09 18:45:20 +00:00
frosch
3e02890b73 (svn r24983) -Change: Apply the same name sorting rules to content and NewGRF list as for the server list. 2013-02-09 17:31:07 +00:00
rubidium
4e61c1770d (svn r24982) -Fix [FS#5465]: [Script] Crash when passing too many parameters 2013-02-08 20:34:27 +00:00
rubidium
bb225ae39e (svn r24981) -Fix: handle corner case where an encoded string contains too many parameters more gracefully 2013-02-08 20:32:56 +00:00
rubidium
b9b34bc898 (svn r24980) -Fix: memory leak in corner case of handling encoded strings 2013-02-08 20:31:51 +00:00
rubidium
078fc80362 (svn r24978) -Update: some assorted documentation tidbits 2013-02-07 20:53:55 +00:00
translators
d5927464b6 (svn r24977) -Update from WebTranslator v3.0:
indonesian - 6 changes by Yoursnotmine
2013-02-07 18:45:07 +00:00
translators
85c1521df8 (svn r24976) -Update from WebTranslator v3.0:
korean - 16 changes by telk5093
lithuanian - 1 changes by Stabilitronas
malay - 2 changes by richz
2013-02-06 18:45:20 +00:00
frosch
05203587b5 (svn r24975) -Fix [FS#5463]: Additional zoom in levels could glitch by a few pixels due to incorrect rounding. 2013-02-06 17:51:05 +00:00
5bffc704f9 (svn r24974) -Fix [FS#5279]: Honour pause_on_newgame setting when running as a dedicated server. 2013-02-05 21:41:32 +00:00
3b4f4fe0b6 (svn r24973) -Fix [FS#5462]: Prevent access to tile-based variables when tile is invalid. 2013-02-05 21:38:38 +00:00
rubidium
00530f4ccf (svn r24972) -Fix [FS#5258]: do not make overbuilding rivers with canals insanely expensive; there is no real need to fill the river with dirt first, just excavate it a bit and build borders 2013-02-05 21:07:24 +00:00
rubidium
6444dc3f53 (svn r24971) -Fix: ignore screenshot folder in regression 2013-02-05 20:53:26 +00:00
rubidium
124f0fc7a3 (svn r24970) -Fix [FS#5346]: crash when infinite loop occured during loading a script 2013-02-05 20:52:28 +00:00
translators
495b7fa1eb (svn r24969) -Update from WebTranslator v3.0:
danish - 17 changes by Hellwing
korean - 48 changes by telk5093
2013-02-05 18:46:08 +00:00
rubidium
99a08e1e8c (svn r24968) -Fix [FS#5379]: company window was not updated when shared were enabled/disabled 2013-02-04 20:29:38 +00:00
translators
26adb854e0 (svn r24967) -Update from WebTranslator v3.0:
danish - 3 changes by Hellwing
2013-02-04 18:45:07 +00:00
rubidium
191cfd077f (svn r24966) -Fix [FS#5228]: trams would get stuck on water 2013-02-03 20:18:41 +00:00
translators
fc5f25a823 (svn r24965) -Update from WebTranslator v3.0:
catalan - 3 changes by arnau
luxembourgish - 2 changes by Phreeze
serbian - 44 changes by ivan_mile
tamil - 1 changes by aswn
2013-02-03 18:45:24 +00:00
rubidium
eb538da228 (svn r24964) -Fix [FS#5416]: With YAPF the docking behaviour differed per direction; now favour docking in the direction you approached 2013-02-03 14:16:45 +00:00
rubidium
968b41fa3f (svn r24963) -Fix [FS#5435]: Do not stop loading if there are reservations left (fonsinchen) 2013-02-03 12:58:57 +00:00
rubidium
f790d70cd6 (svn r24962) -Fix [FS#5438]: Reserve all capacity while unloading to avoid 'stealing' cargo, i.e. loading cargo onto a second vehicle when the first can't be fully filled yet (fonsinchen) 2013-02-03 10:06:34 +00:00
rubidium
c7168f09c3 (svn r24961) -Fix [FS#5362] (r23564): making occupied platforms larger would make train reserve onto the newly unreserved bit and cause crashes. Now if a platform is enlarged and there is a reservation, reserve the whole platform 2013-02-03 10:03:38 +00:00
rubidium
e65a710986 (svn r24960) -Fix [FS#5423]: inconsistencies in the "thanks to" lists 2013-02-02 20:19:17 +00:00
rubidium
6be79c424d (svn r24959) -Doc [FS#5459]: that certain parameters need to be within certain boundaries 2013-02-02 20:18:41 +00:00
rubidium
a6ae4ea8a2 (svn r24958) -Fix [FS#5458]: refering to non-existent method 2013-02-02 19:52:56 +00:00
rubidium
2e20291a3d (svn r24957) -Document [FS#5349]: newlines and other special characters are removed/converted 2013-02-02 19:46:46 +00:00
translators
4a9e710fa7 (svn r24956) -Update from WebTranslator v3.0:
japanese - 13 changes by Aknuth
korean - 1 changes by telk5093
lithuanian - 1 changes by RunisLabs
polish - 1 changes by wojteks86
tamil - 104 changes by aswn
2013-02-02 18:49:21 +00:00
frosch
c3832ffb7f (svn r24955) -Change (r24808) [FS#4458]: Revert to opening the vehicle GUI again when cloning vehicles using the clone-button from the depot GUI. This button cannot be used for sequential cloning, so the argument about opening many windows does not hold as it does for the clone button from the vehicle GUI. 2013-02-02 12:54:29 +00:00
frosch
6f147013ad (svn r24954) -Codechange: OPENTTD_SPRITE_COUNT uses decimal, so use decimal in the nfo as well. 2013-02-02 11:49:08 +00:00
translators
9a079b74e2 (svn r24953) -Update from WebTranslator v3.0:
tamil - 94 changes by aswn
2013-02-01 18:45:10 +00:00
translators
2ef3b24046 (svn r24952) -Update from WebTranslator v3.0:
tamil - 15 changes by aswn
2013-01-31 18:45:07 +00:00
frosch
6f80f4ac29 (svn r24951) -Fix: [NewGRF] Var 10 of CB 24 missed the T part. 2013-01-31 18:34:11 +00:00
68420aa92e (svn r24950) -Fix (r24136): Also set replace when old flag when replacing an autoreplace 2013-01-31 10:21:04 +00:00
translators
df3a9027d2 (svn r24949) -Update from WebTranslator v3.0:
german - 1 changes by lugo
japanese - 117 changes by Aknuth
korean - 1 changes by telk5093
2013-01-30 18:45:16 +00:00
zuu
24fd67f9d6 (svn r24948) -Codechange: Do not assume CA_BUS and CA_TRUCK to be equal, instead let the compiler optimize the code if that is the case. (ComLock) 2013-01-28 22:21:29 +00:00
translators
4a9e5aa0f2 (svn r24947) -Update from WebTranslator v3.0:
afrikaans - 3 changes by AtomD
bulgarian - 16 changes by pdedinski
hungarian - 39 changes by oklmernok
japanese - 229 changes by Aknuth
2013-01-28 18:45:21 +00:00
1b3f9e1bb9 (svn r24946) -Fix [FS#5393]: Australians aren't snakesssss 2013-01-28 07:58:49 +00:00
translators
cd5bd698a9 (svn r24945) -Update from WebTranslator v3.0:
hungarian - 3 changes by oklmernok
japanese - 42 changes by Aknuth
polish - 5 changes by wojteks86
slovenian - 1 changes by Necrolyte
tamil - 108 changes by aswn
2013-01-27 18:45:29 +00:00
frosch
e9c44aaeb3 (svn r24944) -Fix [FS#5452]: Deleting implicit orders wasn't able to deal with the various side-effects of DeleteOrder. 2013-01-27 18:11:16 +00:00
translators
c1dcc4b0da (svn r24943) -Update from WebTranslator v3.0:
estonian - 4 changes by notAbot
2013-01-26 18:45:09 +00:00
frosch
41b9a1b990 (svn r24942) -Fix: Korean again... 2013-01-25 18:51:10 +00:00
translators
b3632e3e38 (svn r24941) -Update from WebTranslator v3.0:
belarusian - 1 changes by Wowanxm
english_AU - 4 changes by mrtux
tamil - 87 changes by aswn
2013-01-25 18:45:17 +00:00
translators
4ae2649210 (svn r24940) -Update from WebTranslator v3.0:
hungarian - 24 changes by oklmernok
indonesian - 12 changes by H2
korean - 3 changes by telk5093
polish - 5 changes by wojteks86
tamil - 7 changes by aswn
2013-01-24 18:45:28 +00:00
13e8656804 (svn r24939) -Fix: Redraw autoreplace window properly in network games. 2013-01-23 20:00:00 +00:00
frosch
f563250c0b (svn r24938) -Fix [FS#5447-ish]: Never put a space between cargo name and subtype. 2013-01-23 19:45:47 +00:00
translators
8fa3da44c7 (svn r24937) -Update from WebTranslator v3.0:
greek - 38 changes by Evropi
korean - 1 changes by telk5093
tamil - 1 changes by aswn
turkish - 10 changes by magnum06
vietnamese - 1 changes by nglekhoi
2013-01-23 18:45:31 +00:00
eec1a0aa11 (svn r24936) -Fix [FS#5446]: Don't allow order refit to be set for no-load orders. 2013-01-23 18:33:28 +00:00
rubidium
f9e531d69c (svn r24935) -Fix: language errors 2013-01-22 18:46:57 +00:00
translators
4c6ea864e5 (svn r24934) -Update from WebTranslator v3.0:
belarusian - 1 changes by Wowanxm
croatian - 1 changes by VoyagerOne
danish - 9 changes by beruic
dutch - 1 changes by habell
english_US - 1 changes by Rubidium
esperanto - 10 changes by Mojosa
finnish - 1 changes by jpx_
french - 1 changes by Snail_
icelandic - 1 changes by Stimrol
indonesian - 3 changes by Yoursnotmine
italian - 1 changes by Snail_
norwegian_nynorsk - 7 changes by lbrowncastle
russian - 4 changes by Lone_Wolf
turkish - 2 changes by magnum06
2013-01-22 18:46:08 +00:00
bef25bbdab (svn r24933) -Fix [FS#3473]: Make group names unique per company and vehicle type. 2013-01-22 14:31:01 +00:00
c18446951d (svn r24932) -Fix [FS#5158]: Prevent more NewGRFs being selected than is possible to load. 2013-01-22 03:54:40 +00:00
translators
7e8efa04fe (svn r24931) -Update from WebTranslator v3.0:
croatian - 1 changes by VoyagerOne
danish - 7 changes by Elias
dutch - 1 changes by habell
finnish - 1 changes by jpx_
icelandic - 1 changes by Stimrol
italian - 1 changes by lorenzodv
korean - 61 changes by telk5093
brazilian_portuguese - 11 changes by Tucalipe
russian - 2 changes by Lone_Wolf
turkish - 18 changes by magnum06
2013-01-21 18:45:47 +00:00
translators
882f0bb3e5 (svn r24930) -Update from WebTranslator v3.0:
english_US - 1 changes by Rubidium
french - 2 changes by glx
german - 3 changes by planetmaker
irish - 11 changes by ioo5
brazilian_portuguese - 110 changes by Tucalipe
spanish - 1 changes by Terkhen
2013-01-20 18:45:34 +00:00
frosch
a00320c61d (svn r24929) -Fix [FS#5415]: Don't try to pause or unpause crashed scripts. 2013-01-20 18:43:49 +00:00
frosch
dafff99b2a (svn r24928) -Fix [FS#5408]: [Squirrel] Update line information before processing 'while' token of 'do'-'while' statement. 2013-01-20 17:23:08 +00:00
planetmaker
f8fd13dea1 (svn r24927) -Cleanup [FS#5440]: No need to check a positive value to be larger than 0 2013-01-20 16:17:24 +00:00
frosch
f73e43818c (svn r24926) -Fix [FS#5373]: Check integer min/max macros individually, and define them if missing. 2013-01-20 15:02:28 +00:00
frosch
9b7c8cf7a7 (svn r24925) -Fix [FS#5395]: Add a tooltip to the mapsize selection mentioning possible deviations. 2013-01-20 14:51:50 +00:00
planetmaker
9823fac63b (svn r24924) -Fix (r24923): Make sure that autoslope on steep coast tiles cannot not leave invalid canals 2013-01-20 13:50:10 +00:00
planetmaker
42883b9543 (svn r24923) -Fix [FS#5441]: When an object built on a river is removed, restore the river, if possible also on slopes (based on patch by Supercheese) 2013-01-20 12:43:25 +00:00
translators
5fb6b7b9eb (svn r24922) -Update from WebTranslator v3.0:
finnish - 2 changes by jpx_
hebrew - 14 changes by taleinat
serbian - 5 changes by SweetAbsinthe
swedish - 2 changes by spacejens
ukrainian - 48 changes by Norby89
2013-01-19 18:45:35 +00:00
translators
487730b0e0 (svn r24921) -Update from WebTranslator v3.0:
traditional_chinese - 2 changes by siu238X
danish - 36 changes by Hellwing
hebrew - 2 changes by taleinat
icelandic - 1 changes by Stimrol
2013-01-18 18:45:44 +00:00
translators
79ae76c30a (svn r24920) -Update from WebTranslator v3.0:
greek - 56 changes by Evropi
hebrew - 338 changes by taleinat
portuguese - 4 changes by malafaya
2013-01-17 18:45:19 +00:00
506132c051 (svn r24919) -Codechange: Remove useless noisy grf debug messages. 2013-01-17 07:53:17 +00:00
rubidium
5398822714 (svn r24918) -Fix: string validation 2013-01-16 21:38:14 +00:00
translators
4927a96de8 (svn r24917) -Update from WebTranslator v3.0:
simplified_chinese - 15 changes by ntchris
hebrew - 193 changes by taleinat
polish - 19 changes by wojteks86
2013-01-16 18:45:20 +00:00
translators
379cf25e2d (svn r24916) -Update from WebTranslator v3.0:
catalan - 49 changes by Bassals
traditional_chinese - 150 changes by siu238X
hebrew - 134 changes by taleinat
korean - 16 changes by telk5093
serbian - 49 changes by ivan_mile
2013-01-15 18:45:27 +00:00
smatz
3a3162865b (svn r24915) -Fix: Several out-of-bounds reads 2013-01-14 21:16:56 +00:00
translators
914bb708ad (svn r24914) -Update from WebTranslator v3.0:
bulgarian - 143 changes by GFtoBG
catalan - 1 changes by Bassals
traditional_chinese - 146 changes by siu238X
croatian - 2 changes by VoyagerOne
hungarian - 2 changes by valaky
2013-01-14 18:45:28 +00:00
translators
5a98df40b9 (svn r24913) -Update from WebTranslator v3.0:
traditional_chinese - 115 changes by siu238X
japanese - 36 changes by kokubunzi
lithuanian - 33 changes by Stabilitronas
polish - 1 changes by wojteks86
serbian - 5 changes by voodoo84
2013-01-13 18:45:36 +00:00
frosch
eda4cfeabe (svn r24912) -Fix [FS#5389]: Upgrading bridges could steal road types. (adf88) 2013-01-13 13:17:12 +00:00
translators
1ec4cf6ff1 (svn r24911) -Update from WebTranslator v3.0:
bulgarian - 118 changes by logi
romanian - 9 changes by mariush
serbian - 2 changes by voodoo84
tamil - 5 changes by aswn
2013-01-12 18:45:24 +00:00
frosch
fea76bbb78 (svn r24910) -Fix: [strgen] Description of plural form 3 was incorrect. 2013-01-12 17:21:30 +00:00
frosch
28f22a46bc (svn r24909) -Codechange: Remove implicit bool -> integer conversion. 2013-01-12 17:20:31 +00:00
zuu
07ffc90bf4 (svn r24908) -Fix [FS#5419]: Allow GSs to pass negative integer string parameters (frosch123) 2013-01-12 12:48:00 +00:00
translators
5c242c64a3 (svn r24907) -Update from WebTranslator v3.0:
arabic_egypt - 6 changes by zaabi1995
bulgarian - 100 changes by logi
traditional_chinese - 16 changes by Marcadana, elleryq
korean - 23 changes by telk5093
tamil - 12 changes by aswn
turkish - 53 changes by barisdemirdelen
2013-01-11 18:48:02 +00:00
fed430b45d (svn r24906) -Fix (24905): Don't trigger on path reservation for waypoints. 2013-01-11 11:54:12 +00:00
c00a400cc7 (svn r24905) -Feature(ish): Implement station randomisation triggers. 2013-01-11 07:39:25 +00:00
4ebbfc3de4 (svn r24904) -Fix (r22746): "Train loads/unloads cargo" station animation triggers on individual platform 2013-01-10 22:56:49 +00:00
b935e01513 (svn r24903) -Fix: Cached station animation triggers were only set when removing parts of a station. 2013-01-10 18:58:22 +00:00
translators
ecfe0e1302 (svn r24902) -Update from WebTranslator v3.0:
bulgarian - 180 changes by logi
danish - 11 changes by Elias
finnish - 2 changes by jpx_
2013-01-10 18:45:23 +00:00
translators
89429d5406 (svn r24901) -Update from WebTranslator v3.0:
afrikaans - 16 changes by LazyLizzard
dutch - 21 changes by Parody
english_US - 8 changes by Rubidium
polish - 8 changes by wojteks86
tamil - 12 changes by aswn
turkish - 37 changes by barisdemirdelen
2013-01-09 18:45:33 +00:00
planetmaker
c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00
planetmaker
89a2ba2a6d (svn r24899) -Fix [FS#5434]: Also the station build window needs redrawing when the station spread changes (based on patch by juanjo) 2013-01-08 22:38:59 +00:00
zuu
fd8f5cff5d (svn r24898) -Fix: Don't unpause the game when closing the highscore window if it was already paused before the highscore screen was shown. 2013-01-08 21:08:18 +00:00
translators
8f681a7a10 (svn r24897) -Update from WebTranslator v3.0:
bulgarian - 27 changes by pdedinski
traditional_chinese - 3 changes by elleryq
lithuanian - 30 changes by Stabilitronas
romanian - 12 changes by mariush
spanish - 1 changes by Terkhen
2013-01-08 18:45:28 +00:00
planetmaker
e35745abf7 (svn r24896) -Fix [FS#5420, FS#5421, FS#5422, FS#5427]: Improvements and fixes for a number of English strings 2013-01-08 18:10:53 +00:00
planetmaker
812346cad9 (svn r24895) -Fix [FS#5436]: Allow downgrade of road bridges in the scenario editor 2013-01-08 17:56:43 +00:00
planetmaker
f8e0b22974 (svn r24894) -Fix [FS#5434]: Invalidate station selection window when station spread changes (based on patch by juanjo) 2013-01-08 17:44:39 +00:00
translators
4f04486e19 (svn r24893) -Update from WebTranslator v3.0:
bulgarian - 38 changes by pdedinski
traditional_chinese - 30 changes by elleryq
hungarian - 67 changes by valaky
luxembourgish - 38 changes by Phreeze
turkish - 18 changes by niw3
2013-01-07 18:45:27 +00:00
frosch
ba8d5d662c (svn r24892) -Fix (r24890): Missing mkdir 2013-01-06 19:34:13 +00:00
translators
fbb9aba0ce (svn r24891) -Update from WebTranslator v3.0:
simplified_chinese - 3 changes by chenwt0315
esperanto - 37 changes by ernie13
icelandic - 107 changes by Stimrol
luxembourgish - 41 changes by Phreeze
serbian - 59 changes by voodoo84
thai - 7 changes by kenny
2013-01-06 18:45:33 +00:00
zuu
2e4f470f1a (svn r24890) -Fix: Distribute GS compat_<version>.nut with OpenTTD 2013-01-06 16:44:15 +00:00
rubidium
65ff2c1ce6 (svn r24889) -Fix-ish: extra GRF was built with "broken" grfcodec 2013-01-06 13:01:46 +00:00
rubidium
283256aadd (svn r24888) -Fix: broken language file 2013-01-05 18:52:05 +00:00
translators
4c7cd6dabb (svn r24887) -Update from WebTranslator v3.0:
simplified_chinese - 1 changes by chenwt0315
danish - 13 changes by Elias
esperanto - 25 changes by ernie13
greek - 1 changes by Rubidium
hebrew - 19 changes by naf869
icelandic - 109 changes by Stimrol
indonesian - 26 changes by H2
korean - 6 changes by telk5093
luxembourgish - 25 changes by Phreeze
polish - 2 changes by wojteks86
serbian - 5 changes by voodoo84
swedish - 16 changes by spacejens
turkish - 17 changes by kutzun
2013-01-05 18:46:13 +00:00
translators
9ec314c6ee (svn r24886) -Update from WebTranslator v3.0:
simplified_chinese - 20 changes by xiangyigao
greek - 49 changes by Evropi
icelandic - 131 changes by Stimrol
indonesian - 11 changes by H2
korean - 1 changes by telk5093
tamil - 4 changes by aswn
2013-01-04 18:45:30 +00:00
michi_cc
534837ace5 (svn r24885) -Fix: Pass proper UTF-16 strings instead of UCS-2 to ICU in order to preserve characters outside the BMP. 2013-01-03 23:14:38 +00:00
translators
eb5149622e (svn r24884) -Update from WebTranslator v3.0:
greek - 35 changes by Evropi
icelandic - 45 changes by Stimrol
indonesian - 8 changes by fanioz
latvian - 17 changes by Parastais
portuguese - 6 changes by fspinto, neuralshock
slovak - 7 changes by Romop5
2013-01-03 18:45:33 +00:00
rubidium
c749a02ac4 (svn r24883) -Fix: a completely emptied vehicle could trigger an assert 2013-01-03 18:18:32 +00:00
rubidium
0dd0bbc071 (svn r24882) -Fix: desync when NewGRF changes the stats related to acceleration (power, weight, tractive effort, etc) during service or 32 day triggers 2013-01-02 22:20:07 +00:00
rubidium
34b7a60a54 (svn r24881) -Fix: compilation error in language file 2013-01-02 18:49:14 +00:00
translators
fc52eff554 (svn r24880) -Update from WebTranslator v3.0:
simplified_chinese - 25 changes by xiangyigao
czech - 3 changes by micropro_cz
estonian - 238 changes by notAbot
greek - 93 changes by Evropi
icelandic - 118 changes by Stimrol
indonesian - 131 changes by H2, Yoursnotmine, fanioz
italian - 5 changes by Snail_
latvian - 11 changes by Parastais
lithuanian - 19 changes by Stabilitronas
portuguese - 78 changes by Lux, fspinto, neuralshock
romanian - 4 changes by mariush
slovak - 104 changes by Romop5, Tinix
tamil - 1 changes by aswn
2013-01-02 18:46:14 +00:00
translators
984b7fad16 (svn r24879) -Update from WebTranslator v3.0:
bulgarian - 14 changes by pdedinski
simplified_chinese - 2 changes by xiangyigao
finnish - 1 changes by jpx_
greek - 43 changes by Evropi
hungarian - 2 changes by Brumi
icelandic - 201 changes by Stimrol
indonesian - 65 changes by Yoursnotmine
portuguese - 29 changes by fspinto
romanian - 54 changes by mariush
spanish - 1 changes by Terkhen
tamil - 25 changes by aswn
2013-01-01 18:45:55 +00:00
rubidium
f4915ce34f (svn r24878) -Update: the obligatory first of January commit 2013-01-01 11:08:22 +00:00
rubidium
d5d96ba683 (svn r24877) -Fix: some whitespace "errors" 2013-01-01 10:52:32 +00:00
translators
76a41cf88d (svn r24876) -Update from WebTranslator v3.0:
belarusian - 30 changes by Wowanxm
simplified_chinese - 99 changes by huanggua2002, xiangyigao
greek - 118 changes by Evropi
icelandic - 89 changes by Stimrol
korean - 12 changes by telk5093
polish - 3 changes by wojteks86
portuguese - 31 changes by fspinto, neuralshock
romanian - 36 changes by mariush
slovenian - 17 changes by gligoran
spanish - 1 changes by Terkhen
tamil - 44 changes by aswn
2012-12-31 18:45:55 +00:00
rubidium
7cd923ac31 (svn r24875) -Fix: grammatical error (Superuser) 2012-12-30 22:13:59 +00:00
rubidium
f1b6201a73 (svn r24874) -Fix: Incorrect Romanian own name 2012-12-30 18:50:37 +00:00
translators
7626165535 (svn r24873) -Update from WebTranslator v3.0:
bulgarian - 13 changes by Tvel
simplified_chinese - 31 changes by xiangyigao
czech - 16 changes by Eskymak
danish - 48 changes by Knogle
english_AU - 1 changes by Rubidium
english_US - 1 changes by Rubidium
estonian - 22 changes by runekri3
icelandic - 145 changes by Stimrol
indonesian - 9 changes by fanioz
korean - 116 changes by telk5093
norwegian_bokmal - 148 changes by Inspirion, cuthbert
polish - 7 changes by wojteks86
slovenian - 64 changes by gligoran
tamil - 157 changes by aswn
2012-12-30 18:46:18 +00:00
rubidium
713890b780 (svn r24872) -Fix: typo in English (Stimrol) 2012-12-30 07:12:42 +00:00
translators
3997924f57 (svn r24871) -Update from WebTranslator v3.0:
arabic_egypt - 44 changes by kasakg
catalan - 33 changes by Bassals
english_AU - 311 changes by mrtux
finnish - 4 changes by jpx_
hungarian - 6 changes by alyr
icelandic - 4 changes by Stimrol
indonesian - 1 changes by fanioz
korean - 1 changes by telk5093
latvian - 36 changes by Parastais
norwegian_bokmal - 70 changes by Inspirion, cuthbert
polish - 1 changes by wojteks86
2012-12-29 18:49:17 +00:00
rubidium
945469f993 (svn r24870) -Change: make the duplicate base set message slightly more verbose, and mention files with wrong md5 checksums or files that are missing explicitly 2012-12-29 10:35:33 +00:00
rubidium
745d71a632 (svn r24869) -Fix [FS#5411]: Unify the way maglev is written 2012-12-28 21:36:24 +00:00
606e9d5659 (svn r24868) -Fix (r24797): Update VS projects to include Basque translation. 2012-12-28 21:15:19 +00:00
translators
a81404dcf6 (svn r24867) -Update from WebTranslator v3.0:
belarusian - 40 changes by KorneySan
greek - 9 changes by Evropi
indonesian - 51 changes by fanioz
polish - 29 changes by wojteks86
russian - 2 changes by KorneySan
2012-12-28 18:45:30 +00:00
translators
01dfcd1cbd (svn r24866) -Update from WebTranslator v3.0:
catalan - 39 changes by Bassals
simplified_chinese - 2 changes by chenwt0315
croatian - 8 changes by VoyagerOne
danish - 6 changes by Hatsen
dutch - 40 changes by habell
english_US - 7 changes by Rubidium
french - 7 changes by glx
greek - 3 changes by Evropi
italian - 7 changes by lorenzodv
korean - 7 changes by telk5093
norwegian_bokmal - 8 changes by Inspirion
polish - 10 changes by wojteks86
portuguese - 81 changes by SupSuper
romanian - 35 changes by kneekoo
russian - 7 changes by KorneySan
slovak - 1 changes by JamesSVK
2012-12-27 18:46:23 +00:00
translators
872ad0aab3 (svn r24865) -Update from WebTranslator v3.0:
czech - 67 changes by Eskymak
finnish - 7 changes by jpx_
german - 7 changes by planetmaker
spanish - 7 changes by Terkhen
2012-12-26 18:45:24 +00:00
frosch
e7dd182d1d (svn r24864) -Fix (r24863): Update before running sed. 2012-12-26 17:59:44 +00:00
frosch
2161747eb7 (svn r24863) -Remove: Now redundant method to filter for non-local settings differing from default settings. 2012-12-26 17:48:25 +00:00
frosch
c4c3d00578 (svn r24862) -Add: Settings type filter to adv. settings GUI. 2012-12-26 17:47:02 +00:00
frosch
dbe46698ff (svn r24861) -Codechange: Put all filters for settings into a single struct. 2012-12-26 17:44:42 +00:00
frosch
0efd29b71b (svn r24860) -Codechange: Add SettingDesc::GetType(). 2012-12-26 17:43:35 +00:00
frosch
9bce12a0ce (svn r24859) -Codechange: Make the dropdown handling of the adv. settings GUI more generic. 2012-12-26 17:42:29 +00:00
frosch
24e62f39e0 (svn r24858) -Fix [FS#5404]: Make invalid sprite references to mapgen sprites behave the same as invalid references between recolour and real sprites. 2012-12-26 15:14:37 +00:00
frosch
e9afedca14 (svn r24857) -Fix: Don't let UFOs and coal mines clear water. 2012-12-26 13:01:28 +00:00
frosch
b48c4c800b (svn r24856) -Fix [FS#5406]: Don't let UFOs and coal mines destroy depots. 2012-12-26 13:01:09 +00:00
michi_cc
799a745099 (svn r24855) -Fix [FS#5405]: Don't send aircraft to depots that are out of range of the next destination. 2012-12-26 12:45:19 +00:00
frosch
1e30884201 (svn r24854) -Fix (r24839): Only consider vehicles available in the climate for purchase/depot cell size. 2012-12-26 12:24:03 +00:00
1ef4f7712d (svn r24853) -Fix: Extend widget data member to 32 bits so that sprite IDs >= 2^16 can be used. 2012-12-25 22:10:43 +00:00
translators
629efeedb4 (svn r24852) -Update from WebTranslator v3.0:
simplified_chinese - 64 changes by chenwt0315
italian - 14 changes by lorenzodv
korean - 33 changes by telk5093
2012-12-25 18:45:18 +00:00
frosch
75a0cba171 (svn r24850) -Update: Status report to santa. 2012-12-24 19:20:20 +00:00
translators
e1807eff3d (svn r24849) -Update from WebTranslator v3.0:
catalan - 1 changes by Bassals
croatian - 33 changes by VoyagerOne
english_US - 33 changes by Rubidium
finnish - 33 changes by jpx_
french - 33 changes by glx
german - 51 changes by planetmaker
italian - 33 changes by Snail_
russian - 33 changes by Lone_Wolf
spanish - 33 changes by Terkhen
vietnamese - 34 changes by myquartz
2012-12-24 18:45:59 +00:00
frosch
59951051a0 (svn r24848) -Fix [FS#5386]: Consider regearing-like cargos as no-cargo in cargo filters. 2012-12-23 22:12:52 +00:00
frosch
0ca14df566 (svn r24847) -Cleanup (r24750): Remove unused strings. 2012-12-23 21:25:05 +00:00
frosch
3ce8d2ce70 (svn r24846) -Add: Advanced settings to disable certain sound effects. 2012-12-23 21:09:09 +00:00
frosch
345c3203d7 (svn r24845) -Add: News ticker sound setting to adv. settings window. 2012-12-23 21:08:42 +00:00
frosch
bc84f30fc1 (svn r24844) -Add: News display settings to adv. settings window. 2012-12-23 21:08:02 +00:00
frosch
21b43b63f5 (svn r24843) -Codechange: Move news display options into the general settings framework. (based on patch by eagle_rainbow) 2012-12-23 21:07:12 +00:00
frosch
647ee0de64 (svn r24842) -Remove: News settings window. 2012-12-23 21:06:37 +00:00
translators
147d5264e3 (svn r24841) -Update from WebTranslator v3.0:
belarusian - 36 changes by Wowanxm
italian - 1 changes by Snail_
swedish - 25 changes by Joel_A
2012-12-23 18:45:17 +00:00
fb58c42aa0 (svn r24840) -Fix: Draw NewGRF railtypes in NewGRF station previews. 2012-12-23 15:38:54 +00:00
michi_cc
245e32a10e (svn r24839) -Feature [FS#5271]: [NewGRF] Support oversized purchase list sprites. (Based on patch by Eddi) 2012-12-23 01:00:25 +00:00
translators
c41027fbae (svn r24838) -Update from WebTranslator v3.0:
belarusian - 1 changes by KorneySan
catalan - 1 changes by Bassals
croatian - 1 changes by VoyagerOne
korean - 1 changes by telk5093
swedish - 5 changes by Joel_A
2012-12-22 18:45:42 +00:00
michi_cc
0d331c8d8e (svn r24837) -Fix: Don't consider blocked rail station tiles that display wires as non-reachable for masking out unnecessary catenary wires. 2012-12-21 18:51:10 +00:00
michi_cc
cf570106a6 (svn r24836) -Feature(ette): Improve pylon placement around station tiles that display neither pylons nor catenary. 2012-12-21 18:51:06 +00:00
translators
caae927872 (svn r24835) -Update from WebTranslator v3.0:
simplified_chinese - 47 changes by chenwt0315
2012-12-21 18:45:08 +00:00
michi_cc
01566d6816 (svn r24834) -Fix [FS#5396]: The autorefit dropdown in the order GUI wasn't always updated when modifying vehicle consists. 2012-12-20 19:44:06 +00:00
michi_cc
c75962e04c (svn r24833) -Codechange: Replace magic numbers for invalidating vehicle-related windows with an enum. 2012-12-20 19:44:02 +00:00
michi_cc
8eb1cb4ebb (svn r24832) -Fix [FS#5397]: [NewGRF] Take bridge speed limits into account for vehicle variable 4C. 2012-12-20 19:43:58 +00:00
michi_cc
0ef3ce8c08 (svn r24831) -Fix [FS#5398]: [NewGRF] Incorrect values are better than a crash when a NewGRF queries vehicle variable 4C before vehicle initialisation is completed. 2012-12-20 19:43:54 +00:00
translators
403e19d36f (svn r24830) -Update from WebTranslator v3.0:
turkish - 5 changes by niw3
2012-12-20 18:45:06 +00:00
zuu
ff465245fa (svn r24829) -Codechange: Reduce code duplication in the goal GUI 2012-12-20 18:35:13 +00:00
frosch
e428952110 (svn r24828) -Change: For dedicated servers without blitter ignore the spritecache size setting and always use the minimum. 2012-12-19 19:31:18 +00:00
translators
5e7f979375 (svn r24827) -Update from WebTranslator v3.0:
lithuanian - 25 changes by mtxd
turkish - 48 changes by niw3
2012-12-19 18:45:14 +00:00
glx
510fe5f196 (svn r24826) -Fix: determineversion.vbs could hang in a git checkout 2012-12-19 02:42:25 +00:00
translators
f54e74a512 (svn r24825) -Update from WebTranslator v3.0:
dutch - 1 changes by habell
malay - 3 changes by richz
2012-12-18 18:45:15 +00:00
translators
8015359894 (svn r24824) -Update from WebTranslator v3.0:
italian - 1 changes by lorenzodv
korean - 83 changes by telk5093
spanish - 1 changes by Terkhen
2012-12-17 18:45:40 +00:00
translators
1371ea73f8 (svn r24823) -Update from WebTranslator v3.0:
finnish - 1 changes by jpx_
2012-12-16 18:45:16 +00:00
translators
263976b53b (svn r24822) -Update from WebTranslator v3.0:
catalan - 1 changes by arnau
english_US - 1 changes by Rubidium
french - 1 changes by glx
greek - 4 changes by kyrm
polish - 1 changes by wojteks86
russian - 1 changes by Lone_Wolf
2012-12-15 18:45:32 +00:00
frosch
d7e9c8efed (svn r24821) -Add: When using a non-release version of OpenTTD and the basegraphics are missing some sprites, also suggest to use a non-release version of the basegraphics. 2012-12-14 20:38:02 +00:00
translators
7ec5395832 (svn r24820) -Update from WebTranslator v3.0:
czech - 7 changes by TheLamer
polish - 5 changes by wojteks86
2012-12-14 18:45:14 +00:00
translators
144ea2b958 (svn r24819) -Update from WebTranslator v3.0:
basque - 3 changes by lutxiketa
malay - 51 changes by richz
polish - 3 changes by wojteks86
russian - 1 changes by Lone_Wolf
2012-12-13 18:45:23 +00:00
translators
d8e5a2acb4 (svn r24818) -Update from WebTranslator v3.0:
catalan - 2 changes by arnau
korean - 16 changes by telk5093
malay - 113 changes by richz
2012-12-12 18:45:24 +00:00
translators
a887571d4c (svn r24817) -Update from WebTranslator v3.0:
basque - 9 changes by lutxiketa
croatian - 2 changes by VoyagerOne
french - 2 changes by glx
greek - 18 changes by Evropi
malay - 25 changes by richz
polish - 24 changes by wojteks86
2012-12-11 18:45:54 +00:00
translators
d9b0ef78c1 (svn r24816) -Update from WebTranslator v3.0:
basque - 50 changes by lutxiketa
belarusian - 2 changes by KorneySan
dutch - 22 changes by habell
greek - 118 changes by Evropi
italian - 2 changes by lorenzodv
malay - 17 changes by richz
maltese - 24 changes by Drinu276
norwegian_bokmal - 8 changes by lenhoy
polish - 36 changes by wojteks86
russian - 2 changes by KorneySan
swedish - 6 changes by Joel_A
vietnamese - 70 changes by myquartz
2012-12-10 18:46:25 +00:00
translators
5cf28ec3b1 (svn r24815) -Update from WebTranslator v3.0:
english_US - 2 changes by Rubidium
finnish - 2 changes by jpx_
spanish - 2 changes by Terkhen
2012-12-09 18:45:17 +00:00
frosch
a155a51a18 (svn r24814) -Fix (r24810): Update AI regression. 2012-12-09 17:09:24 +00:00
frosch
f93602aec9 (svn r24813) -Change: Offer engine previews only to companies which actually use the particular vehicle-type/cargo-type combination. 2012-12-09 16:55:57 +00:00
frosch
51fca5eec7 (svn r24812) -Fix: Close pending preview windows when the engine is introduced to everyone. 2012-12-09 16:55:38 +00:00
frosch
5c358c4173 (svn r24811) -Add: Close engine preview window when another client accepts it. 2012-12-09 16:55:21 +00:00
frosch
0e4b212c45 (svn r24810) -Fix: Make engine preview offers more robust wrt. changes in the company ranking. 2012-12-09 16:55:03 +00:00
frosch
2bb54f09d8 (svn r24809) -Feature(ette) [FS#2632]: Consider engine preview windows always sticky, so non-shift mass-closure does not affect them. 2012-12-09 16:54:23 +00:00
frosch
8872ed12ff (svn r24808) -Feature(ette) [FS#4458]: When share-cloning vehicles don't open the vehicle window of the new vehicle. The only reasonable thing to do with the new vehicle is to start it, which can also be done via the depot GUI. 2012-12-09 16:54:02 +00:00
frosch
870eab53d2 (svn r24807) -Add [FS#2820]: Enable usage of 'companies' console command also in singleplayer. 2012-12-09 16:53:41 +00:00
frosch
04a24969ea (svn r24806) -Feature [FS#3148]: Ask for confirmation before creating giant screenshots. 2012-12-09 16:53:21 +00:00
frosch
fccf0ac84d (svn r24805) -Codechange: Refactor determination of screenshot viewport for world screenshots. 2012-12-09 16:53:01 +00:00
frosch
edd9c0553a (svn r24804) -Add: Separate subdirectory for screenshots. 2012-12-09 16:52:43 +00:00
translators
1c71fbe0f0 (svn r24803) -Update from WebTranslator v3.0:
basque - 82 changes by lutxiketa
latvian - 9 changes by Parastais
spanish - 66 changes by Terkhen
ukrainian - 1 changes by edd_k
2012-12-08 18:45:27 +00:00
frosch
7091f6640b (svn r24802) -Fix [FS#4224]: When displaying the previous news message, don't consider news which are turned off. 2012-12-08 17:19:09 +00:00
frosch
b533523258 (svn r24801) -Codechange: Add functions to set integral DParams to suitable values for size computations. 2012-12-08 17:18:51 +00:00
frosch
18a5ba4ad7 (svn r24800) -Fix [FS#5327] (r21933): Glitch in timetable GUI. (sbr) 2012-12-08 17:18:30 +00:00
translators
dbcc8138d1 (svn r24799) -Update from WebTranslator v3.0:
basque - 134 changes by lutxiketa
croatian - 66 changes by VoyagerOne
2012-12-07 18:45:13 +00:00
translators
ef4ead5c9f (svn r24798) -Update from WebTranslator v3.0:
basque - 374 changes by lutxiketa
catalan - 66 changes by arnau
finnish - 1 changes by jpx_
italian - 1 changes by lorenzodv
russian - 8 changes by Lone_Wolf
ukrainian - 1 changes by Norby89
2012-12-07 15:34:09 +00:00
rubidium
8726b745e6 (svn r24797) -Change: upgrade Basque from unfinished to (nearly) finished translation 2012-12-06 22:22:40 +00:00
translators
392cfb3c6c (svn r24796) -Update from WebTranslator v3.0:
basque - 272 changes by lutxiketa
belarusian - 37 changes by KorneySan
dutch - 42 changes by habell
english_US - 66 changes by Rubidium
finnish - 66 changes by jpx_
french - 61 changes by glx
german - 36 changes by planetmaker
greek - 11 changes by Evropi
italian - 36 changes by lorenzodv
russian - 46 changes by KorneySan
ukrainian - 66 changes by Norby89
2012-12-06 18:46:10 +00:00
frosch
d8fb8e6cfc (svn r24795) -Fix (r24789): Unfinished patch. 2012-12-05 19:58:38 +00:00
frosch
d41f8bfb9d (svn r24794) -Change: Unify capitalisation in advanced settings dropdowns. 2012-12-05 19:40:07 +00:00
frosch
74ad6012ca (svn r24793) -Change: Move script opcodes setting from Economy to AI settings. 2012-12-05 19:39:48 +00:00
frosch
6bb43a6561 (svn r24792) -Add: Readd difficulty settings to advanced settings unless they are already present in other settings windows. 2012-12-05 19:38:44 +00:00
frosch
ff6880f9dd (svn r24791) -Remove: Difficulty settings window. 2012-12-05 19:37:15 +00:00
frosch
d1ab0f03bc (svn r24790) -Remove: Classic difficulty profiles. 2012-12-05 19:36:41 +00:00
frosch
812ae4140a (svn r24789) -Add: Separate setting to control the default settings of newly added scripts and random AIs. 2012-12-05 19:36:04 +00:00
frosch
e43bf5dabd (svn r24788) -Change: Detach script settings from difficulty settings. Always allow changing all script settings without setting difficulty to custom. 2012-12-05 19:35:38 +00:00
frosch
22dc45738d (svn r24787) -Fix: Unify checks for editability of settings. 2012-12-05 19:35:09 +00:00
frosch
a499435351 (svn r24786) -Codechange: Add SettingsProfile enum for difficulty profiles and highscore tables. 2012-12-05 19:34:45 +00:00
frosch
5b2da98ca3 (svn r24785) -Add: Various methods to open the OSK. (based on patch by Eagle_rainbow) 2012-12-05 19:34:25 +00:00
translators
b3bd33adfb (svn r24784) -Update from WebTranslator v3.0:
basque - 778 changes by lutxiketa
czech - 21 changes by Eskymak
german - 1 changes by planetmaker
2012-12-05 18:45:21 +00:00
translators
72b2f3fc2f (svn r24783) -Update from WebTranslator v3.0:
basque - 825 changes by lutxiketa
danish - 7 changes by Hellwing
2012-12-04 18:45:12 +00:00
michi_cc
2caa80f751 (svn r24782) -Codechange: [Win32] Disable MSVC warning about using 'this' in a base member initializer list as we don't use it in any problematic way. 2012-12-03 22:08:03 +00:00
michi_cc
02f39ab1ee (svn r24781) -Fix (r24762): [Win32] MinGW compiler warning. 2012-12-03 22:08:00 +00:00
glx
5d74b679e6 (svn r24780) -Fix [FS#5378]: passing an int to a function expecting a byte can have side effects when MSVC optimises it 2012-12-03 21:03:13 +00:00
translators
efd6e29b52 (svn r24779) -Update from WebTranslator v3.0:
basque - 87 changes by lutxiketa
2012-12-03 18:45:05 +00:00
translators
bcaccf8c58 (svn r24778) -Update from WebTranslator v3.0:
basque - 20 changes by lutxiketa
greek - 115 changes by Evropi
lithuanian - 1 changes by Stabilitronas
luxembourgish - 53 changes by Phreeze
2012-12-02 18:45:22 +00:00
translators
f735705403 (svn r24777) -Update from WebTranslator v3.0:
basque - 37 changes by lutxiketa
catalan - 4 changes by Bassals, arnau
greek - 6 changes by Evropi
korean - 6 changes by telk5093
ukrainian - 9 changes by edd_k
2012-12-01 18:45:29 +00:00
alberth
732e073261 (svn r24776) -Doc: Typo fixes, additions, and additional dots collected from various sources (including Eagle_rainbow, MinchinWeb) 2012-12-01 13:12:39 +00:00
translators
01d023ad3b (svn r24775) -Update from WebTranslator v3.0:
belarusian - 2 changes by Wowanxm
greek - 19 changes by Evropi
italian - 1 changes by lorenzodv
latvian - 1 changes by Parastais
lithuanian - 31 changes by 
spanish - 1 changes by Terkhen
2012-11-29 18:45:34 +00:00
frosch
5dfd5e58ee (svn r24774) -Fix: Invert the focus handling of the OSK. Keep the focus at the OSK and close it on losing focus. This makes the editbox in the OSK behave correctly. 2012-11-28 21:14:28 +00:00
frosch
bfba90f864 (svn r24773) -Fix: Shift in the OSK behaved like capslock. 2012-11-28 21:03:34 +00:00
frosch
155a9d784c (svn r24772) -Codechange: Call Window::OnEditboxChanged only when the content changes, not when only moving the cursor. 2012-11-28 20:54:56 +00:00
translators
4c0671f65a (svn r24771) -Update from WebTranslator v3.0:
basque - 17 changes by lutxiketa
belarusian - 6 changes by KorneySan
croatian - 6 changes by VoyagerOne
dutch - 1 changes by habell
english_US - 1 changes by Rubidium
finnish - 1 changes by jpx_
greek - 36 changes by Evropi
lithuanian - 31 changes by 
polish - 1 changes by wojteks86
russian - 1 changes by Lone_Wolf
2012-11-28 18:45:54 +00:00
frosch
4e8f3f7a99 (svn r24770) -Fix-ish: Calling GUIList::Sort repeatedly has no use without GUIList::NeedResort since the latter has the sideeffects. 2012-11-27 21:54:11 +00:00
frosch
507de921c2 (svn r24769) -Feature [FS#3852]: Add a string filter to the server list. (Eagle_rainbow) 2012-11-27 21:35:52 +00:00
frosch
b884195400 (svn r24768) -Fix: Adjust a comment to reflect some more truth. 2012-11-27 21:30:44 +00:00
frosch
9aeeb5acb9 (svn r24767) -Codechange: Remove some fragile hacks from the multiplayer list who tried to disguised themself as optimisations. 2012-11-27 21:21:01 +00:00
translators
b5674ea9fa (svn r24766) -Update from WebTranslator v3.0:
basque - 51 changes by lutxiketa
catalan - 5 changes by arnau
dutch - 5 changes by habell
english_US - 5 changes by Rubidium
esperanto - 11 changes by Joncst
french - 11 changes by gromlin
italian - 5 changes by lorenzodv
latvian - 5 changes by Parastais
lithuanian - 46 changes by Stabilitronas
polish - 5 changes by wojteks86
portuguese - 8 changes by skkeeper
2012-11-27 18:45:56 +00:00
translators
dd927f0c47 (svn r24765) -Update from WebTranslator v3.0:
basque - 2 changes by lutxiketa
belarusian - 32 changes by Wowanxm
finnish - 5 changes by jpx_
german - 5 changes by planetmaker
japanese - 1 changes by nex259
korean - 4 changes by telk5093
portuguese - 23 changes by skkeeper
russian - 5 changes by Lone_Wolf
spanish - 5 changes by Terkhen
2012-11-25 18:45:48 +00:00
alberth
a2b07adf43 (svn r24764) -Change: Disable horizontal resizing of the industry chain window, it's not useful. 2012-11-25 15:31:45 +00:00
alberth
fb892f4b20 (svn r24763) -Feature: Add industry type and cargo dropdown selection for easier navigating in the industry chain window. 2012-11-25 15:24:02 +00:00
michi_cc
e67c717c2f (svn r24762) -Fix [FS#5359]: [Win32] Don't crash when switching to an unsupported fullscreen display mode (like 8 bpp modes in Windows 8). 2012-11-25 12:14:13 +00:00
translators
1791551391 (svn r24761) -Update from WebTranslator v3.0:
german - 2 changes by planetmaker
lithuanian - 48 changes by Stabilitronas
2012-11-24 18:45:16 +00:00
translators
3f7148c313 (svn r24760) -Update from WebTranslator v3.0:
latvian - 1 changes by Parastais
2012-11-23 18:45:08 +00:00
translators
6d2a516224 (svn r24759) -Update from WebTranslator v3.0:
catalan - 1 changes by Bassals
2012-11-21 18:45:08 +00:00
translators
c172f453fc (svn r24758) -Update from WebTranslator v3.0:
greek - 2 changes by Evropi
2012-11-20 18:45:09 +00:00
rubidium
dc400eff35 (svn r24757) -Fix: broken Greek translation 2012-11-19 19:32:45 +00:00
translators
a15b4d6525 (svn r24756) -Update from WebTranslator v3.0:
korean - 8 changes by telk5093
romanian - 20 changes by kkmic
swedish - 1 changes by Joel_A
2012-11-19 18:46:23 +00:00
translators
7e06aaa84b (svn r24755) -Update from WebTranslator v3.0:
greek - 105 changes by Evropi
hungarian - 2 changes by IPG
lithuanian - 11 changes by Stabilitronas
swedish - 1 changes by Joel_A
2012-11-18 18:45:23 +00:00
rubidium
3a40a0f1e8 (svn r24754) -Fix [FS#5367]: crash on corrupted savegame 2012-11-18 16:14:31 +00:00
translators
fe1079cfc6 (svn r24753) -Update from WebTranslator v3.0:
catalan - 5 changes by Bassals, arnau
spanish - 1 changes by Terkhen
2012-11-17 18:45:13 +00:00
translators
10d81247f8 (svn r24752) -Update from WebTranslator v3.0:
catalan - 1 changes by Bassals
croatian - 3 changes by VoyagerOne
brazilian_portuguese - 22 changes by Tucalipe
swedish - 2 changes by Joel_A
2012-11-16 18:45:22 +00:00
translators
6e695ff838 (svn r24751) -Update from WebTranslator v3.0:
norwegian_bokmal - 13 changes by jhsoby
romanian - 36 changes by kkmic
swedish - 1 changes by Joel_A
2012-11-15 18:45:23 +00:00
frosch
06054d7a9d (svn r24750) -Cleanup: Remove old special clear filter button from signs list. 2012-11-14 22:51:05 +00:00
frosch
d5a798033a (svn r24749) -Add: GUI icons for delete to the left/right. 2012-11-14 22:51:01 +00:00
frosch
5e8238c75c (svn r24748) -Add: Clear button to all editboxes. 2012-11-14 22:50:56 +00:00
frosch
545b6de900 (svn r24747) -Fix: Some editboxes had a different colour than the rest of the window. 2012-11-14 22:50:53 +00:00
frosch
aed11012d4 (svn r24746) -Cleanup: Remove weird lowering of editboxes. 2012-11-14 22:50:49 +00:00
frosch
1b3e8a8af6 (svn r24745) -Codechange: Draw complete editbox via QueryString. 2012-11-14 22:50:46 +00:00
frosch
c8c040d057 (svn r24744) -Codechange: Handle clicking on editboxed also via QueryString. 2012-11-14 22:50:42 +00:00
frosch
c283a41248 (svn r24743) -Change: Unify the behaviour of ESC in filter editboxes. 2012-11-14 22:50:39 +00:00
frosch
f5d8ba5d7f (svn r24742) -Codechange: Remove QueryStringBaseWindow and store QueryStrings per widget instead. 2012-11-14 22:50:35 +00:00
frosch
dcfb2af871 (svn r24741) -Add: Const-methods to SmallMap. 2012-11-14 22:50:30 +00:00
frosch
6e6d94a2d1 (svn r24740) -Codechange: Remove duplicate members from QueryStringBaseWindow and directly use QueryString. 2012-11-14 22:50:26 +00:00
frosch
6653ac6b36 (svn r24739) -Codechange: Simplify some code by using Textbuf::Assign. 2012-11-14 22:50:21 +00:00
frosch
f6d4200f86 (svn r24738) -Codechange: Remove Textbuf::Initialize in favour of a constructor. 2012-11-14 22:50:17 +00:00
frosch
0ea2152355 (svn r24737) -Add: Textbuf::Assign and Textbuf::Print. 2012-11-14 22:50:11 +00:00
frosch
f2221e8b89 (svn r24736) -Cleanup: The third parameter of Textbuf::Initialize only makes sense if it is smaller than the second one, also its unit is not pixels. 2012-11-14 22:46:49 +00:00
frosch
fc2b12acca (svn r24735) -Codechange: Move HandleEditBoxKey to Window class. 2012-11-13 21:47:13 +00:00
frosch
2c22fe98dd (svn r24734) -Codechange: Move QueryStringBaseWindow::OnOSKInput to Window::OnEditboxChanged. 2012-11-13 21:47:07 +00:00
frosch
c4d7c8dd42 (svn r24733) -Codechange: Move handling of editbox keys to window class. 2012-11-13 21:47:02 +00:00
frosch
7699a7dc06 (svn r24732) -Codechange: Unify handling of OK and CANCEL actions for editboxes. 2012-11-13 21:46:58 +00:00
frosch
fd55399167 (svn r24731) -Codechange: Remove OnOpenOSKWindow and instead specify OK and CANCEL buttons via QueryString members. 2012-11-13 21:46:54 +00:00
frosch
67f92f16ed (svn r24730) -Codechange: Allow OSK to simulate widget buttons with index 0. 2012-11-13 21:46:50 +00:00
frosch
6d1fe626f5 (svn r24729) -Codechange: Unify the handling of HEBR_EDITING. 2012-11-13 21:46:46 +00:00
frosch
336fcbc50e (svn r24728) -Codechange: Unify usage of OnOSKInput. 2012-11-13 21:46:40 +00:00
frosch
1071d51508 (svn r24727) -Fix: In various windows the OSK looked shiny but using it had no effect whatsoever. 2012-11-13 21:46:37 +00:00
frosch
137adb3496 (svn r24726) -Codechange: Move editbox mouseloop handling to Window class. 2012-11-13 21:46:33 +00:00
frosch
2614ed18f9 (svn r24725) -Cleanup: Remove old editbox focus code which is already handled more generally. 2012-11-13 21:46:22 +00:00
frosch
17025fa6ea (svn r24724) -Codechange: Move drawing of editboxes to the widget drawing code. 2012-11-13 21:46:19 +00:00
frosch
8cd77b6f6e (svn r24723) -Fix: AI debug GUI crashed when using disabled buttons via hotkeys. 2012-11-13 21:46:14 +00:00
frosch
4aa17c5109 (svn r24722) -Add: Display unique ID and md5sum in console content info. 2012-11-13 21:46:09 +00:00
frosch
eb56e60e94 (svn r24721) -Fix (r24715): Reallow building road stations. 2012-11-13 21:41:54 +00:00
frosch
b518f1342c (svn r24720) -Fix (r24715): Comparison of different height units. 2012-11-13 21:40:50 +00:00
translators
752382ecd8 (svn r24719) -Update from WebTranslator v3.0:
luxembourgish - 122 changes by Phreeze
tamil - 12 changes by aswn
2012-11-13 18:45:11 +00:00
frosch
883f9bec9b (svn r24718) -Codechange: Rename GoodsEntry::days_since_pickup to GoodsEntry::time_since_pickup. 2012-11-12 21:59:02 +00:00
frosch
ce87b8fc63 (svn r24717) -Fix [FS#5139]: When starting a scenario apply the local company settings to the new company. 2012-11-12 20:14:08 +00:00
frosch
4471f6bca8 (svn r24716) -Feature(ette): Reset engine pool when starting a scenario. 2012-11-12 20:13:51 +00:00
frosch
96540079e7 (svn r24715) -Fix [FS#5335]: [NewGRF] Allow stations to draw snow/desert aware ground sprites with railtype overlays. 2012-11-12 20:13:34 +00:00
frosch
f3be01c26f (svn r24714) -Fix [FS#5337]: [NewGRF] Draw default foundations if resolving of custom station foundation sprites fails. 2012-11-12 20:13:17 +00:00
frosch
0a4fe02a47 (svn r24713) -Fix [FS#5262]: [NewGRF] Tolerate old NewGRFs returning invalid values via CB 11. 2012-11-12 20:13:02 +00:00
frosch
160aa435da (svn r24712) -Fix [FS#5303]: [NewGRF] Station variables 61 and 62 returned incorrect values, if no vehicle ever tried loading. 2012-11-12 20:12:45 +00:00
frosch
e888f9da9f (svn r24711) -Fix (r10354): Check whether to not display a ^ loading indicator at drop stations only worked if there was no other vehicle unloading for 255 ticks. 2012-11-12 20:12:26 +00:00
translators
f575f2c694 (svn r24710) -Update from WebTranslator v3.0:
indonesian - 42 changes by adjayanto
2012-11-12 18:45:07 +00:00
frosch
9f43908d08 (svn r24709) -Codechange: Simplify some code. 2012-11-12 18:11:46 +00:00
frosch
0566b29ab7 (svn r24708) -Codechange: Check magic values of GoodsEntry::last_speed only via wrapper function. 2012-11-12 18:11:26 +00:00
frosch
03c94ae6a3 (svn r24707) -Doc: Improve description of GoodsEntryStatus flags. 2012-11-12 18:11:05 +00:00
frosch
f7fdcc00e5 (svn r24706) -Fix (r10981): [NewGRF] Station var 48 should report acceptance, not supply. 2012-11-12 18:10:42 +00:00
frosch
56e63338ed (svn r24705) -Fix: Station rating might consider very old vehicles very young. 2012-11-12 18:10:21 +00:00
frosch
a2980378ff (svn r24704) -Cleanup: No need to initialise stuff twice. 2012-11-12 18:10:02 +00:00
frosch
e6459a91dd (svn r24703) -Fix: Disallow closing oilrig airports in SE. 2012-11-12 18:09:33 +00:00
translators
941f51f0e5 (svn r24702) -Update from WebTranslator v3.0:
norwegian_bokmal - 1 changes by jhsoby
2012-11-11 18:45:07 +00:00
smatz
75e20fd02b (svn r24701) -Fix [FS#5246]: Workaround an overoptimisation done by GCC 4.5 2012-11-11 17:39:54 +00:00
frosch
03736af2ae (svn r24700) -Cleanup: Remove WDF_UNCLICK_BUTTONS and make it the default. 2012-11-11 16:10:43 +00:00
frosch
cd55253865 (svn r24699) -Codechange: Proper usage of push and toggle buttons in mapgen and script debug GUI. 2012-11-11 16:10:11 +00:00
frosch
2e368bfb9f (svn r24698) -Codechange: Use PUSH-buttons when buttons can be pushed. 2012-11-11 16:09:08 +00:00
frosch
b998cbdff1 (svn r24697) -Codechange: Use WDF_UNCLICK_BUTTONS instead of duplicating the same functionality. 2012-11-11 16:07:46 +00:00
frosch
cfccaff645 (svn r24696) -Doc: Improve documentation for button widget types. 2012-11-11 16:01:34 +00:00
frosch
b65ece1ea9 (svn r24695) -Fix/Cleanup: Remove remaining (incorrect) usages of ResolverObject::scope and count. 2012-11-11 12:57:27 +00:00
michi_cc
55cff8407f (svn r24694) -Fix (r18136): Road vehicle selection frame wasn't drawn properly in the depot window. 2012-11-10 22:37:14 +00:00
alberth
33ff55a8f1 (svn r24693) -Doc: Add some doxymentation into the newgrf code. 2012-11-10 20:46:39 +00:00
alberth
4c9bea2a71 (svn r24692) -Cleanup: Cleanup final parts of the old resolver code. 2012-11-10 20:45:59 +00:00
alberth
69e07c3e00 (svn r24691) -Codechange: Add resolver classes for vehicles. 2012-11-10 20:45:04 +00:00
alberth
e087503fd6 (svn r24690) -Codechange: Add resolver classes for industry tiles. 2012-11-10 20:44:38 +00:00
alberth
f7352871fa (svn r24689) -Codechange: Add resolver classes for industries. 2012-11-10 20:44:10 +00:00
alberth
348ef7f12c (svn r24688) -Codechange: Add resolver classes for generics. 2012-11-10 20:43:40 +00:00
alberth
c83db1395b (svn r24687) -Codechange: Add resolver classes for airports. 2012-11-10 20:42:50 +00:00
alberth
37605108e1 (svn r24686) -Codechange: Add resolver classes for airport tiles. 2012-11-10 20:42:19 +00:00
alberth
82e6001451 (svn r24685) -Codechange: Add resolver classes for rail types. 2012-11-10 20:41:45 +00:00
alberth
c417efc962 (svn r24684) -Codechange: Add resolver classes for stations. 2012-11-10 20:41:08 +00:00
alberth
a9b8b22daf (svn r24683) -Codechange: Add resolver classes for objects. 2012-11-10 20:40:46 +00:00
alberth
d7b62da87b (svn r24682) -Codechange: Add resolver classes for houses. 2012-11-10 20:40:05 +00:00
alberth
0885a2370a (svn r24681) -Codechange: Add resolver classes for cargoes. 2012-11-10 20:39:39 +00:00
alberth
35cee8315a (svn r24680) -Codechange: Add resolver classes for canals. 2012-11-10 20:39:11 +00:00
alberth
b985c4c0f8 (svn r24679) -Codechange: Add resolver classes for towns. 2012-11-10 20:38:46 +00:00
alberth
438495b433 (svn r24678) -Codechange: Introduce scope resolver base class and prepare for adding derived classes. 2012-11-10 20:37:31 +00:00
translators
fa3d470a05 (svn r24677) -Update from WebTranslator v3.0:
danish - 13 changes by Knogle
korean - 3 changes by telk5093
latvian - 8 changes by Parastais
polish - 5 changes by wojteks86
russian - 1 changes by Lone_Wolf
spanish - 2 changes by Terkhen
tamil - 4 changes by aswn
2012-11-10 18:46:41 +00:00
translators
97ff26c3da (svn r24676) -Update from WebTranslator v3.0:
afrikaans - 4 changes by Maccie123
belarusian - 3 changes by KorneySan
catalan - 5 changes by arnau
english_US - 3 changes by Rubidium
italian - 3 changes by lorenzodv
norwegian_bokmal - 22 changes by jhsoby
polish - 15 changes by wojteks86
brazilian_portuguese - 20 changes by Tucalipe
russian - 3 changes by KorneySan
swedish - 12 changes by Joel_A
2012-11-09 18:45:58 +00:00
michi_cc
2c171f2f29 (svn r24675) -Fix (r24632): MSVC performance warning. 2012-11-08 21:46:54 +00:00
frosch
a443375d44 (svn r24674) -Fix (r24466, r23234) [FS#5358]: Downloaded heightmaps could not be used anymore. (sbr) 2012-11-08 21:41:00 +00:00
translators
1efd1ffa82 (svn r24673) -Update from WebTranslator v3.0:
dutch - 3 changes by habell
finnish - 3 changes by jpx_
latvian - 13 changes by Parastais
luxembourgish - 94 changes by Phreeze
2012-11-08 18:45:23 +00:00
frosch
dc930b6689 (svn r24672) -Add [FS#5356]: Remember the basic/advanced/expert filter selection. 2012-11-08 11:20:32 +00:00
frosch
69a62452be (svn r24671) -Feature [FS#5355]: Add basic/advanced/expert filters to adv. settings GUI. (Eagle_rainbow) 2012-11-08 10:04:00 +00:00
frosch
79a1e6450b (svn r24670) -Change: Drop 'signal density' from adv. settings GUI. It is more suited to be only changed via the signal GUI. 2012-11-08 10:02:09 +00:00
frosch
c27a026d17 (svn r24669) -Fix: Auto-expand advanced settings only when selecting a 'deviation' filter. 2012-11-08 09:58:37 +00:00
frosch
3e367cd087 (svn r24668) -Feature(ette) [FS#5311]: Draw cargo labels in the station list black or white depending on the background colour. (sbr) 2012-11-07 21:23:26 +00:00
translators
28c98de6d9 (svn r24667) -Update from WebTranslator v3.0:
latvian - 5 changes by Parastais
luxembourgish - 18 changes by Phreeze
spanish - 1 changes by Terkhen
2012-11-07 18:45:19 +00:00
translators
c312f04364 (svn r24666) -Update from WebTranslator v3.0:
latvian - 4 changes by Parastais
2012-11-06 18:45:08 +00:00
frosch
40c3cd46f1 (svn r24665) -Doc [FS#5353]: [Script] Add note about the compatibility aspects of the enums in ScriptWindow. 2012-11-05 20:03:17 +00:00
frosch
3252d41dcc (svn r24664) -Codechange: Add script to generate enums in script_window.hpp 2012-11-05 19:53:05 +00:00
frosch
d1c17394ec (svn r24663) -Codechange: Unify the naming of widget enums. 2012-11-05 19:45:45 +00:00
translators
9044138097 (svn r24662) -Update from WebTranslator v3.0:
croatian - 9 changes by VoyagerOne
german - 6 changes by planetmaker
spanish - 6 changes by Terkhen
2012-11-04 18:45:20 +00:00
translators
1f9fbf5287 (svn r24661) -Update from WebTranslator v3.0:
catalan - 6 changes by arnau
french - 9 changes by glx
korean - 29 changes by telk5093
2012-11-02 18:45:17 +00:00
yexo
3439769fef (svn r24660) -Feature: do not display the preview window for disabled vehicle types (Eagle_rainbow) 2012-11-01 22:42:29 +00:00
translators
cfc366847e (svn r24659) -Update from WebTranslator v3.0:
latvian - 3 changes by Parastais
russian - 1 changes by Lone_Wolf
2012-11-01 18:45:12 +00:00
rubidium
d365156633 (svn r24658) -Merge: release documentation updates from 1.2 2012-10-31 21:40:26 +00:00
alberth
f883454db2 (svn r24655) -Codechange(r18310): Difference between female and male is no longer needed for tie and earrings (found by botankras) 2012-10-31 20:54:19 +00:00
translators
8e37534093 (svn r24654) -Update from WebTranslator v3.0:
belarusian - 6 changes by KorneySan
italian - 6 changes by lorenzodv
latvian - 6 changes by Parastais
norwegian_bokmal - 14 changes by jhsoby
russian - 1 changes by KorneySan
ukrainian - 16 changes by edd_k
2012-10-31 18:45:33 +00:00
translators
bfe8dd7faa (svn r24651) -Update from WebTranslator v3.0:
dutch - 6 changes by habell
english_US - 6 changes by Rubidium
finnish - 6 changes by jpx_
norwegian_bokmal - 3 changes by jhsoby
russian - 5 changes by Lone_Wolf
2012-10-30 18:45:28 +00:00
yexo
73858a75b3 (svn r24650) -Fix (r24647, r24648): fixing logic errors is hard 2012-10-29 20:23:17 +00:00
yexo
c094371963 (svn r24649) -Fix (r24647): wrong version of strings got committed 2012-10-29 20:22:48 +00:00
yexo
c4fa82adba (svn r24648) -Fix (r24647): svn diff != || 2012-10-29 20:08:30 +00:00
yexo
23054a3ab5 (svn r24647) -Feature: add new filter option to the advanced settings window to show only changed settings (Eagle_rainbow) 2012-10-29 19:53:13 +00:00
translators
c6cf894017 (svn r24646) -Update from WebTranslator v3.0:
belarusian - 3 changes by KorneySan
dutch - 3 changes by habell
latvian - 3 changes by Parastais
2012-10-29 18:45:20 +00:00
rubidium
6247bdbdb4 (svn r24642) -Codechange: add helper function to see if there is anything in the send queue 2012-10-28 21:26:57 +00:00
rubidium
9db98f3b14 (svn r24638) -Codechange: add some #ifndefs so MSU code doesn't need to compile it, and doesn't need all the required dependencies 2012-10-28 19:16:58 +00:00
translators
f64d50ec26 (svn r24636) -Update from WebTranslator v3.0:
afrikaans - 98 changes by Oomjcv
catalan - 4 changes by arnau
czech - 18 changes by metis
finnish - 3 changes by jpx_
italian - 3 changes by lorenzodv
korean - 6 changes by telk5093
latvian - 5 changes by Parastais
russian - 3 changes by Lone_Wolf
spanish - 3 changes by Terkhen
tamil - 7 changes by aswn
2012-10-28 17:45:58 +00:00
translators
65cbf72e0f (svn r24634) -Update from WebTranslator v3.0:
afrikaans - 69 changes by Oomjcv
catalan - 35 changes by arnau
english_US - 3 changes by Rubidium
german - 8 changes by planetmaker
korean - 1 changes by telk5093
tamil - 25 changes by Rubidium, aswn
2012-10-27 17:45:31 +00:00
frosch
d33439721c (svn r24633) -Add: Autoexpand the adv. settings tree, if a filter term is entered immediately after opening the window without any manual expanding/collapsing. 2012-10-27 15:26:34 +00:00
frosch
2d550a7579 (svn r24632) -Feature: Add text filtering to advanced settings. 2012-10-27 15:26:17 +00:00
frosch
716014c410 (svn r24631) -Feature: Add buttons to expand/collapse all to advanced settings GUI. 2012-10-27 15:25:57 +00:00
translators
f020e87a79 (svn r24630) -Update from WebTranslator v3.0:
hungarian - 11 changes by IPG
2012-10-26 17:45:08 +00:00
zuu
cb01e4b496 (svn r24629) -Fix (r24628): Also update regression test 2012-10-25 20:05:04 +00:00
zuu
1f764f51f0 (svn r24628) -Fix: Document and enforce precondition start != end for ScriptRoad::RemoveRoad and ScriptRoad::RemoveRoadFull 2012-10-25 19:25:31 +00:00
translators
355790435e (svn r24627) -Update from WebTranslator v3.0:
catalan - 5 changes by arnau
tamil - 190 changes by aswn
2012-10-25 17:45:14 +00:00
terkhen
9b5ff794c7 (svn r24626) -Fix [FS#5432]: MSVC 2010 warnings. 2012-10-25 17:38:12 +00:00
translators
6094275312 (svn r24625) -Update from WebTranslator v3.0:
latvian - 24 changes by Parastais
norwegian_bokmal - 17 changes by jhsoby
tamil - 196 changes by aswn
2012-10-24 17:45:18 +00:00
translators
8a42aa78bd (svn r24624) -Update from WebTranslator v3.0:
afrikaans - 5 changes by Oomjcv
tamil - 119 changes by aswn
2012-10-23 17:45:12 +00:00
zuu
0826994821 (svn r24623) -Feature: Allow GameScripts to construct and prospect industries without having a sponsor 2012-10-22 18:56:21 +00:00
translators
59847550dc (svn r24622) -Update from WebTranslator v3.0:
afrikaans - 1 changes by Oomjcv
dutch - 7 changes by habell
2012-10-22 17:45:14 +00:00
translators
b37eedc29f (svn r24621) -Update from WebTranslator v3.0:
afrikaans - 47 changes by Oomjcv
catalan - 425 changes by Bassals, arnau
korean - 6 changes by telk5093
spanish - 5 changes by Terkhen
2012-10-21 17:45:23 +00:00
frosch
50806b5b3c (svn r24620) -Fix (r24619): Keep admin port API compatibility. 2012-10-21 09:15:57 +00:00
planetmaker
f2e94237fc (svn r24619) -Change: Check for bankruptcy on a monthly basis (ZxBioHazardZx) 2012-10-20 22:05:26 +00:00
planetmaker
b446780f01 (svn r24618) -Feature: Pay interest also on a negative cash value (ZxBioHazardZx) 2012-10-20 21:58:48 +00:00
planetmaker
4075b006a0 (svn r24617) -Change: Only bankrupt, if you have negative money considering you took max loan (ZxBiohazardZx) 2012-10-20 21:57:33 +00:00
translators
75866f38d9 (svn r24616) -Update from WebTranslator v3.0:
latvian - 3 changes by Parastais
spanish - 1 changes by Terkhen
2012-10-20 17:45:13 +00:00
terkhen
efb2ddf62a (svn r24615) -Feature [FS#5311]: Sort cargo filter by cargo name/label at the company stations window (sbr) 2012-10-20 08:44:07 +00:00
translators
232ef441eb (svn r24614) -Update from WebTranslator v3.0:
latvian - 17 changes by Parastais
2012-10-19 17:45:09 +00:00
frosch
e4416d6a0c (svn r24610) -Change: [NewGRF] Set the reference brightness of 32bpp mask recolouring to 128. 2012-10-17 20:21:43 +00:00
rubidium
1ba5d9ca6e (svn r24601) -Fix: _BUILD flags were not properly parsed when reconfiguring 2012-10-17 18:48:12 +00:00
translators
c5b41287ed (svn r24599) -Update from WebTranslator v3.0:
belarusian - 2 changes by Wowanxm
norwegian_bokmal - 19 changes by Tinman
2012-10-17 17:45:12 +00:00
rubidium
295c0b71ef (svn r24598) -Fix: configure script failed to detect libfontconfig 2.10 as newer than 2.3 2012-10-17 15:23:51 +00:00
rubidium
66ee580206 (svn r24597) -Fix [FS#5336]: when fontconfig is not available, the bootstrap download crashed 2012-10-16 20:21:14 +00:00
translators
a9dbfe98f9 (svn r24596) -Update from WebTranslator v3.0:
belarusian - 5 changes by KorneySan
danish - 18 changes by Knogle
french - 6 changes by glx
lithuanian - 5 changes by Stabilitronas
norwegian_nynorsk - 5 changes by 2rB
2012-10-15 17:45:30 +00:00
frosch
1ffa7d4488 (svn r24595) -Change [FS#5168]: Make the group GUI drag&drop highlighting behave more intelligible. (based on work by Juanjo) 2012-10-14 19:15:00 +00:00
translators
7e9aa98898 (svn r24594) -Update from WebTranslator v3.0:
croatian - 7 changes by VoyagerOne
korean - 7 changes by telk5093
russian - 5 changes by Lone_Wolf
2012-10-14 17:45:21 +00:00
yexo
2f042ea198 (svn r24593) -Fix [FS#5333]: crash when a gamescript provided too many parameters to a GSText object 2012-10-14 15:18:09 +00:00
frosch
b5a485825b (svn r24592) -Codechange [FS#5241]: Set up the new date completely before calling various daily or monthly processings. (dihedral) 2012-10-14 14:50:20 +00:00
translators
7f80642aa7 (svn r24591) -Update from WebTranslator v3.0:
catalan - 6 changes by arnau
danish - 73 changes by Knogle
english_US - 5 changes by Rubidium
finnish - 5 changes by jpx_
italian - 6 changes by lorenzodv
2012-10-13 17:45:28 +00:00
frosch
72fc771039 (svn r24590) -Feature: More options for the auto-scroll setting. (adf88) 2012-10-13 09:16:20 +00:00
frosch
2abe4ac280 (svn r24589) -Codechange: Return early in HandleAutoscroll() instead of nesting ifs. 2012-10-13 08:34:10 +00:00
frosch
9d877e888a (svn r24588) -Codechange: No need to intermingle reservation-checks with railroad checks. (Juanjo) 2012-10-13 08:24:28 +00:00
frosch
962a7c3630 (svn r24587) -Codechange: Improve coding style (Juanjo) 2012-10-13 08:20:40 +00:00
translators
41e1e8a175 (svn r24586) -Update from WebTranslator v3.0:
danish - 59 changes by Knogle
2012-10-12 17:45:09 +00:00
translators
39252c6bd1 (svn r24585) -Update from WebTranslator v3.0:
belarusian - 2 changes by KorneySan
catalan - 2 changes by arnau
english_US - 2 changes by Rubidium
french - 2 changes by glx
lithuanian - 2 changes by Stabilitronas
vietnamese - 74 changes by myquartz
2012-10-11 17:45:33 +00:00
frosch
dee2f39f99 (svn r24584) -Doc: [Script] Improve API documentation. 2012-10-10 19:11:22 +00:00
translators
dda3709c7e (svn r24583) -Update from WebTranslator v3.0:
finnish - 2 changes by jpx_
german - 2 changes by planetmaker
italian - 2 changes by lorenzodv
russian - 2 changes by Lone_Wolf
spanish - 2 changes by Terkhen
2012-10-10 17:45:30 +00:00
planetmaker
e0529d4861 (svn r24582) -Fix (r24581): Order distances are not supposed to be compared to map distances 2012-10-09 20:59:29 +00:00
planetmaker
60335b7b79 (svn r24581) -Doc [FS#5318]: Indicate that the return value for script related order distances is the square of the distance 2012-10-09 20:37:20 +00:00
frosch
de770d7563 (svn r24580) -Fix [FS#5308]: Do not add duplicates to the ban list. (alechz) 2012-10-09 20:36:31 +00:00
planetmaker
a9af5f3c76 (svn r24579) -Change [FS#5322] (r21961): Show no loading indicator when orders are 'no unloading and no loading' (sbr) 2012-10-09 19:09:45 +00:00
translators
0b03516049 (svn r24578) -Update from WebTranslator v3.0:
norwegian_bokmal - 9 changes by Tinman
2012-10-09 17:45:08 +00:00
planetmaker
78eb17637b (svn r24577) -Fix [FS#5324]: Draw the window resize sprite bottom-aligned (sbr) 2012-10-08 21:27:21 +00:00
frosch
738fca37bf (svn r24576) -Fix [FS#5319] (r24260): Vehicle list at buoys did no longer work. (Juanjo) 2012-10-07 12:14:39 +00:00
zuu
d39a50e76e (svn r24575) -Add: ScriptController::Break() now also pauses the game (and not only the script) 2012-10-05 19:16:23 +00:00
zuu
4f40acded0 (svn r24574) -Change: remove undocumented return value of ScriptController::Break() 2012-10-05 19:13:44 +00:00
rubidium
a023c9ae68 (svn r24573) -Fix: hopefully get packing right on Mingw's gcc 4.7 2012-10-04 15:44:09 +00:00
rubidium
d49bd2997b (svn r24572) -Fix: do not cast away some other consts 2012-10-04 15:33:13 +00:00
rubidium
0856668f44 (svn r24571) -Fix: do not cast away const 2012-10-04 15:25:57 +00:00
zuu
aa3f776483 (svn r24570) -Fix (r24542): Some documentation was missing 2012-10-03 20:43:32 +00:00
planetmaker
8259649381 (svn r24569) -Fix (r23817): Naming of bundles was somewhat broken 2012-10-03 09:12:51 +00:00
frosch
d9b709ba45 (svn r24568) -Codechange: No need to resort the group GUI when toggling the autoreplace protection. (Juanjo) 2012-10-01 19:43:10 +00:00
frosch
6018a0190e (svn r24567) -Fix [FS#5261]: Non-train vehicle lists were not resorted when vehicles were renamed. (Juanjo) 2012-10-01 19:38:57 +00:00
frosch
adf1929f0a (svn r24566) -Codechange: Reorder some code more intuitively. (Juanjo) 2012-10-01 19:38:08 +00:00
frosch
0ba2ed7676 (svn r24565) -Fix: Stop both price and payment inflation if either of them has reached MAX_INFLATION. 2012-10-01 19:31:55 +00:00
frosch
7122602026 (svn r24564) -Fix [FS#5312] (r17433): Limiting the inflation did not quite work. 2012-10-01 19:29:31 +00:00
translators
d07676e03f (svn r24563) -Update from WebTranslator v3.0:
lithuanian - 8 changes by RunisLabs
welsh - 13 changes by kazzie
2012-10-01 17:45:14 +00:00
translators
9047d86fa8 (svn r24562) -Update from WebTranslator v3.0:
lithuanian - 11 changes by RunisLabs
2012-09-30 17:45:12 +00:00
translators
b5dad69c16 (svn r24561) -Update from WebTranslator v3.0:
estonian - 3 changes by Jaanus
2012-09-29 17:45:09 +00:00
translators
4d1fcb34d1 (svn r24560) -Update from WebTranslator v3.0:
czech - 9 changes by Eskymak
2012-09-28 17:45:09 +00:00
zuu
f10c54633b (svn r24559) -Fix (24542): Blocking script debug on non-dedicated servers is a not too much 2012-09-26 20:16:57 +00:00
translators
7e1c033c3f (svn r24558) -Update from WebTranslator v3.0:
catalan - 2 changes by arnau
2012-09-26 17:45:08 +00:00
translators
8d84e9382e (svn r24557) -Update from WebTranslator v3.0:
french - 2 changes by glx
vietnamese - 4 changes by nglekhoi
2012-09-25 17:45:13 +00:00
translators
378a622f00 (svn r24556) -Update from WebTranslator v3.0:
belarusian - 2 changes by Wowanxm
croatian - 2 changes by VoyagerOne
dutch - 2 changes by habell
2012-09-24 17:45:56 +00:00
translators
f622d534b8 (svn r24555) -Update from WebTranslator v3.0:
finnish - 2 changes by jpx_
german - 2 changes by planetmaker
italian - 14 changes by lorenzodv
korean - 3 changes by telk5093
romanian - 16 changes by tonny
russian - 2 changes by edd_k
spanish - 2 changes by Terkhen
swedish - 12 changes by Zuu
2012-09-23 17:46:00 +00:00
zuu
eff4bbeb53 (svn r24554) -Add: Hotkeys for widgets in AI Debug window 2012-09-23 14:37:59 +00:00
frosch
13666b1520 (svn r24553) -Add: Separate the 'available vehicles' from the other buttons in the vehicle list. 2012-09-23 13:28:42 +00:00
zuu
d219fdb875 (svn r24552) -Fix (r24537): Unpause do no longer continue scripts 2012-09-23 11:30:37 +00:00
terkhen
934c56cb42 (svn r24551) -Fix (r24544): Change unfinished languages. 2012-09-22 20:28:56 +00:00
alberth
d00dfaff4c (svn r24550) -Codechange: Remove unused panel widget in the group gui (Juanjo). 2012-09-22 19:16:04 +00:00
alberth
adae8b161e (svn r24549) -Codechange: Remove the hard-coded sprite button sizes in the group gui (Juanjo). 2012-09-22 19:15:16 +00:00
alberth
224babe8c4 (svn r24548) -Add: Extra group line in the group gui, if possible (Juanjo). 2012-09-22 19:14:06 +00:00
alberth
4b59344b0d (svn r24547) -Add [FS#5263]: Separate the 'available vehicles' from the other buttons in the group gui (Juanjo). 2012-09-22 19:12:22 +00:00
terkhen
030564cd97 (svn r24546) -Fix (r24544): Change all other languages too. 2012-09-22 18:49:51 +00:00
translators
98ff454cad (svn r24545) -Update from WebTranslator v3.0:
english_US - 4 changes by Rubidium
russian - 4 changes by edd_k
ukrainian - 357 changes by edd_k
2012-09-22 17:45:23 +00:00
terkhen
139c3470f8 (svn r24544) -Fix [FS#5297]: Do not show profit from refits as cost in the refit window. 2012-09-22 16:19:52 +00:00
zuu
77347682db (svn r24543) -Fix-ish (r24542): Removed unnecessary preprocessor directive 2012-09-21 21:00:32 +00:00
zuu
46605e554e (svn r24542) -Feature: Allow AI/GS script developers to break the execution of their scripts using ScriptController::Break 2012-09-21 20:49:43 +00:00
yexo
b490d5ceab (svn r24541) -Cleanup [FS#5260]: remove unused function GetGroupArraySize (juanjo) 2012-09-21 20:31:42 +00:00
alberth
5add39d560 (svn r24540) -Codechange: Remove the not-so-useful HALF_TILE_SIZE constant. 2012-09-21 20:31:06 +00:00
yexo
6853df46c7 (svn r24539) -Codechange [FS#5260]: make code simpler by using IsValidTile instead of manually checking the bounds (juanjo) 2012-09-21 20:28:23 +00:00
yexo
d70ecf609c (svn r24538) -Fix-ish: remove compiler warning about initialization order 2012-09-21 20:27:09 +00:00
zuu
f3f4c562ff (svn r24537) -Feature: Scripts can be suspended even if the game is still progressing, thus break-on-log now works also for Game Scripts. 2012-09-21 19:58:18 +00:00
translators
2e1936b11c (svn r24536) -Update from WebTranslator v3.0:
tamil - 7 changes by aswn
ukrainian - 80 changes by edd_k
2012-09-21 17:45:15 +00:00
alberth
0849fb8d36 (svn r24535) -Doc: Two additions, lots of small spelling fixes, and some Doxygen improvements. 2012-09-21 09:47:21 +00:00
frosch
89988c6163 (svn r24534) -Feature: Highlight industries on the smallmap when the mouse is over an entry in the legend. 2012-09-19 22:11:26 +00:00
frosch
a4f22a2de1 (svn r24533) -Codechange: Move position determination on minimap legend to separate function. 2012-09-19 22:10:48 +00:00
rubidium
7251fbb514 (svn r24532) -Change: try to read more UDP packets per game loop 2012-09-19 15:15:49 +00:00
alberth
461fc1e268 (svn r24531) -Fix: Max script chance was too big. 2012-09-18 19:29:29 +00:00
zuu
72639deb84 (svn r24530) -Fix [#5203] (r24521): Ctrl+backspace/delete could remove too many characters (sbr) 2012-09-17 15:17:13 +00:00
translators
6e56b3abf8 (svn r24529) -Update from WebTranslator v3.0:
hungarian - 2 changes by yozi
korean - 2 changes by telk5093
latvian - 7 changes by Parastais
2012-09-16 17:45:28 +00:00
frosch
38f265c083 (svn r24528) -Fix: [NewGRF] RandomAction 84 should interpret register 100 as signed. 2012-09-16 16:31:53 +00:00
frosch
e37e2d92a6 (svn r24527) -Add: [NewGRF] Allow resolving var 5F via vehicle var 61. 2012-09-16 16:29:48 +00:00
translators
ce9019639d (svn r24526) -Update from WebTranslator v3.0:
latvian - 2 changes by Parastais
2012-09-15 17:45:08 +00:00
planetmaker
d9fc57ce92 (svn r24525) -Add [FS#4539]: [OSX] Additional high-resolution icons for the app bundle (Zydeco) 2012-09-15 11:38:40 +00:00
yexo
1f75f81a41 (svn r24524) -Fix [FS#5296]: fix some compile problems in mac-only code (__ln__) 2012-09-13 18:42:33 +00:00
frosch
bd17361817 (svn r24523) -Fix: The gender of an industry name is defined by the industry-type part of the name, not by the town-name part, even if it comes first. 2012-09-12 18:52:11 +00:00
frosch
c7a536a6d8 (svn r24522) -Codechange: Rename _keep_gender_data to _scan_for_gender_data to reflect what it intends to do instead of what it does. 2012-09-12 18:50:44 +00:00
zuu
bcf1cb1f9c (svn r24521) -Feature [FS#5203]: Ctrl + Backspace/Delete to remove characters up to next word beginning in text edit boxes 2012-09-10 18:47:13 +00:00
zuu
0656a8d40b (svn r24520) -Feature [FS#5203]: Ctrl + Arrow keys to move entire words in text edit boxes (sbr) 2012-09-10 18:45:29 +00:00
zuu
bacad1478a (svn r24519) -Codechange [FS#5203]: Refactor character removal code of text edit 2012-09-10 18:42:34 +00:00
zuu
ae28432e62 (svn r24518) -Codechange [FS#5203]: Refactor arrow key text edit movement code (sbr) 2012-09-10 18:40:54 +00:00
translators
0e9dbe6bb6 (svn r24517) -Update from WebTranslator v3.0:
czech - 23 changes by Eskymak
2012-09-09 17:45:08 +00:00
frosch
16760cff8b (svn r24516) -Add: [GS] Support ##plural pragma in GS lang files. 2012-09-09 15:55:20 +00:00
frosch
2ec6136113 (svn r24515) -Fix: GStexts were compied incompletely when containing certain string codes. 2012-09-09 15:52:49 +00:00
translators
8c8207dcc8 (svn r24514) -Update from WebTranslator v3.0:
welsh - 3 changes by kazzie
2012-09-08 17:45:08 +00:00
frosch
bcac3d16b6 (svn r24513) -Add: [Script] ScriptIndustryType::IsProcessingIndustry. 2012-09-08 12:14:00 +00:00
translators
8aa27f09fe (svn r24512) -Update from WebTranslator v3.0:
czech - 26 changes by Eskymak
luxembourgish - 7 changes by Phreeze
2012-09-07 17:45:13 +00:00
translators
8f08b79323 (svn r24511) -Update from WebTranslator v3.0:
latvian - 3 changes by Parastais
vietnamese - 1 changes by nglekhoi
2012-09-06 17:45:14 +00:00
translators
8e4c70c919 (svn r24510) -Update from WebTranslator v3.0:
korean - 1 changes by telk5093
latvian - 11 changes by Parastais
2012-09-03 17:45:12 +00:00
translators
b65c34cdb8 (svn r24509) -Update from WebTranslator v3.0:
german - 4 changes by NG
korean - 5 changes by telk5093
2012-09-02 17:45:13 +00:00
frosch
e84cf93c98 (svn r24508) -Fix [FS#5281] (24488): Content GUI crashed after downloading a NewGRF while it is selected. 2012-09-02 10:04:28 +00:00
frosch
4512a4f225 (svn r24507) -Fix [FS#5285]: The mousewheel did not work in the build waypoint window. (sbr) 2012-09-01 19:43:42 +00:00
frosch
6bc5d57fdd (svn r24506) -Fix: Airport variables 60 to 65 an 69 used the wrong CTT for translations. (Alberth) 2012-09-01 19:36:15 +00:00
zuu
468d232ef4 (svn r24505) -Add: Select the GS tab if all AI tabs are unselectable in the AI debug window. 2012-09-01 17:49:26 +00:00
translators
d2b93c96e7 (svn r24504) -Update from WebTranslator v3.0:
russian - 2 changes by Lone_Wolf
2012-09-01 17:45:09 +00:00
terkhen
55dccee02f (svn r24503) -Change [FS#5228]: When building long roads or tramways, only build the roadbits at the beginning and the end if they can connect to something. 2012-09-01 14:58:36 +00:00
translators
771511c60e (svn r24502) -Update from WebTranslator v3.0:
vietnamese - 1 changes by nglekhoi
2012-08-30 17:45:09 +00:00
translators
3e532d9b07 (svn r24501) -Update from WebTranslator v3.0:
russian - 2 changes by kuriatoru
2012-08-28 17:45:09 +00:00
zuu
403cf9246e (svn r24500) -Fix: Don't show the global goals as company goals for spectators 2012-08-27 20:37:20 +00:00
translators
43194537d4 (svn r24499) -Update from WebTranslator v3.0:
welsh - 7 changes by kazzie
2012-08-27 17:45:07 +00:00
translators
a8d1ee4fcc (svn r24498) -Update from WebTranslator v3.0:
welsh - 32 changes by kazzie
2012-08-26 17:45:08 +00:00
frosch
be150d3ad0 (svn r24497) -Feature [FS#5106]: When using autorefit only load/refit vehicles if other wagons cannot already take all cargo without refitting. This way the consist preserves its refit potential as long as possible, in case other cargo arrives at the station. 2012-08-25 14:26:14 +00:00
frosch
c9bcc42aa6 (svn r24496) -Fix [FS#5276]: Make sure all template functions are instantiated by at least one compilation unit. 2012-08-23 18:30:46 +00:00
translators
1fc375d0f6 (svn r24495) -Update from WebTranslator v3.0:
luxembourgish - 9 changes by Phreeze
2012-08-23 17:45:08 +00:00
frosch
59753be4ca (svn r24494) -Update: Some documentation. 2012-08-21 20:56:06 +00:00
frosch
0c42bc863b (svn r24493) -Doc: Update GS changelog. 2012-08-21 20:07:41 +00:00
frosch
9f9cad1ac9 (svn r24492) -Add: [NoGo] Useful behaviour for GSEngine::IsValidEngine and GSEngine::IsBuildable when outside GSCompanyMode scope. 2012-08-21 19:53:08 +00:00
rubidium
4563c50c91 (svn r24491) -Fix: compilation error with networking disabled 2012-08-21 19:03:21 +00:00
yexo
7284d716bc (svn r24490) -Fix (r24487): forgot to run script/api/squirrel_export.sh 2012-08-21 19:03:11 +00:00
zuu
a97387011d (svn r24489) -Feature [FS#5230]: Display GS dead state in AI debug window. 2012-08-21 17:07:17 +00:00
yexo
053770d4a6 (svn r24488) -Feature [FS#5236]: add buttons to view textfiles from the online content window (LordAro) 2012-08-20 21:03:50 +00:00
yexo
fe31aa28c4 (svn r24487) -Codechange [FS#5236]: make several DoesContentExist return the path instead of a boolean (LordAro) 2012-08-20 21:01:40 +00:00
translators
2a89d0d13d (svn r24486) -Update from WebTranslator v3.0:
portuguese - 15 changes by ricardoespsanto
2012-08-20 17:45:08 +00:00
planetmaker
e83cab150b (svn r24485) -Fix: Clarify description of command line option -n 2012-08-20 13:12:12 +00:00
translators
d3ec3e34b8 (svn r24484) -Update from WebTranslator v3.0:
korean - 4 changes by telk5093
luxembourgish - 19 changes by Phreeze
2012-08-19 17:45:18 +00:00
rubidium
6dc5ee80ae (svn r24483) -Fix: remove ZERO WIDTH SPACE character from Dutch strings causing the fallback font to be chosen over the sprite font 2012-08-18 19:38:02 +00:00
frosch
b11b0bb0e2 (svn r24482) -Fix [FS#5232] (r24180): Do not call RebuildSubsidisedSourceAndDestinationCache() before subsidy savegame conversion is finished. 2012-08-18 11:38:06 +00:00
frosch
d17ec934f5 (svn r24481) -Feature [FS#5127]: Make the pathfinder decide whether ships shall leave depots towards north or south. 2012-08-18 11:37:47 +00:00
frosch
0f0f027379 (svn r24480) -Doc: Doxygenize ChooseShipTrack(). 2012-08-18 11:37:23 +00:00
frosch
9215192d34 (svn r24479) -Fix: Trains were unable to reverse in stations when using NPF. 2012-08-18 11:37:03 +00:00
translators
d5f0a383f6 (svn r24478) -Update from WebTranslator v3.0:
luxembourgish - 3 changes by Phreeze
2012-08-17 17:45:09 +00:00
rubidium
b5a8022364 (svn r24477) -Merge: documentation updates from 1.2. 2012-08-16 18:47:10 +00:00
translators
08ac76fa26 (svn r24474) -Update from WebTranslator v3.0:
luxembourgish - 29 changes by Phreeze
2012-08-16 17:45:11 +00:00
translators
b560807a5d (svn r24473) -Update from WebTranslator v3.0:
portuguese - 1 changes by filipemsoares
2012-08-15 17:45:07 +00:00
translators
485bf7bede (svn r24472) -Update from WebTranslator v3.0:
turkish - 24 changes by otrkmen
2012-08-14 17:45:08 +00:00
truebrain
ae5cd67bea (svn r24471) -Feature: unbreak multiparam configure settings (--setting value), which clearly nobody uses, as it has been broken .... for a while 2012-08-14 15:51:28 +00:00
truebrain
e4b8d41e76 (svn r24470) -Feature [FS#5270]: be a tiny bit GNU autotools compatible, for those who expect all software to follow GNU guidelines 2012-08-14 15:47:44 +00:00
yexo
245baf820e (svn r24469) -Fix (r24468): forgot to svn add the new files 2012-08-13 19:33:17 +00:00
yexo
54aa43c81b (svn r24468) -Add [FS#5219]: API compatibility scripts for Goal Scripts (Hirundo) 2012-08-13 19:22:26 +00:00
yexo
5192155253 (svn r24467) -Codechange [FS#5236]: make textfile window class slightly more general (LordAro) 2012-08-13 18:52:47 +00:00
yexo
483d878d5f (svn r24466) -Codechange [FS#5236]: add general function for ContentType -> Subdirectory conversion (LordAro) 2012-08-13 18:49:38 +00:00
translators
93a135bc6a (svn r24465) -Update from WebTranslator v3.0:
korean - 1 changes by telk5093
slovak - 5 changes by klingacik
turkish - 78 changes by otrkmen
2012-08-13 17:45:32 +00:00
translators
ddd316d2a0 (svn r24464) -Update from WebTranslator v3.0:
korean - 5 changes by telk5093
slovak - 19 changes by klingacik
2012-08-12 17:45:13 +00:00
translators
38b47b89c1 (svn r24463) -Update from WebTranslator v3.0:
korean - 1 changes by telk5093
2012-08-10 17:45:07 +00:00
translators
dd326ec4bc (svn r24462) -Update from WebTranslator v3.0:
hungarian - 1 changes by IPG
portuguese - 18 changes by ricardoespsanto
turkish - 7 changes by otrkmen
2012-08-09 17:45:23 +00:00
translators
dfb1a80129 (svn r24461) -Update from WebTranslator v3.0:
belarusian - 10 changes by Wowanxm
luxembourgish - 1 changes by Phreeze
portuguese - 51 changes by ricardoespsanto
turkish - 151 changes by otrkmen
2012-08-08 17:45:24 +00:00
translators
d6aef6491b (svn r24460) -Update from WebTranslator v3.0:
luxembourgish - 26 changes by Phreeze
2012-08-07 17:45:08 +00:00
translators
e6e6d4b564 (svn r24459) -Update from WebTranslator v3.0:
dutch - 4 changes by Parody
hungarian - 4 changes by IPG
korean - 19 changes by telk5093
luxembourgish - 19 changes by Phreeze
2012-08-06 17:45:25 +00:00
translators
693b31b1bf (svn r24458) -Update from WebTranslator v3.0:
afrikaans - 14 changes by telanus
korean - 11 changes by telk5093
luxembourgish - 2 changes by Phreeze
2012-08-03 17:45:19 +00:00
michi_cc
bfbf74fe7d (svn r24457) -Fix [FS#5264] (r23087): Changing auto-refit for a 'goto station' order was inadvertently modifying the full load state. 2012-08-03 14:15:52 +00:00
translators
3181544729 (svn r24456) -Update from WebTranslator v3.0:
afrikaans - 2 changes by telanus
hungarian - 32 changes by IPG
2012-08-02 17:45:14 +00:00
translators
8c01dc3045 (svn r24451) -Update from WebTranslator v3.0:
thai - 37 changes by sf_alpha
2012-08-01 17:45:07 +00:00
translators
1b581eeff3 (svn r24450) -Update from WebTranslator v3.0:
lithuanian - 2 changes by Stabilitronas
luxembourgish - 14 changes by Phreeze
romanian - 5 changes by tonny
2012-07-31 17:45:21 +00:00
frosch
e07e246532 (svn r24449) -Fix [FS#5254]: Coast and sea are not the same. 2012-07-30 19:38:17 +00:00
frosch
f9819c6645 (svn r24448) -Fix [FS#5255]: Copy constructor and assignment operator cannot be implicit template specialisations. (adf88) 2012-07-29 20:02:25 +00:00
translators
9f6ab0541e (svn r24447) -Update from WebTranslator v3.0:
french - 1 changes by glx
latvian - 6 changes by Parastais
2012-07-29 17:45:13 +00:00
frosch
9527bad3a7 (svn r24446) -Add [FS#5199]: Store more consist properties in order backups. 2012-07-29 16:48:00 +00:00
frosch
fcbe53d204 (svn r24445) -Fix: Do not load order backups when loading a server-saved game in single player. 2012-07-29 16:45:56 +00:00
frosch
5ce1971588 (svn r24444) -Codechange: Base OrderBackup on BaseConsist. 2012-07-29 16:45:34 +00:00
frosch
48e0d9901f (svn r24443) -Codechange: Move Vehicle::name to BaseConsist. 2012-07-29 16:45:11 +00:00
frosch
4c9f65800b (svn r24442) -Codechange: Split some members of Vehicle into a new class BaseConsist. 2012-07-29 16:44:39 +00:00
frosch
77b5e72541 (svn r24441) -Update: Version number to 1.3 in some more files. 2012-07-29 16:28:54 +00:00
translators
0c904336c9 (svn r24440) -Update from WebTranslator v3.0:
french - 6 changes by OliTTD
2012-07-28 17:45:08 +00:00
frosch
59a3bbcbe6 (svn r24439) -Fix [FS#5254]: In some cases ships could be covered with land. 2012-07-27 19:55:27 +00:00
frosch
13bfb09cbb (svn r24438) -Fix [FS#5256-ish]: Make (non-refittable) vehicles with invalid default cargo unavailable. 2012-07-27 19:16:01 +00:00
translators
4d53128f0c (svn r24437) -Update from WebTranslator v3.0:
korean - 14 changes by telk5093
2012-07-27 17:45:09 +00:00
translators
99f99b04b6 (svn r24436) -Update from WebTranslator v3.0:
korean - 7 changes by telk5093
2012-07-26 17:45:14 +00:00
translators
a898afb1bd (svn r24435) -Update from WebTranslator v3.0:
spanish - 9 changes by Terkhen
2012-07-25 17:45:09 +00:00
translators
dd99390039 (svn r24434) -Update from WebTranslator v3.0:
afrikaans - 14 changes by telanus
french - 6 changes by glx
2012-07-24 17:45:23 +00:00
translators
9a8ee66f84 (svn r24433) -Update from WebTranslator v3.0:
belarusian - 9 changes by KorneySan
korean - 21 changes by telk5093
2012-07-23 17:45:17 +00:00
rubidium
cf773911b0 (svn r24432) -Fix: compile warning in depend 2012-07-22 18:56:16 +00:00
rubidium
4dfe9379a0 (svn r24431) -Fix: some old compilers didn't like some flag that isn't really needed anyway 2012-07-22 18:55:12 +00:00
translators
cdb61828d3 (svn r24430) -Update from WebTranslator v3.0:
finnish - 10 changes by jpx_
2012-07-22 17:45:10 +00:00
rubidium
990c9f8a7f (svn r24429) -Change: add some hardening flags to the compiler for release builds 2012-07-22 05:33:09 +00:00
translators
3202b09b12 (svn r24428) -Update from WebTranslator v3.0:
korean - 26 changes by telk5093
brazilian_portuguese - 6 changes by Tucalipe
2012-07-21 17:45:15 +00:00
rubidium
cc364d23a4 (svn r24427) -Change: allow passing C(XX)- and LDFLAGS to the compilation of helper binaries such as depend, strgen and settingsgen 2012-07-21 15:49:26 +00:00
translators
472855140d (svn r24418) -Update from WebTranslator v3.0:
catalan - 6 changes by arnau
lithuanian - 6 changes by Stabilitronas
polish - 6 changes by wojteks86
vietnamese - 14 changes by nglekhoi
2012-07-20 17:45:26 +00:00
michi_cc
36181b3fb2 (svn r24417) -Codechange: [Win32] Don't needlessly include windows.h in a commonly used header. 2012-07-19 19:21:47 +00:00
michi_cc
1792c186c7 (svn r24416) -Fix [FS#5231]: [Win32] Unbreak NewGRF MD5 sum calculation. Macros and side effects don't mix, especially if there's some obscure '#define min' in a windows header that nobody thinks of. 2012-07-19 19:06:27 +00:00
translators
902e2e4f66 (svn r24415) -Update from WebTranslator v3.0:
croatian - 6 changes by VoyagerOne
german - 6 changes by planetmaker
italian - 6 changes by lorenzodv
vietnamese - 3 changes by nglekhoi
2012-07-19 17:45:43 +00:00
frosch
ab2ce64b6b (svn r24414) -Fix [FS#5221]: Disallow removing roadtypes from bridges when not dragging in bridge direction. 2012-07-18 19:25:00 +00:00
frosch
25203976f0 (svn r24413) -Add [FS#5221-ish]: Allow overbuilding bridges with the same type when adding a roadtype. 2012-07-18 19:24:13 +00:00
translators
f645c15586 (svn r24412) -Update from WebTranslator v3.0:
dutch - 6 changes by habell
english_US - 6 changes by Rubidium
finnish - 6 changes by jpx_
korean - 45 changes by telk5093
russian - 6 changes by Lone_Wolf
2012-07-18 17:45:35 +00:00
frosch
cd867eb573 (svn r24411) -Add [FS#5244-ish]: Display the a setting type in the adv. settings description which explains the scope of changes to a particular setting. 2012-07-17 20:18:18 +00:00
translators
8361625ad6 (svn r24410) -Update from WebTranslator v3.0:
afrikaans - 10 changes by telanus
finnish - 1 changes by USephiroth
2012-07-17 17:45:12 +00:00
translators
1ebff8df41 (svn r24409) -Update from WebTranslator v3.0:
croatian - 3 changes by VoyagerOne
french - 3 changes by glx
korean - 2 changes by telk5093
2012-07-16 17:45:21 +00:00
alberth
e85a56dd21 (svn r24408) -Fix (r24406): Forgot to add the new files to the Studio build list. 2012-07-16 17:00:56 +00:00
translators
1cbc1b2be3 (svn r24407) -Update from WebTranslator v3.0:
afrikaans - 15 changes by telanus
korean - 11 changes by telk5093
2012-07-15 17:45:13 +00:00
alberth
eb56e5c0b1 (svn r24406) -Feature: Allow game scripts to monitor cargo pickups and deliveries done by companies. 2012-07-15 17:11:14 +00:00
alberth
05aaf18d38 (svn r24405) -Add: Save and load of active cargo monitors. 2012-07-15 17:07:06 +00:00
alberth
1d11291071 (svn r24404) -Add: Data structures for cargo transport monitoring. 2012-07-15 17:05:17 +00:00
frosch
6821f5cd22 (svn r24403) -Fix: Draw wires under low bridges if the bridge is transparent, not if the wire is transparent. 2012-07-15 16:18:55 +00:00
frosch
c8cb096533 (svn r24402) -Fix [FS#5243]: Station properties 11 and 14 were combined incorrectly. 2012-07-15 16:17:22 +00:00
translators
03b6ad9383 (svn r24401) -Update from WebTranslator v3.0:
czech - 8 changes by RabbRubbish
korean - 7 changes by telk5093
lithuanian - 25 changes by Stabilitronas
2012-07-14 17:45:36 +00:00
frosch
17dcc7a899 (svn r24400) -Add: Plural 'names' to the output of strgen -export-plurals. 2012-07-14 14:21:25 +00:00
frosch
c6a73ed0d5 (svn r24399) -Fix: Korean. 2012-07-14 12:11:52 +00:00
frosch
667a45f5c7 (svn r24398) -Fix: Most recent changes to Brazilian were syntactically wrong. 2012-07-14 12:04:18 +00:00
translators
a5d771fd3b (svn r24397) -Update from WebTranslator v3.0:
korean - 11 changes by telk5093
brazilian_portuguese - 96 changes by Tucalipe
spanish - 1 changes by Terkhen
vietnamese - 1 changes by nglekhoi
2012-07-13 17:45:43 +00:00
translators
bd4d5c26d8 (svn r24396) -Update from WebTranslator v3.0:
czech - 14 changes by Eskymak
latvian - 3 changes by Parastais
polish - 3 changes by wojteks86
2012-07-12 17:45:28 +00:00
alberth
2ab7c82b31 (svn r24395) -Doc: Fixed argument references in @param descriptions. 2012-07-10 18:37:54 +00:00
glx
ad48f766f7 (svn r24394) -Fix (r24188): changing resolution didn't resize the window 2012-07-10 17:47:03 +00:00
translators
503c436cb2 (svn r24393) -Update from WebTranslator v3.0:
finnish - 1 changes by jpx_
hungarian - 8 changes by Brumi
korean - 4 changes by telk5093
2012-07-10 17:45:33 +00:00
alberth
a9b1a36656 (svn r24392) -Fix [FS#5239]: Use the 'all vehicles' group for the autoreplace window from the vehicle list. 2012-07-10 17:35:10 +00:00
frosch
6c2e201133 (svn r24391) -Change [FS#5229]: Disallow original and better road layouts to build roads under bridges along the bridge direction. 2012-07-09 19:43:22 +00:00
frosch
0ead281439 (svn r24390) -Change [FS#5213]: Allow cloning of orders which are unreachable for the destination vehicle if they were already unreachable for the source vehicle. This makes cloning/autorenewing/autoreplacing behave more smooth during station reconstruction. 2012-07-09 18:45:35 +00:00
translators
6aa2b757aa (svn r24389) -Update from WebTranslator v3.0:
catalan - 3 changes by mtormo
dutch - 3 changes by habell
english_US - 3 changes by Rubidium
finnish - 2 changes by jpx_
german - 3 changes by planetmaker
italian - 3 changes by lorenzodv
korean - 121 changes by telk5093
lithuanian - 3 changes by Stabilitronas
russian - 3 changes by Lone_Wolf
2012-07-09 17:46:28 +00:00
frosch
73706925d1 (svn r24388) -Fix [FS#5233]: Do not consider not finding a particular base set critical; just load a different one and display an in-game error later on. 2012-07-08 18:41:50 +00:00
translators
8e170df609 (svn r24387) -Update from WebTranslator v3.0:
lithuanian - 92 changes by Stabilitronas
vietnamese - 28 changes by nglekhoi
2012-07-08 17:45:38 +00:00
rubidium
91d1e9a5bb (svn r24386) -Fix: remove broken plurals from slovak 2012-07-08 15:58:01 +00:00
translators
ec946be639 (svn r24385) -Update from WebTranslator v3.0:
lithuanian - 90 changes by Stabilitronas
2012-07-07 17:45:20 +00:00
frosch
08a8c3a773 (svn r24384) -Fix [FS#5188-ish]: Make IsInDepot() functions behave consistent across vehicle types and add IsChainInDepot instead, if that is what shall be checked. 2012-07-07 15:39:46 +00:00
frosch
8d004f3c63 (svn r24383) -Fix: a comment. 2012-07-07 15:37:29 +00:00
frosch
22632d5e9a (svn r24382) -Fix: Call Vehicle::IsStoppedInDepot only for the first vehicle in a chain (i.e. primary vehicle or free wagon). 2012-07-07 15:35:28 +00:00
frosch
e0cf1e3e94 (svn r24381) -Revert (r24380): RoadVehicle::IsInDepot was supposed to behave different to Train::IsInDepot. 2012-07-07 15:22:21 +00:00
frosch
c1dd0107c7 (svn r24380) -Fix [FS#5188]: RoadVehicle::IsInDepot did not check all articulated parts. 2012-07-07 12:48:53 +00:00
frosch
3d3ab26ee6 (svn r24379) -Fix [FS#5218-ish]: Do not resize the object GUI when selecting objects. Rather clip the object name. 2012-07-07 11:59:43 +00:00
frosch
4843bad1ac (svn r24378) -Fix [FS#5218]: ReInit could crash for windows with NWidgetMatrix widgets. 2012-07-07 11:13:41 +00:00
translators
95b2f4ba95 (svn r24377) -Update from WebTranslator v3.0:
slovak - 166 changes by Rhianon
2012-07-06 17:45:17 +00:00
translators
ffbc72ceef (svn r24376) -Update from WebTranslator v3.0:
korean - 8 changes by telk5093
2012-07-05 17:45:13 +00:00
translators
89b2af71b4 (svn r24375) -Update from WebTranslator v3.0:
japanese - 34 changes by TzakShrike
2012-07-04 17:45:18 +00:00
rubidium
6baa5a8633 (svn r24374) -Fix: cargo lists can't have genders (mostly because it's very unclear what gender it would have) 2012-07-04 17:00:33 +00:00
frosch
2ef319d0fe (svn r24373) -Codechange: Improve descriptions of plural forms. 2012-07-03 19:14:51 +00:00
translators
61b3378895 (svn r24372) -Update from WebTranslator v3.0:
greek - 23 changes by kyrm
2012-07-03 17:45:13 +00:00
michi_cc
6f88071942 (svn r24371) -Add: [NewGRF] Allow vehicle variable 61 for callback 2D (recolour) and re-randomisation. 2012-07-02 19:31:26 +00:00
translators
2e1ad8fd06 (svn r24370) -Update from WebTranslator v3.0:
korean - 10 changes by telk5093
2012-07-02 17:45:16 +00:00
frosch
d56b5783d1 (svn r24369) -Fix (r24361): Unused stuff is unused. 2012-07-02 16:23:24 +00:00
frosch
62670b48b9 (svn r24368) -Fix (r24367): Silence GCC warnings. 2012-07-02 15:55:13 +00:00
michi_cc
b0d21d2fad (svn r24367) -Feature: [NewGRF] Customisable signals for rail types. 2012-07-01 23:12:50 +00:00
frosch
a6244ed0dc (svn r24366) -Doc: Improve description of ScriptVehicle::GetCargoLoad. 2012-07-01 21:16:47 +00:00
rubidium
66d14c50f1 (svn r24365) -Fix-ish: add C(XX)FLAGS_BUILD to all the executables that are compiled for the build enviroment 2012-07-01 08:56:57 +00:00
rubidium
854b3921a4 (svn r24364) -Fix-ish: Slovak compilation failure 2012-07-01 08:54:51 +00:00
translators
681fd36d60 (svn r24363) -Update from WebTranslator v3.0:
vietnamese - 2 changes by nglekhoi
2012-06-30 17:45:08 +00:00
translators
dd01503e91 (svn r24362) -Update from WebTranslator v3.0:
japanese - 4 changes by TzakShrike
brazilian_portuguese - 87 changes by Tucalipe
2012-06-29 17:45:14 +00:00
frosch
37d41d4448 (svn r24361) -Fix [FS#5227] (r22926): Apparently ext. A1 did not work at all. (Hirundo) 2012-06-29 15:38:41 +00:00
frosch
ee25344a6d (svn r24360) -Fix [FS#5224]: Ship-specific 80+x variables were missing for unknown reason. (Hirundo) 2012-06-28 19:24:26 +00:00
translators
06686c237c (svn r24359) -Update from WebTranslator v3.0:
persian - 5 changes by Gajoo
2012-06-27 17:45:07 +00:00
translators
ad5a009cb4 (svn r24358) -Update from WebTranslator v3.0:
greek - 13 changes by kyrm
2012-06-25 17:45:08 +00:00
translators
7405c9c417 (svn r24357) -Update from WebTranslator v3.0:
brazilian_portuguese - 61 changes by Tucalipe
slovak - 20 changes by Rhianon
2012-06-24 17:45:13 +00:00
frosch
d496845820 (svn r24356) -Change: Allow building/modifying/removing signals even if a train is on the belonging track. 2012-06-23 20:18:29 +00:00
frosch
0fd41221c3 (svn r24355) -Codechange [FS#5217]: Deduplicate code when building stations. (Hirundo) 2012-06-23 15:56:17 +00:00
frosch
ca10522e8d (svn r24354) -Fix: When airport construction was denied due to noise, the error message named the wrong town. 2012-06-23 15:27:15 +00:00
michi_cc
ef394916c9 (svn r24353) -Fix [FS#5215] (r23506): [NoAI] A TileIndex isn't a station id, so don't use it as one. 2012-06-23 15:02:20 +00:00
frosch
9208059e3e (svn r24352) -Fix: When highlighting the drop position for vehicles in depots, make space for all articulated parts. 2012-06-23 14:32:34 +00:00
frosch
90b539818f (svn r24351) -Fix: Short vehicles were not properly positioned at the cursor when dragging for RTL languages. 2012-06-23 14:31:58 +00:00
translators
526c4e8af0 (svn r24350) -Update from WebTranslator v3.0:
vietnamese - 5 changes by nglekhoi
2012-06-21 17:45:12 +00:00
translators
b3115c4b98 (svn r24349) -Update from WebTranslator v3.0:
french - 2 changes by OliTTD
2012-06-19 17:45:14 +00:00
translators
abdeb78726 (svn r24348) -Update from WebTranslator v3.0:
german - 1 changes by planetmaker
2012-06-18 17:45:08 +00:00
translators
7295ba4bae (svn r24347) -Update from WebTranslator v3.0:
spanish - 1 changes by Terkhen
2012-06-17 17:45:08 +00:00
frosch
149672fedb (svn r24346) -Fix: EQUALSIZE widget containers within EQUALSIZE containers were initialised with wrong sizes. 2012-06-16 20:01:34 +00:00
translators
27c319c34b (svn r24345) -Update from WebTranslator v3.0:
vietnamese - 11 changes by nglekhoi
2012-06-16 17:45:08 +00:00
translators
0c332103a1 (svn r24344) -Update from WebTranslator v3.0:
korean - 4 changes by telk5093
polish - 1 changes by wojteks86
2012-06-15 17:45:14 +00:00
translators
207c0c815c (svn r24343) -Update from WebTranslator v3.0:
german - 1 changes by Jogio
polish - 36 changes by wojteks86
vietnamese - 3 changes by nglekhoi
2012-06-14 17:45:17 +00:00
frosch
bca5ba1d26 (svn r24342) -Feature: Also use the new multi-word filtering for script breakpoints. 2012-06-13 18:58:29 +00:00
translators
36766befb2 (svn r24341) -Update from WebTranslator v3.0:
czech - 2 changes by ReisRyos
estonian - 53 changes by ISA
swedish - 3 changes by Joel_A
2012-06-13 17:45:27 +00:00
translators
5353a3cab5 (svn r24340) -Update from WebTranslator v3.0:
afrikaans - 1 changes by telanus
dutch - 2 changes by habell
greek - 6 changes by kyrm
korean - 4 changes by telk5093
persian - 10 changes by Peymanpn
polish - 2 changes by wojteks86
swedish - 3 changes by Joel_A
tamil - 9 changes by ganesh
vietnamese - 5 changes by nglekhoi
2012-06-12 17:45:46 +00:00
translators
8d8067d381 (svn r24339) -Update from WebTranslator v3.0:
greek - 5 changes by kyrm
polish - 7 changes by xaxa
urdu - 29 changes by yasirniazkhan
2012-06-11 17:45:16 +00:00
translators
0cf4b70d50 (svn r24338) -Update from WebTranslator v3.0:
latvian - 1 changes by Parastais
2012-06-10 17:45:07 +00:00
frosch
03046f614f (svn r24337) -Feature: Allow filtering for multiple words (separated by whitespace resp. quoted) in the sign list, content- and NewGRF-guis. 2012-06-09 19:54:16 +00:00
translators
db709aff32 (svn r24336) -Update from WebTranslator v3.0:
hungarian - 7 changes by IPG
latvian - 13 changes by Parastais
polish - 7 changes by wojteks86
swedish - 6 changes by Joel_A
2012-06-09 17:45:21 +00:00
frosch
7e57e8692a (svn r24335) -Fix: The cursor in the company password window was not blinking due to wrong magic constants (same as r17539). 2012-06-09 14:49:49 +00:00
translators
f6b3e0d199 (svn r24334) -Update from WebTranslator v3.0:
dutch - 11 changes by habell
hungarian - 189 changes by IPG
latvian - 14 changes by Parastais
2012-06-08 17:45:16 +00:00
translators
ccff38a0f9 (svn r24333) -Update from WebTranslator v3.0:
dutch - 2 changes by habell
german - 1 changes by Jogio
greek - 47 changes by kyrm
hungarian - 61 changes by IPG
lithuanian - 7 changes by RunisLabs
polish - 4 changes by wojteks86
swedish - 2 changes by Joel_A
2012-06-07 17:45:40 +00:00
frosch
ed3c734d0a (svn r24332) -Change/Fix [FS#2553]: [NewGRF] Change the length of 8/8 roadvehicles in vehicle lists to 32 pixels; this is in fact the correct length as can be seen in corners for short articulated parts following each other. It also looks fine for most old GRFs, thus there is no need for a switch. 2012-06-07 15:58:59 +00:00
frosch
4c79a06567 (svn r24331) -Change [FS#5204]: [NewGRF] Make bounding boxes of road vehicles change according to the vehicle length to make alignment easier. 2012-06-07 15:41:14 +00:00
frosch
86b013f872 (svn r24330) -Fix (r24321): Do not use the vehicle list order changes from the previous savegames, but only ever from the current one. 2012-06-07 15:38:46 +00:00
translators
573a63bfc4 (svn r24329) -Update from WebTranslator v3.0:
afrikaans - 2 changes by telanus
german - 2 changes by Jogio
hungarian - 63 changes by IPG
polish - 11 changes by wojteks86
swedish - 21 changes by Joel_A
2012-06-06 17:45:28 +00:00
frosch
2eb9795a98 (svn r24328) -Codechange: Simplify some silly code. 2012-06-06 14:03:22 +00:00
frosch
c0e209162a (svn r24327) -Doc: [Script] Improve documentation of ScriptCompany::GetQuarterlyIncome/Expenses(). 2012-06-06 13:13:05 +00:00
translators
4bd09effe3 (svn r24326) -Update from WebTranslator v3.0:
afrikaans - 11 changes by telanus
dutch - 7 changes by habell
german - 5 changes by Jogio
greek - 183 changes by kyrm
lithuanian - 4 changes by RunisLabs
polish - 50 changes by wojteks86
2012-06-05 17:45:44 +00:00
translators
6eb6ac941e (svn r24325) -Update from WebTranslator v3.0:
dutch - 26 changes by habell
german - 22 changes by Jogio
latvian - 11 changes by Parastais
lithuanian - 1 changes by RunisLabs
polish - 2 changes by wojteks86
vietnamese - 1 changes by nglekhoi
2012-06-04 17:45:37 +00:00
frosch
d58eee1e79 (svn r24324) -Codechange: Turn functions dealing with Textbufs into member functions. 2012-06-04 15:30:29 +00:00
frosch
31eb896143 (svn r24323) -Codechange: Split Textbuf and associated functions to separate files. 2012-06-04 15:29:37 +00:00
translators
5e8a32e279 (svn r24322) -Update from WebTranslator v3.0:
afrikaans - 22 changes by telanus
german - 25 changes by Jogio
latvian - 3 changes by Parastais
lithuanian - 65 changes by Stabilitronas
2012-06-03 17:45:22 +00:00
frosch
8ec00c4cc9 (svn r24321) -Change/Fix [FS#4254]: [NewGRF] Group vehicles in the purchase list properly by source GRF, but also consider engine GRFID overrides. 2012-06-03 15:07:27 +00:00
translators
0e9422c43a (svn r24320) -Update from WebTranslator v3.0:
belarusian - 3 changes by Wowanxm
german - 7 changes by Jogio, planetmaker
latvian - 1 changes by Parastais
lithuanian - 53 changes by RunisLabs
swedish - 4 changes by Joel_A
2012-06-02 17:45:29 +00:00
translators
4186f5f98a (svn r24319) -Update from WebTranslator v3.0:
afrikaans - 19 changes by telanus
belarusian - 1 changes by Wowanxm
dutch - 11 changes by habell
german - 1 changes by planetmaker
lithuanian - 30 changes by RunisLabs
2012-06-01 17:45:33 +00:00
frosch
c3ca57c42b (svn r24318) -Feature: Add dropdowns to NewGRF configurations, if all values have labels. 2012-06-01 15:20:18 +00:00
frosch
be0b94400d (svn r24317) -Feature: Add dropdowns to AI configurations, if all values have labels. 2012-06-01 15:19:59 +00:00
frosch
f7c9620271 (svn r24316) -Feature: Allow setting adv. settings with limited range using a dropdown list. 2012-06-01 15:19:38 +00:00
frosch
625ec041b9 (svn r24315) -Fix: Make the AI settings window behave more like the other settings window by closing the query window whenever selecting a different row. 2012-06-01 15:13:34 +00:00
frosch
fde15bf393 (svn r24314) -Fix: Editing NewGRF parameters using the query window showed wrong values, if there was no direct relation between parameter index and parameter register. 2012-06-01 15:12:52 +00:00
frosch
65f51240cd (svn r24313) -Fix: Some obiwans wrt. clicking on setting buttons. 2012-06-01 15:08:40 +00:00
frosch
e240f660f0 (svn r24312) -Change: Center the settings buttons in the AI and NewGRF config windows. 2012-06-01 14:42:48 +00:00
frosch
b71b4015a2 (svn r24311) -Add: DrawDropDownButton() to draw dropdown buttons independent of actual widgets. 2012-06-01 14:41:47 +00:00
frosch
056f779334 (svn r24310) -Codechange: Add named constants for the dimensions of settings buttons, and generally make their usage more consistent. 2012-06-01 14:41:09 +00:00
frosch
198de5397e (svn r24309) -Codechange: Split some functions from gui.h to settings_gui.h 2012-06-01 10:44:45 +00:00
frosch
88fff21b93 (svn r24308) -Add: ShowDropDownListAt() for drawing dropdown windows independent of dropdown widgets. 2012-06-01 10:43:50 +00:00
frosch
6207a6017f (svn r24307) -Codechange: Move all interaction of the dropdown window with widgets of the parent window to a method of the parent window. 2012-06-01 10:42:46 +00:00
translators
b921c17ffb (svn r24304) -Update from WebTranslator v3.0:
czech - 6 changes by RabbRubbish
german - 41 changes by Jogio, NG, planetmaker
lithuanian - 1 changes by Stabilitronas
swedish - 9 changes by Joel_A
2012-05-31 17:45:23 +00:00
translators
3246412f77 (svn r24303) -Update from WebTranslator v3.0:
croatian - 1 changes by VoyagerOne
czech - 32 changes by RabbRubbish
estonian - 10 changes by KSiimson
spanish - 1 changes by Terkhen
2012-05-30 17:45:23 +00:00
frosch
543540def8 (svn r24302) -Fix: [Script] ScriptTown::GetGrowthRate() returned wrong values after usage of SetGrowthRate(). 2012-05-30 14:54:44 +00:00
translators
e9ac7a40df (svn r24301) -Update from WebTranslator v3.0:
catalan - 1 changes by mtormo
czech - 22 changes by RabbRubbish
danish - 2 changes by beruic
german - 218 changes by NG
italian - 1 changes by lorenzodv
romanian - 4 changes by tonny
russian - 1 changes by edd_k
ukrainian - 4 changes by edd_k
2012-05-29 17:45:41 +00:00
translators
877c7f3a99 (svn r24300) -Update from WebTranslator v3.0:
belarusian - 2 changes by Wowanxm
czech - 1 changes by Eskymak
danish - 10 changes by beruic
english_US - 1 changes by Rubidium
finnish - 1 changes by jpx_
french - 1 changes by glx
latvian - 3 changes by Parastais
lithuanian - 3 changes by Stabilitronas
swedish - 9 changes by Joel_A
2012-05-28 17:46:27 +00:00
frosch
1f3227eb69 (svn r24299) -Change [FS#5057]: Center object previews in 1- and 2-view selectors based on the 4-view selector layout. 2012-05-28 13:44:55 +00:00
frosch
f9df5f65c7 (svn r24298) -Feature: Display default values for adv. settings in the settings description. 2012-05-28 13:34:46 +00:00
frosch
09bdd4c773 (svn r24297) -Codechange: Split DParam-setup for drawing setting values to a separate function. 2012-05-28 13:32:38 +00:00
frosch
41c8df35db (svn r24296) -Codechange: No need to pass a member variable to a member function. 2012-05-28 13:29:05 +00:00
frosch
5eca828aa4 (svn r24295) -Fix: STRING1 probably means STRING1. 2012-05-28 13:23:58 +00:00
translators
d45bd299d5 (svn r24294) -Update from WebTranslator v3.0:
catalan - 2 changes by arnau
traditional_chinese - 1 changes by Luper
croatian - 7 changes by VoyagerOne
danish - 3 changes by beruic
dutch - 9 changes by mazele
finnish - 2 changes by jpx_
french - 7 changes by OliTTD
german - 1 changes by NG
italian - 2 changes by lorenzodv
latvian - 3 changes by Parastais
lithuanian - 19 changes by Stabilitronas
romanian - 56 changes by tonny
russian - 2 changes by Lone_Wolf
2012-05-27 17:46:09 +00:00
alberth
87d5f47050 (svn r24293) -Fix: Increase the left and right margins of the text in the yes/no query window. 2012-05-26 21:30:38 +00:00
translators
228e26f930 (svn r24292) -Update from WebTranslator v3.0:
belarusian - 15 changes by Wowanxm
catalan - 6 changes by arnau
english_US - 2 changes by Rubidium
finnish - 6 changes by jpx_
italian - 14 changes by lorenzodv
korean - 4 changes by telk5093
russian - 3 changes by Lone_Wolf
spanish - 2 changes by Terkhen
swedish - 3 changes by Joel_A
2012-05-26 17:45:46 +00:00
frosch
95d3d6fdef (svn r24291) -Add: [Script] ScriptEventRoadReconstruction. 2012-05-26 14:16:45 +00:00
frosch
8dc553a039 (svn r24290) -Add: [Script] ScriptEventExclusiveTransportRights. 2012-05-26 14:16:38 +00:00
frosch
66a37e28a6 (svn r24289) -Add: [Script] Base class for script events involving a company and a town. 2012-05-26 14:16:32 +00:00
frosch
9ad9d72c4a (svn r24288) -Fix: squirrel_export should match stuff like 'virtual', 'static' and 'const' only as whole words. 2012-05-26 14:16:27 +00:00
frosch
ec91dc5ffc (svn r24287) -Feature [FS#2688]: News item for exclusive transport rights. (based on patch by Grantovich) 2012-05-26 14:16:23 +00:00
frosch
5187c2b721 (svn r24286) -Add: [GS] Some more GSNews::NewsItem::NewsTypes. 2012-05-26 14:16:12 +00:00
frosch
01100053ff (svn r24285) -Codechange: Add a more explcit NewsFlag to indicate that the first string parameter is a vehicle ID. 2012-05-26 14:16:07 +00:00
frosch
a8c88f43b6 (svn r24284) -Codechange: Remove NewsSubtypes and directly use NewsTypes and NewsFlag instead. 2012-05-26 14:16:03 +00:00
frosch
a0be398da9 (svn r24283) -Codechange: Add AddTileNewsItem function to preemptively deduplicate code. 2012-05-26 14:15:57 +00:00
frosch
00b3ff80bb (svn r24282) -Codechange: Add AddVehicleAdviceNewsItem function to preemptively deduplicate code. 2012-05-26 14:15:52 +00:00
frosch
c796801c4d (svn r24281) -Cleanup: Merge all company news subtypes into a single one; they all behave the same. 2012-05-26 14:15:46 +00:00
frosch
806e5f33d4 (svn r24280) -Cleanup: Remove uselessly duplicated code to set string parameters in company news. 2012-05-26 14:15:41 +00:00
frosch
8bce6453d3 (svn r24279) -Fix: Someone forgot a call to squirrel_export somewhen. 2012-05-26 08:19:33 +00:00
frosch
5e8151e245 (svn r24278) -Codechange: Deduplicate code to read translation tables. 2012-05-25 21:00:00 +00:00
frosch
522e5ec86b (svn r24277) -Codechange: Store cargo and railtype translation tables in a SmallVector. 2012-05-25 20:57:36 +00:00
frosch
b8f6b300d6 (svn r24276) -Codechange: Enhance GRFFile with constructor and destructor. 2012-05-25 20:54:54 +00:00
frosch
e1617a3d10 (svn r24275) -Codechange: Make SmallVector::FindIndex() const. 2012-05-25 20:52:11 +00:00
translators
de3b05388d (svn r24274) -Update from WebTranslator v3.0:
english_US - 6 changes by Rubidium
french - 5 changes by glx
german - 15 changes by NG
greek - 67 changes by kyrm
russian - 2 changes by Lone_Wolf
spanish - 36 changes by Terkhen
2012-05-25 17:45:31 +00:00
frosch
5a34b744b1 (svn r24273) -Fix: [NewGRF] GetReverseCargoTranslation() was unnecessary complicated and also returned the wrong thing for cargos not present in the translation table. 2012-05-25 17:23:19 +00:00
frosch
9522dbb1a9 (svn r24272) -Fix: [NewGRF] Load cargo- and railtype-translation during both reservation and activation stage. That way they can be selected using Action7 depending on present cargo- or railtypes. 2012-05-25 16:52:18 +00:00
frosch
d3a7a5fce0 (svn r24271) -Change: Remove latin abbreviations from english strings. 2012-05-25 16:11:20 +00:00
frosch
f57fbe02c8 (svn r24270) -Add: Missing descriptions for adv. settings. 2012-05-25 16:03:54 +00:00
translators
a34c41efbb (svn r24269) -Update from WebTranslator v3.0:
dutch - 5 changes by habell
slovenian - 2 changes by 
ukrainian - 54 changes by edd_k
2012-05-24 17:45:19 +00:00
frosch
0332c7e6b3 (svn r24268) -Fix: Use the same colour scheme for the script selection window as in other comparable windows. 2012-05-23 19:07:34 +00:00
translators
f8f14c2dde (svn r24267) -Update from WebTranslator v3.0:
dutch - 9 changes by habell
french - 5 changes by OliTTD
korean - 185 changes by telk5093
russian - 2 changes by Lone_Wolf
slovenian - 2 changes by 
spanish - 2 changes by Terkhen
2012-05-23 17:45:34 +00:00
translators
d8594af92b (svn r24266) -Update from WebTranslator v3.0:
latvian - 5 changes by Parastais
slovenian - 2 changes by 
swedish - 17 changes by Joel_A
2012-05-22 17:45:20 +00:00
translators
d50e2e80a2 (svn r24265) -Update from WebTranslator v3.0:
afrikaans - 21 changes by telanus
dutch - 5 changes by habell
latvian - 19 changes by Parastais
slovenian - 2 changes by 
swedish - 10 changes by Joel_A
2012-05-21 17:45:29 +00:00
translators
c685ab6ee8 (svn r24264) -Update from WebTranslator v3.0:
hungarian - 27 changes by IPG
portuguese - 1 changes by JayCity
russian - 3 changes by Lone_Wolf
slovenian - 2 changes by 
swedish - 36 changes by Joel_A
vietnamese - 3 changes by nglekhoi
2012-05-20 17:45:31 +00:00
translators
e8529ae35f (svn r24263) -Update from WebTranslator v3.0:
catalan - 88 changes by arnau
latvian - 1 changes by Parastais
slovenian - 2 changes by 
swedish - 37 changes by Joel_A, Zuu
2012-05-19 17:45:21 +00:00
translators
6701d06235 (svn r24262) -Update from WebTranslator v3.0:
catalan - 29 changes by arnau, mtormo
dutch - 9 changes by habell
latvian - 25 changes by Parastais
russian - 23 changes by Lone_Wolf
slovenian - 2 changes by 
spanish - 39 changes by Terkhen
2012-05-18 17:45:34 +00:00
translators
847505c19f (svn r24261) -Update from WebTranslator v3.0:
latvian - 18 changes by Parastais
russian - 2 changes by Lone_Wolf
slovenian - 2 changes by 
swedish - 3 changes by Joel_A
2012-05-17 17:45:22 +00:00
frosch
db09f67674 (svn r24260) -Change [FS#5126]: Make the oilrig-vehicle list accessible to specators and colour it's caption neutrally grey. 2012-05-16 22:08:46 +00:00
rubidium
c94a2d5289 (svn r24257) -Fix [FS#5112]: update some outdated documentation and make is somewhat more consistent 2012-05-16 19:34:36 +00:00
rubidium
66496c47a3 (svn r24256) -Fix: results of WT3 validation issue 2012-05-16 18:30:52 +00:00
translators
b0ae9fdbcb (svn r24255) -Update from WebTranslator v3.0:
belarusian - 17 changes by Wowanxm
catalan - 4 changes by mtormo
croatian - 84 changes by VoyagerOne
czech - 2 changes by TheLamer
dutch - 31 changes by habell, mazele
french - 3 changes by OliTTD
latvian - 44 changes by Parastais
russian - 7 changes by Lone_Wolf
slovenian - 2 changes by 
spanish - 19 changes by Terkhen
swedish - 24 changes by Joel_A, daishan
2012-05-16 17:46:00 +00:00
frosch
d351f3dae5 (svn r24252) -Fix [FS#5162]: Change the unit of the sprite-cache size setting from megabytes to megapixels, so it depends on the blitter being used. Also increase it from 64 to 128, and change the name in the cfg file, so everyone gets the new default. 2012-05-15 20:37:42 +00:00
translators
48a6e31f36 (svn r24251) -Update from WebTranslator v3.0:
belarusian - 116 changes by Wowanxm
croatian - 43 changes by VoyagerOne
english_US - 2 changes by Rubidium
italian - 2 changes by lorenzodv
russian - 15 changes by Lone_Wolf
slovenian - 2 changes by 
spanish - 39 changes by Terkhen
swedish - 14 changes by Joel_A
vietnamese - 2 changes by nglekhoi
2012-05-15 17:45:45 +00:00
frosch
c6ed8c01b3 (svn r24250) -Fix [FS#5154]: Do not immediately display error messages from parsing the cfg file, but schedule them for displaying after the GUI is prepared for it. 2012-05-14 21:04:49 +00:00
frosch
1ba36d07cf (svn r24249) -Codechange: Split the extraction of current DParams from the ErrorMessageData constructor into a separate function. 2012-05-14 21:01:54 +00:00
frosch
fd6f92a4e8 (svn r24248) -Codechange: Move ErrorMessageData class definition to header file. 2012-05-14 20:58:59 +00:00
frosch
c11d80148f (svn r24247) -Fix: If loading of int-list settings fails, use the default. 2012-05-14 20:53:39 +00:00
michi_cc
ce5c936b07 (svn r24246) -Add [FS#5052-ish]: [NewGRF] Variable with the current max speed for vehicles. 2012-05-14 19:56:49 +00:00
frosch
58d474797e (svn r24245) -Change: Move the warning about big station spreads to the setting description. 2012-05-14 17:47:33 +00:00
translators
5457f9562f (svn r24244) -Update from WebTranslator v3.0:
belarusian - 419 changes by Wowanxm
dutch - 9 changes by habell
english_US - 3 changes by Rubidium
estonian - 4 changes by Jaanus
french - 1 changes by glx
german - 1 changes by planetmaker
polish - 9 changes by Kilian
russian - 110 changes by Lone_Wolf
slovenian - 2 changes by 
swedish - 15 changes by Joel_A
2012-05-14 17:46:00 +00:00
alberth
be024e5c3e (svn r24243) -Fix: Typo fixes and wording improvements in the base language. 2012-05-13 19:01:23 +00:00
translators
c9733ad3b8 (svn r24242) -Update from WebTranslator v3.0:
belarusian - 109 changes by Wowanxm
catalan - 18 changes by mtormo
english_US - 7 changes by Rubidium
finnish - 60 changes by jpx_
french - 120 changes by OliTTD, glx
italian - 126 changes by lorenzodv
russian - 63 changes by Lone_Wolf
slovenian - 15 changes by Necrolyte
2012-05-13 17:45:43 +00:00
rubidium
b5daddbeb6 (svn r24241) -Fix: some typos and inconsistencies in the base language 2012-05-13 06:05:32 +00:00
translators
c1d2e3c1d0 (svn r24240) -Update from WebTranslator v3.0:
afrikaans - 2 changes by telanus
english_US - 132 changes by Rubidium
finnish - 66 changes by jpx_
french - 10 changes by glx
german - 126 changes by planetmaker
latvian - 11 changes by Parastais
polish - 18 changes by wojteks86
slovenian - 115 changes by Necrolyte
spanish - 1 changes by Terkhen
2012-05-12 17:45:54 +00:00
alberth
749041427b (svn r24239) -Add: Highlight setting that has its help text displayed. 2012-05-12 10:17:20 +00:00
alberth
bb12a493db (svn r24238) -Add: String to display highlight selected setting in all languages. 2012-05-12 10:14:44 +00:00
alberth
0db235aa1d (svn r24237) -Feature: Descriptions explaining the meaning of advanced settings. 2012-05-12 10:13:03 +00:00
alberth
2dd71035d0 (svn r24236) -Add: Add code to retrieve help strings from the setting tree and compute max height. 2012-05-12 10:11:41 +00:00
alberth
fc213a6dae (svn r24235) -Add: Add help-strings for the settings in the advanced settings window. 2012-05-12 10:09:56 +00:00
alberth
1d58838a97 (svn r24234) -Add: Add help-string infrastructure to the ini files 2012-05-12 10:09:00 +00:00
alberth
34a11d4b8d (svn r24233) -Codechange: Rename 'val_str' to 'str_val' to better match with 'strval' in the ini files. 2012-05-12 10:07:18 +00:00
rubidium
d20a28cfb5 (svn r24224) -Fix [FS#5159]: dereferencing uninitialised pointer (frosch) 2012-05-11 20:42:22 +00:00
translators
c8400c5fd9 (svn r24223) -Update from WebTranslator v3.0:
french - 2 changes by OliTTD
latvian - 1 changes by Parastais
polish - 10 changes by wojteks86
russian - 36 changes by Lone_Wolf
vietnamese - 5 changes by nglekhoi
2012-05-11 17:45:27 +00:00
translators
6922aec022 (svn r24222) -Update from WebTranslator v3.0:
catalan - 27 changes by mtormo
russian - 22 changes by Lone_Wolf
swedish - 24 changes by Joel_A
2012-05-10 17:45:17 +00:00
rubidium
a961276b6f (svn r24221) -Fix [FS#5166]: Lag counters were not properly reset when switching states making it possible to get disconnected for lagging when you weren't lagging 2012-05-09 19:14:36 +00:00
planetmaker
640ff642ae (svn r24220) -Change: Adopt ICU version detection to also deal with the new versioning scheme since ICU 49 2012-05-09 19:13:34 +00:00
rubidium
5bfed864a0 (svn r24219) -Fix [FS#5152]: immediately do the cargo payment on vehicle crashes instead of when they are cleared 2012-05-09 19:11:09 +00:00
rubidium
334c0e897c (svn r24218) -Fix: unbreak Croatian language 2012-05-09 18:37:44 +00:00
translators
b2f568f0a6 (svn r24217) -Update from WebTranslator v3.0:
belarusian - 1 changes by Wowanxm
2012-05-09 17:45:09 +00:00
translators
e4872254ad (svn r24216) -Update from WebTranslator v3.0:
belarusian - 1 changes by KorneySan
croatian - 39 changes by VoyagerOne
czech - 40 changes by Eskymak
dutch - 4 changes by habell
lithuanian - 39 changes by Stabilitronas
russian - 2 changes by KorneySan
slovak - 2 changes by dafree
2012-05-08 17:45:40 +00:00
frosch
74895f603f (svn r24215) -Fix: Translations. 2012-05-07 21:15:44 +00:00
frosch
6334e13d12 (svn r24214) -Fix [FS#5159] (r22794): The confirmation window to abort world generation was hidden during world generation, so actually you could not abort it. 2012-05-07 19:34:51 +00:00
translators
22707c26f5 (svn r24213) -Update from WebTranslator v3.0:
afrikaans - 19 changes by telanus
belarusian - 39 changes by Wowanxm
czech - 10 changes by Paragulis
dutch - 35 changes by habell
german - 39 changes by planetmaker
italian - 42 changes by lorenzodv
latvian - 44 changes by Parastais
polish - 31 changes by wojteks86
romanian - 1 changes by kkmic
russian - 38 changes by KorneySan
slovenian - 66 changes by Necrolyte
2012-05-07 17:45:58 +00:00
translators
3c617848ac (svn r24212) -Update from WebTranslator v3.0:
english_US - 39 changes by Rubidium
finnish - 39 changes by jpx_
french - 39 changes by glx
luxembourgish - 16 changes by Phreeze
polish - 2 changes by wojteks86
spanish - 46 changes by Terkhen
2012-05-06 17:45:33 +00:00
alberth
73f9bf3968 (svn r24211) -Change: Update other languages too with the changed autorenew string. 2012-05-06 15:05:05 +00:00
alberth
88224d001d (svn r24210) -Feature: Split the renew-months setting text in two string values (one before life time and one after). 2012-05-06 15:03:45 +00:00
alberth
8c585e5ad6 (svn r24209) -Cleanup: Remove now unused SGF_NOCOMMA value. 2012-05-06 15:00:13 +00:00
alberth
b5981bca90 (svn r24208) -Codechange: Cleanup in the drawing routine. 2012-05-06 14:59:26 +00:00
alberth
9b5655f7ea (svn r24207) -Change: Update the other languages too. 2012-05-06 14:58:16 +00:00
alberth
11f21917d6 (svn r24206) -Codechange: Move colouring of advanced setting options to the drawing code. 2012-05-06 14:56:13 +00:00
frosch
477a09d13e (svn r24205) -Feature [FS#5178-ish]: Show a hint in the supplies tab of station windows, if the station is affected by exclusive transport rights. 2012-05-06 11:38:52 +00:00
frosch
3e7642abe5 (svn r24204) -Fix: If a company is taken over or bankrupts, transfer exclusive transport rights to the new owner resp. cancel them. 2012-05-06 11:37:43 +00:00
frosch
16e913505e (svn r24203) -Fix: Make the engine name not overdraw the engine count in the autoreplace GUI. 2012-05-05 19:27:47 +00:00
frosch
bd4f090730 (svn r24202) -Change: Make the size of the details in the autoreplace GUI match more the size of the details in the purchase list. 2012-05-05 19:27:32 +00:00
frosch
a9165d3f32 (svn r24201) -Fix [FS#5170]: Mark group list dirty when setting/clearing autoreplace for an engine type. 2012-05-05 19:26:11 +00:00
frosch
fb63991851 (svn r24200) -Fix [FS#5149]: Invalidate build vehicle windows every month, in case they need resorting due to changed reliabilities. 2012-05-05 19:25:20 +00:00
translators
cf0aeaf2c7 (svn r24199) -Update from WebTranslator v3.0:
catalan - 4 changes by arnau
czech - 1 changes by Paragulis
hungarian - 10 changes by IPG
2012-05-05 17:45:18 +00:00
translators
eac39752de (svn r24198) -Update from WebTranslator v3.0:
korean - 2 changes by telk5093
polish - 46 changes by Kilian
ukrainian - 3 changes by edd_k
2012-05-04 17:45:17 +00:00
translators
120b56cbe1 (svn r24197) -Update from WebTranslator v3.0:
belarusian - 1 changes by Wowanxm
ukrainian - 2 changes by edd_k
vietnamese - 4 changes by nglekhoi
2012-05-03 17:45:23 +00:00
translators
87f86d3d2c (svn r24196) -Update from WebTranslator v3.0:
afrikaans - 33 changes by telanus
belarusian - 6 changes by KorneySan, Wowanxm
croatian - 4 changes by VoyagerOne
czech - 4 changes by Paragulis
dutch - 8 changes by habell
english_AU - 19 changes by tomas4g
english_US - 4 changes by Rubidium
finnish - 4 changes by jpx_
french - 4 changes by OliTTD
german - 4 changes by NG
italian - 4 changes by lorenzodv
lithuanian - 22 changes by Stabilitronas
polish - 4 changes by wojteks86
russian - 6 changes by KorneySan
2012-05-02 17:46:14 +00:00
translators
84a8f62834 (svn r24195) -Update from WebTranslator v3.0:
czech - 1 changes by Paragulis
2012-05-01 17:45:12 +00:00
frosch
e1fda49027 (svn r24194) -Change: Rename the 'signal_side' setting to 'train_signal_side', and add a third option while doing so. 2012-05-01 15:53:51 +00:00
frosch
599f89e641 (svn r24193) -Fix (r24191): Also update comments accordingly. 2012-05-01 15:34:45 +00:00
frosch
ec73ad1145 (svn r24192) -Fix [FS#5153-ish]: Also use default value when reading an invalid integer setting value. 2012-05-01 15:33:42 +00:00
frosch
fdd05988b7 (svn r24191) -Fix: If you consider a settings to potentially cause desyncs via NewGRFs and thus disallow changing it in network games, you should probably also sync it to clients. 2012-05-01 15:13:23 +00:00
translators
d84e94025f (svn r24190) -Update from WebTranslator v3.0:
traditional_chinese - 90 changes by Luper
czech - 11 changes by Paragulis
2012-04-30 17:45:13 +00:00
truebrain
353fd97de6 (svn r24189) -Fix: when going to fullscreen and back, restore to the resolution you were, not to the fullscreen resolution (Windows only) 2012-04-30 16:49:26 +00:00
truebrain
39912b7bde (svn r24188) -Fix-ish [FS#5151] (r1): when changing the basics of a window (fullscreen, 8bpp/32bpp), and a window already exists, it was forced out of maximize mode, and its resolution/position was reset, often causing unwanted side-effects. As a "bonus", a WC_SIZE was triggered, and if the system was going from 8bpp to 32pp, this caused a forced window update in a limbo-state of the blitter (not fully 32bpp just yet, but for sure no longer 8bpp); this could cause random memory access which could lead to ACCESS_VIOLATIONS 2012-04-30 16:48:47 +00:00
translators
b1fd2913d2 (svn r24187) -Update from WebTranslator v3.0:
russian - 2 changes by Lone_Wolf
spanish - 2 changes by Terkhen
2012-04-29 17:45:13 +00:00
frosch
16b310d8ce (svn r24186) -Feature: [NewGRF] Callback to set industry production level on construction. (andythenorth) 2012-04-28 16:44:01 +00:00
frosch
789c95d4b8 (svn r24185) -Codechange: Deduplicate some only partly deduplicated code. 2012-04-28 16:07:28 +00:00
translators
e2ad59fbe1 (svn r24184) -Update from WebTranslator v3.0:
catalan - 12 changes by arnau
hungarian - 13 changes by Brumi
polish - 30 changes by Kilian
romanian - 13 changes by tonny
2012-04-27 17:45:20 +00:00
frosch
cc1e4ca5ad (svn r24183) -Fix [FS#5169]: Town radii were not updated immediatelly after construction/destruction of houses, resulting in desyncs. 2012-04-26 21:04:18 +00:00
frosch
0d03c1ff85 (svn r24182) -Fix [FS#5169-ish]: The population of a town was computed incorrectly for overridden houses when loading a game. 2012-04-26 21:03:34 +00:00
translators
dbcc6bdcb4 (svn r24181) -Update from WebTranslator v3.0:
german - 2 changes by Jogio
2012-04-26 17:45:08 +00:00
rubidium
b926277caf (svn r24180) -Codechange/feature-ish: add cache checker for the town's cache 2012-04-25 21:06:31 +00:00
rubidium
41e5c839e0 (svn r24179) -Codechange: move some variables of Town to TownCache 2012-04-25 20:50:13 +00:00
frosch
cd50c86294 (svn r24178) -Fix [FS#5110]: The object name from property A was not displayed in the object GUI. 2012-04-24 20:01:34 +00:00
frosch
fa51dee557 (svn r24177) -Fix (r0) [FS#5148]: The arctic "shops and offices" used the "church" sprite in one of its four views. 2012-04-24 19:19:57 +00:00
frosch
5e59c5cd7f (svn r24176) -Fix (r21772): The object GUI did not draw objects when all objects of a class are disabled. 2012-04-24 17:27:50 +00:00
frosch
6baef585cf (svn r24175) -Fix (r24171): Make sure to select a object class with visible objects when opening the object GUI. 2012-04-24 17:26:08 +00:00
translators
aa0ce945c4 (svn r24174) -Update from WebTranslator v3.0:
afrikaans - 3 changes by telanus
ukrainian - 1 changes by edd_k
2012-04-23 17:45:13 +00:00
translators
e0f0eb2681 (svn r24173) -Update from WebTranslator v3.0:
afrikaans - 39 changes by telanus
latvian - 16 changes by Parastais
2012-04-22 17:45:14 +00:00
frosch
f0559db37c (svn r24172) -Cleanup: Lighthouse and transmitter no longer need special treatment to not appear in the object GUI. 2012-04-22 16:28:42 +00:00
frosch
971b3b5fa5 (svn r24171) -Fix [FS#4967, FS#5120]: Hide object specs/classes from the GUI, if they will never be available to the user. 2012-04-22 16:28:37 +00:00
frosch
00af887048 (svn r24170) -Add: Methods for translating between NewGRFClass spec indices and user interface indices. 2012-04-22 16:28:32 +00:00
frosch
34969178db (svn r24169) -Add: Make NewGRFClass distinguish between defined specs and specs visible for the user. 2012-04-22 16:28:27 +00:00
frosch
6d9a0ff723 (svn r24168) -Codechange: Simplify default station class instantiation. 2012-04-22 16:28:23 +00:00
frosch
c841a78f69 (svn r24167) -Codechange: Rename NewGRFClass::GetCount() to NewGRFClass::GetClassCount() 2012-04-22 16:28:19 +00:00
frosch
0f0e7e43cf (svn r24166) -Codechange: Turn NewGRFClass::Get(Tid, uint) and GetCount(Tid) into non-static members GetSpec(uint) and GetSpecCount(). 2012-04-22 16:28:14 +00:00
frosch
cb43494488 (svn r24165) -Codechange: Split parts of static NewGRFClass::Assign() into non-static Insert(). 2012-04-22 16:28:09 +00:00
frosch
48c44a8d21 (svn r24164) -Codechange: Split parts of static NewGRFClass::Reset() into non-static ResetClass(). 2012-04-22 16:28:04 +00:00
frosch
b3c84fcbbd (svn r24163) -Codechange: Make various members of NewGRFClass private. 2012-04-22 16:28:00 +00:00
frosch
6f4d2160c2 (svn r24162) -Codechange: Remove NewGRFClass::GetName() and SetName() in favour of using Get() and direct member access (which is needed anyway for GRF string resolving). 2012-04-22 16:27:55 +00:00
frosch
73d926c8d4 (svn r24161) -Add: Method to get a specific NewGRFClass. 2012-04-22 16:27:49 +00:00
frosch
27ffb03383 (svn r24160) -Codechange: Split parts of ObjectSpec::IsAvailable() into ObjectSpec::IsEverAvailable(). 2012-04-22 16:27:45 +00:00
frosch
1b0d3e3034 (svn r24159) -Fix: If you spent hard work on finding an available object ID, you should probably also use it instead of always 0. 2012-04-22 16:27:41 +00:00
frosch
c8ec47130d (svn r24158) -Fix (r23408): Town producing no cargo at all could spawn passenger subsidies. 2012-04-21 20:03:58 +00:00
translators
7dd0254b8e (svn r24157) -Update from WebTranslator v3.0:
afrikaans - 45 changes by telanus
belarusian - 10 changes by Wowanxm
simplified_chinese - 3 changes by chenwt0315
croatian - 12 changes by VoyagerOne
german - 12 changes by planetmaker
latvian - 24 changes by Parastais, Tranzistors
2012-04-21 17:45:33 +00:00
translators
3c6f458ecf (svn r24156) -Update from WebTranslator v3.0:
afrikaans - 36 changes by telanus
italian - 12 changes by lorenzodv
2012-04-20 17:45:13 +00:00
rubidium
27d9808f45 (svn r24155) -Fix: the music volume was set too early during startup; at a moment the configuration file wasn't read yet 2012-04-19 20:08:51 +00:00
translators
ac284757d8 (svn r24154) -Update from WebTranslator v3.0:
afrikaans - 53 changes by telanus
danish - 10 changes by mgarde
finnish - 12 changes by jpx_
lithuanian - 11 changes by Stabilitronas
brazilian_portuguese - 12 changes by Tucalipe
russian - 2 changes by Lone_Wolf
ukrainian - 12 changes by edd_k
2012-04-19 17:45:38 +00:00
rubidium
a355e123fc (svn r24153) -Fix [FS#5160]: [Squirrel] Crash when trying to create an array with negative size 2012-04-18 19:22:32 +00:00
rubidium
8d56856791 (svn r24152) -Fix [FS#5157]: [NoAI] Do not return the last 'cached' speed of vehicles when they are stopped/crashed 2012-04-18 19:21:54 +00:00
rubidium
eeb781b429 (svn r24151) -Fix: typo in script documentation 2012-04-18 19:03:12 +00:00
rubidium
90e64ebdf2 (svn r24150) -Fix (r24149): missing WT3 validation 2012-04-18 19:01:39 +00:00
translators
09d14a5733 (svn r24149) -Update from WebTranslator v3.0:
dutch - 10 changes by habell
english_US - 12 changes by Rubidium
french - 18 changes by OliTTD
korean - 13 changes by telk5093
polish - 12 changes by wojteks86
russian - 10 changes by Lone_Wolf
spanish - 10 changes by Terkhen
vietnamese - 12 changes by nglekhoi
2012-04-18 17:45:43 +00:00
michi_cc
6d5f864e25 (svn r24148) -Add [FS#4907]: South Korean and South African currencies. (PaulC) 2012-04-17 21:39:09 +00:00
michi_cc
25edf6edb8 (svn r24147) -Fix (r24132): AI regression output. 2012-04-17 20:21:09 +00:00
michi_cc
3f267db3a6 (svn r24146) -Fix [FS#5153]: Use default value when reading an invalid setting value. (Eddi) 2012-04-17 19:45:04 +00:00
michi_cc
6c8a16f36e (svn r24145) -Cleanup: Switch coding style. 2012-04-17 19:44:59 +00:00
michi_cc
f6d0bf6109 (svn r24144) -Change [FS#4605]: Reset 'convert signal' button when signal GUI is closed. (yorick) 2012-04-17 19:44:55 +00:00
michi_cc
a34dabce9c (svn r24143) -Change [FS#5145]: Improve fence placement for rail. (Eddi) 2012-04-17 19:44:51 +00:00
michi_cc
a4b02d0a5d (svn r24142) -Feature [FS#3576]: Randomise count of passengers killed in a crash. (riffraffselbow) 2012-04-17 19:44:47 +00:00
michi_cc
a2b2bc3620 (svn r24141) -Feature: Display rating in the town directory window. (Inspired by patch from MagicBuzz) 2012-04-17 19:44:41 +00:00
michi_cc
8b65e041eb (svn r24140) -Add [FS#1117]: Group name in the replace vehicle window caption. (Juanjo) 2012-04-17 19:44:30 +00:00
michi_cc
37e321044a (svn r24139) -Add: Creating a new vehicle group by drag and drop. (Based on patch by Juanjo) 2012-04-17 19:44:16 +00:00
michi_cc
0daf350922 (svn r24138) -Feature(ette): Ctrl+drag to add all vehicles with a shared order list to a group. (Juanjo) 2012-04-17 19:44:12 +00:00
michi_cc
e44a923a71 (svn r24137) -Feature(ette): Draw indicator icon in the replace vehicle window for vehicles which have a replacement set. 2012-04-17 19:44:08 +00:00
michi_cc
6a70abbd99 (svn r24136) -Feature [FS#4465]: Autoreplace vehicles only when they get old. (Vikthor) 2012-04-17 19:44:02 +00:00
michi_cc
ed56585388 (svn r24135) -Remove [FS#4757]: Tree drag size limit. 2012-04-17 19:43:57 +00:00
michi_cc
f3e295b4ec (svn r24134) -Add: Configurable limits for tree planting. 2012-04-17 19:43:52 +00:00
michi_cc
181de38ae3 (svn r24133) -Add [FS#4984]: Lithuanian currency. (devastator) 2012-04-17 19:43:47 +00:00
michi_cc
6f9668330e (svn r24132) -Change [FS#4713]: Improve randomness of tile order in the tile loop. (monoid) 2012-04-17 19:43:43 +00:00
michi_cc
32ab630bda (svn r24131) -Add [FS#1952]: Ctrl-Clicking to change colour of all colour schemes at once. (Roest) 2012-04-17 19:43:38 +00:00
michi_cc
f1c59a3159 (svn r24130) -Feature(ette): [FS#2314]: Deselect 'remove' button when changing signal types in the GUI. (Alberth) 2012-04-17 19:43:34 +00:00
michi_cc
708d5b6712 (svn r24129) -Feature [FS#3660]: Option to minimise signal distance when dragging over obstacles. (adf88) 2012-04-17 19:43:29 +00:00
michi_cc
ef8ee48044 (svn r24128) -Change: Don't let vehicles break down directly after servicing. 2012-04-17 19:43:23 +00:00
michi_cc
aa47d6c7f2 (svn r24127) -Feature [FS#1497]: Allow closing airports for incoming aircraft. (Based on patch by cirdan) 2012-04-17 19:43:18 +00:00
michi_cc
af6a33bd1c (svn r24126) -Feature [FS#3854]: Drag and drop support for the NewGRF list window. (Based on patch by sbr) 2012-04-17 19:43:13 +00:00
michi_cc
4e5da5760a (svn r24125) -Add [FS#3705]: Drag destination highlighting to the group GUI. (sbr) 2012-04-17 19:43:09 +00:00
michi_cc
bb8506032e (svn r24124) -Add [FS#4658]: [NewGRF] Misc engine flag to disable breakdown smoke. (Hirundo) 2012-04-17 19:43:04 +00:00
translators
d3c6130f3f (svn r24123) -Update from WebTranslator v3.0:
afrikaans - 8 changes by telanus
french - 22 changes by OliTTD
slovak - 6 changes by teso
2012-04-17 17:45:20 +00:00
translators
9311f13a2f (svn r24122) -Update from WebTranslator v3.0:
afrikaans - 139 changes by telanus
danish - 3 changes by beruic
french - 1 changes by OliTTD
2012-04-16 17:45:17 +00:00
rubidium
25987e2e8b (svn r24121) -Merge: documentation update from 1.2 2012-04-15 18:59:04 +00:00
translators
a777fe1b3c (svn r24119) -Update from WebTranslator v3.0:
afrikaans - 114 changes by telanus
2012-04-15 17:45:08 +00:00
translators
6e9241e486 (svn r24115) -Update from WebTranslator v3.0:
polish - 27 changes by Kilian
2012-04-14 17:45:09 +00:00
translators
cb1aff2a33 (svn r24114) -Update from WebTranslator v3.0:
polish - 15 changes by Kilian
2012-04-13 17:45:09 +00:00
translators
b6fcfc375a (svn r24113) -Update from WebTranslator v3.0:
traditional_chinese - 3 changes by chaut0
french - 6 changes by OliTTD
2012-04-12 17:45:14 +00:00
translators
02718e5252 (svn r24112) -Update from WebTranslator v3.0:
spanish - 1 changes by Terkhen
2012-04-11 17:45:08 +00:00
rubidium
54e36c4ff8 (svn r24111) -Codechange: use Colour more instead of manually bitstuffing 2012-04-10 20:16:51 +00:00
translators
bf86748300 (svn r24110) -Update from WebTranslator v3.0:
korean - 1 changes by telk5093
latvian - 45 changes by Parastais
tamil - 25 changes by aswn
2012-04-09 17:45:18 +00:00
michi_cc
afdaddd392 (svn r24109) -Fix (r24099): Warning from not using size_t to store the return value of strlen(). 2012-04-09 13:08:20 +00:00
frosch
d7d89bc806 (svn r24108) -Fix [FS#5142]: When starting GS or AI, always use the settings of the game, not the new-game settings. 2012-04-09 12:35:01 +00:00
frosch
c425368a17 (svn r24107) -Fix [FS#5143] (r3181): Glass-sprite of bubble-generator was not drawn anymore for completely constructed tiles. 2012-04-09 10:18:10 +00:00
translators
585563e620 (svn r24106) -Update from WebTranslator v3.0:
latvian - 13 changes by Parastais
2012-04-08 17:45:08 +00:00
alberth
0d74c074dd (svn r24105) -Feature: Be more careful with the population of a small town while placing a statue. 2012-04-08 17:30:20 +00:00
alberth
2911732841 (svn r24104) -Codechange: Output the resulting tile through the user data. 2012-04-08 17:29:00 +00:00
alberth
a01948dbf3 (svn r24103) -Codechange: Handle clear tiles separately from house tiles. 2012-04-08 17:27:47 +00:00
alberth
c876d18320 (svn r24102) -Codechange: Refactor tile clearability test out of the statue callback. 2012-04-08 17:26:59 +00:00
alberth
f607538882 (svn r24101) -Codechange: Reverse a condition for increased readability. 2012-04-08 17:26:01 +00:00
rubidium
1e817ae241 (svn r24100) -Fix: also provide translated comments in the desktop file without language name postfix 2012-04-08 14:29:31 +00:00
alberth
b57bef91a1 (svn r24099) -Add: Output list of -d option facilities with in the help text. 2012-04-07 20:55:55 +00:00
translators
fd2900f863 (svn r24098) -Update from WebTranslator v3.0:
french - 9 changes by OliTTD
2012-04-07 17:45:09 +00:00
translators
e86a13818e (svn r24097) -Update from WebTranslator v3.0:
latvian - 14 changes by Parastais
2012-04-06 17:45:08 +00:00
translators
25809a49b9 (svn r24094) -Update from WebTranslator v3.0:
finnish - 3 changes by jpx_
latvian - 11 changes by Parastais
polish - 20 changes by Kilian
vietnamese - 2 changes by myquartz
2012-04-05 17:45:23 +00:00
translators
454421ef54 (svn r24093) -Update from WebTranslator v3.0:
french - 16 changes by OliTTD
polish - 67 changes by Kilian
brazilian_portuguese - 1 changes by Tucalipe
2012-04-04 17:45:17 +00:00
frosch
946749fb01 (svn r24089) -Fix [FS#5136]: Conflicting strategies for resizing the main toolbar and statusbar after resizing the main window. 2012-04-03 20:09:41 +00:00
translators
1e8e911577 (svn r24088) -Update from WebTranslator v3.0:
latvian - 39 changes by Parastais
malay - 47 changes by kazlan68
2012-04-03 17:45:12 +00:00
translators
af96d2733f (svn r24087) -Update from WebTranslator v3.0:
dutch - 3 changes by Parody
french - 4 changes by OliTTD
korean - 1 changes by telk5093
latvian - 30 changes by Parastais
2012-04-02 17:45:21 +00:00
frosch
70ad670125 (svn r24086) -Fix [FS#5131] (r23504): Cloning orders of aircraft with limited range failed. 2012-04-01 19:56:08 +00:00
translators
e51018cbf3 (svn r24085) -Update from WebTranslator v3.0:
hungarian - 1 changes by Brumi
latvian - 15 changes by Parastais
2012-04-01 17:45:12 +00:00
translators
b9828a8b59 (svn r24081) -Update from WebTranslator v3.0:
irish - 17 changes by tem
2012-03-31 17:45:06 +00:00
translators
c0efbed55a (svn r24080) -Update from WebTranslator v3.0:
german - 2 changes by Jogio
irish - 38 changes by tem
italian - 1 changes by Snail_
latvian - 44 changes by Parastais
polish - 4 changes by Kilian
spanish - 2 changes by Terkhen
ukrainian - 1 changes by edd_k
2012-03-30 17:45:38 +00:00
translators
de4b459413 (svn r24079) -Update from WebTranslator v3.0:
french - 1 changes by OliTTD
latvian - 7 changes by Parastais
polish - 1 changes by wojteks86
2012-03-29 17:45:18 +00:00
michi_cc
7e438d27f1 (svn r24078) -Fix [FS#5093,FS#5130] (r24071): A fix that breaks all other cases isn't really a fix. Redo it to make sure that reservations of trains entering or exiting depots are properly made and freed. 2012-03-29 12:27:34 +00:00
translators
4bbea6ee63 (svn r24077) -Update from WebTranslator v3.0:
latvian - 94 changes by Parastais
romanian - 2 changes by kkmic
vietnamese - 1 changes by nglekhoi
2012-03-28 17:45:17 +00:00
translators
ff8cad9316 (svn r24076) -Update from WebTranslator v3.0:
french - 4 changes by OliTTD
italian - 1 changes by lorenzodv
latvian - 1 changes by Parastais
lithuanian - 2 changes by Stabilitronas
luxembourgish - 8 changes by Phreeze
polish - 1 changes by wojteks86
2012-03-27 17:45:35 +00:00
translators
e6292c55cf (svn r24072) -Update from WebTranslator v3.0:
belarusian - 1 changes by Wowanxm
catalan - 1 changes by arnau
croatian - 1 changes by VoyagerOne
dutch - 1 changes by habell
english_US - 1 changes by Rubidium
finnish - 3 changes by jpx_
french - 1 changes by OliTTD
hungarian - 1 changes by IPG
latvian - 30 changes by Parastais
russian - 1 changes by Lone_Wolf
serbian - 1 changes by etran
2012-03-26 17:45:52 +00:00
michi_cc
f8b62a3c7a (svn r24071) -Fix [FS#5093]: Reversing trains while they were entering or leaving a depot could lead to stuck trains. 2012-03-25 23:42:49 +00:00
rubidium
1adb9a5c85 (svn r24070) -Fix [FS#5098]: the 'last joined' server was not properly selected anymore (adf88) 2012-03-25 19:46:59 +00:00
rubidium
f2f939906e (svn r24069) -Fix (r24062): crash when not having a valid last joined address 2012-03-25 19:43:17 +00:00
rubidium
113746b3a6 (svn r24068) -Change/fix [FS#5103]: significantly reduce the area that is redrawn for text effects (Rhamphoryncus) 2012-03-25 19:30:05 +00:00
rubidium
180e4e4c66 (svn r24067) -Change/fix: do not redraw up to 25% of the map when making a new vehicle visible for the first time 2012-03-25 19:24:32 +00:00
rubidium
6db0753a46 (svn r24066) -Change: do not redraw the text effect when nothing changed (Rhamphoryncus) 2012-03-25 19:23:59 +00:00
rubidium
927734e6ce (svn r24065) -Feature-ish [FS#5101]: debug option for showing the redrawn dirty blocks/rectangles 2012-03-25 19:06:59 +00:00
rubidium
c8ce0faca4 (svn r24064) -Fix [FS#5121]: make the full snowedness level of houses the same as roads and rails 2012-03-25 18:19:21 +00:00
rubidium
02d9ecde6d (svn r24063) -Fix [FS#5125]: with certain versions of GCC and compiler flags the compiler could reorder some code badly causing the 32bpp depot flag not working 2012-03-25 18:18:35 +00:00
rubidium
357843378f (svn r24062) -Fix [FS#5097]: immediately start querying the last joined server instead of waiting for the requery loop (adf88) 2012-03-25 18:17:41 +00:00
translators
1cf1d330f4 (svn r24061) -Update from WebTranslator v3.0:
latvian - 101 changes by Parastais
2012-03-25 17:45:07 +00:00
michi_cc
8254b5a7e6 (svn r24060) -Fix [FS#5123] (r23504): Do not freeze aircraft mid-flight when skipping to an out-of-range destination. 2012-03-25 11:29:33 +00:00
translators
8d423137fd (svn r24059) -Update from WebTranslator v3.0:
latvian - 36 changes by Parastais
2012-03-24 18:45:11 +00:00
frosch
77ff4c9155 (svn r24058) -Fix [FS#5124]: Wrong numbering of string parameters. 2012-03-24 15:21:07 +00:00
translators
a0b258ef12 (svn r24057) -Update from WebTranslator v3.0:
latvian - 7 changes by Parastais
thai - 41 changes by kenny
ukrainian - 2 changes by edd_k
welsh - 3 changes by kazzie
2012-03-23 18:45:23 +00:00
translators
c08d0a022f (svn r24056) -Update from WebTranslator v3.0:
croatian - 2 changes by VoyagerOne
german - 1 changes by Jogio
latvian - 6 changes by Parastais
thai - 96 changes by kenny
2012-03-22 18:45:19 +00:00
translators
e40ad1c996 (svn r24055) -Update from WebTranslator v3.0:
catalan - 2 changes by arnau
german - 2 changes by NG
greek - 140 changes by astyanax
latvian - 25 changes by Parastais
lithuanian - 17 changes by Stabilitronas
2012-03-21 18:45:27 +00:00
translators
fc414bdb63 (svn r24054) -Update from WebTranslator v3.0:
belarusian - 1 changes by Wowanxm
dutch - 2 changes by habell
latvian - 45 changes by Parastais
lithuanian - 46 changes by Stabilitronas
brazilian_portuguese - 16 changes by laurentalp
romanian - 2 changes by kkmic
2012-03-20 18:45:36 +00:00
michi_cc
bf3505ca1b (svn r24053) -Fix (r23947) [FS#5111]: Crash when timetabling a maximum travel speed of 0. 2012-03-20 13:11:20 +00:00
frosch
0643a69764 (svn r24052) -Fix (r23883) [FS#5107]: Imported GRF sounds were inserted into the wrong slots. 2012-03-19 22:55:29 +00:00
frosch
2007f7affd (svn r24051) -Fix: Comment. 2012-03-19 22:52:37 +00:00
frosch
ee03cda858 (svn r24050) -Fix: Realsprites inside the action 11 block were not skipped correctly. 2012-03-19 22:38:54 +00:00
planetmaker
ad9d1ca639 (svn r24048) -Cleanup: Sync credits in readme and ingame information 2012-03-19 20:01:55 +00:00
translators
a40873334f (svn r24047) -Update from WebTranslator v3.0:
belarusian - 2 changes by KorneySan, Wowanxm
czech - 2 changes by Eskymak
korean - 1 changes by telk5093
latvian - 57 changes by Parastais
lithuanian - 23 changes by Stabilitronas
polish - 1 changes by wojteks86
portuguese - 5 changes by SupSuper
russian - 2 changes by Lone_Wolf
vietnamese - 2 changes by nglekhoi
2012-03-19 18:46:01 +00:00
translators
64d1fb3502 (svn r24042) -Update from WebTranslator v3.0:
english_US - 2 changes by Rubidium
french - 2 changes by OliTTD, glx
hungarian - 2 changes by Brumi
italian - 2 changes by lorenzodv
korean - 1 changes by telk5093
lithuanian - 64 changes by Stabilitronas
portuguese - 5 changes by JayCity
serbian - 2 changes by etran
spanish - 2 changes by Terkhen
tamil - 115 changes by aswn
2012-03-18 16:54:51 +00:00
frosch
a1f2ad880d (svn r24040) -Fix [FS#5095]: Improve error messages wrt. the placement restrictions of banks, water towers and toy shops. 2012-03-17 19:48:26 +00:00
translators
1a11a99a24 (svn r24039) -Update from WebTranslator v3.0:
basque - 6 changes by Thadah
korean - 52 changes by telk5093
lithuanian - 28 changes by Stabilitronas
swedish - 4 changes by Zuu
2012-03-17 18:45:28 +00:00
frosch
49fdf6dd26 (svn r24038) -Fix (r23472): After opening a textwindow with the monospaced font, all other text started glitching. 2012-03-17 16:42:34 +00:00
frosch
161b6c348b (svn r24037) -Feature: Allow display of baseset textfiles. (LordAro) 2012-03-17 15:45:37 +00:00
rubidium
2c956cac80 (svn r24035) -Add: "missing" strings to translations that were merely control codes 2012-03-17 11:34:45 +00:00
rubidium
4e3b95067b (svn r24033) -Fix: reset "is random" status of temporary variable during saveload as it's not always written to when loading an AI which means it'd be taking the is random setting of another AI. 2012-03-17 11:14:25 +00:00
translators
a39bed9ae6 (svn r24032) -Update from WebTranslator v3.0:
frisian - 13 changes by Fopper
korean - 1 changes by junho2813
norwegian_nynorsk - 1 changes by mantaray
welsh - 15 changes by kazzie
2012-03-16 18:45:20 +00:00
yexo
620a96f77f (svn r24031) -Feature: increase the station class limit from 32 to 256 2012-03-15 22:42:28 +00:00
translators
4725f8c0a2 (svn r24030) -Update from WebTranslator v3.0:
basque - 16 changes by Thadah
danish - 16 changes by mgarde
french - 6 changes by OliTTD
lithuanian - 47 changes by Stabilitronas
2012-03-15 18:45:25 +00:00
yexo
1f0593e7ca (svn r24029) -Change: [NoAI] make AIEngine::IsArticulated return true if the articulated callback flag is set, don't try to run the callback. 2012-03-14 20:49:54 +00:00
translators
c7ae0b4db6 (svn r24028) -Update from WebTranslator v3.0:
hungarian - 2 changes by Brumi
latvian - 11 changes by Parastais
2012-03-14 18:45:11 +00:00
translators
ac2a58e252 (svn r24027) -Update from WebTranslator v3.0:
croatian - 10 changes by VoyagerOne
czech - 1 changes by Eskymak
latvian - 4 changes by Parastais
ukrainian - 1 changes by edd_k
2012-03-13 18:45:24 +00:00
translators
2d5e90a307 (svn r24026) -Update from WebTranslator v3.0:
belarusian - 1 changes by Wowanxm
czech - 43 changes by Eskymak
dutch - 15 changes by habell
english_AU - 14 changes by tomas4g
french - 1 changes by OliTTD
latvian - 33 changes by Parastais
lithuanian - 2 changes by Stabilitronas
norwegian_bokmal - 10 changes by mantaray
polish - 15 changes by wojteks86
romanian - 10 changes by kkmic
serbian - 11 changes by etran
ukrainian - 6 changes by edd_k
vietnamese - 14 changes by nglekhoi
2012-03-12 18:46:09 +00:00
translators
5f1347c0d4 (svn r24025) -Update from WebTranslator v3.0:
basque - 14 changes by HerrBasque
catalan - 15 changes by arnau
english_US - 1 changes by Rubidium
french - 1 changes by glx
german - 1 changes by Jogio
italian - 19 changes by lorenzodv
korean - 7 changes by telk5093
latvian - 14 changes by Parastais
lithuanian - 1 changes by Stabilitronas
russian - 3 changes by Lone_Wolf
spanish - 9 changes by Terkhen
turkish - 25 changes by niw3
ukrainian - 22 changes by Fixer
vietnamese - 1 changes by nglekhoi
2012-03-11 18:46:48 +00:00
rubidium
c9ad61651b (svn r24024) -Update: translation w.r.t. the changes in r24023 2012-03-10 19:20:02 +00:00
rubidium
bf6434abaf (svn r24023) -Fix [FS#5090]: pass cases down into the list of cargos 2012-03-10 19:18:04 +00:00
rubidium
19923e81f9 (svn r24022) -Add: CARGO_LIST control code for strings 2012-03-10 19:04:49 +00:00
translators
b65c2def5c (svn r24021) -Update from WebTranslator v3.0:
english_US - 13 changes by Rubidium
finnish - 9 changes by jpx_
french - 9 changes by OliTTD, glx
german - 1 changes by planetmaker
2012-03-10 18:45:21 +00:00
frosch
102f2d548f (svn r24020) -Fix [FS#4898]: Unify the spacing in 'AI/Game Script' and never just say 'Game' when 'Game Script' is meant. 2012-03-10 16:55:46 +00:00
translators
df01eec035 (svn r24019) -Update from WebTranslator v3.0:
french - 24 changes by OliTTD
2012-03-09 18:45:07 +00:00
translators
136c24660c (svn r24018) -Update from WebTranslator v3.0:
danish - 21 changes by mgarde
french - 7 changes by OliTTD
luxembourgish - 8 changes by Phreeze
norwegian_bokmal - 25 changes by mantaray
tamil - 40 changes by aswn
2012-03-08 18:45:23 +00:00
translators
8ec9574819 (svn r24017) -Update from WebTranslator v3.0:
swedish - 1 changes by Zuu
2012-03-06 18:45:07 +00:00
translators
0254433a41 (svn r24016) -Update from WebTranslator v3.0:
french - 1 changes by OliTTD
latvian - 35 changes by Parastais
slovenian - 10 changes by Necrolyte
2012-03-05 18:45:19 +00:00
rubidium
3e34b0b1c1 (svn r24012) -Fix (r24011): Luxembourgish got messed up by accident 2012-03-04 17:11:18 +00:00
translators
f2549ca92e (svn r24011) -Update from WebTranslator v3.0:
catalan - 1 changes by arnau
german - 4 changes by Jogio
italian - 1 changes by Snail_
tamil - 24 changes by aswn
2012-03-04 17:09:03 +00:00
rubidium
22637f139f (svn r24008) -Cleanup/doc: try not to mention (No)AI in script APIs 2012-03-04 16:54:12 +00:00
rubidium
e6a828def1 (svn r24006) -Fix [FS#5088]: AI used in names in API for GSOrder 2012-03-04 16:40:06 +00:00
translators
26df0fb593 (svn r24002) -Update from WebTranslator v3.0:
croatian - 9 changes by VoyagerOne
hungarian - 5 changes by Brumi
2012-03-03 18:45:12 +00:00
translators
f25144bdc0 (svn r24001) -Update from WebTranslator v3.0:
portuguese - 1 changes by JayCity
2012-03-02 18:45:09 +00:00
translators
b93594cfe1 (svn r24000) -Update from WebTranslator v3.0:
french - 13 changes by OliTTD
latvian - 5 changes by Parastais
romanian - 1 changes by kkmic
serbian - 4 changes by etran
vietnamese - 1 changes by nglekhoi
2012-03-01 18:45:26 +00:00
translators
04cccbb094 (svn r23999) -Update from WebTranslator v3.0:
belarusian - 1 changes by Wowanxm
french - 67 changes by OliTTD
greek - 7 changes by vitalblue
indonesian - 4 changes by prof
italian - 1 changes by lorenzodv
2012-02-29 18:45:26 +00:00
translators
1c117c9e29 (svn r23998) -Update from WebTranslator v3.0:
basque - 106 changes by HerrBasque
english_AU - 9 changes by tomas4g
french - 17 changes by OliTTD
german - 2 changes by NG
greek - 25 changes by kyrm
hungarian - 6 changes by IPG
italian - 1 changes by Snail_
latvian - 5 changes by Parastais
norwegian_nynorsk - 35 changes by eloekset
brazilian_portuguese - 81 changes by Tucalipe
spanish - 1 changes by HerrBasque
2012-02-28 18:46:04 +00:00
rubidium
81d930dcfb (svn r23997) -Fix: WT3 validation errors 2012-02-27 18:49:05 +00:00
translators
778c903c81 (svn r23996) -Update from WebTranslator v3.0:
afrikaans - 82 changes by Maccie123
basque - 12 changes by HerrBasque
belarusian - 2 changes by KorneySan
simplified_chinese - 47 changes by Gavin
dutch - 4 changes by habell
english_AU - 11 changes by tomas4g
french - 26 changes by OliTTD
indonesian - 6 changes by fanioz
korean - 22 changes by telk5093
latvian - 8 changes by Parastais
polish - 2 changes by wojteks86
russian - 2 changes by KorneySan
slovak - 10 changes by klingacik
welsh - 5 changes by kazzie
2012-02-27 18:46:02 +00:00
michi_cc
89daed858b (svn r23995) -Fix [FS#5079]: Improve rounding when converting display speeds to internal speeds. 2012-02-27 13:22:38 +00:00
translators
0559f65825 (svn r23994) -Update from WebTranslator v3.0:
belarusian - 2 changes by Wowanxm
danish - 69 changes by mgarde
english_US - 1 changes by Rubidium
estonian - 8 changes by taavi
finnish - 9 changes by jpx_
indonesian - 13 changes by adjayanto
italian - 1 changes by lorenzodv
latvian - 12 changes by Parastais
lithuanian - 2 changes by Stabilitronas
maltese - 12 changes by RCTMASTA
marathi - 2 changes by amitst
norwegian_bokmal - 1 changes by meisme
polish - 9 changes by CrySec
russian - 2 changes by akasoft
spanish - 2 changes by Terkhen
tamil - 48 changes by aswn
ukrainian - 1 changes by Fixer
2012-02-26 18:46:36 +00:00
rubidium
7893ef7b1c (svn r23993) -Cleanup: remove some disable directives from the NFO as they aren't needed anymore with newer GRFCodec/NFORenum 2012-02-26 08:23:32 +00:00
rubidium
974a08bf60 (svn r23992) -Fix: compilation without freetype 2012-02-25 22:18:53 +00:00
frosch
031f6ee611 (svn r23991) -Fix [FS#5076]: Also display the cargo subtype for vehicles which have no capacity, but a subtype. 2012-02-25 20:47:16 +00:00
translators
b4e1361302 (svn r23990) -Update from WebTranslator v3.0:
catalan - 5 changes by arnau
simplified_chinese - 9 changes by chenwt0315
french - 3 changes by glx
frisian - 1 changes by Flexo
korean - 6 changes by telk5093
norwegian_bokmal - 3 changes by kristoffer_hh
polish - 5 changes by nouwak
portuguese - 10 changes by JayCity
romanian - 16 changes by tonny
serbian - 1 changes by etran
swedish - 5 changes by Zuu
ukrainian - 29 changes by Madvin
urdu - 26 changes by haider
vietnamese - 7 changes by nglekhoi
welsh - 8 changes by kazzie
2012-02-25 18:46:09 +00:00
frosch
058017e178 (svn r23989) -Fix-ish: Zero the offsets of disabled zoomlevels. 2012-02-25 17:39:34 +00:00
frosch
dac51654fe (svn r23988) -Fix: Typo in comment. 2012-02-25 17:22:57 +00:00
frosch
df54f25efe (svn r23987) -Fix (r23000): Also reset the font glyph cache when switching blitters. 2012-02-25 17:20:02 +00:00
frosch
3d381403a8 (svn r23986) -Fix (r23889): Invalid reads when scaling an odd-sized sprite smaller. 2012-02-25 17:18:17 +00:00
rubidium
e3c665a3cb (svn r23985) -Fix [FS#5074]: inconsistent quit/abandon/exit game/scenario/editor strings 2012-02-25 13:58:06 +00:00
rubidium
d7cae0ab96 (svn r23984) -Fix [FS#5082]: fix the order of lights on the helipad (PaulC) 2012-02-25 08:45:48 +00:00
rubidium
27cf8de733 (svn r23983) -Fix [FS#5083]: tarred heightmaps wouldn't be found 2012-02-25 08:42:39 +00:00
rubidium
7aeb89c984 (svn r23982) -Codechange: use NFO v32 for the extra graphics 2012-02-24 22:29:44 +00:00
rubidium
46b08db917 (svn r23981) -Codechange: reduce GRF size by a few percent by letting GRFCodec determine the best compression 2012-02-24 22:19:45 +00:00
rubidium
74785478ec (svn r23980) -Fix (r23977): crash when starting with the 32bpp anim blitter 2012-02-23 21:10:08 +00:00
translators
2015e32361 (svn r23979) -Update from WebTranslator v3.0:
urdu - 3 changes by haider
2012-02-23 18:45:06 +00:00
rubidium
4db85fcc4d (svn r23978) -Fix: [SDL] Palette update was done too late making switching from 8bpp -> 32bpp look ugly 2012-02-23 16:23:09 +00:00
rubidium
37a4acc7e0 (svn r23977) -Fix: don't load a game during UpdateWindows as that might trigger changing the blitter which triggers re-entrant locking 2012-02-23 16:22:20 +00:00
michi_cc
0aecd1fa7b (svn r23976) -Fix (r23889): Sprites of different zoom levels were not always padded correctly to a common size. 2012-02-23 12:13:30 +00:00
translators
525dbac22f (svn r23975) -Update from WebTranslator v3.0:
french - 2 changes by OliTTD
norwegian_bokmal - 44 changes by mantaray
urdu - 73 changes by haider
2012-02-22 18:45:16 +00:00
translators
d3f5e453ca (svn r23974) -Update from WebTranslator v3.0:
french - 1 changes by OliTTD
greek - 18 changes by geraki
serbian - 15 changes by etran
urdu - 31 changes by haider
2012-02-21 18:45:24 +00:00
michi_cc
5aeae7ca49 (svn r23973) -Fix (r23947): Also save the maximum travel speed for the current vehicle order. 2012-02-21 17:25:17 +00:00
translators
36d7f10911 (svn r23972) -Update from WebTranslator v3.0:
korean - 54 changes by junho2813, telk5093
latvian - 45 changes by Parastais
ukrainian - 11 changes by edd_k
urdu - 194 changes by haider
2012-02-20 18:45:21 +00:00
rubidium
a5cb454e94 (svn r23969) -Codechange: trunk heads to 1.3 now 2012-02-19 19:14:17 +00:00
598 changed files with 58021 additions and 35449 deletions

View File

@@ -10,13 +10,9 @@
#
# The revision is needed for the bundle name and creating an OSX application bundle.
ifdef REVISION
REV := $(REVISION)
else
# Detect the revision
VERSIONS := $(shell AWK="$(AWK)" "$(ROOT_DIR)/findversion.sh")
REV := $(shell echo "$(VERSIONS)" | cut -f 1 -d' ')
endif
# Make sure we have something in REV
ifeq ($(REV),)
@@ -30,11 +26,13 @@ endif
# An OSX application bundle needs the data files, lang files and openttd executable in a different location.
ifdef OSXAPP
AI_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/ai
GAME_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/game
BASESET_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/baseset
LANG_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/Resources/lang
TTD_DIR = $(BUNDLE_DIR)/$(OSXAPP)/Contents/MacOS
else
AI_DIR = $(BUNDLE_DIR)/ai
GAME_DIR = $(BUNDLE_DIR)/game
BASESET_DIR = $(BUNDLE_DIR)/baseset
LANG_DIR = $(BUNDLE_DIR)/lang
TTD_DIR = $(BUNDLE_DIR)
@@ -49,6 +47,7 @@ bundle: all
$(Q)mkdir -p "$(BUNDLE_DIR)/scripts"
$(Q)mkdir -p "$(TTD_DIR)"
$(Q)mkdir -p "$(AI_DIR)"
$(Q)mkdir -p "$(GAME_DIR)"
$(Q)mkdir -p "$(BASESET_DIR)"
$(Q)mkdir -p "$(LANG_DIR)"
ifdef OSXAPP
@@ -63,6 +62,7 @@ ifeq ($(OS),UNIX)
endif
$(Q)cp "$(BIN_DIR)/$(TTD)" "$(TTD_DIR)/"
$(Q)cp "$(BIN_DIR)/ai/"compat_*.nut "$(AI_DIR)/"
$(Q)cp "$(BIN_DIR)/game/"compat_*.nut "$(GAME_DIR)/"
$(Q)cp "$(BIN_DIR)/baseset/"*.grf "$(BASESET_DIR)/"
$(Q)cp "$(BIN_DIR)/baseset/"*.obg "$(BASESET_DIR)/"
$(Q)cp "$(BIN_DIR)/baseset/"*.obs "$(BASESET_DIR)/"
@@ -73,7 +73,6 @@ endif
$(Q)cp "$(ROOT_DIR)/COPYING" "$(BUNDLE_DIR)/"
$(Q)cp "$(ROOT_DIR)/known-bugs.txt" "$(BUNDLE_DIR)/"
$(Q)cp "$(ROOT_DIR)/docs/multiplayer.txt" "$(BUNDLE_DIR)/docs/"
$(Q)cp "$(ROOT_DIR)/docs/32bpp.txt" "$(BUNDLE_DIR)/docs/"
$(Q)cp "$(ROOT_DIR)/changelog.txt" "$(BUNDLE_DIR)/"
ifdef MAN_DIR
$(Q)mkdir -p "$(BUNDLE_DIR)/man/"
@@ -85,7 +84,7 @@ endif
$(Q)cp "$(BIN_DIR)/scripts/"* "$(BUNDLE_DIR)/scripts/"
ifdef MENU_DIR
$(Q)cp "$(ROOT_DIR)/media/openttd.desktop" "$(BUNDLE_DIR)/media/"
$(Q)$(AWK) -f "$(ROOT_DIR)/media/openttd.desktop.translation.awk" "$(SRC_DIR)/lang/"*.txt | $(SORT) >> "$(BUNDLE_DIR)/media/openttd.desktop"
$(Q)$(AWK) -f "$(ROOT_DIR)/media/openttd.desktop.translation.awk" "$(SRC_DIR)/lang/"*.txt | $(SORT) | $(AWK) -f "$(ROOT_DIR)/media/openttd.desktop.filter.awk" >> "$(BUNDLE_DIR)/media/openttd.desktop"
$(Q)sed s/=openttd/=$(BINARY_NAME)/g "$(BUNDLE_DIR)/media/openttd.desktop" > "$(ROOT_DIR)/media/openttd.desktop.install"
endif
ifeq ($(TTD), openttd.exe)

View File

@@ -36,6 +36,7 @@ endif
GRFCODEC := !!GRFCODEC!!
NFORENUM := !!NFORENUM!!
CC_BUILD := !!CC_BUILD!!
MD5SUM := $(shell [ "$(OS)" = "OSX" ] && echo "md5 -r" || echo "md5sum")
# Some "should not be changed" settings.
@@ -63,7 +64,7 @@ $(BIN_DIR)/openttd.grf: $(OBJS_DIR)/openttd.grf
$(OBJS_DIR)/openttd.grf: $(PNG_FILES) $(NFO_FILES) $(OBJS_DIR)/sprites
$(E) '$(STAGE) Assembling openttd.nfo'
$(Q)-cp $(PNG_FILES) $(OBJS_DIR)/sprites 2> /dev/null
$(Q) gcc -I$(GRF_DIR) -C -E - < "$(GRF_DIR)/openttd.nfo" | sed -e '/^#/d' -e '/^$$/d' > $(OBJS_DIR)/sprites/openttd.nfo
$(Q) $(CC_BUILD) -nostdinc -I$(GRF_DIR) -C -E - < "$(GRF_DIR)/openttd.nfo" | sed -e '/^#/d' -e '/^$$/d' > $(OBJS_DIR)/sprites/openttd.nfo
$(Q) $(NFORENUM) -s $(OBJS_DIR)/sprites/openttd.nfo
$(E) '$(STAGE) Compiling openttd.grf'
$(Q) $(GRFCODEC) -n -s -e -p1 $(OBJS_DIR)/openttd.grf

View File

@@ -41,7 +41,6 @@ TTDS = $(SRC_DIRS:%=%/$(TTD))
OS = !!OS!!
OSXAPP = !!OSXAPP!!
LIPO = !!LIPO!!
REVISION = !!REVISION!!
AWK = !!AWK!!
SORT = !!SORT!!
DISTCC = !!DISTCC!!

View File

@@ -14,6 +14,7 @@ LANGS_SRC = $(shell ls $(LANG_DIR)/*.txt)
LANGS = $(LANGS_SRC:$(LANG_DIR)/%.txt=%.lng)
CXX_BUILD = !!CXX_BUILD!!
CFLAGS_BUILD = !!CFLAGS_BUILD!!
CXXFLAGS_BUILD= !!CXXFLAGS_BUILD!!
LDFLAGS_BUILD = !!LDFLAGS_BUILD!!
STRGEN_FLAGS = !!STRGEN_FLAGS!!
STAGE = !!STAGE!!
@@ -44,23 +45,23 @@ all: table/strings.h $(LANGS)
strgen_base.o: $(SRC_DIR)/strgen/strgen_base.cpp $(SRC_DIR)/strgen/strgen.h endian_host.h $(SRC_DIR)/table/control_codes.h $(SRC_DIR)/table/strgen_tables.h
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSTRGEN -c -o $@ $<
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $<
strgen.o: $(SRC_DIR)/strgen/strgen.cpp $(SRC_DIR)/strgen/strgen.h endian_host.h $(SRC_DIR)/table/control_codes.h $(SRC_DIR)/table/strgen_tables.h
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSTRGEN -c -o $@ $<
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $<
string.o: $(SRC_DIR)/string.cpp endian_host.h
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSTRGEN -c -o $@ $<
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $<
alloc_func.o: $(SRC_DIR)/core/alloc_func.cpp endian_host.h
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSTRGEN -c -o $@ $<
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $<
getoptdata.o: $(SRC_DIR)/misc/getoptdata.cpp $(SRC_DIR)/misc/getoptdata.h
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/misc/%.cpp=%.cpp)'
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSTRGEN -c -o $@ $<
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSTRGEN -c -o $@ $<
lang/english.txt: $(LANG_DIR)/english.txt
$(Q)mkdir -p lang
@@ -68,7 +69,7 @@ lang/english.txt: $(LANG_DIR)/english.txt
$(STRGEN): alloc_func.o string.o strgen_base.o strgen.o getoptdata.o
$(E) '$(STAGE) Compiling and Linking $@'
$(Q)$(CXX_BUILD) $(LDFLAGS_BUILD) $^ -o $@
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) $^ -o $@
table/strings.h: lang/english.txt $(STRGEN)
$(E) '$(STAGE) Generating $@'
@@ -87,7 +88,7 @@ endian_host.h: $(ENDIAN_CHECK)
$(ENDIAN_CHECK): $(SRC_DIR)/endian_check.cpp
$(E) '$(STAGE) Compiling and Linking $@'
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $< -o $@
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) $< -o $@
depend:

View File

@@ -10,6 +10,7 @@ ENDIAN_CHECK = !!ENDIAN_CHECK!!
SRC_DIR = !!SRC_DIR!!
CXX_BUILD = !!CXX_BUILD!!
CFLAGS_BUILD = !!CFLAGS_BUILD!!
CXXFLAGS_BUILD = !!CXXFLAGS_BUILD!!
LDFLAGS_BUILD = !!LDFLAGS_BUILD!!
STAGE = !!STAGE!!
SETTING_OBJS_DIR = !!SETTING_OBJS_DIR!!
@@ -29,27 +30,27 @@ all: table/settings.h
settingsgen.o: $(SRC_DIR)/settingsgen/settingsgen.cpp $(SRC_DIR)/string_func.h $(SRC_DIR)/strings_type.h $(SRC_DIR)/misc/getoptdata.h $(SRC_DIR)/ini_type.h $(SRC_DIR)/core/smallvec_type.hpp
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
alloc_func.o: $(SRC_DIR)/core/alloc_func.cpp endian_host.h
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
getoptdata.o: $(SRC_DIR)/misc/getoptdata.cpp $(SRC_DIR)/misc/getoptdata.h
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/misc/%.cpp=%.cpp)'
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
string.o: $(SRC_DIR)/string.cpp endian_host.h
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
ini_load.o: $(SRC_DIR)/ini_load.cpp $(SRC_DIR)/core/alloc_func.hpp $(SRC_DIR)/core/mem_func.hpp $(SRC_DIR)/ini_type.h $(SRC_DIR)/string_func.h
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)'
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) -DSETTINGSGEN -c -o $@ $<
$(SETTINGSGEN): alloc_func.o string.o ini_load.o settingsgen.o getoptdata.o
$(E) '$(STAGE) Compiling and Linking $@'
$(Q)$(CXX_BUILD) $(LDFLAGS_BUILD) $^ -o $@
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) $^ -o $@
table/settings.h: $(SETTINGSGEN) $(SRC_DIR)/table/settings.h.preamble $(SRC_DIR)/table/settings.h.postamble $(SRC_DIR)/table/*.ini
$(E) '$(STAGE) Generating $@'
@@ -64,7 +65,7 @@ endian_host.h: $(ENDIAN_CHECK)
$(ENDIAN_CHECK): $(SRC_DIR)/endian_check.cpp
$(E) '$(STAGE) Compiling and Linking $@'
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $< -o $@
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) $< -o $@
depend:

View File

@@ -6,3 +6,5 @@
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
AILog.Info("1.2 API compatability in effect.");

8
bin/ai/compat_1.3.nut Normal file
View File

@@ -0,0 +1,8 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/

View File

@@ -88,9 +88,9 @@
abs( 21): 21
--AIBase--
Rand(): 1259692483
Rand(): -1289244298
Rand(): -1572996668
Rand(): -54346916
Rand(): -937374575
Rand(): 823953997
RandRange(0): 0
RandRange(0): 0
RandRange(0): 0
@@ -98,12 +98,12 @@
RandRange(1): 0
RandRange(1): 0
RandRange(2): 1
RandRange(2): 0
RandRange(2): 1
RandRange(1000000): 36500
RandRange(1000000): 300101
RandRange(1000000): 418369
Chance(1, 2): true
RandRange(2): 1
RandRange(1000000): 966676
RandRange(1000000): 289525
RandRange(1000000): 170283
Chance(1, 2): false
Chance(1, 2): true
Chance(1, 2): false
@@ -420,144 +420,144 @@
1098 => 46116
1099 => 46158
Randomize ListDump:
1 => 966621566
2 => -606766557
1000 => -1138727825
1001 => -749544262
1002 => 2004771271
1003 => 686734186
1004 => 923274744
1005 => -1672035149
1006 => -1642064950
1007 => 1363389551
1008 => -559500928
1009 => 1656196991
1010 => 1655354425
1011 => -1027156689
1012 => 1952644328
1013 => 1217870217
1014 => 242274100
1015 => 201816080
1016 => 2127464758
1017 => 446043650
1018 => -319728455
1019 => 204701002
1020 => -571265398
1021 => -1422217131
1022 => -391208397
1023 => -1822628371
1024 => -1499755350
1025 => -1422137641
1026 => 1621693134
1027 => -1428728134
1028 => -147587573
1029 => 681719500
1030 => 1172011190
1031 => -1834344882
1032 => 1157634586
1033 => 1902133676
1034 => -1967780161
1035 => -1618025531
1036 => -810220453
1037 => 1582854921
1038 => -410004643
1039 => 1159917159
1040 => -1377804984
1041 => -738843914
1042 => -1578756103
1043 => -464090986
1044 => 1711504679
1045 => 545330655
1046 => 379462570
1047 => 514511099
1048 => -1813251176
1049 => 1424958266
1051 => -825255131
1052 => 539054595
1053 => -1764192010
1054 => -1243277769
1055 => 2017874281
1056 => -1972353607
1057 => 1879761467
1058 => 1638986560
1059 => -1832287507
1060 => -492411882
1061 => 658940812
1062 => -1044199400
1063 => 1586504918
1064 => -125492611
1065 => -1562883174
1066 => -1013778441
1067 => 1560228607
1068 => -550265689
1069 => 524767105
1070 => -713387661
1071 => 1425927738
1072 => 942653932
1073 => 1233220698
1074 => 1313602368
1075 => -140318584
1076 => 1199179892
1077 => 91450916
1078 => -1471626821
1079 => -552692855
1080 => -801295697
1081 => 1307607393
1082 => -2111765574
1083 => 1773729008
1084 => -81987003
1085 => -1090790034
1086 => -843700327
1087 => -1306436740
1088 => 735656985
1089 => -1933491876
1090 => 642759863
1091 => 255293949
1092 => -1052469001
1093 => -1043605053
1094 => -2080328201
1095 => -1825196581
1096 => -1789181164
1097 => -1636072563
1098 => -111321262
1099 => 1979741000
1 => -200078348
2 => -29799264
1000 => 1630721656
1001 => 959306175
1002 => 1527421791
1003 => 1259692483
1004 => -1289244298
1005 => -1572996668
1006 => -2069479746
1007 => -1819131606
1008 => -1007163964
1009 => -1185394870
1010 => -1471365065
1011 => 364354366
1012 => -1478084253
1013 => 405281367
1014 => -11170062
1015 => 156767750
1016 => 1288924796
1017 => 1796884876
1018 => -1947073702
1019 => -1999614238
1020 => -231292809
1021 => 966621566
1022 => -606766557
1023 => -1138727825
1024 => -749544262
1025 => 2004771271
1026 => 686734186
1027 => 923274744
1028 => -1672035149
1029 => -1642064950
1030 => 1363389551
1031 => -559500928
1032 => 1656196991
1033 => 1655354425
1034 => -1027156689
1035 => 1952644328
1036 => 1217870217
1037 => 242274100
1038 => 201816080
1039 => 2127464758
1040 => 446043650
1041 => -319728455
1042 => 204701002
1043 => -571265398
1044 => -1422217131
1045 => -391208397
1046 => -1822628371
1047 => -1499755350
1048 => -1422137641
1049 => 1621693134
1051 => -1428728134
1052 => -147587573
1053 => 681719500
1054 => 1172011190
1055 => -1834344882
1056 => 1157634586
1057 => 1902133676
1058 => -1967780161
1059 => -1618025531
1060 => -810220453
1061 => 1582854921
1062 => -410004643
1063 => 1159917159
1064 => -1377804984
1065 => -738843914
1066 => -1578756103
1067 => -464090986
1068 => 1711504679
1069 => 545330655
1070 => 379462570
1071 => 514511099
1072 => -1813251176
1073 => 1424958266
1074 => -825255131
1075 => 539054595
1076 => -1764192010
1077 => -1243277769
1078 => 2017874281
1079 => -1972353607
1080 => 1879761467
1081 => 1638986560
1082 => -1832287507
1083 => -492411882
1084 => 658940812
1085 => -1044199400
1086 => 1586504918
1087 => -125492611
1088 => -1562883174
1089 => -1013778441
1090 => 1560228607
1091 => -550265689
1092 => 524767105
1093 => -713387661
1094 => 1425927738
1095 => 942653932
1096 => 1233220698
1097 => 1313602368
1098 => -140318584
1099 => 1199179892
KeepTop(10):
1 => 966621566
2 => -606766557
1000 => -1138727825
1001 => -749544262
1002 => 2004771271
1003 => 686734186
1004 => 923274744
1005 => -1672035149
1006 => -1642064950
1007 => 1363389551
1 => -200078348
2 => -29799264
1000 => 1630721656
1001 => 959306175
1002 => 1527421791
1003 => 1259692483
1004 => -1289244298
1005 => -1572996668
1006 => -2069479746
1007 => -1819131606
KeepBottom(8):
1000 => -1138727825
1001 => -749544262
1002 => 2004771271
1003 => 686734186
1004 => 923274744
1005 => -1672035149
1006 => -1642064950
1007 => 1363389551
1000 => 1630721656
1001 => 959306175
1002 => 1527421791
1003 => 1259692483
1004 => -1289244298
1005 => -1572996668
1006 => -2069479746
1007 => -1819131606
RemoveBottom(2):
1000 => -1138727825
1001 => -749544262
1002 => 2004771271
1003 => 686734186
1004 => 923274744
1005 => -1672035149
1000 => 1630721656
1001 => 959306175
1002 => 1527421791
1003 => 1259692483
1004 => -1289244298
1005 => -1572996668
RemoveTop(2):
1002 => 2004771271
1003 => 686734186
1004 => 923274744
1005 => -1672035149
1002 => 1527421791
1003 => 1259692483
1004 => -1289244298
1005 => -1572996668
RemoveList({1003, 1004}):
1002 => 2004771271
1005 => -1672035149
1002 => 1527421791
1005 => -1572996668
KeepList({1003, 1004, 1005}):
1005 => -1672035149
1005 => -1572996668
AddList({1005, 4000, 4001, 4002}):
1005 => 1005
4000 => 8000
@@ -588,7 +588,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
SetName(): false
GetLastErrorString(): ERR_NAME_IS_NOT_UNIQUE
GetName(): Regression
GetPresidentName(): I. McAlpine
GetPresidentName(): P. Sharkey
SetPresidentName(): true
GetPresidentName(): Regression AI
GetBankBalance(): 100000
@@ -7384,7 +7384,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
HasRoadType(Road): true
HasRoadType(Tram): false
GetNeighbourRoadCount(): 2
RemoveRoad(): true
RemoveRoad(): false
RemoveRoad(): true
RemoveRoad(): false
RemoveRoad(): true
@@ -8951,7 +8951,7 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetWagonEngineType(): 27
GetWagonAge(): 1
GetWagonEngineType(): 27
GetWagonAge(): 1
GetWagonAge(): 0
GetWagonEngineType(): 65535
GetWagonAge(): -1
--Errors--
@@ -9148,9 +9148,6 @@ ERROR: IsEnd() is invalid as Begin() is never called
GetDestinationType(): 1
GetDestinationIndex(): 7
GetCargoType(): 0
GetNextEvent: instance
GetEventType: 6
Unknown Event
IsEventWaiting: false
--Math--

View File

@@ -6,7 +6,7 @@ class Regression extends AIInfo {
function GetShortName() { return "REGR"; }
function GetDescription() { return "This runs regression-tests on all commands. On the same map the result should always be the same."; }
function GetVersion() { return 1; }
function GetAPIVersion() { return "1.2"; }
function GetAPIVersion() { return "1.3"; }
function GetDate() { return "2007-03-18"; }
function CreateInstance() { return "Regression"; }
}

Binary file not shown.

View File

@@ -55,7 +55,7 @@ TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = e30e8a398ae86c03dc534a8ac7dfb3b6
OPENTTD.GRF = 51f9d2b8a29a079e83486db13509336c
OPENTTD.GRF = c683a77e1a43aed7db29ef318b166dd9
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.

View File

@@ -55,7 +55,7 @@ TRGI.GRF = da6a6c9dcc451eec88d79211437b76a8
TRGC.GRF = ed446637e034104c5559b32c18afe78d
TRGH.GRF = ee6616fb0e6ef6b24892c58c93d86fc9
TRGT.GRF = fcde1d7e8a74197d72a62695884b909e
OPENTTD.GRF = 51f9d2b8a29a079e83486db13509336c
OPENTTD.GRF = c683a77e1a43aed7db29ef318b166dd9
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.

View File

@@ -55,7 +55,7 @@ TRGIR.GRF = 0c2484ff6be49fc63a83be6ab5c38f32
TRGCR.GRF = 3668f410c761a050b5e7095a2b14879b
TRGHR.GRF = 06bf2b7a31766f048baac2ebe43457b1
TRGTR.GRF = de53650517fe661ceaa3138c6edb0eb8
OPENTTD.GRF = 51f9d2b8a29a079e83486db13509336c
OPENTTD.GRF = c683a77e1a43aed7db29ef318b166dd9
[origin]
default = You can find it on your Transport Tycoon Deluxe CD-ROM.

10
bin/game/compat_1.2.nut Normal file
View File

@@ -0,0 +1,10 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
GSLog.Info("1.2 API compatability in effect.");

8
bin/game/compat_1.3.nut Normal file
View File

@@ -0,0 +1,8 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/

View File

@@ -1,3 +1,355 @@
1.3.0-RC2 (2013-03-05)
------------------------------------------------------------------------
- Fix: Make sizes of the station preview list and direction selection identical in the station build window [FS#5472] (r25064)
- Fix: When allocation of the sprite cache fails, try to allocate less memory and display an error message later on (r25061)
- Fix: Refactor Script Debug GUI to only set widget states in OnInvalidateData [FS#5490] (r25052)
- Fix: Do not let gcc include files from the "standard C" include directories to avoid inclusion of header files at the top of the preprocessed nfo files, which cause NFOrenum/GRFcodec to make invalid assumptions about the NFO version (r25050)
- Fix: Minimise gaps feature caused removal to only happen at the signal build interval instead of the implicit interval of 1 [FS#5479] (r25038)
- Fix: Green path signals would be shown when building them 'under' a train, and they would keep showing green until they were passed again [FS#5480] (r25037)
1.3.0-RC1 (2013-02-19)
------------------------------------------------------------------------
- Feature: Searching of (missing) content via GrfCrawler (r25024, r25023)
- Change: Cleanup goals and cargo monitors of companies when they go bankrupt or are taken over (r24986)
- Change: Apply the same name sorting rules to content and NewGRF list as for the server list (r24983)
- Fix: [SDL] Crash after bootstrap download of 32bits base set due to referencing a deleted mutex [FS#5466] (r25017)
- Fix: [SDL] Improve 8bpp hardware palette support. Instead of always requesting SDL_HWPALETTE, it is now only done for 8bp blitters in fullscreen mode (r25003, r25002, r24993)
- Fix: Set vehicle's service interval is percent flag appropriately on creation [FS#5137] (r24998)
- Fix: When choosing a train in a depot to attach a newly purchased wagon to, do not consider trains currently moving in and out of the depot (r24987)
- Fix: [Script] Crash when passing too many parameters [FS#5465] (r24982, r24981, r24980)
1.3.0-beta2 (2013-02-07)
------------------------------------------------------------------------
- Feature: [NewGRF] Station randomisation triggers (r24906, r24905)
- Feature: Settings type filter included in the advanced settings GUI (r24862, r24863)
- Change: Revert to opening the vehicle GUI again when cloning vehicles using the clone-button from the depot GUI [FS#4458] (r24955)
- Fix: Additional zoom in levels could glitch by a few pixels due to incorrect rounding [FS#5463] (r24975)
- Fix: Honour pause_on_newgame setting when running as a dedicated server [FS#5279] (r24974)
- Fix: [NewGRF] Prevent access to tile-based variables when tile is invalid [FS#5462] (r24973)
- Fix: Do not make overbuilding rivers with canals insanely expensive [FS#5258] (r24972)
- Fix: Crash when an infinite loop occurred during loading of a script [FS#5346] (r24970)
- Fix: company window was not updated when shares were enabled/disabled [FS#5379] (r24968)
- Fix: Trams would get stuck on water [FS#5228] (r24966)
- Fix: With YAPF the docking behaviour differed per direction; now favour docking in the direction you approached [FS#5416] (r24964)
- Fix: Do not stop loading if there are reservations left [FS#5435] (r24963)
- Fix: Reserve all capacity while unloading to avoid 'stealing' cargo, i.e. loading cargo onto a second vehicle when the first cannot be fully filled yet [FS#5438] (r24962)
- Fix: If a platform is enlarged and there is a reservation, reserve the whole platform [FS#5362] (r24961)
- Fix: Inconsistencies in the 'thanks to' lists [FS#5423] (r24960)
- Fix: Set 'replace when old' flag when replacing an autoreplace (r24950)
- Fix: Deleting implicit orders was not able to deal with the various side-effects of DeleteOrder [FS#5452] (r24944)
- Fix: Redraw autoreplace window properly in network games (r24939)
- Fix: Never put a space between cargo name and subtype [FS#5447] (r24938)
- Fix: Do not allow order refit to be set for no-load orders [FS#5446] (r24936)
- Fix: Make group names unique per company and vehicle type [FS#3473] (r24933)
- Fix: Prevent more NewGRFs being selected than is possible to load [FS#5158] (r24932)
- Fix: [GS] Do not try to pause or unpause crashed scripts [FS#5415] (r24929)
- Fix: [Squirrel] Update line information before processing 'while' token of 'do'-'while' statement [FS#5408] (r24928)
- Fix: Add a tooltip to the mapsize selection mentioning possible deviations [FS#5395] (r24925)
- Fix: When an object built on a river is removed, restore the river [FS#5441] (r24923)
- Fix: Upgrading bridges could steal road types [FS#5389] (r24912)
- Fix: [GS] Allow GSs to pass negative integer string parameters (r24908)
- Fix: 'Train loads/unloads cargo' station animation triggers on individual platform (r24904)
- Fix: Cached station animation triggers were only set when removing parts of a station (r24903)
- Fix: The station build window did not update when the station spread changed [FS#5434] (r24899)
- Fix: Do not unpause the game when closing the highscore window if it was already paused before the highscore screen was shown (r24898)
- Fix: Improvements and fixes for the base translation [FS#5411, FS#5420, FS#5421, FS#5422, FS#5427] (r24896, r24875, r24872, r24869)
- Fix: Allow downgrade of road bridges in the scenario editor [FS#5436] (r24895)
- Fix: Invalidate station selection window when station spread changes [FS#5434] (r24894)
- Fix: Distribute GS compat_<version>.nut with OpenTTD (r24890)
- Fix: Pass proper UTF-16 strings instead of UCS-2 to ICU in order to preserve characters outside the BMP (r24885)
- Fix: A completely emptied vehicle could trigger an assert (r24883)
- Fix: Desync when NewGRF changes the stats related to acceleration (power, weight, tractive effort, etc) during service or 32 day triggers (r24882)
- Fix: Incorrect Romanian own name (r24874)
- Fix: Make invalid sprite references to mapgen sprites behave the same as invalid references between recolour and real sprites [FS#5404] (r24858)
- Fix: Do not let UFOs and coal mines clear water (r24857)
- Fix: Do not let UFOs and coal mines destroy depots [FS#5406] (r24856)
- Fix: Do not send aircraft to depots that are out of range of the next destination [FS#5405] (r24855)
- Fix: Only consider vehicles available in the climate for purchase/depot cell size (r24854)
- Fix: Extend widget data member to 32 bits so that sprite IDs >= 2^16 can be used (r24853)
1.3.0-beta1 (2012-12-24)
------------------------------------------------------------------------
- Feature: Advanced settings to disable certain sound effects (r24846)
- Feature: [NewGRF] Support oversized purchase list sprites [FS#5271] (r24839)
- Feature: Improve pylon placement around station tiles that display neither pylons nor catenary (r24836)
- Feature: When using a non-release version of OpenTTD and the basegraphics are missing some sprites, also suggest to use a non-release version of the basegraphics (r24821)
- Feature: Consider engine preview windows always sticky, so non-shift mass-closure does not affect them [FS#2632] (r24809)
- Feature: When share-cloning vehicles do not open the vehicle window of the new vehicle [FS#4458] (r24808)
- Feature: Enable usage of 'companies' console command also in singleplayer [FS#2820] (r24807)
- Feature: Ask for confirmation before creating giant screenshots [FS#3148] (r24806)
- Feature: Separate subdirectory for screenshots (r24804)
- Feature: Unify the difficulty settings window with the advanced settings window (r24791, r24792)
- Feature: Various methods to open the OSK (r24785)
- Feature: Add a string filter to the server list [FS#3852] (r24769)
- Feature: Add industry type and cargo dropdown selection for easier navigating in the industry chain window (r24763)
- Feature: Introduce GUI icons for deleting to the left/right (r24749)
- Feature: Add clear button to all editboxes (r24748)
- Feature: Reset the vehicle engine pool when starting a scenario (r24716)
- Feature: Add basic/advanced/expert filters to the advanced settings GUI [FS#5355] (r24671)
- Feature: Draw cargo labels in the station list black or white depending on the background colour [FS#5311] (r24668)
- Feature: Do not display the preview window for disabled vehicle types (r24660)
- Feature: Add new filter option to the advanced settings window to show only changed settings (r24647)
- Feature: Add text filtering to advanced settings (r24632)
- Feature: Add buttons to expand/collapse all to advanced settings GUI (r24631)
- Feature: [GS] Allow GameScripts to construct and prospect industries without having a sponsor (r24623)
- Feature: Pay interest also on a negative cash value (r24618)
- Feature: Sort cargo filter by cargo name/label at the company stations window [FS#5311] (r24615)
- Feature: More options for the auto-scroll setting (r24590)
- Feature: Allow AI/GS script developers to break the execution of their scripts and pause the game using ScriptController::Break() (r24542, r24575)
- Feature: Scripts can be suspended even if the game is still progressing, thus break-on-log now works also for Game Scripts (r24537)
- Feature: Highlight industries on the smallmap when the mouse is over an entry in the legend (r24534)
- Feature: [NewGRF] Allow resolving var 5F via vehicle var 61 (r24527)
- Feature: [OSX] Additional high-resolution icons for the app bundle [FS#4539] (r24525)
- Feature: Ctrl+Backspace/Delete to remove characters up to next word beginning in text edit boxes [FS#5203] (r24521)
- Feature: Ctrl+Arrow keys to move entire words in text edit boxes [FS#5203] (r24520)
- Feature: When using autorefit only load/refit vehicles if other wagons cannot already take all cargo without refitting [FS#5106] (r24497)
- Feature: [GS] Useful behaviour for GSEngine::IsValidEngine and GSEngine::IsBuildable when outside GSCompanyMode scope (r24492)
- Feature: Display GS dead state in AI debug window [FS#5230] (r24489)
- Feature: Add buttons to view textfiles from the online content window [FS#5236] (r24488)
- Feature: Make the pathfinder decide whether ships shall leave depots towards north or south [FS#5127] (r24481)
- Feature: [GS] API compatibility scripts for Goal Scripts [FS#5219] (r24468)
- Feature: Display in the advanced settings description a setting type which explains the scope of changes to a particular setting [FS#5244] (r24411)
- Feature: [GS] Allow game scripts to monitor cargo pickups and deliveries done by companies (r24406)
- Feature: [NewGRF] Allow vehicle variable 61 for callback 2D (recolour) and re-randomisation (r24371)
- Feature: [NewGRF] Customisable signals for rail types (r24367)
- Feature: Allow filtering for multiple words (separated by whitespace resp. quoted) in script breakpoints, the sign list, content and NewGRF-GUIs (r24337, r24342)
- Feature: Add dropdowns to NewGRF configurations, if all values have labels (r24318)
- Feature: Add dropdowns to AI configurations, if all values have labels (r24317)
- Feature: Allow to select advanced settings with limited range with a dropdown list (r24316)
- Feature: Display default values for advanced settings in the settings description (r24298)
- Feature: News item for exclusive transport rights [FS#2688] (r24287)
- Feature: [GS] Additional GSNews::NewsItem::NewsTypes (r24286)
- Feature: [NewGRF] Variable with the current max speed for vehicles [FS#5052] (r24246)
- Feature: Descriptions explaining the meaning of advanced settings (r24237)
- Feature: Split the renew-months setting text in two string values (one before life time and one after) (r24210)
- Feature: Show a hint in the supplies tab of station windows, if the station is affected by exclusive transport rights [FS#5178] (r24205)
- Feature: [NewGRF] Callback to set industry production level on construction (r24186)
- Feature: South Korean and South African currencies [FS#4907] (r24148)
- Feature: Randomise count of passengers killed in a crash [FS#3576] (r24142)
- Feature: Display rating in the town directory window (r24141)
- Feature: Show group name in the replace vehicle window caption [FS#1117] (r24140)
- Feature: Allow to create a new vehicle group by drag and drop (r24139)
- Feature: Ctrl+Drag to add all vehicles with a shared order list to a group (r24138)
- Feature: Draw indicator icon in the replace vehicle window for vehicles which have a replacement set (r24137)
- Feature: Autoreplace vehicles only when they get old [FS#4465] (r24136)
- Feature: Add configurable limits for tree planting, and remove tree drag size limit (r24134, r24135)
- Feature: Lithuanian currency [FS#4984] (r24133)
- Feature: Ctrl+Clicking to change colour of all colour schemes at once [FS#1952] (r24131)
- Feature: Deselect 'remove' button when changing signal types in the GUI [FS#2314] (r24130)
- Feature: Option to minimise signal distance when dragging over obstacles [FS#3660] (r24129)
- Feature: Allow closing airports for incoming aircraft [FS#1497] (r24127)
- Feature: Drag and drop support for the NewGRF list window [FS#3854] (r24126)
- Feature: Drag destination highlighting to the group GUI [FS#3705] (r24125)
- Feature: [NewGRF] Misc engine flag to disable breakdown smoke [FS#4658] (r24124)
- Feature: Be more careful with the population of a small town while placing a statue (r24105)
- Feature: Debug option for showing the redrawn dirty blocks/rectangles [FS#5101] (r24065)
- Change: News display options are now shown in the advanced settings window (r24842, r24843, r24844, r24845)
- Change: Drop 'signal density' from the advanced settings GUI. It is more suited to be only changed via the signal GUI (r24670)
- Change: Check for bankruptcy on a monthly basis (r24619)
- Change: Only bankrupt, if you have negative money considering you took max loan (r24617)
- Change: When building long roads or tramways, only build the roadbits at the beginning and the end if they can connect to something [FS#5228] (r24503)
- Change: Disallow original and better road layouts to build roads under bridges along the bridge direction [FS#5229] (r24391)
- Change: Allow cloning of orders which are unreachable for the destination vehicle if they were already unreachable for the source vehicle [FS#5213] (r24390)
- Change: Allow building/modifying/removing signals even if a train is on the belonging track (r24356)
- Change: [NewGRF] Make bounding boxes of road vehicles change according to the vehicle length to make alignment easier [FS#5204] (r24331)
- Fix: [NewGRF] Consider regearing-like cargos as no-cargo in cargo filters [FS#5386] (r24848)
- Fix: [NewGRF] Draw NewGRF railtypes in NewGRF station previews (r24840)
- Fix: Do not consider blocked rail station tiles that display wires as non-reachable for masking out unnecessary catenary wires (r24837)
- Fix: The autorefit dropdown in the order GUI was not always updated when modifying vehicle consists [FS#5396] (r24834)
- Fix: [NewGRF] Incorrect values are better than a crash when a NewGRF queries vehicle variable 4C before vehicle initialisation is completed [FS#5398] (r24831)
- Fix: determineversion.vbs could hang in a git checkout (r24826)
- Fix: Close pending preview windows when the engine is introduced to everyone (r24812)
- Fix: Close engine preview window when another client accepts it (r24811)
- Fix: Make engine preview offers more robust with regard to changes in the company ranking (r24810)
- Fix: When displaying the previous news message, do not consider news which are turned off [FS#4224] (r24802)
- Fix: Glitch in timetable GUI [FS#5327] (r24800)
- Fix: Unify checks for editability of settings (r24787)
- Fix: Invert the focus handling of the OSK. Keep the focus at the OSK and close it on losing focus (r24774)
- Fix: Shift in the OSK behaved like capslock (r24773)
- Fix: [Win32] Do not crash when switching to an unsupported fullscreen display mode (like 8bpp modes in Windows 8) [FS#5359] (r24762)
- Fix: Crash on corrupted savegame [FS#5367] (r24754)
- Fix: Some editboxes had a different colour than the rest of the window (r24747)
- Fix: In various windows the OSK looked shiny but using it had no effect whatsoever (r24727)
- Fix: AI debug GUI crashed when using disabled buttons via hotkeys (r24723)
- Fix: When starting a scenario apply the local company settings to the new company [FS#5139] (r24717)
- Fix: [NewGRF] Allow stations to draw snow/desert aware ground sprites with railtype overlays [FS#5335] (r24715)
- Fix: [NewGRF] Draw default foundations if resolving of custom station foundation sprites fails [FS#5337] (r24714)
- Fix: [NewGRF] Tolerate old NewGRFs returning invalid values via CB 11 [FS#5262] (r24713)
- Fix: [NewGRF] Station variables 61 and 62 returned incorrect values, if no vehicle ever tried loading [FS#5303] (r24712)
- Fix: Check whether to not display a ^ loading indicator at drop stations only worked if there was no other vehicle unloading for 255 ticks (r24711)
- Fix: [NewGRF] Station var 48 should report acceptance, not supply (r24706)
- Fix: Station rating might consider very old vehicles very young (r24705)
- Fix: Disallow closing oilrig airports in the scenario editor (r24703)
- Fix: Workaround for an overoptimisation done by GCC 4.5 [FS#5246] (r24701)
- Fix: Get packing right on MinGW GCC 4.7 (r24573)
- Fix: Make sure all template functions are instantiated by at least one compilation unit [FS#5276] (r24496)
- Fix: Do not load order backups when loading a server-saved game in single player (r24445)
- Fix: Allow overbuilding bridges with the same type when adding a roadtype [FS#5221] (r24413)
- Fix: Cargo lists cannot have genders (mostly because it is very unclear what gender it would have) (r24374)
- Fix: Off by one errors with regard to clicking on setting buttons (r24313)
- Fix: STRING1 probably means STRING1 (r24295)
- Fix: squirrel_export should match key words like 'virtual', 'static' and 'const' only as whole words (r24288)
- Fix: Hide object specs/classes from the GUI, if they will never be available to the user [FS#4967, FS#5120] (r24171)
- Fix: Unify the spacing in 'AI/Game Script' and never just say 'Game' when 'Game Script' is meant [FS#4898] (r24020)
1.2.3 (2012-11-01)
------------------------------------------------------------------------
(None)
1.2.3-RC1 (2012-10-17)
------------------------------------------------------------------------
- Change: [NewGRF] Set the reference brightness of 32bpp mask recolouring to 128 (r24610)
- Fix: Configure script did not properly handle _BUILD flags during reconfigure (r24601)
- Fix: Configure script failed to detect libfontconfig 2.10 as newer than 2.3 (r24598)
- Fix: When fontconfig is not available, the bootstrap download crashed [FS#5336] (r24597)
- Fix: Crash when a gamescript provided too many parameters to a GSText object [FS#5333] (r24593)
- Fix: [Script] API documentation mistakes/omissions (r24584)
- Fix: Do not add duplicates to the ban list [FS#5308] (r24580)
- Fix: Draw the window resize sprite bottom-aligned [FS#5324] (r24577)
- Fix: Vehicle list at buoys did no longer work [FS#5319] (r24576)
- Fix: [Windows] Do not cast away const in OS specific code (r24572, r24571)
- Fix: Naming of bundles was somewhat broken (r24569)
- Fix: Non-train vehicle lists were not resorted when vehicles were renamed [FS#5261] (r24567)
- Fix: Stop both price and payment inflation if either of them has reached MAX_INFLATION (r24565)
- Fix: Limiting the inflation did not quite work [FS#5312] (r24564)
- Fix: Do not show profit from refits as cost in the refit window [FS#5297] (r24544)
- Fix: Do not limit to reading one UDP packet per game loop (r24532)
- Fix: Max script chance was too big (r24531)
- Fix: [NewGRF] RandomAction 84 should interpret register 100 as signed (r24528)
- Fix: [OSX] Some compile problems in mac-only code [FS#5296] (r24524)
- Fix: The gender of an industry name is defined by the industry-type part of the name, not by the town-name part, even if it comes first (r24523, r24522)
- Fix: GStexts were compiled incompletely when containing certain string codes (r24516, r24515)
- Fix: The mousewheel did not work in the build waypoint window [FS#5285] (r24507)
- Fix: [NewGRF] Airport variables 60 to 65 and 69 used the wrong cargo translation table for translations (r24506)
- Fix: Do not show the global goals as company goals for spectators (r24500)
- Fix: Clarify description of command line option -n (r24485)
- Fix: Do not call RebuildSubsidisedSourceAndDestinationCache() before subsidy savegame conversion is finished [FS#5232] (r24482)
- Fix: Trains were unable to reverse in stations when using NPF (r24479)
- Fix: The --xxx yyy format (instead of --xxx=yyy) for configure did not work (r24471)
- Fix: --prefix was not accepted by configure (r24470)
- Fix: Changing auto-refit for a 'goto station' order was inadvertently modifying the full load state [FS#5264] (r24457)
1.2.2 (2012-08-16)
------------------------------------------------------------------------
(None)
1.2.2-RC1 (2012-08-01)
------------------------------------------------------------------------
- Fix: In some cases ships could be covered with land [CVE-2012-3436] [FS#5254] (r24449, r24439)
- Fix: Copy constructor and assignment operator cannot be implicit template specialisations [FS#5255] (r24448)
- Fix: Make (non-refittable) vehicles with invalid default cargo unavailable [FS#5256] (r24438)
- Fix: CFLAGS/CXXFLAGS ignored for helper binaries (r24432, r24429, r24427, r24365)
- Fix: [Windows] Unbreak NewGRF MD5 sum calculation. Macros and side effects do not mix, especially if there is some obscure '#define min' in a windows header that nobody thinks of [FS#5231] (r24416)
- Fix: Disallow removing roadtypes from bridges when not dragging in bridge direction [FS#5221] (r24414)
- Fix: Draw wires under low bridges if the bridge is transparent, not if the wire is transparent (r24403)
- Fix: Station properties 11 and 14 were combined incorrectly [FS#5243] (r24402)
- Fix: [Windows] Changing resolution did not resize the window (r24394)
- Fix: Use the 'all vehicles' group for the autoreplace window from the vehicle list [FS#5239] (r24392)
- Fix: Do not consider not finding a particular base set critical; just load a different one and display an in-game error later on [FS#5233] (r24388)
- Fix: Make IsInDepot() functions behave consistent across vehicle types and add IsChainInDepot instead, if that is what shall be checked [FS#5188] (r24384)
- Fix: Call Vehicle::IsStoppedInDepot only for the first vehicle in a chain (i.e. primary vehicle or free wagon) (r24382)
- Fix: Do not resize the object GUI when selecting objects. Rather clip the object name (r24379)
- Fix: ReInit could crash for windows with NWidgetMatrix widgets [FS#5218] (r24378)
- Fix: [NewGRF] Extended action A1 did not work correctly [FS#5227] (r24369, r24361)
- Fix: [NewGRF] Ship-specific 80+x variables were missing for unknown reason [FS#5224] (r24360)
- Fix: When airport construction was denied due to noise, the error message named the wrong town (r24354)
- Fix: [NoAI] A TileIndex is not a station id, so do not use it as one [FS#5215] (r24353)
- Fix: When highlighting the drop position for vehicles in depots, make space for all articulated parts (r24352)
- Fix: Short vehicles were not properly positioned at the cursor when dragging for RTL languages (r24351)
- Fix: EQUALSIZE widget containers within EQUALSIZE containers were initialised with wrong sizes (r24346)
- Fix: The cursor in the company password window was not blinking due to wrong magic constants (r24335)
- Fix: [NewGRF] Change the length of 8/8 roadvehicles in vehicle lists to 32 pixels; this is in fact the correct length as can be seen in corners for short articulated parts following each other [FS#2553] (r24332)
- Fix: [NewGRF] Group vehicles in the purchase list properly by source GRF, but also consider engine GRFID overrides [FS#4254] (r24330, r24321)
- Fix: Make the AI settings window behave more like the other settings window by closing the query window whenever selecting a different row (r24315)
- Fix: Editing NewGRF parameters using the query window showed wrong values, if there was no direct relation between parameter index and parameter register (r24314)
- Fix: Center object previews in 1- and 2-view selectors based on the 4-view selector layout [FS#5057] (r24299)
- Fix: Increase the left and right margins of the text in the yes/no query window (r24293)
- Fix: [NewGRF] GetReverseCargoTranslation() was unnecessary complicated and also returned the wrong thing for cargos not present in the translation table (r24273)
- Fix: [NewGRF] Load cargo- and railtype-translation during both reservation and activation stage. That way they can be selected using Action7 depending on present cargo- or railtypes (r24272)
- Fix: Use the same colour scheme for the script selection window as in other comparable windows (r24268)
- Fix: Make the oilrig-vehicle list accessible to spectators and colour its caption neutrally grey [FS#5126] (r24260)
1.2.1 (2012-06-01)
------------------------------------------------------------------------
- Fix: [Script] ScriptTown::GetGrowthRate() returned wrong values after usage of SetGrowthRate() (r24302)
1.2.1-RC1 (2012-05-16)
------------------------------------------------------------------------
- Fix: Change the unit of the sprite-cache size setting from megabytes to megapixels, so it depends on the blitter being used. Also increase it from 64 to 128, and change the name in the cfg file, so everyone gets the new default [FS#5162] (r24252)
- Fix: Do not immediately display error messages from parsing the cfg file, but schedule them for displaying after the GUI is prepared for it [FS#5154] (r24250, r24249, r24248, r24247)
- Fix: Dereferencing uninitialised pointer causing a crash [FS#5159] (r24224)
- Fix: Lag counters were not properly reset when switching states making it possible to get disconnected for lagging when you were not lagging [FS#5166] (r24221)
- Fix: Adopt ICU version detection to also deal with the new versioning scheme since ICU 49 [FS#5182] (r24220)
- Fix: Immediately do the cargo payment on vehicle crashes instead of when they are cleared [FS#5152] (r24219)
- Fix: The confirmation window to abort world generation was hidden during world generation, so actually you could not abort it [FS#5159] (r24214)
- Fix: If a company is taken over or bankrupts, transfer exclusive transport rights to the new owner respectively cancel them (r24204)
- Fix: Make the engine name not overdraw the engine count in the autoreplace GUI (r24203)
- Fix: Make the size of the details in the autoreplace GUI match more the size of the details in the purchase list (r24202)
- Fix: Mark group list dirty when setting/clearing autoreplace for an engine type [FS#5170] (r24201)
- Fix: Invalidate build vehicle windows every month, in case they need resorting due to changed reliabilities [FS#5149] (r24200)
- Fix: If you consider a settings to potentially cause desyncs via NewGRFs and thus disallow changing it in network games, you should probably also sync it to clients (r24193, r24191)
- Fix: Use default value when reading an invalid setting value [FS#5153] (r24192, r24146)
- Fix: [Windows] When going to fullscreen and back, restore to the resolution you were, not to the fullscreen resolution (r24189)
- Fix: [Windows] When changing the basics of a window (fullscreen, 8bpp/32bpp), and a window already exists, it was forced out of maximize mode, and its resolution/position was reset, often causing unwanted side-effects [FS#5151] (r24188)
- Fix: Town radii were not updated immediatelly after construction/destruction of houses, resulting in desyncs [FS#5169] (r24183)
- Fix: The population of a town was computed incorrectly for overridden houses when loading a game (r24182, r24181, r24179)
- Fix: The object name from property A was not displayed in the object GUI [FS#5110] (r24178)
- Fix: The arctic 'shops and offices' used the 'church' sprite in one of its four views [FS#5148] (r24177)
- Fix: The object GUI did not draw objects when all objects of a class are disabled (r24176)
- Fix: If you spent hard work on finding an available object ID, you should probably also use it instead of always 0 (r24159)
- Fix: Town producing no cargo at all could spawn passenger subsidies (r24158)
- Fix: The music volume was set too early during startup causing it to be not set correctly (r24155)
- Fix: [Squirrel] Crash when trying to create an array with negative size [FS#5160] (r24153)
- Fix: [NoAI] Do not return the last 'cached' speed of vehicles when they are stopped/crashed [FS#5157] (r24152)
- Fix: [Script] Typo in script documentation (r24151)
- Fix: Glass-sprite of bubble-generator was not drawn anymore for completely constructed tiles [FS#5143] (r24107)
- Fix: Conflicting strategies for resizing the main toolbar and statusbar after resizing the main window [FS#5136] (r24089)
- Fix: Significantly reduce the area that is redrawn for text effects [FS#5103] (r24068)
- Fix: Do not redraw up to 25% of the map when making a new vehicle visible for the first time (r24067)
- Fix: Do not redraw the text effect when nothing changed (r24066)
1.2.0 (2012-04-15)
------------------------------------------------------------------------
- Fix: When starting GS or AI, always use the settings of the game, not the new-game settings [FS#5142] (r24108)
- Fix: Provide translated comments in the desktop file without language name postfix (r24100)
- Fix: Cloning orders of aircraft with limited range failed [FS#5131] (r24086)
1.2.0-RC4 (2012-04-01)
------------------------------------------------------------------------
- Fix: Reversing trains while they were entering or leaving a depot could lead to stuck trains [FS#5093] (r24078, r24071)
- Fix: The 'last joined' server was not properly selected anymore [FS#5098] (r24070)
- Fix: Immediately start querying the last joined server instead of waiting for the requery loop [FS#5097] (r24069, r24062)
- Fix: Make the full snowedness level of houses the same as roads and rails [FS#5121] (r24064)
- Fix: With certain versions of GCC and compiler flags the compiler could reorder some code badly causing the 32bpp depot flag not working [FS#5125] (r24063)
- Fix: Do not freeze aircraft mid-flight when skipping to an out-of-range destination [FS#5123] (r24060)
- Fix: Wrong numbering of string parameters causing wrong capacities to be shown [FS#5124] (r24058)
- Fix: Crash when timetabling a maximum travel speed of 0 [FS#5111] (r24053)
- Fix: [NewGRF] Imported GRF sounds were inserted into the wrong slots [FS#5107] (r24052)
- Fix: [NewGRF] Realsprites inside the action 11 block were not skipped correctly (r24050)
- Fix: Improve error messages for the placement restrictions of banks, water towers and toy shops [FS#5095] (r24040)
1.2.0-RC3 (2012-03-18)
------------------------------------------------------------------------
- Feature: Allow display of baseset textfiles (r24037)
- Feature: Increase the station class limit from 32 to 256 (r24031)
- Fix: After opening a text window with the monospaced font, all other text started glitching (r24038)
- Fix: [NoAI] Reset 'is random' status of temporary variable during saveload as it is not always written to when loading an AI which means it wouldd be taking the 'is random' setting of another AI (r24033)
- Fix: [NoAI] Make AIEngine::IsArticulated return true if the articulated callback flag is set, do not try to run the callback (r24029)
- Fix: Pass cases down into the list of cargos [FS#5090] (r24024, r24023, r24022)
1.2.0-RC2 (2012-03-04)
------------------------------------------------------------------------
- Fix: [Script] AI used in names in API for GSOrder [FS#5088] (r24006)
@@ -46,7 +398,7 @@
- Fix: [SDL] Handle the SDL_VIDEOEXPOSE event to solve issues with SDL 1.3 (r23910)
- Fix: [SDL] Fix keyboard-related segfault when compiling against SDL 1.3 (r23909)
- Fix: [Makefile] Make sure bin/baseset/openttd.32.bmp is removed on make clean (r23908)
- Fix: [Makefile] Let "make clean --dry-run" not delete Makefiles (r23907)
- Fix: [Makefile] Let 'make clean --dry-run' not delete Makefiles (r23907)
- Fix: [Windows installer] OpenMSX got downloaded to and extracted in the wrong (non-existent) folder [FS#5045] (r23905)
- Fix: Memory leak everytime one clicked a savegame in the load GUI (r23901)
- Fix: [NewGRF] It was not possible to import sounds from a NewGRF later in the load order (r23883)

View File

@@ -164,7 +164,7 @@ set_default() {
with_ccache
with_grfcodec
with_nforenum
CC CXX CFLAGS CXXFLAGS LDFLAGS"
CC CXX CFLAGS CXXFLAGS LDFLAGS CFLAGS_BUILD CXXFLAGS_BUILD LDFLAGS_BUILD"
}
detect_params() {
@@ -197,21 +197,21 @@ detect_params() {
--cpu-type) prev_p="cpu_type";;
--cpu-type=*) cpu_type="$optarg";;
--cc-build) prevp_p="cc_build";;
--cc-build) prev_p="cc_build";;
--cc-build=*) cc_build="$optarg";;
--cc-host) prevp_p="cc_host";;
--cc-host) prev_p="cc_host";;
--cc-host=*) cc_host="$optarg";;
--cxx-build) prevp_p="cxx_build";;
--cxx-build) prev_p="cxx_build";;
--cxx-build=*) cxx_build="$optarg";;
--cxx-host) prevp_p="cxx_host";;
--cxx-host) prev_p="cxx_host";;
--cxx-host=*) cxx_host="$optarg";;
--windres) prevp_p="windres";;
--windres) prev_p="windres";;
--windres=*) windres="$optarg";;
--awk) prevp_p="awk";;
--awk) prev_p="awk";;
--awk=*) awk="$optarg";;
--strip) prevp_p="strip";;
--strip) prev_p="strip";;
--strip=*) strip="$optarg";;
--lipo) prevp_p="lipo";;
--lipo) prev_p="lipo";;
--lipo=*) lipo="$optarg";;
--endian) prev_p="endian";;
@@ -219,52 +219,53 @@ detect_params() {
--prefix-dir) prevp_p="prefix-dir";;
--prefix-dir=*) prefix_dir="$optarg";;
# Alias --prefix with --prefix-dir, for compatibility with GNU autotools
--prefix-dir | --prefix) prev_p="prefix_dir";;
--prefix-dir=* | --prefix=*) prefix_dir="$optarg";;
--binary-dir) prevp_p="binary-dir";;
--binary-dir) prev_p="binary_dir";;
--binary-dir=*) binary_dir="$optarg";;
--data-dir) prevp_p="data-dir";;
--data-dir) prev_p="data_dir";;
--data-dir=*) data_dir="$optarg";;
--doc-dir) prevp_p="doc-dir";;
--doc-dir) prev_p="doc_dir";;
--doc-dir=*) doc_dir="$optarg";;
--icon-dir) prevp_p="icon-dir";;
--icon-dir) prev_p="icon_dir";;
--icon-dir=*) icon_dir="$optarg";;
--icon-theme-dir) prevp_p="icon-theme-dir";;
--icon-theme-dir) prev_p="icon_theme_dir";;
--icon-theme-dir=*) icon_theme_dir="$optarg";;
--without-icon-theme) icon_theme_dir="";;
--menu-dir) prevp_p="menu_dir";;
--menu-dir) prev_p="menu_dir";;
--menu-dir=*) menu_dir="$optarg";;
--without-menu-entry) menu_dir="";;
--menu-name) prevp_p="menu_name";;
--menu-name) prev_p="menu_name";;
--menu-name=*) menu_name="$optarg";;
--binary-name) prevp_p="binary_name";;
--binary-name) prev_p="binary_name";;
--binary-name=*) binary_name="$optarg";;
--man-dir) prevp_p="man_dir";;
--man-dir) prev_p="man_dir";;
--man-dir=*) man_dir="$optarg";;
--personal-dir) prevp_p="personal-dir";;
--personal-dir) prev_p="personal_dir";;
--personal-dir=*) personal_dir="$optarg";;
--without-personal-dir) personal_dir="";;
--shared-dir) prevp_p="shared-dir";;
--shared-dir) prev_p="shared_dir";;
--shared-dir=*) shared_dir="$optarg";;
--without-shared-dir) shared_dir="";;
--install-dir) prevp_p="install-dir";;
--install-dir) prev_p="install_dir";;
--install-dir=*) install_dir="$optarg";;
--menu-group) prevp_p="menu_group";;
--menu-group) prev_p="menu_group";;
--menu-group=*) menu_group="$optarg";;
@@ -442,6 +443,9 @@ detect_params() {
CFLAGS=* | --CFLAGS=*) CFLAGS="$optarg";;
CXXFLAGS=* | --CXXFLAGS=*) CXXFLAGS="$optarg";;
LDFLAGS=* | --LDFLAGS=*) LDFLAGS="$optarg";;
CFLAGS_BUILD=* | --CFLAGS_BUILD=* | --CFLAGS-BUILD=*) CFLAGS_BUILD="$optarg";;
CXXFLAGS_BUILD=* | --CXXFLAGS_BUILD=* | --CXXFLAGS-BUILD=*) CXXFLAGS_BUILD="$optarg";;
LDFLAGS_BUILD=* | --LDFLAGS_BUILD=* | --LDFLAGS-BUILD=*) LDFLAGS_BUILD="$optarg";;
--ignore-extra-parameters) ignore_extra_parameters="1";;
@@ -1299,8 +1303,8 @@ make_compiler_cflags() {
flags="$flags -Wall -Wno-multichar -Wsign-compare -Wundef"
flags="$flags -Wwrite-strings -Wpointer-arith"
flags="$flags -W -Wno-unused-parameter -Wformat=2"
flags="$flags -Wredundant-decls"
flags="$flags -W -Wno-unused-parameter -Wredundant-decls"
flags="$flags -Wformat=2 -Wformat-security"
if [ $enable_assert -eq 0 ]; then
# Do not warn about unused variables when building without asserts
@@ -1346,6 +1350,12 @@ make_compiler_cflags() {
cxxflags="$cxxflags -std=gnu++0x"
fi
if [ $cc_version -eq 45 ]; then
# Prevent optimisation supposing enums are in a range specified by the standard
# For details, see http://gcc.gnu.org/PR43680
flags="$flags -fno-tree-vrp"
fi
if [ $cc_version -ge 47 ]; then
# Disable -Wnarrowing which gives many warnings, such as:
# warning: narrowing conversion of '...' from 'unsigned int' to 'int' inside { } [-Wnarrowing]
@@ -1386,11 +1396,11 @@ make_compiler_cflags() {
make_cflags_and_ldflags() {
# General CFlags for BUILD
CFLAGS_BUILD=""
CFLAGS_BUILD="$CFLAGS_BUILD"
# Special CXXFlags for BUILD
CXXFLAGS_BUILD=""
CXXFLAGS_BUILD="$CXXFLAGS_BUILD"
# LDFLAGS for BUILD
LDFLAGS_BUILD=""
LDFLAGS_BUILD="$LDFLAGS_BUILD"
# FEATURES for BUILD (lto)
FEATURES_BUILD=""
# General CFlags for HOST
@@ -1424,12 +1434,6 @@ make_cflags_and_ldflags() {
# Each debug level reduces the optimization by a bit
if [ $enable_debug -ge 1 ]; then
CFLAGS="$CFLAGS -g -D_DEBUG"
if basename "$cc_host" | grep "gcc" &>/dev/null; then
# Define only when compiling with GCC, some
# GLIBC versions use GNU extensions in a way
# that breaks build with at least ICC
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
fi
if [ "$os" = "PSP" ]; then
CFLAGS="$CFLAGS -G0"
fi
@@ -1444,6 +1448,18 @@ make_cflags_and_ldflags() {
fi
fi
if [ $enable_debug -le 2 ]; then
if basename "$cc_host" | grep "gcc" &>/dev/null; then
# Define only when compiling with GCC. Some GLIBC versions use GNU
# extensions in a way that breaks build with at least ICC.
# This requires -O1 or more, so debug level 3 (-O0) is excluded.
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
# Just add -O1 to the tools needed for building.
CFLAGS_BUILD="$CFLAGS_BUILD -D_FORTIFY_SOURCE=2 -O1"
fi
fi
if [ "$os" = "OSX" ] && [ $cc_version -eq 40 ]; then
# Apple's GCC 4.0 has a compiler bug for x86_64 with (higher) optimization,
# wrongly optimizing ^= in loops. This disables the failing optimisation.
@@ -1478,6 +1494,9 @@ make_cflags_and_ldflags() {
if [ $cc_version -ge 44 ]; then
LDFLAGS_BUILD="$LDFLAGS_BUILD -static-libgcc -static-libstdc++"
fi
if [ $cc_version -ge 47 ]; then
CFLAGS="$CFLAGS -mno-ms-bitfields"
fi
fi
fi
@@ -1771,6 +1790,7 @@ make_cflags_and_ldflags() {
if [ "$enable_assert" = "0" ]; then
CFLAGS="$CFLAGS -DNDEBUG"
CFLAGS_BUILD="$CFLAGS_BUILD -DNDEBUG"
fi
if [ "$enable_desync_debug" != "0" ]; then
@@ -1806,6 +1826,9 @@ make_cflags_and_ldflags() {
fi
fi
log 1 "using CFLAGS_BUILD... $CFLAGS_BUILD"
log 1 "using CXXFLAGS_BUILD... $CXXFLAGS_BUILD"
log 1 "using LDFLAGS_BUILD... $LDFLAGS_BUILD"
log 1 "using CFLAGS... $CFLAGS"
log 1 "using CXXFLAGS... $CXXFLAGS"
log 1 "using LDFLAGS... $LIBS $LDFLAGS"
@@ -2130,6 +2153,30 @@ check_makedepend() {
log 1 "checking makedepend... $makedepend"
}
check_version() {
# $1 - requested version (major.minor)
# $2 - version we got (major.minor)
if [ -z "$2" ]; then
return 0
fi
req_major=`echo $1 | cut -d. -f1`
got_major=`echo $2 | cut -d. -f1`
if [ $got_major -lt $req_major ]; then
return 0
elif [ $got_major -gt $req_major ]; then
return 1
fi
req_minor=`echo $1 | cut -d. -f2`
got_minor=`echo $2 | cut -d. -f2`
if [ $got_minor -lt $req_minor ]; then
return 0
fi
return 1
}
detect_awk() {
# Not all awks allow gsub(), so we test for that here! It is in fact all we need...
@@ -2815,13 +2862,14 @@ detect_fontconfig() {
version=`$fontconfig_config --modversion 2>/dev/null`
ret=$?
shortversion=`echo $version | cut -c 1,3`
check_version '2.3' "$version"
version_ok=$?
log 2 "executing $fontconfig_config --modversion"
log 2 " returned $version"
log 2 " exit code $ret"
if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$shortversion" -le "22" ]; then
if [ -n "$shortversion" ] && [ "$shortversion" -le "22" ]; then
if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$version_ok" != "1" ]; then
if [ -n "$version" ] && [ "$version_ok" != "1" ]; then
log 1 "checking libfontconfig... needs at least version 2.3.0, fontconfig NOT enabled"
else
log 1 "checking libfontconfig... not found"
@@ -2864,13 +2912,14 @@ detect_icu() {
version=`$icu_config --version 2>/dev/null`
ret=$?
shortversion=`echo $version | cut -c 1,3`
check_version '3.6' "$version"
version_ok=$?
log 2 "executing $icu_config --version"
log 2 " returned $version"
log 2 " exit code $ret"
if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$shortversion" -lt "36" ]; then
if [ -n "$shortversion" ] && [ "$shortversion" -lt "36" ]; then
if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$version_ok" != "1" ]; then
if [ -n "$version" ] && [ "$version_ok" != "1" ]; then
log 1 "checking libicu... needs at least version 3.6.0, icu NOT enabled"
else
log 1 "checking libicu... not found"
@@ -3120,9 +3169,9 @@ detect_grfcodec() {
log 2 " returned $version"
log 2 " exit code $ret"
if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$version" -lt "913" ]; then
if [ -n "$version" ] && [ "$version" -lt "913" ]; then
log 1 "checking grfcodec... needs at least version 5.1.4 (r913), disabled"
if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$version" -lt "949" ]; then
if [ -n "$version" ] && [ "$version" -lt "949" ]; then
log 1 "checking grfcodec... needs at least version 6.0.2 (r949), disabled"
else
log 1 "checking grfcodec... not found"
fi
@@ -3162,9 +3211,9 @@ detect_nforenum() {
log 2 " returned $version"
log 2 " exit code $ret"
if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$version" -lt "913" ]; then
if [ -n "$version" ] && [ "$version" -lt "913" ]; then
log 1 "checking nforenum... needs at least version 5.1.4 (r913), disabled"
if [ -z "$version" ] || [ "$ret" != "0" ] || [ "$version" -lt "949" ]; then
if [ -n "$version" ] && [ "$version" -lt "949" ]; then
log 1 "checking nforenum... needs at least version 6.0.2 (r949), disabled"
else
log 1 "checking nforenum... not found"
fi
@@ -3599,6 +3648,9 @@ showhelp() {
echo " LDFLAGS linker flags, e.g. -L<lib dir> if you"
echo " have libraries in a nonstandard"
echo " directory <lib dir>"
echo " CFLAGS_BUILD C compiler flags for build time tool generation"
echo " CXXFLAGS_BUILD C++ compiler flags for build time tool generation"
echo " LDFLAGS_BUILD linker flags for build time tool generation"
echo ""
echo "Use these variables to override the choices made by 'configure' or to help"
echo "it to find libraries and programs with nonstandard names/locations."

View File

@@ -1,44 +0,0 @@
32bpp and OpenTTD
Last updated: 2007-06-13
------------------------------------------------------------------------
Table of contents
-----------------
1.0) About
2.0) The format
1.0) About
---- -----
OpenTTD has 32bpp support. This means: OpenTTD still is 8bpp, but it has the
posibility to override the graphics with 32bpp. This means that it isn't a
replacement of grf or newgrf, but simply an addition. If you want to use 32bpp
graphics of a newgrf, you do need the newgrf itself too (with 8bpp graphics).
2.0) The format
---- ----------
32bpp images are stored in PNG. They should go in:
data/sprites/<grfname>/<SpriteID>.png
For example, a grfname would be 'openttd' (without .grf, lowercase), and the
SpriteID 3, to override the 3rd sprite in openttd.grf with a 32bpp version.
The format of this PNG can be almost anything, but we advise to use RGBA
format. Alpha-channel is fully supported.
As the core of OpenTTD is 8bpp, and because you of course want company colours
in your images, you will need to add a mask for every sprite that needs colour
remapping. The name is simular as above, only you have to put a 'm' behind the
SpriteID. This image should be a 8bpp palette image, where the palette is the
OpenTTD palette. Upon load of the PNG, the mask is loaded too, and overrides
the RGB (not the Alpha) of the original PNG image, and replacing it with a
8bpp color remapped and converted to 32bpp.
Another thing that OpenTTD needs in your png, is 2 tEXt chunks: x_offs and
y_offs. This to define the x- and y-offset, of course. Use the tool we supply
to add this information. Sadly enough most graphical editors trashes those
chunks upon save, so you have to readd it every time you save your image.
Your images should be the same as the grf, in size.

View File

@@ -1,6 +1,6 @@
OpenTTD's known bugs
Last updated: 2012-03-04
Release version: 1.2.0-RC2
Last updated: 2012-06-01
Release version: 1.2.1
------------------------------------------------------------------------

View File

@@ -7,7 +7,7 @@
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
//
-1 * 0 0C "OpenTTD GUI graphics"
-1 * 3 05 15 A2
-1 * 3 05 15 \b 168 // OPENTTD_SPRITE_COUNT
-1 sprites/openttdgui.png 8bpp 66 8 64 31 -31 7 normal
-1 sprites/openttdgui.png 8bpp 146 8 64 31 -31 7 normal
-1 sprites/openttdgui.png 8bpp 226 8 64 31 -31 7 normal
@@ -170,3 +170,9 @@
-1 sprites/openttdgui.png 8bpp 194 440 13 10 0 -2 normal
-1 sprites/openttdgui.png 8bpp 215 440 9 10 0 0 normal
-1 sprites/openttdgui.png 8bpp 232 440 8 10 0 0 normal
-1 sprites/openttdgui.png 8bpp 248 440 8 8 0 0 normal
-1 sprites/openttdgui.png 8bpp 264 440 8 8 0 0 normal
-1 sprites/openttdgui.png 8bpp 280 440 8 8 0 0 normal
-1 sprites/openttdgui.png 8bpp 296 440 8 8 0 0 normal
-1 sprites/openttdgui.png 8bpp 312 440 14 10 0 0 normal
-1 sprites/openttdgui.png 8bpp 328 440 14 10 0 0 normal

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -0,0 +1,13 @@
# $Id: openttd.desktop.translation.awk 19884 2010-05-22 19:59:37Z rubidium $
# This file is part of OpenTTD.
# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
#
# Awk script to automatically remove duplicate Comment[i]= lines
#
BEGIN { FS = "="; last = "" }
{ if (last != $1) { print $0 }; last = $1 }

View File

@@ -6,10 +6,10 @@
# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
#
# Awk script to automatically generate a single comment line
# for a translated desktop shortcut. If it does not exist there
# Awk script to automatically generate a comment lines for
# a translated desktop shortcut. If it does not exist there
# is no output.
#
/##isocode/ { lang = $2; next }
/STR_DESKTOP_SHORTCUT_COMMENT/ { sub("^[^:]*:", "", $0); print "Comment[" lang "]=" $0; next}
/STR_DESKTOP_SHORTCUT_COMMENT/ { sub("^[^:]*:", "", $0); print "Comment[" lang "]=" $0; sub("_.*", "", lang); print "Comment[" lang "]=" $0; next}

View File

@@ -1,3 +1,81 @@
openttd (1.3.0~RC2) unstable; urgency=low
* New upstream release 1.3.0-RC2
-- Matthijs Kooijman <matthijs@stdin.nl> Tue, 05 Mar 2013 00:00:00 +0100
openttd (1.3.0~RC1) unstable; urgency=low
* New upstream release 1.3.0-RC1
-- Matthijs Kooijman <matthijs@stdin.nl> Tue, 19 Feb 2013 00:00:00 +0100
openttd (1.3.0~beta2) unstable; urgency=low
* New upstream release 1.3.0-beta2
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 07 Feb 2013 00:00:00 +0100
openttd (1.3.0~beta1) unstable; urgency=low
* New upstream release 1.3.0-beta1
-- Matthijs Kooijman <matthijs@stdin.nl> Mon, 24 Dec 2012 00:00:00 +0100
openttd (1.2.3) unstable; urgency=low
* New upstream release 1.2.3
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 01 Nov 2012 00:00:00 +0200
openttd (1.2.3~RC1) unstable; urgency=low
* New upstream release 1.2.3-RC1
-- Matthijs Kooijman <matthijs@stdin.nl> Wed, 17 Oct 2012 00:00:00 +0200
openttd (1.2.2) unstable; urgency=low
* New upstream release 1.2.2
-- Matthijs Kooijman <matthijs@stdin.nl> Thu, 16 Aug 2012 20:00:00 +0200
openttd (1.2.2~RC1) unstable; urgency=low
* New upstream release 1.2.2-RC1
-- Matthijs Kooijman <matthijs@stdin.nl> Wed, 01 Aug 2012 00:00:00 +0200
openttd (1.2.1) unstable; urgency=low
* New upstream release 1.2.1
-- Matthijs Kooijman <matthijs@stdin.nl> Fri, 01 Jun 2012 00:00:00 +0200
openttd (1.2.1~RC1) unstable; urgency=low
* New upstream release 1.2.1-RC1
-- Matthijs Kooijman <matthijs@stdin.nl> Wed, 16 Apr 2012 22:00:00 +0200
openttd (1.2.0) unstable; urgency=low
* New upstream release 1.2.0
-- Matthijs Kooijman <matthijs@stdin.nl> Sun, 15 Apr 2012 14:00:00 +0200
openttd (1.2.0~RC4) unstable; urgency=low
* New upstream release 1.2.0-RC4
-- Matthijs Kooijman <matthijs@stdin.nl> Sun, 01 Apr 2012 00:00:00 +0200
openttd (1.2.0~RC3) unstable; urgency=low
* New upstream release 1.2.0-RC3
-- Matthijs Kooijman <matthijs@stdin.nl> Sun, 18 Mar 2012 18:00:00 +0100
openttd (1.2.0~RC2) unstable; urgency=low
* New upstream release 1.2.0-RC2

Binary file not shown.

View File

@@ -1,6 +1,6 @@
@echo off
set OPENTTD_VERSION=1.2.0-RC2
set OPENTTD_VERSION=1.3.0-RC2
set OPENSFX_VERSION=0.8.0
set NOSOUND_VERSION=0.8.0
set OPENGFX_VERSION=1.2.0

View File

@@ -17,9 +17,9 @@
#
Name: openttd
Version: 1.2.beta4
Version: 1.3.beta2
Release: 0
%define srcver 1.2.0-beta4
%define srcver 1.3.0-beta2
Summary: An open source reimplementation of Chris Sawyer's Transport Tycoon Deluxe
License: GPL-2.0
Group: Amusements/Games/Strategy/Other
@@ -227,11 +227,13 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%dir %{_datadir}/%{name}/baseset
%dir %{_datadir}/%{name}/scripts
%dir %{_datadir}/%{name}/ai
%dir %{_datadir}/%{name}/game
%{_datadir}/doc/%{name}/*
%{_datadir}/%{name}/lang/*
%{_datadir}/%{name}/baseset/*
%{_datadir}/%{name}/scripts/*
%{_datadir}/%{name}/ai/*
%{_datadir}/%{name}/game/*
%doc %{_mandir}/man6/%{name}.6.*
%files gui

View File

@@ -1,8 +1,8 @@
# Version numbers to update
!define APPV_MAJOR 1
!define APPV_MINOR 2
!define APPV_MINOR 3
!define APPV_MAINT 0
!define APPV_BUILD 5
!define APPV_BUILD 3
!define APPV_EXTRA "-RC2"
!define APPNAME "OpenTTD" ; Define application name
@@ -124,6 +124,10 @@ Section "!OpenTTD" Section1
SetOutPath "$INSTDIR\ai\"
File ${PATH_ROOT}bin\ai\compat_*.nut
; Copy Game Script files
SetOutPath "$INSTDIR\game\"
File ${PATH_ROOT}bin\game\compat_*.nut
; Copy data files
SetOutPath "$INSTDIR\baseset\"
File ${PATH_ROOT}bin\baseset\*.grf
@@ -143,9 +147,6 @@ Section "!OpenTTD" Section1
File ${PATH_ROOT}docs\multiplayer.txt
Push "$INSTDIR\docs\multiplayer.txt"
Call unix2dos
File ${PATH_ROOT}docs\32bpp.txt
Push "$INSTDIR\docs\32bpp.txt"
Call unix2dos
; Copy the rest of the stuff
SetOutPath "$INSTDIR\"
@@ -217,7 +218,6 @@ Section "!OpenTTD" Section1
CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Known-bugs.lnk" "$INSTDIR\known-bugs.txt"
CreateDirectory "$SMPROGRAMS\$SHORTCUTS\Docs"
CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Docs\Multiplayer.lnk" "$INSTDIR\docs\multiplayer.txt"
CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Docs\32bpp.lnk" "$INSTDIR\docs\32bpp.txt"
CreateDirectory "$SMPROGRAMS\$SHORTCUTS\Scripts"
CreateShortCut "$SMPROGRAMS\$SHORTCUTS\Scripts\Readme.lnk" "$INSTDIR\scripts\readme.txt"
!insertmacro MUI_STARTMENU_WRITE_END
@@ -402,6 +402,9 @@ Section "Uninstall"
; AI files
Delete "$INSTDIR\ai\compat_*.nut"
; Game Script files
Delete "$INSTDIR\game\compat_*.nut"
; Baseset files
Delete "$INSTDIR\baseset\opntitle.dat"
Delete "$INSTDIR\baseset\openttd.grf"
@@ -473,6 +476,7 @@ Section "Uninstall"
RMDir "$SMPROGRAMS\$SHORTCUTS\Docs\"
RMDir "$SMPROGRAMS\$SHORTCUTS"
RMDir "$INSTDIR\ai"
RMDir "$INSTDIR\game"
RMDir "$INSTDIR\data"
RMDir "$INSTDIR\baseset"
RMDir "$INSTDIR\gm"

View File

@@ -177,6 +177,9 @@ Function DetermineSVNVersion()
' Make sure index is in sync with disk
Set oExec = WshShell.Exec("git update-index --refresh")
If Err.Number = 0 Then
' StdOut and StdErr share a 4kB buffer so prevent it from filling up as we don't care about the output
oExec.StdOut.Close
oExec.StdErr.Close
' Wait till the application is finished ...
Do While oExec.Status = 0
WScript.Sleep 10

View File

@@ -59,6 +59,12 @@
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\arabic_egypt.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\basque.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating basque language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\src\lang\english.txt;..\objs\strgen\strgen.exe;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\lang\basque.lng;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="..\src\lang\belarusian.txt">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Generating belarusian language file</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang "%(FullPath)"</Command>

View File

@@ -13,6 +13,9 @@
<CustomBuild Include="..\src\lang\arabic_egypt.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\basque.txt">
<Filter>Translations</Filter>
</CustomBuild>
<CustomBuild Include="..\src\lang\belarusian.txt">
<Filter>Translations</Filter>
</CustomBuild>

View File

@@ -93,6 +93,21 @@
/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\basque.txt"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description="Generating basque language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;&#x0D;&#x0A;exit 0&#x0D;&#x0A;"
AdditionalDependencies="..\src\lang\english.txt;..\objs\strgen\strgen.exe"
Outputs="..\bin\lang\basque.lng"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\belarusian.txt"
>

View File

@@ -94,6 +94,21 @@
/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\basque.txt"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description="Generating basque language file"
CommandLine="..\objs\strgen\strgen.exe -s ..\src\lang -d ..\bin\lang &quot;$(InputPath)&quot;&#x0D;&#x0A;exit 0&#x0D;&#x0A;"
AdditionalDependencies="..\src\lang\english.txt;..\objs\strgen\strgen.exe"
Outputs="..\bin\lang\basque.lng"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\src\lang\belarusian.txt"
>

View File

@@ -296,6 +296,7 @@
<ClCompile Include="..\src\articulated_vehicles.cpp" />
<ClCompile Include="..\src\autoreplace.cpp" />
<ClCompile Include="..\src\bmp.cpp" />
<ClCompile Include="..\src\cargomonitor.cpp" />
<ClCompile Include="..\src\cargopacket.cpp" />
<ClCompile Include="..\src\cargotype.cpp" />
<ClCompile Include="..\src\cheat.cpp" />
@@ -316,6 +317,7 @@
<ClCompile Include="..\src\fileio.cpp" />
<ClCompile Include="..\src\fios.cpp" />
<ClCompile Include="..\src\fontcache.cpp" />
<ClCompile Include="..\src\base_consist.cpp" />
<ClCompile Include="..\src\gamelog.cpp" />
<ClCompile Include="..\src\genworld.cpp" />
<ClCompile Include="..\src\gfx.cpp" />
@@ -360,8 +362,10 @@
<ClCompile Include="..\src\station.cpp" />
<ClCompile Include="..\src\strgen\strgen_base.cpp" />
<ClCompile Include="..\src\string.cpp" />
<ClCompile Include="..\src\stringfilter.cpp" />
<ClCompile Include="..\src\strings.cpp" />
<ClCompile Include="..\src\subsidy.cpp" />
<ClCompile Include="..\src\textbuf.cpp" />
<ClCompile Include="..\src\texteff.cpp" />
<ClCompile Include="..\src\tgp.cpp" />
<ClCompile Include="..\src\tile_map.cpp" />
@@ -388,6 +392,7 @@
<ClInclude Include="..\src\bmp.h" />
<ClInclude Include="..\src\bridge.h" />
<ClInclude Include="..\src\cargo_type.h" />
<ClInclude Include="..\src\cargomonitor.h" />
<ClInclude Include="..\src\cargopacket.h" />
<ClInclude Include="..\src\cargotype.h" />
<ClInclude Include="..\src\cheat_func.h" />
@@ -435,6 +440,7 @@
<ClInclude Include="..\src\fileio_type.h" />
<ClInclude Include="..\src\fios.h" />
<ClInclude Include="..\src\fontcache.h" />
<ClInclude Include="..\src\base_consist.h" />
<ClInclude Include="..\src\gamelog.h" />
<ClInclude Include="..\src\gamelog_internal.h" />
<ClInclude Include="..\src\genworld.h" />
@@ -539,6 +545,7 @@
<ClInclude Include="..\src\sound\sdl_s.h" />
<ClInclude Include="..\src\video\sdl_v.h" />
<ClInclude Include="..\src\settings_func.h" />
<ClInclude Include="..\src\settings_gui.h" />
<ClInclude Include="..\src\settings_internal.h" />
<ClInclude Include="..\src\settings_type.h" />
<ClInclude Include="..\src\ship.h" />
@@ -564,6 +571,7 @@
<ClInclude Include="..\src\strgen\strgen.h" />
<ClInclude Include="..\src\string_func.h" />
<ClInclude Include="..\src\string_type.h" />
<ClInclude Include="..\src\stringfilter_type.h" />
<ClInclude Include="..\src\strings_func.h" />
<ClInclude Include="..\src\strings_type.h" />
<ClInclude Include="..\src\subsidy_base.h" />
@@ -572,6 +580,7 @@
<ClInclude Include="..\src\tar_type.h" />
<ClInclude Include="..\src\terraform_gui.h" />
<ClInclude Include="..\src\textbuf_gui.h" />
<ClInclude Include="..\src\textbuf_type.h" />
<ClInclude Include="..\src\texteff.hpp" />
<ClInclude Include="..\src\textfile_gui.h" />
<ClInclude Include="..\src\textfile_type.h" />
@@ -783,6 +792,7 @@
<ClCompile Include="..\src\saveload\airport_sl.cpp" />
<ClCompile Include="..\src\saveload\animated_tile_sl.cpp" />
<ClCompile Include="..\src\saveload\autoreplace_sl.cpp" />
<ClCompile Include="..\src\saveload\cargomonitor_sl.cpp" />
<ClCompile Include="..\src\saveload\cargopacket_sl.cpp" />
<ClCompile Include="..\src\saveload\cheat_sl.cpp" />
<ClCompile Include="..\src\saveload\company_sl.cpp" />
@@ -947,6 +957,7 @@
<ClInclude Include="..\src\script\api\script_bridgelist.hpp" />
<ClInclude Include="..\src\script\api\script_cargo.hpp" />
<ClInclude Include="..\src\script\api\script_cargolist.hpp" />
<ClInclude Include="..\src\script\api\script_cargomonitor.hpp" />
<ClInclude Include="..\src\script\api\script_company.hpp" />
<ClInclude Include="..\src\script\api\script_companymode.hpp" />
<ClInclude Include="..\src\script\api\script_controller.hpp" />
@@ -1008,6 +1019,7 @@
<ClCompile Include="..\src\script\api\script_bridgelist.cpp" />
<ClCompile Include="..\src\script\api\script_cargo.cpp" />
<ClCompile Include="..\src\script\api\script_cargolist.cpp" />
<ClCompile Include="..\src\script\api\script_cargomonitor.cpp" />
<ClCompile Include="..\src\script\api\script_company.cpp" />
<ClCompile Include="..\src\script\api\script_companymode.cpp" />
<ClCompile Include="..\src\script\api\script_controller.cpp" />

View File

@@ -117,6 +117,9 @@
<ClCompile Include="..\src\bmp.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\cargomonitor.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\cargopacket.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -177,6 +180,9 @@
<ClCompile Include="..\src\fontcache.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\base_consist.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\gamelog.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -309,12 +315,18 @@
<ClCompile Include="..\src\string.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\stringfilter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\strings.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\subsidy.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\textbuf.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\texteff.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -393,6 +405,9 @@
<ClInclude Include="..\src\cargo_type.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\cargomonitor.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\cargopacket.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -534,6 +549,9 @@
<ClInclude Include="..\src\fontcache.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\base_consist.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\gamelog.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -846,6 +864,9 @@
<ClInclude Include="..\src\settings_func.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\settings_gui.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\settings_internal.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -921,6 +942,9 @@
<ClInclude Include="..\src\string_type.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\stringfilter_type.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\strings_func.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -945,6 +969,9 @@
<ClInclude Include="..\src\textbuf_gui.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\textbuf_type.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\texteff.hpp">
<Filter>Header Files</Filter>
</ClInclude>
@@ -1578,6 +1605,9 @@
<ClCompile Include="..\src\saveload\autoreplace_sl.cpp">
<Filter>Save/Load handlers</Filter>
</ClCompile>
<ClCompile Include="..\src\saveload\cargomonitor_sl.cpp">
<Filter>Save/Load handlers</Filter>
</ClCompile>
<ClCompile Include="..\src\saveload\cargopacket_sl.cpp">
<Filter>Save/Load handlers</Filter>
</ClCompile>
@@ -2070,6 +2100,9 @@
<ClInclude Include="..\src\script\api\script_cargolist.hpp">
<Filter>Script API</Filter>
</ClInclude>
<ClInclude Include="..\src\script\api\script_cargomonitor.hpp">
<Filter>Script API</Filter>
</ClInclude>
<ClInclude Include="..\src\script\api\script_company.hpp">
<Filter>Script API</Filter>
</ClInclude>
@@ -2253,6 +2286,9 @@
<ClCompile Include="..\src\script\api\script_cargolist.cpp">
<Filter>Script API Implementation</Filter>
</ClCompile>
<ClCompile Include="..\src\script\api\script_cargomonitor.cpp">
<Filter>Script API Implementation</Filter>
</ClCompile>
<ClCompile Include="..\src\script\api\script_company.cpp">
<Filter>Script API Implementation</Filter>
</ClCompile>

View File

@@ -454,6 +454,10 @@
RelativePath=".\..\src\bmp.cpp"
>
</File>
<File
RelativePath=".\..\src\cargomonitor.cpp"
>
</File>
<File
RelativePath=".\..\src\cargopacket.cpp"
>
@@ -534,6 +538,10 @@
RelativePath=".\..\src\fontcache.cpp"
>
</File>
<File
RelativePath=".\..\src\base_consist.cpp"
>
</File>
<File
RelativePath=".\..\src\gamelog.cpp"
>
@@ -710,6 +718,10 @@
RelativePath=".\..\src\string.cpp"
>
</File>
<File
RelativePath=".\..\src\stringfilter.cpp"
>
</File>
<File
RelativePath=".\..\src\strings.cpp"
>
@@ -718,6 +730,10 @@
RelativePath=".\..\src\subsidy.cpp"
>
</File>
<File
RelativePath=".\..\src\textbuf.cpp"
>
</File>
<File
RelativePath=".\..\src\texteff.cpp"
>
@@ -826,6 +842,10 @@
RelativePath=".\..\src\cargo_type.h"
>
</File>
<File
RelativePath=".\..\src\cargomonitor.h"
>
</File>
<File
RelativePath=".\..\src\cargopacket.h"
>
@@ -1014,6 +1034,10 @@
RelativePath=".\..\src\fontcache.h"
>
</File>
<File
RelativePath=".\..\src\base_consist.h"
>
</File>
<File
RelativePath=".\..\src\gamelog.h"
>
@@ -1430,6 +1454,10 @@
RelativePath=".\..\src\settings_func.h"
>
</File>
<File
RelativePath=".\..\src\settings_gui.h"
>
</File>
<File
RelativePath=".\..\src\settings_internal.h"
>
@@ -1530,6 +1558,10 @@
RelativePath=".\..\src\string_type.h"
>
</File>
<File
RelativePath=".\..\src\stringfilter_type.h"
>
</File>
<File
RelativePath=".\..\src\strings_func.h"
>
@@ -1562,6 +1594,10 @@
RelativePath=".\..\src\textbuf_gui.h"
>
</File>
<File
RelativePath=".\..\src\textbuf_type.h"
>
</File>
<File
RelativePath=".\..\src\texteff.hpp"
>
@@ -2426,6 +2462,10 @@
RelativePath=".\..\src\saveload\autoreplace_sl.cpp"
>
</File>
<File
RelativePath=".\..\src\saveload\cargomonitor_sl.cpp"
>
</File>
<File
RelativePath=".\..\src\saveload\cargopacket_sl.cpp"
>
@@ -3122,6 +3162,10 @@
RelativePath=".\..\src\script\api\script_cargolist.hpp"
>
</File>
<File
RelativePath=".\..\src\script\api\script_cargomonitor.hpp"
>
</File>
<File
RelativePath=".\..\src\script\api\script_company.hpp"
>
@@ -3370,6 +3414,10 @@
RelativePath=".\..\src\script\api\script_cargolist.cpp"
>
</File>
<File
RelativePath=".\..\src\script\api\script_cargomonitor.cpp"
>
</File>
<File
RelativePath=".\..\src\script\api\script_company.cpp"
>

View File

@@ -451,6 +451,10 @@
RelativePath=".\..\src\bmp.cpp"
>
</File>
<File
RelativePath=".\..\src\cargomonitor.cpp"
>
</File>
<File
RelativePath=".\..\src\cargopacket.cpp"
>
@@ -531,6 +535,10 @@
RelativePath=".\..\src\fontcache.cpp"
>
</File>
<File
RelativePath=".\..\src\base_consist.cpp"
>
</File>
<File
RelativePath=".\..\src\gamelog.cpp"
>
@@ -707,6 +715,10 @@
RelativePath=".\..\src\string.cpp"
>
</File>
<File
RelativePath=".\..\src\stringfilter.cpp"
>
</File>
<File
RelativePath=".\..\src\strings.cpp"
>
@@ -715,6 +727,10 @@
RelativePath=".\..\src\subsidy.cpp"
>
</File>
<File
RelativePath=".\..\src\textbuf.cpp"
>
</File>
<File
RelativePath=".\..\src\texteff.cpp"
>
@@ -823,6 +839,10 @@
RelativePath=".\..\src\cargo_type.h"
>
</File>
<File
RelativePath=".\..\src\cargomonitor.h"
>
</File>
<File
RelativePath=".\..\src\cargopacket.h"
>
@@ -1011,6 +1031,10 @@
RelativePath=".\..\src\fontcache.h"
>
</File>
<File
RelativePath=".\..\src\base_consist.h"
>
</File>
<File
RelativePath=".\..\src\gamelog.h"
>
@@ -1427,6 +1451,10 @@
RelativePath=".\..\src\settings_func.h"
>
</File>
<File
RelativePath=".\..\src\settings_gui.h"
>
</File>
<File
RelativePath=".\..\src\settings_internal.h"
>
@@ -1527,6 +1555,10 @@
RelativePath=".\..\src\string_type.h"
>
</File>
<File
RelativePath=".\..\src\stringfilter_type.h"
>
</File>
<File
RelativePath=".\..\src\strings_func.h"
>
@@ -1559,6 +1591,10 @@
RelativePath=".\..\src\textbuf_gui.h"
>
</File>
<File
RelativePath=".\..\src\textbuf_type.h"
>
</File>
<File
RelativePath=".\..\src\texteff.hpp"
>
@@ -2423,6 +2459,10 @@
RelativePath=".\..\src\saveload\autoreplace_sl.cpp"
>
</File>
<File
RelativePath=".\..\src\saveload\cargomonitor_sl.cpp"
>
</File>
<File
RelativePath=".\..\src\saveload\cargopacket_sl.cpp"
>
@@ -3119,6 +3159,10 @@
RelativePath=".\..\src\script\api\script_cargolist.hpp"
>
</File>
<File
RelativePath=".\..\src\script\api\script_cargomonitor.hpp"
>
</File>
<File
RelativePath=".\..\src\script\api\script_company.hpp"
>
@@ -3367,6 +3411,10 @@
RelativePath=".\..\src\script\api\script_cargolist.cpp"
>
</File>
<File
RelativePath=".\..\src\script\api\script_cargomonitor.cpp"
>
</File>
<File
RelativePath=".\..\src\script\api\script_company.cpp"
>

View File

@@ -1,6 +1,6 @@
OpenTTD readme
Last updated: 2012-03-04
Release version: 1.2.0-RC2
Last updated: 2013-03-05
Release version: 1.3.0-RC2
------------------------------------------------------------------------
@@ -80,8 +80,10 @@ After you have done all that you can report the bug. Please include the
following information in your bug report:
* OpenTTD version (PLEASE test the latest SVN/nightly build)
* Bug details, including instructions how to reproduce it
* Platform (Win32, Linux, FreeBSD, ...) and compiler (including version) if
* Platform (Windows, Linux, FreeBSD, ...) and compiler (including version) if
you compiled OpenTTD yourself.
* The processor architecture of your OS (32 bits Windows, 64 bits Windows,
Linux on an ARM, Mac OS X on a PowerPC, ...)
* Attach a saved game *and* a screenshot if possible
* If this bug only occurred recently please note the last version without
the bug and the first version including the bug. That way we can fix it
@@ -145,9 +147,9 @@ will not be able to reproduce the desync and thus will be unable to fix it.
3.0) Supported platforms
---- -------------------
OpenTTD has been ported to several platforms and operating systems. It shouldn't
be very difficult to port it to a new platform. The currently working platforms
are:
OpenTTD has been ported to several platforms and operating systems. It should
not be very difficult to port it to a new platform. The currently working
platforms are:
BeOS - SDL or Allegro
DOS - Allegro
@@ -168,7 +170,7 @@ be installed, or you have downloaded an installer, which will automatically
extract OpenTTD in the given directory.
OpenTTD looks in multiple locations to find the required data files (described
in section 4.2). Installing any 3rd party files into a "shared" location has
in section 4.2). Installing any 3rd party files into a 'shared' location has
the advantage that you only need to do this step once, rather than copying the
data files into all OpenTTD versions you have.
Savegames, screenshots, etc are saved relative to the config file (openttd.cfg)
@@ -177,15 +179,16 @@ shared directories, savegames will reside in the save/ directory next to the
openttd.cfg file there.
If you want savegames and screenshots in the directory where the OpenTTD binary
resides, simply have your config file in that location. But if you remove this
config file, savegames will still be in this directory (see notes in section 4.2)
config file, savegames will still be in this directory (see notes in
section 4.2 'OpenTTD directories')
OpenTTD comes without AIs, so if you want to play with AIs you have to download
them. The easiest way is via the "Check Online Content" button in the main menu.
them. The easiest way is via the 'Check Online Content' button in the main menu.
You can select some AIs that you think are compatible with your playing style.
Another way is manually downloading the AIs from the forum although then you
need to make sure that you install all the required AI libraries too; they get
automatically selected (and downloaded) if you get the AIs via the "Check
Online Content". If you do not have an AI but have configured OpenTTD to start
automatically selected (and downloaded) if you get the AIs via the 'Check
Online Content'. If you do not have an AI but have configured OpenTTD to start
an AI a message will be shown that the 'dummy' AI has been started.
4.1) (Required) 3rd party files
@@ -198,7 +201,7 @@ For OpenTTD you need to acquire some third party data files. For this you have
the choice of using the original Transport Tycoon Deluxe data files or a set
of free data files.
Do NOT copy files included with OpenTTD into "shared" directories (explained in
Do NOT copy files included with OpenTTD into 'shared' directories (explained in
the following sections) as sooner or later you will run into graphical glitches
when using other versions of the game.
@@ -239,7 +242,7 @@ not work.
If you want AIs use the in-game content downloader. If for some reason that is
not possible or you want to use an AI that has not been uploaded to the content
download system download the tar file and place it in the ai/ directory. If the
AI needs libraries you'll have to download those too and put them in the
AI needs libraries you will have to download those too and put them in the
ai/library/ directory. All AIs and AI Libraries that have been uploaded to
the content download system can be found at http://noai.openttd.org/downloads/
The AIs and libraries can be found their in the form of .tar.gz packages.
@@ -247,20 +250,32 @@ OpenTTD can read inside tar files but it does not extract .tar.gz files by
itself.
To figure out which libraries you need for an AI you have to start the AI and
wait for an error message to pop up. The error message will tell you
"couldn't find library 'lib-name'". Download that library and try again.
'could not find library "lib-name"'. Download that library and try again.
4.1.5) Game scripts
------ ------------
If you want an extra challenge in OpenTTD you can download so-called game
scripts via the in-game content downloader. These game scripts have varying
functionality, though they can generally influence town growth, subsidies, add
goals to reach or provide a different ranking system.
If you download a game script manually you have to follow the same rules as for
AIs, except that game scripts are placed in the game/ directory instead of the
ai/ directory.
4.2) OpenTTD directories
---- -------------------
OpenTTD uses its own directory to store its required 3rd party base set files (see section
4.1 "Required 3rd party files") and non-compulsory extension and configuration files. See
below for their proper place within this OpenTTD main data directory.
OpenTTD uses its own directory to store its required 3rd party base set files
(see section 4.1 'Required 3rd party files') and non-compulsory extension and
configuration files. See below for their proper place within this OpenTTD main
data directory.
The main OpenTTD directories can be found in various locations, depending on your operating
system:
The main OpenTTD directories can be found in various locations, depending on
your operating system:
1. The current working directory (from where you started OpenTTD)
For non-Windows operating systems OpenTTD will not scan for files in this
directory if it is your personal directory, i.e. "~/", or when it is the
root directory, i.e. "/".
directory if it is your personal directory, i.e. '~/', or when it is the
root directory, i.e. '/'.
2. Your personal directory
Windows: C:\My Documents\OpenTTD (95, 98, ME)
C:\Documents and Settings\<username>\My Documents\OpenTTD (2000, XP)
@@ -278,13 +293,13 @@ system:
5. The installation directory (Linux only)
Linux: /usr/share/games/openttd
6. The application bundle (Mac OSX only)
It includes the OpenTTD files (grf+lng) and it will work as long as they aren't
touched
It includes the OpenTTD files (grf+lng) and it will work as long as they
are not touched
Different types of data or extensions go into different subdirectories of the chosen main
OpenTTD directory:
Different types of data or extensions go into different subdirectories of the
chosen main OpenTTD directory:
Config File: (no subdirectory)
Screenshots: (no subdirectory)
Screenshots: screenshot
Base Graphics: baseset (or a subdirectory thereof)
Sound Sets: baseset (or a subdirectory thereof)
NewGRFs: newgrf (or a subdirectory thereof)
@@ -298,21 +313,24 @@ OpenTTD directory:
Automatic Savegames: save/autosave
Scenarios: scenario
The (automatically created) directory content_download is for OpenTTD's internal use and
no files should be added to it or its subdirectories manually.
The (automatically created) directory content_download is for OpenTTD's internal
use and no files should be added to it or its subdirectories manually.
Notes:
- Linux in the previous list means .deb, but most paths should be similar for others.
- Linux in the previous list means .deb, but most paths should be similar for
others.
- The previous search order is also used for NewGRFs and openttd.cfg.
- If openttd.cfg is not found, then it will be created using the 2, 4, 1, 3, 5 order.
- If openttd.cfg is not found, then it will be created using the 2, 4, 1, 3,
5 order.
- Savegames will be relative to the config file only if there is no save/
directory in paths with higher priority than the config file path, but
autosaves and screenshots will always be relative to the config file.
The preferred setup:
Place 3rd party files in shared directory (or in personal directory if you don't
have write access on shared directory) and have your openttd.cfg config file in
personal directory (where the game will then also place savegames and screenshots).
Place 3rd party files in shared directory (or in personal directory if you do
not have write access on shared directory) and have your openttd.cfg config
file in personal directory (where the game will then also place savegames and
screenshots).
4.3) Portable installations (portable media)
---- ---------------------------------------
@@ -334,12 +352,10 @@ makes it easy to bundle files belonging to the same script, NewGRF or base
set. Music sets are the only exception as they cannot be stored in a tar
file due to being played by external applications.
OpenTTD sees each tar archive as the 'root' of its search path. This means
that having a file with the same path in two different tar files means that
one cannot be opened, after all only one file will be found first. This is
done to make it possible to have the large 32bpp zoomed graphics in a separate
file to the (relatively small) unzoomed 8bpp NewGRF. As such it is advisable
to put an uniquely named folder in the root of the tar and put all the
OpenTTD sees each tar archive as the 'root' of its search path. This means that
having a file with the same path in two different tar files means that one
cannot be opened, after all only one file will be found first. As such it is
advisable to put an uniquely named folder in the root of the tar and put all the
content in that folder. For example, all downloaded content has a path that
concatenates the name of the content and the version, which makes the path
unique. For custom tar files it is advised to do this as well.
@@ -405,7 +421,7 @@ OpenTTD in debug mode.
6.0) Configuration file
---- ------------------
The configuration file for OpenTTD (openttd.cfg) is in a simple Windows-like
.INI format. It's mostly undocumented. Almost all settings can be changed
.INI format. It is mostly undocumented. Almost all settings can be changed
ingame by using the 'Advanced Settings' window.
When you cannot find openttd.cfg you should look in the directories as
described in section 4.2. If you do not have an openttd.cfg OpenTTD will
@@ -429,24 +445,24 @@ Windows:
Please read the Makefile for more information.
Solaris, FreeBSD, OpenBSD:
Use "gmake", but do a "./configure" before the first build.
Use 'gmake', but do a './configure' before the first build.
Linux/Unix:
OpenTTD can be built with GNU "make". On non-GNU systems it's called "gmake".
However, for the first build one has to do a "./configure" first.
OpenTTD can be built with GNU 'make'. On non-GNU systems it is called 'gmake'.
However, for the first build one has to do a './configure' first.
MacOS X:
Use "make" or Xcode (which will then call make for you)
Use 'make' or Xcode (which will then call make for you)
This will give you a binary for your CPU type (PPC/Intel)
However, for the first build one has to do a "./configure" first.
To make a universal binary type "./configure --enabled-universal"
instead of "./configure".
However, for the first build one has to do a './configure' first.
To make a universal binary type './configure --enabled-universal'
instead of './configure'.
BeOS:
Use "make", but do a "./configure" before the first build.
Use 'make', but do a './configure' before the first build.
MorphOS:
Use "make". However, for the first build one has to do a "./configure" first.
Use 'make'. However, for the first build one has to do a './configure' first.
Note that you need the MorphOS SDK, latest libnix updates (else C++ parts of
OpenTTD will not build) and the powersdl.library SDK. Optionally libz,
libpng and freetype2 developer files.
@@ -458,7 +474,7 @@ OS/2:
DOS:
A build environment with DJGPP is needed as well as libraries such as
Allegro, zlib and libpng, which all can be downloaded from the DJGPP
website. Compilation is straight forward: use make, but do a "./configure"
website. Compilation is straight forward: use make, but do a './configure'
before the first build. The build binary will need cwsdpmi.exe to be in
the same directory as the openttd executable. cwsdpmi.exe can be found in
the os/dos subdirectory. If you compile with stripping turned on a binary
@@ -489,7 +505,7 @@ To recompile the extra graphics needed to play with the original Transport
Tycoon Deluxe graphics you need GRFCodec (which includes NFORenum) as well.
GRFCodec can be found at: http://www.openttd.org/download-grfcodec
The compilation of these extra graphics does generally not happen, unless
you remove the graphics file using "make maintainer-clean".
you remove the graphics file using 'make maintainer-clean'.
7.2) Supported compilers
---- -------------------
@@ -537,7 +553,7 @@ someone else may have already started translating to the same language.
8.1) Translation
---- -----------
So, now that you've notified the development team about your intention to
So, now that you have notified the development team about your intention to
translate (You did, right? Of course you did.) you can pick up english.txt
(found in the SVN repository under /src/lang) and translate.
@@ -571,17 +587,17 @@ Any missing strings are replaced with the English strings. Note that it looks
for english.txt in the lang subdirectory, which is where your language file
should also be.
That's all! You should now be able to select the language in the game options.
That is all! You should now be able to select the language in the game options.
9.0) Troubleshooting
---- ---------------
To see all startup options available to you, start OpenTTD with the
"./openttd -h" option. This might help you tweak some of the settings.
'./openttd -h' option. This might help you tweak some of the settings.
If the game is acting strange and you feel adventurous you can try the
"-d [[<name>]=[<level>]" flag, where the higher levels will give you more
debugging output. The "name" variable can help you to display only some type of
'-d [[<name>=]<level>]' flag, where the higher levels will give you more
debugging output. The 'name' variable can help you to display only some type of
debugging messages. This is mostly undocumented so best is to look in the
source code file debug.c for the various debugging types. For more information
look at http://wiki.openttd.org/index.php/Command_line.
@@ -604,17 +620,17 @@ and add a suitable font for the small, medium and / or large font, e.g.:
small_font = "Tahoma"
medium_font = "Tahoma"
large_font = "Tahoma"
You should use a font name like "Tahoma" or a path to the desired font.
You should use a font name like 'Tahoma' or a path to the desired font.
Any NewGRF file used in a game is stored inside the savegame and will refuse
to load if you don't have that NewGRF file available. A list of missing files
to load if you do not have that NewGRF file available. A list of missing files
can be viewed in the NewGRF window accessible from the file load dialogue window.
You can try to obtain the missing files from that NewGRF dialogue or - if they
are not available online - you can search manually through our forum's graphics
development section (http://www.tt-forums.net/viewforum.php?f=66) or GrfCrawler
(http://grfcrawler.tt-forums.net/). Put the NewGRF files in OpenTTD's newgrf folder
(see section 4.2 "OpenTTD directories") and rescan the list of available NewGRFs.
(see section 4.2 'OpenTTD directories') and rescan the list of available NewGRFs.
Once you have all missing files, you are set to go.
@@ -634,6 +650,7 @@ The OpenTTD team (in alphabetical order):
Zdeněk Sojka (SmatZ) - Bug finder and fixer
José Soler (Terkhen) - General coding
Thijs Marinussen (Yexo) - AI Framework
Leif Linse (Zuu) - AI/Game Script
Inactive Developers:
Bjarni Corfitzen (Bjarni) - MacOSX port, coder and vehicles
@@ -653,7 +670,7 @@ Retired Developers:
Thanks to:
Josef Drexler - For his great work on TTDPatch.
Marcin Grzegorczyk - For his TTDPatch work and documentation of Transport Tycoon Deluxe internals and graphics (signals and track foundations)
Marcin Grzegorczyk - For his TTDPatch work and documentation of Transport Tycoon Deluxe internals and track foundations
Petr Baudiš (pasky) - Many patches, newgrf support, etc.
Simon Sasburg (HackyKid) - For the many bugfixes he has blessed us with
Stefan Meißner (sign_de) - For his work on the console

View File

@@ -4,6 +4,7 @@ animated_tile.cpp
articulated_vehicles.cpp
autoreplace.cpp
bmp.cpp
cargomonitor.cpp
cargopacket.cpp
cargotype.cpp
cheat.cpp
@@ -24,6 +25,7 @@ engine.cpp
fileio.cpp
fios.cpp
fontcache.cpp
base_consist.cpp
gamelog.cpp
genworld.cpp
gfx.cpp
@@ -70,8 +72,10 @@ spritecache.cpp
station.cpp
strgen/strgen_base.cpp
string.cpp
stringfilter.cpp
strings.cpp
subsidy.cpp
textbuf.cpp
texteff.cpp
tgp.cpp
tile_map.cpp
@@ -121,6 +125,7 @@ base_station_base.h
bmp.h
bridge.h
cargo_type.h
cargomonitor.h
cargopacket.h
cargotype.h
cheat_func.h
@@ -168,6 +173,7 @@ fileio_func.h
fileio_type.h
fios.h
fontcache.h
base_consist.h
gamelog.h
gamelog_internal.h
genworld.h
@@ -272,6 +278,7 @@ sdl.h
sound/sdl_s.h
video/sdl_v.h
settings_func.h
settings_gui.h
settings_internal.h
settings_type.h
ship.h
@@ -297,6 +304,7 @@ stdafx.h
strgen/strgen.h
string_func.h
string_type.h
stringfilter_type.h
strings_func.h
strings_type.h
subsidy_base.h
@@ -305,6 +313,7 @@ subsidy_type.h
tar_type.h
terraform_gui.h
textbuf_gui.h
textbuf_type.h
texteff.hpp
textfile_gui.h
textfile_type.h
@@ -541,6 +550,7 @@ saveload/ai_sl.cpp
saveload/airport_sl.cpp
saveload/animated_tile_sl.cpp
saveload/autoreplace_sl.cpp
saveload/cargomonitor_sl.cpp
saveload/cargopacket_sl.cpp
saveload/cheat_sl.cpp
saveload/company_sl.cpp
@@ -725,6 +735,7 @@ script/api/script_bridge.hpp
script/api/script_bridgelist.hpp
script/api/script_cargo.hpp
script/api/script_cargolist.hpp
script/api/script_cargomonitor.hpp
script/api/script_company.hpp
script/api/script_companymode.hpp
script/api/script_controller.hpp
@@ -788,6 +799,7 @@ script/api/script_bridge.cpp
script/api/script_bridgelist.cpp
script/api/script_cargo.cpp
script/api/script_cargolist.cpp
script/api/script_cargomonitor.cpp
script/api/script_company.cpp
script/api/script_companymode.cpp
script/api/script_controller.cpp

View File

@@ -210,16 +210,22 @@ static SQInteger base_suspend(HSQUIRRELVM v)
static SQInteger base_array(HSQUIRRELVM v)
{
SQArray *a;
SQObject &size = stack_get(v,2);
SQInteger nInitialSize = tointeger(stack_get(v,2));
SQInteger ret = 1;
if (nInitialSize < 0) {
v->Raise_Error(_SC("can't create/resize array with/to size %d"), nInitialSize);
nInitialSize = 0;
ret = -1;
}
if(sq_gettop(v) > 2) {
a = SQArray::Create(_ss(v),0);
a->Resize(tointeger(size),stack_get(v,3));
a->Resize(nInitialSize,stack_get(v,3));
}
else {
a = SQArray::Create(_ss(v),tointeger(size));
a = SQArray::Create(_ss(v),nInitialSize);
}
v->Push(a);
return 1;
return ret;
}
static SQInteger base_type(HSQUIRRELVM v)

View File

@@ -917,6 +917,7 @@ public:
_last_stacksize = _fs->GetStackSize();
Statement();
CleanStack(stacksize);
_fs->AddLineInfos(_lex._currentline, _lineinfo, true);
Expect(TK_WHILE);
SQInteger continuetrg = _fs->GetCurrentPos();
Expect(_SC('(')); CommaExpr(); Expect(_SC(')'));

View File

@@ -1190,7 +1190,7 @@ bool SQVM::CallNative(SQNativeClosure *nclosure,SQInteger nargs,SQInteger stackb
throw;
}
assert(cstksize == _callsstacksize);
_callsstacksize = cstksize;
_nnativecalls--;
suspend = false;

View File

@@ -14,6 +14,7 @@
#include "../script/api/script_event_types.hpp"
#include "../core/string_compare_type.hpp"
#include "ai_scanner.hpp"
#include <map>
/** A list that maps AI names to their AIInfo object. */
@@ -25,7 +26,7 @@ typedef std::map<const char *, class ScriptInfo *, StringCompare> ScriptInfoList
class AI {
public:
/**
* The default months AIs start after eachother.
* The default months AIs start after each other.
*/
enum StartNext {
START_NEXT_EASY = DAYS_IN_YEAR * 2,
@@ -67,13 +68,30 @@ public:
static void Stop(CompanyID company);
/**
* Suspend an AI for the reminder of the current tick. If the AI is
* in a state when it cannot be suspended, it will continue to run
* until it can be suspended.
* @param company The company for which the AI should be suspended.
* Suspend the AI and then pause execution of the script. The script
* will not be resumed from its suspended state until the script has
* been unpaused.
* @param company The company for which the AI should be paused.
* @pre Company::IsValidAiID(company)
*/
static void Suspend(CompanyID company);
static void Pause(CompanyID company);
/**
* Resume execution of the AI. This function will not actually execute
* the script, but set a flag so that the script is executed my the usual
* mechanism that executes the script.
* @param company The company for which the AI should be unpaused.
* @pre Company::IsValidAiID(company)
*/
static void Unpause(CompanyID company);
/**
* Checks if the AI is paused.
* @param company The company for which to check if the AI is paused.
* @pre Company::IsValidAiID(company)
* @return true if the AI is paused, otherwise false.
*/
static bool IsPaused(CompanyID company);
/**
* Kill any and all AIs we manage.
@@ -140,6 +158,12 @@ public:
* found it is removed from the config.
*/
static void Rescan();
/** Gets the ScriptScanner instance that is used to find AIs */
static AIScannerInfo *GetScannerInfo();
/** Gets the ScriptScanner instance that is used to find AI Libraries */
static AIScannerLibrary *GetScannerLibrary();
#if defined(ENABLE_NETWORK)
/** Wrapper function for AIScanner::HasAI */
static bool HasAI(const struct ContentInfo *ci, bool md5sum);

View File

@@ -28,7 +28,8 @@ ScriptConfigItem _start_date_config = {
AI::START_NEXT_DEVIATION,
30,
SCRIPTCONFIG_NONE,
NULL
NULL,
false
};
/* static */ AIConfig *AIConfig::GetConfig(CompanyID company, ScriptSettingSource source)
@@ -79,13 +80,13 @@ int AIConfig::GetSetting(const char *name) const
{
if (this->info == NULL) {
SettingValueList::const_iterator it = this->settings.find(name);
if (it == this->settings.end() || GetGameSettings().difficulty.diff_level != 3) {
if (it == this->settings.end()) {
assert(strcmp("start_date", name) == 0);
switch (GetGameSettings().difficulty.diff_level) {
case 0: return AI::START_NEXT_EASY;
case 1: return AI::START_NEXT_MEDIUM;
case 2: return AI::START_NEXT_HARD;
case 3: return AI::START_NEXT_MEDIUM;
switch (GetGameSettings().script.settings_profile) {
case SP_EASY: return AI::START_NEXT_EASY;
case SP_MEDIUM: return AI::START_NEXT_MEDIUM;
case SP_HARD: return AI::START_NEXT_HARD;
case SP_CUSTOM: return AI::START_NEXT_MEDIUM;
default: NOT_REACHED();
}
}

View File

@@ -39,7 +39,7 @@
/* Clients shouldn't start AIs */
if (_networking && !_network_server) return;
AIConfig *config = AIConfig::GetConfig(company);
AIConfig *config = AIConfig::GetConfig(company, AIConfig::SSS_FORCE_GAME);
AIInfo *info = config->GetInfo();
if (info == NULL || (rerandomise_ai && config->IsRandom())) {
info = AI::scanner_info->SelectRandomAI();
@@ -112,16 +112,37 @@
DeleteWindowById(WC_AI_SETTINGS, company);
}
/* static */ void AI::Suspend(CompanyID company)
/* static */ void AI::Pause(CompanyID company)
{
if (_networking && !_network_server) return;
/* The reason why dedicated servers are forbidden to execute this
* command is not because it is unsafe, but because there is no way
* for the server owner to unpause the script again. */
if (_network_dedicated) return;
Backup<CompanyByte> cur_company(_current_company, company, FILE_LINE);
Company::Get(company)->ai_instance->Suspend();
Company::Get(company)->ai_instance->Pause();
cur_company.Restore();
}
/* static */ void AI::Unpause(CompanyID company)
{
Backup<CompanyByte> cur_company(_current_company, company, FILE_LINE);
Company::Get(company)->ai_instance->Unpause();
cur_company.Restore();
}
/* static */ bool AI::IsPaused(CompanyID company)
{
Backup<CompanyByte> cur_company(_current_company, company, FILE_LINE);
bool paused = Company::Get(company)->ai_instance->IsPaused();
cur_company.Restore();
return paused;
}
/* static */ void AI::KillAll()
{
/* It might happen there are no companies .. than we have nothing to loop */
@@ -176,7 +197,7 @@
/* static */ void AI::ResetConfig()
{
/* Check for both newgame as current game if we can reload the AIInfo insde
/* Check for both newgame as current game if we can reload the AIInfo inside
* the AIConfig. If not, remove the AI from the list (which will assign
* a random new AI on reload). */
for (CompanyID c = COMPANY_FIRST; c < MAX_COMPANIES; c++) {
@@ -283,7 +304,7 @@
{
/* Find the first company which doesn't exist yet */
for (CompanyID c = COMPANY_FIRST; c < MAX_COMPANIES; c++) {
if (!Company::IsValidID(c)) return AIConfig::GetConfig(c)->GetSetting("start_date");
if (!Company::IsValidID(c)) return AIConfig::GetConfig(c, AIConfig::SSS_FORCE_GAME)->GetSetting("start_date");
}
/* Currently no AI can be started, check again in a year. */
@@ -352,3 +373,14 @@
}
#endif /* defined(ENABLE_NETWORK) */
/* static */ AIScannerInfo *AI::GetScannerInfo()
{
return AI::scanner_info;
}
/* static */ AIScannerLibrary *AI::GetScannerLibrary()
{
return AI::scanner_library;
}

View File

@@ -12,8 +12,9 @@
#include "../stdafx.h"
#include "../table/sprites.h"
#include "../error.h"
#include "../gui.h"
#include "../settings_gui.h"
#include "../querystring_gui.h"
#include "../stringfilter_type.h"
#include "../company_base.h"
#include "../company_gui.h"
#include "../strings_func.h"
@@ -24,6 +25,9 @@
#include "../settings_func.h"
#include "../network/network_content.h"
#include "../textfile_gui.h"
#include "../widgets/dropdown_type.h"
#include "../widgets/dropdown_func.h"
#include "../hotkeys.h"
#include "ai.hpp"
#include "../script/api/script_log.hpp"
@@ -118,13 +122,13 @@ struct AIListWindow : public Window {
int y = this->GetWidget<NWidgetBase>(WID_AIL_LIST)->pos_y;
/* First AI in the list is hardcoded to random */
if (this->vscroll->IsVisible(0)) {
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_LEFT, y + WD_MATRIX_TOP, this->slot == OWNER_DEITY ? STR_AI_CONFIG_NONE : STR_AI_CONFIG_RANDOM_AI, this->selected == -1 ? TC_WHITE : TC_BLACK);
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_LEFT, y + WD_MATRIX_TOP, this->slot == OWNER_DEITY ? STR_AI_CONFIG_NONE : STR_AI_CONFIG_RANDOM_AI, this->selected == -1 ? TC_WHITE : TC_ORANGE);
y += this->line_height;
}
ScriptInfoList::const_iterator it = this->info_list->begin();
for (int i = 1; it != this->info_list->end(); i++, it++) {
if (this->vscroll->IsVisible(i)) {
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_RIGHT, y + WD_MATRIX_TOP, (*it).second->GetName(), (this->selected == i - 1) ? TC_WHITE : TC_BLACK);
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_RIGHT, y + WD_MATRIX_TOP, (*it).second->GetName(), (this->selected == i - 1) ? TC_WHITE : TC_ORANGE);
y += this->line_height;
}
}
@@ -151,7 +155,7 @@ struct AIListWindow : public Window {
y += FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL;
}
SetDParamStr(0, selected_info->GetDescription());
DrawStringMultiLine(r.left + WD_FRAMETEXT_LEFT, r.right - WD_FRAMETEXT_RIGHT, y, r.bottom - WD_FRAMERECT_BOTTOM, STR_JUST_RAW_STRING, TC_BLACK);
DrawStringMultiLine(r.left + WD_FRAMETEXT_LEFT, r.right - WD_FRAMETEXT_RIGHT, y, r.bottom - WD_FRAMERECT_BOTTOM, STR_JUST_RAW_STRING, TC_WHITE);
}
break;
}
@@ -256,7 +260,7 @@ static const NWidgetPart _nested_ai_list_widgets[] = {
static const WindowDesc _ai_list_desc(
WDP_CENTER, 200, 234,
WC_AI_LIST, WC_NONE,
WDF_UNCLICK_BUTTONS,
0,
_nested_ai_list_widgets, lengthof(_nested_ai_list_widgets)
);
@@ -278,6 +282,8 @@ struct AISettingsWindow : public Window {
ScriptConfig *ai_config; ///< The configuration we're modifying.
int clicked_button; ///< The button we clicked.
bool clicked_increase; ///< Whether we clicked the increase or decrease button.
bool clicked_dropdown; ///< Whether the dropdown is open.
bool closing_dropdown; ///< True, if the dropdown list is currently closing.
int timeout; ///< Timeout for unclicking the button.
int clicked_row; ///< The clicked row of settings.
int line_height; ///< Height of a row in the matrix widget.
@@ -293,6 +299,8 @@ struct AISettingsWindow : public Window {
AISettingsWindow(const WindowDesc *desc, CompanyID slot) : Window(),
slot(slot),
clicked_button(-1),
clicked_dropdown(false),
closing_dropdown(false),
timeout(0)
{
this->ai_config = GetConfig(slot);
@@ -355,12 +363,13 @@ struct AISettingsWindow : public Window {
for (; !this->vscroll->IsVisible(i); i++) it++;
bool rtl = _current_text_dir == TD_RTL;
uint buttons_left = rtl ? r.right - 23 : r.left + 4;
uint text_left = r.left + (rtl ? WD_FRAMERECT_LEFT : 28);
uint text_right = r.right - (rtl ? 28 : WD_FRAMERECT_RIGHT);
uint buttons_left = rtl ? r.right - SETTING_BUTTON_WIDTH - 3 : r.left + 4;
uint text_left = r.left + (rtl ? WD_FRAMERECT_LEFT : SETTING_BUTTON_WIDTH + 8);
uint text_right = r.right - (rtl ? SETTING_BUTTON_WIDTH + 8 : WD_FRAMERECT_RIGHT);
int y = r.top;
int button_y_offset = (this->line_height - SETTING_BUTTON_HEIGHT) / 2;
for (; this->vscroll->IsVisible(i) && it != visible_settings.end(); i++, it++) {
const ScriptConfigItem &config_item = **it;
int current_value = config->GetSetting((config_item).name);
@@ -385,10 +394,14 @@ struct AISettingsWindow : public Window {
}
if ((config_item.flags & SCRIPTCONFIG_BOOLEAN) != 0) {
DrawBoolButton(buttons_left, y + 2, current_value != 0, editable);
DrawBoolButton(buttons_left, y + button_y_offset, current_value != 0, editable);
SetDParam(idx++, current_value == 0 ? STR_CONFIG_SETTING_OFF : STR_CONFIG_SETTING_ON);
} else {
DrawArrowButtons(buttons_left, y + 2, COLOUR_YELLOW, (this->clicked_button == i) ? 1 + (this->clicked_increase != rtl) : 0, editable && current_value > config_item.min_value, editable && current_value < config_item.max_value);
if (config_item.complete_labels) {
DrawDropDownButton(buttons_left, y + button_y_offset, COLOUR_YELLOW, this->clicked_row == i && clicked_dropdown, editable);
} else {
DrawArrowButtons(buttons_left, y + button_y_offset, COLOUR_YELLOW, (this->clicked_button == i) ? 1 + (this->clicked_increase != rtl) : 0, editable && current_value > config_item.min_value, editable && current_value < config_item.max_value);
}
if (config_item.labels != NULL && config_item.labels->Contains(current_value)) {
SetDParam(idx++, STR_JUST_RAW_STRING);
SetDParamStr(idx++, config_item.labels->Find(current_value)->second);
@@ -403,19 +416,13 @@ struct AISettingsWindow : public Window {
}
}
/**
* Check whether we modified the difficulty level or not.
*/
void CheckDifficultyLevel()
virtual void OnPaint()
{
if (_game_mode == GM_MENU) {
if (_settings_newgame.difficulty.diff_level != 3) {
_settings_newgame.difficulty.diff_level = 3;
ShowErrorMessage(STR_WARNING_DIFFICULTY_TO_CUSTOM, INVALID_STRING_ID, WL_WARNING);
}
} else if (_settings_game.difficulty.diff_level != 3) {
IConsoleSetSetting("difficulty.diff_level", 3);
if (this->closing_dropdown) {
this->closing_dropdown = false;
this->clicked_dropdown = false;
}
this->DrawWidgets();
}
virtual void OnClick(Point pt, int widget, int click_count)
@@ -431,18 +438,55 @@ struct AISettingsWindow : public Window {
const ScriptConfigItem config_item = **it;
if (_game_mode == GM_NORMAL && ((this->slot == OWNER_DEITY) || Company::IsValidID(this->slot)) && (config_item.flags & SCRIPTCONFIG_INGAME) == 0) return;
if (this->clicked_row != num) {
DeleteChildWindows(WC_QUERY_STRING);
HideDropDownMenu(this);
this->clicked_row = num;
this->clicked_dropdown = false;
}
bool bool_item = (config_item.flags & SCRIPTCONFIG_BOOLEAN) != 0;
int x = pt.x - wid->pos_x;
if (_current_text_dir == TD_RTL) x = wid->current_x - x;
if (_current_text_dir == TD_RTL) x = wid->current_x - 1 - x;
x -= 4;
/* One of the arrows is clicked (or green/red rect in case of bool value) */
if (IsInsideMM(x, 0, 21)) {
int new_val = this->ai_config->GetSetting(config_item.name);
int old_val = new_val;
int old_val = this->ai_config->GetSetting(config_item.name);
if (!bool_item && IsInsideMM(x, 0, SETTING_BUTTON_WIDTH) && config_item.complete_labels) {
if (this->clicked_dropdown) {
/* unclick the dropdown */
HideDropDownMenu(this);
this->clicked_dropdown = false;
this->closing_dropdown = false;
} else {
const NWidgetBase *wid = this->GetWidget<NWidgetBase>(WID_AIS_BACKGROUND);
int rel_y = (pt.y - (int)wid->pos_y) % this->line_height;
Rect wi_rect;
wi_rect.left = pt.x - (_current_text_dir == TD_RTL ? SETTING_BUTTON_WIDTH - 1 - x : x);
wi_rect.right = wi_rect.left + SETTING_BUTTON_WIDTH - 1;
wi_rect.top = pt.y - rel_y + (this->line_height - SETTING_BUTTON_HEIGHT) / 2;
wi_rect.bottom = wi_rect.top + SETTING_BUTTON_HEIGHT - 1;
/* For dropdowns we also have to check the y position thoroughly, the mouse may not above the just opening dropdown */
if (pt.y >= wi_rect.top && pt.y <= wi_rect.bottom) {
this->clicked_dropdown = true;
this->closing_dropdown = false;
DropDownList *list = new DropDownList();
for (int i = config_item.min_value; i <= config_item.max_value; i++) {
list->push_back(new DropDownListCharStringItem(config_item.labels->Find(i)->second, i, false));
}
ShowDropDownListAt(this, list, old_val, -1, wi_rect, COLOUR_ORANGE, true);
}
}
} else if (IsInsideMM(x, 0, SETTING_BUTTON_WIDTH)) {
int new_val = old_val;
if (bool_item) {
new_val = !new_val;
} else if (x >= 10) {
} else if (x >= SETTING_BUTTON_WIDTH / 2) {
/* Increase button clicked */
new_val += config_item.step_size;
if (new_val > config_item.max_value) new_val = config_item.max_value;
@@ -458,13 +502,10 @@ struct AISettingsWindow : public Window {
this->ai_config->SetSetting(config_item.name, new_val);
this->clicked_button = num;
this->timeout = 5;
this->CheckDifficultyLevel();
}
} else if (!bool_item) {
} else if (!bool_item && !config_item.complete_labels) {
/* Display a query box so users can enter a custom value. */
this->clicked_row = num;
SetDParam(0, this->ai_config->GetSetting(config_item.name));
SetDParam(0, old_val);
ShowQueryString(STR_JUST_INT, STR_CONFIG_SETTING_QUERY_CAPTION, 10, this, CS_NUMERAL, QSF_NONE);
}
this->SetDirty();
@@ -492,7 +533,27 @@ struct AISettingsWindow : public Window {
if (_game_mode == GM_NORMAL && ((this->slot == OWNER_DEITY) || Company::IsValidID(this->slot)) && (it->flags & SCRIPTCONFIG_INGAME) == 0) return;
int32 value = atoi(str);
this->ai_config->SetSetting((*it).name, value);
this->CheckDifficultyLevel();
this->SetDirty();
}
virtual void OnDropdownSelect(int widget, int index)
{
assert(this->clicked_dropdown);
ScriptConfigItemList::const_iterator it = this->ai_config->GetConfigList()->begin();
for (int i = 0; i < this->clicked_row; i++) it++;
if (_game_mode == GM_NORMAL && ((this->slot == OWNER_DEITY) || Company::IsValidID(this->slot)) && (it->flags & SCRIPTCONFIG_INGAME) == 0) return;
this->ai_config->SetSetting((*it).name, index);
this->SetDirty();
}
virtual void OnDropdownClose(Point pt, int widget, int index, bool instant_close)
{
/* We cannot raise the dropdown button just yet. OnClick needs some hint, whether
* the same dropdown button was clicked again, and then not open the dropdown again.
* So, we only remember that it was closed, and process it on the next OnPaint, which is
* after OnClick. */
assert(this->clicked_dropdown);
this->closing_dropdown = true;
this->SetDirty();
}
@@ -545,7 +606,7 @@ static const NWidgetPart _nested_ai_settings_widgets[] = {
static const WindowDesc _ai_settings_desc(
WDP_CENTER, 500, 208,
WC_AI_SETTINGS, WC_NONE,
WDF_UNCLICK_BUTTONS,
0,
_nested_ai_settings_widgets, lengthof(_nested_ai_settings_widgets)
);
@@ -567,8 +628,6 @@ struct ScriptTextfileWindow : public TextfileWindow {
ScriptTextfileWindow(TextfileType file_type, CompanyID slot) : TextfileWindow(file_type), slot(slot)
{
this->GetWidget<NWidgetCore>(WID_TF_CAPTION)->SetDataTip(STR_TEXTFILE_README_CAPTION + file_type, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS);
const char *textfile = GetConfig(slot)->GetTextfile(file_type, slot);
this->LoadTextfile(textfile, (slot == OWNER_DEITY) ? GAME_DIR : AI_DIR);
}
@@ -641,7 +700,7 @@ static const NWidgetPart _nested_ai_config_widgets[] = {
static const WindowDesc _ai_config_desc(
WDP_CENTER, 0, 0,
WC_GAME_OPTIONS, WC_NONE,
WDF_UNCLICK_BUTTONS,
0,
_nested_ai_config_widgets, lengthof(_nested_ai_config_widgets)
);
@@ -879,10 +938,31 @@ void ShowAIConfigWindow()
new AIConfigWindow();
}
/**
* Set the widget colour of a button based on the
* state of the script. (dead or alive)
* @param button the button to update.
* @param dead true if the script is dead, otherwise false.
* @param paused true if the script is paused, otherwise false.
* @return true if the colour was changed and the window need to be marked as dirty.
*/
static bool SetScriptButtonColour(NWidgetCore &button, bool dead, bool paused)
{
/* Dead scripts are indicated with red background and
* paused scripts are indicated with yellow background. */
Colours colour = dead ? COLOUR_RED :
(paused ? COLOUR_YELLOW : COLOUR_GREY);
if (button.colour != colour) {
button.colour = colour;
return true;
}
return false;
}
/**
* Window with everything an AI prints via ScriptLog.
*/
struct AIDebugWindow : public QueryStringBaseWindow {
struct AIDebugWindow : public Window {
static const int top_offset; ///< Offset of the text at the top of the WID_AID_LOG_PANEL.
static const int bottom_offset; ///< Offset of the text at the bottom of the WID_AID_LOG_PANEL.
@@ -895,6 +975,8 @@ struct AIDebugWindow : public QueryStringBaseWindow {
bool show_break_box; ///< Whether the break/debug box is visible.
static bool break_check_enabled; ///< Stop an AI when it prints a matching string
static char break_string[MAX_BREAK_STR_STRING_LENGTH]; ///< The string to match to the AI output
QueryString break_editbox; ///< Break editbox
static StringFilter break_string_filter; ///< Log filter for break.
static bool case_sensitive_break_check; ///< Is the matching done case-sensitive
int highlight_row; ///< The output row that matches the given string, or -1
Scrollbar *vscroll; ///< Cache of the vertical scrollbar.
@@ -905,12 +987,62 @@ struct AIDebugWindow : public QueryStringBaseWindow {
return (ScriptLog::LogData *)Company::Get(ai_debug_company)->ai_instance->GetLogPointer();
}
/**
* Check whether the currently selected AI/GS is dead.
* @return true if dead.
*/
bool IsDead() const
{
if (ai_debug_company == OWNER_DEITY) {
GameInstance *game = Game::GetInstance();
return game == NULL || game->IsDead();
}
return !Company::IsValidAiID(ai_debug_company) || Company::Get(ai_debug_company)->ai_instance->IsDead();
}
/**
* Check whether a company is a valid AI company or GS.
* @param company Company to check for validity.
* @return true if company is valid for debugging.
*/
bool IsValidDebugCompany(CompanyID company) const
{
switch (company) {
case INVALID_COMPANY: return false;
case OWNER_DEITY: return Game::GetInstance() != NULL;
default: return Company::IsValidAiID(company);
}
}
/**
* Ensure that \c ai_debug_company refers to a valid AI company or GS, or is set to #INVALID_COMPANY.
* If no valid company is selected, it selects the first valid AI or GS if any.
*/
void SelectValidDebugCompany()
{
/* Check if the currently selected company is still active. */
if (this->IsValidDebugCompany(ai_debug_company)) return;
ai_debug_company = INVALID_COMPANY;
const Company *c;
FOR_ALL_COMPANIES(c) {
if (c->is_ai) {
ChangeToAI(c->index);
return;
}
}
/* If no AI is available, see if there is a game script. */
if (Game::GetInstance() != NULL) ChangeToAI(OWNER_DEITY);
}
/**
* Constructor for the window.
* @param desc The description of the window.
* @param number The window number (actually unused).
*/
AIDebugWindow(const WindowDesc *desc, WindowNumber number) : QueryStringBaseWindow(MAX_BREAK_STR_STRING_LENGTH)
AIDebugWindow(const WindowDesc *desc, WindowNumber number) : break_editbox(MAX_BREAK_STR_STRING_LENGTH)
{
this->CreateNestedTree(desc);
this->vscroll = this->GetScrollbar(WID_AID_SCROLLBAR);
@@ -919,33 +1051,18 @@ struct AIDebugWindow : public QueryStringBaseWindow {
this->FinishInitNested(desc, number);
if (!this->show_break_box) break_check_enabled = false;
/* Disable the companies who are not active or not an AI */
for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) {
this->SetWidgetDisabledState(i + WID_AID_COMPANY_BUTTON_START, !Company::IsValidAiID(i));
}
this->EnableWidget(WID_AID_SCRIPT_GAME);
this->DisableWidget(WID_AID_RELOAD_TOGGLE);
this->DisableWidget(WID_AID_SETTINGS);
this->DisableWidget(WID_AID_CONTINUE_BTN);
this->last_vscroll_pos = 0;
this->autoscroll = true;
this->highlight_row = -1;
InitializeTextBuffer(&this->text, this->edit_str_buf, this->edit_str_size, MAX_BREAK_STR_STRING_LENGTH);
this->querystrings[WID_AID_BREAK_STR_EDIT_BOX] = &this->break_editbox;
/* Restore the break string value from static variable */
strecpy(this->edit_str_buf, this->break_string, this->edit_str_buf + MAX_BREAK_STR_STRING_LENGTH);
UpdateTextBufferSize(&this->text);
/* Restore button state from static class variables */
if (ai_debug_company == OWNER_DEITY) {
this->LowerWidget(WID_AID_SCRIPT_GAME);
} else if (ai_debug_company != INVALID_COMPANY) {
this->LowerWidget(ai_debug_company + WID_AID_COMPANY_BUTTON_START);
}
this->SetWidgetLoweredState(WID_AID_BREAK_STR_ON_OFF_BTN, this->break_check_enabled);
this->SetWidgetLoweredState(WID_AID_MATCH_CASE_BTN, this->case_sensitive_break_check);
this->break_editbox.text.Assign(this->break_string);
this->SelectValidDebugCompany();
this->InvalidateData(-1);
}
virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
@@ -958,62 +1075,31 @@ struct AIDebugWindow : public QueryStringBaseWindow {
virtual void OnPaint()
{
/* Check if the currently selected company is still active. */
if (ai_debug_company == INVALID_COMPANY || (ai_debug_company != OWNER_DEITY && !Company::IsValidAiID(ai_debug_company))) {
if (ai_debug_company != INVALID_COMPANY) {
/* Raise the widget for the previous selection. */
this->RaiseWidget(ai_debug_company + WID_AID_COMPANY_BUTTON_START);
ai_debug_company = INVALID_COMPANY;
}
const Company *c;
FOR_ALL_COMPANIES(c) {
if (c->is_ai) {
/* Lower the widget corresponding to this company. */
this->LowerWidget(c->index + WID_AID_COMPANY_BUTTON_START);
ai_debug_company = c->index;
break;
}
}
}
/* Update "Reload AI" and "AI settings" buttons */
this->SetWidgetDisabledState(WID_AID_SETTINGS, ai_debug_company == INVALID_COMPANY);
this->SetWidgetDisabledState(WID_AID_RELOAD_TOGGLE, ai_debug_company == INVALID_COMPANY || ai_debug_company == OWNER_DEITY);
this->SetWidgetDisabledState(WID_AID_SCRIPT_GAME, Game::GetGameInstance() == NULL);
this->SelectValidDebugCompany();
/* Draw standard stuff */
this->DrawWidgets();
if (this->IsShaded()) return; // Don't draw anything when the window is shaded.
if (this->show_break_box) this->DrawEditBox(WID_AID_BREAK_STR_EDIT_BOX);
bool dirty = false;
/* Paint the company icons */
for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) {
NWidgetCore *button = this->GetWidget<NWidgetCore>(i + WID_AID_COMPANY_BUTTON_START);
bool dirty = false;
bool valid = Company::IsValidAiID(i);
bool disabled = !valid;
if (button->IsDisabled() != disabled) {
/* Invalid/non-AI companies have button disabled */
button->SetDisabled(disabled);
dirty = true;
}
/* Check whether the validity of the company changed */
dirty |= (button->IsDisabled() == valid);
/* Mark dead/paused AIs by setting the background colour. */
bool dead = valid && Company::Get(i)->ai_instance->IsDead();
Colours colour = dead ? COLOUR_RED : COLOUR_GREY;
if (button->colour != colour) {
/* Mark dead AIs by red background */
button->colour = colour;
dirty = true;
}
bool paused = valid && Company::Get(i)->ai_instance->IsPaused();
/* Re-paint if the button was updated.
* (note that it is intentional that SetScriptButtonColour is always called) */
dirty |= SetScriptButtonColour(*button, dead, paused);
/* Do we need a repaint? */
if (dirty) this->SetDirty();
/* Draw company icon only for valid AI companies */
if (!valid) continue;
@@ -1021,6 +1107,17 @@ struct AIDebugWindow : public QueryStringBaseWindow {
DrawCompanyIcon(i, button->pos_x + button->current_x / 2 - 7 + offset, this->GetWidget<NWidgetBase>(WID_AID_COMPANY_BUTTON_START + i)->pos_y + 2 + offset);
}
/* Set button colour for Game Script. */
GameInstance *game = Game::GetInstance();
bool valid = game != NULL;
bool dead = valid && game->IsDead();
bool paused = valid && game->IsPaused();
NWidgetCore *button = this->GetWidget<NWidgetCore>(WID_AID_SCRIPT_GAME);
dirty |= (button->IsDisabled() == valid) || SetScriptButtonColour(*button, dead, paused);
if (dirty) this->InvalidateData(-1);
/* If there are no active companies, don't display anything else. */
if (ai_debug_company == INVALID_COMPANY) return;
@@ -1121,37 +1218,29 @@ struct AIDebugWindow : public QueryStringBaseWindow {
*/
void ChangeToAI(CompanyID show_ai)
{
if (ai_debug_company == OWNER_DEITY) {
this->RaiseWidget(WID_AID_SCRIPT_GAME);
} else {
this->RaiseWidget(ai_debug_company + WID_AID_COMPANY_BUTTON_START);
}
if (!this->IsValidDebugCompany(show_ai)) return;
ai_debug_company = show_ai;
ScriptLog::LogData *log = this->GetLogPointer();
this->vscroll->SetCount((log == NULL) ? 0 : log->used);
this->highlight_row = -1; // The highlight of one AI make little sense for another AI.
if (ai_debug_company == OWNER_DEITY) {
this->LowerWidget(WID_AID_SCRIPT_GAME);
} else {
this->LowerWidget(ai_debug_company + WID_AID_COMPANY_BUTTON_START);
}
/* Close AI settings window to prevent confusion */
DeleteWindowByClass(WC_AI_SETTINGS);
this->InvalidateData(-1);
this->autoscroll = true;
this->last_vscroll_pos = this->vscroll->GetPosition();
this->SetDirty();
/* Close AI settings window to prevent confusion */
DeleteWindowByClass(WC_AI_SETTINGS);
}
virtual void OnClick(Point pt, int widget, int click_count)
{
/* Also called for hotkeys, so check for disabledness */
if (this->IsWidgetDisabled(widget)) return;
/* Check which button is clicked */
if (IsInsideMM(widget, WID_AID_COMPANY_BUTTON_START, WID_AID_COMPANY_BUTTON_END + 1)) {
/* Is it no on disable? */
if (!this->IsWidgetDisabled(widget)) {
ChangeToAI((CompanyID)(widget - WID_AID_COMPANY_BUTTON_START));
}
ChangeToAI((CompanyID)(widget - WID_AID_COMPANY_BUTTON_START));
}
switch (widget) {
@@ -1172,96 +1261,143 @@ struct AIDebugWindow : public QueryStringBaseWindow {
case WID_AID_BREAK_STR_ON_OFF_BTN:
this->break_check_enabled = !this->break_check_enabled;
this->SetWidgetLoweredState(WID_AID_BREAK_STR_ON_OFF_BTN, this->break_check_enabled);
this->SetWidgetDirty(WID_AID_BREAK_STR_ON_OFF_BTN);
this->InvalidateData(-1);
break;
case WID_AID_MATCH_CASE_BTN:
this->case_sensitive_break_check = !this->case_sensitive_break_check;
this->SetWidgetLoweredState(WID_AID_MATCH_CASE_BTN, this->case_sensitive_break_check);
this->InvalidateData(-1);
break;
case WID_AID_CONTINUE_BTN:
/* Unpause */
DoCommandP(0, PM_PAUSED_NORMAL, 0, CMD_PAUSE);
this->DisableWidget(WID_AID_CONTINUE_BTN);
this->RaiseWidget(WID_AID_CONTINUE_BTN); // Disabled widgets don't raise themself
/* Unpause current AI / game script and mark the corresponding script button dirty. */
if (!this->IsDead()) {
if (ai_debug_company == OWNER_DEITY) {
Game::Unpause();
} else {
AI::Unpause(ai_debug_company);
}
}
/* If the last AI/Game Script is unpaused, unpause the game too. */
if ((_pause_mode & PM_PAUSED_NORMAL) == PM_PAUSED_NORMAL) {
bool all_unpaused = !Game::IsPaused();
if (all_unpaused) {
Company *c;
FOR_ALL_COMPANIES(c) {
if (c->is_ai && AI::IsPaused(c->index)) {
all_unpaused = false;
break;
}
}
if (all_unpaused) {
/* All scripts have been unpaused => unpause the game. */
DoCommandP(0, PM_PAUSED_NORMAL, 0, CMD_PAUSE);
}
}
}
this->highlight_row = -1;
this->InvalidateData(-1);
break;
}
}
virtual void OnTimeout()
{
this->RaiseWidget(WID_AID_RELOAD_TOGGLE);
this->RaiseWidget(WID_AID_SETTINGS);
this->SetDirty();
}
virtual void OnMouseLoop()
{
this->HandleEditBox(WID_AID_BREAK_STR_EDIT_BOX);
}
virtual EventState OnKeyPress(uint16 key, uint16 keycode)
{
EventState state = ES_NOT_HANDLED;
if (this->HandleEditBoxKey(WID_AID_BREAK_STR_EDIT_BOX, key, keycode, state) != HEBR_NOT_FOCUSED) {
/* Save the current string to static member so it can be restored next time the window is opened */
strecpy(this->break_string, this->edit_str_buf, lastof(this->break_string));
int num = CheckHotkeyMatch(aidebug_hotkeys, keycode, this);
if (num != -1) {
if (this->show_break_box && num == WID_AID_BREAK_STR_EDIT_BOX) {
this->SetFocusedWidget(WID_AID_BREAK_STR_EDIT_BOX);
SetFocusedWindow(this);
state = ES_HANDLED;
} else if (this->show_break_box || num < WID_AID_BREAK_STRING_WIDGETS) {
this->OnClick(Point(), num, 1);
state = ES_HANDLED;
}
}
return state;
}
virtual void OnEditboxChanged(int wid)
{
if (wid == WID_AID_BREAK_STR_EDIT_BOX) {
/* Save the current string to static member so it can be restored next time the window is opened. */
strecpy(this->break_string, this->break_editbox.text.buf, lastof(this->break_string));
break_string_filter.SetFilterTerm(this->break_string);
}
}
/**
* Some data on this window has become invalid.
* @param data Information about the changed data.
* This is the company ID of the AI/GS which wrote a new log message, or -1 in other cases.
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
*/
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
{
if (data == -1 || ai_debug_company == data) this->SetDirty();
if (gui_scope && data == -2) {
/* The continue button should be disabled when the game is unpaused and
* it was previously paused by the break string ( = a line in the log
* was highlighted )*/
if ((_pause_mode & PM_PAUSED_NORMAL) == PM_UNPAUSED && this->highlight_row != -1) {
this->DisableWidget(WID_AID_CONTINUE_BTN);
this->SetWidgetDirty(WID_AID_CONTINUE_BTN);
this->SetWidgetDirty(WID_AID_LOG_PANEL);
this->highlight_row = -1;
}
}
/* If the log message is related to the active company tab, check the break string.
* This needs to be done in gameloop-scope, so the AI is suspended immediately. */
if (ai_debug_company != OWNER_DEITY && !gui_scope && data == ai_debug_company && this->break_check_enabled && !StrEmpty(this->edit_str_buf)) {
if (!gui_scope && data == ai_debug_company && this->IsValidDebugCompany(ai_debug_company) && this->break_check_enabled && !this->break_string_filter.IsEmpty()) {
/* Get the log instance of the active company */
ScriptLog::LogData *log = this->GetLogPointer();
if (log != NULL && case_sensitive_break_check?
strstr(log->lines[log->pos], this->edit_str_buf) != 0 :
strcasestr(log->lines[log->pos], this->edit_str_buf) != 0) {
if (log != NULL) {
this->break_string_filter.ResetState();
this->break_string_filter.AddLine(log->lines[log->pos]);
if (this->break_string_filter.GetState()) {
/* Pause execution of script. */
if (!this->IsDead()) {
if (ai_debug_company == OWNER_DEITY) {
Game::Pause();
} else {
AI::Pause(ai_debug_company);
}
}
AI::Suspend(ai_debug_company);
if ((_pause_mode & PM_PAUSED_NORMAL) == PM_UNPAUSED) {
DoCommandP(0, PM_PAUSED_NORMAL, 1, CMD_PAUSE);
/* Pause the game. */
if ((_pause_mode & PM_PAUSED_NORMAL) == PM_UNPAUSED) {
DoCommandP(0, PM_PAUSED_NORMAL, 1, CMD_PAUSE);
}
/* Highlight row that matched */
this->highlight_row = log->pos;
}
/* Make it possible to click on the continue button */
this->EnableWidget(WID_AID_CONTINUE_BTN);
this->SetWidgetDirty(WID_AID_CONTINUE_BTN);
/* Highlight row that matched */
this->highlight_row = log->pos;
}
}
if (!gui_scope) return;
this->SelectValidDebugCompany();
ScriptLog::LogData *log = ai_debug_company != INVALID_COMPANY ? this->GetLogPointer() : NULL;
this->vscroll->SetCount((log == NULL) ? 0 : log->used);
/* Update company buttons */
for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) {
this->SetWidgetDisabledState(i + WID_AID_COMPANY_BUTTON_START, !Company::IsValidAiID(i));
this->SetWidgetLoweredState(i + WID_AID_COMPANY_BUTTON_START, ai_debug_company == i);
}
this->SetWidgetDisabledState(WID_AID_SCRIPT_GAME, Game::GetGameInstance() == NULL);
this->SetWidgetLoweredState(WID_AID_SCRIPT_GAME, ai_debug_company == OWNER_DEITY);
this->SetWidgetLoweredState(WID_AID_BREAK_STR_ON_OFF_BTN, this->break_check_enabled);
this->SetWidgetLoweredState(WID_AID_MATCH_CASE_BTN, this->case_sensitive_break_check);
this->SetWidgetDisabledState(WID_AID_SETTINGS, ai_debug_company == INVALID_COMPANY);
this->SetWidgetDisabledState(WID_AID_RELOAD_TOGGLE, ai_debug_company == INVALID_COMPANY || ai_debug_company == OWNER_DEITY);
this->SetWidgetDisabledState(WID_AID_CONTINUE_BTN, ai_debug_company == INVALID_COMPANY ||
(ai_debug_company == OWNER_DEITY ? !Game::IsPaused() : !AI::IsPaused(ai_debug_company)));
}
virtual void OnResize()
{
this->vscroll->SetCapacityFromWidget(this, WID_AID_LOG_PANEL);
}
static Hotkey<AIDebugWindow> aidebug_hotkeys[];
};
const int AIDebugWindow::top_offset = WD_FRAMERECT_TOP + 2;
@@ -1270,6 +1406,7 @@ CompanyID AIDebugWindow::ai_debug_company = INVALID_COMPANY;
char AIDebugWindow::break_string[MAX_BREAK_STR_STRING_LENGTH] = "";
bool AIDebugWindow::break_check_enabled = true;
bool AIDebugWindow::case_sensitive_break_check = false;
StringFilter AIDebugWindow::break_string_filter(&AIDebugWindow::case_sensitive_break_check);
/** Make a number of rows with buttons for each company for the AI debug window. */
NWidgetBase *MakeCompanyButtonRowsAIDebug(int *biggest_index)
@@ -1277,6 +1414,33 @@ NWidgetBase *MakeCompanyButtonRowsAIDebug(int *biggest_index)
return MakeCompanyButtonRows(biggest_index, WID_AID_COMPANY_BUTTON_START, WID_AID_COMPANY_BUTTON_END, 8, STR_AI_DEBUG_SELECT_AI_TOOLTIP);
}
Hotkey<AIDebugWindow> AIDebugWindow::aidebug_hotkeys[] = {
Hotkey<AIDebugWindow>('1', "company_1", WID_AID_COMPANY_BUTTON_START),
Hotkey<AIDebugWindow>('2', "company_2", WID_AID_COMPANY_BUTTON_START + 1),
Hotkey<AIDebugWindow>('3', "company_3", WID_AID_COMPANY_BUTTON_START + 2),
Hotkey<AIDebugWindow>('4', "company_4", WID_AID_COMPANY_BUTTON_START + 3),
Hotkey<AIDebugWindow>('5', "company_5", WID_AID_COMPANY_BUTTON_START + 4),
Hotkey<AIDebugWindow>('6', "company_6", WID_AID_COMPANY_BUTTON_START + 5),
Hotkey<AIDebugWindow>('7', "company_7", WID_AID_COMPANY_BUTTON_START + 6),
Hotkey<AIDebugWindow>('8', "company_8", WID_AID_COMPANY_BUTTON_START + 7),
Hotkey<AIDebugWindow>('9', "company_9", WID_AID_COMPANY_BUTTON_START + 8),
Hotkey<AIDebugWindow>((uint16)0, "company_10", WID_AID_COMPANY_BUTTON_START + 9),
Hotkey<AIDebugWindow>((uint16)0, "company_11", WID_AID_COMPANY_BUTTON_START + 10),
Hotkey<AIDebugWindow>((uint16)0, "company_12", WID_AID_COMPANY_BUTTON_START + 11),
Hotkey<AIDebugWindow>((uint16)0, "company_13", WID_AID_COMPANY_BUTTON_START + 12),
Hotkey<AIDebugWindow>((uint16)0, "company_14", WID_AID_COMPANY_BUTTON_START + 13),
Hotkey<AIDebugWindow>((uint16)0, "company_15", WID_AID_COMPANY_BUTTON_START + 14),
Hotkey<AIDebugWindow>('S', "settings", WID_AID_SETTINGS),
Hotkey<AIDebugWindow>('0', "game_script", WID_AID_SCRIPT_GAME),
Hotkey<AIDebugWindow>((uint16)0, "reload", WID_AID_RELOAD_TOGGLE),
Hotkey<AIDebugWindow>('B', "break_toggle", WID_AID_BREAK_STR_ON_OFF_BTN),
Hotkey<AIDebugWindow>('F', "break_string", WID_AID_BREAK_STR_EDIT_BOX),
Hotkey<AIDebugWindow>('C', "match_case", WID_AID_MATCH_CASE_BTN),
Hotkey<AIDebugWindow>(WKC_RETURN, "continue", WID_AID_CONTINUE_BTN),
HOTKEY_LIST_END(AIDebugWindow)
};
Hotkey<AIDebugWindow> *_aidebug_hotkeys = AIDebugWindow::aidebug_hotkeys;
/** Widgets for the AI debug window. */
static const NWidgetPart _nested_ai_debug_widgets[] = {
NWidget(NWID_HORIZONTAL),
@@ -1289,7 +1453,7 @@ static const NWidgetPart _nested_ai_debug_widgets[] = {
NWidgetFunction(MakeCompanyButtonRowsAIDebug), SetPadding(0, 2, 1, 2),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_AID_SCRIPT_GAME), SetMinimalSize(100, 20), SetResize(1, 0), SetDataTip(STR_AI_GAME_SCRIPT, STR_AI_GAME_SCRIPT_TOOLTIP),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_AID_SCRIPT_GAME), SetMinimalSize(100, 20), SetResize(1, 0), SetDataTip(STR_AI_GAME_SCRIPT, STR_AI_GAME_SCRIPT_TOOLTIP),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_AID_NAME_TEXT), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_JUST_STRING, STR_AI_DEBUG_NAME_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_AID_SETTINGS), SetMinimalSize(100, 20), SetDataTip(STR_AI_DEBUG_SETTINGS, STR_AI_DEBUG_SETTINGS_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_AID_RELOAD_TOGGLE), SetMinimalSize(100, 20), SetDataTip(STR_AI_DEBUG_RELOAD, STR_AI_DEBUG_RELOAD_TOOLTIP),
@@ -1306,10 +1470,10 @@ static const NWidgetPart _nested_ai_debug_widgets[] = {
NWidget(WWT_PANEL, COLOUR_GREY),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_LABEL, COLOUR_GREY), SetPadding(2, 2, 2, 4), SetDataTip(STR_AI_DEBUG_BREAK_ON_LABEL, 0x0),
NWidget(WWT_EDITBOX, COLOUR_WHITE, WID_AID_BREAK_STR_EDIT_BOX), SetFill(1, 1), SetResize(1, 0), SetPadding(2, 2, 2, 2), SetDataTip(STR_AI_DEBUG_BREAK_STR_OSKTITLE, STR_AI_DEBUG_BREAK_STR_TOOLTIP),
NWidget(WWT_EDITBOX, COLOUR_GREY, WID_AID_BREAK_STR_EDIT_BOX), SetFill(1, 1), SetResize(1, 0), SetPadding(2, 2, 2, 2), SetDataTip(STR_AI_DEBUG_BREAK_STR_OSKTITLE, STR_AI_DEBUG_BREAK_STR_TOOLTIP),
EndContainer(),
EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_AID_MATCH_CASE_BTN), SetMinimalSize(100, 0), SetFill(0, 1), SetDataTip(STR_AI_DEBUG_MATCH_CASE, STR_AI_DEBUG_MATCH_CASE_TOOLTIP),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_AID_MATCH_CASE_BTN), SetMinimalSize(100, 0), SetFill(0, 1), SetDataTip(STR_AI_DEBUG_MATCH_CASE, STR_AI_DEBUG_MATCH_CASE_TOOLTIP),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_AID_CONTINUE_BTN), SetMinimalSize(100, 0), SetFill(0, 1), SetDataTip(STR_AI_DEBUG_CONTINUE, STR_AI_DEBUG_CONTINUE_TOOLTIP),
EndContainer(),
EndContainer(),
@@ -1333,15 +1497,30 @@ static const WindowDesc _ai_debug_desc(
* Open the AI debug window and select the given company.
* @param show_company Display debug information about this AI company.
*/
void ShowAIDebugWindow(CompanyID show_company)
Window *ShowAIDebugWindow(CompanyID show_company)
{
if (!_networking || _network_server) {
AIDebugWindow *w = (AIDebugWindow *)BringWindowToFrontById(WC_AI_DEBUG, 0);
if (w == NULL) w = new AIDebugWindow(&_ai_debug_desc, 0);
if (show_company != INVALID_COMPANY) w->ChangeToAI(show_company);
return w;
} else {
ShowErrorMessage(STR_ERROR_AI_DEBUG_SERVER_ONLY, INVALID_STRING_ID, WL_INFO);
}
return NULL;
}
/**
* Handler for global AI debug window hotkeys.
*/
EventState AIDebugGlobalHotkeys(uint16 key, uint16 keycode)
{
int num = CheckHotkeyMatch<AIDebugWindow>(_aidebug_hotkeys, keycode, NULL, true);
if (num == -1) return ES_NOT_HANDLED;
Window *w = ShowAIDebugWindow(INVALID_COMPANY);
if (w == NULL) return ES_NOT_HANDLED;
return w->OnKeyPress(key, keycode);
}
/**

View File

@@ -14,7 +14,7 @@
#include "../company_type.h"
void ShowAIDebugWindow(CompanyID show_company = INVALID_COMPANY);
Window* ShowAIDebugWindow(CompanyID show_company = INVALID_COMPANY);
void ShowAIConfigWindow();
void ShowAIDebugWindowIfAIError();
void InitializeAIGui();

View File

@@ -23,7 +23,7 @@
*/
static bool CheckAPIVersion(const char *api_version)
{
return strcmp(api_version, "0.7") == 0 || strcmp(api_version, "1.0") == 0 || strcmp(api_version, "1.1") == 0 || strcmp(api_version, "1.2") == 0;
return strcmp(api_version, "0.7") == 0 || strcmp(api_version, "1.0") == 0 || strcmp(api_version, "1.1") == 0 || strcmp(api_version, "1.2") == 0 || strcmp(api_version, "1.3") == 0;
}
#if defined(WIN32)

View File

@@ -81,7 +81,6 @@
#include "../company_base.h"
#include "../company_func.h"
#include "../fileio_func.h"
AIInstance::AIInstance() :
ScriptInstance("AI")
@@ -128,13 +127,16 @@ void AIInstance::RegisterAPI()
SQAIEventCompanyInTrouble_Register(this->engine);
SQAIEventCompanyMerger_Register(this->engine);
SQAIEventCompanyNew_Register(this->engine);
SQAIEventCompanyTown_Register(this->engine);
SQAIEventController_Register(this->engine);
SQAIEventDisasterZeppelinerCleared_Register(this->engine);
SQAIEventDisasterZeppelinerCrashed_Register(this->engine);
SQAIEventEngineAvailable_Register(this->engine);
SQAIEventEnginePreview_Register(this->engine);
SQAIEventExclusiveTransportRights_Register(this->engine);
SQAIEventIndustryClose_Register(this->engine);
SQAIEventIndustryOpen_Register(this->engine);
SQAIEventRoadReconstruction_Register(this->engine);
SQAIEventStationFirstVehicle_Register(this->engine);
SQAIEventSubsidyAwarded_Register(this->engine);
SQAIEventSubsidyExpired_Register(this->engine);
@@ -191,29 +193,7 @@ void AIInstance::RegisterAPI()
SQAIWaypointList_Register(this->engine);
SQAIWaypointList_Vehicle_Register(this->engine);
if (!this->LoadCompatibilityScripts(this->versionAPI)) this->Died();
}
bool AIInstance::LoadCompatibilityScripts(const char *api_version)
{
char script_name[32];
seprintf(script_name, lastof(script_name), "compat_%s.nut", api_version);
char buf[MAX_PATH];
Searchpath sp;
FOR_ALL_SEARCHPATHS(sp) {
FioAppendDirectory(buf, MAX_PATH, sp, AI_DIR);
ttd_strlcat(buf, script_name, MAX_PATH);
if (!FileExists(buf)) continue;
if (this->engine->LoadScript(buf)) return true;
ScriptLog::Error("Failed to load API compatibility script");
DEBUG(script, 0, "Error compiling / running API compatibility script: %s", buf);
return false;
}
ScriptLog::Warning("API compatibility script not found");
return true;
if (!this->LoadCompatibilityScripts(this->versionAPI, AI_DIR)) this->Died();
}
void AIInstance::Died()
@@ -222,7 +202,7 @@ void AIInstance::Died()
ShowAIDebugWindow(_current_company);
const AIInfo *info = AIConfig::GetConfig(_current_company)->GetInfo();
const AIInfo *info = AIConfig::GetConfig(_current_company, AIConfig::SSS_FORCE_GAME)->GetInfo();
if (info != NULL) {
ShowErrorMessage(STR_ERROR_AI_PLEASE_REPORT_CRASH, INVALID_STRING_ID, WL_WARNING);

View File

@@ -29,17 +29,10 @@ public:
/* virtual */ ScriptInfo *FindLibrary(const char *library, int version);
private:
const char *versionAPI; ///< Current API used by this script.
/* virtual */ void RegisterAPI();
/* virtual */ void Died();
/* virtual */ CommandCallback *GetDoCommandCallback();
/* virtual */ void LoadDummyScript();
/**
* Load squirrel scripts to emulate an older API.
*/
bool LoadCompatibilityScripts(const char *api_version);
};
#endif /* AI_INSTANCE_HPP */

View File

@@ -30,7 +30,7 @@ public:
/**
* Check if we have an AI by name and version available in our list.
* @param nameParam The name of the AI.
* @param versionParam The versionof the AI, or -1 if you want the latest.
* @param versionParam The version of the AI, or -1 if you want the latest.
* @param force_exact_match Only match name+version, never latest.
* @return NULL if no match found, otherwise the AI that matched.
*/

View File

@@ -32,7 +32,7 @@ enum VehicleAirFlags {
void HandleAircraftEnterHangar(Aircraft *v);
void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height, EngineImageType image_type);
void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height, int &xoffs, int &yoffs, EngineImageType image_type);
void UpdateAirplanesOnNewStation(const Station *st);
void UpdateAircraftCache(Aircraft *v, bool update_range = false);
@@ -76,8 +76,15 @@ struct Aircraft FINAL : public SpecializedVehicle<Aircraft, VEH_AIRCRAFT> {
int GetDisplaySpeed() const { return this->cur_speed; }
int GetDisplayMaxSpeed() const { return this->vcache.cached_max_speed; }
int GetSpeedOldUnits() const { return this->vcache.cached_max_speed * 10 / 128; }
int GetCurrentMaxSpeed() const { return this->GetSpeedOldUnits(); }
Money GetRunningCost() const;
bool IsInDepot() const { return (this->vehstatus & VS_HIDDEN) != 0 && IsHangarTile(this->tile); }
bool IsInDepot() const
{
assert(this->IsPrimaryVehicle());
return (this->vehstatus & VS_HIDDEN) != 0 && IsHangarTile(this->tile);
}
bool Tick();
void OnNewDay();
uint Crash(bool flooded = false);

View File

@@ -136,6 +136,11 @@ static StationID FindNearestHangar(const Aircraft *v)
/* v->tile can't be used here, when aircraft is flying v->tile is set to 0 */
uint distance = DistanceSquare(vtile, st->airport.tile);
if (v->acache.cached_max_range_sqr != 0) {
/* Check if our current destination can be reached from the depot airport. */
const Station *cur_dest = GetTargetAirportIfValid(v);
if (cur_dest != NULL && DistanceSquare(st->airport.tile, cur_dest->airport.tile) > v->acache.cached_max_range_sqr) continue;
}
if (distance < best || index == INVALID_STATION) {
best = distance;
index = st->index;
@@ -202,17 +207,22 @@ void DrawAircraftEngine(int left, int right, int preferred_x, int y, EngineID en
}
/**
* Get the size of the sprite of an aircraft sprite heading west (used for lists)
* @param engine The engine to get the sprite from
* @param width The width of the sprite
* @param height The height of the sprite
* Get the size of the sprite of an aircraft sprite heading west (used for lists).
* @param engine The engine to get the sprite from.
* @param[out] width The width of the sprite.
* @param[out] height The height of the sprite.
* @param[out] xoffs Number of pixels to shift the sprite to the right.
* @param[out] yoffs Number of pixels to shift the sprite downwards.
* @param image_type Context the sprite is used in.
*/
void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height, EngineImageType image_type)
void GetAircraftSpriteSize(EngineID engine, uint &width, uint &height, int &xoffs, int &yoffs, EngineImageType image_type)
{
const Sprite *spr = GetSprite(GetAircraftIcon(engine, image_type), ST_NORMAL);
width = UnScaleByZoom(spr->width, ZOOM_LVL_GUI);
height = UnScaleByZoom(spr->height, ZOOM_LVL_GUI);
xoffs = UnScaleByZoom(spr->x_offs, ZOOM_LVL_GUI);
yoffs = UnScaleByZoom(spr->y_offs, ZOOM_LVL_GUI);
}
/**
@@ -292,7 +302,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine *
v->targetairport = GetStationIndex(tile);
v->SetNext(u);
v->service_interval = Company::Get(_current_company)->settings.vehicle.servint_aircraft;
v->SetServiceInterval(Company::Get(_current_company)->settings.vehicle.servint_aircraft);
v->date_of_last_service = _date;
v->build_year = u->build_year = _cur_year;
@@ -304,6 +314,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine *
v->vehicle_flags = 0;
if (e->flags & ENGINE_EXCLUSIVE_PREVIEW) SetBit(v->vehicle_flags, VF_BUILT_AS_PROTOTYPE);
v->SetServiceIntervalIsPercent(Company::Get(_current_company)->settings.vehicle.servint_ispercent);
v->InvalidateNewGRFCacheOfChain();
@@ -365,7 +376,7 @@ bool Aircraft::FindClosestDepot(TileIndex *location, DestinationID *destination,
static void CheckIfAircraftNeedsService(Aircraft *v)
{
if (Company::Get(v->owner)->settings.vehicle.servint_aircraft == 0 || !v->NeedsAutomaticServicing()) return;
if (v->IsInDepot()) {
if (v->IsChainInDepot()) {
VehicleServiceInDepot(v);
return;
}
@@ -625,7 +636,7 @@ static int UpdateAircraftSpeed(Aircraft *v, uint speed_limit = SPEED_LIMIT_NONE,
/* Adjust distance moved by plane speed setting */
if (_settings_game.vehicle.plane_speed > 1) spd /= _settings_game.vehicle.plane_speed;
/* Convert direction-indepenent speed into direction-dependent speed. (old movement method) */
/* Convert direction-independent speed into direction-dependent speed. (old movement method) */
spd = v->GetOldAdvanceSpeed(spd);
spd += v->progress;
@@ -650,7 +661,7 @@ int GetAircraftFlyingAltitude(const Aircraft *v)
int base_altitude = PLANE_HOLDING_ALTITUDE;
/* Make sure eastbound and westbound planes do not "crash" into each
* other by providing them with vertical seperation
* other by providing them with vertical separation
*/
switch (v->direction) {
case DIR_N:
@@ -1163,13 +1174,10 @@ static void CrashAirplane(Aircraft *v)
AI::NewEvent(v->owner, new ScriptEventVehicleCrashed(v->index, v->tile, st == NULL ? ScriptEventVehicleCrashed::CRASH_AIRCRAFT_NO_AIRPORT : ScriptEventVehicleCrashed::CRASH_PLANE_LANDING));
Game::NewEvent(new ScriptEventVehicleCrashed(v->index, v->tile, st == NULL ? ScriptEventVehicleCrashed::CRASH_AIRCRAFT_NO_AIRPORT : ScriptEventVehicleCrashed::CRASH_PLANE_LANDING));
AddVehicleNewsItem(newsitem,
NS_ACCIDENT,
v->index,
st != NULL ? st->index : INVALID_STATION);
AddVehicleNewsItem(newsitem, NT_ACCIDENT, v->index, st != NULL ? st->index : INVALID_STATION);
ModifyStationRatingAround(v->tile, v->owner, -160, 30);
SndPlayVehicleFx(SND_12_EXPLOSION, v);
if (_settings_client.sound.disaster) SndPlayVehicleFx(SND_12_EXPLOSION, v);
}
/**
@@ -1222,7 +1230,7 @@ static void AircraftEntersTerminal(Aircraft *v)
/* show newsitem of celebrating citizens */
AddVehicleNewsItem(
STR_NEWS_FIRST_AIRCRAFT_ARRIVAL,
(v->owner == _local_company) ? NS_ARRIVAL_COMPANY : NS_ARRIVAL_OTHER,
(v->owner == _local_company) ? NT_ARRIVAL_COMPANY : NT_ARRIVAL_OTHER,
v->index,
st->index
);
@@ -1373,7 +1381,7 @@ static void AircraftEventHandler_AtTerminal(Aircraft *v, const AirportFTAClass *
* and get serviced at the same time - setting */
if (_settings_game.order.serviceathelipad) {
if (v->subtype == AIR_HELICOPTER && apc->num_helipads > 0) {
/* an exerpt of ServiceAircraft, without the invisibility stuff */
/* an excerpt of ServiceAircraft, without the invisibility stuff */
v->date_of_last_service = _date;
v->breakdowns_since_last_service = 0;
v->reliability = v->GetEngine()->reliability;
@@ -1395,7 +1403,7 @@ static void AircraftEventHandler_AtTerminal(Aircraft *v, const AirportFTAClass *
switch (v->current_order.GetType()) {
case OT_GOTO_STATION: // ready to fly to another airport
break;
case OT_GOTO_DEPOT: // visit hangar for serivicing, sale, etc.
case OT_GOTO_DEPOT: // visit hangar for servicing, sale, etc.
go_to_hangar = v->current_order.GetDestination() == v->targetairport;
break;
case OT_CONDITIONAL:
@@ -1461,8 +1469,8 @@ static void AircraftEventHandler_Flying(Aircraft *v, const AirportFTAClass *apc)
{
Station *st = Station::Get(v->targetairport);
/* runway busy or not allowed to use this airstation, circle */
if (CanVehicleUseStation(v, st) && (st->owner == OWNER_NONE || st->owner == v->owner)) {
/* Runway busy, not allowed to use this airstation or closed, circle. */
if (CanVehicleUseStation(v, st) && (st->owner == OWNER_NONE || st->owner == v->owner) && !(st->airport.flags & AIRPORT_CLOSED_block)) {
/* {32,FLYING,NOTHING_block,37}, {32,LANDING,N,33}, {32,HELILANDING,N,41},
* if it is an airplane, look for LANDING, for helicopter HELILANDING
* it is possible to choose from multiple landing runways, so loop until a free one is found */
@@ -1862,7 +1870,7 @@ static void AircraftHandleDestTooFar(Aircraft *v, bool too_far)
if (v->owner == _local_company) {
/* Post a news message. */
SetDParam(0, v->index);
AddVehicleNewsItem(STR_NEWS_AIRCRAFT_DEST_TOO_FAR, NS_ADVICE, v->index);
AddVehicleAdviceNewsItem(STR_NEWS_AIRCRAFT_DEST_TOO_FAR, v->index);
}
}
return;
@@ -1894,7 +1902,7 @@ static bool AircraftEventHandler(Aircraft *v, int loop)
if (v->current_order.IsType(OT_LOADING) || v->current_order.IsType(OT_LEAVESTATION)) return true;
if (v->state == FLYING) {
if (v->state >= ENDTAKEOFF && v->state <= HELIENDLANDING) {
/* If we are flying, unconditionally clear the 'dest too far' state. */
AircraftHandleDestTooFar(v, false);
} else if (v->acache.cached_max_range_sqr != 0) {

View File

@@ -22,7 +22,7 @@
* @param terminals The terminals.
* @param num_helipads Number of heli pads.
* @param flags Information about the class of FTA.
* @param delta_z Height of the arport above the land.
* @param delta_z Height of the airport above the land.
*/
#define AIRPORT_GENERIC(name, terminals, num_helipads, flags, delta_z) \
static AirportFTAClass _airportfta_ ## name(_airport_moving_data_ ## name, terminals, \
@@ -41,7 +41,7 @@
* Define a heliport.
* @param name Suffix of the names of the helipad data.
* @param num_helipads Number of heli pads.
* @param delta_z Height of the arport above the land.
* @param delta_z Height of the airport above the land.
*/
#define HELIPORT(name, num_helipads, delta_z) \
AIRPORT_GENERIC(name, NULL, num_helipads, AirportFTAClass::HELICOPTERS, delta_z)

View File

@@ -122,7 +122,8 @@ static const uint64
OUT_WAY_block2 = 1ULL << 31,
/* end of new blocks */
NOTHING_block = 1ULL << 30;
NOTHING_block = 1ULL << 30,
AIRPORT_CLOSED_block = 1ULL << 63; ///< Dummy block for indicating a closed airport.
/** A single location on an airport where aircraft can move to. */
struct AirportMovingData {

View File

@@ -43,7 +43,7 @@ void CcBuildAirport(const CommandCost &result, TileIndex tile, uint32 p1, uint32
{
if (result.Failed()) return;
SndPlayTileFx(SND_1F_SPLAT, tile);
if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT, tile);
if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
}
@@ -57,7 +57,7 @@ static void PlaceAirport(TileIndex tile)
uint32 p2 = _ctrl_pressed;
SB(p2, 16, 16, INVALID_STATION); // no station to join
uint32 p1 = AirportClass::Get(_selected_airport_class, _selected_airport_index)->GetIndex();
uint32 p1 = AirportClass::Get(_selected_airport_class)->GetSpec(_selected_airport_index)->GetIndex();
p1 |= _selected_airport_layout << 8;
CommandContainer cmdcont = { tile, p1, p2, CMD_BUILD_AIRPORT | CMD_MSG(STR_ERROR_CAN_T_BUILD_AIRPORT_HERE), CcBuildAirport, "" };
ShowSelectStationIfNeeded(cmdcont, TileArea(tile, _thd.size.x / TILE_SIZE, _thd.size.y / TILE_SIZE));
@@ -207,8 +207,8 @@ class BuildAirportWindow : public PickerWindowBase {
{
DropDownList *list = new DropDownList();
for (uint i = 0; i < AirportClass::GetCount(); i++) {
list->push_back(new DropDownListStringItem(AirportClass::GetName((AirportClassID)i), i, false));
for (uint i = 0; i < AirportClass::GetClassCount(); i++) {
list->push_back(new DropDownListStringItem(AirportClass::Get((AirportClassID)i)->name, i, false));
}
return list;
@@ -229,7 +229,7 @@ public:
this->SetWidgetLoweredState(WID_AP_BTN_DOHILIGHT, _settings_client.gui.station_show_coverage);
this->OnInvalidateData();
this->vscroll->SetCount(AirportClass::GetCount(_selected_airport_class));
this->vscroll->SetCount(AirportClass::Get(_selected_airport_class)->GetSpecCount());
this->SelectFirstAvailableAirport(true);
}
@@ -242,13 +242,13 @@ public:
{
switch (widget) {
case WID_AP_CLASS_DROPDOWN:
SetDParam(0, AirportClass::GetName(_selected_airport_class));
SetDParam(0, AirportClass::Get(_selected_airport_class)->name);
break;
case WID_AP_LAYOUT_NUM:
SetDParam(0, STR_EMPTY);
if (_selected_airport_index != -1) {
const AirportSpec *as = AirportClass::Get(_selected_airport_class, _selected_airport_index);
const AirportSpec *as = AirportClass::Get(_selected_airport_class)->GetSpec(_selected_airport_index);
StringID string = GetAirportTextCallback(as, _selected_airport_layout, CBID_AIRPORT_LAYOUT_NAME);
if (string != STR_UNDEFINED) {
SetDParam(0, string);
@@ -268,8 +268,8 @@ public:
switch (widget) {
case WID_AP_CLASS_DROPDOWN: {
Dimension d = {0, 0};
for (uint i = 0; i < AirportClass::GetCount(); i++) {
SetDParam(0, AirportClass::GetName((AirportClassID)i));
for (uint i = 0; i < AirportClass::GetClassCount(); i++) {
SetDParam(0, AirportClass::Get((AirportClassID)i)->name);
d = maxdim(d, GetStringBoundingBox(STR_BLACK_STRING));
}
d.width += padding.width;
@@ -332,8 +332,9 @@ public:
switch (widget) {
case WID_AP_AIRPORT_LIST: {
int y = r.top;
for (uint i = this->vscroll->GetPosition(); this->vscroll->IsVisible(i) && i < AirportClass::GetCount(_selected_airport_class); i++) {
const AirportSpec *as = AirportClass::Get(_selected_airport_class, i);
AirportClass *apclass = AirportClass::Get(_selected_airport_class);
for (uint i = this->vscroll->GetPosition(); this->vscroll->IsVisible(i) && i < apclass->GetSpecCount(); i++) {
const AirportSpec *as = apclass->GetSpec(i);
if (!as->IsAvailable()) {
GfxFillRect(r.left + 1, y + 1, r.right - 1, y + this->line_height - 2, PC_BLACK, FILLRECT_CHECKER);
}
@@ -352,7 +353,7 @@ public:
case WID_AP_EXTRA_TEXT:
if (_selected_airport_index != -1) {
const AirportSpec *as = AirportClass::Get(_selected_airport_class, _selected_airport_index);
const AirportSpec *as = AirportClass::Get(_selected_airport_class)->GetSpec(_selected_airport_index);
StringID string = GetAirportTextCallback(as, _selected_airport_layout, CBID_AIRPORT_ADDITIONAL_TEXT);
if (string != STR_UNDEFINED) {
SetDParam(0, string);
@@ -374,7 +375,7 @@ public:
int bottom = panel_nwi->pos_y + panel_nwi->current_y;
if (_selected_airport_index != -1) {
const AirportSpec *as = AirportClass::Get(_selected_airport_class, _selected_airport_index);
const AirportSpec *as = AirportClass::Get(_selected_airport_class)->GetSpec(_selected_airport_index);
int rad = _settings_game.station.modified_catchment ? as->catchment : (uint)CA_UNMODIFIED;
/* only show the station (airport) noise, if the noise option is activated */
@@ -412,7 +413,7 @@ public:
this->DisableWidget(WID_AP_LAYOUT_DECREASE);
this->DisableWidget(WID_AP_LAYOUT_INCREASE);
} else {
const AirportSpec *as = AirportClass::Get(_selected_airport_class, _selected_airport_index);
const AirportSpec *as = AirportClass::Get(_selected_airport_class)->GetSpec(_selected_airport_index);
int w = as->size_x;
int h = as->size_y;
Direction rotation = as->rotation[_selected_airport_layout];
@@ -439,7 +440,7 @@ public:
case WID_AP_AIRPORT_LIST: {
int num_clicked = this->vscroll->GetPosition() + (pt.y - this->nested_array[widget]->pos_y) / this->line_height;
if (num_clicked >= this->vscroll->GetCount()) break;
const AirportSpec *as = AirportClass::Get(_selected_airport_class, num_clicked);
const AirportSpec *as = AirportClass::Get(_selected_airport_class)->GetSpec(num_clicked);
if (as->IsAvailable()) this->SelectOtherAirport(num_clicked);
break;
}
@@ -449,7 +450,7 @@ public:
this->SetWidgetLoweredState(WID_AP_BTN_DONTHILIGHT, !_settings_client.gui.station_show_coverage);
this->SetWidgetLoweredState(WID_AP_BTN_DOHILIGHT, _settings_client.gui.station_show_coverage);
this->SetDirty();
SndPlayFx(SND_15_BEEP);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
this->UpdateSelectSize();
break;
@@ -475,8 +476,9 @@ public:
void SelectFirstAvailableAirport(bool change_class)
{
/* First try to select an airport in the selected class. */
for (uint i = 0; i < AirportClass::GetCount(_selected_airport_class); i++) {
const AirportSpec *as = AirportClass::Get(_selected_airport_class, i);
AirportClass *sel_apclass = AirportClass::Get(_selected_airport_class);
for (uint i = 0; i < sel_apclass->GetSpecCount(); i++) {
const AirportSpec *as = sel_apclass->GetSpec(i);
if (as->IsAvailable()) {
this->SelectOtherAirport(i);
return;
@@ -486,8 +488,9 @@ public:
/* If that fails, select the first available airport
* from a random class. */
for (AirportClassID j = APC_BEGIN; j < APC_MAX; j++) {
for (uint i = 0; i < AirportClass::GetCount(j); i++) {
const AirportSpec *as = AirportClass::Get(j, i);
AirportClass *apclass = AirportClass::Get(j);
for (uint i = 0; i < apclass->GetSpecCount(); i++) {
const AirportSpec *as = apclass->GetSpec(i);
if (as->IsAvailable()) {
_selected_airport_class = j;
this->SelectOtherAirport(i);
@@ -504,7 +507,7 @@ public:
{
assert(widget == WID_AP_CLASS_DROPDOWN);
_selected_airport_class = (AirportClassID)index;
this->vscroll->SetCount(AirportClass::GetCount(_selected_airport_class));
this->vscroll->SetCount(AirportClass::Get(_selected_airport_class)->GetSpecCount());
this->SelectFirstAvailableAirport(false);
}
@@ -554,7 +557,7 @@ static const NWidgetPart _nested_build_airport_widgets[] = {
static const WindowDesc _build_airport_desc(
WDP_AUTO, 0, 0,
WC_BUILD_STATION, WC_BUILD_TOOLBAR,
WDF_CONSTRUCTION | WDF_UNCLICK_BUTTONS,
WDF_CONSTRUCTION,
_nested_build_airport_widgets, lengthof(_nested_build_airport_widgets)
);

View File

@@ -54,11 +54,21 @@ static EngineID GetNextArticulatedPart(uint index, EngineID front_type, Vehicle
return GetNewEngineID(front_engine->GetGRF(), front_engine->type, callback);
}
/**
* Does a NewGRF report that this should be an articulated vehicle?
* @param engine_type The engine to check.
* @return True iff the articulated engine callback flag is set.
*/
bool IsArticulatedEngine(EngineID engine_type)
{
return HasBit(EngInfo(engine_type)->callback_mask, CBM_VEHICLE_ARTIC_ENGINE);
}
/**
* Count the number of articulated parts of an engine.
* @param engine_type The engine to get the number of parts of.
* @param purchase_window Whether we are in the scope of the purchase window or not, i.e. whether we cannot allocate vehicles.
* @return The nmumber of parts.
* @return The number of parts.
*/
uint CountArticulatedParts(EngineID engine_type, bool purchase_window)
{
@@ -88,7 +98,7 @@ uint CountArticulatedParts(EngineID engine_type, bool purchase_window)
/**
* Returns the default (non-refitted) capacity of a specific EngineID.
* @param engine the EngineID of iterest
* @param engine the EngineID of interest
* @param cargo_type returns the default cargo type, if needed
* @return capacity
*/
@@ -103,7 +113,7 @@ static inline uint16 GetVehicleDefaultCapacity(EngineID engine, CargoID *cargo_t
/**
* Returns all cargoes a vehicle can carry.
* @param engine the EngineID of iterest
* @param engine the EngineID of interest
* @param include_initial_cargo_type if true the default cargo type of the vehicle is included; if false only the refit_mask
* @return bit set of CargoIDs
*/

View File

@@ -23,6 +23,7 @@ uint32 GetUnionOfArticulatedRefitMasks(EngineID engine, bool include_initial_car
uint32 GetIntersectionOfArticulatedRefitMasks(EngineID engine, bool include_initial_cargo_type);
bool IsArticulatedVehicleCarryingDifferentCargoes(const Vehicle *v, CargoID *cargo_type);
bool IsArticulatedVehicleRefittable(EngineID engine);
bool IsArticulatedEngine(EngineID engine_type);
void CheckConsistencyOfArticulatedVehicle(const Vehicle *v);

View File

@@ -57,16 +57,18 @@ void RemoveAllEngineReplacement(EngineRenewList *erl)
* @param erl The renewlist to search in.
* @param engine Engine type to be replaced.
* @param group The group related to this replacement.
* @param[out] replace_when_old Set to true if the replacement should be done when old.
* @return The engine type to replace with, or INVALID_ENGINE if no
* replacement is in the list.
*/
EngineID EngineReplacement(EngineRenewList erl, EngineID engine, GroupID group)
EngineID EngineReplacement(EngineRenewList erl, EngineID engine, GroupID group, bool *replace_when_old)
{
const EngineRenew *er = GetEngineReplacement(erl, engine, group);
if (er == NULL && (group == DEFAULT_GROUP || (Group::IsValidID(group) && !Group::Get(group)->replace_protection))) {
/* We didn't find anything useful in the vehicle's own group so we will try ALL_GROUP */
er = GetEngineReplacement(erl, engine, ALL_GROUP);
}
if (replace_when_old != NULL) *replace_when_old = er == NULL ? false : er->replace_when_old;
return er == NULL ? INVALID_ENGINE : er->to;
}
@@ -76,15 +78,19 @@ EngineID EngineReplacement(EngineRenewList erl, EngineID engine, GroupID group)
* @param old_engine The original engine type.
* @param new_engine The replacement engine type.
* @param group The group related to this replacement.
* @param replace_when_old Replace when old or always?
* @param flags The calling command flags.
* @return 0 on success, CMD_ERROR on failure.
*/
CommandCost AddEngineReplacement(EngineRenewList *erl, EngineID old_engine, EngineID new_engine, GroupID group, DoCommandFlag flags)
CommandCost AddEngineReplacement(EngineRenewList *erl, EngineID old_engine, EngineID new_engine, GroupID group, bool replace_when_old, DoCommandFlag flags)
{
/* Check if the old vehicle is already in the list */
EngineRenew *er = GetEngineReplacement(*erl, old_engine, group);
if (er != NULL) {
if (flags & DC_EXEC) er->to = new_engine;
if (flags & DC_EXEC) {
er->to = new_engine;
er->replace_when_old = replace_when_old;
}
return CommandCost();
}
@@ -93,6 +99,7 @@ CommandCost AddEngineReplacement(EngineRenewList *erl, EngineID old_engine, Engi
if (flags & DC_EXEC) {
er = new EngineRenew(old_engine, new_engine);
er->group_id = group;
er->replace_when_old = replace_when_old;
/* Insert before the first element */
er->next = (EngineRenew *)(*erl);

View File

@@ -37,6 +37,7 @@ struct EngineRenew : EngineRenewPool::PoolItem<&_enginerenew_pool> {
EngineID to;
EngineRenew *next;
GroupID group_id;
bool replace_when_old; ///< Do replacement only when vehicle is old.
EngineRenew(EngineID from = INVALID_ENGINE, EngineID to = INVALID_ENGINE) : from(from), to(to) {}
~EngineRenew() {}

View File

@@ -66,18 +66,18 @@ bool CheckAutoreplaceValidity(EngineID from, EngineID to, CompanyID company)
/* make sure the railtypes are compatible */
if ((GetRailTypeInfo(e_from->u.rail.railtype)->compatible_railtypes & GetRailTypeInfo(e_to->u.rail.railtype)->compatible_railtypes) == 0) return false;
/* make sure we do not replace wagons with engines or vise versa */
/* make sure we do not replace wagons with engines or vice versa */
if ((e_from->u.rail.railveh_type == RAILVEH_WAGON) != (e_to->u.rail.railveh_type == RAILVEH_WAGON)) return false;
break;
}
case VEH_ROAD:
/* make sure that we do not replace a tram with a normal road vehicles or vise versa */
/* make sure that we do not replace a tram with a normal road vehicles or vice versa */
if (HasBit(e_from->info.misc_flags, EF_ROAD_TRAM) != HasBit(e_to->info.misc_flags, EF_ROAD_TRAM)) return false;
break;
case VEH_AIRCRAFT:
/* make sure that we do not replace a plane with a helicopter or vise versa */
/* make sure that we do not replace a plane with a helicopter or vice versa */
if ((e_from->u.air.subtype & AIR_CTOL) != (e_to->u.air.subtype & AIR_CTOL)) return false;
break;
@@ -225,10 +225,11 @@ static CargoID GetNewCargoTypeForReplace(Vehicle *v, EngineID engine_type, bool
* Get the EngineID of the replacement for a vehicle
* @param v The vehicle to find a replacement for
* @param c The vehicle's owner (it's faster to forward the pointer than refinding it)
* @param always_replace Always replace, even if not old.
* @param [out] e the EngineID of the replacement. INVALID_ENGINE if no replacement is found
* @return Error if the engine to build is not available
*/
static CommandCost GetNewEngineType(const Vehicle *v, const Company *c, EngineID &e)
static CommandCost GetNewEngineType(const Vehicle *v, const Company *c, bool always_replace, EngineID &e)
{
assert(v->type != VEH_TRAIN || !v->IsArticulatedPart());
@@ -239,7 +240,9 @@ static CommandCost GetNewEngineType(const Vehicle *v, const Company *c, EngineID
return CommandCost();
}
e = EngineReplacementForCompany(c, v->engine_type, v->group_id);
bool replace_when_old;
e = EngineReplacementForCompany(c, v->engine_type, v->group_id, &replace_when_old);
if (!always_replace && replace_when_old && !v->NeedsAutorenewing(c, false)) e = INVALID_ENGINE;
/* Autoreplace, if engine is available */
if (e != INVALID_ENGINE && IsEngineBuildable(e, v->type, _current_company)) {
@@ -260,7 +263,7 @@ static CommandCost GetNewEngineType(const Vehicle *v, const Company *c, EngineID
* Builds and refits a replacement vehicle
* Important: The old vehicle is still in the original vehicle chain (used for determining the cargo when the old vehicle did not carry anything, but the new one does)
* @param old_veh A single (articulated/multiheaded) vehicle that shall be replaced.
* @param new_vehicle Returns the newly build and refittet vehicle
* @param new_vehicle Returns the newly build and refitted vehicle
* @param part_of_chain The vehicle is part of a train
* @return cost or error
*/
@@ -271,7 +274,7 @@ static CommandCost BuildReplacementVehicle(Vehicle *old_veh, Vehicle **new_vehic
/* Shall the vehicle be replaced? */
const Company *c = Company::Get(_current_company);
EngineID e;
CommandCost cost = GetNewEngineType(old_veh, c, e);
CommandCost cost = GetNewEngineType(old_veh, c, true, e);
if (cost.Failed()) return cost;
if (e == INVALID_ENGINE) return CommandCost(); // neither autoreplace is set, nor autorenew is triggered
@@ -354,11 +357,6 @@ static CommandCost CopyHeadSpecificThings(Vehicle *old_head, Vehicle *new_head,
/* Last do those things which do never fail (resp. we do not care about), but which are not undo-able */
if (cost.Succeeded() && old_head != new_head && (flags & DC_EXEC) != 0) {
/* Copy vehicle name */
if (old_head->name != NULL) {
DoCommand(0, new_head->index, 0, DC_EXEC | DC_AUTOREPLACE, CMD_RENAME_VEHICLE, old_head->name);
}
/* Copy other things which cannot be copied by a command and which shall not stay resetted from the build vehicle command */
new_head->CopyVehicleConfigAndStatistics(old_head);
@@ -662,7 +660,7 @@ CommandCost CmdAutoreplaceVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1
CommandCost ret = CheckOwnership(v->owner);
if (ret.Failed()) return ret;
if (!v->IsInDepot()) return CMD_ERROR;
if (!v->IsChainInDepot()) return CMD_ERROR;
if (v->vehstatus & VS_CRASHED) return CMD_ERROR;
bool free_wagon = false;
@@ -683,7 +681,7 @@ CommandCost CmdAutoreplaceVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1
bool any_replacements = false;
while (w != NULL) {
EngineID e;
CommandCost cost = GetNewEngineType(w, c, e);
CommandCost cost = GetNewEngineType(w, c, false, e);
if (cost.Failed()) return cost;
any_replacements |= (e != INVALID_ENGINE);
w = (!free_wagon && w->type == VEH_TRAIN ? Train::From(w)->GetNextUnit() : NULL);
@@ -699,7 +697,7 @@ CommandCost CmdAutoreplaceVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1
if (!was_stopped) cost.AddCost(CmdStartStopVehicle(v, true));
if (cost.Failed()) return cost;
assert(v->IsStoppedInDepot());
assert(free_wagon || v->IsStoppedInDepot());
/* We have to construct the new vehicle chain to test whether it is valid.
* Vehicle construction needs random bits, so we have to save the random seeds
@@ -736,6 +734,7 @@ CommandCost CmdAutoreplaceVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1
* @param tile unused
* @param flags operation to perform
* @param p1 packed data
* - bit 0 = replace when engine gets old?
* - bits 16-31 = engine group
* @param p2 packed data
* - bits 0-15 = old engine type
@@ -760,12 +759,15 @@ CommandCost CmdSetAutoReplace(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
if (!Engine::IsValidID(new_engine_type)) return CMD_ERROR;
if (!CheckAutoreplaceValidity(old_engine_type, new_engine_type, _current_company)) return CMD_ERROR;
cost = AddEngineReplacementForCompany(c, old_engine_type, new_engine_type, id_g, flags);
cost = AddEngineReplacementForCompany(c, old_engine_type, new_engine_type, id_g, HasBit(p1, 0), flags);
} else {
cost = RemoveEngineReplacementForCompany(c, old_engine_type, id_g, flags);
}
if (flags & DC_EXEC) GroupStatistics::UpdateAutoreplace(_current_company);
if (flags & DC_EXEC) {
GroupStatistics::UpdateAutoreplace(_current_company);
if (IsLocalCompany()) SetWindowDirty(WC_REPLACE_VEHICLE, Engine::Get(old_engine_type)->type);
}
if ((flags & DC_EXEC) && IsLocalCompany()) InvalidateAutoreplaceWindow(old_engine_type, id_g);
return cost;

View File

@@ -16,8 +16,8 @@
#include "company_base.h"
void RemoveAllEngineReplacement(EngineRenewList *erl);
EngineID EngineReplacement(EngineRenewList erl, EngineID engine, GroupID group);
CommandCost AddEngineReplacement(EngineRenewList *erl, EngineID old_engine, EngineID new_engine, GroupID group, DoCommandFlag flags);
EngineID EngineReplacement(EngineRenewList erl, EngineID engine, GroupID group, bool *replace_when_old = NULL);
CommandCost AddEngineReplacement(EngineRenewList *erl, EngineID old_engine, EngineID new_engine, GroupID group, bool replace_when_old, DoCommandFlag flags);
CommandCost RemoveEngineReplacement(EngineRenewList *erl, EngineID engine, GroupID group, DoCommandFlag flags);
/**
@@ -34,12 +34,13 @@ static inline void RemoveAllEngineReplacementForCompany(Company *c)
* @param c company.
* @param engine Engine type.
* @param group The group related to this replacement.
* @param[out] replace_when_old Set to true if the replacement should be done when old.
* @return The engine type to replace with, or INVALID_ENGINE if no
* replacement is in the list.
*/
static inline EngineID EngineReplacementForCompany(const Company *c, EngineID engine, GroupID group)
static inline EngineID EngineReplacementForCompany(const Company *c, EngineID engine, GroupID group, bool *replace_when_old = NULL)
{
return EngineReplacement(c->engine_renew_list, engine, group);
return EngineReplacement(c->engine_renew_list, engine, group, replace_when_old);
}
/**
@@ -54,18 +55,33 @@ static inline bool EngineHasReplacementForCompany(const Company *c, EngineID eng
return EngineReplacementForCompany(c, engine, group) != INVALID_ENGINE;
}
/**
* Check if a company has a replacement set up for the given engine when it gets old.
* @param c Company.
* @param engine Engine type to be replaced.
* @param group The group related to this replacement.
* @return True if a replacement when old was set up, false otherwise.
*/
static inline bool EngineHasReplacementWhenOldForCompany(const Company *c, EngineID engine, GroupID group)
{
bool replace_when_old;
EngineReplacement(c->engine_renew_list, engine, group, &replace_when_old);
return replace_when_old;
}
/**
* Add an engine replacement for the company.
* @param c Company.
* @param old_engine The original engine type.
* @param new_engine The replacement engine type.
* @param group The group related to this replacement.
* @param replace_when_old Replace when old or always?
* @param flags The calling command flags.
* @return 0 on success, CMD_ERROR on failure.
*/
static inline CommandCost AddEngineReplacementForCompany(Company *c, EngineID old_engine, EngineID new_engine, GroupID group, DoCommandFlag flags)
static inline CommandCost AddEngineReplacementForCompany(Company *c, EngineID old_engine, EngineID new_engine, GroupID group, bool replace_when_old, DoCommandFlag flags)
{
return AddEngineReplacement(&c->engine_renew_list, old_engine, new_engine, group, flags);
return AddEngineReplacement(&c->engine_renew_list, old_engine, new_engine, group, replace_when_old, flags);
}
/**

View File

@@ -24,6 +24,7 @@
#include "settings_func.h"
#include "core/geometry_func.hpp"
#include "rail_gui.h"
#include "widgets/dropdown_func.h"
#include "widgets/autoreplace_widget.h"
@@ -33,7 +34,7 @@ void DrawEngineList(VehicleType type, int x, int r, int y, const GUIEngineList *
static int CDECL EngineNumberSorter(const EngineID *a, const EngineID *b)
{
int r = ListPositionOfEngine(*a) - ListPositionOfEngine(*b);
int r = Engine::Get(*a)->list_position - Engine::Get(*b)->list_position;
return r;
}
@@ -44,7 +45,7 @@ static int CDECL EngineNumberSorter(const EngineID *a, const EngineID *b)
* @param id_g The group the engine belongs to
* Note: this function only works if it is called either
* - when a new vehicle is build, but before it's counted in num_engines
* - when a vehicle is deleted and after it's substracted from num_engines
* - when a vehicle is deleted and after it's subtracted from num_engines
* - when not changing the count (used when changing replace orders)
*/
void InvalidateAutoreplaceWindow(EngineID e, GroupID id_g)
@@ -67,6 +68,12 @@ void AddRemoveEngineFromAutoreplaceAndBuildWindows(VehicleType type)
InvalidateWindowClassesData(WC_BUILD_VEHICLE); // The build windows needs updating as well
}
static const StringID _start_replace_dropdown[] = {
STR_REPLACE_VEHICLES_NOW,
STR_REPLACE_VEHICLES_WHEN_OLD,
INVALID_STRING_ID
};
/**
* Window for the autoreplacing of vehicles.
*/
@@ -170,6 +177,17 @@ class ReplaceVehicleWindow : public Window {
this->reset_sel_engine = false;
}
/**
* Handle click on the start replace button.
* @param replace_when_old Replace now or only when old?
*/
void ReplaceClick_StartReplace(bool replace_when_old)
{
EngineID veh_from = this->sel_engine[0];
EngineID veh_to = this->sel_engine[1];
DoCommandP(0, (replace_when_old ? 1 : 0) | (this->sel_group << 16), veh_from + (veh_to << 16), CMD_SET_AUTOREPLACE);
}
public:
ReplaceVehicleWindow(const WindowDesc *desc, VehicleType vehicletype, GroupID id_g) : Window()
{
@@ -270,6 +288,17 @@ public:
*size = maxdim(*size, d);
break;
}
case WID_RV_START_REPLACE: {
Dimension d = GetStringBoundingBox(STR_REPLACE_VEHICLES_START);
for (int i = 0; _start_replace_dropdown[i] != INVALID_STRING_ID; i++) {
d = maxdim(d, GetStringBoundingBox(_start_replace_dropdown[i]));
}
d.width += padding.width;
d.height += padding.height;
*size = maxdim(*size, d);
break;
}
}
}
@@ -278,6 +307,20 @@ public:
switch (widget) {
case WID_RV_CAPTION:
SetDParam(0, STR_REPLACE_VEHICLE_TRAIN + this->window_number);
switch (this->sel_group) {
case ALL_GROUP:
SetDParam(1, STR_GROUP_ALL_TRAINS + this->window_number);
break;
case DEFAULT_GROUP:
SetDParam(1, STR_GROUP_DEFAULT_TRAINS + this->window_number);
break;
default:
SetDParam(1, STR_GROUP_NAME);
SetDParam(2, sel_group);
break;
}
break;
case WID_RV_TRAIN_WAGONREMOVE_TOGGLE: {
@@ -301,8 +344,10 @@ public:
if (!EngineHasReplacementForCompany(c, this->sel_engine[0], this->sel_group)) {
SetDParam(0, STR_REPLACE_NOT_REPLACING);
} else {
SetDParam(0, STR_ENGINE_NAME);
SetDParam(1, EngineReplacementForCompany(c, this->sel_engine[0], this->sel_group));
bool when_old = false;
EngineID e = EngineReplacementForCompany(c, this->sel_engine[0], this->sel_group, &when_old);
SetDParam(0, when_old ? STR_REPLACE_REPLACING_WHEN_OLD : STR_ENGINE_NAME);
SetDParam(1, e);
}
} else {
SetDParam(0, STR_REPLACE_NOT_REPLACING_VEHICLE_SELECTED);
@@ -334,13 +379,11 @@ public:
/* Disable the "Start Replacing" button if:
* Either engines list is empty
* or The selected replacement engine has a replacement (to prevent loops)
* or The right engines list (new replacement) has the existing replacement vehicle selected */
* or The selected replacement engine has a replacement (to prevent loops). */
this->SetWidgetDisabledState(WID_RV_START_REPLACE,
this->sel_engine[0] == INVALID_ENGINE ||
this->sel_engine[1] == INVALID_ENGINE ||
EngineReplacementForCompany(c, this->sel_engine[1], this->sel_group) != INVALID_ENGINE ||
EngineReplacementForCompany(c, this->sel_engine[0], this->sel_group) == this->sel_engine[1]);
EngineReplacementForCompany(c, this->sel_engine[1], this->sel_group) != INVALID_ENGINE);
/* Disable the "Stop Replacing" button if:
* The left engines list (existing vehicle) is empty
@@ -349,9 +392,6 @@ public:
this->sel_engine[0] == INVALID_ENGINE ||
!EngineHasReplacementForCompany(c, this->sel_engine[0], this->sel_group));
/* now the actual drawing of the window itself takes place */
SetDParam(0, STR_REPLACE_VEHICLE_TRAIN + this->window_number);
if (this->window_number == VEH_TRAIN) {
/* sets the colour of that art thing */
this->GetWidget<NWidgetCore>(WID_RV_TRAIN_FLUFF_LEFT)->colour = _company_colours[_local_company];
@@ -401,17 +441,19 @@ public:
break;
case WID_RV_START_REPLACE: { // Start replacing
EngineID veh_from = this->sel_engine[0];
EngineID veh_to = this->sel_engine[1];
DoCommandP(0, this->sel_group << 16, veh_from + (veh_to << 16), CMD_SET_AUTOREPLACE);
this->SetDirty();
if (this->GetWidget<NWidgetLeaf>(widget)->ButtonHit(pt)) {
this->HandleButtonClick(WID_RV_START_REPLACE);
ReplaceClick_StartReplace(false);
} else {
bool replacment_when_old = EngineHasReplacementWhenOldForCompany(Company::Get(_local_company), this->sel_engine[0], this->sel_group);
ShowDropDownMenu(this, _start_replace_dropdown, replacment_when_old ? 1 : 0, WID_RV_START_REPLACE, !this->replace_engines ? 1 << 1 : 0, 0);
}
break;
}
case WID_RV_STOP_REPLACE: { // Stop replacing
EngineID veh_from = this->sel_engine[0];
DoCommandP(0, this->sel_group << 16, veh_from + (INVALID_ENGINE << 16), CMD_SET_AUTOREPLACE);
this->SetDirty();
break;
}
@@ -441,17 +483,26 @@ public:
virtual void OnDropdownSelect(int widget, int index)
{
RailType temp = (RailType)index;
if (temp == sel_railtype) return; // we didn't select a new one. No need to change anything
sel_railtype = temp;
/* Reset scrollbar positions */
this->vscroll[0]->SetPosition(0);
this->vscroll[1]->SetPosition(0);
/* Rebuild the lists */
this->engines[0].ForceRebuild();
this->engines[1].ForceRebuild();
this->reset_sel_engine = true;
this->SetDirty();
switch (widget) {
case WID_RV_TRAIN_RAILTYPE_DROPDOWN: {
RailType temp = (RailType)index;
if (temp == sel_railtype) return; // we didn't select a new one. No need to change anything
sel_railtype = temp;
/* Reset scrollbar positions */
this->vscroll[0]->SetPosition(0);
this->vscroll[1]->SetPosition(0);
/* Rebuild the lists */
this->engines[0].ForceRebuild();
this->engines[1].ForceRebuild();
this->reset_sel_engine = true;
this->SetDirty();
break;
}
case WID_RV_START_REPLACE:
this->ReplaceClick_StartReplace(index != 0);
break;
}
}
virtual void OnResize()
@@ -493,11 +544,11 @@ static const NWidgetPart _nested_replace_rail_vehicle_widgets[] = {
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_RV_RIGHT_SCROLLBAR),
EndContainer(),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_LEFT_DETAILS), SetMinimalSize(228, 102), SetResize(1, 0), EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_RIGHT_DETAILS), SetMinimalSize(228, 102), SetResize(1, 0), EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_LEFT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_RIGHT_DETAILS), SetMinimalSize(240, 122), SetResize(1, 0), EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_START_REPLACE), SetMinimalSize(139, 12), SetDataTip(STR_REPLACE_VEHICLES_START, STR_REPLACE_HELP_START_BUTTON),
NWidget(NWID_PUSHBUTTON_DROPDOWN, COLOUR_GREY, WID_RV_START_REPLACE), SetMinimalSize(139, 12), SetDataTip(STR_REPLACE_VEHICLES_START, STR_REPLACE_HELP_START_BUTTON),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_INFO_TAB), SetMinimalSize(167, 12), SetDataTip(0x0, STR_REPLACE_HELP_REPLACE_INFO_TAB), SetResize(1, 0),
EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_STOP_REPLACE), SetMinimalSize(150, 12), SetDataTip(STR_REPLACE_VEHICLES_STOP, STR_REPLACE_HELP_STOP_BUTTON),
@@ -513,9 +564,9 @@ static const NWidgetPart _nested_replace_rail_vehicle_widgets[] = {
};
static const WindowDesc _replace_rail_vehicle_desc(
WDP_AUTO, 456, 140,
WDP_AUTO, 500, 140,
WC_REPLACE_VEHICLE, WC_NONE,
WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION,
WDF_CONSTRUCTION,
_nested_replace_rail_vehicle_widgets, lengthof(_nested_replace_rail_vehicle_widgets)
);
@@ -537,7 +588,7 @@ static const NWidgetPart _nested_replace_vehicle_widgets[] = {
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_RIGHT_DETAILS), SetMinimalSize(228, 92), SetResize(1, 0), EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_START_REPLACE), SetMinimalSize(139, 12), SetDataTip(STR_REPLACE_VEHICLES_START, STR_REPLACE_HELP_START_BUTTON),
NWidget(NWID_PUSHBUTTON_DROPDOWN, COLOUR_GREY, WID_RV_START_REPLACE), SetMinimalSize(139, 12), SetDataTip(STR_REPLACE_VEHICLES_START, STR_REPLACE_HELP_START_BUTTON),
NWidget(WWT_PANEL, COLOUR_GREY, WID_RV_INFO_TAB), SetMinimalSize(167, 12), SetDataTip(0x0, STR_REPLACE_HELP_REPLACE_INFO_TAB), SetResize(1, 0), EndContainer(),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_RV_STOP_REPLACE), SetMinimalSize(138, 12), SetDataTip(STR_REPLACE_VEHICLES_STOP, STR_REPLACE_HELP_STOP_BUTTON),
NWidget(WWT_RESIZEBOX, COLOUR_GREY),
@@ -547,7 +598,7 @@ static const NWidgetPart _nested_replace_vehicle_widgets[] = {
static const WindowDesc _replace_vehicle_desc(
WDP_AUTO, 456, 118,
WC_REPLACE_VEHICLE, WC_NONE,
WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION,
WDF_CONSTRUCTION,
_nested_replace_vehicle_widgets, lengthof(_nested_replace_vehicle_widgets)
);

44
src/base_consist.cpp Normal file
View File

@@ -0,0 +1,44 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file base_consist.cpp Properties for front vehicles/consists. */
#include "stdafx.h"
#include "base_consist.h"
#include "vehicle_base.h"
BaseConsist::~BaseConsist()
{
free(this->name);
}
/**
* Copy properties of other BaseConsist.
* @param src Source for copying
*/
void BaseConsist::CopyConsistPropertiesFrom(const BaseConsist *src)
{
if (this == src) return;
free(this->name);
this->name = src->name != NULL ? strdup(src->name) : NULL;
this->current_order_time = src->current_order_time;
this->lateness_counter = src->lateness_counter;
this->timetable_start = src->timetable_start;
this->service_interval = src->service_interval;
this->cur_real_order_index = src->cur_real_order_index;
this->cur_implicit_order_index = src->cur_implicit_order_index;
if (HasBit(src->vehicle_flags, VF_TIMETABLE_STARTED)) SetBit(this->vehicle_flags, VF_TIMETABLE_STARTED);
if (HasBit(src->vehicle_flags, VF_AUTOFILL_TIMETABLE)) SetBit(this->vehicle_flags, VF_AUTOFILL_TIMETABLE);
if (HasBit(src->vehicle_flags, VF_AUTOFILL_PRES_WAIT_TIME)) SetBit(this->vehicle_flags, VF_AUTOFILL_PRES_WAIT_TIME);
}

40
src/base_consist.h Normal file
View File

@@ -0,0 +1,40 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file base_consist.h Properties for front vehicles/consists. */
#ifndef BASE_CONSIST_H
#define BASE_CONSIST_H
#include "order_type.h"
#include "date_type.h"
/** Various front vehicle properties that are preserved when autoreplacing, using order-backup or switching front engines within a consist. */
struct BaseConsist {
char *name; ///< Name of vehicle
/* Used for timetabling. */
uint32 current_order_time; ///< How many ticks have passed since this order started.
int32 lateness_counter; ///< How many ticks late (or early if negative) this vehicle is.
Date timetable_start; ///< When the vehicle is supposed to start the timetable.
uint16 service_interval; ///< The interval for (automatic) servicing; either in days or %.
VehicleOrderID cur_real_order_index;///< The index to the current real (non-implicit) order
VehicleOrderID cur_implicit_order_index;///< The index to the current implicit order
uint16 vehicle_flags; ///< Used for gradual loading and other miscellaneous things (@see VehicleFlags enum)
BaseConsist() : name(NULL) {}
virtual ~BaseConsist();
void CopyConsistPropertiesFrom(const BaseConsist *src);
};
#endif /* BASE_CONSIST_H */

View File

@@ -15,6 +15,8 @@
#include "fileio_func.h"
#include "core/smallmap_type.hpp"
#include "gfx_type.h"
#include "textfile_type.h"
#include "textfile_gui.h"
/* Forward declare these; can't do 'struct X' in functions as older GCCs barf on that */
struct IniFile;
@@ -143,6 +145,22 @@ struct BaseSet {
{
return file->CheckMD5(subdir, SIZE_MAX);
}
/**
* Search a textfile file next to this base media.
* @param type The type of the textfile to search for.
* @return The filename for the textfile, \c NULL otherwise.
*/
const char *GetTextfile(TextfileType type) const
{
for (uint i = 0; i < NUM_FILES; i++) {
const char *textfile = ::GetTextfile(type, BASESET_DIR, this->files[i].filename);
if (textfile != NULL) {
return textfile;
}
}
return NULL;
}
};
/**
@@ -183,6 +201,8 @@ public:
return num + fs.Scan(GetExtension(), BASESET_DIR, Tbase_set::SEARCH_IN_TARS);
}
static Tbase_set *GetAvailableSets();
static bool SetSet(const char *name);
static char *GetSetsList(char *p, const char *last);
static int GetNumSets();
@@ -199,6 +219,15 @@ public:
static bool HasSet(const ContentInfo *ci, bool md5sum);
};
/**
* Check whether there's a base set matching some information.
* @param ci The content info to compare it to.
* @param md5sum Should the MD5 checksum be tested as well?
* @param s The list with sets.
* @return The filename of the first file of the base set, or \c NULL if there is no match.
*/
template <class Tbase_set>
const char *TryGetBaseSetFile(const ContentInfo *ci, bool md5sum, const Tbase_set *s);
/** Types of graphics in the base graphics set */
enum GraphicsFileType {

View File

@@ -7,7 +7,10 @@
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file base_media_func.h Generic function implementations for base data (graphics, sounds). */
/**
* @file base_media_func.h Generic function implementations for base data (graphics, sounds).
* @note You should _never_ include this file due to the SET_TYPE define.
*/
#include "base_media_base.h"
#include "debug.h"
@@ -134,12 +137,16 @@ bool BaseSet<T, Tnum_files, Tsearch_in_tars>::FillSetDetails(IniFile *ini, const
switch (T::CheckMD5(file, BASESET_DIR)) {
case MD5File::CR_MATCH:
this->valid_files++;
/* FALL THROUGH */
this->found_files++;
break;
case MD5File::CR_MISMATCH:
DEBUG(grf, 1, "MD5 checksum mismatch for: %s (in %s)", filename, full_filename);
this->found_files++;
break;
case MD5File::CR_NO_FILE:
DEBUG(grf, 1, "The file %s specified in %s is missing", filename, full_filename);
break;
}
}
@@ -177,7 +184,8 @@ bool BaseMedia<Tbase_set>::AddFile(const char *filename, size_t basepath_length,
/* The more complete set takes precedence over the version number. */
if ((duplicate->valid_files == set->valid_files && duplicate->version >= set->version) ||
duplicate->valid_files > set->valid_files) {
DEBUG(grf, 1, "Not adding %s (%i) as base " SET_TYPE " set (duplicate)", set->name, set->version);
DEBUG(grf, 1, "Not adding %s (%i) as base " SET_TYPE " set (duplicate, %s)", set->name, set->version,
duplicate->valid_files > set->valid_files ? "less valid files" : "lower version");
set->next = BaseMedia<Tbase_set>::duplicate_sets;
BaseMedia<Tbase_set>::duplicate_sets = set;
} else {
@@ -192,7 +200,8 @@ bool BaseMedia<Tbase_set>::AddFile(const char *filename, size_t basepath_length,
* version number until a new game is started which isn't a big problem */
if (BaseMedia<Tbase_set>::used_set == duplicate) BaseMedia<Tbase_set>::used_set = set;
DEBUG(grf, 1, "Removing %s (%i) as base " SET_TYPE " set (duplicate)", duplicate->name, duplicate->version);
DEBUG(grf, 1, "Removing %s (%i) as base " SET_TYPE " set (duplicate, %s)", duplicate->name, duplicate->version,
duplicate->valid_files < set->valid_files ? "less valid files" : "lower version");
duplicate->next = BaseMedia<Tbase_set>::duplicate_sets;
BaseMedia<Tbase_set>::duplicate_sets = duplicate;
ret = true;
@@ -260,7 +269,7 @@ template <class Tbase_set>
if (missing == 0) {
p += seprintf(p, last, " (%i corrupt file%s)\n", invalid, invalid == 1 ? "" : "s");
} else {
p += seprintf(p, last, " (unuseable: %i missing file%s)\n", missing, missing == 1 ? "" : "s");
p += seprintf(p, last, " (unusable: %i missing file%s)\n", missing, missing == 1 ? "" : "s");
}
} else {
p += seprintf(p, last, "\n");
@@ -274,19 +283,13 @@ template <class Tbase_set>
#if defined(ENABLE_NETWORK)
#include "network/network_content.h"
/**
* Check whether there's a base set matching some information.
* @param ci The content info to compare it to.
* @param md5sum Should the MD5 checksum be tested as well?
* @param s The list with sets.
*/
template <class Tbase_set> bool HasBaseSet(const ContentInfo *ci, bool md5sum, const Tbase_set *s)
template <class Tbase_set> const char *TryGetBaseSetFile(const ContentInfo *ci, bool md5sum, const Tbase_set *s)
{
for (; s != NULL; s = s->next) {
if (s->GetNumMissing() != 0) continue;
if (s->shortname != ci->unique_id) continue;
if (!md5sum) return true;
if (!md5sum) return s->files[0].filename;
byte md5[16];
memset(md5, 0, sizeof(md5));
@@ -295,21 +298,26 @@ template <class Tbase_set> bool HasBaseSet(const ContentInfo *ci, bool md5sum, c
md5[j] ^= s->files[i].hash[j];
}
}
if (memcmp(md5, ci->md5sum, sizeof(md5)) == 0) return true;
if (memcmp(md5, ci->md5sum, sizeof(md5)) == 0) return s->files[0].filename;
}
return false;
return NULL;
}
template <class Tbase_set>
/* static */ bool BaseMedia<Tbase_set>::HasSet(const ContentInfo *ci, bool md5sum)
{
return HasBaseSet(ci, md5sum, BaseMedia<Tbase_set>::available_sets) ||
HasBaseSet(ci, md5sum, BaseMedia<Tbase_set>::duplicate_sets);
return (TryGetBaseSetFile(ci, md5sum, BaseMedia<Tbase_set>::available_sets) != NULL) ||
(TryGetBaseSetFile(ci, md5sum, BaseMedia<Tbase_set>::duplicate_sets) != NULL);
}
#else
template <class Tbase_set>
const char *TryGetBaseSetFile(const ContentInfo *ci, bool md5sum, const Tbase_set *s)
{
return NULL;
}
template <class Tbase_set>
/* static */ bool BaseMedia<Tbase_set>::HasSet(const ContentInfo *ci, bool md5sum)
{
@@ -374,6 +382,16 @@ template <class Tbase_set>
return BaseMedia<Tbase_set>::used_set;
}
/**
* Return the available sets.
* @return The available sets.
*/
template <class Tbase_set>
/* static */ Tbase_set *BaseMedia<Tbase_set>::GetAvailableSets()
{
return BaseMedia<Tbase_set>::available_sets;
}
/**
* Force instantiation of methods so we don't get linker errors.
* @param repl_type the type of the BaseMedia to instantiate
@@ -390,5 +408,7 @@ template <class Tbase_set>
template int repl_type::GetIndexOfUsedSet(); \
template const set_type *repl_type::GetSet(int index); \
template const set_type *repl_type::GetUsedSet(); \
template bool repl_type::DetermineBestSet();
template bool repl_type::DetermineBestSet(); \
template set_type *repl_type::GetAvailableSets(); \
template const char *TryGetBaseSetFile(const ContentInfo *ci, bool md5sum, const set_type *s);

View File

@@ -71,6 +71,7 @@ struct BaseStation : StationPool::PoolItem<&_station_pool> {
uint16 random_bits; ///< Random bits assigned to this station
byte waiting_triggers; ///< Waiting triggers (NewGRF) for this station
uint8 cached_anim_triggers; ///< NOSAVE: Combined animation trigger bitmask, used to determine if trigger processing should happen.
uint32 cached_cargo_triggers; ///< NOSAVE: Combined cargo trigger bitmask
TileArea train_station; ///< Tile area the train 'station' part covers
StationRect rect; ///< NOSAVE: Station spread out rectangle maintained by StationRect::xxx() functions

View File

@@ -31,13 +31,13 @@ inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel
src_n = (const uint16 *)((const byte *)src_n + *(const uint32 *)src_n);
}
uint32 *dst = (uint32 *)bp->dst + bp->top * bp->pitch + bp->left;
Colour *dst = (Colour *)bp->dst + bp->top * bp->pitch + bp->left;
uint16 *anim = this->anim_buf + ((uint32 *)bp->dst - (uint32 *)_screen.dst_ptr) + bp->top * this->anim_buf_width + bp->left;
const byte *remap = bp->remap; // store so we don't have to access it via bp everytime
for (int y = 0; y < bp->height; y++) {
uint32 *dst_ln = dst + bp->pitch;
Colour *dst_ln = dst + bp->pitch;
uint16 *anim_ln = anim + this->anim_buf_width;
const Colour *src_px_ln = (const Colour *)((const byte *)src_px + *(const uint32 *)src_px);
@@ -46,7 +46,7 @@ inline void Blitter_32bppAnim::Draw(const Blitter::BlitterParams *bp, ZoomLevel
const uint16 *src_n_ln = (const uint16 *)((const byte *)src_n + *(const uint32 *)src_n);
src_n += 2;
uint32 *dst_end = dst + bp->skip_left;
Colour *dst_end = dst + bp->skip_left;
uint n;
@@ -219,7 +219,7 @@ void Blitter_32bppAnim::DrawColourMappingRect(void *dst, int width, int height,
return;
}
uint32 *udst = (uint32 *)dst;
Colour *udst = (Colour *)dst;
uint16 *anim;
anim = this->anim_buf + ((uint32 *)dst - (uint32 *)_screen.dst_ptr);
@@ -256,7 +256,7 @@ void Blitter_32bppAnim::DrawColourMappingRect(void *dst, int width, int height,
void Blitter_32bppAnim::SetPixel(void *video, int x, int y, uint8 colour)
{
*((uint32 *)video + x + y * _screen.pitch) = LookupColourInPalette(colour);
*((Colour *)video + x + y * _screen.pitch) = LookupColourInPalette(colour);
/* Set the colour in the anim-buffer too, if we are rendering to the screen */
if (_screen_disable_anim) return;
@@ -271,13 +271,13 @@ void Blitter_32bppAnim::DrawRect(void *video, int width, int height, uint8 colou
return;
}
uint32 colour32 = LookupColourInPalette(colour);
Colour colour32 = LookupColourInPalette(colour);
uint16 *anim_line;
anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
do {
uint32 *dst = (uint32 *)video;
Colour *dst = (Colour *)video;
uint16 *anim = anim_line;
for (int i = width; i > 0; i--) {
@@ -296,13 +296,13 @@ void Blitter_32bppAnim::CopyFromBuffer(void *video, const void *src, int width,
{
assert(!_screen_disable_anim);
assert(video >= _screen.dst_ptr && video <= (uint32 *)_screen.dst_ptr + _screen.width + _screen.height * _screen.pitch);
uint32 *dst = (uint32 *)video;
Colour *dst = (Colour *)video;
const uint32 *usrc = (const uint32 *)src;
uint16 *anim_line = ((uint32 *)video - (uint32 *)_screen.dst_ptr) + this->anim_buf;
for (; height > 0; height--) {
/* We need to keep those for palette animation. */
uint32 *dst_pal = dst;
Colour *dst_pal = dst;
uint16 *anim_pal = anim_line;
memcpy(dst, usrc, width * sizeof(uint32));
@@ -422,7 +422,7 @@ void Blitter_32bppAnim::PaletteAnimate(const Palette &palette)
assert(this->palette.first_dirty == PALETTE_ANIM_START || this->palette.first_dirty == 0);
const uint16 *anim = this->anim_buf;
uint32 *dst = (uint32 *)_screen.dst_ptr;
Colour *dst = (Colour *)_screen.dst_ptr;
/* Let's walk the anim buffer and try to find the pixels */
for (int y = this->anim_buf_height; y != 0 ; y--) {

View File

@@ -47,9 +47,9 @@ public:
/**
* Look up the colour in the current palette.
*/
inline uint32 LookupColourInPalette(uint index)
inline Colour LookupColourInPalette(uint index)
{
return this->palette.palette[index].data;
return this->palette.palette[index];
}
template <BlitterMode mode> void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);

View File

@@ -19,15 +19,15 @@ void *Blitter_32bppBase::MoveTo(void *video, int x, int y)
void Blitter_32bppBase::SetPixel(void *video, int x, int y, uint8 colour)
{
*((uint32 *)video + x + y * _screen.pitch) = LookupColourInPalette(colour);
*((Colour *)video + x + y * _screen.pitch) = LookupColourInPalette(colour);
}
void Blitter_32bppBase::DrawRect(void *video, int width, int height, uint8 colour)
{
uint32 colour32 = LookupColourInPalette(colour);
Colour colour32 = LookupColourInPalette(colour);
do {
uint32 *dst = (uint32 *)video;
Colour *dst = (Colour *)video;
for (int i = width; i > 0; i--) {
*dst = colour32;
dst++;
@@ -107,7 +107,7 @@ void Blitter_32bppBase::ScrollBuffer(void *video, int &left, int &top, int &widt
dst = (uint32 *)video + left + top * _screen.pitch;
src = dst - scroll_y * _screen.pitch;
/* Decrese height. (scroll_y is <=0). */
/* Decrease height. (scroll_y is <=0). */
height += scroll_y;
assert(height > 0);

View File

@@ -33,33 +33,25 @@ public:
/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
/* virtual */ int GetBytesPerPixel() { return 4; }
/**
* Compose a colour based on RGB values.
*/
static inline uint32 ComposeColour(uint a, uint r, uint g, uint b)
{
return (((a) << 24) & 0xFF000000) | (((r) << 16) & 0x00FF0000) | (((g) << 8) & 0x0000FF00) | ((b) & 0x000000FF);
}
/**
* Look up the colour in the current palette.
*/
static inline uint32 LookupColourInPalette(uint index)
static inline Colour LookupColourInPalette(uint index)
{
return _cur_palette.palette[index].data;
return _cur_palette.palette[index];
}
/**
* Compose a colour based on RGBA values and the current pixel value.
*/
static inline uint32 ComposeColourRGBANoCheck(uint r, uint g, uint b, uint a, uint32 current)
static inline Colour ComposeColourRGBANoCheck(uint r, uint g, uint b, uint a, Colour current)
{
uint cr = GB(current, 16, 8);
uint cg = GB(current, 8, 8);
uint cb = GB(current, 0, 8);
uint cr = current.r;
uint cg = current.g;
uint cb = current.b;
/* The 256 is wrong, it should be 255, but 256 is much faster... */
return ComposeColour(0xFF,
return Colour(
((int)(r - cr) * a) / 256 + cr,
((int)(g - cg) * a) / 256 + cg,
((int)(b - cb) * a) / 256 + cb);
@@ -69,10 +61,10 @@ public:
* Compose a colour based on RGBA values and the current pixel value.
* Handles fully transparent and solid pixels in a special (faster) way.
*/
static inline uint32 ComposeColourRGBA(uint r, uint g, uint b, uint a, uint32 current)
static inline Colour ComposeColourRGBA(uint r, uint g, uint b, uint a, Colour current)
{
if (a == 0) return current;
if (a >= 255) return ComposeColour(0xFF, r, g, b);
if (a >= 255) return Colour(r, g, b);
return ComposeColourRGBANoCheck(r, g, b, a, current);
}
@@ -80,11 +72,11 @@ public:
/**
* Compose a colour based on Pixel value, alpha value, and the current pixel value.
*/
static inline uint32 ComposeColourPANoCheck(uint32 colour, uint a, uint32 current)
static inline Colour ComposeColourPANoCheck(Colour colour, uint a, Colour current)
{
uint r = GB(colour, 16, 8);
uint g = GB(colour, 8, 8);
uint b = GB(colour, 0, 8);
uint r = colour.r;
uint g = colour.g;
uint b = colour.b;
return ComposeColourRGBANoCheck(r, g, b, a, current);
}
@@ -93,10 +85,13 @@ public:
* Compose a colour based on Pixel value, alpha value, and the current pixel value.
* Handles fully transparent and solid pixels in a special (faster) way.
*/
static inline uint32 ComposeColourPA(uint32 colour, uint a, uint32 current)
static inline Colour ComposeColourPA(Colour colour, uint a, Colour current)
{
if (a == 0) return current;
if (a >= 255) return (colour | 0xFF000000);
if (a >= 255) {
colour.a = 255;
return colour;
}
return ComposeColourPANoCheck(colour, a, current);
}
@@ -108,13 +103,13 @@ public:
* @param denom denominator, makes colour darker.
* @return the new colour for the screen.
*/
static inline uint32 MakeTransparent(uint32 colour, uint nom, uint denom = 256)
static inline Colour MakeTransparent(Colour colour, uint nom, uint denom = 256)
{
uint r = GB(colour, 16, 8);
uint g = GB(colour, 8, 8);
uint b = GB(colour, 0, 8);
uint r = colour.r;
uint g = colour.g;
uint b = colour.b;
return ComposeColour(0xFF, r * nom / denom, g * nom / denom, b * nom / denom);
return Colour(r * nom / denom, g * nom / denom, b * nom / denom);
}
/**
@@ -122,45 +117,46 @@ public:
* @param colour the colour to make grey.
* @return the new colour, now grey.
*/
static inline uint32 MakeGrey(uint32 colour)
static inline Colour MakeGrey(Colour colour)
{
uint r = GB(colour, 16, 8);
uint g = GB(colour, 8, 8);
uint b = GB(colour, 0, 8);
uint r = colour.r;
uint g = colour.g;
uint b = colour.b;
/* To avoid doubles and stuff, multiple it with a total of 65536 (16bits), then
* divide by it to normalize the value to a byte again. See heightmap.cpp for
* information about the formula. */
colour = ((r * 19595) + (g * 38470) + (b * 7471)) / 65536;
uint grey = ((r * 19595) + (g * 38470) + (b * 7471)) / 65536;
return ComposeColour(0xFF, colour, colour, colour);
return Colour(grey, grey, grey);
}
static const int DEFAULT_BRIGHTNESS = 64;
static const int DEFAULT_BRIGHTNESS = 128;
static inline uint32 AdjustBrightness(uint32 colour, uint8 brightness)
static inline Colour AdjustBrightness(Colour colour, uint8 brightness)
{
/* Shortcut for normal brightness */
if (brightness == DEFAULT_BRIGHTNESS) return colour;
uint16 ob = 0;
uint16 r = GB(colour, 16, 8) * brightness / DEFAULT_BRIGHTNESS;
uint16 g = GB(colour, 8, 8) * brightness / DEFAULT_BRIGHTNESS;
uint16 b = GB(colour, 0, 8) * brightness / DEFAULT_BRIGHTNESS;
uint16 r = colour.r * brightness / DEFAULT_BRIGHTNESS;
uint16 g = colour.g * brightness / DEFAULT_BRIGHTNESS;
uint16 b = colour.b * brightness / DEFAULT_BRIGHTNESS;
/* Sum overbright */
if (r > 255) ob += r - 255;
if (g > 255) ob += g - 255;
if (b > 255) ob += b - 255;
if (ob == 0) return ComposeColour(GB(colour, 24, 8), r, g, b);
if (ob == 0) return Colour(r, g, b, colour.a);
/* Reduce overbright strength */
ob /= 2;
return ComposeColour(GB(colour, 24, 8),
return Colour(
r >= 255 ? 255 : min(r + ob * (255 - r) / 256, 255),
g >= 255 ? 255 : min(g + ob * (255 - g) / 256, 255),
b >= 255 ? 255 : min(b + ob * (255 - b) / 256, 255));
b >= 255 ? 255 : min(b + ob * (255 - b) / 256, 255),
colour.a);
}
};

View File

@@ -44,14 +44,14 @@ inline void Blitter_32bppOptimized::Draw(const Blitter::BlitterParams *bp, ZoomL
}
/* skip lines in dst */
uint32 *dst = (uint32 *)bp->dst + bp->top * bp->pitch + bp->left;
Colour *dst = (Colour *)bp->dst + bp->top * bp->pitch + bp->left;
/* store so we don't have to access it via bp everytime (compiler assumes pointer aliasing) */
const byte *remap = bp->remap;
for (int y = 0; y < bp->height; y++) {
/* next dst line begins here */
uint32 *dst_ln = dst + bp->pitch;
Colour *dst_ln = dst + bp->pitch;
/* next src line begins here */
const Colour *src_px_ln = (const Colour *)((const byte *)src_px + *(const uint32 *)src_px);
@@ -62,7 +62,7 @@ inline void Blitter_32bppOptimized::Draw(const Blitter::BlitterParams *bp, ZoomL
src_n += 2;
/* we will end this line when we reach this point */
uint32 *dst_end = dst + bp->skip_left;
Colour *dst_end = dst + bp->skip_left;
/* number of pixels with the same aplha channel class */
uint n;
@@ -215,7 +215,7 @@ Sprite *Blitter_32bppOptimized::Encode(SpriteLoader::Sprite *sprite, AllocatorPr
Colour *dst_px_orig[ZOOM_LVL_COUNT];
/* interleaved stream of 'm' channel and 'n' channel
* 'n' is number if following pixels with the same alpha channel class
* 'n' is number of following pixels with the same alpha channel class
* there are 3 classes: 0, 255, others
*
* it has to be stored in one stream so fewer registers are used -
@@ -286,10 +286,10 @@ Sprite *Blitter_32bppOptimized::Encode(SpriteLoader::Sprite *sprite, AllocatorPr
*dst_n |= rgb_max << 8;
/* Pre-convert the mapping channel to a RGB value */
uint32 colour = this->AdjustBrightness(this->LookupColourInPalette(src->m), rgb_max);
dst_px->r = GB(colour, 16, 8);
dst_px->g = GB(colour, 8, 8);
dst_px->b = GB(colour, 0, 8);
Colour colour = this->AdjustBrightness(this->LookupColourInPalette(src->m), rgb_max);
dst_px->r = colour.r;
dst_px->g = colour.g;
dst_px->b = colour.b;
} else {
dst_px->r = src->r;
dst_px->g = src->g;

View File

@@ -21,11 +21,11 @@ static FBlitter_32bppSimple iFBlitter_32bppSimple;
void Blitter_32bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom)
{
const Blitter_32bppSimple::Pixel *src, *src_line;
uint32 *dst, *dst_line;
Colour *dst, *dst_line;
/* Find where to start reading in the source sprite */
src_line = (const Blitter_32bppSimple::Pixel *)bp->sprite + (bp->skip_top * bp->sprite_width + bp->skip_left) * ScaleByZoom(1, zoom);
dst_line = (uint32 *)bp->dst + bp->top * bp->pitch + bp->left;
dst_line = (Colour *)bp->dst + bp->top * bp->pitch + bp->left;
for (int y = 0; y < bp->height; y++) {
dst = dst_line;
@@ -66,7 +66,7 @@ void Blitter_32bppSimple::Draw(Blitter::BlitterParams *bp, BlitterMode mode, Zoo
void Blitter_32bppSimple::DrawColourMappingRect(void *dst, int width, int height, PaletteID pal)
{
uint32 *udst = (uint32 *)dst;
Colour *udst = (Colour *)dst;
if (pal == PALETTE_TO_TRANSPARENT) {
do {
@@ -122,10 +122,10 @@ Sprite *Blitter_32bppSimple::Encode(SpriteLoader::Sprite *sprite, AllocatorProc
dst[i].v = rgb_max;
/* Pre-convert the mapping channel to a RGB value */
uint colour = this->AdjustBrightness(this->LookupColourInPalette(src->m), dst[i].v);
dst[i].r = GB(colour, 16, 8);
dst[i].g = GB(colour, 8, 8);
dst[i].b = GB(colour, 0, 8);
Colour colour = this->AdjustBrightness(this->LookupColourInPalette(src->m), dst[i].v);
dst[i].r = colour.r;
dst[i].g = colour.g;
dst[i].b = colour.b;
dst[i].a = src->a;
dst[i].m = src->m;
}

View File

@@ -112,7 +112,7 @@ void Blitter_8bppBase::ScrollBuffer(void *video, int &left, int &top, int &width
dst = (uint8 *)video + left + top * _screen.pitch;
src = dst - scroll_y * _screen.pitch;
/* Decrese height. (scroll_y is <=0). */
/* Decrease height. (scroll_y is <=0). */
height += scroll_y;
assert(height > 0);

View File

@@ -123,7 +123,7 @@ public:
/**
* Copy from a buffer to the screen.
* @param video The destionation pointer (video-buffer).
* @param video The destination pointer (video-buffer).
* @param src The buffer from which the data will be read.
* @param width The width of the buffer.
* @param height The height of the buffer.

View File

@@ -37,7 +37,7 @@ public:
/* virtual */ int GetBytesPerPixel() { return 0; }
};
/** Factory for the blitter that doesn nothing. */
/** Factory for the blitter that does nothing. */
class FBlitter_Null: public BlitterFactory<FBlitter_Null> {
public:
/* virtual */ const char *GetName() { return "null"; }

View File

@@ -118,7 +118,7 @@ static const NWidgetPart _bootstrap_query_widgets[] = {
static const WindowDesc _bootstrap_query_desc(
WDP_CENTER, 0, 0,
WC_CONFIRM_POPUP_QUERY, WC_NONE,
WDF_UNCLICK_BUTTONS,
0,
_bootstrap_query_widgets, lengthof(_bootstrap_query_widgets)
);
@@ -205,7 +205,7 @@ public:
#endif /* defined(ENABLE_NETWORK) && defined(WITH_FREETYPE) */
/**
* Handle all procedures for bootstrapping OpenTTD without a base grapics set.
* Handle all procedures for bootstrapping OpenTTD without a base graphics set.
* This requires all kinds of trickery that is needed to avoid the use of
* sprites from the base graphics set which are pretty interwoven.
* @return True if a base set exists, otherwise false.
@@ -218,7 +218,7 @@ bool HandleBootstrap()
if (BlitterFactoryBase::GetCurrentBlitter()->GetScreenDepth() == 0) goto failure;
/* If there is no network or no freetype, then there is nothing we can do. Go straight to failure. */
#if defined(ENABLE_NETWORK) && defined(WITH_FREETYPE) && !defined(__APPLE__)
#if defined(ENABLE_NETWORK) && defined(WITH_FREETYPE) && !defined(__APPLE__) && (defined(WITH_FONTCONFIG) || defined(WIN32))
if (!_network_available) goto failure;
/* First tell the game we're bootstrapping. */

View File

@@ -59,7 +59,7 @@ typedef GUIList<BuildBridgeData> GUIBridgeList; ///< List of bridges, used in #B
void CcBuildBridge(const CommandCost &result, TileIndex end_tile, uint32 p1, uint32 p2)
{
if (result.Failed()) return;
SndPlayTileFx(SND_27_BLACKSMITH_ANVIL, end_tile);
if (_settings_client.sound.confirm) SndPlayTileFx(SND_27_BLACKSMITH_ANVIL, end_tile);
TransportType transport_type = Extract<TransportType, 15, 2>(p2);
@@ -381,7 +381,7 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transpo
/* The bridge length without ramps. */
const uint bridge_len = GetTunnelBridgeLength(start, end);
/* If Ctrl is being pressed, check wether the last bridge built is available
/* If Ctrl is being pressed, check whether the last bridge built is available
* If so, return this bridge type. Otherwise continue normally.
* We store bridge types for each transport type, so we have to check for
* the transport type beforehand.

View File

@@ -41,7 +41,7 @@ static inline bool IsBridgeTile(TileIndex t)
* checks for the possibility that a bridge may be on this tile
* These are in fact all the tile types on which a bridge can be found
* @param t The tile to analyze
* @return true if a bridge migh be present
* @return true if a bridge might be present
*/
static inline bool MayHaveBridgeAbove(TileIndex t)
{
@@ -161,15 +161,17 @@ static inline void MakeBridgeRamp(TileIndex t, Owner o, BridgeType bridgetype, D
* Make a bridge ramp for roads.
* @param t the tile to make a bridge ramp
* @param o the new owner of the bridge ramp
* @param owner_road the new owner of the road on the bridge
* @param owner_tram the new owner of the tram on the bridge
* @param bridgetype the type of bridge this bridge ramp belongs to
* @param d the direction this ramp must be facing
* @param r the road type of the bridge
*/
static inline void MakeRoadBridgeRamp(TileIndex t, Owner o, BridgeType bridgetype, DiagDirection d, RoadTypes r)
static inline void MakeRoadBridgeRamp(TileIndex t, Owner o, Owner owner_road, Owner owner_tram, BridgeType bridgetype, DiagDirection d, RoadTypes r)
{
MakeBridgeRamp(t, o, bridgetype, d, TRANSPORT_ROAD, 0);
SetRoadOwner(t, ROADTYPE_ROAD, o);
if (o != OWNER_TOWN) SetRoadOwner(t, ROADTYPE_TRAM, o);
SetRoadOwner(t, ROADTYPE_ROAD, owner_road);
if (owner_tram != OWNER_TOWN) SetRoadOwner(t, ROADTYPE_TRAM, owner_tram);
SetRoadTypes(t, r);
}

View File

@@ -30,6 +30,7 @@
#include "engine_gui.h"
#include "cargotype.h"
#include "core/geometry_func.hpp"
#include "autoreplace_func.h"
#include "widgets/build_vehicle_widget.h"
@@ -42,7 +43,7 @@
*/
uint GetEngineListHeight(VehicleType type)
{
return max<uint>(FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM, GetVehicleHeight(type));
return max<uint>(FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM, GetVehicleImageCellSize(type, EIT_PURCHASE).height);
}
static const NWidgetPart _nested_build_vehicle_widgets[] = {
@@ -98,7 +99,7 @@ static CargoID _last_filter_criteria[] = {CF_ANY, CF_ANY, CF_ANY, CF_ANY};
*/
static int CDECL EngineNumberSorter(const EngineID *a, const EngineID *b)
{
int r = ListPositionOfEngine(*a) - ListPositionOfEngine(*b);
int r = Engine::Get(*a)->list_position - Engine::Get(*b)->list_position;
return _internal_sort_order ? -r : r;
}
@@ -271,7 +272,7 @@ static int CDECL EnginePowerVsRunningCostSorter(const EngineID *a, const EngineI
* we will actually calculate cunning cost/power (to make it more than 1).
* Because of this, the return value have to be reversed as well and we return b - a instead of a - b.
* Another thing is that both power and running costs should be doubled for multiheaded engines.
* Since it would be multipling with 2 in both numerator and denumerator, it will even themselves out and we skip checking for multiheaded. */
* Since it would be multiplying with 2 in both numerator and denominator, it will even themselves out and we skip checking for multiheaded. */
Money va = (e_a->GetRunningCost()) / max(1U, (uint)e_a->GetPower());
Money vb = (e_b->GetRunningCost()) / max(1U, (uint)e_b->GetPower());
int r = ClampToI32(vb - va);
@@ -515,7 +516,7 @@ static const StringID _sort_listing[][12] = {{
static bool CDECL CargoFilter(const EngineID *eid, const CargoID cid)
{
if (cid == CF_ANY) return true;
uint32 refit_mask = GetUnionOfArticulatedRefitMasks(*eid, true);
uint32 refit_mask = GetUnionOfArticulatedRefitMasks(*eid, true) & _standard_cargo_mask;
return (cid == CF_NONE ? refit_mask == 0 : HasBit(refit_mask, cid));
}
@@ -870,26 +871,37 @@ int DrawVehiclePurchaseInfo(int left, int right, int y, EngineID engine_number)
*/
void DrawEngineList(VehicleType type, int l, int r, int y, const GUIEngineList *eng_list, uint16 min, uint16 max, EngineID selected_id, bool show_count, GroupID selected_group)
{
static const int sprite_widths[] = { 60, 60, 76, 67 };
static const int sprite_y_offsets[] = { -1, -1, -2, -2 };
/* Obligatory sanity checks! */
assert((uint)type < lengthof(sprite_widths));
assert_compile(lengthof(sprite_y_offsets) == lengthof(sprite_widths));
assert(max <= eng_list->Length());
bool rtl = _current_text_dir == TD_RTL;
int step_size = GetEngineListHeight(type);
int sprite_width = sprite_widths[type];
int sprite_left = GetVehicleImageCellSize(type, EIT_PURCHASE).extend_left;
int sprite_right = GetVehicleImageCellSize(type, EIT_PURCHASE).extend_right;
int sprite_width = sprite_left + sprite_right;
int sprite_x = (rtl ? r - sprite_width / 2 : l + sprite_width / 2) - 1;
int sprite_x = rtl ? r - sprite_right - 1 : l + sprite_left + 1;
int sprite_y_offset = sprite_y_offsets[type] + step_size / 2;
int text_left = l + (rtl ? WD_FRAMERECT_LEFT : sprite_width);
int text_right = r - (rtl ? sprite_width : WD_FRAMERECT_RIGHT);
Dimension replace_icon = {0, 0};
int count_width = 0;
if (show_count) {
replace_icon = GetSpriteSize(SPR_GROUP_REPLACE_ACTIVE);
SetDParamMaxDigits(0, 3);
count_width = GetStringBoundingBox(STR_TINY_BLACK_COMA).width;
}
int text_left = l + (rtl ? WD_FRAMERECT_LEFT + replace_icon.width + 8 + count_width : sprite_width + WD_FRAMETEXT_LEFT);
int text_right = r - (rtl ? sprite_width + WD_FRAMETEXT_RIGHT : WD_FRAMERECT_RIGHT + replace_icon.width + 8 + count_width);
int replace_icon_left = rtl ? l + WD_FRAMERECT_LEFT : r - WD_FRAMERECT_RIGHT - replace_icon.width;
int count_left = l;
int count_right = rtl ? text_left : r - WD_FRAMERECT_RIGHT - replace_icon.width - 8;
int normal_text_y_offset = (step_size - FONT_HEIGHT_NORMAL) / 2;
int small_text_y_offset = step_size - FONT_HEIGHT_SMALL - WD_FRAMERECT_BOTTOM - 1;
int replace_icon_y_offset = (step_size - replace_icon.height) / 2 - 1;
for (; min < max; min++, y += step_size) {
const EngineID engine = (*eng_list)[min];
@@ -897,11 +909,12 @@ void DrawEngineList(VehicleType type, int l, int r, int y, const GUIEngineList *
const uint num_engines = GetGroupNumEngines(_local_company, selected_group, engine);
SetDParam(0, engine);
DrawString(text_left, text_right, y + normal_text_y_offset, STR_ENGINE_NAME, engine == selected_id ? TC_WHITE : TC_BLACK);
DrawString(text_left, text_right, y + normal_text_y_offset, STR_ENGINE_NAME, engine == selected_id ? TC_WHITE : TC_BLACK, SA_STRIP | (rtl ? SA_RIGHT : SA_LEFT));
DrawVehicleEngine(l, r, sprite_x, y + sprite_y_offset, engine, (show_count && num_engines == 0) ? PALETTE_CRASH : GetEnginePalette(engine, _local_company), EIT_PURCHASE);
if (show_count) {
SetDParam(0, num_engines);
DrawString(text_left, text_right, y + small_text_y_offset, STR_TINY_BLACK_COMA, TC_FROMSTRING, SA_RIGHT);
DrawString(count_left, count_right, y + small_text_y_offset, STR_TINY_BLACK_COMA, TC_FROMSTRING, SA_RIGHT | SA_FORCE);
if (EngineHasReplacementForCompany(Company::Get(_local_company), engine, selected_group)) DrawSprite(SPR_GROUP_REPLACE_ACTIVE, num_engines == 0 ? PALETTE_CRASH : PAL_NONE, replace_icon_left, y + replace_icon_y_offset);
}
}
}
@@ -954,7 +967,7 @@ struct BuildVehicleWindow : Window {
this->vscroll = this->GetScrollbar(WID_BV_SCROLLBAR);
/* If we are just viewing the list of vehicles, we do not need the Build button.
* So we just hide it, and enlarge the Rename buton by the now vacant place. */
* So we just hide it, and enlarge the Rename button by the now vacant place. */
if (this->listview_mode) this->GetWidget<NWidgetStacked>(WID_BV_BUILD_SEL)->SetDisplayedPlane(SZSP_NONE);
NWidgetCore *widget = this->GetWidget<NWidgetCore>(WID_BV_LIST);
@@ -1086,7 +1099,7 @@ struct BuildVehicleWindow : Window {
this->sel_engine = sel_id;
/* make engines first, and then wagons, sorted by ListPositionOfEngine() */
/* make engines first, and then wagons, sorted by selected sort_criteria */
_internal_sort_order = false;
EngList_Sort(&this->eng_list, TrainEnginesThenWagonsSorter);
@@ -1394,7 +1407,7 @@ struct BuildVehicleWindow : Window {
static const WindowDesc _build_vehicle_desc(
WDP_AUTO, 240, 268,
WC_BUILD_VEHICLE, WC_NONE,
WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION,
WDF_CONSTRUCTION,
_nested_build_vehicle_widgets, lengthof(_nested_build_vehicle_widgets)
);

157
src/cargomonitor.cpp Normal file
View File

@@ -0,0 +1,157 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file cargomonitor.cpp Implementation of the cargo transport monitoring. */
#include "stdafx.h"
#include "cargomonitor.h"
#include "station_base.h"
CargoMonitorMap _cargo_pickups; ///< Map of monitored pick-ups to the amount since last query/activation.
CargoMonitorMap _cargo_deliveries; ///< Map of monitored deliveries to the amount since last query/activation.
/**
* Helper method for ClearCargoPickupMonitoring and ClearCargoDeliveryMonitoring.
* Clears all monitors that belong to the specified company or all if INVALID_OWNER
* is specified as company.
* @param cargo_monitor_map reference to the cargo monitor map to operate on.
* @param company company to clear cargo monitors for or INVALID_OWNER if all cargo monitors should be cleared.
*/
static void ClearCargoMonitoring(CargoMonitorMap &cargo_monitor_map, CompanyID company = INVALID_OWNER)
{
if (company == INVALID_OWNER) {
cargo_monitor_map.clear();
return;
}
CargoMonitorMap::iterator next;
for (CargoMonitorMap::iterator it = cargo_monitor_map.begin(); it != cargo_monitor_map.end(); it = next) {
next = it;
next++;
if (DecodeMonitorCompany(it->first) == company) {
cargo_monitor_map.erase(it);
}
}
}
/**
* Clear all pick-up cargo monitors.
* @param company clear all pick-up monitors for this company or if INVALID_OWNER
* is passed, all pick-up monitors are cleared regardless of company.
*/
void ClearCargoPickupMonitoring(CompanyID company)
{
ClearCargoMonitoring(_cargo_pickups, company);
}
/**
* Clear all delivery cargo monitors.
* @param company clear all delivery monitors for this company or if INVALID_OWNER
* is passed, all delivery monitors are cleared regardless of company.
*/
void ClearCargoDeliveryMonitoring(CompanyID company)
{
ClearCargoMonitoring(_cargo_deliveries, company);
}
/**
* Get and reset the amount associated with a cargo monitor.
* @param[in,out] monitor_map Monitoring map to search (and reset for the queried entry).
* @param monitor Cargo monitor to query/reset.
* @param keep_monitoring After returning from this call, continue monitoring.
* @return Amount collected since last query/activation for the monitored combination.
*/
static uint32 GetAmount(CargoMonitorMap &monitor_map, CargoMonitorID monitor, bool keep_monitoring)
{
CargoMonitorMap::iterator iter = monitor_map.find(monitor);
if (iter == monitor_map.end()) {
if (keep_monitoring) {
std::pair<CargoMonitorID, uint32> p(monitor, 0);
monitor_map.insert(p);
}
return 0;
} else {
uint32 result = iter->second;
iter->second = 0;
if (!keep_monitoring) monitor_map.erase(iter);
return result;
}
}
/**
* Get the amount of cargo delivered for the given cargo monitor since activation or last query.
* @param monitor Cargo monitor to query.
* @param keep_monitoring After returning from this call, continue monitoring.
* @return Amount of delivered cargo for the monitored combination.
*/
uint32 GetDeliveryAmount(CargoMonitorID monitor, bool keep_monitoring)
{
return GetAmount(_cargo_deliveries, monitor, keep_monitoring);
}
/**
* Get the amount of cargo picked up for the given cargo monitor since activation or last query.
* @param monitor Monitoring number to query.
* @param keep_monitoring After returning from this call, continue monitoring.
* @return Amount of picked up cargo for the monitored combination.
* @note Cargo pick up is counted on final delivery, to prevent users getting credit for picking up cargo without delivering it.
*/
uint32 GetPickupAmount(CargoMonitorID monitor, bool keep_monitoring)
{
return GetAmount(_cargo_pickups, monitor, keep_monitoring);
}
/**
* Cargo was delivered to its final destination, update the pickup and delivery maps.
* @param cargo_type type of cargo.
* @param company company delivering the cargo.
* @param amount Amount of cargo delivered.
* @param src_type type of \a src.
* @param src index of source.
* @param st station where the cargo is delivered to.
*/
void AddCargoDelivery(CargoID cargo_type, CompanyID company, uint32 amount, SourceType src_type, SourceID src, const Station *st)
{
if (amount == 0) return;
if (src != INVALID_SOURCE) {
/* Handle pickup update. */
switch (src_type) {
case ST_INDUSTRY: {
CargoMonitorID num = EncodeCargoIndustryMonitor(company, cargo_type, src);
CargoMonitorMap::iterator iter = _cargo_pickups.find(num);
if (iter != _cargo_pickups.end()) iter->second += amount;
break;
}
case ST_TOWN: {
CargoMonitorID num = EncodeCargoTownMonitor(company, cargo_type, src);
CargoMonitorMap::iterator iter = _cargo_pickups.find(num);
if (iter != _cargo_pickups.end()) iter->second += amount;
break;
}
default: break;
}
}
/* Handle delivery.
* Note that delivery in the right area is sufficient to prevent trouble with neighbouring industries or houses. */
/* Town delivery. */
CargoMonitorID num = EncodeCargoTownMonitor(company, cargo_type, st->town->index);
CargoMonitorMap::iterator iter = _cargo_deliveries.find(num);
if (iter != _cargo_deliveries.end()) iter->second += amount;
/* Industry delivery. */
for (const Industry * const *ip = st->industries_near.Begin(); ip != st->industries_near.End(); ip++) {
CargoMonitorID num = EncodeCargoIndustryMonitor(company, cargo_type, (*ip)->index);
CargoMonitorMap::iterator iter = _cargo_deliveries.find(num);
if (iter != _cargo_deliveries.end()) iter->second += amount;
}
}

148
src/cargomonitor.h Normal file
View File

@@ -0,0 +1,148 @@
/* $Id$ */
/*
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file cargomonitor.h Cargo transport monitoring declarations. */
#ifndef CARGOMONITOR_H
#define CARGOMONITOR_H
#include "cargo_type.h"
#include "company_func.h"
#include "industry.h"
#include "town.h"
#include <map>
struct Station;
/**
* Unique number for a company / cargo type / (town or industry).
* Encoding is as follows:
* - bits 0-15 town or industry number
* - bit 16 is set if it is an industry number (else it is a town number).
* - bits 19-23 Cargo type.
* - bits 24-31 %Company number.
*/
typedef uint32 CargoMonitorID; ///< Type of the cargo monitor number.
/** Map type for storing and updating active cargo monitor numbers and their amounts. */
typedef std::map<CargoMonitorID, uint32> CargoMonitorMap;
extern CargoMonitorMap _cargo_pickups;
extern CargoMonitorMap _cargo_deliveries;
/** Constants for encoding and extracting cargo monitors. */
enum CargoCompanyBits {
CCB_TOWN_IND_NUMBER_START = 0, ///< Start bit of the town or industry number.
CCB_TOWN_IND_NUMBER_LENGTH = 16, ///< Number of bits of the town or industry number.
CCB_IS_INDUSTRY_BIT = 16, ///< Bit indicating the town/industry number is an industry.
CCB_IS_INDUSTRY_BIT_VALUE = 1ul << CCB_IS_INDUSTRY_BIT, ///< Value of the #CCB_IS_INDUSTRY_BIT bit.
CCB_CARGO_TYPE_START = 19, ///< Start bit of the cargo type field.
CCB_CARGO_TYPE_LENGTH = 5, ///< Number of bits of the cargo type field.
CCB_COMPANY_START = 24, ///< Start bit of the company field.
CCB_COMPANY_LENGTH = 8, ///< Number of bits of the company field.
};
/**
* Encode a cargo monitor for pickup or delivery at an industry.
* @param company Company performing the transport.
* @param ctype Cargo type being transported.
* @param ind %Industry providing or accepting the cargo.
* @return The encoded cargo/company/industry number.
*/
static inline CargoMonitorID EncodeCargoIndustryMonitor(CompanyID company, CargoID ctype, IndustryID ind)
{
assert(ctype < (1 << CCB_CARGO_TYPE_LENGTH));
uint32 ret = 0;
SB(ret, CCB_TOWN_IND_NUMBER_START, CCB_TOWN_IND_NUMBER_LENGTH, ind);
SetBit(ret, CCB_IS_INDUSTRY_BIT);
SB(ret, CCB_CARGO_TYPE_START, CCB_CARGO_TYPE_LENGTH, ctype);
SB(ret, CCB_COMPANY_START, CCB_COMPANY_LENGTH, company);
return ret;
}
/**
* Encode a cargo monitoring number for pickup or delivery at a town.
* @param company %Company performing the transport.
* @param ctype Cargo type being transported.
* @param town %Town providing or accepting the cargo.
* @return The encoded cargo/company/town number.
*/
static inline CargoMonitorID EncodeCargoTownMonitor(CompanyID company, CargoID ctype, TownID town)
{
assert(ctype < (1 << CCB_CARGO_TYPE_LENGTH));
uint32 ret = 0;
SB(ret, CCB_TOWN_IND_NUMBER_START, CCB_TOWN_IND_NUMBER_LENGTH, town);
SB(ret, CCB_CARGO_TYPE_START, CCB_CARGO_TYPE_LENGTH, ctype);
SB(ret, CCB_COMPANY_START, CCB_COMPANY_LENGTH, company);
return ret;
}
/**
* Extract the company from the cargo monitor.
* @param num Cargo monitoring number to decode.
* @return The extracted company id.
*/
static inline CompanyID DecodeMonitorCompany(CargoMonitorID num)
{
return static_cast<CompanyID>(GB(num, CCB_COMPANY_START, CCB_COMPANY_LENGTH));
}
/**
* Extract the cargo type from the cargo monitor.
* @param num Cargo monitoring number to decode.
* @return The extracted cargo type.
*/
static inline CargoID DecodeMonitorCargoType(CargoMonitorID num)
{
return GB(num, CCB_CARGO_TYPE_START, CCB_CARGO_TYPE_LENGTH);
}
/**
* Does the cargo number monitor an industry or a town?
* @param num Cargo monitoring number to decode.
* @return true if monitoring an industry, false if monitoring a town.
*/
static inline bool MonitorMonitorsIndustry(CargoMonitorID num)
{
return HasBit(num, CCB_IS_INDUSTRY_BIT);
}
/**
* Extract the industry number from the cargo monitor.
* @param num Cargo monitoring number to decode.
* @return The extracted industry id, or #INVALID_INDUSTRY if the number does not monitor an industry.
*/
static inline IndustryID DecodeMonitorIndustry(CargoMonitorID num)
{
if (!MonitorMonitorsIndustry(num)) return INVALID_INDUSTRY;
return GB(num, CCB_TOWN_IND_NUMBER_START, CCB_TOWN_IND_NUMBER_LENGTH);
}
/**
* Extract the town number from the cargo monitor.
* @param num Cargo monitoring number to decode.
* @return The extracted town id, or #INVALID_TOWN if the number does not monitor a town.
*/
static inline TownID DecodeMonitorTown(CargoMonitorID num)
{
if (MonitorMonitorsIndustry(num)) return INVALID_TOWN;
return GB(num, CCB_TOWN_IND_NUMBER_START, CCB_TOWN_IND_NUMBER_LENGTH);
}
void ClearCargoPickupMonitoring(CompanyID company = INVALID_OWNER);
void ClearCargoDeliveryMonitoring(CompanyID company = INVALID_OWNER);
uint32 GetDeliveryAmount(CargoMonitorID monitor, bool keep_monitoring);
uint32 GetPickupAmount(CargoMonitorID monitor, bool keep_monitoring);
void AddCargoDelivery(CargoID cargo_type, CompanyID company, uint32 amount, SourceType src_type, SourceID src, const Station *st);
#endif /* CARGOMONITOR_H */

View File

@@ -161,7 +161,7 @@ public:
/**
* Simple collection class for a list of cargo packets.
* @tparam Tinst Actual instantation of this cargo list.
* @tparam Tinst Actual instantiation of this cargo list.
*/
template <class Tinst>
class CargoList {

View File

@@ -23,11 +23,16 @@
CargoSpec CargoSpec::array[NUM_CARGO];
/**
* Bitmask of cargo types available.
* Bitmask of cargo types available. This includes phony cargoes like regearing cargoes.
* Initialized during a call to #SetupCargoForClimate.
*/
uint32 _cargo_mask;
/**
* Bitmask of real cargo types available. Phony cargoes like regearing cargoes are excluded.
*/
uint32 _standard_cargo_mask;
/**
* Set up the default cargo types for the given landscape type.
* @param l Landscape
@@ -176,10 +181,13 @@ void InitializeSortedCargoSpecs()
/* Sort cargo specifications by cargo class and name. */
QSortT(_sorted_cargo_specs, _sorted_cargo_specs_size, &CargoSpecClassSorter);
_standard_cargo_mask = 0;
_sorted_standard_cargo_specs_size = 0;
FOR_ALL_SORTED_CARGOSPECS(cargo) {
if (cargo->classes & CC_SPECIAL) break;
_sorted_standard_cargo_specs_size++;
SetBit(_standard_cargo_mask, cargo->Index());
}
}

View File

@@ -46,7 +46,7 @@ enum CargoClass {
CC_LIQUID = 1 << 6, ///< Liquids (Oil, Water, Rubber)
CC_REFRIGERATED = 1 << 7, ///< Refrigerated cargo (Food, Fruit)
CC_HAZARDOUS = 1 << 8, ///< Hazardous cargo (Nuclear Fuel, Explosives, etc.)
CC_COVERED = 1 << 9, ///< Covered/Sheltered Freight (Transporation in Box Vans, Silo Wagons, etc.)
CC_COVERED = 1 << 9, ///< Covered/Sheltered Freight (Transportation in Box Vans, Silo Wagons, etc.)
CC_SPECIAL = 1 << 15, ///< Special bit used for livery refit tricks instead of normal cargoes.
};
@@ -130,6 +130,7 @@ private:
};
extern uint32 _cargo_mask;
extern uint32 _standard_cargo_mask;
void SetupCargoForClimate(LandscapeID l);
CargoID GetCargoIDByLabel(CargoLabel cl);
@@ -157,8 +158,18 @@ static inline bool IsCargoInClass(CargoID c, CargoClass cc)
#define FOR_EACH_SET_CARGO_ID(var, cargo_bits) FOR_EACH_SET_BIT_EX(CargoID, var, uint, cargo_bits)
#define FOR_ALL_SORTED_CARGOSPECS(var) for (uint8 index = 0; var = _sorted_cargo_specs[index], index < _sorted_cargo_specs_size; index++)
/**
* Loop header for iterating over cargoes, sorted by name. This includes phony cargoes like regearing cargoes.
* @param var Reference getting the cargospec.
* @see CargoSpec
*/
#define FOR_ALL_SORTED_CARGOSPECS(var) for (uint8 index = 0; index < _sorted_cargo_specs_size && (var = _sorted_cargo_specs[index], true) ; index++)
#define FOR_ALL_SORTED_STANDARD_CARGOSPECS(var) for (uint8 index = 0; var = _sorted_cargo_specs[index], index < _sorted_standard_cargo_specs_size; index++)
/**
* Loop header for iterating over 'real' cargoes, sorted by name. Phony cargoes like regearing cargoes are skipped.
* @param var Reference getting the cargospec.
* @see CargoSpec
*/
#define FOR_ALL_SORTED_STANDARD_CARGOSPECS(var) for (uint8 index = 0; index < _sorted_standard_cargo_specs_size && (var = _sorted_cargo_specs[index], true); index++)
#endif /* CARGOTYPE_H */

View File

@@ -22,7 +22,7 @@
#include "strings_func.h"
#include "window_func.h"
#include "rail_gui.h"
#include "gui.h"
#include "settings_gui.h"
#include "company_gui.h"
#include "widgets/cheat_widget.h"
@@ -75,7 +75,7 @@ static int32 ClickChangeCompanyCheat(int32 p1, int32 p2)
* Allow (or disallow) changing production of all industries.
* @param p1 new value
* @param p2 unused
* @return New value allwing change of industry production.
* @return New value allowing change of industry production.
*/
static int32 ClickSetProdCheat(int32 p1, int32 p2)
{
@@ -184,9 +184,9 @@ struct CheatWindow : Window {
bool rtl = _current_text_dir == TD_RTL;
uint box_left = rtl ? r.right - 12 : r.left + 5;
uint button_left = rtl ? r.right - 40 : r.left + 20;
uint text_left = r.left + (rtl ? WD_FRAMERECT_LEFT: 50);
uint text_right = r.right - (rtl ? 50 : WD_FRAMERECT_RIGHT);
uint button_left = rtl ? r.right - 20 - SETTING_BUTTON_WIDTH : r.left + 20;
uint text_left = r.left + (rtl ? WD_FRAMERECT_LEFT : 30 + SETTING_BUTTON_WIDTH);
uint text_right = r.right - (rtl ? 30 + SETTING_BUTTON_WIDTH : WD_FRAMERECT_RIGHT);
for (int i = 0; i != lengthof(_cheats_ui); i++) {
const CheatEntry *ce = &_cheats_ui[i];
@@ -259,7 +259,7 @@ struct CheatWindow : Window {
/* Draw coloured flag for change company cheat */
case STR_CHEAT_CHANGE_COMPANY:
SetDParam(0, 15);
SetDParamMaxValue(0, MAX_COMPANIES);
width = max(width, GetStringBoundingBox(ce->str).width + 10 + 10);
break;
@@ -291,7 +291,7 @@ struct CheatWindow : Window {
int value = (int32)ReadValue(ce->variable, ce->type);
int oldvalue = value;
if (btn == CHT_CHANGE_DATE && x >= 40) {
if (btn == CHT_CHANGE_DATE && x >= 20 + SETTING_BUTTON_WIDTH) {
/* Click at the date text directly. */
SetDParam(0, value);
ShowQueryString(STR_JUST_INT, STR_CHEAT_CHANGE_DATE_QUERY_CAPT, 8, this, CS_NUMERAL, QSF_ACCEPT_UNCHANGED);
@@ -299,7 +299,7 @@ struct CheatWindow : Window {
}
/* Not clicking a button? */
if (!IsInsideMM(x, 20, 40)) return;
if (!IsInsideMM(x, 20, 20 + SETTING_BUTTON_WIDTH)) return;
*ce->been_used = true;
@@ -311,10 +311,10 @@ struct CheatWindow : Window {
default:
/* Take whatever the function returns */
value = ce->proc(value + ((x >= 30) ? 1 : -1), (x >= 30) ? 1 : -1);
value = ce->proc(value + ((x >= 20 + SETTING_BUTTON_WIDTH / 2) ? 1 : -1), (x >= 20 + SETTING_BUTTON_WIDTH / 2) ? 1 : -1);
/* The first cheat (money), doesn't return a different value. */
if (value != oldvalue || btn == CHT_MONEY) this->clicked = btn * 2 + 1 + ((x >= 30) != rtl ? 1 : 0);
if (value != oldvalue || btn == CHT_MONEY) this->clicked = btn * 2 + 1 + ((x >= 20 + SETTING_BUTTON_WIDTH / 2) != rtl ? 1 : 0);
break;
}
@@ -351,7 +351,7 @@ struct CheatWindow : Window {
static const WindowDesc _cheats_desc(
WDP_AUTO, 0, 0,
WC_CHEATS, WC_NONE,
WDF_UNCLICK_BUTTONS,
0,
_nested_cheat_widgets, lengthof(_nested_cheat_widgets)
);

View File

@@ -190,12 +190,12 @@ static void TileLoopClearAlps(TileIndex tile)
}
}
/* Update snow density. */
uint curent_density = GetClearDensity(tile);
uint current_density = GetClearDensity(tile);
uint req_density = (k < 0) ? 0u : min((uint)k, 3);
if (curent_density < req_density) {
if (current_density < req_density) {
AddClearDensity(tile, 1);
} else if (curent_density > req_density) {
} else if (current_density > req_density) {
AddClearDensity(tile, -1);
} else {
/* Density at the required level. */

View File

@@ -181,6 +181,8 @@ CommandProc CmdSetVehicleOnTime;
CommandProc CmdAutofillTimetable;
CommandProc CmdSetTimetableStart;
CommandProc CmdOpenCloseAirport;
#define DEF_CMD(proc, flags, type) {proc, #proc, (CommandFlags)flags, type}
/**
@@ -240,7 +242,7 @@ static const Command _command_proc_table[] = {
DEF_CMD(CmdChangeServiceInt, 0, CMDT_VEHICLE_MANAGEMENT ), // CMD_CHANGE_SERVICE_INT
DEF_CMD(CmdBuildIndustry, 0, CMDT_LANDSCAPE_CONSTRUCTION), // CMD_BUILD_INDUSTRY
DEF_CMD(CmdBuildIndustry, CMD_DEITY, CMDT_LANDSCAPE_CONSTRUCTION), // CMD_BUILD_INDUSTRY
DEF_CMD(CmdSetCompanyManagerFace, 0, CMDT_OTHER_MANAGEMENT ), // CMD_SET_COMPANY_MANAGER_FACE
DEF_CMD(CmdSetCompanyColour, 0, CMDT_OTHER_MANAGEMENT ), // CMD_SET_COMPANY_COLOUR
@@ -322,12 +324,14 @@ static const Command _command_proc_table[] = {
DEF_CMD(CmdSetVehicleOnTime, 0, CMDT_ROUTE_MANAGEMENT ), // CMD_SET_VEHICLE_ON_TIME
DEF_CMD(CmdAutofillTimetable, 0, CMDT_ROUTE_MANAGEMENT ), // CMD_AUTOFILL_TIMETABLE
DEF_CMD(CmdSetTimetableStart, 0, CMDT_ROUTE_MANAGEMENT ), // CMD_SET_TIMETABLE_START
DEF_CMD(CmdOpenCloseAirport, 0, CMDT_ROUTE_MANAGEMENT ), // CMD_OPEN_CLOSE_AIRPORT
};
/*!
* This function range-checks a cmd, and checks if the cmd is not NULL
*
* @param cmd The integervalue of a command
* @param cmd The integer value of a command
* @return true if the command is valid (and got a CommandProc function)
*/
bool IsValidCommand(uint32 cmd)

View File

@@ -91,6 +91,7 @@ CommandCallback CcGame;
/* group_gui.cpp */
CommandCallback CcCreateGroup;
CommandCallback CcAddVehicleNewGroup;
/* industry_gui.cpp */
CommandCallback CcBuildIndustry;

View File

@@ -277,7 +277,7 @@ enum Commands {
CMD_GIVE_MONEY, ///< give money to another company
CMD_CHANGE_SETTING, ///< change a setting
CMD_CHANGE_COMPANY_SETTING, ///< change a company etting
CMD_CHANGE_COMPANY_SETTING, ///< change a company setting
CMD_SET_AUTOREPLACE, ///< set an autoreplace entry
@@ -302,6 +302,8 @@ enum Commands {
CMD_AUTOFILL_TIMETABLE, ///< autofill the timetable
CMD_SET_TIMETABLE_START, ///< set the date that a timetable should start
CMD_OPEN_CLOSE_AIRPORT, ///< open/close an airport to incoming aircraft
CMD_END, ///< Must ALWAYS be on the end of this list!! (period)
};

View File

@@ -78,13 +78,14 @@ struct CompanyProperties {
Year inaugurated_year; ///< Year of starting the company.
byte quarters_of_bankruptcy; ///< Number of quarters (a quarter is 3 months) that the company has a negative balance.
byte months_of_bankruptcy; ///< Number of months that the company is unable to pay its debts
CompanyMask bankrupt_asked; ///< which companies were asked about buying it?
int16 bankrupt_timeout; ///< If bigger than \c 0, amount of time to wait for an answer on an offer to buy this company.
Money bankrupt_value;
uint32 terraform_limit; ///< Amount of tileheights we can (still) terraform (times 65536).
uint32 clear_limit; ///< Amount of tiles we can (still) clear (times 65536).
uint32 tree_limit; ///< Amount of trees we can (still) plant (times 65536).
/**
* If \c true, the company is (also) controlled by the computer (a NoAI program).

View File

@@ -59,6 +59,7 @@ Company::Company(uint16 name_1, bool is_ai)
this->is_ai = is_ai;
this->terraform_limit = _settings_game.construction.terraform_frame_burst << 16;
this->clear_limit = _settings_game.construction.clear_frame_burst << 16;
this->tree_limit = _settings_game.construction.tree_frame_burst << 16;
for (uint j = 0; j < 4; j++) this->share_owners[j] = COMPANY_SPECTATOR;
InvalidateWindowData(WC_PERFORMANCE_DETAIL, 0, INVALID_COMPANY);
@@ -260,6 +261,7 @@ void UpdateLandscapingLimits()
FOR_ALL_COMPANIES(c) {
c->terraform_limit = min(c->terraform_limit + _settings_game.construction.terraform_per_64k_frames, (uint32)_settings_game.construction.terraform_frame_burst << 16);
c->clear_limit = min(c->clear_limit + _settings_game.construction.clear_per_64k_frames, (uint32)_settings_game.construction.clear_frame_burst << 16);
c->tree_limit = min(c->tree_limit + _settings_game.construction.tree_per_64k_frames, (uint32)_settings_game.construction.tree_frame_burst << 16);
}
}
@@ -373,7 +375,7 @@ set_name:;
SetDParam(1, STR_NEWS_COMPANY_LAUNCH_DESCRIPTION);
SetDParamStr(2, cni->company_name);
SetDParam(3, t->index);
AddNewsItem(STR_MESSAGE_NEWS_FORMAT, NS_COMPANY_NEW, NR_TILE, c->last_build_coordinate, NR_NONE, UINT32_MAX, cni);
AddNewsItem(STR_MESSAGE_NEWS_FORMAT, NT_COMPANY_INFO, NF_COMPANY, NR_TILE, c->last_build_coordinate, NR_NONE, UINT32_MAX, cni);
}
return;
}
@@ -723,9 +725,9 @@ void CompaniesYearlyLoop()
ShowCompanyFinances(_local_company);
c = Company::Get(_local_company);
if (c->num_valid_stat_ent > 5 && c->old_economy[0].performance_history < c->old_economy[4].performance_history) {
SndPlayFx(SND_01_BAD_YEAR);
if (_settings_client.sound.new_year) SndPlayFx(SND_01_BAD_YEAR);
} else {
SndPlayFx(SND_00_GOOD_YEAR);
if (_settings_client.sound.new_year) SndPlayFx(SND_00_GOOD_YEAR);
}
}
}
@@ -919,7 +921,7 @@ CommandCost CmdCompanyCtrl(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
SetDParam(0, STR_NEWS_COMPANY_BANKRUPT_TITLE);
SetDParam(1, STR_NEWS_COMPANY_BANKRUPT_DESCRIPTION);
SetDParamStr(2, cni->company_name);
AddCompanyNewsItem(STR_MESSAGE_NEWS_FORMAT, NS_COMPANY_BANKRUPT, cni);
AddCompanyNewsItem(STR_MESSAGE_NEWS_FORMAT, cni);
/* Remove the company */
ChangeOwnershipOfCompanyItems(c->index, INVALID_OWNER);
@@ -1168,3 +1170,21 @@ CommandCost CmdRenamePresident(TileIndex tile, DoCommandFlag flags, uint32 p1, u
return CommandCost();
}
/**
* Get the service interval for the given company and vehicle type.
* @param c The company, or NULL for client-default settings.
* @param type The vehicle type to get the interval for.
* @return The service interval.
*/
int CompanyServiceInterval(const Company *c, VehicleType type)
{
const VehicleDefaultSettings *vds = (c == NULL) ? &_settings_client.company.vehicle : &c->settings.vehicle;
switch (type) {
default: NOT_REACHED();
case VEH_TRAIN: return vds->servint_trains;
case VEH_ROAD: return vds->servint_roadveh;
case VEH_AIRCRAFT: return vds->servint_aircraft;
case VEH_SHIP: return vds->servint_ships;
}
}

View File

@@ -15,6 +15,7 @@
#include "command_type.h"
#include "company_type.h"
#include "gfx_type.h"
#include "vehicle_type.h"
bool MayCompanyTakeOver(CompanyID cbig, CompanyID small);
void ChangeOwnershipOfCompanyItems(Owner old_owner, Owner new_owner);
@@ -56,4 +57,6 @@ static inline bool IsInteractiveCompany(CompanyID company)
return company == _local_company;
}
int CompanyServiceInterval(const Company *c, VehicleType type);
#endif /* COMPANY_FUNC_H */

View File

@@ -319,7 +319,7 @@ struct CompanyFinancesWindow : Window {
case WID_CF_BALANCE_VALUE:
case WID_CF_LOAN_VALUE:
case WID_CF_TOTAL_VALUE:
SetDParam(0, CompanyFinancesWindow::max_money);
SetDParamMaxValue(0, CompanyFinancesWindow::max_money);
size->width = max(GetStringBoundingBox(STR_FINANCES_NEGATIVE_INCOME).width, GetStringBoundingBox(STR_FINANCES_POSITIVE_INCOME).width) + padding.width;
break;
@@ -466,7 +466,7 @@ Money CompanyFinancesWindow::max_money = INT32_MAX;
static const WindowDesc _company_finances_desc(
WDP_AUTO, 0, 0,
WC_FINANCES, WC_NONE,
WDF_UNCLICK_BUTTONS,
0,
_nested_company_finances_widgets, lengthof(_nested_company_finances_widgets)
);
@@ -781,7 +781,8 @@ public:
virtual void OnDropdownSelect(int widget, int index)
{
for (LiveryScheme scheme = LS_DEFAULT; scheme < LS_END; scheme++) {
if (HasBit(this->sel, scheme)) {
/* Changed colour for the selected scheme, or all visible schemes if CTRL is pressed. */
if (HasBit(this->sel, scheme) || (_ctrl_pressed && _livery_class[scheme] == this->livery_class && HasBit(_loaded_newgrf_features.used_liveries, scheme))) {
DoCommandP(0, scheme | (widget == WID_SCL_PRI_COL_DROPDOWN ? 0 : 256), index, CMD_SET_COMPANY_COLOUR);
}
}
@@ -1280,11 +1281,7 @@ public:
break;
case WID_SCMF_TIE_EARRING:
if (this->is_female) { // Only for female faces
this->DrawFaceStringLabel(WID_SCMF_TIE_EARRING, GetCompanyManagerFaceBits(this->face, CMFV_TIE_EARRING, this->ge), false);
} else { // Only for male faces
this->DrawFaceStringLabel(WID_SCMF_TIE_EARRING, GetCompanyManagerFaceBits(this->face, CMFV_TIE_EARRING, this->ge), false);
}
this->DrawFaceStringLabel(WID_SCMF_TIE_EARRING, GetCompanyManagerFaceBits(this->face, CMFV_TIE_EARRING, this->ge), false);
break;
case WID_SCMF_LIPS_MOUSTACHE:
@@ -1485,7 +1482,7 @@ const StringID SelectCompanyManagerFaceWindow::PART_TEXTS[] = {
static const WindowDesc _select_company_manager_face_desc(
WDP_AUTO, 0, 0,
WC_COMPANY_MANAGER_FACE, WC_NONE,
WDF_UNCLICK_BUTTONS | WDF_CONSTRUCTION,
WDF_CONSTRUCTION,
_nested_select_company_manager_face_widgets, lengthof(_nested_select_company_manager_face_widgets)
);
@@ -1694,12 +1691,12 @@ struct CompanyInfrastructureWindow : Window
max_val = max(max_val, c->infrastructure.airport);
max_cost = max(max_cost, AirportMaintenanceCost(c->index));
SetDParam(0, max_val);
SetDParam(1, max_cost * 12); // Convert to per year
SetDParamMaxValue(0, max_val);
SetDParamMaxValue(1, max_cost * 12); // Convert to per year
size->width = max(size->width, GetStringBoundingBox(_settings_game.economy.infrastructure_maintenance ? STR_COMPANY_INFRASTRUCTURE_VIEW_COST : STR_WHITE_COMMA).width + 20); // Reserve some wiggle room.
if (_settings_game.economy.infrastructure_maintenance) {
SetDParam(0, this->GetTotalMaintenanceCost() * 12); // Convert to per year
SetDParamMaxValue(0, this->GetTotalMaintenanceCost() * 12); // Convert to per year
this->total_width = GetStringBoundingBox(STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL).width + 20;
size->width = max(size->width, this->total_width);
}
@@ -1839,7 +1836,7 @@ struct CompanyInfrastructureWindow : Window
static const WindowDesc _company_infrastructure_desc(
WDP_AUTO, 0, 0,
WC_COMPANY_INFRASTRUCTURE, WC_NONE,
WDF_UNCLICK_BUTTONS,
0,
_nested_company_infrastructure_widgets, lengthof(_nested_company_infrastructure_widgets)
);
@@ -1990,6 +1987,7 @@ struct CompanyWindow : Window
{
this->InitNested(desc, window_number);
this->owner = (Owner)this->window_number;
this->OnInvalidateData();
}
virtual void OnPaint()
@@ -2058,25 +2056,6 @@ struct CompanyWindow : Window
}
}
if (!local) {
if (_settings_game.economy.allow_shares) { // Shares are allowed
/* If all shares are owned by someone (none by nobody), disable buy button */
this->SetWidgetDisabledState(WID_C_BUY_SHARE, GetAmountOwnedBy(c, INVALID_OWNER) == 0 ||
/* Only 25% left to buy. If the company is human, disable buying it up.. TODO issues! */
(GetAmountOwnedBy(c, INVALID_OWNER) == 1 && !c->is_ai) ||
/* Spectators cannot do anything of course */
_local_company == COMPANY_SPECTATOR);
/* If the company doesn't own any shares, disable sell button */
this->SetWidgetDisabledState(WID_C_SELL_SHARE, (GetAmountOwnedBy(c, _local_company) == 0) ||
/* Spectators cannot do anything of course */
_local_company == COMPANY_SPECTATOR);
} else { // Shares are not allowed, disable buy/sell buttons
this->DisableWidget(WID_C_BUY_SHARE);
this->DisableWidget(WID_C_SELL_SHARE);
}
}
this->DrawWidgets();
}
@@ -2098,14 +2077,14 @@ struct CompanyWindow : Window
break;
case WID_C_DESC_VEHICLE_COUNTS:
SetDParam(0, 5000); // Maximum number of vehicles
SetDParamMaxValue(0, 5000); // Maximum number of vehicles
for (uint i = 0; i < lengthof(_company_view_vehicle_count_strings); i++) {
size->width = max(size->width, GetStringBoundingBox(_company_view_vehicle_count_strings[i]).width);
}
break;
case WID_C_DESC_INFRASTRUCTURE_COUNTS:
SetDParam(0, UINT_MAX);
SetDParamMaxValue(0, UINT_MAX);
size->width = max(size->width, GetStringBoundingBox(STR_COMPANY_VIEW_INFRASTRUCTURE_RAIL).width);
size->width = max(size->width, GetStringBoundingBox(STR_COMPANY_VIEW_INFRASTRUCTURE_ROAD).width);
size->width = max(size->width, GetStringBoundingBox(STR_COMPANY_VIEW_INFRASTRUCTURE_WATER).width);
@@ -2118,7 +2097,7 @@ struct CompanyWindow : Window
const Company *c2;
FOR_ALL_COMPANIES(c2) {
SetDParam(0, 25);
SetDParamMaxValue(0, 75);
SetDParam(1, c2->index);
size->width = max(size->width, GetStringBoundingBox(STR_COMPANY_VIEW_SHARES_OWNED_BY).width);
@@ -2399,12 +2378,42 @@ struct CompanyWindow : Window
#endif /* ENABLE_NETWORK */
}
}
/**
* Some data on this window has become invalid.
* @param data Information about the changed data.
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
*/
virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
{
if (this->window_number == _local_company) return;
if (_settings_game.economy.allow_shares) { // Shares are allowed
const Company *c = Company::Get(this->window_number);
/* If all shares are owned by someone (none by nobody), disable buy button */
this->SetWidgetDisabledState(WID_C_BUY_SHARE, GetAmountOwnedBy(c, INVALID_OWNER) == 0 ||
/* Only 25% left to buy. If the company is human, disable buying it up.. TODO issues! */
(GetAmountOwnedBy(c, INVALID_OWNER) == 1 && !c->is_ai) ||
/* Spectators cannot do anything of course */
_local_company == COMPANY_SPECTATOR);
/* If the company doesn't own any shares, disable sell button */
this->SetWidgetDisabledState(WID_C_SELL_SHARE, (GetAmountOwnedBy(c, _local_company) == 0) ||
/* Spectators cannot do anything of course */
_local_company == COMPANY_SPECTATOR);
} else { // Shares are not allowed, disable buy/sell buttons
this->DisableWidget(WID_C_BUY_SHARE);
this->DisableWidget(WID_C_SELL_SHARE);
}
}
};
static const WindowDesc _company_desc(
WDP_AUTO, 0, 0,
WC_COMPANY, WC_NONE,
WDF_UNCLICK_BUTTONS,
0,
_nested_company_widgets, lengthof(_nested_company_widgets)
);

View File

@@ -120,7 +120,7 @@ static inline void SetCompanyManagerFaceBits(CompanyManagerFace &cmf, CompanyMan
/**
* Increase/Decrease the company manager's face variable by the given amount.
* If the new value greater than the max value for this variable it will be set to 0.
* Or is it negativ (< 0) it will be set to max value.
* Or is it negative (< 0) it will be set to max value.
*
* @param cmf the company manager face to write the bits to
* @param cmfv the company manager face variable to write the data of

View File

@@ -355,7 +355,7 @@ static void IConsoleAliasExec(const IConsoleAlias *alias, byte tokencount, char
aliasstream[astream_i++] = '"';
break;
case ';': // Cmd seperator, start new command
case ';': // Cmd separator, start new command
aliasstream[astream_i] = '\0';
aliases[++a_index] = &aliasstream[++astream_i];
cmdptr++;
@@ -364,7 +364,7 @@ static void IConsoleAliasExec(const IConsoleAlias *alias, byte tokencount, char
case '%': // Some or all parameters
cmdptr++;
switch (*cmdptr) {
case '+': { // All parameters seperated: "[param 1]" "[param 2]"
case '+': { // All parameters separated: "[param 1]" "[param 2]"
for (i = 0; i != tokencount; i++) {
aliasstream[astream_i++] = '"';
astream_i += IConsoleCopyInParams(&aliasstream[astream_i], tokens[i], astream_i);
@@ -412,7 +412,7 @@ static void IConsoleAliasExec(const IConsoleAlias *alias, byte tokencount, char
/**
* Execute a given command passed to us. First chop it up into
* individual tokens (seperated by spaces), then execute it if possible
* individual tokens (separated by spaces), then execute it if possible
* @param cmdstr string to be parsed and executed
*/
void IConsoleCmdExec(const char *cmdstr)
@@ -439,14 +439,14 @@ void IConsoleCmdExec(const char *cmdstr)
memset(&tokens, 0, sizeof(tokens));
memset(&tokenstream, 0, sizeof(tokenstream));
/* 1. Split up commandline into tokens, seperated by spaces, commands
/* 1. Split up commandline into tokens, separated by spaces, commands
* enclosed in "" are taken as one token. We can only go as far as the amount
* of characters in our stream or the max amount of tokens we can handle */
for (cmdptr = cmdstr, t_index = 0, tstream_i = 0; *cmdptr != '\0'; cmdptr++) {
if (t_index >= lengthof(tokens) || tstream_i >= lengthof(tokenstream)) break;
switch (*cmdptr) {
case ' ': // Token seperator
case ' ': // Token separator
if (!foundtoken) break;
if (longtoken) {

View File

@@ -38,10 +38,7 @@
#include "console_func.h"
#include "engine_base.h"
#include "game/game.hpp"
#ifdef ENABLE_NETWORK
#include "table/strings.h"
#endif /* ENABLE_NETWORK */
#include "table/strings.h"
/* scriptfile handling */
static bool _script_running; ///< Script is running (used to abort execution when #ConReturn is encountered).
@@ -1069,7 +1066,7 @@ DEF_CONSOLE_CMD(ConRestart)
}
/**
* Print a text buffer line by line to the console. Lines are seperated by '\n'.
* Print a text buffer line by line to the console. Lines are separated by '\n'.
* @param buf The buffer to print.
* @note All newlines are replace by '\0' characters.
*/
@@ -1531,6 +1528,45 @@ DEF_CONSOLE_CMD(ConListAliases)
return true;
}
DEF_CONSOLE_CMD(ConCompanies)
{
if (argc == 0) {
IConsoleHelp("List the details of all companies in the game. Usage 'companies'");
return true;
}
Company *c;
FOR_ALL_COMPANIES(c) {
/* Grab the company name */
char company_name[512];
SetDParam(0, c->index);
GetString(company_name, STR_COMPANY_NAME, lastof(company_name));
const char *password_state = "";
if (c->is_ai) {
password_state = "AI";
}
#ifdef ENABLE_NETWORK
else if (_network_server) {
password_state = StrEmpty(_network_company_states[c->index].password) ? "unprotected" : "protected";
}
#endif
char colour[512];
GetString(colour, STR_COLOUR_DARK_BLUE + _company_colours[c->index], lastof(colour));
IConsolePrintF(CC_INFO, "#:%d(%s) Company Name: '%s' Year Founded: %d Money: " OTTD_PRINTF64 " Loan: " OTTD_PRINTF64 " Value: " OTTD_PRINTF64 " (T:%d, R:%d, P:%d, S:%d) %s",
c->index + 1, colour, company_name,
c->inaugurated_year, (int64)c->money, (int64)c->current_loan, (int64)CalculateCompanyValue(c),
c->group_all[VEH_TRAIN].num_vehicle,
c->group_all[VEH_ROAD].num_vehicle,
c->group_all[VEH_AIRCRAFT].num_vehicle,
c->group_all[VEH_SHIP].num_vehicle,
password_state);
}
return true;
}
#ifdef ENABLE_NETWORK
DEF_CONSOLE_CMD(ConSay)
@@ -1552,38 +1588,6 @@ DEF_CONSOLE_CMD(ConSay)
return true;
}
DEF_CONSOLE_CMD(ConCompanies)
{
if (argc == 0) {
IConsoleHelp("List the in-game details of all clients connected to the server. Usage 'companies'");
return true;
}
NetworkCompanyStats company_stats[MAX_COMPANIES];
NetworkPopulateCompanyStats(company_stats);
Company *c;
FOR_ALL_COMPANIES(c) {
/* Grab the company name */
char company_name[NETWORK_COMPANY_NAME_LENGTH];
SetDParam(0, c->index);
GetString(company_name, STR_COMPANY_NAME, lastof(company_name));
char buffer[512];
const NetworkCompanyStats *stats = &company_stats[c->index];
GetString(buffer, STR_COLOUR_DARK_BLUE + _company_colours[c->index], lastof(buffer));
IConsolePrintF(CC_INFO, "#:%d(%s) Company Name: '%s' Year Founded: %d Money: " OTTD_PRINTF64 " Loan: " OTTD_PRINTF64 " Value: " OTTD_PRINTF64 " (T:%d, R:%d, P:%d, S:%d) %sprotected",
c->index + 1, buffer, company_name, c->inaugurated_year, (int64)c->money, (int64)c->current_loan, (int64)CalculateCompanyValue(c),
/* trains */ stats->num_vehicle[0],
/* lorry + bus */ stats->num_vehicle[1] + stats->num_vehicle[2],
/* planes */ stats->num_vehicle[3],
/* ships */ stats->num_vehicle[4],
/* protected */ StrEmpty(_network_company_states[c->index].password) ? "un" : "");
}
return true;
}
DEF_CONSOLE_CMD(ConSayCompany)
{
if (argc == 0) {
@@ -1776,7 +1780,9 @@ DEF_CONSOLE_CMD(ConContent)
static const TextColour state_to_colour[] = { CC_COMMAND, CC_INFO, CC_INFO, CC_WHITE, CC_ERROR };
const ContentInfo *ci = *iter;
IConsolePrintF(state_to_colour[ci->state], "%d, %s, %s, %s", ci->id, types[ci->type - 1], states[ci->state], ci->name);
char buf[sizeof(ci->md5sum) * 2 + 1];
md5sumToString(buf, lastof(buf), ci->md5sum);
IConsolePrintF(state_to_colour[ci->state], "%d, %s, %s, %s, %08X, %s", ci->id, types[ci->type - 1], states[ci->state], ci->name, ci->unique_id, buf);
}
return true;
}
@@ -1937,6 +1943,9 @@ void IConsoleStdLibRegister()
IConsoleCmdRegister("list_game_libs", ConListGameLibs);
IConsoleCmdRegister("rescan_game", ConRescanGame);
IConsoleCmdRegister("companies", ConCompanies);
IConsoleAliasRegister("players", "companies");
/* networking functions */
#ifdef ENABLE_NETWORK
/* Content downloading is only available with ZLIB */
@@ -1946,8 +1955,6 @@ void IConsoleStdLibRegister()
/*** Networking commands ***/
IConsoleCmdRegister("say", ConSay, ConHookNeedNetwork);
IConsoleCmdRegister("companies", ConCompanies, ConHookServerOnly);
IConsoleAliasRegister("players", "companies");
IConsoleCmdRegister("say_company", ConSayCompany, ConHookNeedNetwork);
IConsoleAliasRegister("say_player", "say_company %+");
IConsoleCmdRegister("say_client", ConSayClient, ConHookNeedNetwork);

View File

@@ -10,7 +10,7 @@
/** @file console_gui.cpp Handling the GUI of the in-game console. */
#include "stdafx.h"
#include "textbuf_gui.h"
#include "textbuf_type.h"
#include "window_gui.h"
#include "console_gui.h"
#include "console_internal.h"
@@ -126,7 +126,7 @@ struct IConsoleLine {
/* ** main console cmd buffer ** */
static Textbuf _iconsole_cmdline;
static Textbuf _iconsole_cmdline(ICON_CMDLN_SIZE);
static char *_iconsole_history[ICON_HISTORY_SIZE];
static int _iconsole_historypos;
IConsoleModes _iconsole_mode;
@@ -233,7 +233,7 @@ struct IConsoleWindow : Window
virtual void OnMouseLoop()
{
if (HandleCaret(&_iconsole_cmdline)) this->SetDirty();
if (_iconsole_cmdline.HandleCaret()) this->SetDirty();
}
virtual EventState OnKeyPress(uint16 key, uint16 keycode)
@@ -294,7 +294,7 @@ struct IConsoleWindow : Window
case (WKC_META | 'V'):
#endif
case (WKC_CTRL | 'V'):
if (InsertTextBufferClipboard(&_iconsole_cmdline)) {
if (_iconsole_cmdline.InsertClipboard()) {
IConsoleResetHistoryPos();
this->SetDirty();
}
@@ -308,19 +308,19 @@ struct IConsoleWindow : Window
case (WKC_META | 'U'):
#endif
case (WKC_CTRL | 'U'):
DeleteTextBufferAll(&_iconsole_cmdline);
_iconsole_cmdline.DeleteAll();
this->SetDirty();
break;
case WKC_BACKSPACE: case WKC_DELETE:
if (DeleteTextBufferChar(&_iconsole_cmdline, keycode)) {
if (_iconsole_cmdline.DeleteChar(keycode)) {
IConsoleResetHistoryPos();
this->SetDirty();
}
break;
case WKC_LEFT: case WKC_RIGHT: case WKC_END: case WKC_HOME:
if (MoveTextBufferPos(&_iconsole_cmdline, keycode)) {
if (_iconsole_cmdline.MovePos(keycode)) {
IConsoleResetHistoryPos();
this->SetDirty();
}
@@ -329,7 +329,7 @@ struct IConsoleWindow : Window
default:
if (IsValidChar(key, CS_ALPHANUMERAL)) {
IConsoleWindow::scroll = 0;
InsertTextBufferChar(&_iconsole_cmdline, key);
_iconsole_cmdline.InsertChar(key);
IConsoleResetHistoryPos();
this->SetDirty();
} else {
@@ -356,10 +356,6 @@ void IConsoleGUIInit()
IConsoleLine::Reset();
memset(_iconsole_history, 0, sizeof(_iconsole_history));
_iconsole_cmdline.buf = CallocT<char>(ICON_CMDLN_SIZE); // create buffer and zero it
_iconsole_cmdline.max_bytes = ICON_CMDLN_SIZE;
_iconsole_cmdline.max_chars = ICON_CMDLN_SIZE;
IConsolePrintF(CC_WARNING, "OpenTTD Game Console Revision 7 - %s", _openttd_revision);
IConsolePrint(CC_WHITE, "------------------------------------");
IConsolePrint(CC_WHITE, "use \"help\" for more information");
@@ -374,7 +370,6 @@ void IConsoleClearBuffer()
void IConsoleGUIFree()
{
free(_iconsole_cmdline.buf);
IConsoleClearBuffer();
}
@@ -456,11 +451,10 @@ static void IConsoleHistoryNavigate(int direction)
if (direction > 0 && _iconsole_history[_iconsole_historypos] == NULL) _iconsole_historypos--;
if (_iconsole_historypos == -1) {
*_iconsole_cmdline.buf = '\0';
_iconsole_cmdline.DeleteAll();
} else {
ttd_strlcpy(_iconsole_cmdline.buf, _iconsole_history[_iconsole_historypos], _iconsole_cmdline.max_bytes);
_iconsole_cmdline.Assign(_iconsole_history[_iconsole_historypos]);
}
UpdateTextBufferSize(&_iconsole_cmdline);
}
/**

View File

@@ -28,7 +28,7 @@ enum ConsoleHookResult {
* --Commands--
* Commands are commands, or functions. They get executed once and any
* effect they produce are carried out. The arguments to the commands
* are given to them, each input word seperated by a double-quote (") is an argument
* are given to them, each input word separated by a double-quote (") is an argument
* If you want to handle multiple words as one, enclose them in double-quotes
* eg. 'say "hello sexy boy"'
*/
@@ -50,7 +50,7 @@ struct IConsoleCmd {
* (eg. 'ng' for 'load %A; unpause; debug_level 5'). Aliases can parse the arguments
* given to them in the command line.
* - "%A - %Z" substitute arguments 1 t/m 26
* - "%+" lists all parameters keeping them seperated
* - "%+" lists all parameters keeping them separated
* - "%!" also lists all parameters but presenting them to the aliased command as one argument
* - ";" allows for combining commands (see example 'ng')
*/

Some files were not shown because too many files have changed in this diff Show More