hedgewars/uStore.pas
changeset 3626 19f78afa0188
parent 3611 ed00aa2b339e
child 3628 2b4d878ba565
equal deleted inserted replaced
3625:9f1d79e01a60 3626:19f78afa0188
    34     squaresize : LongInt;
    34     squaresize : LongInt;
    35     numsquares : LongInt;
    35     numsquares : LongInt;
    36     ProgrTex: PTexture;
    36     ProgrTex: PTexture;
    37     MissionIcons: PSDL_Surface;
    37     MissionIcons: PSDL_Surface;
    38     ropeIconTex: PTexture;
    38     ropeIconTex: PTexture;
    39 {$IFDEF IPHONEOS}
       
    40     rotationQt: GLfloat;
    39     rotationQt: GLfloat;
    41 {$ENDIF}
       
    42     wScreen: LongInt;
    40     wScreen: LongInt;
    43     hScreen: LongInt;
    41     hScreen: LongInt;
    44     
    42     
    45 procedure initModule;
    43 procedure initModule;
    46 procedure freeModule;
    44 procedure freeModule;
  1230 {$ENDIF}
  1228 {$ENDIF}
  1231 
  1229 
  1232     glMatrixMode(GL_MODELVIEW);
  1230     glMatrixMode(GL_MODELVIEW);
  1233     // prepare default translation/scaling
  1231     // prepare default translation/scaling
  1234     glLoadIdentity();
  1232     glLoadIdentity();
  1235 {$IFDEF IPHONEOS}
       
  1236     glRotatef(rotationQt, 0, 0, 1);
  1233     glRotatef(rotationQt, 0, 0, 1);
  1237 {$ENDIF}
       
  1238     glScalef(2.0 / cScreenWidth, -2.0 / cScreenHeight, 1.0);
  1234     glScalef(2.0 / cScreenWidth, -2.0 / cScreenHeight, 1.0);
  1239     glTranslatef(0, -cScreenHeight / 2, 0);
  1235     glTranslatef(0, -cScreenHeight / 2, 0);
  1240 
  1236 
  1241     // enable alpha blending
  1237     // enable alpha blending
  1242     glEnable(GL_BLEND);
  1238     glEnable(GL_BLEND);
  1258         glPopMatrix         // "return" to default scaling
  1254         glPopMatrix         // "return" to default scaling
  1259     else                    // other scaling
  1255     else                    // other scaling
  1260     begin
  1256     begin
  1261         glPushMatrix;       // save default scaling
  1257         glPushMatrix;       // save default scaling
  1262         glLoadIdentity;
  1258         glLoadIdentity;
  1263 {$IFDEF IPHONEOS}
       
  1264         glRotatef(rotationQt, 0, 0, 1);
  1259         glRotatef(rotationQt, 0, 0, 1);
  1265 {$ENDIF}
       
  1266         glScalef(f / wScreen, -f / hScreen, 1.0);
  1260         glScalef(f / wScreen, -f / hScreen, 1.0);
  1267         glTranslatef(0, -cScreenHeight / 2, 0);
  1261         glTranslatef(0, -cScreenHeight / 2, 0);
  1268     end;
  1262     end;
  1269 
  1263 
  1270     cScaleFactor:= f;
  1264     cScaleFactor:= f;
  1583     PixelFormat:= nil;
  1577     PixelFormat:= nil;
  1584     SDLPrimSurface:= nil;
  1578     SDLPrimSurface:= nil;
  1585 {$IFDEF IPHONEOS}
  1579 {$IFDEF IPHONEOS}
  1586     rotationQt:= -90;
  1580     rotationQt:= -90;
  1587 {$ELSE}
  1581 {$ELSE}
       
  1582     rotationQt:= 0;
  1588     cGPUVendor:= gvUnknown;
  1583     cGPUVendor:= gvUnknown;
  1589 {$ENDIF}
  1584 {$ENDIF}
  1590     // really initalized in storeLoad
  1585     // really initalized in storeLoad
  1591     uStore.wScreen:= 0; 
  1586     uStore.wScreen:= 0; 
  1592     uStore.hScreen:= 0;
  1587     uStore.hScreen:= 0;