equal
deleted
inserted
replaced
537 SDL_FreeSurface(LandSurface ); |
537 SDL_FreeSurface(LandSurface ); |
538 SDL_FreeSurface(StoreSurface ) |
538 SDL_FreeSurface(StoreSurface ) |
539 end; |
539 end; |
540 |
540 |
541 procedure RenderHealth(var Hedgehog: THedgehog); |
541 procedure RenderHealth(var Hedgehog: THedgehog); |
542 var s: string; |
542 var s: string[15]; |
543 begin |
543 begin |
544 str(Hedgehog.Gear.Health, s); |
544 str(Hedgehog.Gear.Health, s); |
545 Hedgehog.HealthRect:= WriteInRoundRect(TempSurface, Hedgehog.HealthRect.x, Hedgehog.HealthRect.y, Hedgehog.Team.Color, fnt16, s); |
545 Hedgehog.HealthRect:= WriteInRoundRect(TempSurface, Hedgehog.HealthRect.x, Hedgehog.HealthRect.y, Hedgehog.Team.Color, fnt16, s); |
546 if Hedgehog.Gear.Damage > 0 then |
546 if Hedgehog.Gear.Damage > 0 then |
547 begin |
547 begin |
582 SDL_FreeSurface(ProgrSurf) |
582 SDL_FreeSurface(ProgrSurf) |
583 end; |
583 end; |
584 end; |
584 end; |
585 |
585 |
586 function LoadImage(filename: string): PSDL_Surface; |
586 function LoadImage(filename: string): PSDL_Surface; |
|
587 var tmpsurf: PSDL_Surface; |
587 begin |
588 begin |
588 WriteToConsole(msgLoading + filename + '... '); |
589 WriteToConsole(msgLoading + filename + '... '); |
589 Result:= IMG_Load(PChar(filename)); |
590 tmpsurf:= IMG_Load(PChar(filename)); |
590 TryDo(Result <> nil, msgFailed, true); |
591 TryDo(tmpsurf <> nil, msgFailed, true); |
|
592 if cFullScreen then |
|
593 begin |
|
594 Result:= SDL_DisplayFormat(tmpsurf); |
|
595 SDL_FreeSurface(tmpsurf); |
|
596 end else Result:= tmpsurf; |
591 WriteLnToConsole(msgOK) |
597 WriteLnToConsole(msgOK) |
592 end; |
598 end; |
593 |
599 |
594 end. |
600 end. |