aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control/pet_section.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-04-19 22:00:47 -0400
committerPaul Gilbert2016-07-10 16:11:37 -0400
commita8f8e4b69eab768f38d5cd73ceecce03bd096a4d (patch)
tree16411b2115087fbcf5be361b66e1996a32b2b337 /engines/titanic/pet_control/pet_section.cpp
parenta6e76530b248c6ad61aac0fc4496e126ca6cd77b (diff)
downloadscummvm-rg350-a8f8e4b69eab768f38d5cd73ceecce03bd096a4d.tar.gz
scummvm-rg350-a8f8e4b69eab768f38d5cd73ceecce03bd096a4d.tar.bz2
scummvm-rg350-a8f8e4b69eab768f38d5cd73ceecce03bd096a4d.zip
TITANIC: Clarified UI color methods & tables
Diffstat (limited to 'engines/titanic/pet_control/pet_section.cpp')
-rw-r--r--engines/titanic/pet_control/pet_section.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/engines/titanic/pet_control/pet_section.cpp b/engines/titanic/pet_control/pet_section.cpp
index 3d26fc444a..a41118bf76 100644
--- a/engines/titanic/pet_control/pet_section.cpp
+++ b/engines/titanic/pet_control/pet_section.cpp
@@ -26,15 +26,15 @@
namespace Titanic {
-static const uint ARRAY1[6] = {
+static const uint PALETTE1[6] = {
0xA7C0DB, 0x9CFFFE, 0x73AEFF, 0xA7C0DB, 0x9CFFFE, 0
};
-static const uint ARRAY2[6] = {
+static const uint PALETTE2[6] = {
0x10101, 0x1013C, 0xC80101, 0x10101, 0x800101, 0
};
-static const uint ARRAY3[5] = {
+static const uint PALETTE3[5] = {
0x10101, 0x1013C, 0xC80101, 0x10101, 0x800101
};
@@ -62,20 +62,20 @@ void CPetSection::proc30() {
error("TODO");
}
-uint CPetSection::getDataIndex(int index) {
- return getDataTable()[index];
+uint CPetSection::getColor(uint index) {
+ return getColorTable()[index];
}
-const uint *CPetSection::getDataTable(int index) {
- if (index == -1) {
+const uint *CPetSection::getColorTable(int tableNum) {
+ if (tableNum == -1) {
CPetControl *pet = getPetControl();
- index = pet ? pet->getState8() : 3;
+ tableNum = pet ? pet->getState8() : 3;
}
- switch (index) {
- case 1: return ARRAY1;
- case 2: return ARRAY2;
- default: return ARRAY3;
+ switch (tableNum) {
+ case 1: return PALETTE1;
+ case 2: return PALETTE2;
+ default: return PALETTE3;
}
}