69 procedure AddProgress; |
74 procedure AddProgress; |
70 procedure FinishProgress; |
75 procedure FinishProgress; |
71 function LoadImage(const filename: shortstring; imageFlags: LongInt): PSDL_Surface; |
76 function LoadImage(const filename: shortstring; imageFlags: LongInt): PSDL_Surface; |
72 procedure SetupOpenGL; |
77 procedure SetupOpenGL; |
73 procedure SetScale(f: GLfloat); |
78 procedure SetScale(f: GLfloat); |
74 function RenderHelpWindow(caption, subcaption, description, extra: ansistring; extracolor: LongInt; iconsurf: PSDL_Surface; iconrect: PSDL_Rect): PTexture; |
79 function RenderHelpWindow(caption, subcaption, description, extra: ansistring; extracolor: LongInt; iconsurf: PSDL_Surface; iconrect: PSDL_Rect): PTexture; |
75 procedure RenderWeaponTooltip(atype: TAmmoType); |
80 procedure RenderWeaponTooltip(atype: TAmmoType); |
76 procedure ShowWeaponTooltip(x, y: LongInt); |
81 procedure ShowWeaponTooltip(x, y: LongInt); |
77 procedure FreeWeaponTooltip; |
82 procedure FreeWeaponTooltip; |
78 procedure Tint(r, g, b, a: Byte); inline; |
83 procedure Tint(r, g, b, a: Byte); inline; |
79 |
84 |
1199 |
1204 |
1200 glMatrixMode(GL_MODELVIEW); |
1205 glMatrixMode(GL_MODELVIEW); |
1201 // prepare default translation/scaling |
1206 // prepare default translation/scaling |
1202 glLoadIdentity(); |
1207 glLoadIdentity(); |
1203 {$IFDEF IPHONEOS} |
1208 {$IFDEF IPHONEOS} |
1204 glRotatef(-90, 0, 0, 1); |
1209 glRotatef(rotationQt, 0, 0, 1); |
1205 {$ENDIF} |
1210 {$ENDIF} |
1206 glScalef(2.0 / cScreenWidth, -2.0 / cScreenHeight, 1.0); |
1211 glScalef(2.0 / cScreenWidth, -2.0 / cScreenHeight, 1.0); |
1207 glTranslatef(0, -cScreenHeight / 2, 0); |
1212 glTranslatef(0, -cScreenHeight / 2, 0); |
1208 |
1213 |
1209 // enable alpha blending |
1214 // enable alpha blending |
1229 if f = cScaleFactor then exit; |
1234 if f = cScaleFactor then exit; |
1230 |
1235 |
1231 if f = scale then |
1236 if f = scale then |
1232 glPopMatrix // "return" to default scaling |
1237 glPopMatrix // "return" to default scaling |
1233 else // other scaling |
1238 else // other scaling |
1234 begin |
1239 begin |
1235 glPushMatrix; // save default scaling |
1240 glPushMatrix; // save default scaling |
1236 glLoadIdentity; |
1241 glLoadIdentity; |
1237 {$IFDEF IPHONEOS} |
1242 {$IFDEF IPHONEOS} |
1238 glRotatef(-90, 0, 0, 1); |
1243 glRotatef(rotationQt, 0, 0, 1); |
1239 {$ENDIF} |
1244 {$ENDIF} |
1240 glScalef(f / cScreenWidth, -f / cScreenHeight, 1.0); |
1245 glScalef(f / wScreen, -f / hScreen, 1.0); |
1241 glTranslatef(0, -cScreenHeight / 2, 0); |
1246 glTranslatef(0, -cScreenHeight / 2, 0); |
1242 end; |
1247 end; |
1243 |
1248 |
1244 cScaleFactor:= f; |
1249 cScaleFactor:= f; |
1245 end; |
1250 end; |
1246 |
1251 |
1247 //////////////////////////////////////////////////////////////////////////////// |
1252 //////////////////////////////////////////////////////////////////////////////// |
1540 {$ENDIF} |
1545 {$ENDIF} |
1541 end; |
1546 end; |
1542 |
1547 |
1543 procedure initModule; |
1548 procedure initModule; |
1544 begin |
1549 begin |
1545 PixelFormat:= nil; |
1550 PixelFormat:= nil; |
1546 SDLPrimSurface:= nil; |
1551 SDLPrimSurface:= nil; |
1547 {$IFNDEF IPHONEOS}cGPUVendor:= gvUnknown;{$ENDIF} |
1552 {$IFDEF IPHONEOS} |
1548 |
1553 rotationQt:= -90; |
1549 cScaleFactor:= 2.0; |
1554 {$ELSE} |
1550 SupportNPOTT:= false; |
1555 cGPUVendor:= gvUnknown; |
1551 Step:= 0; |
1556 {$ENDIF} |
1552 ProgrTex:= nil; |
1557 uStore.wScreen:= cScreenWidth; |
|
1558 uStore.hScreen:= cScreenHeight; |
|
1559 cScaleFactor:= 2.0; |
|
1560 SupportNPOTT:= false; |
|
1561 Step:= 0; |
|
1562 ProgrTex:= nil; |
1553 end; |
1563 end; |
1554 |
1564 |
1555 procedure freeModule; |
1565 procedure freeModule; |
1556 begin |
1566 begin |
1557 end; |
1567 end; |