summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-11-01 18:08:58 +0000
committersmatz <smatz@openttd.org>2009-11-01 18:08:58 +0000
commitbe446d6f542fccf1e5cc2ed50225c4a8289aa7dc (patch)
tree9d87610d0c9677e47a8048f214c1e885206d7781 /src
parentb577595d1289dec5eacb671adbd5592eab39c5eb (diff)
downloadopenttd-be446d6f542fccf1e5cc2ed50225c4a8289aa7dc.tar.xz
(svn r17937) -Codechange: rename current_screenshot_type to _screenshot_type
Diffstat (limited to 'src')
-rw-r--r--src/openttd.cpp1
-rw-r--r--src/screenshot.cpp14
-rw-r--r--src/screenshot.h1
3 files changed, 8 insertions, 8 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 9bdb76258..9d2c23afb 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -775,7 +775,6 @@ void HandleExitGameRequest()
static void ShowScreenshotResult(bool b)
{
if (b) {
- extern char _screenshot_name[];
SetDParamStr(0, _screenshot_name);
ShowErrorMessage(STR_MESSAGE_SCREENSHOT_SUCCESSFULLY, INVALID_STRING_ID, 0, 0);
} else {
diff --git a/src/screenshot.cpp b/src/screenshot.cpp
index 1515186e8..a9142715c 100644
--- a/src/screenshot.cpp
+++ b/src/screenshot.cpp
@@ -27,7 +27,7 @@ char _screenshot_format_name[8];
uint _num_screenshot_formats;
uint _cur_screenshot_format;
char _screenshot_name[128];
-ScreenshotType current_screenshot_type;
+static ScreenshotType _screenshot_type;
/* called by the ScreenShot proc to generate screenshot lines. */
typedef void ScreenshotCallback(void *userdata, void *buf, uint y, uint pitch, uint n);
@@ -460,7 +460,7 @@ void InitializeScreenshotFormats()
}
_cur_screenshot_format = j;
_num_screenshot_formats = lengthof(_screenshot_formats);
- current_screenshot_type = SC_NONE;
+ _screenshot_type = SC_NONE;
}
const char *GetScreenshotFormatDesc(int i)
@@ -569,12 +569,12 @@ static char *MakeScreenshotName(const char *ext)
void SetScreenshotType(ScreenshotType t)
{
- current_screenshot_type = t;
+ _screenshot_type = t;
}
bool IsScreenshotRequested()
{
- return (current_screenshot_type != SC_NONE);
+ return (_screenshot_type != SC_NONE);
}
static bool MakeSmallScreenshot()
@@ -604,14 +604,14 @@ static bool MakeWorldScreenshot()
bool MakeScreenshot()
{
- switch (current_screenshot_type) {
+ switch (_screenshot_type) {
case SC_VIEWPORT:
UndrawMouseCursor();
DrawDirtyBlocks();
- current_screenshot_type = SC_NONE;
+ _screenshot_type = SC_NONE;
return MakeSmallScreenshot();
case SC_WORLD:
- current_screenshot_type = SC_NONE;
+ _screenshot_type = SC_NONE;
return MakeWorldScreenshot();
default: return false;
}
diff --git a/src/screenshot.h b/src/screenshot.h
index 69f993ef8..2f6a30829 100644
--- a/src/screenshot.h
+++ b/src/screenshot.h
@@ -30,5 +30,6 @@ bool IsScreenshotRequested();
extern char _screenshot_format_name[8];
extern uint _num_screenshot_formats;
extern uint _cur_screenshot_format;
+extern char _screenshot_name[];
#endif /* SCREENSHOT_H */