Ignore:
Timestamp:
Nov 21, 2012, 9:04:27 AM (11 years ago)
Author:
chronos
Message:
  • Modified: Delayed screen redrawing using system timer. Request for repaint is signaled by Redraw method. Repaint is limited by minimal period of timer thus unnecessary repainting is avoided.
  • Modified: Maze update using system message replaced by direct method call.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lazesglobals.pas

    r1 r2  
    1818unit LazesGlobals;
    1919
    20 {$mode objfpc}{$H+}
     20{$mode delphi}{$H+}
    2121
    2222interface
     
    2626
    2727const
    28   // Update message when something in the maze config has changed and needs regeneration
    29   C_MAZE_UPDATE_MESSAGE = WM_USER + 67122;
    30 
    3128  // Maximum width/height of the maze
    3229  C_MIN_MAZE_SIZE =  4;
     
    3532type
    3633  // Record structure to send messages around with maze metrics
     34
     35  { TMazeUpdateInfo }
     36
    3737  TMazeUpdateInfo = record
    3838    MazeWidth : integer;
     
    4040    DrawWidth : integer;
    4141    DrawHeight: integer;
     42    class operator Equal(A, B: TMazeUpdateInfo): Boolean;
    4243  end;
    4344  PMazeUpdateInfo = ^TMazeUpdateInfo;
     
    4546implementation
    4647
     48{ TMazeUpdateInfo }
     49
     50class operator TMazeUpdateInfo.Equal(A, B: TMazeUpdateInfo): Boolean;
     51begin
     52  Result := (A.MazeHeight = B.MazeHeight) and (A.MazeWidth = B.MazeWidth) and
     53    (A.DrawHeight = B.DrawHeight) and (A.DrawWidth = B.DrawWidth);
     54end;
     55
    4756end.
    4857
Note: See TracChangeset for help on using the changeset viewer.