hedgewars/uMisc.pas
changeset 5911 4a28d0ae9624
parent 5910 c9a4de51b5a0
child 5912 d31eba29e706
equal deleted inserted replaced
5910:c9a4de51b5a0 5911:4a28d0ae9624
    30 
    30 
    31 procedure initModule;
    31 procedure initModule;
    32 procedure freeModule;
    32 procedure freeModule;
    33 
    33 
    34 implementation
    34 implementation
    35 uses typinfo, sysutils, uVariables;
    35 uses typinfo, sysutils, uVariables, uUtils;
    36 
    36 
    37 procedure movecursor(dx, dy: LongInt);
    37 procedure movecursor(dx, dy: LongInt);
    38 var x, y: LongInt;
    38 var x, y: LongInt;
    39 begin
    39 begin
    40 if (dx = 0) and (dy = 0) then exit;
    40 if (dx = 0) and (dy = 0) then exit;
    72 // flash
    72 // flash
    73 ScreenFade:= sfFromWhite;
    73 ScreenFade:= sfFromWhite;
    74 ScreenFadeValue:= sfMax;
    74 ScreenFadeValue:= sfMax;
    75 ScreenFadeSpeed:= 5;
    75 ScreenFadeSpeed:= 5;
    76 
    76 
    77 size:= cScreenWidth * cScreenHeight * 3;
    77 size:= toPowerOf2(cScreenWidth) * toPowerOf2(cScreenHeight) * 3;
    78 p:= GetMem(size);
    78 p:= GetMem(size);
    79 
    79 
    80 // memory could not be allocated
    80 // memory could not be allocated
    81 if p = nil then
    81 if p = nil then
    82     exit;
    82     exit;