Merge branch 'master' into jgrpp

# Conflicts:
#	cmake/CompileFlags.cmake
#	src/3rdparty/squirrel/squirrel/sqclosure.h
#	src/3rdparty/squirrel/squirrel/sqobject.h
#	src/3rdparty/squirrel/squirrel/sqvm.h
#	src/aircraft.h
#	src/airport_gui.cpp
#	src/blitter/32bpp_sse_func.hpp
#	src/blitter/null.hpp
#	src/bridge_gui.cpp
#	src/build_vehicle_gui.cpp
#	src/cargotype.h
#	src/cheat_gui.cpp
#	src/command.cpp
#	src/command_func.h
#	src/company_gui.cpp
#	src/console_gui.cpp
#	src/date_gui.cpp
#	src/depot_gui.cpp
#	src/dock_gui.cpp
#	src/economy.cpp
#	src/error_gui.cpp
#	src/fileio.cpp
#	src/fios.cpp
#	src/fios_gui.cpp
#	src/fontcache/spritefontcache.h
#	src/framerate_gui.cpp
#	src/game/game_text.cpp
#	src/gamelog.cpp
#	src/genworld_gui.cpp
#	src/gfx_layout_fallback.cpp
#	src/group_gui.cpp
#	src/highscore_gui.cpp
#	src/hotkeys.cpp
#	src/industry_cmd.cpp
#	src/industry_gui.cpp
#	src/landscape.cpp
#	src/main_gui.cpp
#	src/misc_cmd.cpp
#	src/misc_gui.cpp
#	src/network/core/tcp_game.cpp
#	src/network/core/udp.cpp
#	src/network/network_chat_gui.cpp
#	src/network/network_content_gui.cpp
#	src/network/network_gui.cpp
#	src/network/network_server.cpp
#	src/network/network_server.h
#	src/newgrf_airport.cpp
#	src/newgrf_airport.h
#	src/newgrf_airporttiles.cpp
#	src/newgrf_airporttiles.h
#	src/newgrf_animation_base.h
#	src/newgrf_canal.cpp
#	src/newgrf_commons.h
#	src/newgrf_config.cpp
#	src/newgrf_debug_gui.cpp
#	src/newgrf_engine.cpp
#	src/newgrf_engine.h
#	src/newgrf_generic.cpp
#	src/newgrf_gui.cpp
#	src/newgrf_house.cpp
#	src/newgrf_house.h
#	src/newgrf_industries.cpp
#	src/newgrf_industries.h
#	src/newgrf_industrytiles.cpp
#	src/newgrf_industrytiles.h
#	src/newgrf_object.cpp
#	src/newgrf_object.h
#	src/newgrf_railtype.cpp
#	src/newgrf_railtype.h
#	src/newgrf_roadstop.cpp
#	src/newgrf_roadstop.h
#	src/newgrf_roadtype.cpp
#	src/newgrf_roadtype.h
#	src/newgrf_spritegroup.cpp
#	src/newgrf_spritegroup.h
#	src/newgrf_station.cpp
#	src/newgrf_station.h
#	src/newgrf_town.cpp
#	src/newgrf_town.h
#	src/news_gui.cpp
#	src/object_gui.cpp
#	src/order_gui.cpp
#	src/os/macosx/crashlog_osx.cpp
#	src/os/unix/crashlog_unix.cpp
#	src/os/windows/crashlog_win.cpp
#	src/os/windows/win32.cpp
#	src/os/windows/win32_main.cpp
#	src/pathfinder/npf/npf.cpp
#	src/pathfinder/npf/queue.cpp
#	src/rail_cmd.cpp
#	src/rail_gui.cpp
#	src/road_gui.cpp
#	src/roadveh.h
#	src/saveload/saveload.cpp
#	src/screenshot.cpp
#	src/script/api/script_text.hpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/settings_internal.h
#	src/settings_table.cpp
#	src/signs_cmd.cpp
#	src/signs_gui.cpp
#	src/smallmap_gui.cpp
#	src/smallmap_gui.h
#	src/spriteloader/grf.hpp
#	src/station_cmd.cpp
#	src/station_gui.cpp
#	src/station_map.h
#	src/statusbar_gui.cpp
#	src/stdafx.h
#	src/strgen/strgen.cpp
#	src/table/newgrf_debug_data.h
#	src/terraform_gui.cpp
#	src/timer/timer_game_calendar.cpp
#	src/timer/timer_window.cpp
#	src/town.h
#	src/town_cmd.cpp
#	src/town_gui.cpp
#	src/train_gui.cpp
#	src/transparency_gui.cpp
#	src/vehicle_gui.cpp
#	src/water_cmd.cpp
#	src/waypoint_cmd.cpp
#	src/widget.cpp
#	src/widget_type.h
#	src/widgets/dropdown.cpp
#	src/widgets/rail_widget.h
#	src/widgets/terraform_widget.h
#	src/window.cpp
#	src/window_gui.h
This commit is contained in:
Jonathan G Rennison
2023-11-20 22:26:57 +00:00
278 changed files with 1680 additions and 1495 deletions

View File

@@ -635,7 +635,7 @@ NSView *VideoDriver_CocoaQuartz::AllocateDrawView()
}
/** Resize the window. */
void VideoDriver_CocoaQuartz::AllocateBackingStore(bool force)
void VideoDriver_CocoaQuartz::AllocateBackingStore(bool)
{
if (this->window == nil || this->cocoaview == nil || this->setup) return;

View File

@@ -103,7 +103,7 @@ extern bool SafeLoad(const std::string &filename, SaveLoadOperation fop, Detaile
static FVideoDriver_Dedicated iFVideoDriver_Dedicated;
const char *VideoDriver_Dedicated::Start(const StringList &parm)
const char *VideoDriver_Dedicated::Start(const StringList &)
{
this->UpdateAutoResolution();
@@ -140,9 +140,9 @@ void VideoDriver_Dedicated::Stop()
free(_dedicated_video_mem);
}
void VideoDriver_Dedicated::MakeDirty(int left, int top, int width, int height) {}
bool VideoDriver_Dedicated::ChangeResolution(int w, int h) { return false; }
bool VideoDriver_Dedicated::ToggleFullscreen(bool fs) { return false; }
void VideoDriver_Dedicated::MakeDirty(int, int, int, int) {}
bool VideoDriver_Dedicated::ChangeResolution(int, int) { return false; }
bool VideoDriver_Dedicated::ToggleFullscreen(bool) { return false; }
#if defined(UNIX)
static bool InputWaiting()

View File

@@ -48,7 +48,7 @@ const char *VideoDriver_Null::Start(const StringList &parm)
void VideoDriver_Null::Stop() { }
void VideoDriver_Null::MakeDirty(int left, int top, int width, int height) {}
void VideoDriver_Null::MakeDirty(int, int, int, int) {}
void VideoDriver_Null::MainLoop()
{
@@ -74,6 +74,6 @@ void VideoDriver_Null::MainLoop()
}
}
bool VideoDriver_Null::ChangeResolution(int w, int h) { return false; }
bool VideoDriver_Null::ChangeResolution(int, int) { return false; }
bool VideoDriver_Null::ToggleFullscreen(bool fs) { return false; }
bool VideoDriver_Null::ToggleFullscreen(bool) { return false; }

View File

@@ -407,7 +407,7 @@ static bool BindPersistentBufferExtensions()
}
/** Callback to receive OpenGL debug messages. */
void APIENTRY DebugOutputCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const void *userParam)
void APIENTRY DebugOutputCallback([[maybe_unused]] GLenum source, GLenum type, [[maybe_unused]] GLuint id, GLenum severity, [[maybe_unused]] GLsizei length, const GLchar *message, [[maybe_unused]] const void *userParam)
{
/* Make severity human readable. */
const char *severity_str = "";

View File

@@ -54,7 +54,7 @@ static OGLProc GetOGLProcAddressCallback(const char *proc)
bool VideoDriver_SDL_OpenGL::CreateMainWindow(uint w, uint h, uint flags)
{
return this->VideoDriver_SDL_Base::CreateMainWindow(w, h, SDL_WINDOW_OPENGL);
return this->VideoDriver_SDL_Base::CreateMainWindow(w, h, flags | SDL_WINDOW_OPENGL);
}
const char *VideoDriver_SDL_OpenGL::Start(const StringList &param)

View File

@@ -77,7 +77,7 @@ public:
* Change the vsync setting.
* @param vsync The new setting.
*/
virtual void ToggleVsync(bool vsync) {}
virtual void ToggleVsync([[maybe_unused]] bool vsync) {}
/**
* Callback invoked after the blitter was changed.

View File

@@ -945,7 +945,7 @@ void VideoDriver_Win32Base::EditBoxLostFocus()
SetCandidatePos(this->main_wnd);
}
static BOOL CALLBACK MonitorEnumProc(HMONITOR hMonitor, HDC hDC, LPRECT rc, LPARAM data)
static BOOL CALLBACK MonitorEnumProc(HMONITOR hMonitor, HDC, LPRECT, LPARAM data)
{
auto &list = *reinterpret_cast<std::vector<int>*>(data);
@@ -1245,10 +1245,9 @@ static OGLProc GetOGLProcAddressCallback(const char *proc)
/**
* Set the pixel format of a window-
* @param dc Device context to set the pixel format of.
* @param fullscreen Should the pixel format be used for fullscreen drawing?
* @return nullptr on success, error message otherwise.
*/
static const char *SelectPixelFormat(HDC dc, bool fullscreen)
static const char *SelectPixelFormat(HDC dc)
{
PIXELFORMATDESCRIPTOR pfd = {
sizeof(PIXELFORMATDESCRIPTOR), // Size of this struct.
@@ -1289,7 +1288,7 @@ static void LoadWGLExtensions()
HDC dc = GetDC(wnd);
/* Set pixel format of the window. */
if (SelectPixelFormat(dc, false) == nullptr) {
if (SelectPixelFormat(dc) == nullptr) {
/* Create rendering context. */
HGLRC rc = wglCreateContext(dc);
if (rc != nullptr) {
@@ -1404,7 +1403,7 @@ const char *VideoDriver_Win32OpenGL::AllocateContext()
{
this->dc = GetDC(this->main_wnd);
const char *err = SelectPixelFormat(this->dc, this->fullscreen);
const char *err = SelectPixelFormat(this->dc);
if (err != nullptr) return err;
HGLRC rc = nullptr;

View File

@@ -160,7 +160,7 @@ protected:
bool AllocateBackingStore(int w, int h, bool force = false) override;
void *GetVideoPointer() override;
void ReleaseVideoPointer() override;
void PaletteChanged(HWND hWnd) override {}
void PaletteChanged(HWND) override {}
const char *AllocateContext();
void DestroyContext();