Commit Graph

37 Commits (97e6f3062e800afcff3ce3098e295059419052ae)

Author SHA1 Message Date
Jonathan G Rennison 97e6f3062e Adding of _t to (u)int types, and WChar to char32_t
See: eaae0bb5e
5 months ago
Jonathan G Rennison b72366419b Merge branch 'master' into jgrpp
# Conflicts:
#	src/blitter/32bpp_anim.cpp
#	src/blitter/8bpp_optimized.cpp
#	src/gfx.cpp
#	src/gfx_func.h
#	src/gfxinit.cpp
#	src/network/core/os_abstraction.cpp
#	src/spritecache.cpp
5 months ago
Peter Nelson 9ce1626bb4 Change: Support custom transparency remaps with 32bpp blitters.
This closes a 15 year old TODO...
5 months ago
Jonathan G Rennison d5a7a67b8c Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/ci-build.yml
#	src/ai/ai_gui.cpp
#	src/blitter/32bpp_optimized.cpp
#	src/blitter/32bpp_simple.cpp
#	src/blitter/32bpp_sse2.cpp
#	src/blitter/8bpp_optimized.cpp
#	src/blitter/8bpp_simple.cpp
#	src/blitter/null.cpp
#	src/blitter/null.hpp
#	src/company_gui.cpp
#	src/game/game_gui.cpp
#	src/genworld_gui.cpp
#	src/gfx.cpp
#	src/gfx_func.h
#	src/graph_gui.cpp
#	src/industry_gui.cpp
#	src/linkgraph/linkgraphjob.cpp
#	src/network/network_gui.cpp
#	src/newgrf_debug_gui.cpp
#	src/openttd.cpp
#	src/pathfinder/npf/aystar.h
#	src/road_gui.cpp
#	src/saveload/order_sl.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/script/api/script_log.cpp
#	src/script/api/script_town.cpp
#	src/script/script_gui.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/settings_table.cpp
#	src/settings_type.h
#	src/smallmap_gui.cpp
#	src/sortlist_type.h
#	src/spritecache.cpp
#	src/spriteloader/grf.cpp
#	src/spriteloader/grf.hpp
#	src/spriteloader/spriteloader.hpp
#	src/station_cmd.cpp
#	src/station_cmd.h
#	src/station_gui.cpp
#	src/strings.cpp
#	src/toolbar_gui.cpp
#	src/town_cmd.cpp
#	src/town_gui.cpp
#	src/vehicle_gui.cpp
#	src/vehicle_gui_base.h
#	src/video/opengl.cpp
#	src/video/opengl.h
#	src/widgets/dropdown.cpp
#	src/widgets/dropdown_type.h
#	src/window_gui.h
5 months ago
Peter Nelson b85ecf9ac2
Codechange: Replace pointer to Sprite array with reference to SpriteCollection. (#11580)
Add `SpriteLoader::SpriteCollection` type which is an array of `SpriteLoad::Sprite`.

This removes the ambiguity of what `SpriteLoader::Sprite *` is pointing to,
and cleans up mismatches using both dereference -> and array access [] for the
same object.
6 months ago
Jonathan G Rennison 46f5fb9f25 Sprite cache: Allow caching only required subset of sprite zoom levels
Enable for blitters based on 32bpp_optimized or SSE
10 months ago
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
11 months ago
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 3 years ago
Jonathan G Rennison 4ef363422a Add 32bpp blitter support for adjusting brightness of drawn sprites 3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 3 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
rubidium 9c31ffd893 (svn r26969) -Fix (r26869): black palette didn't work very well with unmasked 32bpp sprites 10 years ago
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 10 years ago
peter1138 209d3e2e9e (svn r26463) -Fix (r10190ish): Add special handling for PALETTE_CRASH to work for non-8bpp-mapped sprites. 10 years ago
rubidium f817b06c18 (svn r26103) -Fix: prevent odd overflows due to integer promotion 11 years ago
frosch 640d39c001 (svn r25820) -Codechange: More const-ness. 11 years ago
rubidium 54e36c4ff8 (svn r24111) -Codechange: use Colour more instead of manually bitstuffing 12 years ago
michi_cc 47171c7829 (svn r23674) -Fix (r23670): Don't read invalid memory in the 32bpp simple blitter. 13 years ago
peter1138 3ef77e55c5 (svn r23670) -Feature: Add ability to adjust brightness of colour after remapping for 32bpp sprites 13 years ago
rubidium 485c7cd99e (svn r22397) -Document: some tidbits of the blitter code 13 years ago
frosch 1ffd720f81 (svn r22383) -Codechange: Rename PALETTE_TO_STRUCT_GREY to PALETTE_NEWSPAPER as it does not belong to the other PALETTE_TO_STRUCT_xxx recolourings. 13 years ago
frosch 3d1008318b (svn r21782) -Codechange: Move declaration of AllocatorProc from Blitter:: to spritecache.h 14 years ago
rubidium db33e32b4d (svn r18873) -Codechange: use PaletteID also in the blitter 15 years ago
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
rubidium c0a8d09ca7 (svn r15428) -Codechange: consistently use colour instead of having both color and colour. 16 years ago
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 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
rubidium d4e6a6bf57 (svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h. 17 years ago
rubidium a773d45885 (svn r11684) -Codechange: split gfx.h in a type and functional header. 17 years ago
smatz 93c3e0d6ad (svn r11652) -Codechange: add the svn $ header for several files 17 years ago
truelight 89bdfaacd9 (svn r11076) -Fix: MakeTransparent of 32bpp blitter used 0..100; using 0..255 makes it much faster (frosch)
-Fix: ComposeColourXXX could work a tiny bit faster when using 256, not 255 as value to divide with; downside is that it can give alpha errors (frosch)
17 years ago
truelight 2a6b7e4e02 (svn r10225) -Codechange: move common Colour routines for 32bpp to the base class (and nick it colour, not color) 17 years ago
truelight 9ad02c11c6 (svn r10215) -Fix r10214: forgot 2 cases of the same mistake 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 4185c4afcd (svn r10142) -Fix r10132: do something useful with the alpha channel instead of ignoring it 17 years ago
truelight e7221d1fa9 (svn r10132) -Codechange: split out the last direct video-buffer read access to the blitter-layer
-Add: added a new renderer and blitter to make room for some optimized bpp
-Fix: fill the alpha channel in the grf-spriteloader
17 years ago