Commit Graph

73 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison 0e581e0eeb Blitter: Add method to set rectangle colours, skipping D7 5 months ago
Jonathan G Rennison 97e6f3062e Adding of _t to (u)int types, and WChar to char32_t
See: eaae0bb5e
5 months ago
Jonathan G Rennison 88670a230f Merge branch 'master' into jgrpp
# Conflicts:
#	src/articulated_vehicles.cpp
#	src/articulated_vehicles.h
#	src/base_media_base.h
#	src/base_media_func.h
#	src/build_vehicle_gui.cpp
#	src/dock_gui.cpp
#	src/main_gui.cpp
#	src/music_gui.cpp
#	src/network/network_chat_gui.cpp
#	src/network/network_content.cpp
#	src/newgrf.cpp
#	src/newgrf_roadstop.cpp
#	src/os/windows/string_uniscribe.h
#	src/os/windows/win32.cpp
#	src/rail_gui.cpp
#	src/road.cpp
#	src/road_gui.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/smallmap_gui.cpp
#	src/strings.cpp
#	src/terraform_gui.cpp
#	src/tests/test_script_admin.cpp
#	src/tests/test_window_desc.cpp
#	src/timer/timer_game_calendar.h
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/viewport.cpp
#	src/widget_type.h
#	src/window.cpp
#	src/window_gui.h
6 months ago
Michael Lutz 071fdab236 Codechange: Replicate cursor screen backup to chat message display, removing explicit memory management.
Incidentally, this makes Blitter::GetBytesPerPixel unneeed.
7 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
Jonathan G Rennison aaf9fcebee Blitter: Add method to draw rectangle at x, y offset 1 year ago
Jonathan G Rennison 760cbcbb8b Merge branch 'master' into jgrpp
# Conflicts:
#	src/blitter/32bpp_anim.hpp
#	src/blitter/32bpp_base.hpp
#	src/blitter/8bpp_base.hpp
#	src/blitter/null.hpp
#	src/cheat_gui.cpp
#	src/gfx.cpp
#	src/linkgraph/linkgraph.cpp
#	src/spriteloader/grf.cpp
#	src/station_cmd.cpp
1 year ago
Patric Stout 1fb101eabb
Codechange: address CodeQL issue "Multiplication result converted to larger type" (#10306)
Most are very unlikely to ever be triggered in our codebase; two
stand out: linkgraph and money cheat. Those, potentially, could
wrap earlier than expected.
1 year ago
Jonathan G Rennison b92ae644c4 Add a Blitter::SetPixel32 function 2 years ago
Jonathan G Rennison a474e71243 Viewport: Cache landscape pixels in map mode
Avoid invalidating landscape pixels for non-landscape updates
(vehicles, overlays, etc.)
4 years ago
Jonathan G Rennison a152e2327c Viewport: Reduce unnecessary region redraws when scrolling viewports 4 years ago
Jonathan G Rennison cbdd9f84d8 Merge branch 'master' into jgrpp
# Conflicts:
#	src/console_gui.cpp
#	src/lang/korean.txt
#	src/video/sdl2_v.cpp
#	src/video/sdl2_v.h
#	src/window.cpp
#	src/window_gui.h
5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Jonathan G Rennison 674732cd68 Merge: Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Jonathan G Rennison ba34ec7ade Merge branch 'master' into jgrpp
Replace build and refit, and group collapse implementations
Fix template creation build and refit

# Conflicts:
#	Makefile.bundle.in
#	config.lib
#	src/animated_tile.cpp
#	src/blitter/32bpp_anim.hpp
#	src/blitter/32bpp_base.hpp
#	src/blitter/8bpp_base.hpp
#	src/blitter/null.hpp
#	src/build_vehicle_gui.cpp
#	src/command.cpp
#	src/command_func.h
#	src/console_gui.cpp
#	src/core/smallstack_type.hpp
#	src/date.cpp
#	src/debug.cpp
#	src/genworld_gui.cpp
#	src/ground_vehicle.hpp
#	src/group_gui.cpp
#	src/lang/korean.txt
#	src/linkgraph/linkgraph_gui.h
#	src/main_gui.cpp
#	src/misc_gui.cpp
#	src/network/core/game.h
#	src/network/core/packet.cpp
#	src/network/core/udp.cpp
#	src/network/core/udp.h
#	src/network/network_content.cpp
#	src/network/network_type.h
#	src/network/network_udp.cpp
#	src/newgrf_house.h
#	src/openttd.cpp
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/os/unix/crashlog_unix.cpp
#	src/os/windows/crashlog_win.cpp
#	src/osk_gui.cpp
#	src/pathfinder/opf/opf_ship.cpp
#	src/rail_cmd.cpp
#	src/rail_gui.cpp
#	src/saveload/saveload.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/smallmap_gui.h
#	src/station_base.h
#	src/station_cmd.cpp
#	src/table/gameopt_settings.ini
#	src/table/newgrf_debug_data.h
#	src/table/settings.ini
#	src/timetable_gui.cpp
#	src/toolbar_gui.cpp
#	src/train_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_gui.cpp
#	src/vehiclelist.cpp
#	src/viewport.cpp
#	src/widgets/dropdown.cpp
#	src/window_gui.h
5 years ago
Henry Wilson af7d9020a1 Codechange: Use override specifer for overriding member declarations
This is a C++11 feature that allows the compiler to check that a virtual
member declaration overrides a base-class member with the same signature.

Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked
as virtual despite being a template.
5 years ago
Jonathan G Rennison db924a4681 Codechange: [Blitter] Change DrawLine to be templated
This is remove per-pixel overheads due to use of the SetPixel virtual
method.
These overheads included:
* expensive virtual method call which prevents inlining
* palette lookup for every pixel
* branch on whether palette animation is enabled on every pixel

Regenerate project files.
5 years ago
Jonathan G Rennison 17257b9620 Add: 32bpp SSE2 blitter palette animator (#6795)
Create a new blitter mode: 32bpp-sse2-anim, which is 32bpp-anim + this.
32bpp-sse2-anim is now used by default where 32bpp-anim would have been.
Also use this with the 32bpp-sse4-anim blitter.

See issue #6469.
6 years ago
Jonathan G Rennison 11a10299d1 Blitter: Also use sprite flags for non-SSE 32bpp sprite encoder 6 years ago
Jonathan G Rennison 0c2f49c08d Blitter: Change DrawLine to be templated 6 years ago
frosch 19188818ea (svn r27796) -Fix [FS#6545]: 32bpp-anim blitters assumed that pitch and width of the screen were equal. 7 years ago
frosch d5f82bf55b (svn r27774) -Fix [FS#5889]: Enabling palette animation for 32bpp blitters while paused skipped initialisation of the palette and resulted in black windows.
-Revert (r23978): No SDL-specific fix required anymore. The new fix applies to all backends.
7 years ago
Jonathan G Rennison d14d5731d8 Fix wrong palette being used when switching to animated blitter.
Fixes black sprites and UI elements when switching on full
animations on win32 and OSX.
7 years ago
frosch 914d4616ca (svn r27575) -Fix [FS#6404]: Memory leak when disabling palette animation. (JGR) 8 years ago
Jonathan G Rennison d00fa4d25b Implement a 32bpp SSE2 palette animator. This is ~4x faster than 32bpp-anim's.
Create a new blitter mode: 32bpp-sse2-anim, which is 32bpp-anim + this.
32bpp-sse2-anim is now used by default where 32bpp-anim would have been.
Also use this with the 32bpp-sse4-anim blitter mode.

Fix memory leak in current 32bpp animated blitters.
9 years ago
patch-import 536a95dfd0 Import combined Enhanced viewport: zoom out, overlays & tooltips (r53_27127) patch
https://www.tt-forums.net/viewtopic.php?f=33&t=53394
9 years ago
rubidium 793dc27096 (svn r26214) -Add: specialised animated SSE4 blitter (MJP)
With 32bpp base set about 15-20% faster in the Draw function (slower with 8bpp base set). Overall, with 32bpp base set, about 5% faster.
11 years ago
rubidium 4c84d13454 (svn r26214) -Add: specialised animated SSE4 blitter (MJP)
With 32bpp base set about 15-20% faster in the Draw function (slower with 8bpp base set). Overall, with 32bpp base set, about 5% faster.
11 years ago
rubidium 4a911754b5 (svn r26209) -Codechange: remove some template magic and simplify some code 11 years ago
rubidium 2618d960e3 (svn r26209) -Codechange: remove some template magic and simplify some code 11 years ago
rubidium d709a7f465 (svn r26108) -Codechange: some coding style (whitespace) 11 years ago
rubidium defda16eb6 (svn r26108) -Codechange: some coding style (whitespace) 11 years ago
rubidium ddae614e74 (svn r24111) -Codechange: use Colour more instead of manually bitstuffing 12 years ago
rubidium 54e36c4ff8 (svn r24111) -Codechange: use Colour more instead of manually bitstuffing 12 years ago
truebrain dea311a07e (svn r23729) -Fix (r23670) [FS#4941]: if you increase the buffer size, also increase the bytes per pixel 13 years ago
truebrain 2aa6086256 (svn r23729) -Fix (r23670) [FS#4941]: if you increase the buffer size, also increase the bytes per pixel 13 years ago
peter1138 42347d3c45 (svn r23670) -Feature: Add ability to adjust brightness of colour after remapping for 32bpp sprites 13 years ago
peter1138 3ef77e55c5 (svn r23670) -Feature: Add ability to adjust brightness of colour after remapping for 32bpp sprites 13 years ago
smatz 36747f96a6 (svn r23588) -Codechange: use the 'final' keyword so compiler can optimise out some indirect calls 13 years ago
smatz 33d283fdb1 (svn r23588) -Codechange: use the 'final' keyword so compiler can optimise out some indirect calls 13 years ago
rubidium e6c46d4cf4 (svn r23448) -Fix: keep a local copy of the palette in the 32bpp animated blitter so changes of the palette data during the game don't influence drawing (with SDL) 13 years ago
rubidium 61625e53c9 (svn r23448) -Fix: keep a local copy of the palette in the 32bpp animated blitter so changes of the palette data during the game don't influence drawing (with SDL) 13 years ago
rubidium 7dfcc69011 (svn r22397) -Document: some tidbits of the blitter code 13 years ago
rubidium 485c7cd99e (svn r22397) -Document: some tidbits of the blitter code 13 years ago
alberth 206c1b4cd0 (svn r18907) -Cleanup: Smallmap was the last user of SetPixelIfEmpty(). 15 years ago
alberth b2f9b0ac43 (svn r18907) -Cleanup: Smallmap was the last user of SetPixelIfEmpty(). 15 years ago
rubidium 72ce1f4979 (svn r18873) -Codechange: use PaletteID also in the blitter 15 years ago
rubidium db33e32b4d (svn r18873) -Codechange: use PaletteID also in the blitter 15 years ago
rubidium 9467b7c6d6 (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 years ago