diff options
author | Thierry Crozat | 2019-09-13 23:51:22 +0100 |
---|---|---|
committer | Thierry Crozat | 2019-09-13 23:51:22 +0100 |
commit | 7f05cba9f163962ef1de23945e2a0fc7737c83a8 (patch) | |
tree | a133dab61a539990cae2b692b21c7e07a7e5cf40 /engines | |
parent | 2c5cdfb37e1264e8985bb4e81d89103a0e46b929 (diff) | |
download | scummvm-rg350-7f05cba9f163962ef1de23945e2a0fc7737c83a8.tar.gz scummvm-rg350-7f05cba9f163962ef1de23945e2a0fc7737c83a8.tar.bz2 scummvm-rg350-7f05cba9f163962ef1de23945e2a0fc7737c83a8.zip |
SUPERNOVA: Change type of an array to avoid casting
Diffstat (limited to 'engines')
-rw-r--r-- | engines/supernova/supernova2/rooms.cpp | 6 | ||||
-rw-r--r-- | engines/supernova/supernova2/rooms.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/supernova/supernova2/rooms.cpp b/engines/supernova/supernova2/rooms.cpp index cc4ab858b4..4e8c428fb9 100644 --- a/engines/supernova/supernova2/rooms.cpp +++ b/engines/supernova/supernova2/rooms.cpp @@ -3553,8 +3553,8 @@ BstDoor::BstDoor(SupernovaEngine *vm, GameManager2 *gm) { _objectState[17] = Object(_id, kStringLetter, kStringDefaultDescription, BST16, PRESS, 15, 0, 0); _objectState[18] = Object(_id, kStringDoor, kStringMassive, DOOR, EXIT | OPENABLE | CLOSED, 16, 16, 0, HALL2, 2); - char germanPassword[16] = {0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0}; - char englishPassword[16] = {0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0}; + bool germanPassword[16] = {false, true, false, false, true, false, true, true, true, false, true, false, false, false, false, false}; + bool englishPassword[16] = {false, true, false, true, false, false, true, false, false, true, true, true, false, false, false, false}; if (ConfMan.get("language") == "en") for (int i = 0; i < 16; i++) _password[i] = englishPassword[i]; @@ -3582,7 +3582,7 @@ bool BstDoor::interact(Action verb, Object &obj1, Object &obj2) { _vm->renderImage(number); _vm->playSound(kAudioTaxiOpen); for (number = 1; number <= 16; number++) { - if (isSectionVisible(number) != (bool)_password[number - 1]) + if (isSectionVisible(number) != _password[number - 1]) return true; } _gm->wait(2); diff --git a/engines/supernova/supernova2/rooms.h b/engines/supernova/supernova2/rooms.h index 2520db8807..9f7420d497 100644 --- a/engines/supernova/supernova2/rooms.h +++ b/engines/supernova/supernova2/rooms.h @@ -455,7 +455,7 @@ public: virtual bool interact(Action verb, Object &obj1, Object &obj2); private: - char _password[16]; + bool _password[16]; }; class Hall2 : public Room2 { |