[Scummvm-cvs-logs] SF.net SVN: scummvm: [32507] scummvm/trunk/engines/drascula
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Tue Jun 3 00:41:59 CEST 2008
Revision: 32507
http://scummvm.svn.sourceforge.net/scummvm/?rev=32507&view=rev
Author: thebluegr
Date: 2008-06-02 15:41:58 -0700 (Mon, 02 Jun 2008)
Log Message:
-----------
elige_en_barra -> selectVerbFromBar
comprueba -> verify1
x_barra -> verbBarX
conta_vez -> startTime
diff_vez -> timeDiff
Some cleanup
Modified Paths:
--------------
scummvm/trunk/engines/drascula/drascula.cpp
scummvm/trunk/engines/drascula/drascula.h
scummvm/trunk/engines/drascula/staticdata.h
Modified: scummvm/trunk/engines/drascula/drascula.cpp
===================================================================
--- scummvm/trunk/engines/drascula/drascula.cpp 2008-06-02 21:38:28 UTC (rev 32506)
+++ scummvm/trunk/engines/drascula/drascula.cpp 2008-06-02 22:41:58 UTC (rev 32507)
@@ -630,17 +630,17 @@
if (button_izq == 1 && menuBar == 1) {
delay(100);
- elige_en_barra();
+ selectVerbFromBar();
if (currentChapter != 3)
cont_sv = 0;
} else if (button_izq == 1 && takeObject == 0) {
delay(100);
- if (comprueba1())
+ if (verify1())
return true;
if (currentChapter != 3)
cont_sv = 0;
} else if (button_izq == 1 && takeObject == 1) {
- if (comprueba2())
+ if (verify2())
return true;
if (currentChapter != 3)
cont_sv = 0;
@@ -1153,20 +1153,19 @@
hasName = 0;
}
-void DrasculaEngine::elige_en_barra() {
- int n, num_verbo = -1;
+void DrasculaEngine::selectVerbFromBar() {
+ for (int n = 0; n < 7; n++) {
+ if (mouseX > verbBarX[n] && mouseX < verbBarX[n + 1]) {
+ selectVerb(n);
+ return;
+ }
+ }
- for (n = 0; n < 7; n++)
- if (mouseX > x_barra[n] && mouseX < x_barra[n + 1])
- num_verbo = n;
-
- if (num_verbo < 1)
- withoutVerb();
- else
- selectVerb(num_verbo);
+ // no verb selected
+ withoutVerb();
}
-bool DrasculaEngine::comprueba1() {
+bool DrasculaEngine::verify1() {
int l;
if (menuScreen == 1)
@@ -1209,7 +1208,7 @@
return false;
}
-bool DrasculaEngine::comprueba2() {
+bool DrasculaEngine::verify2() {
int l;
if (menuScreen == 1) {
@@ -2223,7 +2222,7 @@
else
characterMoved = 0;
}
- conta_vez = getTime();
+ startTime = getTime();
}
void DrasculaEngine::pon_hare() {
@@ -2394,9 +2393,9 @@
int n, sobre_verbo = 1;
for (n = 0; n < 7; n++) {
- if (mouseX > x_barra[n] && mouseX < x_barra[n + 1])
+ if (mouseX > verbBarX[n] && mouseX < verbBarX[n + 1])
sobre_verbo = 0;
- copyRect(OBJWIDTH * n, OBJHEIGHT * sobre_verbo, x_barra[n], 2,
+ copyRect(OBJWIDTH * n, OBJHEIGHT * sobre_verbo, verbBarX[n], 2,
OBJWIDTH, OBJHEIGHT, backSurface, screenSurface);
sobre_verbo = 1;
}
@@ -3036,10 +3035,10 @@
}
void DrasculaEngine::increaseFrameNum() {
- diff_vez = getTime() - conta_vez;
+ timeDiff = getTime() - startTime;
- if (diff_vez >= 6) {
- conta_vez = getTime();
+ if (timeDiff >= 6) {
+ startTime = getTime();
num_frame++;
if (num_frame == 6)
num_frame = 0;
Modified: scummvm/trunk/engines/drascula/drascula.h
===================================================================
--- scummvm/trunk/engines/drascula/drascula.h 2008-06-02 21:38:28 UTC (rev 32506)
+++ scummvm/trunk/engines/drascula/drascula.h 2008-06-02 22:41:58 UTC (rev 32507)
@@ -270,7 +270,7 @@
int near, far;
int sentido_final, walkToObject;
int objExit;
- int diff_vez, conta_vez;
+ int timeDiff, startTime;
int hasAnswer;
int conta_blind_vez;
int changeColor;
@@ -399,9 +399,9 @@
void lleva_al_hare(int, int);
void moveCursor();
void checkObjects();
- void elige_en_barra();
- bool comprueba1();
- bool comprueba2();
+ void selectVerbFromBar();
+ bool verify1();
+ bool verify2();
Common::KeyCode getScan();
void selectVerb(int);
void mesa();
@@ -669,7 +669,7 @@
extern const ItemLocation itemLocations[];
extern int frame_x[20];
extern const int x_pol[44], y_pol[44];
-extern const int x_barra[];
+extern const int verbBarX[];
extern const int x1d_menu[], y1d_menu[];
extern const CharInfo charMap[];
Modified: scummvm/trunk/engines/drascula/staticdata.h
===================================================================
--- scummvm/trunk/engines/drascula/staticdata.h 2008-06-02 21:38:28 UTC (rev 32506)
+++ scummvm/trunk/engines/drascula/staticdata.h 2008-06-02 22:41:58 UTC (rev 32507)
@@ -116,7 +116,7 @@
1, 1, 1, 1, 1, 27, 27, 27, 27, 27,
1, 1, 1, 1, 1, 27, 27, 27, 27, 27,
27, 1, 1};
-const int x_barra[] = {6, 51, 96, 141, 186, 232, 276, 321};
+const int verbBarX[] = {6, 51, 96, 141, 186, 232, 276, 321};
const int x1d_menu[] = {280, 40, 80, 120, 160, 200, 240, 0, 40, 80, 120,
160, 200, 240, 0, 40, 80, 120, 160, 200, 240, 0,
40, 80, 120, 160, 200, 240, 0};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list