492 DrawLine2Surf(amSurface, BORDERSIZE, AMRect.h+BORDERSIZE+i, AMRect.w + BORDERSIZE, AMRect.h+BORDERSIZE+i,160,160,160);//bottom |
492 DrawLine2Surf(amSurface, BORDERSIZE, AMRect.h+BORDERSIZE+i, AMRect.w + BORDERSIZE, AMRect.h+BORDERSIZE+i,160,160,160);//bottom |
493 DrawLine2Surf(amSurface, i, BORDERSIZE, i, AMRect.h + BORDERSIZE,160,160,160);//left |
493 DrawLine2Surf(amSurface, i, BORDERSIZE, i, AMRect.h + BORDERSIZE,160,160,160);//left |
494 DrawLine2Surf(amSurface, AMRect.w+BORDERSIZE+i, BORDERSIZE, AMRect.w + BORDERSIZE+i, AMRect.h + BORDERSIZE, 160,160,160);//right |
494 DrawLine2Surf(amSurface, AMRect.w+BORDERSIZE+i, BORDERSIZE, AMRect.w + BORDERSIZE+i, AMRect.h + BORDERSIZE, 160,160,160);//right |
495 end; |
495 end; |
496 |
496 |
497 GetAmmoMenuTexture:= Surface2Tex(amSurface, false); |
497 GetAmmoMenuTexture:= Surface2Atlas(amSurface, false); |
498 if amSurface <> nil then SDL_FreeSurface(amSurface); |
|
499 end; |
498 end; |
500 |
499 |
501 procedure ShowAmmoMenu; |
500 procedure ShowAmmoMenu; |
502 const BORDERSIZE = 2; |
501 const BORDERSIZE = 2; |
503 var Slot, Pos: LongInt; |
502 var Slot, Pos: LongInt; |
1459 |
1458 |
1460 |
1459 |
1461 tmpSurface:= TTF_RenderUTF8_Blended(Fontz[fnt16].Handle, Str2PChar(s), cWhiteColorChannels); |
1460 tmpSurface:= TTF_RenderUTF8_Blended(Fontz[fnt16].Handle, Str2PChar(s), cWhiteColorChannels); |
1462 tmpSurface:= doSurfaceConversion(tmpSurface); |
1461 tmpSurface:= doSurfaceConversion(tmpSurface); |
1463 FreeTexture(timeTexture); |
1462 FreeTexture(timeTexture); |
1464 timeTexture:= Surface2Tex(tmpSurface, false); |
1463 timeTexture:= Surface2Atlas(tmpSurface, false); |
1465 SDL_FreeSurface(tmpSurface) |
|
1466 end; |
1464 end; |
1467 |
1465 |
1468 if timeTexture <> nil then |
1466 if timeTexture <> nil then |
1469 DrawTexture((cScreenWidth shr 1) - 20 - timeTexture^.w - offsetY, offsetX + timeTexture^.h+5, timeTexture); |
1467 DrawTexture((cScreenWidth shr 1) - 20 - timeTexture^.w - offsetY, offsetX + timeTexture^.h+5, timeTexture); |
1470 |
1468 |
1477 CountTicks:= 0; |
1475 CountTicks:= 0; |
1478 s:= inttostr(FPS) + ' fps'; |
1476 s:= inttostr(FPS) + ' fps'; |
1479 tmpSurface:= TTF_RenderUTF8_Blended(Fontz[fnt16].Handle, Str2PChar(s), cWhiteColorChannels); |
1477 tmpSurface:= TTF_RenderUTF8_Blended(Fontz[fnt16].Handle, Str2PChar(s), cWhiteColorChannels); |
1480 tmpSurface:= doSurfaceConversion(tmpSurface); |
1478 tmpSurface:= doSurfaceConversion(tmpSurface); |
1481 FreeTexture(fpsTexture); |
1479 FreeTexture(fpsTexture); |
1482 fpsTexture:= Surface2Tex(tmpSurface, false); |
1480 fpsTexture:= Surface2Atlas(tmpSurface, false); |
1483 SDL_FreeSurface(tmpSurface) |
|
1484 end; |
1481 end; |
1485 if fpsTexture <> nil then |
1482 if fpsTexture <> nil then |
1486 DrawTexture((cScreenWidth shr 1) - 60 - offsetY, offsetX, fpsTexture); |
1483 DrawTexture((cScreenWidth shr 1) - 60 - offsetY, offsetX, fpsTexture); |
1487 end; |
1484 end; |
1488 |
1485 |