equal
deleted
inserted
replaced
258 ai: TAmmoType; |
258 ai: TAmmoType; |
259 tmpsurf: PSDL_Surface; |
259 tmpsurf: PSDL_Surface; |
260 i: LongInt; |
260 i: LongInt; |
261 begin |
261 begin |
262 AddFileLog('StoreLoad()'); |
262 AddFileLog('StoreLoad()'); |
263 for fi:= Low(THWFont) to High(THWFont) do |
263 |
264 with Fontz[fi] do |
264 if not reload then |
265 begin |
265 for fi:= Low(THWFont) to High(THWFont) do |
266 s:= UserPathz[ptFonts] + '/' + Name; |
266 with Fontz[fi] do |
267 if not FileExists(s) then s:= Pathz[ptFonts] + '/' + Name; |
267 begin |
268 WriteToConsole(msgLoading + s + ' (' + inttostr(Height) + 'pt)... '); |
268 s:= UserPathz[ptFonts] + '/' + Name; |
269 Handle:= TTF_OpenFont(Str2PChar(s), Height); |
269 if not FileExists(s) then s:= Pathz[ptFonts] + '/' + Name; |
270 SDLTry(Handle <> nil, true); |
270 WriteToConsole(msgLoading + s + ' (' + inttostr(Height) + 'pt)... '); |
271 TTF_SetFontStyle(Handle, style); |
271 Handle:= TTF_OpenFont(Str2PChar(s), Height); |
272 WriteLnToConsole(msgOK) |
272 SDLTry(Handle <> nil, true); |
273 end; |
273 TTF_SetFontStyle(Handle, style); |
|
274 WriteLnToConsole(msgOK) |
|
275 end; |
274 |
276 |
275 WriteNames(fnt16); |
277 WriteNames(fnt16); |
276 MakeCrossHairs; |
278 MakeCrossHairs; |
277 LoadGraves; |
279 LoadGraves; |
278 |
280 |
343 end; |
345 end; |
344 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_PRIORITY, priority); |
346 glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_PRIORITY, priority); |
345 // This should maybe be flagged. It wastes quite a bit of memory. |
347 // This should maybe be flagged. It wastes quite a bit of memory. |
346 if not reload then |
348 if not reload then |
347 begin |
349 begin |
348 {$IFNDEF DARWIN & WIN32} |
350 {$IF DEFINED(DARWIN) OR DEFINED(WIN32)} |
|
351 Surface:= tmpsurf |
|
352 {$ELSE} |
349 if saveSurf then Surface:= tmpsurf else SDL_FreeSurface(tmpsurf) |
353 if saveSurf then Surface:= tmpsurf else SDL_FreeSurface(tmpsurf) |
350 {$ELSE} |
|
351 Surface:= tmpsurf |
|
352 {$ENDIF} |
354 {$ENDIF} |
353 end |
355 end |
354 end |
356 end |
355 else |
357 else |
356 Surface:= nil |
358 Surface:= nil |
754 SDL_GL_SwapWindow(SDLwindow); |
756 SDL_GL_SwapWindow(SDLwindow); |
755 {$ELSE} |
757 {$ELSE} |
756 SDL_GL_SwapBuffers(); |
758 SDL_GL_SwapBuffers(); |
757 {$ENDIF} |
759 {$ENDIF} |
758 inc(Step); |
760 inc(Step); |
759 |
|
760 end; |
761 end; |
761 |
762 |
762 procedure FinishProgress; |
763 procedure FinishProgress; |
763 begin |
764 begin |
764 WriteLnToConsole('Freeing progress surface... '); |
765 WriteLnToConsole('Freeing progress surface... '); |
765 FreeTexture(ProgrTex); |
766 FreeTexture(ProgrTex); |
766 uMobile.GameLoaded(); |
767 uMobile.GameLoaded(); |
|
768 Step:= 0 |
767 end; |
769 end; |
768 |
770 |
769 function RenderHelpWindow(caption, subcaption, description, extra: ansistring; extracolor: LongInt; iconsurf: PSDL_Surface; iconrect: PSDL_Rect): PTexture; |
771 function RenderHelpWindow(caption, subcaption, description, extra: ansistring; extracolor: LongInt; iconsurf: PSDL_Surface; iconrect: PSDL_Rect): PTexture; |
770 var tmpsurf: PSDL_SURFACE; |
772 var tmpsurf: PSDL_SURFACE; |
771 w, h, i, j: LongInt; |
773 w, h, i, j: LongInt; |
1035 glClearColor(SkyColor.r / 255, SkyColor.g / 255, SkyColor.b / 255, 0.99) |
1037 glClearColor(SkyColor.r / 255, SkyColor.g / 255, SkyColor.b / 255, 0.99) |
1036 else glClearColor(RQSkyColor.r / 255, RQSkyColor.g / 255, RQSkyColor.b / 255, 0.99); |
1038 else glClearColor(RQSkyColor.r / 255, RQSkyColor.g / 255, RQSkyColor.b / 255, 0.99); |
1037 |
1039 |
1038 StoreRelease(true); |
1040 StoreRelease(true); |
1039 StoreLoad(true); |
1041 StoreLoad(true); |
|
1042 |
1040 ResetLand; |
1043 ResetLand; |
|
1044 |
1041 UpdateLandTexture(0, LAND_WIDTH, 0, LAND_HEIGHT) |
1045 UpdateLandTexture(0, LAND_WIDTH, 0, LAND_HEIGHT) |
1042 end; |
1046 end; |
1043 end; |
1047 end; |
1044 |
1048 |
1045 procedure initModule; |
1049 procedure initModule; |