Commit Graph

64 Commits (0e64dc50b6d4dd53c3585c2d4cf5691883caf782)

Author SHA1 Message Date
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 71140a5768 (svn r2669) Shuffle some more stuff around to reduce dependencies 19 years ago
Darkvater b8f1bbbad1 (svn r2652) - CodeChange: show 'too many sprites' in hex value; Patch signed off by Tron 19 years ago
tron 87be1312d2 (svn r2633) Move spritecache related variable from variables.h to spritecache.[ch] 19 years ago
tron d7c0bf20d2 (svn r2537) Small changes, especially use fprintf to stderr for warnings and errors instead of plain printf 19 years ago
Darkvater 93a3b7e0a1 (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 1307f90b5e (svn r2535) Tabs 19 years ago
tron 718a41f517 (svn r2523) Readd a comment which got lost in r2522 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
Darkvater ba8c649fac (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files. 19 years ago
Darkvater 8f88693a0d (svn r2349) - Fix: remove warning from release build when assertions are no longer active 19 years ago
Darkvater e9f8449d55 (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 92da198d9a (svn r1941) Report missing NewGRF file as a fatal error. 20 years ago
tron f13bfccc37 (svn r1893) If -i was specified respect it 20 years ago
tron 4118a32cff (svn r1885) Fix typo in r1884 20 years ago
tron 9f14253baf (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 56a8302642 (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 830565514c (svn r1867) Include tables/sprites.h only in files which need it 20 years ago
tron a011190723 (svn r1865) Fix some warnings 20 years ago
tron 9b0bad683d (svn r1861) Constify Get(Non)Sprite() 20 years ago
tron 832c3fa20d (svn r1859) Miscellaneous style changes 20 years ago
tron d37f2cdc70 (svn r1858) Let ReadSprite() handle the subtleties of loading a sprite, not its caller 20 years ago
tron 51dd166de0 (svn r1857) Rewrite parts of the sprite heap. It's functionally equivalent but should be easier to read and maintain. 20 years ago
tron 12c7e128a9 (svn r1856) Make GfxInitSpriteMem() static, because it's only used withing spritecache.c 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
tron 7cd19fe07a (svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate 20 years ago
tron 49a4d014b9 (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 257e97c09a (svn r1833) byte -> char transition: the rest 20 years ago
tron 36c9758c94 (svn r1803) Move debugging stuff into files of it's own 20 years ago
darkvater 05b75009cc (svn r1754) - Fix: you can once again load newgrf files with lots of sprites. Index wasn't reset in second run, thus counting them double. 20 years ago
dominik ecd8952ef9 (svn r1702) - Fix: [ 1110407 ] Game does not crash any more when a newgrf file doesn't exist 20 years ago
tron 94d5aeabb2 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile 20 years ago
dominik f7e39977de (svn r1571) Feature: Visually enhanced autorail placing
When using the autorail tool, the rail pieces which are going to be build are highlighted.
If a piece is shown in red, this indicates that the slope/rail combination is impossible. It does not tell you if the rail line construction might not be possible because of other obstacles, e.g. houses or water.
20 years ago
tron dd6db73069 (svn r1520) Trim 134 (!) lines with trailing whitespace ): 20 years ago
darkvater c07e643b59 (svn r1458) -Fix: remove byte *s again for windows. 20 years ago
miham b74bd88e53 (svn r1455) Fixed spritecache.c to compile 20 years ago
darkvater 0b0e63cdf9 (svn r1454) -Fix: small warnings in spritecache.c 20 years ago
dominik 49a08e5e38 (svn r1453) Feature: MD5 hash check for TTD files
The original TTD files are now checked with a MD5 sum to determine which version of the grf files is used and to warn about possible file corruptions. (Thanks to ledow for the original patch)
20 years ago
darkvater 6374240285 (svn r1369) -Feature(ish): Added sprites for up/down and left/right arrows. Anywhere where there are horizontal scrollers these are now left/right arrows 20 years ago
truelight b12b10c343 (svn r1343) -Fix: [Graphic] Autorail icon is now correct (Darkvater)
-Fix: [Graphic] Added resize icon (tnx tokai)
20 years ago
dominik 6e99d2c0e8 (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.
20 years ago
dominik b747cd2fcd (svn r999) New icons for the network interface, newgrf gui and the tiny euro 20 years ago
tron e35a0b1c44 (svn r803) Switch to ISO 8859-15
It has proper support for the euro sign and includes letters which are needed by the Latvian translation (and perhaps others), though the letter sprites are missing.
20 years ago
pasky 989fd10d06 (svn r687) Export InitNewGRFFile() and DecodeSpecialSprite() properly. 20 years ago
dominik 4612dcdb48 (svn r662) [newgrf] Moved grfspecial.c to newgrf.c/newgrf.h 20 years ago
miham 4fb8338fa6 (svn r651) LoadNewGrfFile() now doesn't care about num_sprites and just loads whatever is
available. Fixes George's long vehicles. (pasky)
20 years ago
tron 57c472e093 (svn r624) Merge r377 to trunk:
Remove the memmove special case for MSVC
According to the MSDN it was just plain wrong and memmove was directly used in some places anyway
20 years ago