changeset 7291 | ad4b6c2b09e8 |
parent 7069 | bcf9d8e64e92 |
child 11317 | 62287d4044e7 |
7288:5d0704f23a2a | 7291:ad4b6c2b09e8 |
---|---|
270 |
270 |
271 WriteInRoundRect(finalSurface, 0, 0, Color, font, s, maxLength); |
271 WriteInRoundRect(finalSurface, 0, 0, Color, font, s, maxLength); |
272 |
272 |
273 TryDo(SDL_SetColorKey(finalSurface, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, true); |
273 TryDo(SDL_SetColorKey(finalSurface, SDL_SRCCOLORKEY, 0) = 0, errmsgTransparentSet, true); |
274 |
274 |
275 RenderStringTexLim:= Surface2Tex(finalSurface, false); |
275 RenderStringTexLim:= Surface2Atlas(finalSurface, false); |
276 |
|
277 SDL_FreeSurface(finalSurface); |
|
278 end; |
276 end; |
279 |
277 |
280 |
278 |
281 function RenderSpeechBubbleTex(s: ansistring; SpeechType: Longword; font: THWFont): PTexture; |
279 function RenderSpeechBubbleTex(s: ansistring; SpeechType: Longword; font: THWFont): PTexture; |
282 var textWidth, textHeight, x, y, w, h, i, j, pos, prevpos, line, numLines, edgeWidth, edgeHeight, cornerWidth, cornerHeight: LongInt; |
280 var textWidth, textHeight, x, y, w, h, i, j, pos, prevpos, line, numLines, edgeWidth, edgeHeight, cornerWidth, cornerHeight: LongInt; |
457 end; |
455 end; |
458 end; |
456 end; |
459 inc(pos); |
457 inc(pos); |
460 end; |
458 end; |
461 |
459 |
462 RenderSpeechBubbleTex:= Surface2Tex(finalSurface, true); |
460 RenderSpeechBubbleTex:= Surface2Atlas(finalSurface, true); |
463 |
461 |
464 SDL_FreeSurface(rotatedEdge); |
462 SDL_FreeSurface(rotatedEdge); |
465 SDL_FreeSurface(finalSurface); |
|
466 end; |
463 end; |
467 |
464 |
468 end. |
465 end. |