equal
deleted
inserted
replaced
298 |
298 |
299 procedure DrawFromRect(X, Y: LongInt; r: PSDL_Rect; SourceTexture: PTexture; DestSurface: PSDL_Surface); |
299 procedure DrawFromRect(X, Y: LongInt; r: PSDL_Rect; SourceTexture: PTexture; DestSurface: PSDL_Surface); |
300 var rr: TSDL_Rect; |
300 var rr: TSDL_Rect; |
301 t, b: real; |
301 t, b: real; |
302 begin |
302 begin |
|
303 if SourceTexture^.h = 0 then exit; |
303 rr.x:= X; |
304 rr.x:= X; |
304 rr.y:= Y; |
305 rr.y:= Y; |
305 rr.w:= r^.w; |
306 rr.w:= r^.w; |
306 rr.h:= r^.h; |
307 rr.h:= r^.h; |
307 |
308 |
432 |
433 |
433 procedure StoreRelease; |
434 procedure StoreRelease; |
434 var ii: TSprite; |
435 var ii: TSprite; |
435 begin |
436 begin |
436 for ii:= Low(TSprite) to High(TSprite) do |
437 for ii:= Low(TSprite) to High(TSprite) do |
437 glDeleteTextures(1, @SpritesData[ii].Texture); |
438 FreeTexture(SpritesData[ii].Texture); |
438 SDL_FreeSurface( HHSurface ); |
439 SDL_FreeSurface( HHSurface ); |
439 SDL_FreeSurface(LandSurface ) |
440 SDL_FreeSurface(LandSurface ) |
440 end; |
441 end; |
441 |
442 |
442 function RenderString(s: string; Color: Longword; font: THWFont): PSDL_Surface; |
443 function RenderString(s: string; Color: Longword; font: THWFont): PSDL_Surface; |