~ubuntu-branches/ubuntu/trusty/manaplus/trusty

« back to all changes in this revision

Viewing changes to src/resources/resourcemanager.cpp

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2013-10-07 10:26:14 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20131007102614-tg2zjdz8vmtl6n7i
Tags: 1.3.9.29-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include "client.h"
27
27
#include "configuration.h"
28
28
#include "logger.h"
29
 
#include "map.h"
30
29
#include "navigationmanager.h"
31
30
#include "walklayer.h"
32
31
 
36
35
#include "resources/imagehelper.h"
37
36
#include "resources/imageset.h"
38
37
#include "resources/sdlmusic.h"
39
 
#include "resources/openglimagehelper.h"
40
38
#include "resources/soundeffect.h"
41
39
#include "resources/spritedef.h"
42
40
 
43
41
#include "utils/mkdir.h"
 
42
#include "utils/physfscheckutils.h"
44
43
#include "utils/physfsrwops.h"
45
44
#include "utils/sdlcheckutils.h"
46
45
 
47
46
#include <SDL_image.h>
48
 
#include <cassert>
49
47
#include <dirent.h>
50
48
#include <fstream>
51
 
#include <iostream>
52
 
#include <sstream>
53
 
#include <zlib.h>
54
49
 
55
 
#include <sys/stat.h>
56
50
#include <sys/time.h>
57
51
 
58
52
#include "debug.h"
567
561
            return nullptr;
568
562
        const ResourceLoader *const
569
563
            rl = static_cast<const ResourceLoader *const>(v);
570
 
        SDL_RWops *const rw = PHYSFSRWOPS_openRead(rl->path.c_str());
 
564
        SDL_RWops *const rw = MPHYSFSRWOPS_openRead(rl->path.c_str());
571
565
        if (!rw)
572
566
            return nullptr;
573
567
        Resource *const res = rl->fun(rw);
613
607
            d = new Dye(path.substr(p + 1));
614
608
            path = path.substr(0, p);
615
609
        }
616
 
        SDL_RWops *const rw = PHYSFSRWOPS_openRead(path.c_str());
 
610
        SDL_RWops *const rw = MPHYSFSRWOPS_openRead(path.c_str());
617
611
        if (!rw)
618
612
        {
619
613
            delete d;
1044
1038
 
1045
1039
SDL_Surface *ResourceManager::loadSDLSurface(const std::string &filename) const
1046
1040
{
1047
 
    if (SDL_RWops *const rw = PHYSFSRWOPS_openRead(filename.c_str()))
 
1041
    if (SDL_RWops *const rw = MPHYSFSRWOPS_openRead(filename.c_str()))
1048
1042
    {
1049
1043
        if (!IMG_isPNG(rw))
1050
1044
        {