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:
parent
9cc79d0cea
commit
05ec1ccd5e
8 changed files with 17 additions and 15 deletions
|
@ -32,6 +32,7 @@ ActionList::ActionList(Common::SeekableReadStream *stream, Scene *scene)
|
|||
: _scene(scene) {
|
||||
load(stream);
|
||||
|
||||
_currentScript = 0;
|
||||
currentLine = 0;
|
||||
currentLoops = 0;
|
||||
delayedSceneIndex = -1;
|
||||
|
|
|
@ -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;
|
||||
WorldStats *ws = _scene->worldstats();
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ public:
|
|||
void setActionByIndex(int index);
|
||||
void drawActorAt(uint32 curX, uint32 curY);
|
||||
void drawActor();
|
||||
void walkTo(uint32 curX, uint32 curY);
|
||||
void walkTo(int32 curX, int32 curY);
|
||||
|
||||
int currentAction; // TODO depreciate
|
||||
|
||||
|
|
|
@ -58,10 +58,10 @@ public:
|
|||
uint32 flags;
|
||||
uint32 field_3C;
|
||||
uint8 name[52];
|
||||
uint32 field_74; // XXX looks like fields
|
||||
uint32 field_78; // 78 => 80 have something
|
||||
uint32 field_7C; // to do with calculating
|
||||
uint32 field_80; // actor intersection
|
||||
int32 field_74; // XXX looks like fields
|
||||
int32 field_78; // 78 => 80 have something
|
||||
int32 field_7C; // to do with calculating
|
||||
int32 field_80; // actor intersection
|
||||
uint32 polyIdx;
|
||||
uint32 flags2;
|
||||
uint32 gameFlags[10];
|
||||
|
|
|
@ -440,7 +440,7 @@ void MainMenu::updateSubMenuSettings() {
|
|||
_vm->text()->setTextPos(sizeMinus + sizePlus + 365, 150);
|
||||
loadFont(kFontYellow);
|
||||
if (Config.gammaLevel) {
|
||||
for (uint32 i = 0; i < Config.gammaLevel; i++) {
|
||||
for (int32 i = 0; i < Config.gammaLevel; i++) {
|
||||
_vm->text()->drawText("]");
|
||||
}
|
||||
if (Config.gammaLevel == 8)
|
||||
|
@ -464,7 +464,7 @@ void MainMenu::updateSubMenuSettings() {
|
|||
if (Config.performance == 5) {
|
||||
_vm->text()->drawResText(0x8000059C);
|
||||
} else {
|
||||
for (uint32 i = 5; i > Config.performance; --i) {
|
||||
for (int32 i = 5; i > Config.performance; --i) {
|
||||
_vm->text()->drawText("]");
|
||||
}
|
||||
if (!Config.performance)
|
||||
|
|
|
@ -684,7 +684,7 @@ void Scene::updateMouse() {
|
|||
//printf("Current Dir %d -- New Dir %d\n", actor->direction, dir);
|
||||
}
|
||||
|
||||
void Scene::updateActor(uint32 actorIdx) {
|
||||
void Scene::updateActor(int32 actorIdx) {
|
||||
Actor *actor = getActor();
|
||||
|
||||
if (actor->visible()) {
|
||||
|
@ -1381,7 +1381,7 @@ void Scene::drawActorsAndBarriers() {
|
|||
// works the way I assume it should :P
|
||||
if (!actInBar) {
|
||||
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
|
||||
// supposed to set 0x40 to the lobyte...
|
||||
bar->flags |= 0x40;
|
||||
|
@ -1571,13 +1571,13 @@ void Scene::debugScreenScrolling(GraphicFrame *bg) {
|
|||
// Horizontal scrolling
|
||||
if (_cursor->x() < SCREEN_EDGES && _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;
|
||||
|
||||
// Vertical scrolling
|
||||
if (_cursor->y() < SCREEN_EDGES && _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;
|
||||
}
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ private:
|
|||
bool _rightButton;
|
||||
bool _isActive;
|
||||
bool _skipDrawScene;
|
||||
uint32 _playerActorIdx;
|
||||
int32 _playerActorIdx;
|
||||
|
||||
/** .text:0040E460
|
||||
* Initialize the current scene
|
||||
|
@ -175,7 +175,7 @@ private:
|
|||
/** .text:0040D190 */
|
||||
void updateMouse();
|
||||
/** .text:0040B740 */
|
||||
void updateActor(uint32 actorIdx);
|
||||
void updateActor(int32 actorIdx);
|
||||
/**
|
||||
* TODO give more meaningful name
|
||||
*/
|
||||
|
@ -189,6 +189,7 @@ private:
|
|||
/** .text:0040DAE0 */
|
||||
void updateAdjustScreen();
|
||||
int drawScene();
|
||||
/** .text:0040A3C0 */
|
||||
void drawActorsAndBarriers();
|
||||
int queueActorUpdates();
|
||||
int queueBarrierUpdates();
|
||||
|
|
|
@ -119,7 +119,7 @@ public:
|
|||
Common::Rect sceneRects[6]; // including scene size rect
|
||||
uint8 sceneRectIdx;
|
||||
uint8 field_11D[3];
|
||||
uint32 field_120;
|
||||
int32 field_120;
|
||||
uint32 actionListIdx; // actionList start index
|
||||
uint32 grResId[100];
|
||||
uint32 sceneTitleGrResId;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue