Fix #10490: Allow ships to exit depots if another is not moving at the exit point...
[openttd-github.git] / src / video / dedicated_v.h
blob54e2dd402bfe249b676fb35c7be5d407569ffccf
1 /*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
8 /** @file dedicated_v.h Base for the dedicated video driver. */
10 #ifndef VIDEO_DEDICATED_H
11 #define VIDEO_DEDICATED_H
13 #include "video_driver.hpp"
15 /** The dedicated server video driver. */
16 class VideoDriver_Dedicated : public VideoDriver {
17 public:
18 const char *Start(const StringList &param) override;
20 void Stop() override;
22 void MakeDirty(int left, int top, int width, int height) override;
24 void MainLoop() override;
26 bool ChangeResolution(int w, int h) override;
28 bool ToggleFullscreen(bool fullscreen) override;
29 const char *GetName() const override { return "dedicated"; }
30 bool HasGUI() const override { return false; }
33 /** Factory for the dedicated server video driver. */
34 class FVideoDriver_Dedicated : public DriverFactoryBase {
35 public:
36 #ifdef DEDICATED
37 /* Automatically select this dedicated driver when making a dedicated
38 * server build. */
39 static const int PRIORITY = 10;
40 #else
41 static const int PRIORITY = 0;
42 #endif
43 FVideoDriver_Dedicated() : DriverFactoryBase(Driver::DT_VIDEO, PRIORITY, "dedicated", "Dedicated Video Driver") {}
44 Driver *CreateInstance() const override { return new VideoDriver_Dedicated(); }
47 #endif /* VIDEO_DEDICATED_H */