ASYLUM: cleanup and comments

git-svn-id: http://asylumengine.googlecode.com/svn/trunk@373 0bfb4aae-4ea4-11de-8d8d-752d95cf3e3c
This commit is contained in:
Alex Bevilacqua
2021-05-17 15:35:52 +02:00
committed by Eugene Sandulenko
parent b439e33021
commit 1ea346e064
4 changed files with 54 additions and 44 deletions
+1
View File
@@ -55,6 +55,7 @@ void Actor::visible(bool value) {
flags |= 0x01;
else
flags &= 0xFFFFFFFE;
// TODO object_sound_sub_414c30
}
void Actor::setDirection(int dir) {
+13 -10
View File
@@ -78,6 +78,7 @@ Common::Error AsylumEngine::run() {
err = init();
if (err != Common::kNoError)
return err;
return go();
}
@@ -85,13 +86,13 @@ Common::Error AsylumEngine::run() {
Common::Error AsylumEngine::init() {
initGraphics(640, 480, true);
_screen = new Screen(this);
_sound = new Sound(_mixer);
_video = new Video(_mixer);
_console = new Console(this);
_text = new Text(_screen);
_mainMenu = 0;
_scene = 0;
_screen = new Screen(this);
_sound = new Sound(_mixer);
_video = new Video(_mixer);
_console = new Console(this);
_text = new Text(_screen);
_mainMenu = 0;
_scene = 0;
_introPlaying = false;
@@ -104,16 +105,18 @@ Common::Error AsylumEngine::go() {
// TODO: init unknown game stuffs (address 0040F430)
// TODO: if savegame exists on folder, than start NewGame()
// Set up the game's main scene
// FIXME The scene shouldn't be created here, as we don't technically know
// how the scene is starting. This was put in for testing, but will eventually
// have to be removed once saveload is implemented
_scene = new Scene(5, this);
// XXX This is just here for testing purposes. It is also defined
// FIXME This is just here for testing purposes. It is also defined
// in the processActionList() method when the necessary action is fired.
// Once the blowup puzzle testing is removed from checkForEvent(), this
// can be removed as well.
_scene->setBlowUpPuzzle(new BlowUpPuzzleVCR(_scene));
// XXX This can probably also be rolled into the scene constructor.
// FIXME This can probably also be rolled into the scene constructor.
// Investigate if this will fuck up the execution sequence though :P
_scene->actions()->setScriptByIndex(_scene->worldstats()->actionListIdx);
+15 -10
View File
@@ -39,11 +39,16 @@
namespace Asylum {
// XXX
// If defined, this will play the scene title loading
// progress before the scene is entered. This is
// just a convenience, as there's no need for the type
// of pre-loading that was performed in the original
#define SHOW_SCENE_LOADING
// XXX
// I'm not sure if system endian-ness would have any
// effect byte order of the data files, but I guess
// effect on the byte order of the data files, but I guess
// it won't hurt to keep this here until we can test
// on a big-endian system
#ifndef SCUMM_BIG_ENDIAN
@@ -62,15 +67,15 @@ class Video;
class Encounter;
enum kDebugLevels {
kDebugLevelMain = 1 << 0,
kDebugLevelMain = 1 << 0,
kDebugLevelResources = 1 << 1,
kDebugLevelSprites = 1 << 2,
kDebugLevelInput = 1 << 3,
kDebugLevelMenu = 1 << 4,
kDebugLevelScripts = 1 << 5,
kDebugLevelSound = 1 << 6,
kDebugLevelSavegame = 1 << 7,
kDebugLevelScene = 1 << 8
kDebugLevelSprites = 1 << 2,
kDebugLevelInput = 1 << 3,
kDebugLevelMenu = 1 << 4,
kDebugLevelScripts = 1 << 5,
kDebugLevelSound = 1 << 6,
kDebugLevelSavegame = 1 << 7,
kDebugLevelScene = 1 << 8
};
class AsylumEngine: public Engine {
@@ -121,7 +126,7 @@ private:
void processDelayedEvents();
void playIntro();
Common::Language _language;
Common::Language _language;
Common::RandomSource _rnd;
int _ambientVolume;
+25 -24
View File
@@ -49,6 +49,7 @@ public:
bool isActive() {
return _active;
}
void openMenu();
void closeMenu();
@@ -56,32 +57,32 @@ private:
AsylumEngine *_vm;
enum EyesAnimation {
kEyesFront = 0,
kEyesLeft = 1,
kEyesRight = 2,
kEyesTop = 3,
kEyesBottom = 4,
kEyesTopLeft = 5,
kEyesTopRight = 6,
kEyesBottomLeft = 7,
kEyesFront = 0,
kEyesLeft = 1,
kEyesRight = 2,
kEyesTop = 3,
kEyesBottom = 4,
kEyesTopLeft = 5,
kEyesTopRight = 6,
kEyesBottomLeft = 7,
kEyesBottomRight = 8,
kEyesCrossed = 9
kEyesCrossed = 9
};
enum MenuScreen {
kNewGame = 0,
kLoadGame = 1,
kSaveGame = 2,
kDeleteGame = 3,
kViewCinematics = 4,
kQuitGame = 5,
kTextOptions = 6,
kAudioOptions = 7,
kSettings = 8,
kKeyboardConfig = 9,
kShowCredits = 10,
kReturnToGame = 11,
kMainMenu = 12
kNewGame = 0,
kLoadGame = 1,
kSaveGame = 2,
kDeleteGame = 3,
kViewCinematics = 4,
kQuitGame = 5,
kTextOptions = 6,
kAudioOptions = 7,
kSettings = 8,
kKeyboardConfig = 9,
kShowCredits = 10,
kReturnToGame = 11,
kMainMenu = 12
};
Common::Event *_ev;
@@ -101,8 +102,8 @@ private:
uint32 _confGammaLevel;
uint32 _confGameQuality;
MenuScreen _activeMenuScreen;
ResourcePack *_resPack;
MenuScreen _activeMenuScreen;
ResourcePack *_resPack;
GraphicResource *_bgResource;
GraphicResource *_eyeResource;
GraphicResource *_iconResource;