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.
19 years ago
Darkvater
c04dbc9c01
(svn r3940) - FS#56 [Crash] Missing glyph(s) in big-font. Added several missing glyphs for the big font.
19 years ago
Darkvater
e57ea5e57d
(svn r3529) - Fix: [ 1415782 ] crash in string code with openbsd/zaurus; alignment issues (thanks Tron for the help)
19 years ago
tron
1c3e8630fe
(svn r3511) More whitespace ([FS#46] by Rubidium)
19 years ago
tron
a2533d5ee6
(svn r3298) Remove unused and write-only variables
19 years ago
tron
6f82be949f
(svn r3200) Remove the unused function GfxScalePalette() and the unused struct WorldSprite
19 years ago
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
19 years ago
tron
3848d103c8
(svn r3187) Simplify overly complicated ifs, especially if (foo) return false; else return true; is confusing
19 years ago
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
19 years ago
tron
524fd25cbd
(svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT
19 years ago
tron
b34de09e62
(svn r3176) Use proper types, not some variants of int
19 years ago
tron
53f00c8f9d
(svn r3173) Use the trinary operator and switch to improve readability
...
Also align short cases nicely
19 years ago
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
19 years ago
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
19 years ago
Darkvater
80e2126cc6
(svn r2955) Fix: make ottd start with the last resolution you had set (custom) (win32)
19 years ago
tron
1236874baf
(svn r2937) Add sprites for {, |, } and ~
19 years ago
tron
ab1990e5c0
(svn r2933) Implement the non-breaking space
19 years ago
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
19 years ago
tron
cb2d80ab63
(svn r2893) Two chars got assigned a width of 0 since r2879, fix that ([1274302])'
19 years ago
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
19 years ago
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.
19 years ago
tron
452652e85e
(svn r2720) Remove unused declarations and definitions
19 years ago
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.
19 years ago
tron
647cbd6bdd
(svn r2701) Insert Id tags into all source files
19 years ago
tron
54cbd01825
(svn r2673) Include functions.h directly, not globally via openttd.h
19 years ago
tron
8b05455903
(svn r2664) Remove depedency on player.h from variables.h
19 years ago
tron
b0779b4b65
(svn r2663) Include variables.h only in these files which need it, not globally via openttd.h
19 years ago
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
19 years ago
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.
19 years ago
Darkvater
5261529887
(svn r2617) - Fix: fix some warnings, and reenable vs.net2003 signed/unsigned warnings
19 years ago
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.
19 years ago
Darkvater
e357c822cc
(svn r2607) - Feature: add support for truncating strings to a given (pixel) length. Function courtesy of Ludde.
19 years ago
tron
462b0d6686
(svn r2571) Add explicit type Pixel for ... Pixels
19 years ago
tron
1780afa4c8
(svn r2546) Don't calculate a value which never gets used and simplify some calculations
19 years ago
tron
11421beed1
(svn r2534) Small cleanup
19 years ago
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
19 years ago
tron
a468f14870
(svn r2518) Small cleanup
19 years ago
tron
7ecc1a040f
(svn r2513) Small cleanup
19 years ago
tron
4e88566d76
(svn r2512) Small cleanup
19 years ago
tron
12e506bd1b
(svn r2503) Small cleanup
19 years ago
tron
332479778e
(svn r2502) Small cleanup
19 years ago
tron
6319c11b1f
(svn r2497) Use a struct array for palette entries instead of a flat byte array
19 years ago
Darkvater
c3c69ff5cb
(svn r2420) - Codechange: magic number elminitation of cursorsprites.
19 years ago
Darkvater
ba8c649fac
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
20 years ago
Darkvater
6b794ede3b
(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.
20 years ago
Darkvater
a77a211ef7
(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
20 years ago
Darkvater
fb78ca8a62
(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().
20 years ago
tron
9b0bad683d
(svn r1861) Constify Get(Non)Sprite()
20 years ago
tron
dc54a3e627
(svn r1855) Handle endianness of sprite headers when loading a sprite, not everytime when accessing it
20 years ago
tron
d2703fd672
(svn r1854) Split GetSpritePtr() into GetSprite() for regular sprites (returning a Sprite*) and GetNonSprite() for "sprites" of type 0xFF (returning byte*)
20 years ago