equal
deleted
inserted
replaced
37 procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Surface: PSDL_Surface); |
37 procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Surface: PSDL_Surface); |
38 function RenderString(s: string; Color: Longword; font: THWFont): PSDL_Surface; |
38 function RenderString(s: string; Color: Longword; font: THWFont): PSDL_Surface; |
39 procedure RenderHealth(var Hedgehog: THedgehog); |
39 procedure RenderHealth(var Hedgehog: THedgehog); |
40 procedure AddProgress; |
40 procedure AddProgress; |
41 procedure FinishProgress; |
41 procedure FinishProgress; |
42 function LoadImage(filename: string; hasAlpha, critical, setTransparent: boolean): PSDL_Surface; |
42 function LoadImage(const filename: string; hasAlpha, critical, setTransparent: boolean): PSDL_Surface; |
43 |
43 |
44 var PixelFormat: PSDL_PixelFormat; |
44 var PixelFormat: PSDL_PixelFormat; |
45 SDLPrimSurface: PSDL_Surface; |
45 SDLPrimSurface: PSDL_Surface; |
46 PauseSurface: PSDL_Surface; |
46 PauseSurface: PSDL_Surface; |
47 |
47 |
458 str(Hedgehog.Gear^.Health, s); |
458 str(Hedgehog.Gear^.Health, s); |
459 if Hedgehog.HealthTag <> nil then SDL_FreeSurface(Hedgehog.HealthTag); |
459 if Hedgehog.HealthTag <> nil then SDL_FreeSurface(Hedgehog.HealthTag); |
460 Hedgehog.HealthTag:= RenderString(s, Hedgehog.Team^.Color, fnt16) |
460 Hedgehog.HealthTag:= RenderString(s, Hedgehog.Team^.Color, fnt16) |
461 end; |
461 end; |
462 |
462 |
463 function LoadImage(filename: string; hasAlpha: boolean; critical, setTransparent: boolean): PSDL_Surface; |
463 function LoadImage(const filename: string; hasAlpha: boolean; critical, setTransparent: boolean): PSDL_Surface; |
464 var tmpsurf: PSDL_Surface; |
464 var tmpsurf: PSDL_Surface; |
465 Result: PSDL_Surface; |
465 Result: PSDL_Surface; |
466 s: shortstring; |
466 s: shortstring; |
467 begin |
467 begin |
468 WriteToConsole(msgLoading + filename + '... '); |
468 WriteToConsole(msgLoading + filename + '... '); |