equal
deleted
inserted
replaced
168 {$IFNDEF IPHONEOS} |
168 {$IFNDEF IPHONEOS} |
169 procedure MakeScreenshot(filename: shortstring); |
169 procedure MakeScreenshot(filename: shortstring); |
170 {$ENDIF} |
170 {$ENDIF} |
171 |
171 |
172 implementation |
172 implementation |
173 uses Math, uConsole, uStore, uIO, uRandom, uSound, typinfo; |
173 uses Math, uConsole, uStore, uIO, uSound, typinfo; |
174 |
174 |
175 var KBnum: Longword; |
175 var KBnum: Longword; |
176 {$IFDEF DEBUGFILE} |
176 {$IFDEF DEBUGFILE} |
177 f: textfile; |
177 f: textfile; |
178 {$ENDIF} |
178 {$ENDIF} |
244 if a > b then Max:= a else Max:= b |
244 if a > b then Max:= a else Max:= b |
245 end; |
245 end; |
246 |
246 |
247 procedure OutError(Msg: shortstring; isFatalError: boolean); |
247 procedure OutError(Msg: shortstring; isFatalError: boolean); |
248 begin |
248 begin |
249 {$IFDEF DEBUGFILE}AddFileLog(Msg);{$ENDIF} |
249 // obsolete? written in WriteLnToConsole() anyway |
|
250 // {$IFDEF DEBUGFILE}AddFileLog(Msg);{$ENDIF} |
250 WriteLnToConsole(Msg); |
251 WriteLnToConsole(Msg); |
251 if isFatalError then |
252 if isFatalError then |
252 begin |
253 begin |
253 SendIPC('E' + GetLastConsoleLine); |
254 SendIPC('E' + GetLastConsoleLine); |
254 SDL_Quit; |
255 SDL_Quit; |
255 halt(1) |
256 halt(1) |
256 end |
257 end |
257 end; |
258 end; |
258 |
259 |
259 procedure TryDo(Assert: boolean; Msg: shortstring; isFatal: boolean); |
260 procedure TryDo(Assert: boolean; Msg: shortstring; isFatal: boolean); |
260 begin |
261 begin |
261 if not Assert then OutError(Msg, isFatal) |
262 if not Assert then OutError(Msg, isFatal) |