aboutsummaryrefslogtreecommitdiff
path: root/queen/credits.cpp
diff options
context:
space:
mode:
authorGregory Montoir2004-10-08 18:43:24 +0000
committerGregory Montoir2004-10-08 18:43:24 +0000
commit648b7b1e57411998f27f814c252748479e3738a3 (patch)
tree9e11bb74ebe89518c435d6e152e7d59f05aa74b8 /queen/credits.cpp
parent9c863283ede4a5bf08eb1c0def5528556de2fb94 (diff)
downloadscummvm-rg350-648b7b1e57411998f27f814c252748479e3738a3.tar.gz
scummvm-rg350-648b7b1e57411998f27f814c252748479e3738a3.tar.bz2
scummvm-rg350-648b7b1e57411998f27f814c252748479e3738a3.zip
cleanup ; follow the code conventions
svn-id: r15476
Diffstat (limited to 'queen/credits.cpp')
-rw-r--r--queen/credits.cpp121
1 files changed, 54 insertions, 67 deletions
diff --git a/queen/credits.cpp b/queen/credits.cpp
index 48bf951a68..0310e50211 100644
--- a/queen/credits.cpp
+++ b/queen/credits.cpp
@@ -73,80 +73,67 @@ void Credits::update() {
if ('.' == line[0]) {
int i;
- switch (tolower(line[1])) {
-
- case 'l' :
- _justify = 0;
- break;
- case 'c' :
- _justify = 1;
- break;
- case 'r' :
- _justify = 2;
- break;
-
- case 's' :
- _fontSize = 0;
- break;
- case 'b' :
- _fontSize = 1;
- break;
-
- case 'p' :
- _pause = atoi(&line[3]);
- _pause *= 10;
-
- /* wait until next room */
- if (0 == _pause)
- _pause = -1;
-
-
- for(i = 0; i < _count; i++)
- {
- _vm->display()->textCurrentColor(_list[i].color);
- _vm->display()->setText(_list[i].x, _list[i].y, _list[i].text);
- }
-
- _count = 0;
- return;
-
- case 'i' :
- _color = atoi(&line[3]);
- break;
-
- case '1' :
- case '2' :
- case '3' :
- case '4' :
- case '5' :
- case '6' :
- case '7' :
- case '8' :
- case '9' :
- _zone = line[1] - '1';
- break;
+ switch (tolower(line[1])) {
+ case 'l' :
+ _justify = 0;
+ break;
+ case 'c' :
+ _justify = 1;
+ break;
+ case 'r' :
+ _justify = 2;
+ break;
+ case 's' :
+ _fontSize = 0;
+ break;
+ case 'b' :
+ _fontSize = 1;
+ break;
+ case 'p' :
+ _pause = atoi(&line[3]);
+ _pause *= 10;
+ /* wait until next room */
+ if (0 == _pause)
+ _pause = -1;
+ for(i = 0; i < _count; i++) {
+ _vm->display()->textCurrentColor(_list[i].color);
+ _vm->display()->setText(_list[i].x, _list[i].y, _list[i].text);
+ }
+ _count = 0;
+ return;
+ case 'i' :
+ _color = atoi(&line[3]);
+ break;
+ case '1' :
+ case '2' :
+ case '3' :
+ case '4' :
+ case '5' :
+ case '6' :
+ case '7' :
+ case '8' :
+ case '9' :
+ _zone = line[1] - '1';
+ break;
}
-
- }
- else {
+ } else {
assert(_count < ARRAYSIZE(_list));
_list[_count].text = line;
_list[_count].color = _color;
_list[_count].fontSize = _fontSize;
switch (_justify) {
- case 0:
- _list[_count].x = (_zone % 3) * (320 / 3) + 8;
- break;
- case 1:
- _list[_count].x = (_zone % 3) * (320 / 3) + 54 - _vm->display()->textWidth(line) / 2;
- if (_list[_count].x < 8)
- _list[_count].x = 8;
- break;
- case 2:
- _list[_count].x = (_zone % 3) * (320 / 3) + 100 - _vm->display()->textWidth(line);
- break;
+ case 0:
+ _list[_count].x = (_zone % 3) * (320 / 3) + 8;
+ break;
+ case 1:
+ _list[_count].x = (_zone % 3) * (320 / 3) + 54 - _vm->display()->textWidth(line) / 2;
+ if (_list[_count].x < 8)
+ _list[_count].x = 8;
+ break;
+ case 2:
+ _list[_count].x = (_zone % 3) * (320 / 3) + 100 - _vm->display()->textWidth(line);
+ break;
}
-
_list[_count].y = (_zone / 3) * (200 / 3) + (_count * 10);
_count++;
}