DRASCULA: Fix shadowing warnings (thanks LordHoto), and rename some variables

This commit is contained in:
Filippos Karapetis 2013-01-06 21:52:28 +02:00
parent 05bf234b26
commit 89bbc9c292
6 changed files with 23 additions and 23 deletions

View File

@ -862,14 +862,14 @@ void DrasculaEngine::animation_23_2() {
int animX, animY;
// Animation offsets - without earplugs
int x1[] = {1, 38, 75, 112, 75, 112, 75, 112, 149, 112, 149, 112, 149, 186, 223, 260,
1, 38, 75, 112, 149, 112, 149, 112, 149, 112, 149, 186, 223, 260, 260, 260, 260, 223};
int y1[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 76, 76, 76, 76, 76, 76, 76,
76, 76, 76, 76, 76, 76, 76, 1, 1, 1, 1};
int johnFrameX[] = {1, 38, 75, 112, 75, 112, 75, 112, 149, 112, 149, 112, 149, 186, 223, 260,
1, 38, 75, 112, 149, 112, 149, 112, 149, 112, 149, 186, 223, 260, 260, 260, 260, 223};
int johnFrameY[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 76, 76, 76, 76, 76, 76, 76,
76, 76, 76, 76, 76, 76, 76, 1, 1, 1, 1};
// Animation offsets - with earplugs
int x2[] = {1, 35, 69, 103, 137, 171, 205, 239, 273, 1, 35, 69, 103, 137};
int y2[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 73, 73, 73, 73, 73};
int john2FrameX[] = {1, 35, 69, 103, 137, 171, 205, 239, 273, 1, 35, 69, 103, 137};
int john2FrameY[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 73, 73, 73, 73, 73};
loadPic("an24.alg", frontSurface);
@ -922,9 +922,9 @@ void DrasculaEngine::animation_23_2() {
for (int n = 0; n < maxN; n++) {
copyRect(p_x, p_y, p_x, p_y, animX, animY, bgSurface, screenSurface);
if (flags[29] == 0)
copyRect(x1[n], y1[n], p_x, p_y, animX, animY, backSurface, screenSurface);
copyRect(johnFrameX[n], johnFrameY[n], p_x, p_y, animX, animY, backSurface, screenSurface);
else
copyRect(x2[n], y2[n], p_x, p_y, animX, animY, backSurface, screenSurface);
copyRect(john2FrameX[n], john2FrameY[n], p_x, p_y, animX, animY, backSurface, screenSurface);
updateRefresh();
updateScreen(p_x, p_y, p_x, p_y, animX, animY, screenSurface);
updateEvents();

View File

@ -670,8 +670,8 @@ bool DrasculaEngine::verify1() {
removeObject();
else {
for (l = 0; l < numRoomObjs; l++) {
if (mouseX >= x1[l] && mouseY >= y1[l]
&& mouseX <= x2[l] && mouseY <= y2[l] && doBreak == 0) {
if (mouseX >= _objectX1[l] && mouseY >= _objectY1[l]
&& mouseX <= _objectX2[l] && mouseY <= _objectY2[l] && doBreak == 0) {
if (exitRoom(l))
return true;
if (doBreak == 1)
@ -684,8 +684,8 @@ bool DrasculaEngine::verify1() {
doBreak = 1;
for (l = 0; l < numRoomObjs; l++) {
if (mouseX > x1[l] && mouseY > y1[l]
&& mouseX < x2[l] && mouseY < y2[l] && doBreak == 0) {
if (mouseX > _objectX1[l] && mouseY > _objectY1[l]
&& mouseX < _objectX2[l] && mouseY < _objectY2[l] && doBreak == 0) {
roomX = roomObjX[l];
roomY = roomObjY[l];
trackFinal = trackObj[l];
@ -718,8 +718,8 @@ bool DrasculaEngine::verify2() {
return true;
} else {
for (l = 0; l < numRoomObjs; l++) {
if (mouseX > x1[l] && mouseY > y1[l]
&& mouseX < x2[l] && mouseY < y2[l] && visible[l] == 1) {
if (mouseX > _objectX1[l] && mouseY > _objectY1[l]
&& mouseX < _objectX2[l] && mouseY < _objectY2[l] && visible[l] == 1) {
trackFinal = trackObj[l];
walkToObject = 1;
gotoObject(roomObjX[l], roomObjY[l]);

View File

@ -417,7 +417,7 @@ public:
int inventoryObjects[43];
char _targetSurface[40][20];
int _destX[40], _destY[40], trackCharacter_alkeva[40], roomExits[40];
int x1[40], y1[40], x2[40], y2[40];
int _objectX1[40], _objectY1[40], _objectX2[40], _objectY2[40];
int takeObject, pickedObject;
bool _subtitlesDisabled;
bool _menuBar, _menuScreen, _hasName;

View File

@ -167,8 +167,8 @@ void DrasculaEngine::showMap() {
_hasName = false;
for (int l = 0; l < numRoomObjs; l++) {
if (mouseX > x1[l] && mouseY > y1[l]
&& mouseX < x2[l] && mouseY < y2[l]
if (mouseX > _objectX1[l] && mouseY > _objectY1[l]
&& mouseX < _objectX2[l] && mouseY < _objectY2[l]
&& visible[l] == 1) {
strcpy(textName, objName[l]);
_hasName = true;

View File

@ -100,8 +100,8 @@ void DrasculaEngine::checkObjects() {
int l, veo = 0;
for (l = 0; l < numRoomObjs; l++) {
if (mouseX > x1[l] && mouseY > y1[l]
&& mouseX < x2[l] && mouseY < y2[l]
if (mouseX > _objectX1[l] && mouseY > _objectY1[l]
&& mouseX < _objectX2[l] && mouseY < _objectY2[l]
&& visible[l] == 1 && isDoor[l] == 0) {
strcpy(textName, objName[l]);
_hasName = true;

View File

@ -1712,10 +1712,10 @@ void DrasculaEngine::enterRoom(int roomIndex) {
for (l = 0; l < numRoomObjs; l++) {
p.parseInt(objectNum[l]);
p.parseString(objName[l]);
p.parseInt(x1[l]);
p.parseInt(y1[l]);
p.parseInt(x2[l]);
p.parseInt(y2[l]);
p.parseInt(_objectX1[l]);
p.parseInt(_objectY1[l]);
p.parseInt(_objectX2[l]);
p.parseInt(_objectY2[l]);
p.parseInt(roomObjX[l]);
p.parseInt(roomObjY[l]);
p.parseInt(trackObj[l]);