hedgewars/uStore.pas
changeset 8204 9a6030d96273
parent 8145 6408c0ba4ba1
child 8309 edcfb5e43245
equal deleted inserted replaced
8203:2c98ec41697a 8204:9a6030d96273
    54 
    54 
    55 procedure WarpMouse(x, y: Word); inline;
    55 procedure WarpMouse(x, y: Word); inline;
    56 procedure SwapBuffers; {$IFDEF USE_VIDEO_RECORDING}cdecl{$ELSE}inline{$ENDIF};
    56 procedure SwapBuffers; {$IFDEF USE_VIDEO_RECORDING}cdecl{$ELSE}inline{$ENDIF};
    57 
    57 
    58 implementation
    58 implementation
    59 uses uMisc, uConsole, uMobile, uVariables, uUtils, uTextures, uRender, uRenderUtils, uCommands
    59 uses uMisc, uConsole, uVariables, uUtils, uTextures, uRender, uRenderUtils, uCommands
    60     , uPhysFSLayer
    60     , uPhysFSLayer
    61     , uDebug
    61     , uDebug
    62     {$IFDEF USE_CONTEXT_RESTORE}, uWorld{$ENDIF}
    62     {$IFDEF USE_CONTEXT_RESTORE}, uWorld{$ENDIF}
    63     {$IF NOT DEFINED(SDL13) AND DEFINED(USE_VIDEO_RECORDING)}, glut {$ENDIF};
    63     {$IF NOT DEFINED(SDL13) AND DEFINED(USE_VIDEO_RECORDING)}, glut {$ENDIF};
    64 
    64 
   884         ProgrTex:= Surface2Tex(texsurf, false);
   884         ProgrTex:= Surface2Tex(texsurf, false);
   885 
   885 
   886         squaresize:= texsurf^.w shr 1;
   886         squaresize:= texsurf^.w shr 1;
   887         numsquares:= texsurf^.h div squaresize;
   887         numsquares:= texsurf^.h div squaresize;
   888         SDL_FreeSurface(texsurf);
   888         SDL_FreeSurface(texsurf);
   889 
   889         with mobileRecord do
   890         uMobile.GameLoading();
   890             if GameLoading <> nil then
       
   891                 GameLoading();
       
   892         
   891         end;
   893         end;
   892 
   894 
   893     TryDo(ProgrTex <> nil, 'Error - Progress Texure is nil!', true);
   895     TryDo(ProgrTex <> nil, 'Error - Progress Texure is nil!', true);
   894 
   896 
   895     glClear(GL_COLOR_BUFFER_BIT);
   897     glClear(GL_COLOR_BUFFER_BIT);
   908     inc(Step);
   910     inc(Step);
   909 end;
   911 end;
   910 
   912 
   911 procedure FinishProgress;
   913 procedure FinishProgress;
   912 begin
   914 begin
   913     uMobile.GameLoaded();
   915     with mobileRecord do
       
   916         if GameLoaded <> nil then
       
   917             GameLoaded();
   914     WriteLnToConsole('Freeing progress surface... ');
   918     WriteLnToConsole('Freeing progress surface... ');
   915     FreeTexture(ProgrTex);
   919     FreeTexture(ProgrTex);
   916     ProgrTex:= nil;
   920     ProgrTex:= nil;
   917     Step:= 0
   921     Step:= 0
   918 end;
   922 end;