diff options
| author | Filippos Karapetis | 2008-05-29 18:18:38 +0000 | 
|---|---|---|
| committer | Filippos Karapetis | 2008-05-29 18:18:38 +0000 | 
| commit | 3a43916e2022210b4de9a865f44df67157a0e004 (patch) | |
| tree | 0ee53d6282dd121715c4fd9c073b5e3c9d590dcc | |
| parent | 8363f1294a76f5434ad20a2ac679e4da585cb249 (diff) | |
| download | scummvm-rg350-3a43916e2022210b4de9a865f44df67157a0e004.tar.gz scummvm-rg350-3a43916e2022210b4de9a865f44df67157a0e004.tar.bz2 scummvm-rg350-3a43916e2022210b4de9a865f44df67157a0e004.zip  | |
ancho -> width
alto -> height
nuevo_ancho -> newWidth
nuevo_alto -> newHeight
suma_x -> totalX
suma_y -> totalY
Removed unneeded variables diferencia_x/diferencia_y
svn-id: r32368
| -rw-r--r-- | engines/drascula/drascula.cpp | 30 | ||||
| -rw-r--r-- | engines/drascula/drascula.h | 3 | 
2 files changed, 15 insertions, 18 deletions
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index f0adc6680d..3d80b28e6f 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -3529,23 +3529,23 @@ int DrasculaEngine::vez() {  	return _system->getMillis() / 20; // originaly was 1  } -void DrasculaEngine::reduce_hare_chico(int xx1, int yy1, int xx2, int yy2, int ancho, int alto, int factor, byte *dir_inicio, byte *dir_fin) { -	float suma_x, suma_y; +void DrasculaEngine::reduce_hare_chico(int xx1, int yy1, int xx2, int yy2, int width, int height, int factor, byte *dir_inicio, byte *dir_fin) { +	float totalX, totalY;  	int n, m;  	float pixel_x, pixel_y;  	int pos_pixel[6]; -	nuevo_ancho = (ancho * factor) / 100; -	nuevo_alto = (alto * factor) / 100; +	newWidth = (width * factor) / 100; +	newHeight = (height * factor) / 100; -	suma_x = ancho / nuevo_ancho; -	suma_y = alto / nuevo_alto; +	totalX = width / newWidth; +	totalY = height / newHeight;  	pixel_x = xx1;  	pixel_y = yy1; -	for (n = 0; n < nuevo_alto; n++) { -		for (m = 0; m < nuevo_ancho; m++) { +	for (n = 0; n < newHeight; n++) { +		for (m = 0; m < newWidth; m++) {  			pos_pixel[0] = (int)pixel_x;  			pos_pixel[1] = (int)pixel_y;  			pos_pixel[2] = xx2 + m; @@ -3555,10 +3555,10 @@ void DrasculaEngine::reduce_hare_chico(int xx1, int yy1, int xx2, int yy2, int a  			copyRectClip(pos_pixel, dir_inicio, dir_fin); -			pixel_x = pixel_x + suma_x; +			pixel_x = pixel_x + totalX;  		}  		pixel_x = xx1; -		pixel_y = pixel_y + suma_y; +		pixel_y = pixel_y + totalY;  	}  } @@ -3706,12 +3706,10 @@ void DrasculaEngine::aumenta_num_frame() {  	}  	if (num_ejec != 2) { -		diferencia_y = (int)(alto_hare - nuevo_alto); -		diferencia_x = (int)(ancho_hare - nuevo_ancho); -		hare_y = hare_y + diferencia_y; -		hare_x = hare_x + diferencia_x; -		alto_hare = (int)nuevo_alto; -		ancho_hare = (int)nuevo_ancho; +		hare_y += (int)(alto_hare - newHeight); +		hare_x += (int)(ancho_hare - newWidth); +		alto_hare = (int)newHeight; +		ancho_hare = (int)newWidth;  	}  } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 75261f7d09..1cceb377e3 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -325,8 +325,7 @@ public:  	int cambio_de_color;  	int rompo_y_salgo;  	int vb_x, sentido_vb, vb_se_mueve, frame_vb; -	float nuevo_alto, nuevo_ancho; -	int diferencia_x, diferencia_y; +	float newHeight, newWidth;  	int factor_red[202];  	int frame_piano;  	int frame_borracho;  | 
