Commit Graph

323 Commits (jgrpp)

Author SHA1 Message Date
rubidium bab7367a59 (svn r15391) -Fix (r14997): loading font sprites should not trigger a palette conversion. 16 years ago
smatz 9021c20b5e (svn r15299) -Cleanup: remove many redundant includes 16 years ago
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 16 years ago
smatz f528593a40 (svn r15031) -Fix (r15027): merge reverted r15026, so do it once again 16 years ago
smatz 16dfe58e4d (svn r15031) -Fix (r15027): merge reverted r15026, so do it once again 16 years ago
truebrain c2406cd42d (svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
NoAI is an API (a framework) to build your own AIs in. See:
   http://wiki.openttd.org/wiki/index.php/AI:Main_Page
 With many thanks to:
  - glx and Rubidium for their syncing, feedback and hard work
  - Yexo for his feedback, patches, and AIs which tested the system very deep
  - Morloth for his feedback and patches
  - TJIP for hosting a challenge which kept NoAI on track
  - All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
16 years ago
truebrain a3dd7506d3 (svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
NoAI is an API (a framework) to build your own AIs in. See:
   http://wiki.openttd.org/wiki/index.php/AI:Main_Page
 With many thanks to:
  - glx and Rubidium for their syncing, feedback and hard work
  - Yexo for his feedback, patches, and AIs which tested the system very deep
  - Morloth for his feedback and patches
  - TJIP for hosting a challenge which kept NoAI on track
  - All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
16 years ago
smatz ec97e1fd0d (svn r15026) -Codechange: use SpriteTypeByte instead of SpriteType in the SpriteCache struct in order to make it smaller 16 years ago
smatz 9294f96168 (svn r15026) -Codechange: use SpriteTypeByte instead of SpriteType in the SpriteCache struct in order to make it smaller 16 years ago
smatz f84b1e6970 (svn r14998) -Codechange: warn once about misuse of each sprite, not once about misuse of any sprite 16 years ago
smatz 1287fddd8f (svn r14998) -Codechange: warn once about misuse of each sprite, not once about misuse of any sprite 16 years ago
smatz b181bb9d25 (svn r14997) -Fix [FS#2524](r14223): when handling invalid sprites, entry in spritecache data could lose its parent 16 years ago
smatz 720eedf7c5 (svn r14997) -Fix [FS#2524](r14223): when handling invalid sprites, entry in spritecache data could lose its parent 16 years ago
rubidium 28ea38ae55 (svn r14949) -Cleanup: pointer coding style 16 years ago
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 16 years ago
rubidium 2fec4d8e3c (svn r14610) -Fix [FS#2415]: possible stack corruption when reading corrupted sprites.
-Change: harden the sprite reading routine against corrupt sprites.
16 years ago
rubidium 2277a1ff9c (svn r14610) -Fix [FS#2415]: possible stack corruption when reading corrupted sprites.
-Change: harden the sprite reading routine against corrupt sprites.
16 years ago
rubidium b5e467978b (svn r14464) -Codechange: replace (uint)-1 with UINT_MAX (PhilSophus) 16 years ago
rubidium 272b2ef0e9 (svn r14464) -Codechange: replace (uint)-1 with UINT_MAX (PhilSophus) 16 years ago
rubidium 9ca1972e01 (svn r14229) -Feature: allow overriding the palette of the base GRFs. This way you can play with NewGRFs made for the Windows palette with the DOS palettes base GRFs (and vice versa). Note that for this to work correctly ALL NewGRFs must use the same palette; mix and match is not yet supported. 16 years ago
rubidium fc216aeeb8 (svn r14229) -Feature: allow overriding the palette of the base GRFs. This way you can play with NewGRFs made for the Windows palette with the DOS palettes base GRFs (and vice versa). Note that for this to work correctly ALL NewGRFs must use the same palette; mix and match is not yet supported. 16 years ago
rubidium c358955127 (svn r14223) -Codechange: make GetSprite aware of the 4 different types of sprites: fonts, recolour, mapgen and normal sprites. 16 years ago
rubidium c8e8911ef6 (svn r14223) -Codechange: make GetSprite aware of the 4 different types of sprites: fonts, recolour, mapgen and normal sprites. 16 years ago
rubidium 242cbd0074 (svn r14214) -Codechange: move another TTD graphics bug into the GRF; height problem of sprite #142. 16 years ago
rubidium 886c8ec79f (svn r14214) -Codechange: move another TTD graphics bug into the GRF; height problem of sprite #142. 16 years ago
rubidium a20b833516 (svn r14199) -Codechange: split fileio.h into fileio_type.h and fileio_func.h so not everything that includes saveload.h needs to include everything else too. 16 years ago
rubidium ea1f180a55 (svn r14199) -Codechange: split fileio.h into fileio_type.h and fileio_func.h so not everything that includes saveload.h needs to include everything else too. 16 years ago
rubidium 17998f7f98 (svn r14193) -Fix (r14191): don't put an unsigned 0x80 in a signed int8 as that's not what you want. 16 years ago
rubidium 0b88f0cf54 (svn r14193) -Fix (r14191): don't put an unsigned 0x80 in a signed int8 as that's not what you want. 16 years ago
rubidium 951ea4ae6d (svn r14191) -Codechange: unify the code to skip sprite payload (i.e. not the header).
-Fix: sprite payload skipping wouldn't skip enough bytes in a very small subset of compressed sprites.
16 years ago
rubidium d3d34d2aac (svn r14191) -Codechange: unify the code to skip sprite payload (i.e. not the header).
-Fix: sprite payload skipping wouldn't skip enough bytes in a very small subset of compressed sprites.
16 years ago
rubidium 42265315e2 (svn r13869) -Fix [FS#2153] (r13674): in some cases the sprite cache could be filled with unremovable items. 16 years ago
rubidium ef6e366c08 (svn r13869) -Fix [FS#2153] (r13674): in some cases the sprite cache could be filled with unremovable items. 16 years ago
rubidium bb3292943a (svn r13692) -Fix (r13674): loading PNG sprites could very quickly fill the sprite cache. 16 years ago
rubidium 56379fff51 (svn r13692) -Fix (r13674): loading PNG sprites could very quickly fill the sprite cache. 16 years ago
rubidium 0570ba8461 (svn r13674) -Fix [FS#2127]: crash when drawing a non-real sprite. The drawing of the non-real sprite is caused when two NewGRFs replace the same sprite and the first replaces it with a real sprite (and thus assumes it remains a real sprite) and the second replaces it with a non-real sprite. OpenTTD already looked at whether the sprite to load should be seen as a real or non-real sprite, but it failed to replace non-real sprites with a substitute real sprite when getting the sprite from the cache. 16 years ago
rubidium 173f0f4cd5 (svn r13674) -Fix [FS#2127]: crash when drawing a non-real sprite. The drawing of the non-real sprite is caused when two NewGRFs replace the same sprite and the first replaces it with a real sprite (and thus assumes it remains a real sprite) and the second replaces it with a non-real sprite. OpenTTD already looked at whether the sprite to load should be seen as a real or non-real sprite, but it failed to replace non-real sprites with a substitute real sprite when getting the sprite from the cache. 16 years ago
glx b60a1326bf (svn r13390) -Codechange: introduce usererror() for fatal but not openttd related errors. Now all error() will 'crash' openttd after showing the message in win32 releases (MSVC), creating a crash.log and crash.dmp (like the '!' hack used before). On the other hand, usererror() will just close the game. So use error() only when it can be helpful to debugging, else use usererror(). 16 years ago
glx ee256e770a (svn r13390) -Codechange: introduce usererror() for fatal but not openttd related errors. Now all error() will 'crash' openttd after showing the message in win32 releases (MSVC), creating a crash.log and crash.dmp (like the '!' hack used before). On the other hand, usererror() will just close the game. So use error() only when it can be helpful to debugging, else use usererror(). 16 years ago
rubidium 33e18c236d (svn r13301) -Fix [FS#1997]: resolve more MSVC 9 x64 warnings. 16 years ago
rubidium 5c5ee7eb57 (svn r13301) -Fix [FS#1997]: resolve more MSVC 9 x64 warnings. 16 years ago
glx a28ea38653 (svn r13008) -Fix [FS#1997]: silence some MSVC x64 warnings 16 years ago
glx e48a351f8e (svn r13008) -Fix [FS#1997]: silence some MSVC x64 warnings 16 years ago
rubidium 1ce0b03bf0 (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 16 years ago
rubidium d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 16 years ago
peter1138 bda732047b (svn r12436) -Cleanup: minor coding style 16 years ago
peter1138 f9e7b70f91 (svn r12436) -Cleanup: minor coding style 16 years ago
belugas 6c93216641 (svn r12140) -Codechange: A bit of code style fixes(Geektoo). 17 years ago
belugas 739b118c6b (svn r12140) -Codechange: A bit of code style fixes(Geektoo). 17 years ago
rubidium 7c310600ba (svn r12005) -Fix [FS#1717]: possible reading from an invalid pointer. Patch by PhilSophus. 17 years ago
rubidium c9a9103566 (svn r12005) -Fix [FS#1717]: possible reading from an invalid pointer. Patch by PhilSophus. 17 years ago
peter1138 af2429f8e0 (svn r12002) -Cleanup (r11981): Remove obsolete code to skip sprites from indexed GRFs. 17 years ago
peter1138 1a9b741e43 (svn r12002) -Cleanup (r11981): Remove obsolete code to skip sprites from indexed GRFs. 17 years ago
peter1138 78156065cf (svn r11940) -Codechange: Store short filename once per open file instead of once per sprite cache entry. Not all file types need this, but most of the time no sprite cache entry needed it either. 17 years ago
peter1138 ffec79bbcf (svn r11940) -Codechange: Store short filename once per open file instead of once per sprite cache entry. Not all file types need this, but most of the time no sprite cache entry needed it either. 17 years ago
rubidium a83b91dbc5 (svn r11939) -Codechange: some type fixes and very initial steps into supporting NDS by default. Based on work by Dominik. 17 years ago
rubidium 9444eb4484 (svn r11939) -Codechange: some type fixes and very initial steps into supporting NDS by default. Based on work by Dominik. 17 years ago
rubidium 90acd52f22 (svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h. 17 years ago
rubidium d4e6a6bf57 (svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h. 17 years ago
rubidium b09d957f31 (svn r11777) -Codechange: split the string header and make do not include it when it's not necessary. 17 years ago
rubidium a3ccdcea36 (svn r11777) -Codechange: split the string header and make do not include it when it's not necessary. 17 years ago
rubidium 81bf9f8503 (svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h' 17 years ago
rubidium 429521a7d1 (svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h' 17 years ago
rubidium 00c9d3ef20 (svn r11691) -Codechange: move+rename helpers.hpp and only include it when it is really needed. 17 years ago
rubidium bf98e25e43 (svn r11691) -Codechange: move+rename helpers.hpp and only include it when it is really needed. 17 years ago
rubidium 8ebdfb258f (svn r11674) -Codechange: refactor some functions out of macros.h into more logical locations. 17 years ago
rubidium 01e20c9140 (svn r11674) -Codechange: refactor some functions out of macros.h into more logical locations. 17 years ago
glx bfda3c82f1 (svn r11600) -Cleanup: remove extra out-of-memory checks, since it's now done in *allocT functions. 17 years ago
glx b47bce651e (svn r11600) -Cleanup: remove extra out-of-memory checks, since it's now done in *allocT functions. 17 years ago
rubidium 33cdfc71dc (svn r11597) -Change: replace all remaining instances of (re|m|c)alloc with (Re|M|C)allocT and add a check for out-of-memory situations to the *allocT functions. 17 years ago
rubidium f1e4914b5f (svn r11597) -Change: replace all remaining instances of (re|m|c)alloc with (Re|M|C)allocT and add a check for out-of-memory situations to the *allocT functions. 17 years ago
skidd13 7a4d96f629 (svn r11480) -Codechange: Rename the function ALIGN fitting to the naming style
This fixes also FS#1450
17 years ago
skidd13 58bb5c7525 (svn r11480) -Codechange: Rename the function ALIGN fitting to the naming style
This fixes also FS#1450
17 years ago
truelight c6c3139914 (svn r11101) -Fix r11099: the check: file_pos == 0, no longer works; adjust the check with file_slot. This solves the ? sprites with autorail (nice catch Progman) 17 years ago
truelight d5171df2df (svn r11101) -Fix r11099: the check: file_pos == 0, no longer works; adjust the check with file_slot. This solves the ? sprites with autorail (nice catch Progman) 17 years ago
truelight e545220563 (svn r11095) -Codechange: don't abuse 'file_pos' by storing the file_slot in it too, but use a nice seperate variable for it
-Note: on a side-note, this allows files bigger than 16+ MiB, needed for tar-support
17 years ago
truelight 8cd9ab9b7e (svn r11095) -Codechange: don't abuse 'file_pos' by storing the file_slot in it too, but use a nice seperate variable for it
-Note: on a side-note, this allows files bigger than 16+ MiB, needed for tar-support
17 years ago
rubidium 43a85ee94f (svn r10356) -Fix (r10143): another memory leak eliminated. 17 years ago
rubidium ffffde515f (svn r10356) -Fix (r10143): another memory leak eliminated. 17 years ago
truelight 79cd3f5db0 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
-Codechange: introduced a hierachy of blitters to avoid a lot of code duplication
 Note: this allows much easier adding other types of video-drivers, like OpenGL
17 years ago
truelight 003375d375 (svn r10190) -Codechange: merged renderer and blitter to one single class API: blitter
-Codechange: introduced a hierachy of blitters to avoid a lot of code duplication
 Note: this allows much easier adding other types of video-drivers, like OpenGL
17 years ago
truelight 5d55a9435b (svn r10157) -Fix: use as indentified for PNGs, the place of the image as it was in the grf, not the internal SpriteID 17 years ago
truelight 144035bf5c (svn r10157) -Fix: use as indentified for PNGs, the place of the image as it was in the grf, not the internal SpriteID 17 years ago
truelight bda903e70b (svn r10150) -Fix r10148: show a message to users when using 32bpp blitter and no libpng available 17 years ago
truelight ab6883bc19 (svn r10150) -Fix r10148: show a message to users when using 32bpp blitter and no libpng available 17 years ago
truelight 402052509f (svn r10149) -Fix r10143: MSVC warnings... (tnx boekabart and glx) 17 years ago
truelight 79817428b1 (svn r10149) -Fix r10143: MSVC warnings... (tnx boekabart and glx) 17 years ago
truelight 063c4f7862 (svn r10148) -Fix r10143: make --without-png to compile again 17 years ago
truelight 4b51ea375b (svn r10148) -Fix r10143: make --without-png to compile again 17 years ago
truelight 19513f2604 (svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
-Codechange: store the SpriteID in the spritecache too
-Add: add a PNG loader for graphical files
-Documentation: added a document to explain the PNG format
17 years ago
truelight b7443d800b (svn r10143) -Add: store the filename of the grfs opened and allow easy access to the name
-Codechange: store the SpriteID in the spritecache too
-Add: add a PNG loader for graphical files
-Documentation: added a document to explain the PNG format
17 years ago
rubidium 961a891563 (svn r10109) -Fix [FS#838]: some NewGRFs use the same (unused in the "current" climate) sprite IDs. Normally this gives some artefacts, but when one NewGRF expects it to be a sprite and another NewGRF overwrites it with a non-sprite nasty things happen (drawing a non-sprite crashes OTTD). 17 years ago
rubidium be0539cb43 (svn r10109) -Fix [FS#838]: some NewGRFs use the same (unused in the "current" climate) sprite IDs. Normally this gives some artefacts, but when one NewGRF expects it to be a sprite and another NewGRF overwrites it with a non-sprite nasty things happen (drawing a non-sprite crashes OTTD). 17 years ago
truelight 9ee02182fa (svn r10105) -Fix r10092: fix sprite 4845 till 4881 (inclusive), so they store the data as on the disk in the memory, as the old landscape generate assumes this. Talking about ugly hacks... 17 years ago
truelight d0250f6108 (svn r10105) -Fix r10092: fix sprite 4845 till 4881 (inclusive), so they store the data as on the disk in the memory, as the old landscape generate assumes this. Talking about ugly hacks... 17 years ago
truelight 4cd71ef4fe (svn r10096) -Fix r10092: freetype bypassed the Blitter::Encode, making fonts look weird 17 years ago
truelight be0f5cf877 (svn r10096) -Fix r10092: freetype bypassed the Blitter::Encode, making fonts look weird 17 years ago
truelight 27febd474c (svn r10092) -Codechange: code-seperated the spriteloader and blitter from the rest of the code
-Add: make it possible to pick your own blitter (-b <blitter>, -h for overview)
-Add: added a new optimized 8bpp blitter (default, caches sprites of all zoom-levels)
-Add: added a debug 8bpp blitter and a very slow normal 8bpp blitter
17 years ago
truelight 6b101cc177 (svn r10092) -Codechange: code-seperated the spriteloader and blitter from the rest of the code
-Add: make it possible to pick your own blitter (-b <blitter>, -h for overview)
-Add: added a new optimized 8bpp blitter (default, caches sprites of all zoom-levels)
-Add: added a debug 8bpp blitter and a very slow normal 8bpp blitter
17 years ago
peter1138 de7e370240 (svn r10042) -Codechange: Replace hardcoded spritecache size with a configuration
option, sprite_cache_size. The default size is 2MB and the value can 
range from 1 to 64MB. If you experience slow-downs when scrolling the 
map, try increasing this setting.
17 years ago
peter1138 4403d41934 (svn r10042) -Codechange: Replace hardcoded spritecache size with a configuration
option, sprite_cache_size. The default size is 2MB and the value can 
range from 1 to 64MB. If you experience slow-downs when scrolling the 
map, try increasing this setting.
17 years ago
peter1138 1102c157eb (svn r10038) -Fix (r8634): Sprite resulting from '?' substitution was reloaded into the cache entry for SPR_IMG_QUERY instead of the original sprite cache entry. This resulted in unaccounted missing sprite cache memory, and was exacerbated because the original missing sprite was not cached, so it did it again and again and again. Slowdowns and boom. Etc. 17 years ago
peter1138 18b98ad6aa (svn r10038) -Fix (r8634): Sprite resulting from '?' substitution was reloaded into the cache entry for SPR_IMG_QUERY instead of the original sprite cache entry. This resulted in unaccounted missing sprite cache memory, and was exacerbated because the original missing sprite was not cached, so it did it again and again and again. Slowdowns and boom. Etc. 17 years ago
belugas 097b3b3c7b (svn r9662) -Documentation: Doxygen corrections and @file omissions 17 years ago
belugas 607a55f4ec (svn r9662) -Documentation: Doxygen corrections and @file omissions 17 years ago
belugas 6a86e75870 (svn r9556) -Documentation: doxygen and comment-style changes. 'R', 'S'.. The end of the preliminary work is near 17 years ago
belugas dfe5533db6 (svn r9556) -Documentation: doxygen and comment-style changes. 'R', 'S'.. The end of the preliminary work is near 17 years ago
rubidium 979ccd45ba (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {}; 17 years ago
rubidium 24c4d5b06d (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {}; 17 years ago
rubidium 4169bfba06 (svn r9050) -Codechange: Foo(void) -> Foo() 17 years ago
rubidium 36bb92ae24 (svn r9050) -Codechange: Foo(void) -> Foo() 17 years ago
rubidium c9b2b81413 (svn r8634) -Codechange: replace missing sprites with a red question mark. 18 years ago
rubidium ea55a04b69 (svn r8634) -Codechange: replace missing sprites with a red question mark. 18 years ago
Darkvater f6d68ab378 (svn r8218) -Codechange: Increase spritecache size to 2MB. This will vastly improve performance when using (lots of) grf files. You can change it yourself easily with the SPRITE_CACHE_SIZE compile flag. (peter1138). 18 years ago
Darkvater 653290c76a (svn r8218) -Codechange: Increase spritecache size to 2MB. This will vastly improve performance when using (lots of) grf files. You can change it yourself easily with the SPRITE_CACHE_SIZE compile flag. (peter1138). 18 years ago
peter1138 e6178acc18 (svn r8166) -Fix (r7797): Protect against out of bounds access to the sprite ptr
list.
18 years ago
peter1138 f19b87df08 (svn r8166) -Fix (r7797): Protect against out of bounds access to the sprite ptr
list.
18 years ago
KUDr 28e969924b (svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter 18 years ago
KUDr 33be1ecfb1 (svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter 18 years ago
rubidium a7d0cdf95f (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b. 18 years ago
rubidium f35ed4bbc2 (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b. 18 years ago
KUDr 07c30785ab (svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp) 18 years ago
KUDr e373ea7096 (svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp) 18 years ago