changeset 12597 | 00b539e6115d |
parent 12596 | 7bae1fab444b |
child 12601 | c9711561f947 |
12596:7bae1fab444b | 12597:00b539e6115d |
---|---|
342 if TeamsArray[t] <> nil then |
342 if TeamsArray[t] <> nil then |
343 with TeamsArray[t]^ do |
343 with TeamsArray[t]^ do |
344 begin |
344 begin |
345 if GraveName = '' then |
345 if GraveName = '' then |
346 GraveName:= 'Statue'; |
346 GraveName:= 'Statue'; |
347 texsurf:= LoadDataImageAltFile(ptGraves, GraveName, 'Statue', ifCritical or ifTransparent); |
347 texsurf:= LoadDataImageAltFile(ptGraves, GraveName, 'Statue', ifCritical or ifColorKey); |
348 GraveTex:= Surface2Tex(texsurf, false); |
348 GraveTex:= Surface2Tex(texsurf, false); |
349 SDL_FreeSurface(texsurf) |
349 SDL_FreeSurface(texsurf) |
350 end |
350 end |
351 end; |
351 end; |
352 |
352 |
410 begin |
410 begin |
411 if reload then |
411 if reload then |
412 tmpsurf:= Surface |
412 tmpsurf:= Surface |
413 else |
413 else |
414 begin |
414 begin |
415 imflags := (ifAlpha or ifTransparent); |
415 imflags := (ifAlpha or ifColorKey); |
416 |
416 |
417 // these sprites are optional |
417 // these sprites are optional |
418 if not (ii in [sprHorizont, sprHorizontL, sprHorizontR, sprSky, sprSkyL, sprSkyR, sprChunk, sprFlakeL, sprSDFlakeL, sprCloudL, sprSDCloudL]) then // FIXME: hack |
418 if not (ii in [sprHorizont, sprHorizontL, sprHorizontR, sprSky, sprSkyL, sprSkyR, sprChunk, sprFlakeL, sprSDFlakeL, sprCloudL, sprSDCloudL]) then // FIXME: hack |
419 imflags := (imflags or ifCritical); |
419 imflags := (imflags or ifCritical); |
420 |
420 |
489 WriteNames(fnt16); |
489 WriteNames(fnt16); |
490 |
490 |
491 if not reload then |
491 if not reload then |
492 AddProgress; |
492 AddProgress; |
493 |
493 |
494 tmpsurf:= LoadDataImage(ptGraphics, cHHFileName, ifAlpha or ifCritical or ifTransparent); |
494 tmpsurf:= LoadDataImage(ptGraphics, cHHFileName, ifAlpha or ifCritical or ifColorKey); |
495 |
495 |
496 HHTexture:= Surface2Tex(tmpsurf, false); |
496 HHTexture:= Surface2Tex(tmpsurf, false); |
497 SDL_FreeSurface(tmpsurf); |
497 SDL_FreeSurface(tmpsurf); |
498 |
498 |
499 InitHealth; |
499 InitHealth; |
661 exit; |
661 exit; |
662 end; |
662 end; |
663 |
663 |
664 tmpsurf:= doSurfaceConversion(tmpsurf); |
664 tmpsurf:= doSurfaceConversion(tmpsurf); |
665 |
665 |
666 if (imageFlags and ifTransparent) <> 0 then |
666 if (imageFlags and ifColorKey) <> 0 then |
667 if checkFails(SDL_SetColorKey(tmpsurf, SDL_TRUE, 0) = 0, errmsgTransparentSet, true) then exit; |
667 if checkFails(SDL_SetColorKey(tmpsurf, SDL_TRUE, 0) = 0, errmsgTransparentSet, true) then exit; |
668 |
668 |
669 WriteLnToConsole(msgOK + ' (' + inttostr(tmpsurf^.w) + 'x' + inttostr(tmpsurf^.h) + ')'); |
669 WriteLnToConsole(msgOK + ' (' + inttostr(tmpsurf^.w) + 'x' + inttostr(tmpsurf^.h) + ')'); |
670 |
670 |
671 LoadImage:= tmpsurf //Result |
671 LoadImage:= tmpsurf //Result |
797 begin |
797 begin |
798 if cOnlyStats then exit; |
798 if cOnlyStats then exit; |
799 if Step = 0 then |
799 if Step = 0 then |
800 begin |
800 begin |
801 WriteToConsole(msgLoading + 'progress sprite: '); |
801 WriteToConsole(msgLoading + 'progress sprite: '); |
802 texsurf:= LoadDataImage(ptGraphics, 'Progress', ifCritical or ifTransparent); |
802 texsurf:= LoadDataImage(ptGraphics, 'Progress', ifCritical or ifColorKey); |
803 |
803 |
804 ProgrTex:= Surface2Tex(texsurf, false); |
804 ProgrTex:= Surface2Tex(texsurf, false); |
805 |
805 |
806 LoadingText:= RenderStringTex(trmsg[sidLoading], $FFF39EE8, fntBig); |
806 LoadingText:= RenderStringTex(trmsg[sidLoading], $FFF39EE8, fntBig); |
807 |
807 |