equal
deleted
inserted
replaced
1062 // Get flower position |
1062 // Get flower position |
1063 x:= hwRound(Gear^.X) - SpritesData[sprTargetBee].Width div 2; |
1063 x:= hwRound(Gear^.X) - SpritesData[sprTargetBee].Width div 2; |
1064 y:= hwRound(Gear^.Y) - SpritesData[sprTargetBee].Height div 2; |
1064 y:= hwRound(Gear^.Y) - SpritesData[sprTargetBee].Height div 2; |
1065 // Calculate offset from map boundaries and border |
1065 // Calculate offset from map boundaries and border |
1066 if hasBorder then |
1066 if hasBorder then |
1067 x:= max(min(x, RightX - SpritesData[sprTargetBee].Width) - cBorderWidth, LeftX + cBorderWidth) |
1067 x:= max(min(x, RightX - SpritesData[sprTargetBee].Width - cBorderWidth), LeftX + cBorderWidth) |
1068 else |
1068 else |
1069 x:= max(min(x, RightX - SpritesData[sprTargetBee].Width), LeftX); |
1069 x:= max(min(x, RightX - SpritesData[sprTargetBee].Width), LeftX); |
1070 y:= max(y, TopY); |
1070 y:= max(y, TopY); |
1071 |
1071 |
1072 // Place flower |
1072 // Place flower |