summaryrefslogtreecommitdiff
path: root/industry_gui.c
AgeCommit message (Collapse)Author
2007-01-02(svn r7759) -Merge: makefile rewrite. This merge features:rubidium
- A proper ./configure, so everything needs to be configured only once, not for every make. - Usage of makedepend when available. This greatly reduces the time needed for generating the dependencies. - A generator for all project files. There is a single file with sources, which is used to generate Makefiles and the project files for MSVC. - Proper support for OSX universal binaries. - Object files for non-MSVC compiles are also placed in separate directories, making is faster to switch between debug and release compiles and it does not touch the directory with the source files. - Functionality to make a bundle of all needed files for for example a nightly or distribution of a binary with all needed GRFs and language files. Note: as this merge moves almost all files, it is recommended to make a backup of your working copy before updating your working copy.
2006-12-30(svn r7637) -Codechange: Change ShowQueryString to use a window pointer as a ↵Darkvater
parent. If the query has no parent (eg give money, rename waypoint), the global function HandleOnEditText is used.
2006-12-26(svn r7565) -Codechange: Rework DEBUG functionality. Look for appropiate ↵Darkvater
debugging levels to use in debug.h. grfmsg() is now used as a specific debug-function for grf.
2006-12-05(svn r7372) - CodeChange: Rename all GetXXXArraySize() functions to ↵matthijs
GetNumXXX() and add GetMaxXXXIndex() functions. This prepares for the new pool interface.
2006-11-10(svn r7128) -Codechange: Replace magic numbers by magic enums (windowdesc ↵Darkvater
positioning WDP_AUTO = -1)
2006-10-31(svn r7022) -Fix [FS#292]: Properly guard against viewing company-sensitive ↵Darkvater
information from invalid players (eg spectators) which could lead to crashes.
2006-10-29(svn r7001) -Codechange: _build_industry_trypes is now only used by ↵belugas
industry_gui.c. Move it there. -Codechange: _industry_type_cost is not defined, remove its declaration
2006-10-24(svn r6926) -Codechange: Rename WWT_4 to WWT_TEXTBTN_2 and WWT_6 to ↵Darkvater
WWT_INSET (credits to peter1138 for the aptly found name) -Codechange: Remove the explicit numbering from WindowWidgetTypes
2006-10-24(svn r6925) -Codechange: Be more strict with widget distinctions. WWT_PANEL ↵Darkvater
is only plain panel, WWT_IMGBTN must contain an image for drawing. Renamed WWT_PANEL_2 to WWT_IMGBTN_2 because that is what it is. Added WWT_PUSHBTN that is either just a pushable button, or a textbutton, which text's drawn dynamically independent of widget.
2006-10-21(svn r6884) -Codechange: Add strict bounds checking in string formatting system.Darkvater
The last parameter should point to the end of the buffer (eg lastof(buf)) Courtesy of Tron.
2006-10-20(svn r6855) - Codechange: When displaying a "quantity of cargo" string, use ↵peter1138
the {CARGO} command and supply the cargo type and quantity, instead of manually looking up the cargo type's string.
2006-10-14(svn r6774) -Codechange: Rename the badly named OWNER_SPECTATOR to ↵Darkvater
PLAYER_SPECTATOR and put it into player.h where it belongs (instead of map.h)
2006-10-03(svn r6631) -Codechange: Use accessors for click_state.belugas
Another step toward merging XTDwidget. The only two files not converted (window.h and widget.c) will be done at the very last commit)
2006-09-23(svn r6499) -Codechange: Finally, got "byte event" outside of the union ↵belugas
WindowEvent, which is now a struct
2006-09-18(svn r6475) - Fix (r6055): Don't try to sort industries when there are none. ↵peter1138
Thanks to 'Delboy'
2006-08-22(svn r6055) -Codechange: added GetXXXArraySize, which returns HighestID + 1 ↵truelight
(or, will do that). It isn't the best name, but we couldn't find any better. This unifies the pool-system even more.
2006-08-22(svn r6047) -Codechange: FOR_ALL now _only_ loops valid items, and skips ↵truelight
invalid ones -Codechange: use IsValidXXX where ever possible Note: both changes to prepare for new pool system, which needs those changes. For every pool there are 2 ugly lines, which will be removed when done implementing new pool system. Based on FS#13 by blathijs, partly implemented.
2006-08-22(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. ↵rubidium
whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
2006-08-19(svn r5944) -Merge TGP (r5578, r5579, r5724, r5726): -Feature: filter for ↵truelight
textboxes to only allow certain patterns (like numbers only)
2006-08-15(svn r5912) -Fix: Sort order for produced amount and transported percentage ↵tron
was reversed in the industry list Also slightly change these sorting criteria: If an industry produces more than one type of cargo sort by the sum (amount) resp. minimum (%) instead of the mean
2006-08-15(svn r5907) Remove more indirection by using pointers instead of IDs. Also ↵tron
fix some bogus warnings on MSVC by using (void*) casts
2006-08-02(svn r5714) Backport from branches/TGP (r5701 and r5711)miham
-Fix: < > boxes in patch-settings didn't grey out when they hit the limit of their range -Codechange: while at it, prettyfied DrawArrowButtons() a bit -Fix: < > boxes in industry production window (when cheat enabled) had a minor glitch
2006-07-30(svn r5654) -Cleanup: Change an ugly define into a functionDarkvater
2006-07-30(svn r5653) -Cleanup: Do a little cleanup of the industry gui code.Darkvater
2006-07-30(svn r5652) -Fix [SF 1480301]: Industry production change button doesn't workDarkvater
2006-07-26(svn r5609) CodeChange : Apply coding stylebelugas
2006-04-28(svn r4614) CodeChange : Cleanup of industry_cmd (Step-4).belugas
Removing the _industry_type_costs in favor of IndustrySpec.cost_multiplier; In order to let industry_gui use the GetIndustrySpec accessor, some structs had to be moved in industry.h
2006-03-01(svn r3710) - Use the general function DrawArrowButtons() instead of doing ↵Darkvater
it manually. The function has two parameters added, colour and an enabled flag.
2006-02-13(svn r3597) Miscellaneous (I like that word) changes: Fix some indentation, ↵tron
add consts, reduce indentation level by short-circuit logic, convert if cascades to switch, whitespace, bracing, plus some minor stuff
2006-02-06(svn r3564) Several smaller changes:tron
- Don't treat non-booleans as booleans - Reduce variable scope - Bracing - Use DeMorgan's law to make conditionals easier to read - if cascade -> switch - Replace some magic numbers by symbolic names - Avoid assignments within other statements
2006-02-01(svn r3511) More whitespace ([FS#46] by Rubidium)tron
2006-02-01(svn r3510) Fiddle with whitespace and parenthesestron
2006-01-21(svn r3414) - Fix: Disable the Fund New Industry menu item and window when ↵peter1138
connected to a server as a spectator.
2005-12-07(svn r3270) Correct all (mis)uses of WWT_CLOSEBOX / WWT_TEXTBTN to reflect ↵peter1138
their actual use, and add "Close Window" tooltip where missing.
2005-10-26(svn r3090) Remove long dead pieces of codetron
2005-09-28(svn r2995) Replace 0xFF/0xFFFF with ↵tron
CT_INVALID/OWNER_SPECTATOR/INVALID_STATION where appropriate
2005-09-10(svn r2932) Give the strings consisting of an up/a down arrow symbolic namestron
2005-07-24(svn r2701) Insert Id tags into all source filestron
2005-07-22(svn r2673) Include functions.h directly, not globally via openttd.htron
2005-07-21(svn r2669) Shuffle some more stuff around to reduce dependenciestron
2005-07-16(svn r2594) Fix: [strgen] Misc updates to the string system.ludde
- Renamed the plural command to "P" instead of "PLURAL". Now write something like this to append an s on plural: {P "" s}. (You can optionally still add an argument index to explicitly specifiy which number that's used) - Removed the pluralized cargo strings from the string files. The new method is to use the plural specifier {P} - Added support for genders. First add "##gender der das die" on top, then use {G=der} on a cargoname/industry to set the gender, and to switch between genders do something like {G neu neu neue} {STRING} - Updated the swedish/english translation with P strings.
2005-07-15(svn r2580) Change: Added {INDUSTRY} command for printing industry names ↵ludde
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(svn r2572) - Codechange: [string] Changed string system so it's not as ↵ludde
dependent on decode_parameters - Feature: [strgen] Allow changing the order of parameters in translated strings. - Use {1:TOWN} syntax to set the order. - Codechange: [strgen] Rewrote lots of strgen internals.
2005-06-25(svn r2487) Replace TILE_XY by TileXY/TileDiffXYtron
2005-06-06(svn r2420) - Codechange: magic number elminitation of cursorsprites.Darkvater
2005-06-02(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.Darkvater
2005-05-11(svn r2290) - CodeChange: protect the next batch of commands. This brings us ↵Darkvater
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-04-08(svn r2170) -fix: [1179457] the industry list can now no longer scroll down ↵bjarni
then the end of the list is reached (Hackykid)
2005-02-20(svn r1892) -Fix: [ 1117730 ] Production values of temperate-climate banks ↵celestar
can now be altered
2005-02-19(svn r1890) Begin to clean up the edit box: Remove one global variable and ↵tron
split the combined edit/original buffer into two