Commit Graph

38 Commits

Author SHA1 Message Date
Peter Nelson 34ba969c74
Change: Display more useful information in sprite aligner than sprite ID. (#12439)
Sprite IDs are not useful information given they change don't refer to anything outside the loaded game.

Instead, include the filename and nfo line at minimum, and include action A or action 5 sprite replacement information if applicable.
2024-04-06 21:16:02 +01:00
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
Rubidium 3a676a5af0 Codechange: replace static inline with static for non-class functions 2024-01-06 13:37:33 +01:00
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
PeterN db573c8742
Fix #10660: Sprite Font scale affected by viewport zoom level limits. (#10668) 2023-04-17 00:14:03 +02:00
PeterN e97bf271dc
Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. (#10663)
This avoids a (soft) namespace conflict between the four ST_* enums.
2023-04-16 20:00:55 +01:00
Jonathan G Rennison 5e413c9dcd
Fix #9804: Only apply sprite_zoom_min setting when sprites available (#9988)
Only discard sprite zoom levels when a suitable higher zoom level is
defined in the same colour mode

This is to avoid placeholder or empty sprites being used, causing
visual artefacts
2022-09-21 12:37:11 +02:00
Rubidium fdc11a9f94 Codechange: introduce SpriteFile to be used by the sprite loader instead of the global FIO slot functionality 2021-05-08 12:39:34 +02:00
Michael Lutz 6776229047 Codechange: Make the simple Malloc sprite allocator globally usable. 2021-02-22 22:16:07 +01:00
Michael Lutz 02e8741457 Codechange: Allow for using a sprite encoder that is not the currently active blitter when loading a sprite. 2021-02-22 22:16:07 +01:00
Niels Martin Hansen c8779fb311
Feature: NewGRF callback profiling (#7868)
Adds a console command newgrf_profile to collect some profiling data about NewGRF action 2 callbacks and produce a CSV file.
2020-01-26 13:45:51 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
frosch 7b553d255e (svn r27732) -Change: Turn the message about 'missing baseset sprites' from a popup into a static message that only shows in non-release versions, just like the 'missing translations' message. 2017-01-14 18:30:26 +00:00
michi_cc 6db39410a1 (svn r23887) -Feature: [NewGRF] Support for container version 2. 2012-02-04 13:29:04 +00:00
peter1138 81598273e9 (svn r23316) -Feature: Add ability to zoom in to 2x and 4x level. 2011-11-24 12:38:48 +00:00
peter1138 15d0a22aac (svn r23315) -Codechange: Only encode sprites for zoom levels that will be used. 2011-11-24 12:26:44 +00:00
frosch 93ae848b0a (svn r21788) -Codechange: Enable GetRawSprite() to also load sprites not using the spritecache but a custom allocator function. 2011-01-14 16:36:34 +00:00
frosch 3d1008318b (svn r21782) -Codechange: Move declaration of AllocatorProc from Blitter:: to spritecache.h 2011-01-14 15:34:33 +00:00
rubidium c72e2dde60 (svn r19723) -Add: a simple sprite alignment helper. It does not store the new offsets anywhere so as soon as the sprite is reloaded the offsets are gone (use a bigger sprite cache if this happens). Also anything that reloads NewGRFs (new games, loading games or (re)applying NewGRFs) clears the sprite cache and as such resets the offsets. 2010-04-25 16:27:30 +00:00
frosch 24e0945bc4 (svn r18846) -Codechange: Merge DrawTileSeq into DrawCommonTileSeq. 2010-01-17 15:05:25 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
alberth 9489490e48 (svn r16671) -Doc: Documenting Sprite structure. 2009-06-26 23:20:32 +00:00
smatz c03ce4b1c7 (svn r16492) -Remove: support for gcc2. It hasn't been able to compile OTTD for months. All attempts to do another workaround failed. 2009-06-01 11:49:46 +00:00
rubidium 0d99b6c71c (svn r16421) -Codechange: do not unnecessarily remove constness or unnecessarily add it. 2009-05-24 20:29:04 +00:00
rubidium c8e8911ef6 (svn r14223) -Codechange: make GetSprite aware of the 4 different types of sprites: fonts, recolour, mapgen and normal sprites. 2008-09-02 15:20:38 +00:00
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. 2008-05-06 15:11:33 +00:00
peter1138 1a9b741e43 (svn r12002) -Cleanup (r11981): Remove obsolete code to skip sprites from indexed GRFs. 2008-01-28 17:51:45 +00:00
rubidium a773d45885 (svn r11684) -Codechange: split gfx.h in a type and functional header. 2007-12-23 10:56:02 +00:00
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 2007-06-14 14:31:48 +00:00
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). 2007-06-12 09:40:50 +00:00
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
2007-06-11 11:50:49 +00:00
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.
2007-06-05 10:40:29 +00:00
belugas dfe5533db6 (svn r9556) -Documentation: doxygen and comment-style changes. 'R', 'S'.. The end of the preliminary work is near 2007-04-04 01:35:16 +00:00
rubidium 24c4d5b06d (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {}; 2007-03-07 12:11:48 +00:00
rubidium 36bb92ae24 (svn r9050) -Codechange: Foo(void) -> Foo() 2007-03-07 11:47:46 +00:00
rubidium f35ed4bbc2 (svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b. 2007-01-10 18:56:51 +00:00
rubidium 66bbf336c6 (svn r7759) -Merge: makefile rewrite. This merge features:
- A proper ./configure, so everything needs to be configured only once, not for every make.
 - Usage of makedepend when available. This greatly reduces the time needed for generating the dependencies.
 - A generator for all project files. There is a single file with sources, which is used to generate Makefiles and the project files for MSVC.
 - Proper support for OSX universal binaries.
 - Object files for non-MSVC compiles are also placed in separate directories, making is faster to switch between debug and release compiles and it does not touch the directory with the source files.
 - Functionality to make a bundle of all needed files for for example a nightly or distribution of a binary with all needed GRFs and language files.

Note: as this merge moves almost all files, it is recommended to make a backup of your working copy before updating your working copy.
2007-01-02 19:19:48 +00:00
Renamed from spritecache.h (Browse further)