49 procedure DrawIceBreak(x, y, iceRadius, iceHeight: Longint); |
49 procedure DrawIceBreak(x, y, iceRadius, iceHeight: Longint); |
50 function TryPlaceOnLandSimple(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace, indestructible: boolean): boolean; inline; |
50 function TryPlaceOnLandSimple(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace, indestructible: boolean): boolean; inline; |
51 function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace: boolean; LandFlags: Word): boolean; inline; |
51 function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace: boolean; LandFlags: Word): boolean; inline; |
52 function ForcePlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; LandFlags: Word; Tint: LongWord; Behind, flipHoriz, flipVert: boolean): boolean; inline; |
52 function ForcePlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; LandFlags: Word; Tint: LongWord; Behind, flipHoriz, flipVert: boolean): boolean; inline; |
53 function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace, outOfMap, force, behind, flipHoriz, flipVert: boolean; LandFlags: Word; Tint: LongWord): boolean; |
53 function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace, outOfMap, force, behind, flipHoriz, flipVert: boolean; LandFlags: Word; Tint: LongWord): boolean; |
|
54 procedure EraseLandRectRaw(X, Y, width, height: LongWord); |
54 procedure EraseLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; LandFlags: Word; eraseOnLFMatch, onlyEraseLF, flipHoriz, flipVert: boolean); |
55 procedure EraseLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; LandFlags: Word; eraseOnLFMatch, onlyEraseLF, flipHoriz, flipVert: boolean); |
55 function GetPlaceCollisionTex(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt): PTexture; |
56 function GetPlaceCollisionTex(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt): PTexture; |
56 |
57 |
57 implementation |
58 implementation |
58 uses SDLh, uLandTexture, uTextures, uVariables, uUtils, uDebug, uScript; |
59 uses SDLh, uLandTexture, uTextures, uVariables, uUtils, uDebug, uScript; |
838 else if Obj = sprAmRubber then |
839 else if Obj = sprAmRubber then |
839 ScriptCall('onRubberPlacement', frame, cpX + w div 2, cpY + h div 2); |
840 ScriptCall('onRubberPlacement', frame, cpX + w div 2, cpY + h div 2); |
840 |
841 |
841 end; |
842 end; |
842 |
843 |
|
844 procedure EraseLandRectRaw(X, Y, width, height: LongWord); |
|
845 var tx, ty: LongWord; |
|
846 begin |
|
847 for ty:= 0 to height - 1 do |
|
848 for tx:= 0 to width - 1 do |
|
849 begin |
|
850 LandPixels[ty, tx]:= 0; |
|
851 Land[Y + ty, X + tx]:= 0; |
|
852 end; |
|
853 end; |
|
854 |
843 procedure EraseLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; LandFlags: Word; eraseOnLFMatch, onlyEraseLF, flipHoriz, flipVert: boolean); |
855 procedure EraseLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; LandFlags: Word; eraseOnLFMatch, onlyEraseLF, flipHoriz, flipVert: boolean); |
844 var X, Y, bpp, h, w, row, col, gx, gy, numFramesFirstCol: LongInt; |
856 var X, Y, bpp, h, w, row, col, gx, gy, numFramesFirstCol: LongInt; |
845 p: PByteArray; |
857 p: PByteArray; |
846 Image: PSDL_Surface; |
858 Image: PSDL_Surface; |
847 begin |
859 begin |