14 Commits

Author SHA1 Message Date
Anthony Calosa
ec078b6ccc customLen
for formatting text on booster shop, we pass the desired length from
getformatted text with noremove(no removal of {}) enabled, if its not
enabled then default the value to zero(passing zero means use the
default values)
2017-02-25 07:27:57 +08:00
Anthony Calosa
cd1b629191 Fix Segmentation Fault & Formatting 2015-11-10 11:58:36 +08:00
Xawotihs@gmail.com
490752e9da - Removed dependencies on Boost/string in mtg sources
- Removes dependencies on Boost/shared_ptr in mtg sources only for WP8 for the moment
- Various compilation fixes on WP8
2013-09-30 21:25:17 +00:00
Xawotihs@gmail.com
26ab65860e Fixed a gazillion of warnings occuring when compiling Wagic with Clang with Werror. 2013-06-09 21:16:39 +00:00
techdragon.nguyen@gmail.com
e53c16f700 No code change just reformatting of header files.
finishing up my reformatting of the source from November/December following the guidelines that were posted.
some extra things I added:
   * Any empty virtual declarations were kept to one line.  
   * Enums were split up into separate lines to promote uniformity across all headers. ( each header file had a different style for enums)
2011-01-21 18:01:14 +00:00
linshier
aa6aa20ba5 Fixed left offset parameter handling for center/right align string drawing. A brief note about string drawing, offset and display width is added in the WFont.h 2010-12-01 08:01:13 +00:00
linshier
970cd456de Fixed some utf-8 decoding for Japanese and tweaked card text formating for multi-encoding support. 2010-11-29 17:40:21 +00:00
jean.chalard
1317eb0d29 J :
* Add multilingual support for utf-8.
* Use japanese as a test case (removing the old tentative support).
* A number of shortcomings affect this code.
  + Bugs :
    - This splits algorithms used to determine the length of a string
      and to render it in two: either the string starts with an ascii
      char and the monobyte, variable-space algorithm is used, or it
      does not and a multibyte but fixed-space algorithm is used.
      This shortcoming also exists in the code to support chinese.
    - From the above comes the biggest limitation: any string that
      starts with an ascii character but include non-ascii characters
      will not be rendered correctly.
    - This does not and cannot support chars outside the BMP. This
      probably won't matter, ever.
  + Todos, fixmes, wishlist :
    - Single-width characters with diacritics are reported as
      double-space chars. It doesn't matter too much at the moment, but
      should be fixed in the future.
    - Font support currently only includes japanese.
  + Performance and compatibility notes :
    - Chinese code has not been switched to utf-8, to maintain backward
      compatibility. We should switch it at some point in the future,
      but ponder the right way to do it first.
    - Retaining the support for chinese with a non-international
      charset hurts performance (by making some methods uselessly
      virtual).
* Still, this generally works and is extensible (it can be used to
  implement korean, traditional chinese, etc, without any more code).
  Implementing languages with diacritics needs an improvement of the
  bool doubleWidthChar() method.
2010-11-14 16:24:29 +00:00
linshier
60ef07a025 Added basic Japanese font support. 2010-10-24 07:56:28 +00:00
wrenczes@gmail.com
5aa3dc6fd3 Refactoring of some of the font management in WResourceManager. This change looks bigger than it actually is - most of the touched files are simply renaming of some font enums that I moved out of MTGDefinitions into the resource manager header files. The main points of this change: collapsing the font containers into a single map, eliminating duplicated functions, and migrating the font building logic into the resource manager class. GameApp doesn't need to know anything about the fonts it uses, and likewise, font users don't need to know what the name of their chosen font is, just the FONT_TYPE enum.
(I did a cursory check to make sure chinese still displays correctly - at a glance, I'm seeing what looks correct to someone who doesn't read the language :) )
2010-10-19 07:51:32 +00:00
wrenczes@gmail.com
3ca5a7261d More warning conversion cleanup. 2010-10-14 05:05:37 +00:00
wagic.the.homebrew@gmail.com
3d3b4112cb Erwan
- minor font fixes by linshier
2010-08-08 11:45:53 +00:00
wagic.the.homebrew@gmail.com
ce69e23357 Erwan
- minor fix in Zethfox cards addon (Bad lines error from parser)
- Zethfox's patch for {t(target)} as an extra Cost. Works the same way as sacrifice, check Azami, Lady of Scrolls for an example
- fixed compilation on the PSP (sorry!)
2010-08-01 03:21:59 +00:00
wagic.the.homebrew@gmail.com
f40af0b1cb Erwan
- Chinese patch by linshier
2010-07-31 14:41:04 +00:00