121 {$ENDIF} |
121 {$ENDIF} |
122 |
122 |
123 if flagMakeCapture then |
123 if flagMakeCapture then |
124 begin |
124 begin |
125 flagMakeCapture:= false; |
125 flagMakeCapture:= false; |
|
126 if flagDumpLand then |
|
127 s:= '/Screenshots/mapdump_' |
|
128 else s:= '/Screenshots/hw_'; |
126 {$IFDEF PAS2C} |
129 {$IFDEF PAS2C} |
127 s:= '/Screenshots/hw_' + inttostr(GameTicks); |
130 s:= s + inttostr(GameTicks); |
128 {$ELSE} |
131 {$ELSE} |
129 s:= '/Screenshots/hw_' + FormatDateTime('YYYY-MM-DD_HH-mm-ss', Now()) + inttostr(GameTicks); |
132 s:= s + FormatDateTime('YYYY-MM-DD_HH-mm-ss', Now()) + inttostr(GameTicks); |
130 {$ENDIF} |
133 {$ENDIF} |
131 |
134 |
132 // flash |
135 // flash |
133 playSound(sndShutter); |
136 playSound(sndShutter); |
134 ScreenFade:= sfFromWhite; |
137 ScreenFade:= sfFromWhite; |
135 ScreenFadeValue:= sfMax; |
138 ScreenFadeValue:= sfMax; |
136 ScreenFadeSpeed:= 5; |
139 ScreenFadeSpeed:= 5; |
137 |
140 |
138 if MakeScreenshot(s, 1) then |
141 if (not flagDumpLand and MakeScreenshot(s, 1, 0)) or (flagDumpLand and MakeScreenshot(s, 1, 1) and MakeScreenshot(s, 1, 2)) then |
139 WriteLnToConsole('Screenshot saved: ' + s) |
142 WriteLnToConsole('Screenshot saved: ' + s) |
140 else |
143 else |
141 begin |
144 begin |
142 WriteLnToConsole('Screenshot failed.'); |
145 WriteLnToConsole('Screenshot failed.'); |
143 AddChatString(#5 + 'screen capture failed (lack of memory or write permissions)'); |
146 AddChatString(#5 + 'screen capture failed (lack of memory or write permissions)'); |