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
celestar
238e47cd42
(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
a227065ab7
(svn r2701) Insert Id tags into all source files
2005-07-24 14:12:37 +00:00
tron
559babcdc9
(svn r2673) Include functions.h directly, not globally via openttd.h
2005-07-22 07:02:20 +00:00
tron
e53c4db866
(svn r2664) Remove depedency on player.h from variables.h
2005-07-21 19:36:43 +00:00
tron
284d9ed7fb
(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
f0c0c03c5f
(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
0550c4a87a
(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
ff2662ebe7
(svn r2617) - Fix: fix some warnings, and reenable vs.net2003 signed/unsigned warnings
2005-07-17 18:11:17 +00:00
Darkvater
dfc3695ad7
(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
7fceed0446
(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
8f71864bef
(svn r2571) Add explicit type Pixel for ... Pixels
2005-07-15 14:16:14 +00:00
tron
9c3188741f
(svn r2546) Don't calculate a value which never gets used and simplify some calculations
2005-07-11 15:47:20 +00:00
tron
83f72f696a
(svn r2534) Small cleanup
2005-07-08 21:24:27 +00:00
tron
a06b2fdc44
(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
42d086b212
(svn r2518) Small cleanup
2005-07-05 11:09:18 +00:00
tron
6df35235d5
(svn r2513) Small cleanup
2005-07-03 11:31:03 +00:00
tron
6c5df28d7c
(svn r2512) Small cleanup
2005-07-03 10:22:20 +00:00
tron
cd8d2643d3
(svn r2503) Small cleanup
2005-07-01 06:25:35 +00:00
tron
c92e85a357
(svn r2502) Small cleanup
2005-06-30 19:49:01 +00:00
tron
9d75047211
(svn r2497) Use a struct array for palette entries instead of a flat byte array
2005-06-30 05:27:32 +00:00
Darkvater
5fed47964e
(svn r2420) - Codechange: magic number elminitation of cursorsprites.
2005-06-06 13:47:06 +00:00
Darkvater
b438b1248c
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
2005-06-02 19:30:21 +00:00
Darkvater
7daaf1f100
(svn r2334) - Fix (regression): moved togglefullscreen into the video-driver, now windows works, dedicated works and sdl works. Also reverted the change to the makefile.
2005-05-16 16:19:32 +00:00
Darkvater
2aa94201dc
(svn r2310) - Fix: Game would crash if you full-screened with the 'fullscreen' button than chose a resolution from the dropdown box that was no longer valid. Big thanks to DaleStan for track down the crashing bug.
...
- Fix: There would be duplicate entries in the resolutions dropdown box. Copy SDL method or removing duplicates and sort the list.
- Feature: in the settings menu, you don't have to click on the arrows anymore, clicking on the dropdown box itself has the same effect. Consistent with other dropdowns in the game
2005-05-14 21:01:57 +00:00
Darkvater
d865c55007
(svn r1894) - Codechange: cleaned up the console a bit, wholly unified handling of text with that of editboxes
...
- Codechange: Introduction of Textbuf struct which not only holds physical data as length but also pixel-constrains (width) and information about the caret
- Codechange: Move Clipboard function to OS specific file. Currently only Windows has clipboard actions
- Feature: Editboxes, console and exit screen also accept the numeric-enter as a yes
- Feature: Navigation through text with cursor keys is possible, as well as arbitrary insertion (also paste) and deletion; both backspace and del keys. Functions DeleteTextBufferChar, InsertTextBufferChar and InsertTextBufferClipboard handle input and deletion. Navigation is done through MoveTextBufferPos.
- Fix: OTTD crash when opening 'add server' editbox
- CodeChange: fix up some stringwidth calculations in gfx.c. You can get the width in pixels of a character by calling GetCharacterWidth().
2005-02-21 18:59:54 +00:00
tron
9c99c7d11a
(svn r1861) Constify Get(Non)Sprite()
2005-02-11 17:12:11 +00:00
tron
9031e0369e
(svn r1855) Handle endianness of sprite headers when loading a sprite, not everytime when accessing it
2005-02-10 12:26:41 +00:00
tron
94c75f33bb
(svn r1854) Split GetSpritePtr() into GetSprite() for regular sprites (returning a Sprite*) and GetNonSprite() for "sprites" of type 0xFF (returning byte*)
2005-02-10 12:14:38 +00:00
tron
2a151d9354
(svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate
2005-02-10 05:43:30 +00:00
tron
092e72d60d
(svn r1852) Start cleaning up sprite handling:
...
- Complement the sprite header struct with a variable sized array for the sprite data and rename it to Sprite.
- Use the correct type Sprite* instead of casting all the time (this causes some "assignment from incompatible pointer type" warnings, nothing serious, will be resolved soon)
2005-02-08 22:22:42 +00:00
tron
b1baa4ed8b
(svn r1840) Repel str_buffr and use local buffers where possible
2005-02-07 12:32:35 +00:00
tron
2fb453a4a5
(svn r1827) Next iteration of the byte -> char transition: some string drawing functions and buffers
2005-02-06 18:30:45 +00:00
tron
0381073e56
(svn r1813) Declare functions implemented in strings.c in their own shiny new header (though i think some of these function don't belong into strings.c)
2005-02-06 08:18:00 +00:00
dominik
29e0ded977
(svn r1631) A couple of fixes for the signed/unsigned warnings. Only train_cmd.c remains to need fixing...
2005-01-23 23:58:35 +00:00
tron
e5cd6b6193
(svn r1596) Add some more statics
2005-01-22 22:47:58 +00:00
tron
189ca73707
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
2005-01-22 20:23:18 +00:00
tron
eaa6bf3f42
(svn r1557) Replace strange if () do while () construct with a plain for ()
2005-01-18 15:26:14 +00:00
tron
4136f395bf
(svn r1508) Remove duplicate declarations and include proper headers where necessary
2005-01-14 19:41:24 +00:00
tron
8b7c1e94e1
(svn r1402) Trim trailing whitespace
2005-01-06 18:45:28 +00:00
darkvater
d7bc1d776c
(svn r1268) -Fix: some warnings in gfx.c fixed
...
-Fix: Makefile now correctly works for cygwin/mingw; altough defining only cygwin does not compile the game
-Fix: moved SDL information message from severity 0 to 1. Only errors/severe warnings should be level 0
2004-12-23 23:15:07 +00:00
dominik
af9dc1f817
(svn r1091) Fix: Finally station names use 100% the correct color in transparent mode
2004-12-14 20:54:01 +00:00
truelight
f80094deb7
(svn r1045) -Fix: OpenTTD compiles again under VC6 (sign_de)
2004-12-13 11:17:59 +00:00
dominik
52134822b8
(svn r1038) Feature: OpenTTD runs with the grf files of the DOS version
...
Please read the Readme for further information. There are some minor graphical glitches when you use the DOS files. E.g. the autorail button is a bit screwed up.
2004-12-12 20:36:24 +00:00
truelight
b8f6d41418
(svn r942) -Merged branch/network back into the trunk
2004-12-04 17:54:56 +00:00
tron
7b8bf96c2b
(svn r822) Use a struct instead of pairs of bytes for the string colormap.
...
While here give the string colormap a more canonical name.
2004-11-26 16:55:35 +00:00
dominik
d801ca16a3
(svn r819) Code cleanup: colors for langfile strings are now taken from a color table instead of a sprite
2004-11-26 14:00:57 +00:00
pasky
0f7e48ead2
(svn r679) Clarify bp.sprite assignment in GfxMainBlitter(). Pointed out by Oskar.
2004-11-19 21:57:02 +00:00
tron
249a170ace
(svn r607) -Patch: [ 985102 ] static cleanup
...
Thanks to lvoge
2004-11-14 19:44:06 +00:00