Fix #10490: Allow ships to exit depots if another is not moving at the exit point...
[openttd-github.git] / src / video / null_v.h
blobee83de7e65d32a801426ae7fd074bd4dcc26da20
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 null_v.h Base of the video driver that doesn't blit. */
10 #ifndef VIDEO_NULL_H
11 #define VIDEO_NULL_H
13 #include "video_driver.hpp"
15 /** The null video driver. */
16 class VideoDriver_Null : public VideoDriver {
17 private:
18 uint ticks; ///< Amount of ticks to run.
20 public:
21 const char *Start(const StringList &param) override;
23 void Stop() override;
25 void MakeDirty(int left, int top, int width, int height) override;
27 void MainLoop() override;
29 bool ChangeResolution(int w, int h) override;
31 bool ToggleFullscreen(bool fullscreen) override;
32 const char *GetName() const override { return "null"; }
33 bool HasGUI() const override { return false; }
36 /** Factory the null video driver. */
37 class FVideoDriver_Null : public DriverFactoryBase {
38 public:
39 FVideoDriver_Null() : DriverFactoryBase(Driver::DT_VIDEO, 0, "null", "Null Video Driver") {}
40 Driver *CreateInstance() const override { return new VideoDriver_Null(); }
43 #endif /* VIDEO_NULL_H */