equal
deleted
inserted
replaced
194 SendIPC(s); |
194 SendIPC(s); |
195 inc(numFrames); |
195 inc(numFrames); |
196 end; |
196 end; |
197 |
197 |
198 function LoadNextCameraPosition(out newRealTicks, newGameTicks: LongInt): Boolean; |
198 function LoadNextCameraPosition(out newRealTicks, newGameTicks: LongInt): Boolean; |
199 var frame: TFrame; |
199 var frame: TFrame = (realTicks: 0; gameTicks: 0; CamX: 0; CamY: 0; zoom: 0); |
200 begin |
200 begin |
201 // we need to skip or duplicate frames to match target framerate |
201 // we need to skip or duplicate frames to match target framerate |
202 while Int64(curTime)*cVideoFramerateNum <= Int64(numFrames)*cVideoFramerateDen*1000 do |
202 while Int64(curTime)*cVideoFramerateNum <= Int64(numFrames)*cVideoFramerateDen*1000 do |
203 begin |
203 begin |
204 {$IOCHECKS OFF} |
204 {$IOCHECKS OFF} |
242 // copy file (free pascal doesn't have copy file function) |
242 // copy file (free pascal doesn't have copy file function) |
243 procedure CopyFile(src, dest: shortstring); |
243 procedure CopyFile(src, dest: shortstring); |
244 var inF, outF: file; |
244 var inF, outF: file; |
245 buffer: array[0..1023] of byte; |
245 buffer: array[0..1023] of byte; |
246 result: LongInt; |
246 result: LongInt; |
|
247 i: integer; |
247 begin |
248 begin |
248 {$IOCHECKS OFF} |
249 {$IOCHECKS OFF} |
249 result:= 0; // avoid compiler hint |
250 result:= 0; // avoid compiler hint and warning |
|
251 for i:= 0 to 1023 do |
|
252 buffer[i]:= 0; |
250 |
253 |
251 Assign(inF, src); |
254 Assign(inF, src); |
252 Reset(inF, 1); |
255 Reset(inF, 1); |
253 if IOResult <> 0 then |
256 if IOResult <> 0 then |
254 begin |
257 begin |