Commit Graph

164 Commits (3beb23e1c6760035c0af4914c0636cd4fb83b707)

Author SHA1 Message Date
matthijs e6ade36de1 (svn r7372) - CodeChange: Rename all GetXXXArraySize() functions to GetNumXXX() and add GetMaxXXXIndex() functions. This prepares for the new pool interface. 18 years ago
Darkvater 22ab60c9cb (svn r7206) -Codechange: Remove (some of) the magic needed for windows that could be invalid after
a call to DeleteWindow() somewhere else. Also do some cleanup with AllowWindowDescFront()
18 years ago
Darkvater e786cd5c6b (svn r7128) -Codechange: Replace magic numbers by magic enums (windowdesc positioning WDP_AUTO = -1) 18 years ago
Darkvater d1a31a56b9 (svn r7077) -Codechange: Send proper message to network window, and handle selection control in
there instead of calling function.
18 years ago
Darkvater fce635719a (svn r6956) -Feature: Increase the chatbuffer of chat messages. Messages longer than the allocated
graphical box will be wrapped to a new line.
18 years ago
Darkvater c8a176b73f (svn r6937) -Codechange: Add an InitializeTextBuffer() function that handles setting up the
textbuffer instead of typing it out each and every time.
18 years ago
Darkvater a7c484f1ea (svn r6933) -Feature: Allow spectators to speak to eachother (team) 18 years ago
Darkvater a28048a4ea (svn r6931) -Codechange: Change textmessage format a bit. Only the sender's name and target are
in the sender's colour, the actual message is in white. Should improve readability.
18 years ago
Darkvater 02a6df391d (svn r6926) -Codechange: Rename WWT_4 to WWT_TEXTBTN_2 and WWT_6 to WWT_INSET (credits to peter1138
for the aptly found name)
-Codechange: Remove the explicit numbering from WindowWidgetTypes
18 years ago
Darkvater c7c65ce6d5 (svn r6925) -Codechange: Be more strict with widget distinctions. WWT_PANEL 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.
18 years ago
Darkvater 494c56475f (svn r6884) -Codechange: Add strict bounds checking in string formatting system.
The last parameter should point to the end of the buffer (eg lastof(buf))
 Courtesy of Tron.
18 years ago
Darkvater fcd2af4643 (svn r6879) -Codechange: Remove the superflouos argument CharsetFilter parameter from HandleEditBoxKey
as the same information is present in querystr_d->afilter
-Also (&((querystr_d *)&WP(w, querystr_d))->text is the same as &WP(w, querystr_d).text
18 years ago
Darkvater 5459f53c95 (svn r6876) -Codechange: Change the naming of _PLAYER in DESTTYPE_PLAYER/NETWORK_ACTION_CHAT_PLAYER
to _COMPANY as that is whom you are really addressing to. Also change some variable
 names, 'desttype' is confusing if there is also a parameter 'dest', so rename it to
 just type.
18 years ago
Darkvater 4b674976d5 (svn r6854) -Codechange: Use DrawSringCentered instead of DrawStringMultiCenter for simple
strings if maximum width is set to zero anywyas.
18 years ago
Darkvater c8ffe7bd0e (svn r6825) -Codechange: Remove two globals from chat-window 18 years ago
Darkvater c1bc092c76 (svn r6824) -Feature: Change the functionality of the chat window. SHIFT+ENTER (SHIFT+T)
sends a message to all players, CTRL+ENTER (CTRL+T) sends a message to all
 team mates and ENTER (T) sends a message to teammates if you have any, otherwise
 to all players.
 The chat-window now also shows what kind of message is being sent. Shortcut
 functionality has not been changed (ENTER sends message, ESC closes window)
18 years ago
Darkvater 83bed39106 (svn r6820) -Codechange: Some more const correctness, coding style.
-Codechange: Add FOR_ALL_ACTIVE_CLIENT_INFOS macro that will loop all clients
 skipping inactive ones.
18 years ago
Darkvater 33bdf3c701 (svn r6816) -Codechange: Some coding style, variable localization, const correctness.
-Codechange: 'quited' is not a word, use has_quit instead for NetworkClientState
18 years ago
Darkvater b70e4cefb3 (svn r6814) -Codechange: For network games ci->client_playas was always p->index + 1. To
correctly handle this ci->client_playas - 1 was used all over the code making
 it pretty confusing at times. Use proper one-on-one values now. Special handling
 is only needed for user-output to not to confuse users.
18 years ago
Darkvater 9e8b077426 (svn r6787) -Codechange: Use PLAYER_NEW_COMPANY as a player identifier wishing to become a
new player instead of a 0.
18 years ago
Darkvater a85d679f54 (svn r6774) -Codechange: Rename the badly named OWNER_SPECTATOR to PLAYER_SPECTATOR and
put it into player.h where it belongs (instead of map.h)
18 years ago
Darkvater 6b96b5ffd0 (svn r6754) -Codechange: Remove some #idef ENABLE_NETWORK specific defines. With networking
disabled hardcode _networking/_network_available to zero and let the compiler
 handle all optimizations.
18 years ago
Darkvater 0ca42cbd44 (svn r6750) -Codechange: Juggle around some header includes as they're only used when
networking is enabled.
18 years ago
Darkvater e7149e316e (svn r6688) -Fix (r6297): Wrong caption for server password query window (eg put 'break' after switch statements) 18 years ago
belugas 688da1d940 (svn r6631) -Codechange: Use accessors for click_state.
Another step toward merging XTDwidget.
The only two files not converted (window.h and widget.c) will be done at the very last commit)
18 years ago
belugas cf210fdf6b (svn r6619) -Codechange: Use accessors for disabled_state.
Another step toward merging XTDwidget.
The only two files not converted (window.h and widget.c) will be done at the very last commit)
18 years ago
belugas 98ba395277 (svn r6499) -Codechange: Finally, got "byte event" outside of the union WindowEvent, which is now a struct 18 years ago
Darkvater eb9a2dd3f6 (svn r6372) -Codechange: static, unneeded decleration in headers, superfluous header includes
-Codechange: Unify the Sorting struct both for vehicle-lists and network-lists.
18 years ago
tron 0d6fa61e9f (svn r6297) -Codechange: Disentangle the query window mess a bit: Move the network game password handling somewhere were it belongs to 18 years ago
tron e7783e0240 (svn r6276) Remove a redundant assignment 18 years ago
Darkvater 9f73fce941 (svn r6169) -Codechange: Use GetString() instead of GetStringWithArgs() which should be
integral to strings.c
18 years ago
truelight 15aff22c96 (svn r6055) -Codechange: added GetXXXArraySize, which returns HighestID + 1 (or, will do that).
It isn't the best name, but we couldn't find any better.
  This unifies the pool-system even more.
18 years ago
truelight 505566da5c (svn r6047) -Codechange: FOR_ALL now _only_ loops valid items, and skips 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.
18 years ago
rubidium 908d3bcfe6 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct. 18 years ago
rubidium db397d5a75 (svn r6002) -Cleanup: remove the now redundant BASE_YEAR constant. 18 years ago
truelight 054dd2802b (svn r5972) -Fix: usr strrchr instead of your own function (tnx Darkvater)
-Codechange: added some comments and const correctness (Darkvater)
18 years ago
truelight 17127970fe (svn r5968) -Feature: add auto-completion in chat-window. It completes Player-Names and
Town-Names (that order) using <tab>. Based on FS#28 by egladil.
18 years ago
truelight 7abad2b20e (svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
- New optional landscape generator (TerraGenesis Perlin)
  - Load heightmaps (either BMP or PNG)
  - Progress dialog while generating worlds (no longer a 'hanging' screen)
  - New dialogs for NewGame, Create Scenario and Play Heightmap
    - Easier to configure your landscape
    - More things to configure (tree-placer, ..)
  - Speedup of world generation
  - New console command 'restart': restart the map EXACTLY as it was when you
      first started it (needs a game made after or with this commit)
  - New console command 'getseed': get the seed of your map and share it with
      others (of course only works with generated maps)
  - Many new, world generation related, things
  - Many internal cleanups and rewrites
  Many tnx to those people who helped making this:
     Belugas, DaleStan, glx, KUDr, RichK67, Rubidium, and TrueLight (alfabetic)
  Many tnx to those who helped testing:
     Arnau, Bjarni, and tokai (alfabetic)
  And to all other people who helped testing and sending comments / bugs
  Stats: 673 lines changed, 3534 new lines, 79 new strings
18 years ago
truelight d3f2180438 (svn r5944) -Merge TGP (r5578, r5579, r5724, r5726): -Feature: filter for textboxes to only
allow certain patterns (like numbers only)
18 years ago
rubidium c55962f8a2 (svn r5916) -Cleanup: use MIN_YEAR/MAX_YEAR for the year boundaries and BASE_YEAR when comparing _cur_year with a 'full' year.
-Cleanup: replace some magic '1920' values with BASE_YEAR.
18 years ago
rubidium 9fc837ad85 (svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch]
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
18 years ago
Darkvater 97c3b5cad8 (svn r5767) - Cleanup: Improve upon the header file mess regarding fios. Move all relevant types from hal.h into fios.h, eliminate the unneccessary passing of a global variable, and extern variables in header files (declare in fios.c and misc_gui.c 18 years ago
Darkvater 7ce6a95eb9 (svn r5655) -Fix [SF 1424115]: Reversed arrow-sign in the multiplayer list column headers on sort by name 18 years ago
belugas 40a8964911 (svn r5609) CodeChange : Apply coding style 18 years ago
tron 772fbda3e3 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 18 years ago
tron 347473b0b0 (svn r5226) Reduce the mess that sending chat messages is
This also fixes a bug:
-Fix: It was possible to rename a signs or waypoints with the chat box
18 years ago
Darkvater 2128dbec13 (svn r4892) - Fix [FS#162]: SEGV when sorting an empty server list. (glx) 18 years ago
Darkvater 26db3ac91f (svn r4623) - Codechange: s/byte/PlayerID/ 18 years ago
tron 5b7e846fd4 (svn r4315) Remove MAX_QUERYSTR_LEN, rather use lengthof() the real thing 19 years ago
tron 0099dc31f5 (svn r4314) -Fix: a buffer overflow of the chat box introduced in r1263. Don't tell the Textbuf an arbitrary number as size of the string buffer, but the real lengthof() it 19 years ago