- Timestamp:
- Jan 23, 2020, 12:58:45 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r66 r67 56 56 MoveBuffer: array of TMoveDirection; 57 57 MoveBufferLock: TCriticalSection; 58 MoveThread: TMoveThread;59 58 procedure AddToMoveBuffer(Direction: TMoveDirection); 60 59 procedure ProcessMoveBuffer; 61 60 public 61 MoveThread: TMoveThread; 62 62 procedure Redraw; 63 63 procedure UpdateInterface; -
trunk/UCore.pas
r65 r67 42 42 procedure GamePaint(Sender: TObject); 43 43 procedure GameWin(Sender: TObject); 44 procedure GameWinSync; 44 45 procedure GameOver(Sender: TObject); 46 procedure GameOverSync; 45 47 public 46 48 Game: TGame; … … 191 193 procedure TCore.GameWin(Sender: TObject); 192 194 begin 195 TThread.Synchronize(FormMain.MoveThread, GameWinSync); 196 end; 197 198 procedure TCore.GameWinSync; 199 begin 193 200 MessageDlg(SWinCaption, Format(SWinMessage, [Game.GetTileSkinValue(Game.WinTileValue)]), mtInformation, [mbOk], 0); 194 201 end; 195 202 196 203 procedure TCore.GameOver(Sender: TObject); 204 begin 205 TThread.Synchronize(FormMain.MoveThread, GameOverSync); 206 end; 207 208 procedure TCore.GameOverSync; 197 209 begin 198 210 MessageDlg(SGameOverCaption, SGameOverMessage, mtInformation, [mbOK], 0);
Note:
See TracChangeset
for help on using the changeset viewer.