ASYLUM: * Fixed proper _currentScript pointer initialization.

* Silent some warnings.

git-svn-id: http://asylumengine.googlecode.com/svn/trunk@399 0bfb4aae-4ea4-11de-8d8d-752d95cf3e3c
This commit is contained in:
Alexandre Fontoura 2009-11-30 22:52:51 +00:00 committed by Eugene Sandulenko
parent 9cc79d0cea
commit 05ec1ccd5e
No known key found for this signature in database
GPG key ID: 014D387312D34F08
8 changed files with 17 additions and 15 deletions

View file

@ -32,6 +32,7 @@ ActionList::ActionList(Common::SeekableReadStream *stream, Scene *scene)
: _scene(scene) { : _scene(scene) {
load(stream); load(stream);
_currentScript = 0;
currentLine = 0; currentLine = 0;
currentLoops = 0; currentLoops = 0;
delayedSceneIndex = -1; delayedSceneIndex = -1;

View file

@ -167,7 +167,7 @@ void Actor::setWalkArea(ActionArea *target) {
} }
} }
void Actor::walkTo(uint32 curX, uint32 curY) { void Actor::walkTo(int32 curX, int32 curY) {
int newAction = currentAction; int newAction = currentAction;
WorldStats *ws = _scene->worldstats(); WorldStats *ws = _scene->worldstats();

View file

@ -180,7 +180,7 @@ public:
void setActionByIndex(int index); void setActionByIndex(int index);
void drawActorAt(uint32 curX, uint32 curY); void drawActorAt(uint32 curX, uint32 curY);
void drawActor(); void drawActor();
void walkTo(uint32 curX, uint32 curY); void walkTo(int32 curX, int32 curY);
int currentAction; // TODO depreciate int currentAction; // TODO depreciate

View file

@ -58,10 +58,10 @@ public:
uint32 flags; uint32 flags;
uint32 field_3C; uint32 field_3C;
uint8 name[52]; uint8 name[52];
uint32 field_74; // XXX looks like fields int32 field_74; // XXX looks like fields
uint32 field_78; // 78 => 80 have something int32 field_78; // 78 => 80 have something
uint32 field_7C; // to do with calculating int32 field_7C; // to do with calculating
uint32 field_80; // actor intersection int32 field_80; // actor intersection
uint32 polyIdx; uint32 polyIdx;
uint32 flags2; uint32 flags2;
uint32 gameFlags[10]; uint32 gameFlags[10];

View file

@ -440,7 +440,7 @@ void MainMenu::updateSubMenuSettings() {
_vm->text()->setTextPos(sizeMinus + sizePlus + 365, 150); _vm->text()->setTextPos(sizeMinus + sizePlus + 365, 150);
loadFont(kFontYellow); loadFont(kFontYellow);
if (Config.gammaLevel) { if (Config.gammaLevel) {
for (uint32 i = 0; i < Config.gammaLevel; i++) { for (int32 i = 0; i < Config.gammaLevel; i++) {
_vm->text()->drawText("]"); _vm->text()->drawText("]");
} }
if (Config.gammaLevel == 8) if (Config.gammaLevel == 8)
@ -464,7 +464,7 @@ void MainMenu::updateSubMenuSettings() {
if (Config.performance == 5) { if (Config.performance == 5) {
_vm->text()->drawResText(0x8000059C); _vm->text()->drawResText(0x8000059C);
} else { } else {
for (uint32 i = 5; i > Config.performance; --i) { for (int32 i = 5; i > Config.performance; --i) {
_vm->text()->drawText("]"); _vm->text()->drawText("]");
} }
if (!Config.performance) if (!Config.performance)

View file

@ -684,7 +684,7 @@ void Scene::updateMouse() {
//printf("Current Dir %d -- New Dir %d\n", actor->direction, dir); //printf("Current Dir %d -- New Dir %d\n", actor->direction, dir);
} }
void Scene::updateActor(uint32 actorIdx) { void Scene::updateActor(int32 actorIdx) {
Actor *actor = getActor(); Actor *actor = getActor();
if (actor->visible()) { if (actor->visible()) {
@ -1381,7 +1381,7 @@ void Scene::drawActorsAndBarriers() {
// works the way I assume it should :P // works the way I assume it should :P
if (!actInBar) { if (!actInBar) {
if (LOBYTE(bar->flags) & 0x20) if (LOBYTE(bar->flags) & 0x20)
if (!LOBYTE(bar->flags) & 0x80) if (!(LOBYTE(bar->flags) & 0x80))
// XXX not sure if this will work, as it's // XXX not sure if this will work, as it's
// supposed to set 0x40 to the lobyte... // supposed to set 0x40 to the lobyte...
bar->flags |= 0x40; bar->flags |= 0x40;
@ -1571,13 +1571,13 @@ void Scene::debugScreenScrolling(GraphicFrame *bg) {
// Horizontal scrolling // Horizontal scrolling
if (_cursor->x() < SCREEN_EDGES && _ws->targetX >= SCROLL_STEP) if (_cursor->x() < SCREEN_EDGES && _ws->targetX >= SCROLL_STEP)
_ws->targetX -= SCROLL_STEP; _ws->targetX -= SCROLL_STEP;
else if (_cursor->x() > 640 - SCREEN_EDGES && _ws->targetX <= (uint32)bg->surface.w - 640 - SCROLL_STEP) else if (_cursor->x() > 640 - SCREEN_EDGES && _ws->targetX <= bg->surface.w - 640 - SCROLL_STEP)
_ws->targetX += SCROLL_STEP; _ws->targetX += SCROLL_STEP;
// Vertical scrolling // Vertical scrolling
if (_cursor->y() < SCREEN_EDGES && _ws->targetY >= SCROLL_STEP) if (_cursor->y() < SCREEN_EDGES && _ws->targetY >= SCROLL_STEP)
_ws->targetY -= SCROLL_STEP; _ws->targetY -= SCROLL_STEP;
else if (_cursor->y() > 480 - SCREEN_EDGES && _ws->targetY <= (uint32)bg->surface.h - 480 - SCROLL_STEP) else if (_cursor->y() > 480 - SCREEN_EDGES && _ws->targetY <= bg->surface.h - 480 - SCROLL_STEP)
_ws->targetY += SCROLL_STEP; _ws->targetY += SCROLL_STEP;
} }

View file

@ -156,7 +156,7 @@ private:
bool _rightButton; bool _rightButton;
bool _isActive; bool _isActive;
bool _skipDrawScene; bool _skipDrawScene;
uint32 _playerActorIdx; int32 _playerActorIdx;
/** .text:0040E460 /** .text:0040E460
* Initialize the current scene * Initialize the current scene
@ -175,7 +175,7 @@ private:
/** .text:0040D190 */ /** .text:0040D190 */
void updateMouse(); void updateMouse();
/** .text:0040B740 */ /** .text:0040B740 */
void updateActor(uint32 actorIdx); void updateActor(int32 actorIdx);
/** /**
* TODO give more meaningful name * TODO give more meaningful name
*/ */
@ -189,6 +189,7 @@ private:
/** .text:0040DAE0 */ /** .text:0040DAE0 */
void updateAdjustScreen(); void updateAdjustScreen();
int drawScene(); int drawScene();
/** .text:0040A3C0 */
void drawActorsAndBarriers(); void drawActorsAndBarriers();
int queueActorUpdates(); int queueActorUpdates();
int queueBarrierUpdates(); int queueBarrierUpdates();

View file

@ -119,7 +119,7 @@ public:
Common::Rect sceneRects[6]; // including scene size rect Common::Rect sceneRects[6]; // including scene size rect
uint8 sceneRectIdx; uint8 sceneRectIdx;
uint8 field_11D[3]; uint8 field_11D[3];
uint32 field_120; int32 field_120;
uint32 actionListIdx; // actionList start index uint32 actionListIdx; // actionList start index
uint32 grResId[100]; uint32 grResId[100];
uint32 sceneTitleGrResId; uint32 sceneTitleGrResId;