updated Engine to use TextureCache

git-svn-id: svn://anubis/anaglym/trunk@95 99a6e188-d820-4881-8870-2d33a10e2619
This commit is contained in:
Josh Holtrop 2009-10-18 16:33:58 +00:00
parent e537e89568
commit 79b11ba619
4 changed files with 23 additions and 17 deletions

View File

@ -231,7 +231,7 @@ int Engine::loadModel(const string & name, bool static_data, float scale)
FileLoader::Path model_path("", name + ".obj");
string phys_path = locateResource(name + ".phy");
WFObj * obj = new WFObj(*m_fileLoader /* TODO: texture loaders */);
WFObj * obj = new WFObj(*m_fileLoader, m_textureCache);
if (obj->load(model_path))
{

View File

@ -7,6 +7,7 @@
#include <map>
#include <SDL.h>
#include "OdeWorld/OdeWorld.h"
#include "TextureCache/TextureCache.h"
#include "wfobj/WFObj.h"
class Engine
@ -101,6 +102,7 @@ class Engine
return new Object(is_static, m_world, display_list, scale);
}
TextureCache m_textureCache;
EngineFileLoader * m_fileLoader;
lua_State * m_luaState;
std::string m_program_path;

View File

@ -24,7 +24,7 @@ LUALIBS := -llua5.1
endif
SDLINCLUDE := $(shell sdl-config --cflags)
SDLLIBS := $(shell sdl-config --libs)
SDLLIBS := $(shell sdl-config --libs) -lSDL_image
ODEINCLUDE := $(shell ode-config --cflags)
ODELIBS := $(shell ode-config --libs)
@ -51,7 +51,7 @@ endif
all: $(TARGET)
$(TARGET): $(OBJS) wfobj/WFObj.o OdeWorld/OdeWorld.o
$(TARGET): $(OBJS) wfobj/WFObj.o OdeWorld/OdeWorld.o TextureCache/TextureCache.o
$(CXX) -o $@ $^ $(LDFLAGS)
.PHONY: wfobj/WFObj.o
@ -62,6 +62,10 @@ wfobj/WFObj.o:
OdeWorld/OdeWorld.o:
$(MAKE) -C OdeWorld
.PHONY: TextureCache/TextureCache.o
TextureCache/TextureCache.o:
$(MAKE) -C TextureCache
%.o: %.c
$(CC) -c -o $@ $(CPPFLAGS) $(CFLAGS) $<

View File

@ -2,6 +2,6 @@
#ifndef ANAGLYM_H
#define ANAGLYM_H
#define FILENAME_SAFE_CHARS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-"
#define FILENAME_SAFE_CHARS "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-."
#endif