~laney/ubuntu/vivid/0ad/test

« back to all changes in this revision

Viewing changes to source/lib/res/graphics/cursor.cpp

  • Committer: Package Import Robot
  • Author(s): Vincent Cheng
  • Date: 2014-05-17 16:30:39 UTC
  • mfrom: (5.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20140517163039-whlz3xf64hbmi8x1
Tags: 0.0.16-1
* New upstream release.
  - Drop debian/patches/fix-kfreebsd-ftbfs.patch; applied upstream.
* Avoid repacking tarball by including missing jquery sources in Debian diff,
  see debian/missing-sources/jquery-1.8.{0,3}.js. Alternative way of fixing
  #735349.
  - Update debian/copyright to include missing license entries for the
    various javascript libraries contained in the source tarball.
  - Revert changes made to debian/control in 0ad/0.0.15+dfsg-3, i.e.:
    revert: debian/control: Hardcode versions of 0ad-data{,-common} to
            depend on to workaround the fact that 0.0.15+dfsg is strictly
            greater than 0.0.15.
* Build-dep on libgloox-dev (>= 1.0.9) to ensure that 0ad is built with
  newer enough gloox to avoid lobby connectivity issues.
* Add new build-deps: libicu-dev, libmozjs-24-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
        shared_ptr<u8> file; size_t fileSize;
61
61
        RETURN_STATUS_IF_ERR(vfs->LoadFile(pathname, file, fileSize));
62
62
 
63
 
        ScopedTex t;
64
 
        RETURN_STATUS_IF_ERR(tex_decode(file, fileSize, &t));
 
63
        Tex t;
 
64
        RETURN_STATUS_IF_ERR(t.decode(file, fileSize));
65
65
 
66
66
        // convert to required BGRA format.
67
 
        const size_t flags = (t.flags | TEX_BGR) & ~TEX_DXT;
68
 
        RETURN_STATUS_IF_ERR(tex_transform_to(&t, flags));
69
 
        void* bgra_img = tex_get_data(&t);
 
67
        const size_t flags = (t.m_Flags | TEX_BGR) & ~TEX_DXT;
 
68
        RETURN_STATUS_IF_ERR(t.transform_to(flags));
 
69
        void* bgra_img = t.get_data();
70
70
        if(!bgra_img)
71
71
                WARN_RETURN(ERR::FAIL);
72
72
 
73
 
        RETURN_STATUS_IF_ERR(sys_cursor_create((int)t.w, (int)t.h, bgra_img, hx, hy, cursor));
 
73
        RETURN_STATUS_IF_ERR(sys_cursor_create((int)t.m_Width, (int)t.m_Height, bgra_img, hx, hy, cursor));
74
74
        return INFO::OK;
75
75
#endif
76
76
}