tron
a286726fe9
(svn r6347) Undo
18 years ago
tron
5f7d99fb6d
(svn r6346) -Codechange: Remove redundant assignment
18 years ago
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.
18 years ago
truelight
5fb6c9e1cc
(svn r5974) -Codechange: added casts all around the place to make Windows 64bit happy (michi_cc)
18 years ago
peter1138
3786527e6b
(svn r4481) - Fix: Validate the given sprite ID when loading a sprite.
19 years ago
peter1138
4db1144b6d
(svn r4446) - Add function to determine if a Sprite ID exists.
19 years ago
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
19 years ago
tron
9de2c05c56
(svn r2933) Implement the non-breaking space
19 years ago
tron
52c859cbe8
(svn r2868) Change the way NewGRFs are loaded: The loading process i no longer bolted onto the normal graphics loading.
...
This has two major advantages:
- Removal of a maze of global variables and distinction of cases from the sprite loading routines, which weren't directly related to the loading process in the first place
- NewGRF actions no longer occupy sprite slots - for example when using DBSetXL this saves about 2000 slots! (you could regard this as a bug fix)
If i didn't make a major mistake this change should have no negative effect on NewGRF support, please test!
19 years ago
tron
19f5036c46
(svn r2866) Move all functions and tables which aren't directly involved in managing the sprite heap to a new file gfxinit.c.
...
This doesn't ease the global variable mess, but makes the distinction between sprite heap and gfx loading routines easier.
19 years ago
tron
26d24f64fc
(svn r2865) Push the responsibility for allocating the sprite heap into GfxInitSpriteMem()
19 years ago
tron
d1c5128c42
(svn r2855) Make ReadSpriteHeaderSkipData() responsible for detecting the end of a grf file instead of its callers - this simplifies the code a bit
19 years ago
tron
8f398f2f50
(svn r2847) Don't remember the size of sprites during initialisation. Since the sprite loading was altered this is no longer necessary.
...
While here remove another write-only variable (_spritecache_size) and fix a comment (sprite replaces a lowercase letter instead of uppercase)
19 years ago
tron
e42b560049
(svn r2845) Remove sprite size caching, it was unused
...
This makes GetSpriteDimension() superflous, because now it's just a thin wrapper around GetSprite() returning only part of the information, therefore remove it too
19 years ago
tron
47e28d9152
(svn r2839) Remove stuff missed in r2833, properly calculate the size of two arrays and simplify GetSpriteDimension() a bit
19 years ago
tron
b101846d3b
(svn r2833) Remove saving of sprite cache data:
...
the benefits are questionable, it's error prone, undocumented and hasn't been widely used for ages, if ever
19 years ago
tron
59da8350c1
(svn r2829) Remove sprite locking, it was never used anyway
19 years ago
bjarni
546c34f2e5
(svn r2764) -Feature: Clone vehicles
...
-This allows a player to clone an excisting vehicle of his own
-[fix]: this uncovered an excisting bug in CmdBuildRailVehicle() where depots could build trains of the wrong track type. This is fixed
-Thanks to Celestar for drawing the sprites and _luca_ for including them in openttd.grf
19 years ago
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.
19 years ago
tron
a227065ab7
(svn r2701) Insert Id tags into all source files
19 years ago
tron
559babcdc9
(svn r2673) Include functions.h directly, not globally via openttd.h
19 years ago
tron
0762aa9ec9
(svn r2669) Shuffle some more stuff around to reduce dependencies
19 years ago
Darkvater
29b81f63fd
(svn r2652) - CodeChange: show 'too many sprites' in hex value; Patch signed off by Tron
19 years ago
tron
c1da382e9a
(svn r2633) Move spritecache related variable from variables.h to spritecache.[ch]
19 years ago
tron
6cef71b1b2
(svn r2537) Small changes, especially use fprintf to stderr for warnings and errors instead of plain printf
19 years ago
Darkvater
6a645a3eb8
(svn r2536) - Fix: [ 1215999 ] Segmentation fault in main menu - corrupted sample.cat. Flush the output buffer to print the error message before the game crashes. (mcmohr)
19 years ago
tron
1b4a0897b6
(svn r2535) Tabs
19 years ago
tron
513dc78ebc
(svn r2523) Readd a comment which got lost in r2522
19 years ago
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
19 years ago
Darkvater
b438b1248c
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
19 years ago
Darkvater
1b2b0d5b79
(svn r2349) - Fix: remove warning from release build when assertions are no longer active
20 years ago
Darkvater
a1143a53f0
(svn r2229) - Fix: [ 1188777 ] Non-existing sprite #5125 (presignal). The DOS grf file trgi.grf has 6 less sprites than the windows one. This results in some segfaults for certain sprites. Fixed it by added a dummy grf file consisting ofr 6 sprites and loaded when using DOS gfx at the appropiate place.
20 years ago
pasky
7ee6d0fa62
(svn r1941) Report missing NewGRF file as a fatal error.
20 years ago
tron
0d8dcacee2
(svn r1893) If -i was specified respect it
20 years ago
tron
9f4e45d333
(svn r1885) Fix typo in r1884
20 years ago
tron
431447ef87
(svn r1884) Change palette detection algorithm: Use the DOS palette if there are no Windows .grfs but at least one DOS .grf
20 years ago
tron
f7991303e8
(svn r1882) Add a basic check if a non-existent sprite gets accessed.
...
Now ottd bails out with an error message instead of segfaulting.
This is far from perfect, some checks after loading a savegame should be added.
20 years ago
tron
204d08140a
(svn r1867) Include tables/sprites.h only in files which need it
20 years ago
tron
58c46bed40
(svn r1865) Fix some warnings
20 years ago
tron
9c99c7d11a
(svn r1861) Constify Get(Non)Sprite()
20 years ago
tron
f03b8859ed
(svn r1859) Miscellaneous style changes
20 years ago
tron
5c946cdbd8
(svn r1858) Let ReadSprite() handle the subtleties of loading a sprite, not its caller
20 years ago
tron
1b617b28fc
(svn r1857) Rewrite parts of the sprite heap. It's functionally equivalent but should be easier to read and maintain.
20 years ago
tron
33cf096b03
(svn r1856) Make GfxInitSpriteMem() static, because it's only used withing spritecache.c
20 years ago
tron
9031e0369e
(svn r1855) Handle endianness of sprite headers when loading a sprite, not everytime when accessing it
20 years ago
tron
94c75f33bb
(svn r1854) Split GetSpritePtr() into GetSprite() for regular sprites (returning a Sprite*) and GetNonSprite() for "sprites" of type 0xFF (returning byte*)
20 years ago
tron
2a151d9354
(svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate
20 years ago
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)
20 years ago
tron
eed181245d
(svn r1833) byte -> char transition: the rest
20 years ago
tron
f0f85a7ef3
(svn r1803) Move debugging stuff into files of it's own
20 years ago