Commit Graph

195 Commits (0a9c44d1a2b3b5de76595dfc74938fca34b3448a)

Author SHA1 Message Date
Jonathan G Rennison 0a9c44d1a2 Merge branch 'master' into jgrpp
# Conflicts:
#	src/airport_gui.cpp
#	src/blitter/32bpp_anim_sse4.cpp
#	src/console_cmds.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/newgrf_object.h
#	src/road_gui.cpp
#	src/widgets/road_widget.h
#	src/window.cpp
2 years ago
Peter Nelson dc1b84aa1e Cleanup: Text widgets are capable of drawing text without assistance.
Remove custom text drawing of some widgets in favour of standard text
widgets.
2 years ago
Jonathan G Rennison 24c6dfe872 Merge branch 'master' into jgrpp-beta 3 years ago
Jonathan G Rennison 81290df946 Merge branch 'master' into jgrpp-beta
# Conflicts:
#	src/lang/spanish.txt
#	src/network/core/tcp_content_type.h
#	src/network/network_content.cpp
#	src/saveload/cheat_sl.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/saveload/station_sl.cpp
#	src/saveload/vehicle_sl.cpp
#	src/settings.cpp
#	src/settings_internal.h
#	src/table/settings.h.preamble
#	src/table/settings/company_settings.ini
#	src/table/settings/currency_settings.ini
#	src/table/settings/gameopt_settings.ini
#	src/table/settings/misc_settings.ini
#	src/table/settings/settings.ini
#	src/table/settings/win32_settings.ini
#	src/table/settings/window_settings.ini
3 years ago
rubidium42 05005dcdfa Codechange: [Network] Use std::string instead of char[] for the name of the file that is downloading 3 years ago
rubidium42 e3717ae903 Codechange: [ContentInfo] Use std::string instead of string buffers 3 years ago
rubidium42 df181bb641 Codechange: [ContentInfo] Use a vector for dependencies instead of custom allocation 3 years ago
rubidium42 9c424ab741 Codechange: [ContentInfo] Use StringList for tags instead of custom allocations 3 years ago
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 3 years ago
glx22 994bf19aef Fix f6d5c01: Delay deletion when closing windows 3 years ago
Patric Stout a403653805
Codechange: [Network] split CloseSocket and CloseConnection more clearly (#9261)
* Codechange: [Network] split CloseSocket and CloseConnection more clearly

- CloseSocket now closes the actual OS socket.
- CloseConnection frees up the resources to just before CloseSocket.
- dtors call CloseSocket / CloseConnection where needed.
3 years ago
Rubidium bf4fe19a66 Codechange: merge duplicated logic to scroll in lists by key into a single function 3 years ago
Patric Stout 970fedd78c Add: make modal windows update more smooth
Basically, modal windows had their own thread-locking for what
drawing was possible. This is a bit nonsense now we have a
game-thread. And it makes much more sense to do things like
NewGRFScan and GenerateWorld in the game-thread, and not in a
thread next to the game-thread.

This commit changes that: it removes the threads for NewGRFScan
and GenerateWorld, and just runs the code in the game-thread.
On regular intervals it allows the draw-thread to do a tick,
which gives a much smoother look and feel.

It does slow down NewGRFScan and GenerateWorld ever so slightly
as it spends more time on drawing. But the slowdown is not
measureable on my machines (with 700+ NewGRFs / 4kx4k map and
a Debug build).

Running without a game-thread means NewGRFScan and GenerateWorld
are now blocking.
3 years ago
Patric Stout ac2b5e57cf
Fix: mention our websites with https:// (instead of http://) (#8657)
It is 2021. Nobody should advertise http anymore. Not even us.
3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 3 years ago
Yexo a9b3312d1a Fix #8024: make online content gui more responsive while loading
Previously the internal content list was invalidated and sorted for
every new item added. Now the sorting is delayed until the GUI is
drawn, which means we only sort once per GUI tick.

Since the amount of incoming items per GUI tick is not controlled by
the GUI but rather by network speed, we were previously doing a lot
of duplicate work per tick, causing the mouse cursor to lag while
the list was initialized.
4 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
JMcKiern 04f659e768 Fix: Some typos found using codespell 5 years ago
glx 2db88953e7 Codechange: use std::sort() in GUIList 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
PeterN 9244dad3f1
Fix #7434: Incorrect use of vector iterator. (#7437) 5 years ago
glx22 66dd7c3879
Fix: MSVC warnings (#7423) 5 years ago
Henry Wilson c01a2e2a81 Codechange: Removed SmallVector completely 5 years ago
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 5 years ago
Henry Wilson 297fd3dda3 Codechange: Replaced SmallVector::Include() with include() 5 years ago
Henry Wilson 2bc2de9034 Codechange: Replaced SmallVector::Find() with std::find() 5 years ago
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 5 years ago
Henry Wilson 097328c3d7 Codechange: Replaced SmallVector::Get() const with std alternatives 5 years ago
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 5 years ago
Henry Wilson 9cba6f7193 Codechange: Replaced SmallVector::Compact() with std::vector::shrink_to_fit() 5 years ago
Henry Wilson bfd79e59dc Codechange: Replace SmallVector::Clear() with std::vector::clear() 5 years ago
peter1138 07de9d6c3f Codechange: Use override keyword in networking classes. 5 years ago
peter1138 317f69c152 Codechange: Use override specifier in Window-derived classes. 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
Patric Stout e3c639a09f Remove: ENABLE_NETWORK switch
This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.

Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.

A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.

With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.

All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
5 years ago
glx b22fbfbe3d Add: allow opening of one TextfileWindow per type 5 years ago
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 6 years ago
frosch b4b98e5165 (svn r27893) -Codechange: Use fallthrough attribute. (LordAro) 7 years ago
zuu b22d6715cd (svn r27469) -Fix (r27468): Don't fetch all content info from content server when showing a online content window with exactly one type of content. 9 years ago
zuu aabc46712a (svn r27468) -Fix (r27444): Game Scripts were not displayed in the content download window when opened from the AI/GS settings window. 9 years ago
zuu c9f1d82345 (svn r27444) -Add: When viewing online content of a particular type, hide content of other types unless they have been (auto)selected for download. 9 years ago
zuu 4fcaee1fee (svn r27443) -Fix: Negoation in comment was wrong. 9 years ago
michi_cc 95cb7c8692 (svn r27288) -Fix: Slow network content GUI in MSVC Debug builds due to repeated string resolving. 9 years ago
peter1138 d9179d518e (svn r26921) -Codechange: Adjust content window listing to fit icon size. 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
frosch 62c0d42f92 (svn r26167) -Fix [FS#5834]: Certain hotkeys crashed the content GUI when the list was empty. 11 years ago
michi_cc b911f4a452 (svn r25668) -Codechange: Pass proper Unicode UCS-4 characters instead of just UCS-2 to the window key press handlers. 11 years ago
frosch 43ec0bf0c1 (svn r25537) -Codechange: Optionally make WWT_MATRIX compute the number of rows and columns from the resize step size. 11 years ago
frosch 98fdd20f84 (svn r25531) -Codechange: Use separate function to set data of WWT_MATRIX widgets. 11 years ago
frosch 4e4e635916 (svn r25294) -Feature: Add another button to window title bars to resize the window to its default size. 11 years ago