29 procedure freeModule; |
29 procedure freeModule; |
30 |
30 |
31 procedure ProcessTouch; |
31 procedure ProcessTouch; |
32 procedure NewTurnBeginning; |
32 procedure NewTurnBeginning; |
33 |
33 |
34 procedure onTouchDown(x,y: Longword; pointerId: TSDL_FingerId); |
34 procedure onTouchDown(x, y: Single; pointerId: TSDL_FingerId); |
35 procedure onTouchMotion(x,y: Longword; dx,dy: LongInt; pointerId: TSDL_FingerId); |
35 procedure onTouchMotion(x, y, dx, dy: Single; pointerId: TSDL_FingerId); |
36 procedure onTouchUp(x,y: Longword; pointerId: TSDL_FingerId); |
36 procedure onTouchUp(x, y: Single; pointerId: TSDL_FingerId); |
|
37 |
37 function convertToCursorX(x: LongInt): LongInt; |
38 function convertToCursorX(x: LongInt): LongInt; |
38 function convertToCursorY(y: LongInt): LongInt; |
39 function convertToCursorY(y: LongInt): LongInt; |
39 function convertToCursorDeltaX(x: LongInt): LongInt; |
40 |
40 function convertToCursorDeltaY(y: LongInt): LongInt; |
|
41 function addFinger(x,y: Longword; id: TSDL_FingerId): PTouch_Data; |
41 function addFinger(x,y: Longword; id: TSDL_FingerId): PTouch_Data; |
42 function updateFinger(x,y,dx,dy: Longword; id: TSDL_FingerId): PTouch_Data; |
42 function updateFinger(x,y,dx,dy: Longword; id: TSDL_FingerId): PTouch_Data; |
43 procedure deleteFinger(id: TSDL_FingerId); |
43 procedure deleteFinger(id: TSDL_FingerId); |
|
44 |
44 procedure onTouchClick(finger: TTouch_Data); |
45 procedure onTouchClick(finger: TTouch_Data); |
45 procedure onTouchDoubleClick(finger: TTouch_Data); |
46 procedure onTouchDoubleClick(finger: TTouch_Data); |
46 procedure onTouchLongClick(finger: TTouch_Data); |
47 procedure onTouchLongClick(finger: TTouch_Data); |
47 |
48 |
48 function findFinger(id: TSDL_FingerId): PTouch_Data; |
49 function findFinger(id: TSDL_FingerId): PTouch_Data; |
74 invertCursor : boolean; |
74 invertCursor : boolean; |
75 |
75 |
76 xTouchClick,yTouchClick : LongInt; |
76 xTouchClick,yTouchClick : LongInt; |
77 timeSinceClick : Longword; |
77 timeSinceClick : Longword; |
78 |
78 |
79 //Pinch to zoom |
79 //Pinch to zoom |
80 pinchSize : LongInt; |
80 pinchSize : LongInt; |
81 baseZoomValue: GLFloat; |
81 baseZoomValue: GLFloat; |
82 |
82 |
83 //aiming |
83 //aiming |
84 aimingCrosshair: boolean; |
84 aimingCrosshair: boolean; |
85 aimingUp, aimingDown: boolean; |
85 aimingUp, aimingDown: boolean; |
86 targetAngle: LongInt; |
86 targetAngle: LongInt; |
87 |
87 |
88 buttonsDown: Longword; |
88 buttonsDown: Longword; |
89 targetting, targetted: boolean; //true when targetting an airstrike or the like |
89 targetting, targetted: boolean; //true when targetting an airstrike or the like |
90 |
90 |
91 procedure onTouchDown(x,y: Longword; pointerId: TSDL_FingerId); |
91 procedure onTouchDown(x, y: Single; pointerId: TSDL_FingerId); |
92 var |
92 var |
93 finger: PTouch_Data; |
93 finger: PTouch_Data; |
|
94 xr, yr: LongWord; |
94 begin |
95 begin |
95 {$IFDEF USE_TOUCH_INTERFACE} |
96 {$IFDEF USE_TOUCH_INTERFACE} |
96 finger := addFinger(x,y,pointerId); |
97 xr:= round(x * cScreenWidth); |
|
98 yr:= round(y * cScreenHeight); |
|
99 |
|
100 finger:= addFinger(xr, yr, pointerId); |
97 |
101 |
98 inc(buttonsDown);//inc buttonsDown, if we don't see a button down we'll dec it |
102 inc(buttonsDown);//inc buttonsDown, if we don't see a button down we'll dec it |
99 |
103 |
100 if isOnCrosshair(finger^) then |
104 if isOnCrosshair(finger^) then |
101 begin |
105 begin |
178 end; |
182 end; |
179 end; |
183 end; |
180 {$ENDIF} |
184 {$ENDIF} |
181 end; |
185 end; |
182 |
186 |
183 procedure onTouchMotion(x,y: Longword;dx,dy: LongInt; pointerId: TSDL_FingerId); |
187 procedure onTouchMotion(x, y, dx, dy: Single; pointerId: TSDL_FingerId); |
184 var |
188 var |
185 finger, secondFinger: PTouch_Data; |
189 finger, secondFinger: PTouch_Data; |
186 currentPinchDelta, zoom : single; |
190 currentPinchDelta, zoom : Single; |
187 begin |
191 xr, yr, dxr, dyr: LongWord; |
188 finger:= updateFinger(x,y,dx,dy,pointerId); |
192 begin |
|
193 xr:= round(x * cScreenWidth); |
|
194 yr:= round(y * cScreenHeight); |
|
195 dxr:= round(dx * cScreenWidth); |
|
196 dyr:= round(dy * cScreenHeight); |
|
197 |
|
198 finger:= updateFinger(xr, yr, dxr, dyr, pointerId); |
|
199 if finger = nil then |
|
200 exit; |
189 |
201 |
190 if moveCursor then |
202 if moveCursor then |
191 begin |
203 begin |
192 if invertCursor then |
204 if invertCursor then |
193 begin |
205 begin |
220 ZoomValue := cMinZoomLevel; |
232 ZoomValue := cMinZoomLevel; |
221 end; |
233 end; |
222 |
234 |
223 end; |
235 end; |
224 |
236 |
225 procedure onTouchUp(x,y: Longword; pointerId: TSDL_FingerId); |
237 procedure onTouchUp(x,y: Single; pointerId: TSDL_FingerId); |
226 var |
238 var |
227 finger: PTouch_Data; |
239 finger: PTouch_Data; |
228 widget: POnScreenWidget; |
240 widget: POnScreenWidget; |
|
241 xr, yr: LongWord; |
229 begin |
242 begin |
230 {$IFDEF USE_TOUCH_INTERFACE} |
243 {$IFDEF USE_TOUCH_INTERFACE} |
231 x := x; |
244 xr:= round(x * cScreenWidth); |
232 y := y; |
245 yr:= round(y * cScreenHeight); |
233 finger:= updateFinger(x,y,0,0,pointerId); |
246 |
|
247 finger:= updateFinger(xr, yr, 0, 0, pointerId); |
|
248 if finger = nil then |
|
249 exit; |
|
250 |
234 //Check for onTouchClick event |
251 //Check for onTouchClick event |
235 if not(fingerHasMoved(finger^)) then |
252 if not(fingerHasMoved(finger^)) then |
236 begin |
253 begin |
237 if (RealTicks - finger^.timeSinceDown) < clickTime then |
254 if (RealTicks - finger^.timeSinceDown) < clickTime then |
238 onTouchClick(finger^) |
255 onTouchClick(finger^) |
239 else |
256 else |
240 onTouchLongClick(finger^); |
257 onTouchLongClick(finger^); |
241 end; |
258 end; |
242 |
259 |
243 if aimingCrosshair then |
260 if aimingCrosshair then |
244 begin |
261 begin |
245 aimingCrosshair:= false; |
262 aimingCrosshair:= false; |
307 procedure onTouchClick(finger: TTouch_Data); |
324 procedure onTouchClick(finger: TTouch_Data); |
308 begin |
325 begin |
309 //if (RealTicks - timeSinceClick < 300) and (sqrt(sqr(finger.X-xTouchClick) + sqr(finger.Y-yTouchClick)) < 30) then |
326 //if (RealTicks - timeSinceClick < 300) and (sqrt(sqr(finger.X-xTouchClick) + sqr(finger.Y-yTouchClick)) < 30) then |
310 // begin |
327 // begin |
311 // onTouchDoubleClick(finger); |
328 // onTouchDoubleClick(finger); |
312 // timeSinceClick:= 0;//we make an assumption there won't be an 'click' in the first 300 ticks(milliseconds) |
329 // timeSinceClick:= 0;//we make an assumption there won't be an 'click' in the first 300 ticks(milliseconds) |
313 // exit; |
330 // exit; |
314 // end; |
331 // end; |
315 |
332 |
316 xTouchClick:= finger.x; |
333 xTouchClick:= finger.x; |
317 yTouchClick:= finger.y; |
334 yTouchClick:= finger.y; |
318 timeSinceClick:= RealTicks; |
335 timeSinceClick:= RealTicks; |
319 |
336 |
320 if bShowAmmoMenu then |
337 if bShowAmmoMenu then |
321 begin |
338 begin |
322 if isOnRect(AmmoRect, finger) then |
339 if isOnRect(AmmoRect, finger) then |
323 begin |
340 begin |
324 CursorPoint.X:= finger.x; |
341 CursorPoint.X:= finger.x; |
325 CursorPoint.Y:= finger.y; |
342 CursorPoint.Y:= finger.y; |
326 ParseTeamCommand('put'); |
343 ParseTeamCommand('put'); |
327 end |
344 end |
328 else |
345 else |
329 bShowAmmoMenu:= false; |
346 bShowAmmoMenu:= false; |
330 exit; |
347 exit; |
331 end; |
348 end; |
337 exit; |
354 exit; |
338 end; |
355 end; |
339 |
356 |
340 if isOnWidget(jumpWidget, finger) then |
357 if isOnWidget(jumpWidget, finger) then |
341 begin |
358 begin |
342 ParseTeamCommand('hjump'); |
359 ParseTeamCommand('hjump'); |
343 exit; |
360 exit; |
344 end; |
361 end; |
345 {$ENDIF} |
362 {$ENDIF} |
346 end; |
363 end; |
347 |
364 |
348 function addFinger(x,y: Longword; id: TSDL_FingerId): PTouch_Data; |
365 function addFinger(x,y: Longword; id: TSDL_FingerId): PTouch_Data; |
349 var |
366 var |
350 xCursor, yCursor, index : LongInt; |
367 xCursor, yCursor, index : LongInt; |
351 begin |
368 begin |
352 //Check array sizes |
369 //Check array sizes |
353 if length(fingers) < Integer(pointerCount) then |
370 if length(fingers) < pointerCount then |
354 begin |
371 begin |
355 setLength(fingers, length(fingers)*2); |
372 setLength(fingers, pointerCount * 2); |
356 for index := length(fingers) div 2 to length(fingers) do |
373 WriteLnToConsole('allocated ' + inttostr(length(fingers)) + ' finger elements'); |
357 fingers[index].id := nilFingerId; |
374 end; |
358 end; |
375 |
359 |
|
360 |
|
361 xCursor := convertToCursorX(x); |
376 xCursor := convertToCursorX(x); |
362 yCursor := convertToCursorY(y); |
377 yCursor := convertToCursorY(y); |
363 |
378 |
364 //on removing fingers, all fingers are moved to the left |
379 //on removing fingers, all fingers are moved to the left |
365 //with dynamic arrays being zero based, the new position of the finger is the old pointerCount |
380 //with dynamic arrays being zero based, the new position of the finger is the old pointerCount |
366 fingers[pointerCount].id := id; |
381 fingers[pointerCount].id := id; |
367 fingers[pointerCount].historicalX := xCursor; |
382 fingers[pointerCount].historicalX := xCursor; |
368 fingers[pointerCount].historicalY := yCursor; |
383 fingers[pointerCount].historicalY := yCursor; |
370 fingers[pointerCount].y := yCursor; |
385 fingers[pointerCount].y := yCursor; |
371 fingers[pointerCount].dx := 0; |
386 fingers[pointerCount].dx := 0; |
372 fingers[pointerCount].dy := 0; |
387 fingers[pointerCount].dy := 0; |
373 fingers[pointerCount].timeSinceDown:= RealTicks; |
388 fingers[pointerCount].timeSinceDown:= RealTicks; |
374 fingers[pointerCount].pressedWidget:= nil; |
389 fingers[pointerCount].pressedWidget:= nil; |
375 |
390 |
376 addFinger:= @fingers[pointerCount]; |
391 addFinger:= @fingers[pointerCount]; |
377 inc(pointerCount); |
392 inc(pointerCount); |
378 end; |
393 end; |
379 |
394 |
380 function updateFinger(x,y,dx,dy: Longword; id: TSDL_FingerId): PTouch_Data; |
395 function updateFinger(x, y, dx, dy: Longword; id: TSDL_FingerId): PTouch_Data; |
381 begin |
396 var finger : PTouch_Data; |
382 updateFinger:= findFinger(id); |
397 begin |
383 |
398 finger:= findFinger(id); |
384 updateFinger^.x:= convertToCursorX(x); |
399 |
385 updateFinger^.y:= convertToCursorY(y); |
400 if finger <> nil then |
386 updateFinger^.dx:= convertToCursorDeltaX(dx); |
401 begin |
387 updateFinger^.dy:= convertToCursorDeltaY(dy); |
402 finger^.x:= convertToCursorX(x); |
|
403 finger^.y:= convertToCursorY(y); |
|
404 finger^.dx:= dx; |
|
405 finger^.dy:= dy; |
|
406 end |
|
407 else |
|
408 WriteLnToConsole('finger ' + inttostr(id) + ' not found'); |
|
409 updateFinger:= finger |
388 end; |
410 end; |
389 |
411 |
390 procedure deleteFinger(id: TSDL_FingerId); |
412 procedure deleteFinger(id: TSDL_FingerId); |
391 var |
413 var |
392 index : Longword; |
414 index : Longword; |
393 begin |
415 begin |
394 |
416 |
395 dec(pointerCount); |
417 dec(pointerCount); |
396 for index := 0 to pointerCount do |
418 for index := 0 to pointerCount do |
397 begin |
419 begin |
398 if fingers[index].id = id then |
420 if fingers[index].id = id then |
399 begin |
421 begin |
400 |
422 |
401 //put the last finger into the spot of the finger to be removed, |
423 //put the last finger into the spot of the finger to be removed, |
402 //so that all fingers are packed to the far left |
424 //so that all fingers are packed to the far left |
403 if pointerCount <> index then |
425 if pointerCount <> index then |
404 begin |
426 begin |
405 fingers[index].id := fingers[pointerCount].id; |
427 fingers[index].id := fingers[pointerCount].id; |
406 fingers[index].x := fingers[pointerCount].x; |
428 fingers[index].x := fingers[pointerCount].x; |
407 fingers[index].y := fingers[pointerCount].y; |
429 fingers[index].y := fingers[pointerCount].y; |
408 fingers[index].historicalX := fingers[pointerCount].historicalX; |
430 fingers[index].historicalX := fingers[pointerCount].historicalX; |
409 fingers[index].historicalY := fingers[pointerCount].historicalY; |
431 fingers[index].historicalY := fingers[pointerCount].historicalY; |
410 fingers[index].timeSinceDown := fingers[pointerCount].timeSinceDown; |
432 fingers[index].timeSinceDown := fingers[pointerCount].timeSinceDown; |
411 |
433 |
412 fingers[pointerCount].id := nilFingerId; |
434 fingers[pointerCount].id := 0; |
413 end |
435 end |
414 else fingers[index].id := nilFingerId; |
436 else fingers[index].id := 0; |
415 break; |
437 break; |
416 end; |
438 end; |
417 end; |
439 end; |
418 |
440 |
419 end; |
441 end; |
495 |
517 |
496 function findFinger(id: TSDL_FingerId): PTouch_Data; |
518 function findFinger(id: TSDL_FingerId): PTouch_Data; |
497 var |
519 var |
498 index: LongWord; |
520 index: LongWord; |
499 begin |
521 begin |
500 for index := 0 to High(fingers) do |
522 for index:= 0 to length(fingers) do |
501 if fingers[index].id = id then |
523 if fingers[index].id = id then |
502 begin |
524 begin |
503 findFinger := @fingers[index]; |
525 findFinger:= @fingers[index]; |
504 break; |
526 exit; |
505 end; |
527 end; |
|
528 findFinger:= nil; |
506 end; |
529 end; |
507 |
530 |
508 procedure aim(finger: TTouch_Data); |
531 procedure aim(finger: TTouch_Data); |
509 var |
532 var |
510 hogX, hogY, touchX, touchY, deltaX, deltaY: LongInt; |
533 hogX, hogY, touchX, touchY, deltaX, deltaY: LongInt; |
511 begin |
534 begin |
512 if CurrentHedgehog^.Gear <> nil then |
535 if CurrentHedgehog^.Gear <> nil then |
513 begin |
536 begin |
514 touchX := 0;//avoid compiler hint |
537 touchX := 0;//avoid compiler hint |
517 hogY := hwRound(CurrentHedgehog^.Gear^.Y); |
540 hogY := hwRound(CurrentHedgehog^.Gear^.Y); |
518 |
541 |
519 convertToWorldCoord(touchX, touchY, finger); |
542 convertToWorldCoord(touchX, touchY, finger); |
520 deltaX := abs(TouchX-HogX); |
543 deltaX := abs(TouchX-HogX); |
521 deltaY := TouchY-HogY; |
544 deltaY := TouchY-HogY; |
522 |
545 |
523 targetAngle:= (Round(DeltaY / sqrt(sqr(deltaX) + sqr(deltaY)) * 2048) + 2048) div 2; |
546 targetAngle:= (Round(DeltaY / sqrt(sqr(deltaX) + sqr(deltaY)) * 2048) + 2048) div 2; |
524 end; //if CurrentHedgehog^.Gear <> nil |
547 end; //if CurrentHedgehog^.Gear <> nil |
525 end; |
548 end; |
526 |
549 |
527 // These 4 convertToCursor functions convert xy coords from the SDL coordinate system to our CursorPoint coor system: |
550 // These 4 convertToCursor functions convert xy coords from the SDL coordinate system to our CursorPoint coor system: |
528 // - the SDL coordinate system goes from 0 to 32768 on the x axis and 0 to 32768 on the y axis, (0,0) being top left; |
551 // - the SDL coordinate system is proportional to the screen and values are normalized in the onTouch* functions |
529 // - the CursorPoint coordinate system goes from -cScreenWidth/2 to cScreenWidth/2 on the x axis |
552 // - the CursorPoint coordinate system goes from -cScreenWidth/2 to cScreenWidth/2 on the x axis |
530 // and 0 to cScreenHeight on the x axis, (-cScreenWidth, cScreenHeight) being top left. |
553 // and 0 to cScreenHeight on the x axis, (-cScreenWidth, cScreenHeight) being top left. |
531 function convertToCursorX(x: LongInt): LongInt; |
554 function convertToCursorX(x: LongInt): LongInt; |
532 begin |
555 begin |
533 convertToCursorX := round((x/32768)*cScreenWidth) - (cScreenWidth shr 1); |
556 convertToCursorX:= x - cScreenWidth shr 1; |
534 end; |
557 end; |
535 |
558 |
536 function convertToCursorY(y: LongInt): LongInt; |
559 function convertToCursorY(y: LongInt): LongInt; |
537 begin |
560 begin |
538 convertToCursorY := cScreenHeight - round((y/32768)*cScreenHeight) |
561 convertToCursorY:= cScreenHeight - y; |
539 end; |
|
540 |
|
541 function convertToCursorDeltaX(x: LongInt): LongInt; |
|
542 begin |
|
543 convertToCursorDeltaX := round(x/32768*cScreenWidth) |
|
544 end; |
|
545 |
|
546 function convertToCursorDeltaY(y: LongInt): LongInt; |
|
547 begin |
|
548 convertToCursorDeltaY := round(y/32768*cScreenHeight) |
|
549 end; |
562 end; |
550 |
563 |
551 function isOnCrosshair(finger: TTouch_Data): boolean; |
564 function isOnCrosshair(finger: TTouch_Data): boolean; |
552 var |
565 var |
553 x,y : LongInt; |
566 x, y: LongInt; |
554 begin |
567 begin |
555 x := 0;//avoid compiler hint |
568 x:= 0; |
556 y := 0; |
569 y:= 0; |
557 convertToFingerCoord(x, y, CrosshairX, CrosshairY); |
570 convertToFingerCoord(x, y, CrosshairX, CrosshairY); |
558 isOnCrosshair:= isOnRect((x-HalfRectSize), (y-HalfRectSize), RectSize, RectSize, finger); |
571 isOnCrosshair:= isOnRect(x - HalfRectSize, y - HalfRectSize, RectSize, RectSize, finger); |
559 printFinger(finger); |
|
560 WriteLnToConsole(inttostr(finger.x) + ' ' + inttostr(x)); |
|
561 WriteLnToConsole(inttostr(x) + ' ' + inttostr(y) + ' ' + inttostr(10)); |
|
562 end; |
572 end; |
563 |
573 |
564 function isOnCurrentHog(finger: TTouch_Data): boolean; |
574 function isOnCurrentHog(finger: TTouch_Data): boolean; |
565 var |
575 var |
566 x,y : LongInt; |
576 x, y: LongInt; |
567 begin |
577 begin |
568 x := 0; |
578 x:= 0; |
569 y := 0; |
579 y:= 0; |
570 convertToFingerCoord(x,y, hwRound(CurrentHedgehog^.Gear^.X), hwRound(CurrentHedgehog^.Gear^.Y)); |
580 convertToFingerCoord(x, y, hwRound(CurrentHedgehog^.Gear^.X), hwRound(CurrentHedgehog^.Gear^.Y)); |
571 isOnCurrentHog:= isOnRect((x-HalfRectSize), (y-HalfRectSize), RectSize, RectSize, finger); |
581 isOnCurrentHog:= isOnRect(x - HalfRectSize, y - HalfRectSize, RectSize, RectSize, finger); |
572 end; |
582 end; |
573 |
583 |
574 procedure convertToFingerCoord(var x,y : LongInt; oldX, oldY: LongInt); |
584 procedure convertToFingerCoord(var x, y : LongInt; oldX, oldY: LongInt); |
575 begin |
585 begin |
576 x := oldX + WorldDx; |
586 x := oldX + WorldDx; |
577 y := cScreenHeight - (oldY + WorldDy); |
587 y := cScreenHeight - oldY - WorldDy; |
578 end; |
588 end; |
579 |
589 |
580 procedure convertToWorldCoord(var x,y: LongInt; finger: TTouch_Data); |
590 procedure convertToWorldCoord(var x,y: LongInt; finger: TTouch_Data); |
581 begin |
591 begin |
582 //if x <> nil then |
592 x := finger.x - WorldDx; |
583 x := finger.x-WorldDx; |
593 y := cScreenHeight - finger.y - WorldDy; |
584 //if y <> nil then |
|
585 y := (cScreenHeight - finger.y)-WorldDy; |
|
586 end; |
594 end; |
587 |
595 |
588 //Method to calculate the distance this finger has moved since the downEvent |
596 //Method to calculate the distance this finger has moved since the downEvent |
589 function fingerHasMoved(finger: TTouch_Data): boolean; |
597 function fingerHasMoved(finger: TTouch_Data): boolean; |
590 begin |
598 begin |
624 isOnWidget:= widget.show and isOnRect(widget.active, finger); |
632 isOnWidget:= widget.show and isOnRect(widget.active, finger); |
625 end; |
633 end; |
626 |
634 |
627 procedure printFinger(finger: TTouch_Data); |
635 procedure printFinger(finger: TTouch_Data); |
628 begin |
636 begin |
629 WriteToConsole(Format('id:%d, (%d,%d), (%d,%d), time: %d', [finger.id, finger.x, finger.y, finger.historicalX, finger.historicalY, finger.timeSinceDown])); |
637 WriteLnToConsole(Format('id: %d, x: %d y: %d (rel x: %d rel y: %d), time: %d', |
|
638 [finger.id, finger.x, finger.y, finger.historicalX, finger.historicalY, finger.timeSinceDown])); |
630 end; |
639 end; |
631 |
640 |
632 procedure initModule; |
641 procedure initModule; |
633 var |
642 var |
634 index: Longword; |
643 index: Longword; |
635 //uRenderCoordScaleX, uRenderCoordScaleY: Longword; |
644 //uRenderCoordScaleX, uRenderCoordScaleY: Longword; |
636 begin |
645 begin |
637 buttonsDown:= 0; |
646 buttonsDown:= 0; |
|
647 pointerCount:= 0; |
638 |
648 |
639 setLength(fingers, 4); |
649 setLength(fingers, 4); |
640 for index := 0 to High(fingers) do |
650 for index := 0 to length(fingers) do |
641 fingers[index].id := nilFingerId; |
651 fingers[index].id := 0; |
642 |
652 |
643 rectSize:= baseRectSize; |
653 rectSize:= baseRectSize; |
644 halfRectSize:= baseRectSize shl 1; |
654 halfRectSize:= baseRectSize shr 1; |
645 end; |
655 end; |
646 |
656 |
647 procedure freeModule; |
657 procedure freeModule; |
648 begin |
658 begin |
649 end; |
659 end; |