Changeset - r13418:93c4d9fb87b7
[Not reviewed]
master
0 3 0
smatz - 15 years ago 2009-11-01 18:08:58
smatz@openttd.org
(svn r17937) -Codechange: rename current_screenshot_type to _screenshot_type
3 files changed with 8 insertions and 8 deletions:
0 comments (0 inline, 0 general)
src/openttd.cpp
Show inline comments
 
@@ -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 {
src/screenshot.cpp
Show inline comments
 
@@ -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 ch
 

	
 
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;
 
	}
src/screenshot.h
Show inline comments
 
@@ -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 */
0 comments (0 inline, 0 general)