251 Gear^.Y:= PHedgehog(Gear^.Hedgehog)^.Gear^.Y - int2hwFloat(16 + Gear^.Tex^.h); |
251 Gear^.Y:= PHedgehog(Gear^.Hedgehog)^.Gear^.Y - int2hwFloat(16 + Gear^.Tex^.h); |
252 end; |
252 end; |
253 |
253 |
254 if Gear^.Timer = 0 then |
254 if Gear^.Timer = 0 then |
255 begin |
255 begin |
256 PHedgehog(Gear^.Hedgehog)^.SpeechGear:= nil; |
256 if PHedgehog(Gear^.Hedgehog)^.SpeechGear = Gear then |
|
257 PHedgehog(Gear^.Hedgehog)^.SpeechGear:= nil; |
257 DeleteVisualGear(Gear) |
258 DeleteVisualGear(Gear) |
258 end; |
259 end; |
259 end; |
260 end; |
260 |
261 |
261 procedure doStepSpeechBubble(Gear: PVisualGear; Steps: Longword); |
262 procedure doStepSpeechBubble(Gear: PVisualGear; Steps: Longword); |
262 begin |
263 begin |
263 if (PHedgehog(Gear^.Hedgehog)^.SpeechGear <> nil) then DeleteVisualGear(PHedgehog(Gear^.Hedgehog)^.SpeechGear); |
264 with PHedgehog(Gear^.Hedgehog)^ do |
|
265 if SpeechGear <> nil then SpeechGear^.Timer:= 0; |
|
266 |
264 PHedgehog(Gear^.Hedgehog)^.SpeechGear:= Gear; |
267 PHedgehog(Gear^.Hedgehog)^.SpeechGear:= Gear; |
265 |
268 |
266 Gear^.Timer:= max(Length(Gear^.Text)*150,3000); |
269 Gear^.Timer:= max(Length(Gear^.Text) * 150, 3000); |
267 |
270 |
268 Gear^.Tex:= RenderSpeechBubbleTex(Gear^.Text, Gear^.FrameTicks, fnt16); |
271 Gear^.Tex:= RenderSpeechBubbleTex(Gear^.Text, Gear^.FrameTicks, fnt16); |
269 |
272 |
270 case Gear^.FrameTicks of |
273 case Gear^.FrameTicks of |
271 1: Gear^.FrameTicks:= SpritesData[sprSpeechTail].Width-28; |
274 1: Gear^.FrameTicks:= SpritesData[sprSpeechTail].Width-28; |