summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTechGeekNZ <git@tech.geek.nz>2020-06-20 17:12:31 +1200
committerCharles Pigott <charlespigott@googlemail.com>2020-06-27 14:19:35 +0100
commit3c8d0aa3544602dd8e34ec8ffcdc12cfc7f73b3f (patch)
tree89368edbecf3ff2de5c295ccbc21892558d26b7a /src
parented6f31f601ef92e098f5555e9bb2b1492c5a7e79 (diff)
downloadopenttd-3c8d0aa3544602dd8e34ec8ffcdc12cfc7f73b3f.tar.xz
Cleanup: Give `TakeScreenshot` a more sensible name
Diffstat (limited to 'src')
-rw-r--r--src/screenshot.cpp10
-rw-r--r--src/screenshot.h2
-rw-r--r--src/screenshot_gui.cpp2
-rw-r--r--src/toolbar_gui.cpp16
4 files changed, 15 insertions, 15 deletions
diff --git a/src/screenshot.cpp b/src/screenshot.cpp
index d2bb6a1f3..c89586226 100644
--- a/src/screenshot.cpp
+++ b/src/screenshot.cpp
@@ -845,12 +845,12 @@ static void ScreenshotConfirmationCallback(Window *w, bool confirmed)
}
/**
- * Take a screenshot.
- * Ask for confirmation if the screenshot will be huge. Delegates to \c MakeScreenshot to perform the action.
+ * Make a screenshot.
+ * Ask for confirmation first if the screenshot will be huge.
* @param t Screenshot type: World, defaultzoom, heightmap or viewport screenshot
* @see MakeScreenshot
*/
-void TakeScreenshot(ScreenshotType t)
+void MakeScreenshotWithConfirm(ScreenshotType t)
{
ViewPort vp;
SetupScreenshotViewport(t, &vp);
@@ -868,11 +868,11 @@ void TakeScreenshot(ScreenshotType t)
/**
* Make a screenshot.
- * No questions asked, just do it.
+ * Unconditionally take a screenshot of the requested type.
* @param t the type of screenshot to make.
* @param name the name to give to the screenshot.
* @return true iff the screenshot was made successfully
- * @see TakeScreenshot
+ * @see MakeScreenshotWithConfirm
*/
bool MakeScreenshot(ScreenshotType t, const char *name)
{
diff --git a/src/screenshot.h b/src/screenshot.h
index 2f6324c22..b87259363 100644
--- a/src/screenshot.h
+++ b/src/screenshot.h
@@ -27,7 +27,7 @@ enum ScreenshotType {
void SetupScreenshotViewport(ScreenshotType t, struct ViewPort *vp);
bool MakeHeightmapScreenshot(const char *filename);
-void TakeScreenshot(ScreenshotType t);
+void MakeScreenshotWithConfirm(ScreenshotType t);
bool MakeScreenshot(ScreenshotType t, const char *name);
bool MakeMinimapWorldScreenshot();
diff --git a/src/screenshot_gui.cpp b/src/screenshot_gui.cpp
index ae5854fb7..c0e65f13d 100644
--- a/src/screenshot_gui.cpp
+++ b/src/screenshot_gui.cpp
@@ -39,7 +39,7 @@ struct ScreenshotWindow : Window {
case WID_SC_TAKE_HEIGHTMAP: st = SC_HEIGHTMAP; break;
case WID_SC_TAKE_MINIMAP: st = SC_MINIMAP; break;
}
- TakeScreenshot(st);
+ MakeScreenshotWithConfirm(st);
}
};
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp
index 4d97abb72..f471ac115 100644
--- a/src/toolbar_gui.cpp
+++ b/src/toolbar_gui.cpp
@@ -2086,10 +2086,10 @@ struct MainToolbarWindow : Window {
case MTHK_BUILD_TREES: ShowBuildTreesToolbar(); break;
case MTHK_MUSIC: ShowMusicWindow(); break;
case MTHK_AI_DEBUG: ShowAIDebugWindow(); break;
- case MTHK_SMALL_SCREENSHOT: TakeScreenshot(SC_VIEWPORT); break;
- case MTHK_ZOOMEDIN_SCREENSHOT: TakeScreenshot(SC_ZOOMEDIN); break;
- case MTHK_DEFAULTZOOM_SCREENSHOT: TakeScreenshot(SC_DEFAULTZOOM); break;
- case MTHK_GIANT_SCREENSHOT: TakeScreenshot(SC_WORLD); break;
+ case MTHK_SMALL_SCREENSHOT: MakeScreenshotWithConfirm(SC_VIEWPORT); break;
+ case MTHK_ZOOMEDIN_SCREENSHOT: MakeScreenshotWithConfirm(SC_ZOOMEDIN); break;
+ case MTHK_DEFAULTZOOM_SCREENSHOT: MakeScreenshotWithConfirm(SC_DEFAULTZOOM); break;
+ case MTHK_GIANT_SCREENSHOT: MakeScreenshotWithConfirm(SC_WORLD); break;
case MTHK_CHEATS: if (!_networking) ShowCheatWindow(); break;
case MTHK_TERRAFORM: ShowTerraformToolbar(); break;
case MTHK_EXTRA_VIEWPORT: ShowExtraViewPortWindowForTileUnderCursor(); break;
@@ -2461,10 +2461,10 @@ struct ScenarioEditorToolbarWindow : Window {
case MTEHK_SIGN: cbf = ToolbarScenPlaceSign(this); break;
case MTEHK_MUSIC: ShowMusicWindow(); break;
case MTEHK_LANDINFO: cbf = PlaceLandBlockInfo(); break;
- case MTEHK_SMALL_SCREENSHOT: TakeScreenshot(SC_VIEWPORT); break;
- case MTEHK_ZOOMEDIN_SCREENSHOT: TakeScreenshot(SC_ZOOMEDIN); break;
- case MTEHK_DEFAULTZOOM_SCREENSHOT: TakeScreenshot(SC_DEFAULTZOOM); break;
- case MTEHK_GIANT_SCREENSHOT: TakeScreenshot(SC_WORLD); break;
+ case MTEHK_SMALL_SCREENSHOT: MakeScreenshotWithConfirm(SC_VIEWPORT); break;
+ case MTEHK_ZOOMEDIN_SCREENSHOT: MakeScreenshotWithConfirm(SC_ZOOMEDIN); break;
+ case MTEHK_DEFAULTZOOM_SCREENSHOT: MakeScreenshotWithConfirm(SC_DEFAULTZOOM); break;
+ case MTEHK_GIANT_SCREENSHOT: MakeScreenshotWithConfirm(SC_WORLD); break;
case MTEHK_ZOOM_IN: ToolbarZoomInClick(this); break;
case MTEHK_ZOOM_OUT: ToolbarZoomOutClick(this); break;
case MTEHK_TERRAFORM: ShowEditorTerraformToolbar(); break;