~luke-jr/tr2norigins/tr2norigins-0.4

« back to all changes in this revision

Viewing changes to src/engine/eDisplay.cpp

  • Committer: Luke Dashjr
  • Date: 2010-04-20 23:29:32 UTC
  • mfrom: (690.1.4 compile)
  • Revision ID: luke+bzr@dashjr.org-20100420232932-2t5c0gbjsvh9k33f
MERGE: Moviepack mostly finished

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
#ifdef DEBUG
63
63
bool debug_grid=0;
64
64
#endif
65
 
 
 
65
#include "../tron/gStuff.h"
66
66
REAL upper_height=100;
67
67
REAL lower_height=50;
68
68
 
69
69
 
70
70
#ifndef DEDICATED
71
 
 
 
71
static rFileTexture* sky_moviepack=NULL;
72
72
static rFileTexture sky(rTextureGroups::TEX_FLOOR,"textures/sky.png",1,1,true);
73
 
static rFileTexture sky_moviepack(rTextureGroups::TEX_FLOOR,"moviepack/sky.png",1,1,true);
 
73
 
74
74
 
75
75
extern bool sg_MoviePack();
76
76
 
77
77
static void sky_select(){
78
78
    if (sg_MoviePack()){
 
79
        if ( !sky_moviepack || (sg_moviepackUpdated[5] < sg_moviepackUpdated[0]) )
 
80
                {
 
81
                sky_moviepack = tNEW(rFileTexture)(rTextureGroups::TEX_FLOOR,tString(sg_moviepackPathName + sg_moviepackSlot[sg_moviepackIndex] + "/sky.png"),1,1,true);
 
82
                sg_moviepackUpdated[5] = sg_moviepackUpdated[0];
 
83
                }
 
84
 
79
85
        // Since old movie packs usually don't include sky.png we need to
80
86
        // be nice and fall back to the default sky tecture. -k
81
 
        tString s = tDirectories::Data().GetReadPath( "moviepack/sky.png" );
 
87
        tString s = tDirectories::Data().GetReadPath( tString(sg_moviepackPathName + sg_moviepackSlot[sg_moviepackIndex] + "/sky.png") );
82
88
        if(strlen(s) > 0)
83
 
            sky_moviepack.Select();
 
89
            sky_moviepack->Select();
84
90
        else
85
91
            sky.Select();
86
92
    }