243 Commits

Author SHA1 Message Date
Philippe Plantier
ec38d67fff Adding the support for the Arphic gkai00mp.ttf font for the Chinese language
Fixed a font-initialization-order bug, where the font order was not
used in the title screen.
2005-04-09 09:46:12 +00:00
Philippe Plantier
7d156ebfa5 Enabled the loading of savegames to be tolerant to corrupt / badly formed saves
...like those issued with some versions of the game.
2005-04-05 19:42:07 +00:00
Yann Dirson
ed421496bc downscaling of campaign-selection dialog in tinygui mode - now usable at 320x240 2005-04-04 20:05:58 +00:00
Philippe Plantier
ba195ecd8a [[Attack some problems with data serialization in saves]]
* Made serialized data be saved as untranslated. To achieve this, added the
  t_string class, which encapsulates a translatable string.

* Completely rewrote the (text) WML parser, making it use a tokenizer / parser
  architecture. The parser is now much more strict and validates a WML grammar.

  - Change to the WML syntax: pluses are now ignored, spaces are now forbidden
    in WML keys

* Rewrote the way the variables are interpolated. There is no more default
  interpolation, however, the vconfig class was added, which provides a
  variable-interpolating proxy to config objects.

* There is still an important known bug: this is impossible to load textmode
  save games now, because the statistics module saves some WML with spaces in
  keys, which the parser refuses. I am commiting anyway to respect the string
  freeze; the fix for this bug will come tomorrow

Hoping I do not break everything...
2005-03-27 23:06:17 +00:00
Guillaume Melquiond
d501297a65 Switch to the new logging macro. 2005-03-26 17:10:32 +00:00
Yann Dirson
f83a0b1f76 split a game exceptions into their own file...
...to avoid gratuitous dependencies on gamestatus, some cleanup of
deps against gamestatus
2005-03-22 23:42:37 +00:00
Guillaume Melquiond
37cd7c8e1c Fix breakage of village capture and help system.
Also simplify some conditionals since size_t is stated to be an
unsigned type that can at least contain a normal-sized positive
integer.
2005-03-19 14:54:00 +00:00
Philippe Plantier
dee75de20c [[Side-handling and objective fixes]]
* Added the ability for each side to have its own objectives.
* Applied a modified version of patch #3789 from ott which allows objectives to
  be set via events.
* Fixed some compile-time warnings
2005-03-19 13:02:34 +00:00
Philippe Plantier
183e200ef8 Const-correctness on play_level, and play_turn. 2005-03-19 10:26:43 +00:00
Yann Dirson
432a5eb12a cleanup of deps against display: most widgets do not need a display at all 2005-03-18 21:21:48 +00:00
Yann Dirson
a5a9f8205d cleanup of deps against display: fonts do not need a display at all 2005-03-15 20:01:31 +00:00
Yann Dirson
a84fa65770 include cleanup: replay, show_dialog 2005-03-10 21:42:10 +00:00
Yann Dirson
64250882ba include cleanup: map 2005-03-10 01:47:57 +00:00
Yann Dirson
ed6810894b include cleanup: gettext, language 2005-03-09 22:58:18 +00:00
Yann Dirson
061687f977 move most colons following a translatable label into the label 2005-02-27 15:43:54 +00:00
Yann Dirson
aac9369f18 moved wml/widget separators to their own header;
drop widget/button dependency on wodget/menu
2005-02-25 01:07:20 +00:00
Guillaume Melquiond
fa1f3f6444 Remove the template code from animated.hpp and put it into animated.cpp.
This code was indirectly included in at least 25 files: the 25 files
for which a dependency on string_utils.hpp has been added by a
consequence of its removal from animated.hpp. It should induce a small
compile time improvement.
2005-02-21 09:05:51 +00:00
Guillaume Melquiond
2ab05941b5 Completely remove string functions from config.cpp. 2005-02-20 21:45:22 +00:00
Guillaume Melquiond
8dd5bc8a76 Fix commas not being followed by space in the unit preview pane (patch #3657). 2005-01-19 20:11:34 +00:00
Isaac Clerencia Perez
a1214b626d Added wassert(), a assert()-like function forcing a crash.
Replaced every assert() with wassert()
2004-12-31 21:01:38 +00:00
Dave White
a469fc31fb made it so that click-to-attack makes the unit move...
....to the nearest hex to the cursor
2004-12-30 02:52:37 +00:00
Guillaume Melquiond
8a4607db34 Remove unused parameter from dialogs.cpp. 2004-12-02 22:30:38 +00:00
Guillaume Melquiond
38adaf1105 Another fix for compiling with Irix CC. 2004-12-02 21:57:28 +00:00
Guillaume Melquiond
4651953c1c Remove two useless functions from language.cpp. 2004-11-30 21:41:19 +00:00
Guillaume Melquiond
d7b3e389b7 Remove unused parameters and enum from font.cpp. 2004-11-27 10:24:50 +00:00
Guillaume Melquiond
67fa0b0fc6 Remove unused parameters from image.cpp. 2004-11-27 09:49:44 +00:00
Guillaume Melquiond
e517e45464 Remove unused parameter. 2004-11-21 21:15:56 +00:00
Guillaume Melquiond
0ce5c9afe7 Fix dumb header includes. 2004-11-18 19:21:17 +00:00
Dave White
c661b3043a reduced warnings to 0 on VC++ 2004-11-18 04:08:33 +00:00
Guillaume Melquiond
1242e0aecb Code reduction. 2004-11-06 18:57:27 +00:00
Guillaume Melquiond
a5cfc0238e Add update_location for a 2-stage set_location;
refresh bugs may ensue since it inverts the rectangle registration
process. Rename register_rectangle in bg_register. Add
set_measurements to remove contiguous call to set_width and
set_height.
2004-11-06 13:13:16 +00:00
Yann Dirson
1d61e847f4 provide font::relative_size() for easy scaling of gui dimensions;
use it to make recruit dialog fit on 320x240
2004-11-04 20:58:43 +00:00
Philippe Plantier
2387af2d53 Fixed the profile button now working.
Fixed by renaming "process" to process_event in the unit preview pane, whether
this is the right thing to do should be reviewed.
2004-11-03 22:20:27 +00:00
Guillaume Melquiond
4f78f62b46 Switched to draw_contents system.
And fixed background refreshing of campaign selection dialog.
2004-11-02 20:50:55 +00:00
Guillaume Melquiond
92cc99799b The widgets rewrite;
a whole lot of new bugs for those who were bored with the old ones. It
comes with a patch (see task #3503) in case somebody needs to revert
it.
2004-10-31 20:50:13 +00:00
Philippe Plantier
04555a3bbd Fixed bug #10664.
Made it possible in show_dialog to specify the maximum length of the
text widget.

show_dialog invocation really is cluttered. Maybe we should replace it, using
the "named parameter idiom" ?
2004-10-27 19:28:07 +00:00
Guillaume Melquiond
eccab67752 Translate the unit preview pane. 2004-10-23 16:45:26 +00:00
Cédric Duval
1f136e417f Display version of savegame in load dialog. (#10670)
(this information will appear for savegames made after this commit)
2004-10-22 12:34:42 +00:00
Guillaume Melquiond
b353486bd9 Switched to new logging system 2004-10-05 21:28:12 +00:00
Yann Dirson
1702b387ed more fontsize names, more source files converted, -DUSE_TINY_GUI can be used to test with smaller fonts 2004-09-25 19:46:33 +00:00
Cédric Duval
84cee96a5a Eradicated C style cast. 2004-09-23 12:54:54 +00:00
Cédric Duval
4dad657344 Campaigns description support. 2004-09-22 00:05:33 +00:00
Jordà Polo
ceebdae2a2 unified unit_preview_pane 2004-09-19 15:36:24 +00:00
Jordà Polo
f26a4ee11c added/fixed some dialog titles 2004-09-19 14:00:51 +00:00
Yann Dirson
1af1e56ec7 use macro to make it easier to eventually switch textdomain 2004-09-03 09:20:31 +00:00
Yann Dirson
558d7daf14 first attempt at desentangling file deps to make editor smaller 2004-09-02 15:41:10 +00:00
Dave White
3b70cd0127 small dialog improvements 2004-08-30 01:23:16 +00:00
Dave White
2191efbfe4 made it so that saving with illegal characters in the filename...
....will fail elegantly with an error message
2004-08-29 23:28:26 +00:00
Dave White
0172e51f45 removed some unnecessary diagnostics (CVS internal) 2004-08-25 02:59:51 +00:00
Yann Dirson
84417bae45 get rid of most remaining translate_string() calls 2004-08-24 19:49:35 +00:00