Skip to content

Commit

Permalink
FULLPIPE: Started sound loading
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Sep 6, 2013
1 parent 00971bf commit 5f7cf01
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 1 deletion.
8 changes: 8 additions & 0 deletions engines/fullpipe/fullpipe.cpp
Expand Up @@ -46,6 +46,14 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)

_rnd = new Common::RandomSource("fullpipe");

_gameProjectVersion = 0;
_gameProjectValue = 0;
_scrollSpeed = 0;
_currSoundListCount = 0;

_soundEnabled = true;
_flgSoundList = true;

g_fullpipe = this;
}

Expand Down
2 changes: 2 additions & 0 deletions engines/fullpipe/fullpipe.h
Expand Up @@ -81,6 +81,8 @@ class FullpipeEngine : public ::Engine {
int _gameProjectValue;
int _scrollSpeed;
int _currSoundListCount;
bool _soundEnabled;
bool _flgSoundList;

void initObjectStates();
void setLevelStates();
Expand Down
1 change: 1 addition & 0 deletions engines/fullpipe/module.mk
Expand Up @@ -8,6 +8,7 @@ MODULE_OBJS = \
motion.o \
ngiarchive.o \
scene.o \
sound.o \
stateloader.o \
statics.o \
utils.o
Expand Down
1 change: 1 addition & 0 deletions engines/fullpipe/objects.h
Expand Up @@ -26,6 +26,7 @@
#include "fullpipe/utils.h"
#include "fullpipe/inventory.h"
#include "fullpipe/gfx.h"
#include "fullpipe/sound.h"
#include "fullpipe/scene.h"

namespace Fullpipe {
Expand Down
26 changes: 26 additions & 0 deletions engines/fullpipe/scene.cpp
Expand Up @@ -192,9 +192,35 @@ bool Scene::load(MfcArchive &file) {
if (shd->loadFile(shdname))
_shadows = shd;

free(shdname);

char *slsname = genFileName(0, _sceneId, "sls");

if (g_fullpipe->_soundEnabled) {
_soundList = new SoundList();

if (g_fullpipe->_flgSoundList) {
char *nlname = genFileName(17, _sceneId, "nl");

_soundList->loadFile(slsname, nlname);

free(nlname);
} else {
_soundList->loadFile(slsname, 0);
}
}

free(slsname);

initStaticANIObjects();

warning("STUB: Scene::load (%d bytes left)", file.size() - file.pos());

return true;
}

void Scene::initStaticANIObjects() {
warning("STUB: Scene::initStaticANIObjects");
}

} // End of namespace Fullpipe
3 changes: 2 additions & 1 deletion engines/fullpipe/scene.h
Expand Up @@ -32,7 +32,7 @@ class Scene : public Background {
CPtrList _messageQueueList;
CPtrList _faObjectList;
Shadows *_shadows;
int _soundList;
SoundList *_soundList;
int16 _sceneId;
char *_scstringObj;
int _field_BC;
Expand All @@ -41,6 +41,7 @@ class Scene : public Background {
public:
Scene();
virtual bool load(MfcArchive &file);
void initStaticANIObjects();
};

class SceneTag : public CObject {
Expand Down

0 comments on commit 5f7cf01

Please sign in to comment.