tron
5e0c8a239e
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
...
See clear.h for details
2006-02-01 15:31:21 +00:00
tron
1c3e8630fe
(svn r3511) More whitespace ([FS#46] by Rubidium)
2006-02-01 07:36:15 +00:00
peter1138
80ecfb5ae4
(svn r3416) - Fix: Disallow building an oil rig above sea level.
2006-01-22 09:52:20 +00:00
tron
318fe153eb
(svn r3365) Staticise 36 functions
2006-01-05 12:40:50 +00:00
peter1138
80986fcd32
(svn r3282) - Codechange: Replace tests against CMD_ERROR with CmdFailed()
2005-12-10 12:05:39 +00:00
tron
ef7fb8b515
(svn r3205) Some more uses for GB/SB
2005-11-16 13:11:28 +00:00
tron
db012c135e
(svn r3195) Use bitfields instead of explicit shifting/masking
2005-11-16 11:55:06 +00:00
tron
9d0e7b6458
(svn r3181) -Bracing
...
-Indentation
-Whitespace
-DeMorgan's Law
-Test with NULL or 0 for non-booleans
-'\0' instead of 0 for chars
-Remove redundantly redundant comments (like DoFoo(); // Do foo)
-Join multiple short lines with a single statement
-Split single lines with multiple statements
-Avoid assignments in if
2005-11-14 19:48:04 +00:00
tron
a7843e1546
(svn r3180) Replace some magic numbers by symbolic names
2005-11-14 15:22:12 +00:00
tron
6509e42db3
(svn r3179) - RandomRange() and RandomTile() instead of home brewed versions
...
- CHANCE*() instead of mumbling strange numbers
2005-11-14 09:21:05 +00:00
tron
81e5b16d71
(svn r3172) static, const
2005-11-13 13:43:55 +00:00
tron
170de2019a
(svn r3135) Use symbolic names in the tables, which hold the information about accepted goods of industry tiles, instead of magic numbers
2005-11-04 16:12:48 +00:00
tron
181d586a7c
(svn r3078) Some more stuff, which piled up:
...
- const, whitespace, indentation, bracing, GB/SB, pointless casts
- use the trinary operator where appropriate
- data types (uint[] -> AcceptedCargo, ...)
- if cascade -> switch
- if (ptr) -> if (ptr != NULL)
- DeMorgan's Law
- Fix some comments
- 0 -> '\0', change magic numbers to symbolic constants
2005-10-23 13:04:44 +00:00
tron
0b936c3222
(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
...
nothing spectacular, just some stuff, which piled up
2005-10-22 06:39:32 +00:00
tron
71d293f2a3
(svn r3066) Constify the parameter of GetSlopeZ_*()
2005-10-19 14:49:46 +00:00
tron
b17b87469c
(svn r3064) Replace some numbers by sprite names
2005-10-19 06:46:41 +00:00
tron
8980891b09
(svn r3024) -Codechange: Another batch of replacements of int/uint/int16/byte/-1 with proper types and constants
2005-10-07 07:35:15 +00:00
tron
39f5dbfd3b
(svn r3019) -Codechange: Replace explicit shifting/anding/oring with GB and SB
2005-10-05 07:20:26 +00:00
peter1138
6687d63add
(svn r3018) -Fix: Fixed industry colour issue introduced in r3010.
2005-10-05 04:00:39 +00:00
tron
6d7c7e67b2
(svn r3010) Get rid of quite some dubious casts, either by using GB(), proper types or just removing them
2005-10-03 21:20:01 +00:00
tron
90e33aed22
(svn r2995) Replace 0xFF/0xFFFF with CT_INVALID/OWNER_SPECTATOR/INVALID_STATION where appropriate
2005-09-28 19:35:36 +00:00
Darkvater
4a58250cb9
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
...
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
2005-09-18 20:56:44 +00:00
tron
8b74a95d36
(svn r2886) Rename the "owner" attribute to "m1", because when it stores an owner it is accessed by [GS]etOwner anyway and when it doesn't store an owner, but arbitrary data, accessing a field called "owner" is confusing.
2005-08-23 18:47:04 +00:00
tron
2ae758a32b
(svn r2780) Remove some more unused strings and make the use of a few strings more explicit
2005-08-01 13:01:14 +00:00
celestar
a3739aecdf
(svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
...
by enums. There remains work in gfx.c to move the "transparency" and
"recolor" bits around to make space for more sprites. However, 2800
additional sprites can now be loaded. There also remains cleanup and
Doxygen work on many of the header files.
2005-07-24 15:56:31 +00:00
tron
647cbd6bdd
(svn r2701) Insert Id tags into all source files
2005-07-24 14:12:37 +00:00
tron
54cbd01825
(svn r2673) Include functions.h directly, not globally via openttd.h
2005-07-22 07:02:20 +00:00
tron
71140a5768
(svn r2669) Shuffle some more stuff around to reduce dependencies
2005-07-21 22:15:02 +00:00
tron
6ad3895306
(svn r2660) Get rid of some more shifting/anding/casting
2005-07-21 06:31:02 +00:00
celestar
1fed0046ac
(svn r2658) -Codechange: Use MAKE_TRANSPARENT to display a transparented sprite
2005-07-20 22:05:13 +00:00
tron
f09638ad3d
(svn r2650) Convert many explicit shifts+ands to extract bits to invocations of GB - should be a bit nicer to read
2005-07-20 15:29:28 +00:00
tron
7269771544
(svn r2643) Get rid of some unnecessary casts
2005-07-19 21:49:35 +00:00
celestar
de19186be3
(svn r2595) -Codechange: Introduced "IsSteepTileh" to find whether a tile is steep
...
(i.e. spans two height levels) and use it throughout the code.
-Codechange: Add CanBuildDepotByTileh to find if a tile is suitable to
build a depot on it. Wraps some bitmagic which seems quite unreadable at
first glance
2005-07-16 23:47:37 +00:00
ludde
ac4f823b54
(svn r2582) Fix: Prevent generating unrealistically many Oil refineries on large maps. They are always placed next to the borderline, so the perimeter is used instead of area to scale the number of those industries.
2005-07-15 19:51:54 +00:00
ludde
dc3ca73bd5
(svn r2580) Change: Added {INDUSTRY} command for printing industry names instead of the old {TOWN} {STRING} way.
...
- The formatting of the industry name can be controlled with the string STR_INDUSTRY_FORMAT.
Change: Changed several occurences of {STRING1} into {TOWN} to get rid of townnametype being used directly.
2005-07-15 18:30:13 +00:00
ludde
ddc939f0ed
(svn r2570) Fix: Removed some code that had no effect.
2005-07-15 12:16:16 +00:00
ludde
2123deff13
(svn r2560) Fix: various minor code changes.
...
Added RandomTile/RandomTileSeed functions to generate a random tile.
Changed landscape routines so they don't assume that the Y map side is a power of two. (support for this is not complete, though)
Changed some frequently used map macros to not compute the values each time.
Silence some warnings on MSVC.
2005-07-13 19:51:31 +00:00
tron
a4bf608d40
(svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
2005-07-13 18:04:01 +00:00
tron
9617614b04
(svn r2487) Replace TILE_XY by TileXY/TileDiffXY
2005-06-25 16:44:57 +00:00
tron
2b73dec567
(svn r2486) Turn TILE_FROM_XY into an inline function and rename it to TileVirtXY
2005-06-25 06:15:43 +00:00
tron
a733fede9b
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
2005-06-24 12:38:35 +00:00
Darkvater
ba8c649fac
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
2005-06-02 19:30:21 +00:00
Darkvater
f4f5cb93f8
(svn r2387) - CodeChange: made the saveload code more readable and also removed the 'byte' saveload arrays which means you can save an array of more than 255 elements, or bigger structs than 255 bytes. This doesn't yet solve the problem that a chunk can be a maximum of 16384 big.
...
- Fix: also fix an unnoticed error in SlSaveLoadConv() due to wrong types.
2005-05-30 22:16:05 +00:00
Darkvater
8969751c02
(svn r2304) - Fix (regression): excuse the Lumber mill from the list of raw-industries build-restriction, as it can be built always, patch-setting, or no patch-setting.
2005-05-13 18:19:26 +00:00
Darkvater
b43331c931
(svn r2290) - CodeChange: protect the next batch of commands. This brings us to a total of 61, which is 53% :)
...
- CodeChange: To correctly accept engine-prototypes, the best-player checking has been moved to its own function, I hope it functions the same as before.
- CodeChange: Added symbolic types of PlayerID, OrderID and EngineID. For engines also added GetEngine() and IsEngineIndex(), similar to the other such functions.
- CodeChange: To correctly build industries, some tables have been moved to build_industry.h. The only way to find out currently if an industry is valid in a climate is by looping all industries and checking if it matches. Also to comply with the patch setting build_rawmaterial_industries, it is assumed that these industries do not accept any cargo of any type. This can and probably should changed in the future to some flag in their struct. Also use _opt_ptr instead of _opt.
- CodeChange: implemented the HQ checking code inspired by MarkR2 in "[ 1190944 ] Many commands not checked for security". Unfortunately it is impossible to prevent only deleting a HQ by a modified client atm.
- CodeChange: For insert order and modify order their parameters are implicitely truncated to 8 bits, instead of the 16 bits said in the comments.
2005-05-11 00:00:27 +00:00
pasky
afcfbdf852
(svn r2107) - Codechange: Cleanup (well, mostly tidyup) ExtChangeIndustryProduction(). These randoms are strange.
2005-03-29 21:42:51 +00:00
pasky
6552c22785
(svn r2090) CheckNewIndustry_Oilwell() -> CheckNewIndustry_Oil() since it was concerning oil rigs and oil rafineries, but specifically NOT oil wells. ;-) Documented that.
2005-03-27 16:19:07 +00:00
tron
8827cde89e
(svn r1877) Forgot to remove two now unused variables
2005-02-14 22:19:56 +00:00
tron
943744751a
(svn r1876) Make placement of oil rigs and refineries map size agnostic
2005-02-14 22:17:21 +00:00
tron
6d2b9d2c3a
(svn r1863) Give the effect vehicle type enums more descriptive names and use the enum as parameter type for CreateEffectVehicle*()
...
-Fix: [1116619] Generate the correct smoke type for diesel trains
2005-02-12 15:53:32 +00:00