Commit Graph

84 Commits

Author SHA1 Message Date
tron
34def0290a (svn r6180) Use a switch instead of function pointers to choose the blitter 2006-08-28 06:05:04 +00:00
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. 2006-08-22 14:38:37 +00:00
rubidium
e2ce56144e (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
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
2006-08-19 10:00:30 +00:00
belugas
40a8964911 (svn r5609) CodeChange : Apply coding style 2006-07-26 03:33:12 +00:00
peter1138
99197b608a (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
e02b86c88b (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
fb48c3b4aa (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
c04dbc9c01 (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
e57ea5e57d (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
1c3e8630fe (svn r3511) More whitespace ([FS#46] by Rubidium) 2006-02-01 07:36:15 +00:00
tron
a2533d5ee6 (svn r3298) Remove unused and write-only variables 2005-12-14 06:28:48 +00:00
tron
6f82be949f (svn r3200) Remove the unused function GfxScalePalette() and the unused struct WorldSprite 2005-11-16 12:21:04 +00:00
tron
ce398adf8e (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
3848d103c8 (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
9d0e7b6458 (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
524fd25cbd (svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT 2005-11-14 08:09:57 +00:00
tron
b34de09e62 (svn r3176) Use proper types, not some variants of int 2005-11-13 21:16:34 +00:00
tron
53f00c8f9d (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
0b936c3222 (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
4a58250cb9 (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
80e2126cc6 (svn r2955) Fix: make ottd start with the last resolution you had set (custom) (win32) 2005-09-15 22:42:59 +00:00
tron
1236874baf (svn r2937) Add sprites for {, |, } and ~ 2005-09-10 15:52:19 +00:00
tron
ab1990e5c0 (svn r2933) Implement the non-breaking space 2005-09-10 08:17:30 +00:00
tron
c20b5883bd (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
cb2d80ab63 (svn r2893) Two chars got assigned a width of 0 since r2879, fix that ([1274302])' 2005-08-27 09:49:52 +00:00
tron
f0393bc4b1 (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
fcd012e7ec (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
452652e85e (svn r2720) Remove unused declarations and definitions 2005-07-26 19:34:03 +00:00
celestar
a3739aecdf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
by enums. There remains work in gfx.c to move the "transparency" and
"recolor" bits around to make space for more sprites. However, 2800
additional sprites can now be loaded. There also remains cleanup and
Doxygen work on many of the header files.
2005-07-24 15:56:31 +00:00
tron
647cbd6bdd (svn r2701) Insert Id tags into all source files 2005-07-24 14:12:37 +00:00
tron
54cbd01825 (svn r2673) Include functions.h directly, not globally via openttd.h 2005-07-22 07:02:20 +00:00
tron
8b05455903 (svn r2664) Remove depedency on player.h from variables.h 2005-07-21 19:36:43 +00:00
tron
b0779b4b65 (svn r2663) Include variables.h only in these files which need it, not globally via openttd.h 2005-07-21 18:44:27 +00:00
Darkvater
57084f2caa (svn r2644) - Fix: my name was mistyped ;p
- Add DoDrawStringCentered() and change the multiline strings in the about box to single-line ones
2005-07-19 22:12:04 +00:00
Darkvater
186036229c (svn r2623) - CodeChange: rework DrawStringCenteredTruncated() a bit. Instead of giving center + width you give the coordinates of the bounding box (left, right) it has to fit in (ludde)
- CodeChange: changed (back) maximum pixel length of truncated strings to a signed integer.
2005-07-17 19:23:18 +00:00
Darkvater
5261529887 (svn r2617) - Fix: fix some warnings, and reenable vs.net2003 signed/unsigned warnings 2005-07-17 18:11:17 +00:00
Darkvater
cbad2dad33 (svn r2614) - Fix: Trunctuate function used one less character than it was supposed to. Because of this real width and reported width didn't correspond with eachother. 2005-07-17 17:16:35 +00:00
Darkvater
e357c822cc (svn r2607) - Feature: add support for truncating strings to a given (pixel) length. Function courtesy of Ludde. 2005-07-17 15:54:57 +00:00
tron
462b0d6686 (svn r2571) Add explicit type Pixel for ... Pixels 2005-07-15 14:16:14 +00:00
tron
1780afa4c8 (svn r2546) Don't calculate a value which never gets used and simplify some calculations 2005-07-11 15:47:20 +00:00
tron
11421beed1 (svn r2534) Small cleanup 2005-07-08 21:24:27 +00:00
tron
784420e706 (svn r2522) Reorganize sprite load and decompression in order to remove a special case from the sprite blitter, which decompressed certain sprites every time when blitting them 2005-07-05 19:54:35 +00:00
tron
a468f14870 (svn r2518) Small cleanup 2005-07-05 11:09:18 +00:00
tron
7ecc1a040f (svn r2513) Small cleanup 2005-07-03 11:31:03 +00:00
tron
4e88566d76 (svn r2512) Small cleanup 2005-07-03 10:22:20 +00:00
tron
12e506bd1b (svn r2503) Small cleanup 2005-07-01 06:25:35 +00:00
tron
332479778e (svn r2502) Small cleanup 2005-06-30 19:49:01 +00:00
tron
6319c11b1f (svn r2497) Use a struct array for palette entries instead of a flat byte array 2005-06-30 05:27:32 +00:00
Darkvater
c3c69ff5cb (svn r2420) - Codechange: magic number elminitation of cursorsprites. 2005-06-06 13:47:06 +00:00