[Scummvm-git-logs] scummvm master -> 788467beb57271c3c9cc8c264e5afbe79e709a9d

bluegr noreply at scummvm.org
Sat May 21 20:20:27 UTC 2022


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
384da02c7f CHEWY: Clean up the GED chunk header code
788467beb5 CHEWY: Rename class members to conform to our style


Commit: 384da02c7f58185cb88a718f172c764f9c41ff50
    https://github.com/scummvm/scummvm/commit/384da02c7f58185cb88a718f172c764f9c41ff50
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-05-21T23:20:03+03:00

Commit Message:
CHEWY: Clean up the GED chunk header code

Changed paths:
  R engines/chewy/ngstypes.cpp
    engines/chewy/gedclass.cpp
    engines/chewy/gedclass.h
    engines/chewy/main.cpp
    engines/chewy/module.mk
    engines/chewy/ngstypes.h
    engines/chewy/room.cpp
    engines/chewy/room.h


diff --git a/engines/chewy/gedclass.cpp b/engines/chewy/gedclass.cpp
index c67768c92ca..f6183c1e9a1 100644
--- a/engines/chewy/gedclass.cpp
+++ b/engines/chewy/gedclass.cpp
@@ -26,7 +26,7 @@
 
 namespace Chewy {
 
-void GedClass::load_ged_pool(GedChunkHeader *Gh, int16 ch_nr, byte *speicher) {
+void GedClass::load_ged_pool(GedChunkInfo *Gh, int16 ch_nr, byte *speicher) {
 	Common::File f;
 	if (!f.open(EPISODE1_GEP))
 		error("load_ged_pool error");
@@ -35,15 +35,22 @@ void GedClass::load_ged_pool(GedChunkHeader *Gh, int16 ch_nr, byte *speicher) {
 
 	// Scan for the correct index entry
 	int i = 0;
+	uint32 length = 0;
+
 	do {
-		Gh->load(&f);
+		length = f.readUint32LE();
+
+		Gh->pos.x = f.readSint16LE();
+		Gh->pos.y = f.readSint16LE();
+		Gh->level = f.readSint16LE();
+
 		if (i != ch_nr) {
 			// Skip over the entry's data
-			f.seek(Gh->Len, SEEK_CUR);
+			f.seek(length, SEEK_CUR);
 		}
 	} while (++i <= ch_nr);
 
-	if (f.read(speicher, Gh->Len) != Gh->Len) {
+	if (f.read(speicher, length) != length) {
 		error("load_ged_chunk error");
 	}
 }
diff --git a/engines/chewy/gedclass.h b/engines/chewy/gedclass.h
index 8e9b0cebc8e..c8d4919dca2 100644
--- a/engines/chewy/gedclass.h
+++ b/engines/chewy/gedclass.h
@@ -30,7 +30,7 @@ class GedClass {
 public:
 	GedClass() {}
 
-	void load_ged_pool(GedChunkHeader *Gh, int16 ch_nr, byte *speicher);
+	void load_ged_pool(GedChunkInfo *Gh, int16 ch_nr, byte *speicher);
 
 	int16 getBarrierId(int16 x, int16 y, int16 x_anz, byte *speicher);
 	int16 getBarrierId(int16 g_idx, byte *speicher);
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 71878fc7c4e..78ff2edf83d 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -423,11 +423,11 @@ static void showWalkAreas() {
 
 	for (int y = 0, yp = ys; y < 200 / 8; ++y, yp += 8) {
 		for (int x = 0, xp = xs; x < 320 / 8; ++x, xp += 8) {
-			const int paletteId = _G(ged)->getBarrierId(xp, yp,
+			const int barrierId = _G(ged)->getBarrierId(xp, yp,
 				_G(room)->_gedXNr[_G(room_blk).AkAblage],
 				_G(ged_mem)[_G(room_blk).AkAblage]);
 
-			if (paletteId) {
+			if (barrierId) {
 				Common::Rect r(xp, yp, xp + 8, yp + 8);
 				r.translate(-_G(gameState).scrollx, -_G(gameState).scrolly);
 				r.clip(Common::Rect(0, 0, 320, 200));
@@ -507,7 +507,7 @@ void setupScreen(SetupScreenMode mode) {
 						_G(gpkt).Breite = _G(room)->_gedXNr[_G(room_blk).AkAblage];
 						_G(gpkt).Hoehe = _G(room)->_gedYNr[_G(room_blk).AkAblage];
 						_G(gpkt).Mem = _G(ged_mem)[_G(room_blk).AkAblage];
-						_G(gpkt).Ebenen = _G(room)->_gedInfo[_G(room_blk).AkAblage].Ebenen;
+						_G(gpkt).Ebenen = _G(room)->_gedInfo[_G(room_blk).AkAblage].level;
 						_G(gpkt).AkMovEbene = 1;
 						_G(mov)->goto_xy(&_G(gpkt));
 						_G(spieler_mi)[P_CHEWY].XyzStart[0] = _G(spieler_vector)[P_CHEWY].Xypos[0];
@@ -1152,7 +1152,7 @@ bool autoMove(int16 movNr, int16 playerNum) {
 			_G(gpkt).Breite = _G(room)->_gedXNr[_G(room_blk).AkAblage];
 			_G(gpkt).Hoehe = _G(room)->_gedYNr[_G(room_blk).AkAblage];
 			_G(gpkt).Mem = _G(ged_mem)[_G(room_blk).AkAblage];
-			_G(gpkt).Ebenen = _G(room)->_gedInfo[_G(room_blk).AkAblage].Ebenen;
+			_G(gpkt).Ebenen = _G(room)->_gedInfo[_G(room_blk).AkAblage].level;
 			_G(gpkt).AkMovEbene = 1;
 			_G(mov)->goto_xy(&_G(gpkt));
 
diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk
index 3b1b68bc9b7..2d64e382f42 100644
--- a/engines/chewy/module.mk
+++ b/engines/chewy/module.mk
@@ -19,7 +19,6 @@ MODULE_OBJS = \
 	menus.o \
 	metaengine.o \
 	movclass.o \
-	ngstypes.o \
 	object.o \
 	object_extra.o \
 	r_event.o \
diff --git a/engines/chewy/ngstypes.cpp b/engines/chewy/ngstypes.cpp
deleted file mode 100644
index d55497c5739..00000000000
--- a/engines/chewy/ngstypes.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#include "common/stream.h"
-#include "chewy/ngstypes.h"
-
-namespace Chewy {
-
-bool NewPhead::load(Common::SeekableReadStream *src) {
-	src->read(_id, 4);
-	_type = src->readUint16LE();
-	_poolNr = src->readUint16LE();
-
-	return true;
-}
-
-bool GedChunkHeader::load(Common::SeekableReadStream *src) {
-	Len = src->readUint32LE();
-	X = src->readSint16LE();
-	Y = src->readSint16LE();
-	Ebenen = src->readSint16LE();
-
-	return true;
-}
-
-} // namespace Chewy
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index f6c17a82592..19189efe0b5 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -39,19 +39,11 @@ struct TafSeqInfo {
 	byte **_image = nullptr;
 };
 
-struct NewPhead {
-	char _id[4] = { 0 };
-	uint16 _type = 0;
-	uint16 _poolNr = 0;
-
-	bool load(Common::SeekableReadStream *src);
-};
-
 struct MouseInfo {
 	int16 _button = 0;
 };
 
-struct musik_info {
+struct MusicInfo {
 	int16 musik_playing = 0;
 	int16 play_mode = 0;
 	int16 pattern_line = 0;
@@ -60,13 +52,9 @@ struct musik_info {
 	char *cur_pattern = nullptr;
 };
 
-struct GedChunkHeader {
-	uint32 Len = 0;
-	int16 X = 0;
-	int16 Y = 0;
-	int16 Ebenen = 0;
-
-	bool load(Common::SeekableReadStream *src);
+struct GedChunkInfo {
+	Common::Point pos = Common::Point(0, 0);
+	int16 level = 0;
 };
 
 struct CurBlk {
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index fe0f3467198..2887389b28a 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -312,8 +312,8 @@ int16 Room::load_tgp(int16 nr, RaumBlk *Rb, int16 tgp_idx, int16 mode, const cha
 
 		if (mode == GED_LOAD) {
 			_G(ged)->load_ged_pool(&_gedInfo[Rb->AkAblage], nr, _gedMem[Rb->AkAblage]);
-			_gedXNr[Rb->AkAblage] = img->width / _gedInfo[Rb->AkAblage].X;
-			_gedYNr[Rb->AkAblage] = img->height / _gedInfo[Rb->AkAblage].Y;
+			_gedXNr[Rb->AkAblage] = img->width / _gedInfo[Rb->AkAblage].pos.x;
+			_gedYNr[Rb->AkAblage] = img->height / _gedInfo[Rb->AkAblage].pos.y;
 		}
 	}
 
diff --git a/engines/chewy/room.h b/engines/chewy/room.h
index 76ceeb1d19b..a5a9e3625c5 100644
--- a/engines/chewy/room.h
+++ b/engines/chewy/room.h
@@ -96,7 +96,7 @@ public:
 
 	RaumTimer _roomTimer;
 	RoomInfo *_roomInfo;
-	GedChunkHeader _gedInfo[MAX_ABLAGE];
+	GedChunkInfo _gedInfo[MAX_ABLAGE];
 	int16 _gedXNr[MAX_ABLAGE];
 	int16 _gedYNr[MAX_ABLAGE];
 


Commit: 788467beb57271c3c9cc8c264e5afbe79e709a9d
    https://github.com/scummvm/scummvm/commit/788467beb57271c3c9cc8c264e5afbe79e709a9d
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-05-21T23:20:04+03:00

Commit Message:
CHEWY: Rename class members to conform to our style

Changed paths:
    engines/chewy/detail.cpp
    engines/chewy/dialogs/cinema.cpp
    engines/chewy/dialogs/files.cpp
    engines/chewy/dialogs/inventory.cpp
    engines/chewy/dialogs/main_menu.cpp
    engines/chewy/dialogs/options.cpp
    engines/chewy/events.cpp
    engines/chewy/inits.cpp
    engines/chewy/main.cpp
    engines/chewy/memory.cpp
    engines/chewy/menus.cpp
    engines/chewy/mouse.cpp
    engines/chewy/ngstypes.h
    engines/chewy/room.cpp
    engines/chewy/rooms/room00.cpp
    engines/chewy/rooms/room03.cpp
    engines/chewy/rooms/room04.cpp
    engines/chewy/rooms/room08.cpp
    engines/chewy/rooms/room51.cpp
    engines/chewy/rooms/room89.cpp
    engines/chewy/rooms/room97.cpp
    engines/chewy/sprite.cpp
    engines/chewy/video/video_player.cpp


diff --git a/engines/chewy/detail.cpp b/engines/chewy/detail.cpp
index 3cd8a96c387..7304cacb761 100644
--- a/engines/chewy/detail.cpp
+++ b/engines/chewy/detail.cpp
@@ -253,11 +253,11 @@ TafInfo *Detail::init_taf_tbl(const char *fname_) {
 	byte *tmp = (byte *)MALLOC((int32)nr * sizeof(byte *) + sizeof(TafInfo));
 
 	Tt = (TafInfo *)tmp;
-	Tt->_count = nr;
-	Tt->_correction = (int16 *)MALLOC((int32)Tt->_count * 2 * sizeof(int16));
-	Tt->_image = (byte **)(tmp + sizeof(TafInfo));
-	memcpy(Tt->_correction, (byte *)res->getSpriteCorrectionsTable(), Tt->_count * 2 * sizeof(int16));
-	Tt->_palette = nullptr;
+	Tt->count = nr;
+	Tt->correction = (int16 *)MALLOC((int32)Tt->count * 2 * sizeof(int16));
+	Tt->image = (byte **)(tmp + sizeof(TafInfo));
+	memcpy(Tt->correction, (byte *)res->getSpriteCorrectionsTable(), Tt->count * 2 * sizeof(int16));
+	Tt->palette = nullptr;
 
 	delete res;
 
@@ -268,19 +268,19 @@ void Detail::del_taf_tbl(TafInfo *Tt) {
 	if (!Tt) {
 		Tt = _rdi.dptr;
 	}
-	for (int16 i = 0; i < Tt->_count; i++) {
-		free(Tt->_image[i]);
+	for (int16 i = 0; i < Tt->count; i++) {
+		free(Tt->image[i]);
 	}
-	free((char *) Tt->_correction);
+	free((char *) Tt->correction);
 	free((char *) Tt);
 }
 
 void Detail::del_taf_tbl(int16 start, int16 nr, TafInfo *Tt) {
 	if (!Tt)
 		Tt = _rdi.dptr;
-	for (int16 i = start; i < start + nr && i < Tt->_count; i++) {
-		free(Tt->_image[i]);
-		Tt->_image[i] = nullptr;
+	for (int16 i = start; i < start + nr && i < Tt->count; i++) {
+		free(Tt->image[i]);
+		Tt->image[i] = nullptr;
 	}
 }
 
@@ -291,8 +291,8 @@ void Detail::load_taf_seq(int16 sprNr, int16 sprCount, TafInfo *Tt) {
 	SpriteResource *res = new SpriteResource(_tafName);
 
 	for (int16 i = 0; i < sprCount; i++) {
-		if (!Tt->_image[sprNr + i]) {
-			res->getSpriteData(sprNr + i, &Tt->_image[sprNr + i], true);
+		if (!Tt->image[sprNr + i]) {
+			res->getSpriteData(sprNr + i, &Tt->image[sprNr + i], true);
 		}
 	}
 
@@ -311,7 +311,7 @@ void Detail::showStaticSpr(int16 nr) {
 
 void Detail::setStaticPos(int16 detNr, int16 x, int16 y, bool hideFl, bool correctionFlag) {
 	if (correctionFlag) {
-		int16 *Cxy = &_rdi.dptr->_correction[_rdi.Sinfo[detNr].SprNr];
+		int16 *Cxy = &_rdi.dptr->correction[_rdi.Sinfo[detNr].SprNr];
 		x += Cxy[0];
 		y += Cxy[1];
 	}
@@ -380,7 +380,7 @@ void Detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
 		AniDetailInfo *adiptr = &_rdi.Ainfo[i];
 		if ((adiptr->start_flag) && (adiptr->start_ani != -1) && (adiptr->end_ani != -1)) {
 			int16 sprnr = adiptr->ani_count;
-			int16 *Cxy = _rdi.dptr->_correction + (sprnr << 1);
+			int16 *Cxy = _rdi.dptr->correction + (sprnr << 1);
 			int16 kx = Cxy[0];
 			int16 ky = Cxy[1];
 			if (zoomx != 0 || zoomy != 0)
@@ -391,7 +391,7 @@ void Detail::plot_ani_details(int16 scrx, int16 scry, int16 start, int16 end, in
 				load_taf_ani_sprite(sprnr);
 				_G(out)->scale_set(_tafLoadBuffer, x, y, zoomx, zoomy, 0);
 			} else
-				_G(out)->scale_set(_rdi.dptr->_image[sprnr], x, y, zoomx, zoomy, 0);
+				_G(out)->scale_set(_rdi.dptr->image[sprnr], x, y, zoomx, zoomy, 0);
 
 			Sound *sound = g_engine->_sound;
 
@@ -466,7 +466,7 @@ void Detail::plot_static_details(int16 scrx, int16 scry, int16 start, int16 end)
 		if (_rdi.Sinfo[i].SprNr != -1 && !_rdi.Sinfo[i].Hide) {
 			int16 x = _rdi.Sinfo[i].x - scrx;
 			int16 y = _rdi.Sinfo[i].y - scry;
-			byte *simage = _rdi.dptr->_image[_rdi.Sinfo[i].SprNr];
+			byte *simage = _rdi.dptr->image[_rdi.Sinfo[i].SprNr];
 			_G(out)->spriteSet(simage, x, y, 0);
 		}
 	}
@@ -525,9 +525,9 @@ SprInfo Detail::plot_detail_sprite(int16 scrx, int16 scry, int16 det_nr, int16 s
 		spr_nr = adiptr->start_ani;
 	if (spr_nr > adiptr->end_ani)
 		spr_nr = adiptr->end_ani - 1;
-	int16 *Cxy = &_rdi.dptr->_correction[spr_nr << 1];
-	int16 *Xy = (int16 *)_rdi.dptr->_image[spr_nr];
-	_sprInfo._image = _rdi.dptr->_image[spr_nr];
+	int16 *Cxy = &_rdi.dptr->correction[spr_nr << 1];
+	int16 *Xy = (int16 *)_rdi.dptr->image[spr_nr];
+	_sprInfo._image = _rdi.dptr->image[spr_nr];
 	_sprInfo._x = adiptr->x + Cxy[0] - scrx;
 	_sprInfo._y = adiptr->y + Cxy[1] - scry;
 	_sprInfo.X1 = _sprInfo._x + Xy[0];
@@ -667,14 +667,14 @@ int16 Detail::mouse_on_detail(int16 mouse_x, int16 mouse_y, int16 scrx, int16 sc
 		AniDetailInfo *adiptr = &_rdi.Ainfo[i];
 		if ((adiptr->start_flag) && (adiptr->start_ani != -1) && (adiptr->end_ani != -1)) {
 			int16 sprnr = adiptr->ani_count;
-			int16 *Cxy = _rdi.dptr->_correction + (sprnr << 1);
+			int16 *Cxy = _rdi.dptr->correction + (sprnr << 1);
 			int16 x = adiptr->x + Cxy[0] - scrx;
 			int16 y = adiptr->y + Cxy[1] - scry;
 			int16 *Xy;
 			if (adiptr->load_flag == 1) {
 				Xy = (int16 *)_tafLoadBuffer;
 			} else {
-				Xy = (int16 *)_rdi.dptr->_image[sprnr];
+				Xy = (int16 *)_rdi.dptr->image[sprnr];
 			}
 			if (mouse_x >= x && mouse_x <= x + Xy[0] &&
 			        mouse_y >= y && mouse_y <= y + Xy[1]) {
diff --git a/engines/chewy/dialogs/cinema.cpp b/engines/chewy/dialogs/cinema.cpp
index a5fd2ae8281..cbc409467fd 100644
--- a/engines/chewy/dialogs/cinema.cpp
+++ b/engines/chewy/dialogs/cinema.cpp
@@ -88,7 +88,7 @@ void Cinema::execute() {
 			_G(out)->printxy(40, 68, 14, 300, _G(scr_width), cutsceneName.c_str());
 		}
 
-		if (_G(minfo)._button == 1 && !flag) {
+		if (_G(minfo).button == 1 && !flag) {
 			flag = true;
 			switch (_G(in)->findHotspot(cinematicsHotspots)) {
 			case 0:
@@ -117,10 +117,10 @@ void Cinema::execute() {
 			default:
 				break;
 			}
-		} else if (_G(minfo)._button == 2 && !flag) {
+		} else if (_G(minfo).button == 2 && !flag) {
 			g_events->_kbInfo._scanCode = Common::KEYCODE_ESCAPE;
 			flag = true;
-		} else if (_G(minfo)._button != 1) {
+		} else if (_G(minfo).button != 1) {
 			flag = false;
 			delay = 0;
 		} else if (flag) {
@@ -179,7 +179,7 @@ void Cinema::execute() {
 
 		// The below are hacks to get the dialog to work in ScummVM
 		g_events->_kbInfo._scanCode = 0;
-		_G(minfo)._button = 0;
+		_G(minfo).button = 0;
 		txt_anz = 0;
 
 		if (!txt_anz) {
diff --git a/engines/chewy/dialogs/files.cpp b/engines/chewy/dialogs/files.cpp
index 102da2fde1c..b919627d4cf 100644
--- a/engines/chewy/dialogs/files.cpp
+++ b/engines/chewy/dialogs/files.cpp
@@ -107,12 +107,12 @@ bool Files::execute(bool isInGame) {
 				if (!mode[j])
 					// Not pressed
 					_G(out)->spriteSet(
-						ti->_image[i], 16 + ti->_correction[i << 1] + pt[j].x,
-						76 + ti->_correction[(i << 1) + 1] + pt[j].y, 0);
+						ti->image[i], 16 + ti->correction[i << 1] + pt[j].x,
+						76 + ti->correction[(i << 1) + 1] + pt[j].y, 0);
 				else
 					// Pressed
-					_G(out)->spriteSet(ti->_image[i], 16 + ti->_correction[i << 1],
-						76 + ti->_correction[(i << 1) + 1], 0);
+					_G(out)->spriteSet(ti->image[i], 16 + ti->correction[i << 1],
+						76 + ti->correction[(i << 1) + 1], 0);
 			}
 		}
 
@@ -170,7 +170,7 @@ bool Files::execute(bool isInGame) {
 			Dialogs::Options::execute(ti);
 		}
 
-		if (!flag && _G(minfo)._button == 1) {
+		if (!flag && _G(minfo).button == 1) {
 			int16 rect = _G(in)->findHotspot(fileHotspots);
 			flag = true;
 			key = 0;
@@ -215,7 +215,7 @@ bool Files::execute(bool isInGame) {
 				break;
 			}
 
-		} else if (flag && _G(minfo)._button == 0) {
+		} else if (flag && _G(minfo).button == 0) {
 			flag = false;
 		}
 
diff --git a/engines/chewy/dialogs/inventory.cpp b/engines/chewy/dialogs/inventory.cpp
index f667d3acff8..31b52316d29 100644
--- a/engines/chewy/dialogs/inventory.cpp
+++ b/engines/chewy/dialogs/inventory.cpp
@@ -100,12 +100,12 @@ void Inventory::plot_menu() {
 			y = 3;
 		else
 			y = 0;
-		_G(out)->spriteSet(_G(curtaf)->_image[_G(ani_count)[i]],
+		_G(out)->spriteSet(_G(curtaf)->image[_G(ani_count)[i]],
 			WIN_INF_X + 8 + i * 32, WIN_INF_Y + 12 - y, _G(scr_width));
 	}
 
 	for (int16 i = 0; i < 2; i++) {
-		_G(out)->spriteSet(_G(menutaf)->_image[PFEIL_UP + i],
+		_G(out)->spriteSet(_G(menutaf)->image[PFEIL_UP + i],
 			WIN_INF_X + 200 + i * 40, WIN_INF_Y + 12, _G(scr_width));
 	}
 
@@ -163,9 +163,9 @@ void Inventory::menu() {
 	_G(show_invent_menu) = 1;
 
 	while (_G(show_invent_menu) == 1 && !SHOULD_QUIT) {
-		if (!_G(minfo)._button)
+		if (!_G(minfo).button)
 			mouseFl = false;
-		if (_G(minfo)._button == 1 || g_events->_kbInfo._keyCode == Common::KEYCODE_RETURN || keyVal) {
+		if (_G(minfo).button == 1 || g_events->_kbInfo._keyCode == Common::KEYCODE_RETURN || keyVal) {
 			if (!mouseFl) {
 				mouseFl = true;
 				g_events->_kbInfo._keyCode = '\0';
@@ -248,7 +248,7 @@ void Inventory::menu() {
 					break;
 				}
 			}
-		} else if (_G(minfo)._button == 2 || g_events->_kbInfo._keyCode == Common::KEYCODE_ESCAPE) {
+		} else if (_G(minfo).button == 2 || g_events->_kbInfo._keyCode == Common::KEYCODE_ESCAPE) {
 			if (!mouseFl) {
 				// Set virtual key
 				_G(in)->_hotkey = Common::KEYCODE_ESCAPE;
@@ -266,7 +266,7 @@ void Inventory::menu() {
 		} else if (ret_look == 5) {
 			taste_flag = false;
 			mouseFl = false;
-			_G(minfo)._button = 1;
+			_G(minfo).button = 1;
 			keyVal = Common::KEYCODE_RETURN;
 		}
 
@@ -369,7 +369,7 @@ void Inventory::menu() {
 	_G(cur)->move(_G(maus_old_x), _G(maus_old_y));
 	g_events->_mousePos.x = _G(maus_old_x);
 	g_events->_mousePos.y = _G(maus_old_y);
-	_G(minfo)._button = 0;
+	_G(minfo).button = 0;
 
 	while (_G(in)->getSwitchCode() == Common::KEYCODE_ESCAPE && !SHOULD_QUIT) {
 		setupScreen(NO_SETUP);
@@ -425,11 +425,11 @@ int16 Inventory::look(int16 invent_nr, int16 mode, int16 ats_nr) {
 	while (!endLoop) {
 		int16 rect = _G(in)->findHotspot(inventoryHotspots);
 
-		if (_G(minfo)._button) {
-			if (_G(minfo)._button == 2) {
+		if (_G(minfo).button) {
+			if (_G(minfo).button == 2) {
 				if (!mouseFl)
 					g_events->_kbInfo._scanCode = Common::KEYCODE_ESCAPE;
-			} else if (_G(minfo)._button == 1) {
+			} else if (_G(minfo).button == 1) {
 				if (!mouseFl) {
 					switch (rect) {
 					case 0:
diff --git a/engines/chewy/dialogs/main_menu.cpp b/engines/chewy/dialogs/main_menu.cpp
index 9c088687dde..23fe8919e0b 100644
--- a/engines/chewy/dialogs/main_menu.cpp
+++ b/engines/chewy/dialogs/main_menu.cpp
@@ -133,7 +133,7 @@ void MainMenu::execute() {
 void MainMenu::screenFunc() {
 	int vec = _G(det)->maus_vector(g_events->_mousePos.x + _G(gameState).scrollx, g_events->_mousePos.y + _G(gameState).scrolly);
 
-	if (_G(in)->getSwitchCode() == 28 || _G(minfo)._button == 1) {
+	if (_G(in)->getSwitchCode() == 28 || _G(minfo).button == 1) {
 		_selection = vec;
 	}
 }
diff --git a/engines/chewy/dialogs/options.cpp b/engines/chewy/dialogs/options.cpp
index 7d6828e79a3..81062273cb9 100644
--- a/engines/chewy/dialogs/options.cpp
+++ b/engines/chewy/dialogs/options.cpp
@@ -91,27 +91,27 @@ void Options::execute(TafInfo *ti) {
 			warning("stop_clock = (clock() / CLK_TCK) + 1;");
 		}
 
-		_G(out)->spriteSet(ti->_image[surimy_ani], 18 + ti->_correction[surimy_ani << 1],
-			8 + ti->_correction[(surimy_ani << 1) + 1], 0);
+		_G(out)->spriteSet(ti->image[surimy_ani], 18 + ti->correction[surimy_ani << 1],
+			8 + ti->correction[(surimy_ani << 1) + 1], 0);
 		short bar_off = (_G(gameState).FramesPerSecond - 6) * 16;
 		_G(out)->boxFill(33 + bar_off, 65, 33 + 17 + bar_off, 65 + 8, 0);
 		Common::String fps = Common::String::format("%d", _G(gameState).FramesPerSecond << 1);
 		_G(out)->printxy(36 + bar_off, 65, 255, 300, 0, fps.c_str());
 
 		if (g_engine->_sound->soundEnabled()) {
-			_G(out)->spriteSet(ti->_image[mund_ani],
-				18 + ti->_correction[mund_ani << 1],
-				8 + ti->_correction[(mund_ani << 1) + 1], 0);
-			_G(out)->spriteSet(ti->_image[SCHNULL_OFF],
-				18 + ti->_correction[SCHNULL_OFF << 1],
-				8 + ti->_correction[(SCHNULL_OFF << 1) + 1], 0);
+			_G(out)->spriteSet(ti->image[mund_ani],
+				18 + ti->correction[mund_ani << 1],
+				8 + ti->correction[(mund_ani << 1) + 1], 0);
+			_G(out)->spriteSet(ti->image[SCHNULL_OFF],
+				18 + ti->correction[SCHNULL_OFF << 1],
+				8 + ti->correction[(SCHNULL_OFF << 1) + 1], 0);
 		} else {
-			_G(out)->spriteSet(ti->_image[SCHNULLER],
-				18 + ti->_correction[SCHNULLER << 1],
-				8 + ti->_correction[(SCHNULLER << 1) + 1], 0);
-			_G(out)->spriteSet(ti->_image[SCHNULL_BAND],
-				18 + ti->_correction[SCHNULL_BAND << 1],
-				8 + ti->_correction[(SCHNULL_BAND << 1) + 1], 0);
+			_G(out)->spriteSet(ti->image[SCHNULLER],
+				18 + ti->correction[SCHNULLER << 1],
+				8 + ti->correction[(SCHNULLER << 1) + 1], 0);
+			_G(out)->spriteSet(ti->image[SCHNULL_BAND],
+				18 + ti->correction[SCHNULL_BAND << 1],
+				8 + ti->correction[(SCHNULL_BAND << 1) + 1], 0);
 		}
 		_G(out)->pop_box(32 - 2, 104 - 12, 42 + 4, 136 + 2, 192, 183, 182);
 		_G(out)->printxy(32 + 3, 104 - 10, 15, 300, 0, "S");
@@ -121,35 +121,35 @@ void Options::execute(TafInfo *ti) {
 		_G(out)->printxy(52 + 3, 104 - 10, 31, 300, 0, "M");
 		_G(out)->boxFill(53, 136 - (_G(gameState).MusicVol >> 1), 62, 136, 31);
 		if (g_engine->_sound->musicEnabled()) {
-			_G(out)->spriteSet(ti->_image[MUSIC_ON1],
-				18 + ti->_correction[MUSIC_ON1 << 1],
-				8 + ti->_correction[(MUSIC_ON1 << 1) + 1], 0);
-			_G(out)->spriteSet(ti->_image[MUSIC_ON2],
-				18 + ti->_correction[MUSIC_ON2 << 1],
-				8 + ti->_correction[(MUSIC_ON2 << 1) + 1], 0);
+			_G(out)->spriteSet(ti->image[MUSIC_ON1],
+				18 + ti->correction[MUSIC_ON1 << 1],
+				8 + ti->correction[(MUSIC_ON1 << 1) + 1], 0);
+			_G(out)->spriteSet(ti->image[MUSIC_ON2],
+				18 + ti->correction[MUSIC_ON2 << 1],
+				8 + ti->correction[(MUSIC_ON2 << 1) + 1], 0);
 		} else
-			_G(out)->spriteSet(ti->_image[MUSIC_OFF],
-				18 + ti->_correction[MUSIC_OFF << 1],
-				8 + ti->_correction[(MUSIC_OFF << 1) + 1], 0);
+			_G(out)->spriteSet(ti->image[MUSIC_OFF],
+				18 + ti->correction[MUSIC_OFF << 1],
+				8 + ti->correction[(MUSIC_OFF << 1) + 1], 0);
 
 		if (g_engine->_sound->subtitlesEnabled()) {
-			_G(out)->spriteSet(ti->_image[tdisp_ani],
-				18 + ti->_correction[tdisp_ani << 1],
-				8 + ti->_correction[(tdisp_ani << 1) + 1], 0);
-			_G(out)->spriteSet(ti->_image[TDISP_EIN],
-				18 + ti->_correction[TDISP_EIN << 1],
-				8 + ti->_correction[(TDISP_EIN << 1) + 1], 0);
+			_G(out)->spriteSet(ti->image[tdisp_ani],
+				18 + ti->correction[tdisp_ani << 1],
+				8 + ti->correction[(tdisp_ani << 1) + 1], 0);
+			_G(out)->spriteSet(ti->image[TDISP_EIN],
+				18 + ti->correction[TDISP_EIN << 1],
+				8 + ti->correction[(TDISP_EIN << 1) + 1], 0);
 		} else
-			_G(out)->spriteSet(ti->_image[TDISP_AUS],
-				18 + ti->_correction[TDISP_AUS << 1],
-				8 + ti->_correction[(TDISP_AUS << 1) + 1], 0);
+			_G(out)->spriteSet(ti->image[TDISP_AUS],
+				18 + ti->correction[TDISP_AUS << 1],
+				8 + ti->correction[(TDISP_AUS << 1) + 1], 0);
 
-		_G(out)->spriteSet(ti->_image[EXIT],
-			18 + ti->_correction[EXIT << 1],
-			8 + ti->_correction[(EXIT << 1) + 1], 0);
+		_G(out)->spriteSet(ti->image[EXIT],
+			18 + ti->correction[EXIT << 1],
+			8 + ti->correction[(EXIT << 1) + 1], 0);
 
 		key = _G(in)->getSwitchCode();
-		if ((_G(minfo)._button == 1) || (key == Common::KEYCODE_RETURN)) {
+		if ((_G(minfo).button == 1) || (key == Common::KEYCODE_RETURN)) {
 			WAIT_TASTE_LOS
 
 			int16 rect = _G(in)->findHotspot(optionHotspots);
@@ -206,7 +206,7 @@ void Options::execute(TafInfo *ti) {
 			default:
 				break;
 			}
-			_G(minfo)._button = 0;
+			_G(minfo).button = 0;
 		}
 		switch (key) {
 
diff --git a/engines/chewy/events.cpp b/engines/chewy/events.cpp
index c6ff6287f61..1c7c42e6ea8 100644
--- a/engines/chewy/events.cpp
+++ b/engines/chewy/events.cpp
@@ -88,15 +88,15 @@ void EventsManager::handleMouseEvent(const Common::Event &event) {
 
 	// Different event types handling
 	if (event.type != Common::EVENT_MOUSEMOVE)
-		_G(minfo)._button = 0;
+		_G(minfo).button = 0;
 
 	switch (event.type) {
 	case Common::EVENT_LBUTTONUP:
-		_G(minfo)._button = 1;
+		_G(minfo).button = 1;
 		break;
 
 	case Common::EVENT_RBUTTONUP:
-		_G(minfo)._button = 2;
+		_G(minfo).button = 2;
 		break;
 
 	case Common::EVENT_WHEELUP:
@@ -165,7 +165,7 @@ void EventsManager::clearEvents() {
 
 	_kbInfo._scanCode = Common::KEYCODE_INVALID;
 	_kbInfo._keyCode = '\0';
-	_G(minfo)._button = 0;
+	_G(minfo).button = 0;
 }
 
 void EventsManager::update() {
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index f035b6c676c..5a7dc8f8d90 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -56,7 +56,7 @@ void standard_init() {
 	// uses _G(curtaf)->_image below before _G(curtaf) was initialized
 	_G(curtaf) = _G(mem)->taf_adr(CURSOR_TAF);
 
-	_G(curblk).sprite = _G(curtaf)->_image;
+	_G(curblk).sprite = _G(curtaf)->image;
 	
 	_G(cur) = new Cursor(&_G(curblk));
 	_G(cur)->setAnimation(0, 0, 0);
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 78ff2edf83d..5f20523ce4e 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -71,8 +71,8 @@ void game_main() {
 void alloc_buffers() {
 	_G(workpage) = (byte *)MALLOC(64004l);
 	_G(pal) = (byte *)MALLOC(768l);
-	_G(Ci).TempArea = (byte *)MALLOC(64004l);
-	_G(det)->set_taf_ani_mem(_G(Ci).TempArea);
+	_G(Ci).tempArea = (byte *)MALLOC(64004l);
+	_G(det)->set_taf_ani_mem(_G(Ci).tempArea);
 }
 
 void free_buffers() {
@@ -85,7 +85,7 @@ void free_buffers() {
 	free((char *)_G(chewy));
 
 	free((char *)_G(curtaf));
-	free(_G(Ci).TempArea);
+	free(_G(Ci).tempArea);
 	free(_G(pal));
 	free(_G(workpage));
 }
@@ -95,7 +95,7 @@ void cursorChoice(int16 nr) {
 	int16 delay = -1;
 
 	if (nr != CUR_USER) {
-		_G(curblk).sprite = _G(curtaf)->_image;
+		_G(curblk).sprite = _G(curtaf)->image;
 		delay = (1 + _G(gameState).DelaySpeed) * 5;
 	}
 	switch (nr) {
@@ -563,7 +563,7 @@ void setupScreen(SetupScreenMode mode) {
 			_G(cur)->plot_cur();
 
 			if ((_G(gameState).inv_cur) && (_G(flags).CursorStatus == true))
-				_G(out)->spriteSet(_G(curtaf)->_image[_G(pfeil_ani) + 32], g_events->_mousePos.x, g_events->_mousePos.y,
+				_G(out)->spriteSet(_G(curtaf)->image[_G(pfeil_ani) + 32], g_events->_mousePos.x, g_events->_mousePos.y,
 				                _G(scr_width));
 			if (_G(pfeil_delay) == 0) {
 				_G(pfeil_delay) = _G(gameState).DelaySpeed;
@@ -797,13 +797,13 @@ void mouseAction() {
 		_G(inv_disp_ok) = false;
 	}
 	if (_G(atds)->aadGetStatus() == -1) {
-		if (_G(minfo)._button || g_events->_kbInfo._keyCode == Common::KEYCODE_ESCAPE || g_events->_kbInfo._keyCode == Common::KEYCODE_RETURN) {
+		if (_G(minfo).button || g_events->_kbInfo._keyCode == Common::KEYCODE_ESCAPE || g_events->_kbInfo._keyCode == Common::KEYCODE_RETURN) {
 
-			if (_G(minfo)._button == 2 || g_events->_kbInfo._keyCode == Common::KEYCODE_ESCAPE) {
+			if (_G(minfo).button == 2 || g_events->_kbInfo._keyCode == Common::KEYCODE_ESCAPE) {
 				if (!_G(flags).mainMouseFlag) {
 					g_events->_kbInfo._scanCode = Common::KEYCODE_ESCAPE;
 				}
-			} else if (_G(minfo)._button == 1 || g_events->_kbInfo._keyCode == Common::KEYCODE_RETURN) {
+			} else if (_G(minfo).button == 1 || g_events->_kbInfo._keyCode == Common::KEYCODE_RETURN) {
 				if (!_G(flags).mainMouseFlag) {
 					if (_G(menu_display) == MENU_DISPLAY)
 						g_events->_kbInfo._scanCode = Common::KEYCODE_RETURN;
@@ -1412,21 +1412,21 @@ int16 is_mouse_person(int16 x, int16 y) {
 				if (!_G(spz_ani)[i]) {
 					switch (i) {
 					case P_CHEWY:
-						xy = (int16 *)_G(chewy)->_image[_G(chewy_ph)[_G(spieler_vector)[P_CHEWY].Phase * 8 + _G(spieler_vector)[P_CHEWY].PhNr]];
+						xy = (int16 *)_G(chewy)->image[_G(chewy_ph)[_G(spieler_vector)[P_CHEWY].Phase * 8 + _G(spieler_vector)[P_CHEWY].PhNr]];
 						break;
 
 					case P_HOWARD:
 					case P_NICHELLE:
 						if (_G(gameState)._personRoomNr[i] != _G(gameState)._personRoomNr[P_CHEWY])
 							check = false;
-						xy = (int16 *)_G(PersonTaf)[i]->_image[_G(PersonSpr)[i][_G(spieler_vector)[i].PhNr]];
+						xy = (int16 *)_G(PersonTaf)[i]->image[_G(PersonSpr)[i][_G(spieler_vector)[i].PhNr]];
 						break;
 
 					default:
 						break;
 					}
 				} else
-					xy = (int16 *)_G(spz_tinfo)->_image[_G(spz_spr_nr)[_G(spieler_vector)[i].PhNr]];
+					xy = (int16 *)_G(spz_tinfo)->image[_G(spz_spr_nr)[_G(spieler_vector)[i].PhNr]];
 				if (check) {
 					if (x + _G(gameState).scrollx >= _G(spieler_vector)[i].Xypos[0] &&
 					        x + _G(gameState).scrollx <= _G(spieler_vector)[i].Xypos[0] + xy[0] + _G(spieler_vector)[i].Xzoom &&
diff --git a/engines/chewy/memory.cpp b/engines/chewy/memory.cpp
index 17c1db0de39..24be5e55a90 100644
--- a/engines/chewy/memory.cpp
+++ b/engines/chewy/memory.cpp
@@ -35,19 +35,19 @@ TafInfo *Memory::taf_adr(const char *filename) {
 
 	byte *tmp1 = (byte *)MALLOC(size + PALETTE_SIZE + kgroesse);
 	TafInfo *tinfo = (TafInfo *)tmp1;
-	tinfo->_image = (byte **)(tmp1 + sizeof(TafInfo));
-	tinfo->_palette = tmp1 + size;
-	tinfo->_count = imageCount;
-	memcpy(tinfo->_palette, res->getSpritePalette(), PALETTE_SIZE);
+	tinfo->image = (byte **)(tmp1 + sizeof(TafInfo));
+	tinfo->palette = tmp1 + size;
+	tinfo->count = imageCount;
+	memcpy(tinfo->palette, res->getSpritePalette(), PALETTE_SIZE);
 	byte *imgPtr = tmp1 + sizeof(TafInfo) + kgroesse;
 
 	for (int i = 0; i < imageCount; i++) {
-		tinfo->_image[i] = imgPtr;
-		imgPtr += res->getSpriteData(i, &tinfo->_image[i], false);
+		tinfo->image[i] = imgPtr;
+		imgPtr += res->getSpriteData(i, &tinfo->image[i], false);
 	}
 
-	tinfo->_correction = (int16 *)(tmp1 + (size + 768l));
-	memcpy(tinfo->_correction, res->getSpriteCorrectionsTable(), imageCount * 2 * sizeof(int16));
+	tinfo->correction = (int16 *)(tmp1 + (size + 768l));
+	memcpy(tinfo->correction, res->getSpriteCorrectionsTable(), imageCount * 2 * sizeof(int16));
 
 	delete res;
 
@@ -71,18 +71,18 @@ TafSeqInfo *Memory::taf_seq_adr(int16 image_start, int16 image_anz) {
 
 	byte *tmp1 = (byte *)MALLOC(size + image_anz * sizeof(byte *));
 	ts_info = (TafSeqInfo *)tmp1;
-	ts_info->_count = image_anz;
-	ts_info->_image = (byte **)(tmp1 + sizeof(TafSeqInfo));
-	ts_info->_correction = (int16 *)(tmp1 + size);
+	ts_info->count = image_anz;
+	ts_info->image = (byte **)(tmp1 + sizeof(TafSeqInfo));
+	ts_info->correction = (int16 *)(tmp1 + size);
 	byte *sp_ptr = tmp1 + (((uint32)sizeof(TafSeqInfo)) + (image_anz * sizeof(char *)));
 
 	for (int16 i = 0; i < image_anz; i++) {
-		ts_info->_image[i] = sp_ptr;
-		sp_ptr += res->getSpriteData(i + image_start, &ts_info->_image[i], false);
+		ts_info->image[i] = sp_ptr;
+		sp_ptr += res->getSpriteData(i + image_start, &ts_info->image[i], false);
 	}
 
 	uint16 *correctionsTable = res->getSpriteCorrectionsTable() + image_start * 2;
-	memcpy(ts_info->_correction, correctionsTable, image_anz * 2 * sizeof(int16));
+	memcpy(ts_info->correction, correctionsTable, image_anz * 2 * sizeof(int16));
 
 	delete res;
 
diff --git a/engines/chewy/menus.cpp b/engines/chewy/menus.cpp
index fa278b19d25..23cfab1ea82 100644
--- a/engines/chewy/menus.cpp
+++ b/engines/chewy/menus.cpp
@@ -48,7 +48,7 @@ void plotMainMenu() {
 	const int16 x = MAX(g_events->_mousePos.x - 32, 0);
 	_G(menu_item) = (x / (MOUSE_MENU_MAX_X / 5));
 
-	int16 *correction = (int16 *)_G(menutaf)->_correction;
+	int16 *correction = (int16 *)_G(menutaf)->correction;
 
 	for (int16 i = MENU_START_SPRITE; i < MAX_MENU_SPRITE; i++) {
 		int deltaX = 0;
@@ -66,7 +66,7 @@ void plotMainMenu() {
 				deltaX = -40;
 		}
 
-		_G(out)->scale_set(_G(menutaf)->_image[i],
+		_G(out)->scale_set(_G(menutaf)->image[i],
 			MENU_X + deltaX + correction[i * 2],
 		    _G(gameState).MainMenuY + correction[i * 2 + 1],
 			zoomX, zoomY, 0);
@@ -83,7 +83,7 @@ void plotMainMenu() {
 			deltaX = 40;
 
 		int img = IMAGES[_G(menu_item)];
-		_G(out)->scale_set(_G(menutaf)->_image[img],
+		_G(out)->scale_set(_G(menutaf)->image[img],
 		    MENU_X + deltaX + correction[img * 2] - 5,
 		    _G(gameState).MainMenuY + correction[img * 2 + 1] - 10,
 			zoomX, zoomY, 0);
@@ -166,14 +166,14 @@ void buildMenu(int16 x, int16 y, int16 xNr, int16 yNr, int16 col, int16 mode) {
 	xy[3][1] = y + 16 * (yNr - 1);
 
 	for (i = 0; i < 4; i++)
-		_G(out)->spriteSet(_G(menutaf)->_image[(int16)spriteCornerNr[i]],
+		_G(out)->spriteSet(_G(menutaf)->image[(int16)spriteCornerNr[i]],
 		                 xy[i][0], xy[i][1], _G(scr_width));
 
 	int16 s_nr = BUILDING_MENU_SIDE_L;
 	for (j = 0; j < 2; j++) {
 		y = xy[j][1] + 16;
 		for (i = 0; i < yNr - 2; i++) {
-			_G(out)->spriteSet(_G(menutaf)->_image[s_nr], xy[j][0], y + i * 16, _G(scr_width));
+			_G(out)->spriteSet(_G(menutaf)->image[s_nr], xy[j][0], y + i * 16, _G(scr_width));
 		}
 		++s_nr;
 	}
@@ -183,7 +183,7 @@ void buildMenu(int16 x, int16 y, int16 xNr, int16 yNr, int16 col, int16 mode) {
 		x = xy[j * 2][0] + 16;
 		if ((!mode) || (mode == 1 && j == 1)) {
 			for (i = 0; i < xNr - 2; i++) {
-				_G(out)->spriteSet(_G(menutaf)->_image[s_nr], x + i * 16, xy[j * 2][1], _G(scr_width));
+				_G(out)->spriteSet(_G(menutaf)->image[s_nr], x + i * 16, xy[j * 2][1], _G(scr_width));
 			}
 		}
 		s_nr -= 3;
@@ -208,15 +208,15 @@ void buildMenu(int16 x, int16 y, int16 xNr, int16 yNr, int16 col, int16 mode) {
 		x = xy[0][0] + 16;
 		for (j = 0; j < 2; j++) {
 			for (i = 0; i < leer; i++)
-				_G(out)->spriteSet(_G(menutaf)->_image[BUILDING_MENU_ABOVE], x + i * 16, xy[0][1], _G(scr_width));
+				_G(out)->spriteSet(_G(menutaf)->image[BUILDING_MENU_ABOVE], x + i * 16, xy[0][1], _G(scr_width));
 			x = xy[1][0] - leer * 16;
 		}
-		_G(out)->spriteSet(_G(menutaf)->_image[BUILDING_MENU_ABOVE_L], xy[0][0] + 16 + leer * 16, xy[0][1], _G(scr_width));
+		_G(out)->spriteSet(_G(menutaf)->image[BUILDING_MENU_ABOVE_L], xy[0][0] + 16 + leer * 16, xy[0][1], _G(scr_width));
 
 		x = xy[0][0] + 16 + leer * 16 + 32;
 		for (i = 0; i < center; i++)
-			_G(out)->spriteSet(_G(menutaf)->_image[BUILDING_MENU_ABOVE_M], x + i * 16, xy[0][1], _G(scr_width));
-		_G(out)->spriteSet(_G(menutaf)->_image[BUILDING_MENU_ABOVE_R], x + i * 16, xy[0][1], _G(scr_width));
+			_G(out)->spriteSet(_G(menutaf)->image[BUILDING_MENU_ABOVE_M], x + i * 16, xy[0][1], _G(scr_width));
+		_G(out)->spriteSet(_G(menutaf)->image[BUILDING_MENU_ABOVE_R], x + i * 16, xy[0][1], _G(scr_width));
 	}
 
 	_G(out)->boxFill(xy[0][0] + 16, xy[0][1] + 16, xy[0][0] + 16 + (xNr - 2) * 16, xy[0][1] + 16 + (yNr - 2) * 16, col);
@@ -325,7 +325,7 @@ void stop_ads_dialog() {
 	_G(flags).AdsDialog = false;
 	_G(mouseLeftClick) = false;
 	_G(atds)->stop_ads();
-	if (_G(minfo)._button)
+	if (_G(minfo).button)
 		_G(flags).mainMouseFlag = 1;
 }
 
diff --git a/engines/chewy/mouse.cpp b/engines/chewy/mouse.cpp
index 795f94f6d7d..3b621b618e0 100644
--- a/engines/chewy/mouse.cpp
+++ b/engines/chewy/mouse.cpp
@@ -50,11 +50,11 @@ int16 InputMgr::findHotspot(const Common::Rect *hotspots) {
 int16 InputMgr::getSwitchCode() {
 	int16 switch_code = 0;
 
-	if (_G(minfo)._button == 2) {
+	if (_G(minfo).button == 2) {
 		switch_code = Common::KEYCODE_ESCAPE;
-	} else if (_G(minfo)._button == 1)
+	} else if (_G(minfo).button == 1)
 		switch_code = MOUSE_LEFT;
-	else if (_G(minfo)._button == 4)
+	else if (_G(minfo).button == 4)
 		switch_code = MOUSE_CENTER;
 
 	if (g_events->_kbInfo._keyCode != 0)
diff --git a/engines/chewy/ngstypes.h b/engines/chewy/ngstypes.h
index 19189efe0b5..ef7db2c61a8 100644
--- a/engines/chewy/ngstypes.h
+++ b/engines/chewy/ngstypes.h
@@ -27,24 +27,24 @@
 namespace Chewy {
 
 struct TafInfo {
-	int16 _count = 0;
-	byte *_palette = nullptr;
-	int16 *_correction = nullptr;
-	byte **_image = nullptr;
+	int16 count = 0;
+	byte *palette = nullptr;
+	int16 *correction = nullptr;
+	byte **image = nullptr;
 };
 
 struct TafSeqInfo {
-	int16 _count = 0;
-	int16 *_correction = nullptr;
-	byte **_image = nullptr;
+	int16 count = 0;
+	int16 *correction = nullptr;
+	byte **image = nullptr;
 };
 
 struct MouseInfo {
-	int16 _button = 0;
+	int16 button = 0;
 };
 
 struct MusicInfo {
-	int16 musik_playing = 0;
+	int16 playing = 0;
 	int16 play_mode = 0;
 	int16 pattern_line = 0;
 	int16 sequence_pos = 0;
@@ -62,7 +62,7 @@ struct CurBlk {
 };
 
 struct CustomInfo {
-	byte *TempArea = 0;
+	byte *tempArea = 0;
 };
 
 } // namespace Chewy
diff --git a/engines/chewy/room.cpp b/engines/chewy/room.cpp
index 2887389b28a..cd6fc4c96d3 100644
--- a/engines/chewy/room.cpp
+++ b/engines/chewy/room.cpp
@@ -168,8 +168,8 @@ void Room::loadRoom(RaumBlk *Rb, int16 room_nr, GameState *player) {
 	if (_roomInfo->_tafLoad != 255) {
 		_G(det)->load_rdi_taf(_roomInfo->_tafName, _roomInfo->_tafLoad);
 		Rb->Fti = _G(det)->get_taf_info();
-		Rb->_detImage = Rb->Fti->_image;
-		Rb->DetKorrekt = Rb->Fti->_correction;
+		Rb->_detImage = Rb->Fti->image;
+		Rb->DetKorrekt = Rb->Fti->correction;
 	}
 	_G(obj)->calc_all_static_detail();
 	load_tgp(_roomInfo->_imageNr, Rb, EPISODE1_TGP, GED_LOAD, EPISODE1);
@@ -517,7 +517,7 @@ void load_chewy_taf(int16 taf_nr) {
 			_G(gameState).ChewyAni = taf_nr;
 			_G(AkChewyTaf) = taf_nr;
 			_G(chewy) = _G(mem)->taf_adr(filename);
-			_G(chewy_kor) = _G(chewy)->_correction;
+			_G(chewy_kor) = _G(chewy)->correction;
 		}
 	}
 }
diff --git a/engines/chewy/rooms/room00.cpp b/engines/chewy/rooms/room00.cpp
index a85509f76bb..b1c4aa8d6d4 100644
--- a/engines/chewy/rooms/room00.cpp
+++ b/engines/chewy/rooms/room00.cpp
@@ -300,7 +300,7 @@ void Room0::eyeWait() {
 
 void Room0::calcEyeClick(int16 aniNr) {
 	if (mouse_on_prog_ani() == aniNr) {
-		if (_G(minfo)._button != 1 && g_events->_kbInfo._keyCode != Common::KEYCODE_RETURN) {
+		if (_G(minfo).button != 1 && g_events->_kbInfo._keyCode != Common::KEYCODE_RETURN) {
 			const uint8 roomNum = _G(room)->_roomInfo->_roomNr;
 			Common::StringArray desc = _G(atds)->getTextArray(roomNum, 172, ATS_DATA);
 			if (desc.size() > 0) {
@@ -311,7 +311,7 @@ void Room0::calcEyeClick(int16 aniNr) {
 				for (int16 i = 0; i < (int16)desc.size(); i++)
 					printShadowed(x, y + i * 10, 255, 300, 0, _G(scr_width), desc[i].c_str());
 			}
-		} else if (_G(minfo)._button == 1 || g_events->_kbInfo._keyCode == Common::KEYCODE_RETURN) {
+		} else if (_G(minfo).button == 1 || g_events->_kbInfo._keyCode == Common::KEYCODE_RETURN) {
 			if (isCurInventory(SLIME_INV)) {
 				delInventory(_G(gameState).AkInvent);
 				_G(gameState).R0SlimeUsed = true;
@@ -538,7 +538,7 @@ void Room0::feederExtend() {
 
 void Room0::calcPillowClick(int16 aniNr) {
 	if (mouse_on_prog_ani() == aniNr) {
-		if (_G(minfo)._button != 1 && g_events->_kbInfo._keyCode != Common::KEYCODE_RETURN) {
+		if (_G(minfo).button != 1 && g_events->_kbInfo._keyCode != Common::KEYCODE_RETURN) {
 			const uint8 roomNum = _G(room)->_roomInfo->_roomNr;
 			Common::StringArray desc = _G(atds)->getTextArray(roomNum, 173, ATS_DATA);
 			if (desc.size() > 0) {
@@ -549,7 +549,7 @@ void Room0::calcPillowClick(int16 aniNr) {
 				for (int16 i = 0; i < (int16)desc.size(); i++)
 					printShadowed(x, y + i * 10, 255, 300, 0, _G(scr_width), desc[i].c_str());
 			}
-		} else if (_G(minfo)._button == 1 || g_events->_kbInfo._keyCode == Common::KEYCODE_RETURN) {
+		} else if (_G(minfo).button == 1 || g_events->_kbInfo._keyCode == Common::KEYCODE_RETURN) {
 			if (isCurInventory(PILLOW_INV) && _G(gameState).R0SlimeUsed) {
 				delInventory(_G(gameState).AkInvent);
 				_G(gameState).R0PillowThrow = true;
diff --git a/engines/chewy/rooms/room03.cpp b/engines/chewy/rooms/room03.cpp
index bd98e369d62..35c19e9ad83 100644
--- a/engines/chewy/rooms/room03.cpp
+++ b/engines/chewy/rooms/room03.cpp
@@ -142,7 +142,7 @@ void Room3::terminal() {
 	case 1:
 		_G(auto_obj) = 1;
 		_G(mouseLeftClick) = false;
-		_G(minfo)._button = 0;
+		_G(minfo).button = 0;
 		stopPerson(P_CHEWY);
 		start_spz(15, 255, false, P_CHEWY);
 		startAadWait(51);
@@ -348,7 +348,7 @@ void Room3::probeTransfer() {
 
 			if (i == 2 || i == 1) {
 				if (mouse_auto_obj(SONDE_OBJ, 50, 100)) {
-					if (_G(minfo)._button == 1 || g_events->_kbInfo._keyCode == Common::KEYCODE_RETURN) {
+					if (_G(minfo).button == 1 || g_events->_kbInfo._keyCode == Common::KEYCODE_RETURN) {
 						if (isCurInventory(SPINAT_INV)) {
 							_G(atds)->set_split_win(0, 120, 100);
 							if (_G(gameState)._personRoomNr[P_CHEWY] == 3)
diff --git a/engines/chewy/rooms/room04.cpp b/engines/chewy/rooms/room04.cpp
index 99040a46c18..f9a8c03ff96 100644
--- a/engines/chewy/rooms/room04.cpp
+++ b/engines/chewy/rooms/room04.cpp
@@ -97,7 +97,7 @@ int16 Room4::comp_probe() {
 		_G(spr_info)[0]._x = CUR_POS[curX][0];
 		_G(spr_info)[0]._y = CUR_POS[curX][1];
 
-		if (_G(minfo)._button == 1 || g_events->_kbInfo._keyCode == Common::KEYCODE_RETURN) {
+		if (_G(minfo).button == 1 || g_events->_kbInfo._keyCode == Common::KEYCODE_RETURN) {
 			_G(cur)->setAnimation(HAND_CLICK, HAND_CLICK, -1);
 		} else {
 			_G(cur)->setAnimation(HAND_NORMAL, HAND_NORMAL, -1);
@@ -120,7 +120,7 @@ int16 Room4::comp_probe() {
 
 	_G(spieler_vector)[P_CHEWY]._delayCount = 0;
 	_G(mouseLeftClick) = false;
-	_G(minfo)._button = 0;
+	_G(minfo).button = 0;
 	_G(gameState)._personRoomNr[P_CHEWY] = 3;
 	_G(room)->loadRoom(&_G(room_blk), 3, &_G(gameState));
 	setPersonPos(110, 139, P_CHEWY, P_LEFT);
diff --git a/engines/chewy/rooms/room08.cpp b/engines/chewy/rooms/room08.cpp
index 98cf81f6fe8..c1a26032368 100644
--- a/engines/chewy/rooms/room08.cpp
+++ b/engines/chewy/rooms/room08.cpp
@@ -94,7 +94,7 @@ void Room8::start_verbrennen() {
 			setupScreen(DO_SETUP);
 			SHOULD_QUIT_RETURN;
 
-			if (_G(minfo)._button == 1 || g_events->_kbInfo._keyCode == Common::KEYCODE_RETURN) {
+			if (_G(minfo).button == 1 || g_events->_kbInfo._keyCode == Common::KEYCODE_RETURN) {
 				if (g_events->_mousePos.x > 146 && g_events->_mousePos.x < 208 &&
 					g_events->_mousePos.y > 107 && g_events->_mousePos.y < 155)
 					break;
diff --git a/engines/chewy/rooms/room51.cpp b/engines/chewy/rooms/room51.cpp
index f4b06e3be28..bcfa18116ee 100644
--- a/engines/chewy/rooms/room51.cpp
+++ b/engines/chewy/rooms/room51.cpp
@@ -143,7 +143,7 @@ void Room51::setup_func() {
 
 		_G(det)->setStaticPos(17, _tmpx, _tmpy, false, false);
 
-		if ((_G(minfo)._button == 1 || _G(in)->getSwitchCode() == 28) && !_flag) {
+		if ((_G(minfo).button == 1 || _G(in)->getSwitchCode() == 28) && !_flag) {
 			_flag = true;
 			_G(det)->setSetailPos(8, _tmpx - 20, _tmpy + 41);
 			startSetAILWait(8, 1, ANI_FRONT);
diff --git a/engines/chewy/rooms/room89.cpp b/engines/chewy/rooms/room89.cpp
index a87784e226a..77f5cfbea47 100644
--- a/engines/chewy/rooms/room89.cpp
+++ b/engines/chewy/rooms/room89.cpp
@@ -94,13 +94,13 @@ void Room89::entry() {
 		// Squash screen into a single point at the center
 		int edi = -20;
 		int var24 = 0;
-		_G(out)->spriteSave(_G(Ci).TempArea, 0, 0, 320, 200);
+		_G(out)->spriteSave(_G(Ci).tempArea, 0, 0, 320, 200);
 		for (int esi = 0; esi < 100; ++esi) {
 			edi -= 3;
 			var24 -= 2;
 			_G(out)->setPointer(_G(workptr));
 			_G(out)->cls();
-			_G(out)->scale_set(_G(Ci).TempArea, ABS(edi) / 2, ABS(var24) / 2, edi, var24, _G(scr_width));
+			_G(out)->scale_set(_G(Ci).tempArea, ABS(edi) / 2, ABS(var24) / 2, edi, var24, _G(scr_width));
 			_G(out)->setPointer(nullptr);
 			_G(out)->back2screen(_G(workpage));
 			g_events->delay(30);
@@ -113,7 +113,7 @@ void Room89::entry() {
 		// Those strings are also displayed in the the German version
 		_G(out)->printxy(70, 80, 15, 0, 0, "Thank you for playing");
 		_G(out)->printxy(70, 100, 15, 0, 0, "  CHEWY Esc from F5");
-		_G(out)->spriteSave(_G(Ci).TempArea, 0, 0, 320, 200);
+		_G(out)->spriteSave(_G(Ci).tempArea, 0, 0, 320, 200);
 		edi = -300;
 		int var30 = -200;
 
@@ -122,7 +122,7 @@ void Room89::entry() {
 			var30 += 2;
 			_G(out)->setPointer(_G(workptr));
 			_G(out)->cls();
-			_G(out)->scale_set(_G(Ci).TempArea, ABS(edi) / 2, ABS(var30) / 2, edi, var30, _G(scr_width));
+			_G(out)->scale_set(_G(Ci).tempArea, ABS(edi) / 2, ABS(var30) / 2, edi, var30, _G(scr_width));
 			_G(out)->setPointer(nullptr);
 			_G(out)->back2screen(_G(workpage));
 			g_events->delay(30);
diff --git a/engines/chewy/rooms/room97.cpp b/engines/chewy/rooms/room97.cpp
index 6465340f519..d15e90917f5 100644
--- a/engines/chewy/rooms/room97.cpp
+++ b/engines/chewy/rooms/room97.cpp
@@ -685,7 +685,7 @@ void Room97::sensorAnim() {
 	
 	while (_G(det)->get_ani_status(16)) {
 		get_user_key(NO_SETUP);
-		if (_G(minfo)._button == 1 || _G(in)->getSwitchCode() == 28) {
+		if (_G(minfo).button == 1 || _G(in)->getSwitchCode() == 28) {
 			if (_G(gameState).inv_cur)
 				_G(mouseLeftClick) = true;
 		}
diff --git a/engines/chewy/sprite.cpp b/engines/chewy/sprite.cpp
index 5ff7ad9959c..de2b4f24fe9 100644
--- a/engines/chewy/sprite.cpp
+++ b/engines/chewy/sprite.cpp
@@ -161,22 +161,22 @@ void spriteEngine() {
 					calc_zoom(_G(spieler_mi)[P_CHEWY].XyzStart[1], (int16)_G(room)->_roomInfo->_zoomFactor,
 					          (int16)_G(room)->_roomInfo->_zoomFactor, &_G(spieler_vector)[P_CHEWY]);
 
-					_G(out)->scale_set(_G(chewy)->_image[sprNr], x, y,
+					_G(out)->scale_set(_G(chewy)->image[sprNr], x, y,
 					                _G(spieler_vector)[P_CHEWY].Xzoom,
 					                _G(spieler_vector)[P_CHEWY].Yzoom,
 					                _G(scr_width));
 				} else {
 					int16 sprNr = _G(spz_spr_nr)[_G(spieler_vector)[P_CHEWY].PhNr];
-					x = _G(spieler_mi)[P_CHEWY].XyzStart[0] + _G(spz_tinfo)->_correction[sprNr * 2] -
+					x = _G(spieler_mi)[P_CHEWY].XyzStart[0] + _G(spz_tinfo)->correction[sprNr * 2] -
 					    _G(gameState).scrollx;
-					y = _G(spieler_mi)[P_CHEWY].XyzStart[1] + _G(spz_tinfo)->_correction[sprNr * 2 + 1] -
+					y = _G(spieler_mi)[P_CHEWY].XyzStart[1] + _G(spz_tinfo)->correction[sprNr * 2 + 1] -
 					    _G(gameState).scrolly;
 					calc_zoom(_G(spieler_mi)[P_CHEWY].XyzStart[1],
 					          (int16)_G(room)->_roomInfo->_zoomFactor,
 					          (int16)_G(room)->_roomInfo->_zoomFactor,
 					          &_G(spieler_vector)[P_CHEWY]);
 
-					_G(out)->scale_set(_G(spz_tinfo)->_image[sprNr], x, y,
+					_G(out)->scale_set(_G(spz_tinfo)->image[sprNr], x, y,
 					                _G(spieler_vector)[P_CHEWY].Xzoom,
 					                _G(spieler_vector)[P_CHEWY].Yzoom,
 					                _G(scr_width));
@@ -197,10 +197,10 @@ void spriteEngine() {
 					sprNr = _G(spz_spr_nr)[_G(spieler_vector)[personNr].PhNr];
 				}
 
-				x = _G(spieler_mi)[personNr].XyzStart[0] + ts_info->_correction[sprNr * 2] - _G(gameState).scrollx;
-				y = _G(spieler_mi)[personNr].XyzStart[1] + ts_info->_correction[sprNr * 2 + 1] - _G(gameState).scrolly;
+				x = _G(spieler_mi)[personNr].XyzStart[0] + ts_info->correction[sprNr * 2] - _G(gameState).scrollx;
+				y = _G(spieler_mi)[personNr].XyzStart[1] + ts_info->correction[sprNr * 2 + 1] - _G(gameState).scrolly;
 				calc_zoom(_G(spieler_mi)[personNr].XyzStart[1], _G(gameState).ZoomXy[personNr][0],_G(gameState).ZoomXy[personNr][1], &_G(spieler_vector)[personNr]);
-				_G(out)->scale_set(ts_info->_image[sprNr], x, y, _G(spieler_vector)[personNr].Xzoom, _G(spieler_vector)[personNr].Yzoom, _G(scr_width));
+				_G(out)->scale_set(ts_info->image[sprNr], x, y, _G(spieler_vector)[personNr].Xzoom, _G(spieler_vector)[personNr].Yzoom, _G(scr_width));
 			}
 			}
 			break;
@@ -454,7 +454,7 @@ void startAniBlock(int16 nr, const AniBlock *ab) {
 void startAadWait(int16 diaNr) {
 	const int16 oldMouseLeftClick = _G(mouseLeftClick);
 	_G(mouseLeftClick) = false;
-	_G(minfo)._button = 0;
+	_G(minfo).button = 0;
 	_G(talk_start_ani) = -1;
 	_G(talk_hide_static) = -1;
 	setSsiPos();
@@ -465,14 +465,14 @@ void startAadWait(int16 diaNr) {
 		g_engine->_sound->isSpeechActive()
 		)) {
 
-		if (_G(minfo)._button && _G(atds)->aadGetStatus() == -1)
+		if (_G(minfo).button && _G(atds)->aadGetStatus() == -1)
 			g_engine->_sound->stopSpeech();
 
 		setupScreen(DO_SETUP);
 	}
 
 	_G(mouseLeftClick) = oldMouseLeftClick;
-	if (_G(minfo)._button)
+	if (_G(minfo).button)
 		_G(flags).mainMouseFlag = 1;
 	g_events->_kbInfo._scanCode = Common::KEYCODE_INVALID;
 	stop_spz();
@@ -491,7 +491,7 @@ bool startAtsWait(int16 txtNr, int16 txtMode, int16 col, int16 mode) {
 	assert(mode == ATS_DATA || mode == INV_USE_DATA || mode == INV_USE_DEF);
 
 	_G(mouseLeftClick) = false;
-	_G(minfo)._button = 0;
+	_G(minfo).button = 0;
 
 	if (!_G(flags).AtsText) {
 		_G(flags).AtsText = true;
@@ -518,7 +518,7 @@ bool startAtsWait(int16 txtNr, int16 txtMode, int16 col, int16 mode) {
 					if (g_engine->_sound->speechEnabled() && !g_engine->_sound->isSpeechActive())
 						_G(atds)->stop_ats();
 
-					if (_G(minfo)._button)
+					if (_G(minfo).button)
 						g_engine->_sound->stopSpeech();
 
 					setupScreen(DO_SETUP);
@@ -532,7 +532,7 @@ bool startAtsWait(int16 txtNr, int16 txtMode, int16 col, int16 mode) {
 		_G(flags).AtsText = false;
 	}
 
-	if (_G(minfo)._button)
+	if (_G(minfo).button)
 		_G(flags).mainMouseFlag = 1;
 
 	g_events->_kbInfo._scanCode = Common::KEYCODE_INVALID;
@@ -554,7 +554,7 @@ void aadWait(int16 strNr) {
 		}
 	}
 	_G(mouseLeftClick) = oldMouseLeftClick;
-	if (_G(minfo)._button)
+	if (_G(minfo).button)
 		_G(flags).mainMouseFlag = 1;
 	g_events->_kbInfo._scanCode = Common::KEYCODE_INVALID;
 }
diff --git a/engines/chewy/video/video_player.cpp b/engines/chewy/video/video_player.cpp
index ff688571f6f..7e91c0cc485 100644
--- a/engines/chewy/video/video_player.cpp
+++ b/engines/chewy/video/video_player.cpp
@@ -260,7 +260,7 @@ bool VideoPlayer::handleCustom(uint num, uint frame, CfoDecoder *cfoDecoder) {
 		const int16 y = _G(spieler_mi)[P_CHEWY].XyzStart[1] + _G(chewy_kor)[spr_nr * 2 + 1] - scrolly;
 
 		calc_zoom(_G(spieler_mi)[P_CHEWY].XyzStart[1], (int16)_G(room)->_roomInfo->_zoomFactor, (int16)_G(room)->_roomInfo->_zoomFactor, &_G(spieler_vector)[P_CHEWY]);
-		_G(out)->scale_set(_G(chewy)->_image[spr_nr], x, y, _G(spieler_vector)[P_CHEWY].Xzoom, _G(spieler_vector)[P_CHEWY].Yzoom, _G(scr_width));
+		_G(out)->scale_set(_G(chewy)->image[spr_nr], x, y, _G(spieler_vector)[P_CHEWY].Xzoom, _G(spieler_vector)[P_CHEWY].Yzoom, _G(scr_width));
 		}
 		break;
 	case FCUT_083:




More information about the Scummvm-git-logs mailing list