Changeset 62 for trunk/LocalPlayer
- Timestamp:
- Jan 13, 2017, 7:45:16 PM (8 years ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Draft.lfm
r9 r62 1 1 object DraftDlg: TDraftDlg 2 2 Left = 325 3 Height = 511 3 4 Top = 206 5 Width = 315 4 6 BorderIcons = [] 5 7 BorderStyle = bsNone … … 7 9 ClientWidth = 315 8 10 Color = clBtnFace 9 Font.Charset = DEFAULT_CHARSET10 11 Font.Color = clWindowText 11 12 Font.Height = -13 12 13 Font.Name = 'MS Sans Serif' 13 Font.Style = []14 14 FormStyle = fsStayOnTop 15 15 OnCreate = FormCreate … … 18 18 OnMouseUp = PaintBox1MouseUp 19 19 OnShow = FormShow 20 PixelsPerInch = 9620 LCLVersion = '1.6.0.4' 21 21 object OKBtn: TButtonA 22 22 Left = 196 23 Height = 25 23 24 Top = 477 24 25 Width = 100 25 Height = 2526 26 Down = False 27 27 Permanent = False 28 28 OnClick = OKBtnClick 29 Caption = ''30 29 end 31 30 object CloseBtn: TButtonB 32 31 Left = 284 32 Height = 25 33 33 Top = 6 34 34 Width = 25 35 Height = 2536 35 Down = False 37 36 Permanent = False … … 41 40 object GroundArea: TArea 42 41 Left = 30 42 Height = 36 43 43 Top = 464 44 44 Width = 36 45 Height = 3646 45 end 47 46 object SeaArea: TArea 48 47 Left = 70 48 Height = 36 49 49 Top = 464 50 50 Width = 36 51 Height = 3652 51 end 53 52 object AirArea: TArea 54 53 Left = 110 54 Height = 36 55 55 Top = 464 56 56 Width = 36 57 Height = 3658 57 end 59 58 end -
trunk/LocalPlayer/Draft.pas
r61 r62 19 19 AirArea: TArea; 20 20 procedure FormCreate(Sender: TObject); 21 procedure FormDestroy(Sender: TObject); 21 22 procedure FormShow(Sender: TObject); 22 23 procedure CloseBtnClick(Sender: TObject); … … 26 27 procedure PaintBox1MouseUp(Sender: TObject; Button: TMouseButton; 27 28 Shift: TShiftState; x, y: integer); 28 procedure FormDestroy(Sender: TObject);29 29 public 30 30 procedure ShowNewContent(NewMode: integer); … … 232 232 begin 233 233 inherited; 234 // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it 235 Back.Canvas.FillRect(0, 0, Back.Width, Back.Height); 234 236 235 237 ClientHeight := Template.Height - Cut; -
trunk/LocalPlayer/MessgEx.pas
r61 r62 232 232 wScrewed = 43; 233 233 hScrewed = 27; 234 type235 TLine = array [0 .. 9999, 0 .. 2] of Byte;236 234 var 237 235 ix, iy, xDst, yDst, dx, dy, xIcon, yIcon, xb, yb, wb, hb: integer; 238 236 x1, xR, yR, share: single; 239 237 Screwed: array [0 .. wScrewed - 1, 0 .. hScrewed - 1, 0 .. 3] of single; 240 SrcLine: ^TLine; 241 242 begin 243 if IconIndex >= 0 then 244 begin 238 SrcPtr: TPixelPointer; 239 begin 240 if IconIndex >= 0 then begin 245 241 xIcon := IconIndex mod 7 * xSizeBig; 246 242 yIcon := (IconIndex + SystemIconLines * 7) div 7 * ySizeBig; … … 248 244 fillchar(Screwed, sizeof(Screwed), 0); 249 245 BigImp.BeginUpdate; 250 for iy := 0 to 39 do 251 begin 252 SrcLine := BigImp.ScanLine[iy + yIcon]; 253 for ix := 0 to 55 do 254 begin 246 for iy := 0 to 39 do begin 247 for ix := 0 to 55 do begin 248 SrcPtr.Init(BigImp, ix + xIcon, iy + yIcon); 255 249 xR := ix * (37 + iy * 5 / 40) / 56; 256 250 xDst := Trunc(xR); … … 261 255 yR := Frac(yR); 262 256 for dx := 0 to 1 do 263 for dy := 0 to 1 do 264 begin 257 for dy := 0 to 1 do begin 265 258 if dx = 0 then 266 259 share := 1 - xR … … 272 265 share := share * yR; 273 266 Screwed[xDst + dx, yDst + dy, 0] := Screwed[xDst + dx, yDst + dy, 0] 274 + share * Src Line[ix + xIcon, 0];267 + share * SrcPtr.Pixel^.B; 275 268 Screwed[xDst + dx, yDst + dy, 1] := Screwed[xDst + dx, yDst + dy, 1] 276 + share * Src Line[ix + xIcon, 1];269 + share * SrcPtr.Pixel^.G; 277 270 Screwed[xDst + dx, yDst + dy, 2] := Screwed[xDst + dx, yDst + dy, 2] 278 + share * Src Line[ix + xIcon, 2];271 + share * SrcPtr.Pixel^.R; 279 272 Screwed[xDst + dx, yDst + dy, 3] := Screwed[xDst + dx, yDst + dy, 280 273 3] + share;
Note:
See TracChangeset
for help on using the changeset viewer.