Commit Graph

305 Commits

Author SHA1 Message Date
bjarni 8f4e2e8040 (svn r8336) -Codechange: added function to translate vehicle types to 0,1,2... for use for index to arrays
Used this function to get rid of some switch-cases in build_vehicle_gui.cpp
-Fix (r8335): ship build window didn't remember assending/decending sort setting
2007-01-22 01:13:10 +00:00
bjarni 14b2998023 (svn r8335) -Feature: the build ship window is now also resizable horizontally and contains sorting options
-Codechange: the build ship window is merged into build_vehicle_gui.cpp
2007-01-22 00:26:46 +00:00
bjarni 1f32ce7e89 (svn r8334) -Fix (r8331): build window buttons now both resize as intended 2007-01-21 23:24:25 +00:00
bjarni 4bb18a450c (svn r8333) -Codechange: when invalidating a build window list, set a flag instead of rebuilding the list and then rebuild it the next time it's redrawn
This should save CPU time in the (maybe unlikely) event that the list is invalidated more than once between two redraws
2007-01-21 23:13:46 +00:00
bjarni d82ae7427d (svn r8332) -Codechange: moved DrawAircraftImage() and CcBuildAircraft() from build_vehicle_gui.cpp to aircraft_gui.cpp 2007-01-21 22:57:52 +00:00
bjarni b60e5c17cd (svn r8331) -Feature: the train and aircraft build windows are now resizable in horizontal direction as well
-Codechange: merged train and aircraft build window code
2007-01-21 22:50:43 +00:00
maedhros 17c71f4557 (svn r8330) -Codechange: Remove num_x and num_dataset from DrawGraph. 2007-01-21 20:54:29 +00:00
maedhros e371c67199 (svn r8329) -Codechange: Remove the the horribly abused j and k variables completely, and make i local to each loop it's used in. 2007-01-21 20:34:28 +00:00
maedhros 2b2fdc1281 (svn r8328) -Codechange: Remove some magic numbers in the graph drawing code. 2007-01-21 20:14:35 +00:00
bjarni bdc29f3d0d (svn r8327) -Codechange: though overloading, IsPlayerBuildableVehicleType() now works with the type given as a byte as well as a vehicle pointer 2007-01-21 20:08:00 +00:00
miham 34de6db60d (svn r8324) [Translations] -Change: Declared simplified_chinese as officially available language (number of missing strings is far less than 100) 2007-01-21 19:31:29 +00:00
miham 1e01201713 (svn r8323) [Translations] -Fix: removed untranslated strings from chinese language, fixed a wrong plural param 2007-01-21 19:27:50 +00:00
maedhros 06362c3535 (svn r8322) -Codechange: Rename unk61A and unk61C to something a little more descriptive. 2007-01-21 19:19:25 +00:00
tron 8ac3272e85 (svn r8321) -Fix
Reduce the size of EngineInfo (from 28 to 24 bytes) by moving one of its attributes
2007-01-21 19:00:31 +00:00
tron fb8b0557f9 (svn r8320) -Fix
Simplify TrainPowerChanged() somewhat by eleminating code duplication
2007-01-21 18:46:19 +00:00
maedhros 84f4ca8b56 (svn r8319) -Codechange: Remove the remaining colours from GraphDrawer as they're also the same everywhere. 2007-01-21 18:42:15 +00:00
miham b25584b40c (svn r8318) -Update: WebTranslator2 update to 2007-01-21 19:29:35
brazilian_portuguese - 10 changed by fukumori (10)
polish     - 5 fixed by meush (5)
simplified_chinese - 9 fixed, 191 changed by Fishingsnow (200)
slovak     - 1 fixed by lengyel (1)
slovenian  - 1 changed by ThePianoGuy (1)
2007-01-21 18:30:21 +00:00
maedhros 699d8709c1 (svn r8317) -Codechange: Remove GraphDrawer::bg_line_color since it was the same everywhere it was set. 2007-01-21 18:07:35 +00:00
rubidium cf83a9f065 (svn r8316) -Codechange: move the GRF ID and MD5 checksum from GRFConfig to GRFIdentifier so it can be reused. 2007-01-21 17:29:38 +00:00
truelight d82304ccab (svn r8315) -Fix: use ShowInfo over fprintf(stderr, as Windows doesn't always have a stderr visible/available 2007-01-21 17:09:32 +00:00
tron bc523186e0 (svn r8314) -Fix
-Codechange: Move the railtype from EngineInfo to RailVehicleInfo, because having a railtype for non-rail vehicles isn't that useful
2007-01-21 16:08:18 +00:00
maedhros 1564c74259 (svn r8312) -Fix (r8038, sort of): Operating profit and the company value can be negative,
so don't put them in an unsigned variable before drawing them in the various 
graphs. Although the code didn't change, this only seems to have broken since 
we started compiling it as C++.
2007-01-21 15:03:37 +00:00
truelight 203ccad578 (svn r8310) -Fix r8309: it is wise to put #endifs in the right place ;) 2007-01-21 14:36:08 +00:00
truelight 6a145e06c3 (svn r8309) [WinCE] -Fix: WinCE doesn't know resolution changing
-Fix: WinCE doesn't know GetKeyboardState
-Fix: made a replacement of GetCurrentDirectory, where CurDir is assumed to be the dir the executable is located (esoftinteractive.com)
-Fix: the GCC compiler is more happy if the WinMain is called that
-Fix: a really old typo (missing ')') ;)
-Fix: GdiFlush() isn't supported on WinCE
2007-01-21 14:32:40 +00:00
truelight 79dfc62261 (svn r8308) [WinCE] -Revert r5764: in case of WinCE, use the code for FileExists as it was in pre-r5764 for Win32 (tnx Darkvater) 2007-01-21 14:21:31 +00:00
truelight bd52404b8e (svn r8307) [WinCE] -Fix: for now disable sound and music. That will be done later. 2007-01-21 14:19:44 +00:00
truelight 4dae672e92 (svn r8306) [WinCE] -Fix: some functions don't exists in WinCE, so give an alternative where possible 2007-01-21 14:19:18 +00:00
truelight bb8f3a1dff (svn r8305) -Codechange: defining 'static const' in a header is a bit weird.
Above that, wince-gcc gave "unused variable" on every file which included airport.h... pretty annoying ;)
2007-01-21 14:15:38 +00:00
bjarni 4241f1eb20 (svn r8303) -Codechange (r8293): default is moved to the front of the switch in ShowVehicleListWindowLocal() 2007-01-21 13:16:31 +00:00
maedhros 38647bb426 (svn r8301) -Codechange: Move the code relating to the sign list window from graph_gui.cpp to a file of its own: signs_gui.cpp. 2007-01-21 12:35:35 +00:00
maedhros 7a7562d8e2 (svn r8300) -Codechange: Add a prototype for DrawPlayerIcon to players.h and include that
instead of using externs. Also move DrawPlayerIcon from graph_gui.cpp to
players.cpp.
2007-01-21 11:49:18 +00:00
tron 501cd51c15 (svn r8299) -Fix
Remove unreachable code
2007-01-21 08:04:14 +00:00
bjarni 59e6e762b8 (svn r8296) -Fix: GenerateVehicleSortList() tried to put a TileIndex into an uint16
-Fix: CmdMassStartStopVehicle() tried to put a TileIndex into an uint16
  Those two bugs were unrelated to each other and unrelated to r8295, even though that commit touched the code in question
2007-01-21 01:25:59 +00:00
bjarni 518c4cdfce (svn r8295) -Cleanup: merged arguments station, order and depot_airport_index for GenerateVehicleSortList() and BuildVehicleList() into one uint16 argument
It turned out that all 3 arguments were the same at all the places those functions are called, so there was no point in having more than one
2007-01-21 01:07:15 +00:00
bjarni 7871ce1879 (svn r8294) -Fix: deleting a vehicle with shared orders, but no orders would fail to reset prev_shared and next_shared
-As a result, vehicles in the game could end up having prev/next pointers to vehicles, that was no longer in the game
2007-01-21 00:13:39 +00:00
bjarni c8c27b9740 (svn r8293) -Codechange: overloaded ShowVehicleListWindow() so it can open all types of vehicle lists (depending on arguments)
- Also removed some unneeded arguments
  - this also allows removing an if-else cascade in ShowVehicleListWindowLocal()
2007-01-21 00:01:47 +00:00
miham 470619a8bb (svn r8290) -Update: WebTranslator2 update to 2007-01-20 19:46:14
brazilian_portuguese - 69 changed by fukumori (69)
frisian    - 48 fixed by ikkejw (48)
russian    - 57 changed by DarkFenX (57)
ukrainian  - 5 changed by znikoz (5)
2007-01-20 18:50:50 +00:00
miham c145db6e6b (svn r8289) [Translations] -Fix: translators sent some offline translation for simplified chinese (Fishingsnow) and japanese (ickoonite) 2007-01-20 18:42:27 +00:00
bjarni 00b730ebca (svn r8288) -Fix: [OSX] compiling with debug enabled now works again
-This is once again an obj-C vs C++ issue. I need to make a nice and permanent solution soon, but I need the debugger right now
2007-01-20 11:26:16 +00:00
peter1138 e13b00e14f (svn r8287) -Fix (r8286): forgot to check for newline format, sorry... 2007-01-20 09:49:29 +00:00
peter1138 4d0a0fed0e (svn r8286) -Add: Korean translation by Ezi 2007-01-20 09:19:37 +00:00
KUDr 8c5f64ae56 (svn r8284) -Fix (r8277): g++ compilation error: missing brackets in sizeof 2007-01-19 22:41:50 +00:00
peter1138 d3761d97eb (svn r8283) -Fix (r8128): Custom waypoint drawing used wrong bits since bitshuffling occurred. Also update with other station drawing changes (code duplication,
eh?)
2007-01-19 21:40:10 +00:00
miham f07cbde398 (svn r8281) -Update: WebTranslator2 update to 2007-01-19 19:32:57
brazilian_portuguese - 2 fixed, 49 changed by fukumori (51)
bulgarian  - 1 fixed by kokobongo (1)
2007-01-19 18:33:30 +00:00
peter1138 4d6a7b7427 (svn r8280) -Codechange: Remove unnecessarily complex assignment of waypoint string ID. 2007-01-19 17:46:44 +00:00
Darkvater 97d558760c (svn r8279) -Regression (r8274): Removing signals could fail under certain circumstances (not the proper bits of p1/p2 were set to trackbits). Moved trackbits back to bits 0..2, ctrl to 3, semaphore to 4. Also lower the decision of the ctrl-override of signal/semaphore from the GUI into the cmd function since we are passing the ctrl-bit anyways. Bug(s) found by Frostregen; thanks 2007-01-19 17:44:11 +00:00
KUDr 7b5ec98d99 (svn r8277) -Fix (r8038): assert on game exit when waypoints were used. The static variable of type Station (inside ComposeWaypointStation) replaced by byte array so no destructor is called for it on exit. 2007-01-19 16:01:43 +00:00
tron b2def96248 (svn r8276) -Fix
Change the signature of Swap() to be less error prone, i.e. pass the variables to be swapped by reference instead of passing pointers to the variables.
Just do Swap(x, y) instead of Swap(&x, &y). This prevents accidents when the variables are pointers.
2007-01-19 11:47:48 +00:00
tron 7af3094bc3 (svn r8275) -Fix
Factor common data tables and use a bit more sensible names
2007-01-19 06:08:04 +00:00
Darkvater 110c0162df (svn r8274) -Codechange (r8151): Move the automatic semaphore/signal checks inside the CMD_ functions where they are supposed to be. Achieve this by adding a seperate bit to p1/p2 to hold the CTRL-modifier. While here, use proper types, and 'unify' the parameter bit-meanings. 0 - ctrl-pressed, 1 - signal/semaphore, 2-4 - trackbits, 5 - remove (internal), 24-31 - drag density. 2007-01-19 00:01:52 +00:00
KUDr 314e35beff (svn r8273) -Fix: return value from clamp was ignored 2007-01-18 23:48:04 +00:00
KUDr 6230f9b922 (svn r8272) -Fix (r8038): signed/unsigned change - PlayerID is now enum (signed) and was byte so test for PlayerID validity needed to be updated (Darkvater) 2007-01-18 23:45:58 +00:00
miham b36298e8a1 (svn r8267) [Translations] -Fix: (r8266) fixed the ownname and the isocode of the russian language 2007-01-18 22:24:11 +00:00
miham 2cca03409c (svn r8266) -Update: WebTranslator2 update to 2007-01-18 19:42:06
afrikaans  - 26 fixed, 63 changed by TrueTenacity (89)
dutch      - 1 fixed by habell (1)
esperanto  - 1 fixed by LaPingvino (1)
russian    - 26 changed by DarkFenX (26)
turkish    - 1 fixed by jnmbk (1)
ukrainian  - 6 changed by znikoz (6)
2007-01-18 18:42:50 +00:00
Darkvater 8e06ff09a6 (svn r8254) -Merge: Release changes from the 0.5 branch back to trunk. This ensures an updated changelog, readme, et. 2007-01-18 15:39:58 +00:00
Darkvater 4de91346e9 (svn r8253) -Codechange: Be more strict about language generation and fail any languages not having the mandatory ##name, ##ownname and ##isocode pragma's. 2007-01-18 15:27:57 +00:00
Darkvater 982c451a8e (svn r8252) -Regression(r8204): WT2 commit removed ##isocode from Russian, resulting in a clean
start of openttd being in russian instead of in english.
2007-01-18 15:26:52 +00:00
Darkvater 95ccdeeac0 (svn r8240) -Fix (r8013): Put the output of -h to stdout and not to stderr (through ShowInfo) 2007-01-18 14:08:56 +00:00
Darkvater d3a58ba36b (svn r8239) -Regression (r7278): Help window was empty for UNICODE builds 2007-01-18 14:06:30 +00:00
KUDr 147ca22060 (svn r8231) -Fix (r8125): MP desync caused by calling Random() from station constructor. This was wrong because station constructor is called also when loading savegame and when player tries to build station when it is not sure that it will succeed (thanks Rubidium) 2007-01-18 09:34:44 +00:00
Darkvater 653290c76a (svn r8218) -Codechange: Increase spritecache size to 2MB. This will vastly improve performance when using (lots of) grf files. You can change it yourself easily with the SPRITE_CACHE_SIZE compile flag. (peter1138). 2007-01-17 23:25:19 +00:00
peter1138 652b804a9e (svn r8214) -Fix (r8038): The fast forward flag stores 2 bits, not 1. Remember the
whole thing when turning off FF for autosave. This stops FF getting stuck on 
if the FF key is released during the save.
2007-01-17 22:44:49 +00:00
tron 3be30b8842 (svn r8212) -Fix
Remove the unnecessary attribute RoadStop::used. The same information can be derived from RoadStop::xy
2007-01-17 22:32:34 +00:00
peter1138 004f1b061f (svn r8211) -Codechange: (NewGRF) Implement callback 2D, explicit vehicle colour map
selection.
2007-01-17 22:19:12 +00:00
tron 3d1735fcfd (svn r8207) -Fix
Remove the write-only attribute RoadStop::station
2007-01-17 21:14:17 +00:00
miham 27dde23409 (svn r8206) [Translations] -Fix: Fixed r8193, converted the html notations back to UTF8 characters 2007-01-17 21:05:39 +00:00
miham 4653c34f2a (svn r8204) -Fix: reverted r8202, since it did not solve all the problems, since ALL language changes done today are garbage due to a quick bugfix in WT2 which introduced another, much more serious bug: put an utf8_to_htmlcode() call to a wrong place
I will fix the affected language files soon (20-30 minutes)
Please excuse me for this whole problem :-(
2007-01-17 20:37:25 +00:00
tron f3daa56208 (svn r8203) -Fix:
Use initialisers, reduce variable scope, remove spurious whitespace, fix format string to make it readable
2007-01-17 20:34:29 +00:00
miham 0eb5af76d1 (svn r8202) -Fix: r8193: russian.txt changes somehow became garbage 2007-01-17 20:29:45 +00:00
rubidium dec9698edc (svn r8198) -Codechange: two global variables are not needed when network is disabled. 2007-01-17 19:55:18 +00:00
miham 11b19bb6ab (svn r8193) -Update: WebTranslator2 update to 2007-01-17 19:42:11
brazilian_portuguese - 3 changed by fukumori (3)
danish     - 21 changed by MiR (21)
german     - 1 fixed by Neonox (1)
japanese   - 24 changed by ickoonite (24)
norwegian_nynorsk - 1 changed by pollux (1)
russian    - 5 fixed, 75 changed by DarkFenX (80)
slovenian  - 57 changed by Necrolyte (57)
swedish    - 1 fixed by daishan (1)
2007-01-17 18:43:03 +00:00
peter1138 61f5cf9b6f (svn r8186) -Fix (FS#557): Apply railtype offset to station graphics if no custom station is in use. 2007-01-17 12:57:35 +00:00
celestar 8c54793068 (svn r8185) -Codechange: Equipped Roadstops with new/delete operators and gave them proper constructors/destructors (Thanks to KUDr for a nice interactive C++ lesson) 2007-01-17 11:15:51 +00:00
tron a973e45719 (svn r8184) if cascade -> switch 2007-01-17 06:54:03 +00:00
tron 2742b5fe25 (svn r8183) When iterating over the map in AfterLoadGame() do it the same way for all loops 2007-01-17 06:33:23 +00:00
rubidium 0bd6622c2e (svn r8171) -Fix (FS#556): return SL_ERROR when unthreaded saves failed, to make sure we do not try to send zero-byte savegames. 2007-01-17 00:01:55 +00:00
Darkvater 1f3ea708c3 (svn r8168) -Regression (r6783): ParseConnectionstring didn't use the port parameter if a player was also specified. (both IP#Player:Port and IP:Port#Player btw) 2007-01-16 23:01:06 +00:00
rubidium 96b19ca23e (svn r8167) -Fix (FS#556): a network client crashes, due to a division by zero, when the connection gets lost at the right moment or when the packet is malformed (server sends size 0 for the map). 2007-01-16 22:56:18 +00:00
peter1138 f19b87df08 (svn r8166) -Fix (r7797): Protect against out of bounds access to the sprite ptr
list.
2007-01-16 22:10:35 +00:00
Darkvater 0c9e65d8cc (svn r8165) -Revert r8107 and show the MD5SUM of the *REPLACEMENT* grf file, NOT the original one. Reason for this is that this md5sum is saved, and otherwise a wrong md5sum would be stored in a savegame. 2007-01-16 21:34:51 +00:00
Darkvater 542f156091 (svn r8164) -Codechange (r8159): Fix up some comments/doxygen for disasters and rename Submarine1/2 to small/big 2007-01-16 20:16:30 +00:00
miham 6cc178d577 (svn r8163) [Translations] Re-added cases for the czech language (they were removed either accidentally or on purpose, will look after it later 2007-01-16 19:27:28 +00:00
miham b67c92d7cd (svn r8162) WebTranslator2 update to 2007-01-16 19:44:34
brazilian_portuguese - 1 fixed, 66 changed by fukumori (67)
catalan    - 1 fixed by arnaullv (1)
czech      - 1 fixed by Hadez (1)
danish     - 1 fixed, 1 changed by MiR (1), ThomasA (1)
french     - 1 fixed by glx (1)
hungarian  - 1 fixed by miham (1)
italian    - 1 fixed by sidew (1)
japanese   - 1 fixed, 63 changed by ickoonite (64)
norwegian_nynorsk - 1 fixed, 37 changed by khaavik (28), pollux (10)
portuguese - 1 fixed by izhirahider (1)
slovenian  - 1 fixed by Necrolyte (1)
ukrainian  - 5 fixed, 16 changed by fevral13 (4), znikoz (17)
2007-01-16 18:45:25 +00:00
rubidium 3d6b021faa (svn r8161) -Fix (FS#555, r8144): enroute_from_xy was not set properly for old savegames. 2007-01-16 18:31:58 +00:00
maedhros eeaf5c1f1c (svn r8160) -Fix (r8151): Do not use HasSignals on tiles without railways. 2007-01-16 17:44:59 +00:00
Darkvater 6908565067 (svn r8159) -Cleanup: Sprinkle some coding-style and comments on the disaster code. 2007-01-16 16:54:06 +00:00
Darkvater 12f0e67437 (svn r8158) -Fix: The submarine disaster failed to move at all due to wrong masking of trackbits 2007-01-16 16:28:41 +00:00
rubidium f3796eee66 (svn r8157) -Fix (r3136): moving cargo during auto replaces did not update the cached vehicle weight for trains properly. This caused (in network games) the server to have a different cached vehicle weight than newly joined clients would have, which causes desyncs. 2007-01-16 15:45:20 +00:00
bjarni ccbe68d5bc (svn r8155) -Fix: fixed compilation when --disable-network is in use 2007-01-16 15:20:22 +00:00
peter1138 1395524390 (svn r8154) -Codechange: Water can no longer be under bridge tiles, so don't check for it. 2007-01-16 15:18:02 +00:00
peter1138 9b73684733 (svn r8153) -Codechange: Change UpdateStationAcceptance() and ShowRejectOrAcceptNews() to work with cargo IDs instead of cargo names, and explicitly list the different strings to use. 2007-01-16 11:13:00 +00:00
tron 3005bc3f01 (svn r8152) Fix a off-by-one error in the placement of the sticky box of the road build toolbar in the scenario editor 2007-01-16 08:10:29 +00:00
maedhros 895cc4fa47 (svn r8151) -Feature: Automatically build semaphores before a configurable date, which can be set by each network player seperately. 2007-01-15 22:18:35 +00:00
miham b4f128b5f0 (svn r8148) WebTranslator2 update to 2007-01-15 19:25:31
brazilian_portuguese - 4 fixed by fukumori (4)
bulgarian  - 1 fixed, 48 changed by groupsky (49)
croatian   - 163 fixed, 60 changed by Ydobon (223)
danish     - 23 changed by MiR (23)
esperanto  - 2 changed by LaPingvino (2)
italian    - 4 fixed by sidew (4)
japanese   - 5 fixed by ickoonite (5)
norwegian_bokmal - 4 fixed by brygge_2 (4)
norwegian_nynorsk - 830 changed by khaavik (822), Eikje3 (8)
portuguese - 4 fixed by izhirahider (4)
slovenian  - 4 fixed, 64 changed by Necrolyte (68)
2007-01-15 18:28:27 +00:00
bjarni 0026ea84d1 (svn r8147) -Fix: [autoreplace] v->leave_depot_instantly was not always reset correctly
While it's not certain if this would have any serious sideeffects (or any at all), it's reset when intended now
2007-01-15 17:32:42 +00:00
celestar 0fbdae2828 (svn r8146) -Fix (FS#552, r8038): a C/C++ linkage problem on some very few incarnations of gcc 2007-01-15 17:32:01 +00:00
belugas 7b9379e0de (svn r8145) -Featurette: Allow for Tropic Farm to plant fields after producing cargo, like its counterpart in temperate climate. 2007-01-15 16:31:46 +00:00
celestar 05b783e551 (svn r8144) -Fix: [FS#163] When a station is removed, vehicles do not get excessive payment any longer, as the origin TILE is now stored as long as the origin STATION for the transported cargos. Basically this is only a temporary fix until cargopackets are implemented, but it fixes one of the oldest known bugs (Special Thanks to Darkvater for lots of testing) 2007-01-15 14:42:24 +00:00
tron 3b22cfe70d (svn r8143) Remove the landscaping button from the build toolbars.
The landscaping toolbar can be reached at least as easy directly from the main toolbar.
Further two of the four toolbars uses 'l' as keyboard shortcut for this button, which plain does not work (The letter has to be uppercase).
This was covered by the fact there is a global shortcut 'L' to open the landscaping toolbar, so the individual checks in the four build toolbars were redundant anyway.
2007-01-15 07:38:36 +00:00
bjarni 19bdb49e5b (svn r8141) -Fix r8128: [OSX] now OSX can compile again.
Note: this is again another not so nice workaround as Objective C fails to include C++ code in the headers
    We should move to Objective C++ as soon as possible, but such a change is not done overnight and
    this quick fix will allow OSX to compile until the prober solution is done
2007-01-15 00:58:18 +00:00