peter1138
1955d1acd6
(svn r7254) -Fix (r7250): move unicode glyph map initialisation to just before newgrf files are loaded, else newgrf glyphs will be cleared out too. (thanks Hadez)
2006-11-24 20:47:29 +00:00
peter1138
c079c83eb6
(svn r7250) -Codechange: Shuffle sprite loading and character width caching around a bit. This reduces the number of times the sprites are loaded from 5 to 2, just for the intro game.
2006-11-24 18:39:22 +00:00
peter1138
1a4f1c8177
(svn r7182) -Feature: Merge utf8 branch. This brings us support for Unicode/UTF-8 and the option for fonts rendered by FreeType. Language changes to come.
2006-11-16 22:05:33 +00:00
Darkvater
bc3c56ffeb
(svn r6957) -Cleanup: comments, coding style
2006-10-27 11:09:24 +00:00
Darkvater
d7d4f0192d
(svn r6953) -Codechange: Change FormatStringLinebreaks in such a way that if no whitespace was seen
...
for the 'current line' of a certain maximum width, the string will be truncated instead
of the old behaviour which just left it alone.
2006-10-27 09:55:38 +00:00
Darkvater
93599c1be5
(svn r6938) -Codechange: Comments, typo, variable naming, whitespace, strecpy and simplification
...
of order_gui (only disable a single widget if not local player, all others aren't
visible anyways).
2006-10-24 23:11:40 +00:00
peter1138
61611711e3
(svn r6908) - Codechange: Modify DrawStringMultiLine() to return the number of pixel lines used, and use it for drawing NewGRF additional text (mart3p)
2006-10-23 18:13:24 +00:00
Darkvater
ee27bb497c
(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.
2006-10-21 23:31:34 +00:00
Darkvater
7147c83bcc
(svn r6743) -Fix (r6462): When determining string length for GetStringBoundingBox SETX and
...
SETXY parameters were wrongly accounted for. The identifier itself was taken
not the amount.
2006-10-12 10:14:45 +00:00
Darkvater
b28b547a81
(svn r6463) -Fix (r6462): Reset the string width to zero on every new line of course...
2006-09-16 13:44:12 +00:00
Darkvater
3ccc87b376
(svn r6462) -Codechange: Have GetStringWidth() return width as well as the height bounding
...
box of the string. Therefore rename the function to GetStringBoundingRect()
and have it return a BoundingRect type of width/height
2006-09-16 13:20:14 +00:00
Darkvater
3b279b502f
(svn r6404) -Fix: GetStringWidth failed to calculate correct string width if the string
...
contained newlines.
2006-09-05 23:02:31 +00:00
tron
07199603b4
(svn r6351) -Fix: Due to some off-by-one errors the width or height of a clipping rectangle could become 0, which isn't sensible. This should fix a very rare and hard to trigger assertion in GfxFillRect()
2006-09-02 21:52:06 +00:00
tron
a286726fe9
(svn r6347) Undo
2006-09-02 20:34:33 +00:00
tron
5f7d99fb6d
(svn r6346) -Codechange: Remove redundant assignment
2006-09-02 20:34:04 +00:00
tron
1d1a4839c3
(svn r6303) -Codechange: Remove dead code
2006-09-02 08:14:16 +00:00
tron
2890ed33b8
(svn r6302) -Codechange: Remove dead code paths, because the lowest bit of Sprite::info is never unset
2006-09-02 07:13:21 +00:00
tron
dcc25abeec
(svn r6301) -Codechange: if () cascades -> switch ()
2006-09-02 06:36:30 +00:00
tron
17c610c0f4
(svn r6209) Move DrawFrameRect() out of gfx.[ch], because it uses data (_color_list) which the renderer shouldn't have know about
2006-08-29 06:07:57 +00:00
tron
2eb76813ed
(svn r6184) Remove the unused (because it was NULL in all callers) second parameter of FillDrawPixelInfo() and simplify some expressions
2006-08-28 07:33:51 +00:00
tron
523519c8ec
(svn r6183) Move GetDrawStringPlayerColor() out of gfx.[ch]
2006-08-28 06:21:48 +00:00
tron
f5e70b67b5
(svn r6180) Use a switch instead of function pointers to choose the blitter
2006-08-28 06:05:04 +00:00
rubidium
480af9c917
(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.
2006-08-22 14:38:37 +00:00
rubidium
0c3093b25f
(svn r5967) -Change: use right alignment for the year in the player's balance window instead of centering (about) 'string width' / 2 from the right edge
2006-08-20 10:50:23 +00:00
truelight
10b842bddc
(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
2006-08-19 10:00:30 +00:00
belugas
6082507fea
(svn r5609) CodeChange : Apply coding style
2006-07-26 03:33:12 +00:00
peter1138
fd778ecafa
(svn r4802) - Codechange: replace _stringwidth_base and associated magic numbers with a FontSize enum, using the numbers (which are SpriteIDs) in only the places needed.
2006-05-09 13:23:04 +00:00
peter1138
52bab5e9bd
(svn r4793) - Replace list of magic numbers (characters that don't exist) with a call to SpriteExists(), when building the character width cache.
2006-05-09 11:42:51 +00:00
Darkvater
ea1adebe31
(svn r4075) - Feature: Undraw the mouse when it leaves the window and Draw it again when it enters. Added both for WIN32 and SDL. Since Win95 has troubles with TrackMouseEvent(), this function was just simply rewritten which was the easiest. Based on a patch by DmitryKo.
2006-03-24 00:42:35 +00:00
Darkvater
efe65dc666
(svn r3940) - FS#56 [Crash] Missing glyph(s) in big-font. Added several missing glyphs for the big font.
2006-03-18 08:37:58 +00:00
Darkvater
c5a669b39f
(svn r3529) - Fix: [ 1415782 ] crash in string code with openbsd/zaurus; alignment issues (thanks Tron for the help)
2006-02-03 21:51:42 +00:00
tron
84fb96fe85
(svn r3511) More whitespace ([FS#46] by Rubidium)
2006-02-01 07:36:15 +00:00
tron
bf98086de8
(svn r3298) Remove unused and write-only variables
2005-12-14 06:28:48 +00:00
tron
7a7847ed61
(svn r3200) Remove the unused function GfxScalePalette() and the unused struct WorldSprite
2005-11-16 12:21:04 +00:00
tron
1d109214bc
(svn r3191) Move declaration and definition of _dbg_screen_rect to a place where it somewhat makes sense and wrap them in #ifdef _DEBUG
2005-11-16 08:35:26 +00:00
tron
24f857ed5e
(svn r3187) Simplify overly complicated ifs, especially if (foo) return false; else return true; is confusing
2005-11-15 09:47:25 +00:00
tron
f7abff5f96
(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
833032adc0
(svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT
2005-11-14 08:09:57 +00:00
tron
357aba7475
(svn r3176) Use proper types, not some variants of int
2005-11-13 21:16:34 +00:00
tron
4a14a586e2
(svn r3173) Use the trinary operator and switch to improve readability
...
Also align short cases nicely
2005-11-13 14:54:09 +00:00
tron
2cc2154ad2
(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
Darkvater
8e6a911700
(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
Darkvater
1419244551
(svn r2955) Fix: make ottd start with the last resolution you had set (custom) (win32)
2005-09-15 22:42:59 +00:00
tron
8894b930ae
(svn r2937) Add sprites for {, |, } and ~
2005-09-10 15:52:19 +00:00
tron
9de2c05c56
(svn r2933) Implement the non-breaking space
2005-09-10 08:17:30 +00:00
tron
45ca3b6336
(svn r2924) Introduce the ALIGN() macro which aligns values to multiples of a power of 2, for exact semantics see the commment in macros.h
2005-09-08 12:48:26 +00:00
tron
ffdefbdee2
(svn r2893) Two chars got assigned a width of 0 since r2879, fix that ([1274302])'
2005-08-27 09:49:52 +00:00
tron
ae49d487cc
(svn r2879) Major step twoards ISO-8859-15
...
Add several missing chars:
- Š/š (S with hacek, all sizes)
- Ž/ž (Z with hacek, all sizes)
- Œ/œ (OE ligature, all sizes)
- Ð/ð (eth, large font was missing)
- Þ/þ (thorn, large font was missing)
- º (male ordinal sign, all sizes)
Also move Ÿ (Y with umlaut, all sizes) to the correct position in the charset
To add some chars it was necessary to shuffle some OTTD specific chars (arrows, transport type markers) around
2005-08-20 18:14:32 +00:00
celestar
04f4d8237b
(svn r2736) -Codechange: De-mystified GfxDrawFillRect a bit, and used enums from table/sprites.h. You can now change the number of bits used for sprites and switches in the SpriteSetup enum and the rest should work automagically. Can be used to increase the number of active sprites to 2^19 in case there are no colortables (recolor sprites) in any newgrf. We should possibly move the the colortables to an own list, but how to detect them in a newgrf.
2005-07-28 09:17:32 +00:00
tron
af9f55c977
(svn r2720) Remove unused declarations and definitions
2005-07-26 19:34:03 +00:00