From 437384a83842c63dea3d0bd542332ed7ea48294f Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 22 Dec 2008 14:13:15 +0000 Subject: - Split the SAGA resource manager in 3 different ones, depending on the resource type (RSC for ITE, RES for IHNM and HRS for DINO/FTA2). The SAGA 2 HRS resource manager is still a stub - Added detection for the voice file of FTA2 svn-id: r35484 --- engines/saga/saga.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'engines/saga/saga.cpp') diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp index 61fa29ecd1..bcad5e03be 100644 --- a/engines/saga/saga.cpp +++ b/engines/saga/saga.cpp @@ -34,7 +34,7 @@ #include "saga/saga.h" -#include "saga/rscfile.h" +#include "saga/resource.h" #include "saga/gfx.h" #include "saga/render.h" #include "saga/actor.h" @@ -164,7 +164,18 @@ Common::Error SagaEngine::init() { if (_readingSpeed > 3) _readingSpeed = 0; - _resource = new Resource(this); + switch(getGameId()) { + case GID_ITE: + _resource = new Resource_RSC(this); + break; + case GID_IHNM: + _resource = new Resource_RES(this); + break; + case GID_DINO: + case GID_FTA2: + _resource = new Resource_HRS(this); + break; + } // Detect game and open resource files if (!initGame()) { -- cgit v1.2.3