62 function RenderStringTex(s: ansistring; Color: Longword; font: THWFont): PTexture; |
62 function RenderStringTex(s: ansistring; Color: Longword; font: THWFont): PTexture; |
63 function RenderSpeechBubbleTex(s: ansistring; SpeechType: Longword; font: THWFont): PTexture; |
63 function RenderSpeechBubbleTex(s: ansistring; SpeechType: Longword; font: THWFont): PTexture; |
64 procedure flipSurface(Surface: PSDL_Surface; Vertical: Boolean); |
64 procedure flipSurface(Surface: PSDL_Surface; Vertical: Boolean); |
65 //procedure rotateSurface(Surface: PSDL_Surface); |
65 //procedure rotateSurface(Surface: PSDL_Surface); |
66 procedure copyRotatedSurface(src, dest: PSDL_Surface); // this is necessary since width/height are read only in SDL |
66 procedure copyRotatedSurface(src, dest: PSDL_Surface); // this is necessary since width/height are read only in SDL |
67 procedure copyToXY(src, dest: PSDL_Surface; destX, destY: Integer); |
67 procedure copyToXY(src, dest: PSDL_Surface; destX, destY: LongInt); |
68 procedure RenderHealth(var Hedgehog: THedgehog); |
68 procedure RenderHealth(var Hedgehog: THedgehog); |
69 procedure AddProgress; |
69 procedure AddProgress; |
70 procedure FinishProgress; |
70 procedure FinishProgress; |
71 function LoadImage(const filename: shortstring; imageFlags: LongInt): PSDL_Surface; |
71 function LoadImage(const filename: shortstring; imageFlags: LongInt): PSDL_Surface; |
72 procedure SetupOpenGL; |
72 procedure SetupOpenGL; |
81 uses uMisc, uConsole, uLand, uLocale, uWorld{$IFDEF IPHONEOS}, PascalExports{$ENDIF}; |
81 uses uMisc, uConsole, uLand, uLocale, uWorld{$IFDEF IPHONEOS}, PascalExports{$ENDIF}; |
82 |
82 |
83 type TGPUVendor = (gvUnknown, gvNVIDIA, gvATI, gvIntel, gvApple); |
83 type TGPUVendor = (gvUnknown, gvNVIDIA, gvATI, gvIntel, gvApple); |
84 |
84 |
85 var HHTexture: PTexture; |
85 var HHTexture: PTexture; |
86 MaxTextureSize: Integer; |
86 MaxTextureSize: LongInt; |
87 cGPUVendor: TGPUVendor; |
87 cGPUVendor: TGPUVendor; |
88 |
88 |
89 procedure Tint(r, g, b, a: Single); |
89 procedure Tint(r, g, b, a: Single); |
90 begin |
90 begin |
91 glColor4f(r, g, b, a); |
91 glColor4f(r, g, b, a); |
1302 pixels^[i]:= pixels^[j]; |
1302 pixels^[i]:= pixels^[j]; |
1303 pixels^[j]:= tmpPixel; |
1303 pixels^[j]:= tmpPixel; |
1304 end; |
1304 end; |
1305 end; |
1305 end; |
1306 |
1306 |
1307 procedure copyToXY(src, dest: PSDL_Surface; destX, destY: Integer); |
1307 procedure copyToXY(src, dest: PSDL_Surface; destX, destY: LongInt); |
1308 var srcX, srcY, i, j, maxDest: LongInt; |
1308 var srcX, srcY, i, j, maxDest: LongInt; |
1309 srcPixels, destPixels: PLongWordArray; |
1309 srcPixels, destPixels: PLongWordArray; |
1310 begin |
1310 begin |
1311 maxDest:= (dest^.pitch div 4) * dest^.h; |
1311 maxDest:= (dest^.pitch div 4) * dest^.h; |
1312 srcPixels:= src^.pixels; |
1312 srcPixels:= src^.pixels; |