diff options
Diffstat (limited to 'engines/titanic/pet_control/pet_section.cpp')
-rw-r--r-- | engines/titanic/pet_control/pet_section.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/engines/titanic/pet_control/pet_section.cpp b/engines/titanic/pet_control/pet_section.cpp index f913ac6b50..3d26fc444a 100644 --- a/engines/titanic/pet_control/pet_section.cpp +++ b/engines/titanic/pet_control/pet_section.cpp @@ -22,9 +22,22 @@ #include "common/textconsole.h" #include "titanic/pet_control/pet_section.h" +#include "titanic/pet_control/pet_control.h" namespace Titanic { +static const uint ARRAY1[6] = { + 0xA7C0DB, 0x9CFFFE, 0x73AEFF, 0xA7C0DB, 0x9CFFFE, 0 +}; + +static const uint ARRAY2[6] = { + 0x10101, 0x1013C, 0xC80101, 0x10101, 0x800101, 0 +}; + +static const uint ARRAY3[5] = { + 0x10101, 0x1013C, 0xC80101, 0x10101, 0x800101 +}; + void CPetSection::displayMessage(const CString &msg) { error("TODO"); } @@ -49,4 +62,21 @@ void CPetSection::proc30() { error("TODO"); } +uint CPetSection::getDataIndex(int index) { + return getDataTable()[index]; +} + +const uint *CPetSection::getDataTable(int index) { + if (index == -1) { + CPetControl *pet = getPetControl(); + index = pet ? pet->getState8() : 3; + } + + switch (index) { + case 1: return ARRAY1; + case 2: return ARRAY2; + default: return ARRAY3; + } +} + } // End of namespace Titanic |