- Timestamp:
- Apr 6, 2021, 7:39:39 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Direct.pas
r339 r347 31 31 procedure SetInfo(x: string); 32 32 procedure SetState(x: integer); 33 procedure OnGo(var m: TMessage); message WM_GO;34 procedure OnChangeClient(var m: TMessage); message WM_CHANGECLIENT;35 procedure OnNextPlayer(var m: TMessage); message WM_NEXTPLAYER;33 procedure OnGo(var Msg: TMessage); message WM_GO; 34 procedure OnChangeClient(var Msg: TMessage); message WM_CHANGECLIENT; 35 procedure OnNextPlayer(var Msg: TMessage); message WM_NEXTPLAYER; 36 36 procedure OnAIException(var Msg: TMessage); message WM_AIEXCEPTION; 37 37 end; … … 200 200 end; 201 201 202 procedure TDirectDlg.OnGo(var m: TMessage);202 procedure TDirectDlg.OnGo(var Msg: TMessage); 203 203 var 204 204 i: integer; … … 255 255 end; 256 256 257 procedure TDirectDlg.OnChangeClient(var m: TMessage);257 procedure TDirectDlg.OnChangeClient(var Msg: TMessage); 258 258 begin 259 259 ChangeClient; 260 260 end; 261 261 262 procedure TDirectDlg.OnNextPlayer(var m: TMessage);262 procedure TDirectDlg.OnNextPlayer(var Msg: TMessage); 263 263 begin 264 264 NextPlayer; -
trunk/Install/deb/debian/control
r288 r347 1 1 Source: c-evo 2 2 Maintainer: Chronos <robie@centrum.cz> 3 Section: devel3 Section: games 4 4 Priority: optional 5 5 Standards-Version: 1.3.0 -
trunk/Packages/CevoComponents/DrawDlg.pas
r336 r347 23 23 // defines area to grip the window for moving (from top) 24 24 procedure InitButtons; 25 procedure OnEraseBkgnd(var m: TMessage); message WM_ERASEBKGND;25 procedure OnEraseBkgnd(var Msg: TMessage); message WM_ERASEBKGND; 26 26 procedure OnHitTest(var Msg: TMessage); message WM_NCHITTEST; 27 27 procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); … … 84 84 end; 85 85 86 procedure TDrawDlg.OnEraseBkgnd(var m: TMessage);86 procedure TDrawDlg.OnEraseBkgnd(var Msg: TMessage); 87 87 begin 88 88 // Full area should be covered by Paint method … … 118 118 end; 119 119 end; 120 Msg.Result := HTCAPTION 120 Msg.Result := HTCAPTION; 121 121 end; 122 122 end; -
trunk/Packages/CevoComponents/ScreenTools.pas
r331 r347 1035 1035 procedure InitOrnament; 1036 1036 var 1037 x, y, p, Light, Shade: Integer; 1037 P: TColor; 1038 X, Y: Integer; 1039 Light, Shade: TColor32; 1040 PixelPtr: TPixelPointer; 1038 1041 begin 1039 1042 if InitOrnamentDone then Exit; 1040 Light := MainTexture.clBevelLight;1043 Light := ColorToColor32(MainTexture.clBevelLight); 1041 1044 // and $FCFCFC shr 2*3+MainTexture.clBevelShade and $FCFCFC shr 2; 1042 Shade := MainTexture.clBevelShade and $FCFCFC shr 2 * 3 + 1043 MainTexture.clBevelLight and $FCFCFC shr 2; 1044 for x := 0 to Ornament.Width - 1 do 1045 for y := 0 to Ornament.Height - 1 do begin 1046 p := HGrSystem2.Data.Canvas.Pixels[Ornament.Left + x, Ornament.Top + y]; 1047 if p = $0000FF then 1048 HGrSystem2.Data.Canvas.Pixels[Ornament.Left + x, Ornament.Top + y] := Light 1049 else if p = $FF0000 then 1050 HGrSystem2.Data.Canvas.Pixels[Ornament.Left + x, Ornament.Top + y] := Shade; 1051 end; 1045 Shade := ColorToColor32(MainTexture.clBevelShade and $FCFCFC shr 2 * 3 + 1046 MainTexture.clBevelLight and $FCFCFC shr 2); 1047 HGrSystem2.Data.BeginUpdate; 1048 PixelPtr := PixelPointer(HGrSystem2.Data, ScaleToNative(Ornament.Left), ScaleToNative(Ornament.Top)); 1049 if PixelPtr.BytesPerPixel = 3 then begin 1050 for Y := 0 to ScaleToNative(Ornament.Height) - 1 do begin 1051 for X := 0 to ScaleToNative(Ornament.Width) - 1 do begin 1052 P := Color32ToColor(PixelPtr.Pixel^.RGB); 1053 if P = $0000FF then PixelPtr.Pixel^.RGB := Light 1054 else if P = $FF0000 then PixelPtr.Pixel^.RGB := Shade; 1055 PixelPtr.NextPixel; 1056 end; 1057 PixelPtr.NextLine; 1058 end; 1059 end else begin 1060 for Y := 0 to ScaleToNative(Ornament.Height) - 1 do begin 1061 for X := 0 to ScaleToNative(Ornament.Width) - 1 do begin 1062 P := Color32ToColor(PixelPtr.Pixel^.ARGB); 1063 if P = $0000FF then PixelPtr.Pixel^.ARGB := Light 1064 else if P = $FF0000 then PixelPtr.Pixel^.ARGB := Shade; 1065 PixelPtr.NextPixel; 1066 end; 1067 PixelPtr.NextLine; 1068 end; 1069 end; 1052 1070 InitOrnamentDone := True; 1071 HGrSystem2.Data.EndUpdate; 1053 1072 end; 1054 1073 -
trunk/Packages/CevoComponents/Sound.pas
r317 r347 19 19 {$IFDEF WINDOWS} 20 20 PrevWndProc: WNDPROC; 21 procedure OnMCI(var m: TMessage); message MM_MCINOTIFY;21 procedure OnMCI(var Msg: TMessage); message MM_MCINOTIFY; 22 22 public 23 23 constructor Create(AOwner: TComponent); override; … … 255 255 end; 256 256 257 procedure TSoundPlayer.OnMCI(var m: TMessage);258 begin 259 if ( m.wParam = MCI_NOTIFY_SUCCESSFUL) and (PlayingSound <> nil) then257 procedure TSoundPlayer.OnMCI(var Msg: TMessage); 258 begin 259 if (Msg.wParam = MCI_NOTIFY_SUCCESSFUL) and (PlayingSound <> nil) then 260 260 begin 261 261 PlayingSound.Reset; -
trunk/Packages/CevoComponents/UPixelPointer.pas
r331 r347 46 46 function PixelPointer(Bitmap: TRasterImage; BaseX: Integer = 0; BaseY: Integer = 0): TPixelPointer; inline; 47 47 function SwapRedBlue(Color: TColor32): TColor32; 48 function Color32ToColor(Color: TColor32): TColor; 49 function ColorToColor32(Color: TColor): TColor32; 48 50 49 51 implementation … … 113 115 end; 114 116 117 function Color32ToColor(Color: TColor32): TColor; 118 begin 119 Result := ((Color shr 16) and $ff) or (Color and $00ff00) or 120 ((Color and $ff) shl 16); 121 end; 122 123 function ColorToColor32(Color: TColor): TColor32; 124 begin 125 Result := $ff000000 or ((Color shr 16) and $ff) or (Color and $00ff00) or 126 ((Color and $ff) shl 16); 127 end; 115 128 116 129 end.
Note:
See TracChangeset
for help on using the changeset viewer.