diff options
| -rw-r--r-- | engines/dreamweb/backdrop.cpp | 87 | ||||
| -rw-r--r-- | engines/dreamweb/dreamweb.cpp | 10 | ||||
| -rw-r--r-- | engines/dreamweb/keypad.cpp | 8 | ||||
| -rw-r--r-- | engines/dreamweb/monitor.cpp | 194 | ||||
| -rw-r--r-- | engines/dreamweb/object.cpp | 182 | ||||
| -rw-r--r-- | engines/dreamweb/pathfind.cpp | 61 | ||||
| -rw-r--r-- | engines/dreamweb/print.cpp | 94 | ||||
| -rw-r--r-- | engines/dreamweb/saveload.cpp | 169 | ||||
| -rw-r--r-- | engines/dreamweb/sprite.cpp | 340 | ||||
| -rw-r--r-- | engines/dreamweb/stubs.cpp | 1400 | ||||
| -rw-r--r-- | engines/dreamweb/stubs.h | 650 | ||||
| -rw-r--r-- | engines/dreamweb/talk.cpp | 10 | ||||
| -rw-r--r-- | engines/dreamweb/use.cpp | 278 | ||||
| -rw-r--r-- | engines/dreamweb/vgafades.cpp | 32 | ||||
| -rw-r--r-- | engines/dreamweb/vgagrafx.cpp | 144 | 
15 files changed, 1821 insertions, 1838 deletions
diff --git a/engines/dreamweb/backdrop.cpp b/engines/dreamweb/backdrop.cpp index 3e4b4dcb64..07731e543d 100644 --- a/engines/dreamweb/backdrop.cpp +++ b/engines/dreamweb/backdrop.cpp @@ -24,7 +24,7 @@  namespace DreamGen { -void DreamGenContext::doblocks() { +void DreamGenContext::doBlocks() {  	uint16 dstOffset = data.word(kMapady) * 320 + data.word(kMapadx);  	uint16 mapOffset = kMap + data.byte(kMapy) * kMapwidth + data.byte(kMapx);  	const uint8 *mapData = segRef(data.word(kMapdata)).ptr(mapOffset, 0); @@ -63,7 +63,7 @@ void DreamGenContext::doblocks() {  	}  } -uint8 DreamGenContext::getxad(const uint8 *setData, uint8 *result) { +uint8 DreamGenContext::getXAd(const uint8 *setData, uint8 *result) {  	uint8 v0 = setData[0];  	uint8 v1 = setData[1];  	uint8 v2 = setData[2]; @@ -78,7 +78,7 @@ uint8 DreamGenContext::getxad(const uint8 *setData, uint8 *result) {  	return 1;  } -uint8 DreamGenContext::getyad(const uint8 *setData, uint8 *result) { +uint8 DreamGenContext::getYAd(const uint8 *setData, uint8 *result) {  	uint8 v0 = setData[3];  	uint8 v1 = setData[4];  	if (v0 < data.byte(kMapy)) @@ -90,29 +90,29 @@ uint8 DreamGenContext::getyad(const uint8 *setData, uint8 *result) {  	return 1;  } -void DreamGenContext::getmapad() { -	ch = getmapad((const uint8 *)es.ptr(si, 5)); +void DreamGenContext::getMapAd() { +	ch = getMapAd((const uint8 *)es.ptr(si, 5));  } -uint8 DreamGenContext::getmapad(const uint8 *setData) { +uint8 DreamGenContext::getMapAd(const uint8 *setData) {  	uint8 xad, yad; -	if (getxad(setData, &xad) == 0) +	if (getXAd(setData, &xad) == 0)  		return 0;  	data.word(kObjectx) = xad; -	if (getyad(setData, &yad) == 0) +	if (getYAd(setData, &yad) == 0)  		return 0;  	data.word(kObjecty) = yad;  	return 1;  } -void DreamGenContext::calcfrframe() { +void DreamGenContext::calcFrFrame() {  	uint8 width, height; -	calcfrframe(&width, &height); +	calcFrFrame(&width, &height);  	cl = width;  	ch = height;  } -void DreamGenContext::calcfrframe(uint8* width, uint8* height) { +void DreamGenContext::calcFrFrame(uint8* width, uint8* height) {  	const Frame *frame = (const Frame *)segRef(data.word(kFrsegment)).ptr(data.word(kCurrentframe) * sizeof(Frame), sizeof(Frame));  	data.word(kSavesource) = data.word(kFramesad) + frame->ptr();  	data.byte(kSavesize+0) = frame->width; @@ -123,21 +123,21 @@ void DreamGenContext::calcfrframe(uint8* width, uint8* height) {  	*height = frame->height;  } -void DreamGenContext::finalframe() { +void DreamGenContext::finalFrame() {  	uint16 x, y; -	finalframe(&x, &y); +	finalFrame(&x, &y);  	di = x;  	bx = y;  } -void DreamGenContext::finalframe(uint16 *x, uint16 *y) { +void DreamGenContext::finalFrame(uint16 *x, uint16 *y) {  	data.byte(kSavex) = (data.word(kObjectx) + data.word(kOffsetx)) & 0xff;  	data.byte(kSavey) = (data.word(kObjecty) + data.word(kOffsety)) & 0xff;  	*x = data.word(kObjectx);  	*y = data.word(kObjecty);  } -void DreamGenContext::showallobs() { +void DreamGenContext::showAllObs() {  	data.word(kListpos) = kSetlist;  	memset(segRef(data.word(kBuffers)).ptr(kSetlist, 0), 0xff, 128 * 5);  	data.word(kFrsegment) = data.word(kSetframes); @@ -148,22 +148,22 @@ void DreamGenContext::showallobs() {  	SetObject *setEntries = (SetObject *)segRef(data.word(kSetdat)).ptr(0, 128 * sizeof(SetObject));  	for (size_t i = 0; i < 128; ++i) {  		SetObject *setEntry = setEntries + i; -		if (getmapad(setEntry->mapad) == 0) +		if (getMapAd(setEntry->mapad) == 0)  			continue;  		uint8 currentFrame = setEntry->frames[0];  		data.word(kCurrentframe) = currentFrame;  		if (currentFrame == 0xff)  			continue; -		calcfrframe(); +		calcFrFrame();  		uint16 x, y; -		finalframe(&x, &y); +		finalFrame(&x, &y);  		setEntry->index = setEntry->frames[0];  		if ((setEntry->type == 0) && (setEntry->priority != 5) && (setEntry->priority != 6)) {  			x += data.word(kMapadx);  			y += data.word(kMapady); -			showframe(frames, x, y, data.word(kCurrentframe), 0); +			showFrame(frames, x, y, data.word(kCurrentframe), 0);  		} else -			makebackob(setEntry); +			makeBackOb(setEntry);  		ObjPos *objPos = (ObjPos *)segRef(data.word(kBuffers)).ptr(data.word(kListpos), sizeof(ObjPos));  		objPos->xMin = data.byte(kSavex); @@ -175,18 +175,17 @@ void DreamGenContext::showallobs() {  	}  } -void DreamGenContext::getdimension() -{ +void DreamGenContext::getDimension() {  	uint8 mapXstart, mapYstart;  	uint8 mapXsize, mapYsize; -	getdimension(&mapXstart, &mapYstart, &mapXsize, &mapYsize); +	getDimension(&mapXstart, &mapYstart, &mapXsize, &mapYsize);  	cl = mapXstart;  	ch = mapYstart;  	dl = mapXsize;  	dh = mapYsize;  } -bool DreamGenContext::addalong(const uint8 *mapFlags) { +bool DreamGenContext::addAlong(const uint8 *mapFlags) {  	for (size_t i = 0; i < 11; ++i) {  		if (mapFlags[3 * i] != 0)  			return true; @@ -194,7 +193,7 @@ bool DreamGenContext::addalong(const uint8 *mapFlags) {  	return false;  } -bool DreamGenContext::addlength(const uint8 *mapFlags) { +bool DreamGenContext::addLength(const uint8 *mapFlags) {  	for (size_t i = 0; i < 10; ++i) {  		if (mapFlags[3 * 11 * i] != 0)  			return true; @@ -202,23 +201,23 @@ bool DreamGenContext::addlength(const uint8 *mapFlags) {  	return false;  } -void DreamGenContext::getdimension(uint8 *mapXstart, uint8 *mapYstart, uint8 *mapXsize, uint8 *mapYsize) { +void DreamGenContext::getDimension(uint8 *mapXstart, uint8 *mapYstart, uint8 *mapXsize, uint8 *mapYsize) {  	const uint8 *mapFlags = segRef(data.word(kBuffers)).ptr(kMapflags, 0);  	uint8 yStart = 0; -	while (! addalong(mapFlags + 3 * 11 * yStart)) +	while (! addAlong(mapFlags + 3 * 11 * yStart))  		++yStart;  	uint8 xStart = 0; -	while (! addlength(mapFlags + 3 * xStart)) +	while (! addLength(mapFlags + 3 * xStart))  		++xStart;  	uint8 yEnd = 10; -	while (! addalong(mapFlags + 3 * 11 * (yEnd - 1))) +	while (! addAlong(mapFlags + 3 * 11 * (yEnd - 1)))  		--yEnd;  	uint8 xEnd = 11; -	while (! addlength(mapFlags + 3 * (xEnd - 1))) +	while (! addLength(mapFlags + 3 * (xEnd - 1)))  		--xEnd;  	*mapXstart = xStart; @@ -231,15 +230,15 @@ void DreamGenContext::getdimension(uint8 *mapXstart, uint8 *mapYstart, uint8 *ma  	data.byte(kMapysize) = *mapYsize << 4;  } -void DreamGenContext::calcmapad() { +void DreamGenContext::calcMapAd() {  	uint8 mapXstart, mapYstart;  	uint8 mapXsize, mapYsize; -	getdimension(&mapXstart, &mapYstart, &mapXsize, &mapYsize); +	getDimension(&mapXstart, &mapYstart, &mapXsize, &mapYsize);  	data.word(kMapadx) = data.word(kMapoffsetx) - 8 * (mapXsize + 2 * mapXstart - 11);  	data.word(kMapady) = data.word(kMapoffsety) - 8 * (mapYsize + 2 * mapYstart - 10);  } -void DreamGenContext::showallfree() { +void DreamGenContext::showAllFree() {  	data.word(kListpos) = kFreelist;  	ObjPos *listPos = (ObjPos *)segRef(data.word(kBuffers)).ptr(kFreelist, 80 * sizeof(ObjPos));  	memset(listPos, 0xff, 80 * sizeof(ObjPos)); @@ -250,17 +249,17 @@ void DreamGenContext::showallfree() {  	data.byte(kCurrentfree) = 0;  	const DynObject *freeObjects = (const DynObject *)segRef(data.word(kFreedat)).ptr(0, 0);  	for(size_t i = 0; i < 80; ++i) { -		uint8 mapad = getmapad(freeObjects[i].mapad); -		if (mapad != 0) { +		uint8 mapAd = getMapAd(freeObjects[i].mapad); +		if (mapAd != 0) {  			data.word(kCurrentframe) = 3 * data.byte(kCurrentfree);  			uint8 width, height; -			calcfrframe(&width, &height); +			calcFrFrame(&width, &height);  			uint16 x, y; -			finalframe(&x, &y); +			finalFrame(&x, &y);  			if ((width != 0) || (height != 0)) {  				x += data.word(kMapadx);  				y += data.word(kMapady); -				showframe((Frame *)segRef(data.word(kFrsegment)).ptr(0, 0), x, y, data.word(kCurrentframe) & 0xff, 0); +				showFrame((Frame *)segRef(data.word(kFrsegment)).ptr(0, 0), x, y, data.word(kCurrentframe) & 0xff, 0);  				ObjPos *objPos = (ObjPos *)segRef(data.word(kBuffers)).ptr(data.word(kListpos), sizeof(ObjPos));  				objPos->xMin = data.byte(kSavex);  				objPos->yMin = data.byte(kSavey); @@ -275,7 +274,7 @@ void DreamGenContext::showallfree() {  	}  } -void DreamGenContext::drawflags() { +void DreamGenContext::drawFlags() {  	uint8 *mapFlags = segRef(data.word(kBuffers)).ptr(kMapflags, 0);  	const uint8 *mapData = segRef(data.word(kMapdata)).ptr(kMap + data.byte(kMapy) * kMapwidth + data.byte(kMapx), 0);  	const uint8 *backdropFlags = segRef(data.word(kBackdrop)).ptr(kFlags, 0); @@ -291,7 +290,7 @@ void DreamGenContext::drawflags() {  	}  } -void DreamGenContext::showallex() { +void DreamGenContext::showAllEx() {  	data.word(kListpos) = kExlist;  	memset(segRef(data.word(kBuffers)).ptr(kExlist, 100 * 5), 0xff, 100 * 5); @@ -306,15 +305,15 @@ void DreamGenContext::showallex() {  			continue;  		if (object->currentLocation != data.byte(kReallocation))  			continue; -		if (getmapad(object->mapad) == 0) +		if (getMapAd(object->mapad) == 0)  			continue;  		data.word(kCurrentframe) = 3 * data.byte(kCurrentex);  		uint8 width, height; -		calcfrframe(&width, &height); +		calcFrFrame(&width, &height);  		uint16 x, y; -		finalframe(&x, &y); +		finalFrame(&x, &y);  		if ((width != 0) || (height != 0)) { -			showframe((Frame *)segRef(data.word(kFrsegment)).ptr(0, 0), x + data.word(kMapadx), y + data.word(kMapady), data.word(kCurrentframe) & 0xff, 0); +			showFrame((Frame *)segRef(data.word(kFrsegment)).ptr(0, 0), x + data.word(kMapadx), y + data.word(kMapady), data.word(kCurrentframe) & 0xff, 0);  			ObjPos *objPos = (ObjPos *)segRef(data.word(kBuffers)).ptr(data.word(kListpos), sizeof(ObjPos));  			objPos->xMin = data.byte(kSavex);  			objPos->yMin = data.byte(kSavey); diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index 84790d40b2..4781647ce1 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -93,8 +93,8 @@ void DreamWebEngine::waitForVSync() {  		setVSyncInterrupt(false);  	} -	_context.doshake(); -	_context.dofade(); +	_context.doShake(); +	_context.doFade();  	_system->updateScreen();  } @@ -203,7 +203,6 @@ void DreamWebEngine::processEvents() {  	}  } -  Common::Error DreamWebEngine::run() {  	syncSoundSettings();  	_console = new DreamWebConsole(this); @@ -289,7 +288,6 @@ uint DreamWebEngine::readFromSaveFile(uint8 *data, uint size) {  	return _inSaveFile->read(data, size);  } -  void DreamWebEngine::keyPressed(uint16 ascii) {  	debug(2, "key pressed = %04x", ascii);  	uint8* keybuf = _context.data.ptr(5912, 16); //fixme: some hardcoded offsets are not added as consts @@ -365,7 +363,6 @@ void DreamWebEngine::setPalette(const uint8 *data, uint start, uint count) {  	_system->getPaletteManager()->setPalette(fixed, start, count);  } -  void DreamWebEngine::blit(const uint8 *src, int pitch, int x, int y, int w, int h) {  	if (y + h > 200)  		h = 200 - y; @@ -485,11 +482,10 @@ bool DreamWebEngine::loadSpeech(const Common::String &filename) {  	return true;  } -  void DreamWebEngine::soundHandler() {  	_context.data.byte(_context.kSubtitles) = ConfMan.getBool("subtitles");  	_context.push(_context.ax); -	_context.volumeadjust(); +	_context.volumeAdjust();  	_context.ax = _context.pop();  	uint volume = _context.data.byte(DreamGen::DreamGenContext::kVolume); diff --git a/engines/dreamweb/keypad.cpp b/engines/dreamweb/keypad.cpp index de5a560af1..0867ffd2ab 100644 --- a/engines/dreamweb/keypad.cpp +++ b/engines/dreamweb/keypad.cpp @@ -24,12 +24,12 @@  namespace DreamGen { -void DreamGenContext::getundermenu() { -	multiget(segRef(data.word(kBuffers)).ptr(kUndertimedtext, 0), kMenux, kMenuy, 48, 48); +void DreamGenContext::getUnderMenu() { +	multiGet(segRef(data.word(kBuffers)).ptr(kUndertimedtext, 0), kMenux, kMenuy, 48, 48);  } -void DreamGenContext::putundermenu() { -	multiput(segRef(data.word(kBuffers)).ptr(kUndertimedtext, 0), kMenux, kMenuy, 48, 48); +void DreamGenContext::putUnderMenu() { +	multiPut(segRef(data.word(kBuffers)).ptr(kUndertimedtext, 0), kMenux, kMenuy, 48, 48);  }  } /*namespace dreamgen */ diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index cb41e75552..42a8f41e22 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -30,7 +30,7 @@ struct MonitorKeyEntry {  	char  b2[24];  }; -void DreamGenContext::usemon() { +void DreamGenContext::useMon() {  	data.byte(kLasttrigger) = 0;  	memset(cs.ptr(kCurrentfile+1, 0), ' ', 12);  	memset(cs.ptr(offset_operand1+1, 0), ' ', 12); @@ -41,33 +41,33 @@ void DreamGenContext::usemon() {  	monitorKeyEntries[2].b0 = 0;  	monitorKeyEntries[3].b0 = 0; -	createpanel(); -	showpanel(); -	showicon(); -	drawfloor(); -	getridofall(); -	loadintotemp("DREAMWEB.G03"); -	loadpersonal(); -	loadnews(); -	loadcart(); -	loadtempcharset("DREAMWEB.C01"); -	printoutermon(); -	initialmoncols(); -	printlogo(); -	worktoscreen(); -	turnonpower(); -	fadeupyellows(); -	fadeupmonfirst(); +	createPanel(); +	showPanel(); +	showIcon(); +	drawFloor(); +	getRidOfAll(); +	loadIntoTemp("DREAMWEB.G03"); +	loadPersonal(); +	loadNews(); +	loadCart(); +	loadTempCharset("DREAMWEB.C01"); +	printOuterMon(); +	initialMonCols(); +	printLogo(); +	workToScreen(); +	turnOnPower(); +	fadeupYellows(); +	fadeupMonFirst();  	data.word(kMonadx) = 76;  	data.word(kMonady) = 141; -	monmessage(1); -	hangoncurs(120); -	monmessage(2); -	randomaccess(60); -	monmessage(3); -	hangoncurs(100); -	printlogo(); -	scrollmonitor(); +	monMessage(1); +	hangOnCurs(120); +	monMessage(2); +	randomAccess(60); +	monMessage(3); +	hangOnCurs(100); +	printLogo(); +	scrollMonitor();  	data.word(kBufferin) = 0;  	data.word(kBufferout) = 0;  	do { @@ -80,42 +80,42 @@ void DreamGenContext::usemon() {  		di = pop();  		data.word(kMonadx) = di;  		data.word(kMonady) = bx; -		execcommand(); +		execCommand();  		if (quitRequested()) //TODO : Check why it crashes when put before the execcommand  			break;  	} while (al == 0); -	getridoftemp(); -	getridoftempcharset(); -	deallocatemem(data.word(kTextfile1)); -	deallocatemem(data.word(kTextfile2)); -	deallocatemem(data.word(kTextfile3)); +	getRidOfTemp(); +	getRidOfTempCharset(); +	deallocateMem(data.word(kTextfile1)); +	deallocateMem(data.word(kTextfile2)); +	deallocateMem(data.word(kTextfile3));  	data.byte(kGetback) = 1; -	playchannel1(26); +	playChannel1(26);  	data.byte(kManisoffscreen) = 0; -	restoreall(); -	redrawmainscrn(); -	worktoscreenm(); +	restoreAll(); +	redrawMainScrn(); +	workToScreenM();  } -void DreamGenContext::printlogo() { -	showframe(tempGraphics(), 56, 32, 0, 0); -	showcurrentfile(); +void DreamGenContext::printLogo() { +	showFrame(tempGraphics(), 56, 32, 0, 0); +	showCurrentFile();  }  void DreamGenContext::input() {  	char *inputLine = (char *)cs.ptr(kInputline, 64);  	memset(inputLine, 0, 64);  	data.word(kCurpos) = 0; -	printchar(tempCharset(), data.word(kMonadx), data.word(kMonady), '>', 0, NULL, NULL); -	multidump(data.word(kMonadx), data.word(kMonady), 6, 8); +	printChar(tempCharset(), data.word(kMonadx), data.word(kMonady), '>', 0, NULL, NULL); +	multiDump(data.word(kMonadx), data.word(kMonady), 6, 8);  	data.word(kMonadx) += 6;  	data.word(kCurslocx) = data.word(kMonadx);  	data.word(kCurslocy) = data.word(kMonady);  	while (true) { -		printcurs(); -		vsync(); -		delcurs(); -		readkey(); +		printCurs(); +		vSync(); +		delCurs(); +		readKey();  		if (quitRequested())  			return;  		uint8 currentKey = data.byte(kCurrentkey); @@ -125,7 +125,7 @@ void DreamGenContext::input() {  			return;  		if (currentKey == 8) {  			if (data.word(kCurpos) > 0) -				delchar(); +				delChar();  			continue;  		}  		if (data.word(kCurpos) == 28) @@ -133,14 +133,14 @@ void DreamGenContext::input() {  		if ((currentKey == 32) && (data.word(kCurpos) == 0))  			continue;  		al = currentKey; -		makecaps(); +		makeCaps();  		currentKey = al;  		inputLine[data.word(kCurpos) * 2 + 0] = currentKey;  		if (currentKey > 'Z')  			continue; -		multiget(segRef(data.word(kMapstore)).ptr(data.word(kCurpos) * 256, 0), data.word(kMonadx), data.word(kMonady), 8, 8); +		multiGet(segRef(data.word(kMapstore)).ptr(data.word(kCurpos) * 256, 0), data.word(kMonadx), data.word(kMonady), 8, 8);  		uint8 charWidth; -		printchar(tempCharset(), data.word(kMonadx), data.word(kMonady), currentKey, 0, &charWidth, NULL); +		printChar(tempCharset(), data.word(kMonadx), data.word(kMonady), currentKey, 0, &charWidth, NULL);  		inputLine[data.word(kCurpos) * 2 + 1] = charWidth;  		data.word(kMonadx) += charWidth;  		++data.word(kCurpos); @@ -148,7 +148,7 @@ void DreamGenContext::input() {  	}  } -void DreamGenContext::printcurs() { +void DreamGenContext::printCurs() {  	uint16 x = data.word(kCurslocx);  	uint16 y = data.word(kCurslocy);  	uint16 height; @@ -157,14 +157,14 @@ void DreamGenContext::printcurs() {  		height = 11;  	} else  		height = 8; -	multiget(textUnder(), x, y, 6, height); +	multiGet(textUnder(), x, y, 6, height);  	++data.word(kMaintimer);  	if ((data.word(kMaintimer) & 16) == 0) -		showframe(tempCharset(), x, y, '/' - 32, 0); -	multidump(x - 6, y, 12, height); +		showFrame(tempCharset(), x, y, '/' - 32, 0); +	multiDump(x - 6, y, 12, height);  } -void DreamGenContext::delcurs() { +void DreamGenContext::delCurs() {  	uint16 x = data.word(kCurslocx);  	uint16 y = data.word(kCurslocy);  	uint16 width = 6; @@ -174,95 +174,95 @@ void DreamGenContext::delcurs() {  		height = 11;  	} else  		height = 8; -	multiput(textUnder(), x, y, width, height); -	multidump(x, y, width, height); +	multiPut(textUnder(), x, y, width, height); +	multiDump(x, y, width, height);  } -void DreamGenContext::hangoncurs() { -	hangoncurs(cx); +void DreamGenContext::hangOnCurs() { +	hangOnCurs(cx);  } -void DreamGenContext::scrollmonitor() { -	printlogo(); -	printundermon(); +void DreamGenContext::scrollMonitor() { +	printLogo(); +	printUnderMon();  	workToScreenCPP(); -	playchannel1(25); +	playChannel1(25);  } -void DreamGenContext::showcurrentfile() { +void DreamGenContext::showCurrentFile() {  	uint16 x = 178; // TODO: Looks like this hardcoded constant in the asm doesn't match the frame  	const char *currentFile = (const char *)cs.ptr(kCurrentfile+1, 0);  	while (*currentFile) {  		char c = *currentFile++;  		c = engine->modifyChar(c); -		printchar(tempCharset(), &x, 37, c, 0, NULL, NULL); +		printChar(tempCharset(), &x, 37, c, 0, NULL, NULL);  	}  } -void DreamGenContext::accesslighton() { -	showframe(tempGraphics(), 74, 182, 8, 0); -	multidump(74, 182, 12, 8); +void DreamGenContext::accessLightOn() { +	showFrame(tempGraphics(), 74, 182, 8, 0); +	multiDump(74, 182, 12, 8);  } -void DreamGenContext::accesslightoff() { -	showframe(tempGraphics(), 74, 182, 7, 0); -	multidump(74, 182, 12, 8); +void DreamGenContext::accessLightOff() { +	showFrame(tempGraphics(), 74, 182, 7, 0); +	multiDump(74, 182, 12, 8);  } -void DreamGenContext::randomaccess() { -	randomaccess(cx); +void DreamGenContext::randomAccess() { +	randomAccess(cx);  } -void DreamGenContext::randomaccess(uint16 count) { +void DreamGenContext::randomAccess(uint16 count) {  	for (uint16 i = 0; i < count; ++i) { -		vsync(); -		vsync(); +		vSync(); +		vSync();  		uint16 v = engine->randomNumber() & 15;  		if (v < 10) -			accesslightoff(); +			accessLightOff();  		else -			accesslighton(); +			accessLightOn();  	} -	accesslightoff(); +	accessLightOff();  } -void DreamGenContext::monmessage() { -	monmessage(al); +void DreamGenContext::monMessage() { +	monMessage(al);  } -void DreamGenContext::monmessage(uint8 index) { +void DreamGenContext::monMessage(uint8 index) {  	assert(index > 0);  	const char *string = (const char *)segRef(data.word(kTextfile1)).ptr(kTextstart, 0);  	for (uint8 i = 0; i < index; ++i) {  		while (*string++ != '+') {  		}  	} -	monprint(string); +	monPrint(string);  } -void DreamGenContext::neterror() { -	monmessage(5); -	scrollmonitor(); +void DreamGenContext::netError() { +	monMessage(5); +	scrollMonitor();  } -void DreamGenContext::powerlighton() { -	showframe(tempGraphics(), 257+4, 182, 6, 0); -	multidump(257+4, 182, 12, 8); +void DreamGenContext::powerLightOn() { +	showFrame(tempGraphics(), 257+4, 182, 6, 0); +	multiDump(257+4, 182, 12, 8);  } -void DreamGenContext::powerlightoff() { -	showframe(tempGraphics(), 257+4, 182, 5, 0); -	multidump(257+4, 182, 12, 8); +void DreamGenContext::powerLightOff() { +	showFrame(tempGraphics(), 257+4, 182, 5, 0); +	multiDump(257+4, 182, 12, 8);  } -void DreamGenContext::turnonpower() { +void DreamGenContext::turnOnPower() {  	for (size_t i = 0; i < 3; ++i) { -		powerlighton(); -		hangon(30); -		powerlightoff(); -		hangon(30); +		powerLightOn(); +		hangOn(30); +		powerLightOff(); +		hangOn(30);  	} -	powerlighton(); +	powerLightOn();  } diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp index 9378729665..a01da08700 100644 --- a/engines/dreamweb/object.cpp +++ b/engines/dreamweb/object.cpp @@ -24,71 +24,71 @@  namespace DreamGen { -void DreamGenContext::fillryan() { +void DreamGenContext::fillRyan() {  	uint8 *inv = segRef(data.word(kBuffers)).ptr(kRyaninvlist, 60); -	findallryan(inv); +	findAllRyan(inv);  	inv += data.byte(kRyanpage) * 2 * 10;  	for (size_t i = 0; i < 2; ++i) {  		for (size_t j = 0; j < 5; ++j) {  			uint8 objIndex = *inv++;  			uint8 objType = *inv++; -			obtoinv(objIndex, objType, kInventx + j * kItempicsize, kInventy + i * kItempicsize); +			obToInv(objIndex, objType, kInventx + j * kItempicsize, kInventy + i * kItempicsize);  		}  	} -	showryanpage(); +	showRyanPage();  } -void DreamGenContext::isitworn() { -	flags._z = isitworn((const DynObject *)es.ptr(bx, sizeof(DynObject))); +void DreamGenContext::isItWorn() { +	flags._z = isItWorn((const DynObject *)es.ptr(bx, sizeof(DynObject)));  } -bool DreamGenContext::isitworn(const DynObject *object) { +bool DreamGenContext::isItWorn(const DynObject *object) {  	return (object->id[0] == 'W'-'A') && (object->id[1] == 'E'-'A');  } -void DreamGenContext::wornerror() { +void DreamGenContext::wornError() {  	data.byte(kCommandtype) = 255; -	delpointer(); -	printmessage(76, 21, 57, 240, false); -	worktoscreenm(); -	hangonp(50); -	showpanel(); -	showman(); -	examicon(); +	delPointer(); +	printMessage(76, 21, 57, 240, false); +	workToScreenM(); +	hangOnP(50); +	showPanel(); +	showMan(); +	examIcon();  	data.byte(kCommandtype) = 255; -	worktoscreenm(); +	workToScreenM();  } -void DreamGenContext::makeworn() { -	makeworn((DynObject *)es.ptr(bx, sizeof(DynObject))); +void DreamGenContext::makeWorn() { +	makeWorn((DynObject *)es.ptr(bx, sizeof(DynObject)));  } -void DreamGenContext::makeworn(DynObject *object) { +void DreamGenContext::makeWorn(DynObject *object) {  	object->id[0] = 'W'-'A';  	object->id[1] = 'E'-'A';  } -void DreamGenContext::obtoinv() { -	obtoinv(al, ah, di, bx); +void DreamGenContext::obToInv() { +	obToInv(al, ah, di, bx);  } -void DreamGenContext::obtoinv(uint8 index, uint8 flag, uint16 x, uint16 y) { +void DreamGenContext::obToInv(uint8 index, uint8 flag, uint16 x, uint16 y) {  	Frame *icons1 = (Frame *)segRef(data.word(kIcons1)).ptr(0, 0); -	showframe(icons1, x - 2, y - 1, 10, 0); +	showFrame(icons1, x - 2, y - 1, 10, 0);  	if (index == 0xff)  		return;  	Frame *extras = (Frame *)segRef(data.word(kExtras)).ptr(0, 0);  	Frame *frees = (Frame *)segRef(data.word(kFreeframes)).ptr(0, 0);  	Frame *frames = (flag == 4) ? extras : frees; -	showframe(frames, x + 18, y + 19, 3 * index + 1, 128); -	const DynObject *object = (const DynObject *)getanyaddir(index, flag); -	bool worn = isitworn(object); +	showFrame(frames, x + 18, y + 19, 3 * index + 1, 128); +	const DynObject *object = (const DynObject *)getAnyAdDir(index, flag); +	bool worn = isItWorn(object);  	if (worn) -		showframe(icons1, x - 3, y - 2, 7, 0); +		showFrame(icons1, x - 3, y - 2, 7, 0);  } -void DreamGenContext::obpicture() { +void DreamGenContext::obPicture() {  	if (data.byte(kObjecttype) == 1)  		return;  	Frame *frames; @@ -97,21 +97,21 @@ void DreamGenContext::obpicture() {  	else  		frames = (Frame *)segRef(data.word(kFreeframes)).ptr(0, 0);  	uint8 frame = 3 * data.byte(kCommand) + 1; -	showframe(frames, 160, 68, frame, 0x80); +	showFrame(frames, 160, 68, frame, 0x80);  } -void DreamGenContext::obicons() { +void DreamGenContext::obIcons() {  	uint8 value1, value2; -	getanyad(&value1, &value2); +	getAnyAd(&value1, &value2);  	if (value1 != 0xff) {  		// can open it -		showframe((Frame *)segRef(data.word(kIcons2)).ptr(0, 0), 210, 1, 4, 0); +		showFrame((Frame *)segRef(data.word(kIcons2)).ptr(0, 0), 210, 1, 4, 0);  	} -	showframe((Frame *)segRef(data.word(kIcons2)).ptr(0, 0), 260, 1, 1, 0); +	showFrame((Frame *)segRef(data.word(kIcons2)).ptr(0, 0), 260, 1, 1, 0);  } -void DreamGenContext::examineob(bool examineAgain) { +void DreamGenContext::examineOb(bool examineAgain) {  	data.byte(kPointermode) = 0;  	data.word(kTimecount) = 0;  	while (true) { @@ -125,66 +125,66 @@ void DreamGenContext::examineob(bool examineAgain) {  			data.byte(kObjecttype) = al;  			data.byte(kItemframe) = 0;  			data.byte(kPointerframe) = 0; -			createpanel(); -			showpanel(); -			showman(); -			showexit(); -			obicons(); -			obpicture(); -			describeob(); -			undertextline(); +			createPanel(); +			showPanel(); +			showMan(); +			showExit(); +			obIcons(); +			obPicture(); +			describeOb(); +			underTextLine();  			data.byte(kCommandtype) = 255; -			readmouse(); -			showpointer(); -			worktoscreen(); -			delpointer(); +			readMouse(); +			showPointer(); +			workToScreen(); +			delPointer();  			examineAgain = false;  		} -		readmouse(); -		showpointer(); -		vsync(); -		dumppointer(); -		dumptextline(); -		delpointer(); +		readMouse(); +		showPointer(); +		vSync(); +		dumpPointer(); +		dumpTextLine(); +		delPointer();  		data.byte(kGetback) = 0;  		switch (data.byte(kInvopen)) {  		case 0: { -			RectWithCallback examlist[] = { -				{ 273,320,157,198,&DreamGenContext::getbackfromob }, -				{ 260,300,0,44,&DreamGenContext::useobject }, -				{ 210,254,0,44,&DreamGenContext::selectopenob }, -				{ 144,176,64,96,&DreamGenContext::setpickup }, -				{ 0,50,50,200,&DreamGenContext::examinventory }, +			RectWithCallback examList[] = { +				{ 273,320,157,198,&DreamGenContext::getBackFromOb }, +				{ 260,300,0,44,&DreamGenContext::useObject }, +				{ 210,254,0,44,&DreamGenContext::selectOpenOb }, +				{ 144,176,64,96,&DreamGenContext::setPickup }, +				{ 0,50,50,200,&DreamGenContext::examineInventory },  				{ 0,320,0,200,&DreamGenContext::blank },  				{ 0xFFFF,0,0,0,0 }  			}; -			checkcoords(examlist); +			checkCoords(examList);  			break;  		}  		case 1: { -			// NB: This table contains the non-constant openchangesize! -			RectWithCallback invlist1[] = { -				{ 273,320,157,198,&DreamGenContext::getbackfromob }, -				{ 255,294,0,24,&DreamGenContext::dropobject }, -				{ kInventx+167,kInventx+167+(18*3),kInventy-18,kInventy-2,&DreamGenContext::incryanpage }, -				{ kInventx, cs.word(offset_openchangesize),kInventy+100,kInventy+100+kItempicsize,&DreamGenContext::useopened }, -				{ kInventx,kInventx+(5*kItempicsize), kInventy,kInventy+(2*kItempicsize),&DreamGenContext::intoinv }, +			// NB: This table contains the non-constant openChangeSize! +			RectWithCallback invList1[] = { +				{ 273,320,157,198,&DreamGenContext::getBackFromOb }, +				{ 255,294,0,24,&DreamGenContext::dropObject }, +				{ kInventx+167,kInventx+167+(18*3),kInventy-18,kInventy-2,&DreamGenContext::incRyanPage }, +				{ kInventx, cs.word(offset_openchangesize),kInventy+100,kInventy+100+kItempicsize,&DreamGenContext::useOpened }, +				{ kInventx,kInventx+(5*kItempicsize), kInventy,kInventy+(2*kItempicsize),&DreamGenContext::inToInv },  				{ 0,320,0,200,&DreamGenContext::blank },  				{ 0xFFFF,0,0,0,0 }  			}; -			checkcoords(invlist1); +			checkCoords(invList1);  			break;  		}  		default: { -			RectWithCallback withlist1[] = { -				{ 273,320,157,198,&DreamGenContext::getbackfromob }, -				{ kInventx+167,kInventx+167+(18*3),kInventy-18,kInventy-2,&DreamGenContext::incryanpage }, -				{ kInventx,kInventx+(5*kItempicsize), kInventy,kInventy+(2*kItempicsize),&DreamGenContext::selectob }, +			RectWithCallback withList1[] = { +				{ 273,320,157,198,&DreamGenContext::getBackFromOb }, +				{ kInventx+167,kInventx+167+(18*3),kInventy-18,kInventy-2,&DreamGenContext::incRyanPage }, +				{ kInventx,kInventx+(5*kItempicsize), kInventy,kInventy+(2*kItempicsize),&DreamGenContext::selectOb },  				{ 0,320,0,200,&DreamGenContext::blank },  				{ 0xFFFF,0,0,0,0 }  			}; -			checkcoords(withlist1); +			checkCoords(withList1);  			break;  		}  		} @@ -198,8 +198,8 @@ void DreamGenContext::examineob(bool examineAgain) {  	data.byte(kPickup) = 0;  	if (data.word(kWatchingtime) != 0 || data.byte(kNewlocation) == 255) { -		// iswatching -		makemainscreen(); +		// isWatching +		makeMainScreen();  	}  	data.byte(kInvopen) = 0; @@ -215,7 +215,7 @@ void DreamGenContext::inventory() {  	if (data.byte(kCommandtype) != 239) {  		data.byte(kCommandtype) = 239;  		al = 32; -		commandonly(); +		commandOnly();  	}  	if (data.word(kMousebutton) == data.word(kOldbutton)) @@ -227,25 +227,25 @@ void DreamGenContext::inventory() {  	data.word(kTimecount) = 0;  	data.byte(kPointermode) = 0;  	data.byte(kInmaparea) = 0; -	animpointer(); -	createpanel(); -	showpanel(); -	examicon(); -	showman(); -	showexit(); -	undertextline(); +	animPointer(); +	createPanel(); +	showPanel(); +	examIcon(); +	showMan(); +	showExit(); +	underTextLine();  	data.byte(kPickup) = 0;  	data.byte(kInvopen) = 2; -	openinv(); -	readmouse(); -	showpointer(); -	worktoscreen(); -	delpointer(); +	openInv(); +	readMouse(); +	showPointer(); +	workToScreen(); +	delPointer();  	data.byte(kOpenedob) = 255; -	examineob(false); +	examineOb(false);  } -void DreamGenContext::transfertext() { +void DreamGenContext::transferText() {  	segRef(data.word(kExtras)).word(kExtextdat + data.byte(kExpos) * 2) = data.word(kExtextpos);  	uint16 freeTextOffset = data.byte(kItemtotran) * 2;  	uint16 srcOffset = segRef(data.word(kFreedesc)).word(kFreetextdat + freeTextOffset); @@ -257,9 +257,9 @@ void DreamGenContext::transfertext() {  	data.word(kExtextpos) += len + 1;  } -void DreamGenContext::getbackfromob() { +void DreamGenContext::getBackFromOb() {  	if (data.byte(kPickup) != 1) -		getback1(); +		getBack1();  	else  		blank();  } diff --git a/engines/dreamweb/pathfind.cpp b/engines/dreamweb/pathfind.cpp index d367f02d15..2ca732467f 100644 --- a/engines/dreamweb/pathfind.cpp +++ b/engines/dreamweb/pathfind.cpp @@ -24,62 +24,61 @@  namespace DreamGen { -void DreamGenContext::turnpathon() { -	turnpathon(al); +void DreamGenContext::turnPathOn() { +	turnPathOn(al);  } -void DreamGenContext::turnpathon(uint8 param) { -	findormake(param, 0xff, data.byte(kRoomnum) + 100); -	PathNode *roomsPaths = getroomspaths()->nodes; +void DreamGenContext::turnPathOn(uint8 param) { +	findOrMake(param, 0xff, data.byte(kRoomnum) + 100); +	PathNode *roomsPaths = getRoomsPaths()->nodes;  	if (param == 0xff)  		return;  	roomsPaths[param].on = 0xff;  } -void DreamGenContext::turnpathoff() { -	turnpathoff(al); +void DreamGenContext::turnPathOff() { +	turnPathOff(al);  } -void DreamGenContext::turnpathoff(uint8 param) { -	findormake(param, 0x00, data.byte(kRoomnum) + 100); -	PathNode *roomsPaths = getroomspaths()->nodes; +void DreamGenContext::turnPathOff(uint8 param) { +	findOrMake(param, 0x00, data.byte(kRoomnum) + 100); +	PathNode *roomsPaths = getRoomsPaths()->nodes;  	if (param == 0xff)  		return;  	roomsPaths[param].on = 0x00;  } -void DreamGenContext::turnanypathon(uint8 param, uint8 room) { -	findormake(param, 0xff, room + 100); +void DreamGenContext::turnAnyPathOn(uint8 param, uint8 room) { +	findOrMake(param, 0xff, room + 100);  	PathNode *paths = (PathNode *)segRef(data.word(kReels)).ptr(kPathdata + 144 * room, 0);  	paths[param].on = 0xff;  } - -void DreamGenContext::turnanypathon() { -	turnanypathon(al, ah); +void DreamGenContext::turnAnyPathOn() { +	turnAnyPathOn(al, ah);  } -void DreamGenContext::turnanypathoff(uint8 param, uint8 room) { -	findormake(param, 0x00, room + 100); +void DreamGenContext::turnAnyPathOff(uint8 param, uint8 room) { +	findOrMake(param, 0x00, room + 100);  	PathNode *paths = (PathNode *)segRef(data.word(kReels)).ptr(kPathdata + 144 * room, 0);  	paths[param].on = 0x00;  } -void DreamGenContext::turnanypathoff() { -	turnanypathoff(al, ah); +void DreamGenContext::turnAnyPathOff() { +	turnAnyPathOff(al, ah);  } -RoomPaths *DreamGenContext::getroomspaths() { +RoomPaths *DreamGenContext::getRoomsPaths() {  	void *result = segRef(data.word(kReels)).ptr(data.byte(kRoomnum) * 144, 144);  	return (RoomPaths *)result;  } -void DreamGenContext::autosetwalk() { +void DreamGenContext::autoSetWalk() {  	al = data.byte(kManspath);  	if (data.byte(kFinaldest) == al)  		return; -	const RoomPaths *roomsPaths = getroomspaths(); -	checkdest(roomsPaths); +	const RoomPaths *roomsPaths = getRoomsPaths(); +	checkDest(roomsPaths);  	data.word(kLinestartx) = roomsPaths->nodes[data.byte(kManspath)].x - 12;  	data.word(kLinestarty) = roomsPaths->nodes[data.byte(kManspath)].y - 12;  	data.word(kLineendx) = roomsPaths->nodes[data.byte(kDestination)].x - 12; @@ -93,7 +92,7 @@ void DreamGenContext::autosetwalk() {  	data.byte(kLinepointer) = 0;  } -void DreamGenContext::checkdest(const RoomPaths *roomsPaths) { +void DreamGenContext::checkDest(const RoomPaths *roomsPaths) {  	const PathSegment *segments = roomsPaths->segments;  	ah = data.byte(kManspath) << 4;  	al = data.byte(kDestination); @@ -114,24 +113,24 @@ void DreamGenContext::checkdest(const RoomPaths *roomsPaths) {  	data.byte(kDestination) = destination;  } -void DreamGenContext::findxyfrompath() { -	const PathNode *roomsPaths = getroomspaths()->nodes; +void DreamGenContext::findXYFromPath() { +	const PathNode *roomsPaths = getRoomsPaths()->nodes;  	data.byte(kRyanx) = roomsPaths[data.byte(kManspath)].x - 12;  	data.byte(kRyany) = roomsPaths[data.byte(kManspath)].y - 12;  } -void DreamGenContext::checkifpathison() { -	flags._z = checkifpathison(al); +void DreamGenContext::checkIfPathIsOn() { +	flags._z = checkIfPathIsOn(al);  } -bool DreamGenContext::checkifpathison(uint8 index) { -	RoomPaths *roomsPaths = getroomspaths(); +bool DreamGenContext::checkIfPathIsOn(uint8 index) { +	RoomPaths *roomsPaths = getRoomsPaths();  	uint8 pathOn = roomsPaths->nodes[index].on;  	return pathOn == 0xff;  }  void DreamGenContext::bresenhams() { -	workoutframes(); +	workoutFrames();  	int8 *lineData = (int8 *)data.ptr(kLinedata, 0);  	int16 startX = (int16)data.word(kLinestartx);  	int16 startY = (int16)data.word(kLinestarty); diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp index 791c85be55..fcdaad902e 100644 --- a/engines/dreamweb/print.cpp +++ b/engines/dreamweb/print.cpp @@ -24,15 +24,15 @@  namespace DreamGen { -void DreamGenContext::printboth(const Frame *charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar) { +void DreamGenContext::printBoth(const Frame *charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar) {  	uint16 newX = *x;  	uint8 width, height; -	printchar(charSet, &newX, y, c, nextChar, &width, &height); -	multidump(*x, y, width, height); +	printChar(charSet, &newX, y, c, nextChar, &width, &height); +	multiDump(*x, y, width, height);  	*x = newX;  } -uint8 DreamGenContext::getnextword(const Frame *charSet, const uint8 *string, uint8 *totalWidth, uint8 *charCount) { +uint8 DreamGenContext::getNextWord(const Frame *charSet, const uint8 *string, uint8 *totalWidth, uint8 *charCount) {  	*totalWidth = 0;  	*charCount = 0;  	while(true) { @@ -51,22 +51,22 @@ uint8 DreamGenContext::getnextword(const Frame *charSet, const uint8 *string, ui  		if (firstChar != 255) {  			uint8 secondChar = *string;  			uint8 width = charSet[firstChar - 32 + data.word(kCharshift)].width; -			width = kernchars(firstChar, secondChar, width); +			width = kernChars(firstChar, secondChar, width);  			*totalWidth += width;  		}  	}  } -void DreamGenContext::printchar() { +void DreamGenContext::printChar() {  	uint16 x = di;  	uint8 width, height; -	printchar((const Frame *)ds.ptr(0, 0), &x, bx, al, ah, &width, &height); +	printChar((const Frame *)ds.ptr(0, 0), &x, bx, al, ah, &width, &height);  	di = x;  	cl = width;  	ch = height;  } -void DreamGenContext::printchar(const Frame *charSet, uint16* x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height) { +void DreamGenContext::printChar(const Frame *charSet, uint16* x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height) {  	if (c == 255)  		return; @@ -78,33 +78,33 @@ void DreamGenContext::printchar(const Frame *charSet, uint16* x, uint16 y, uint8  	if (data.byte(kForeignrelease))  		y -= 3;  	uint16 tmp = c - 32 + data.word(kCharshift); -	showframe(charSet, *x, y, tmp & 0x1ff, (tmp >> 8) & 0xfe, width, height); +	showFrame(charSet, *x, y, tmp & 0x1ff, (tmp >> 8) & 0xfe, width, height);  	if (data.byte(kKerning), 0) -		*width = kernchars(c, nextChar, *width); +		*width = kernChars(c, nextChar, *width);  	(*x) += *width;  } -void DreamGenContext::printchar(const Frame *charSet, uint16 x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height) { -	printchar(charSet, &x, y, c, nextChar, width, height); +void DreamGenContext::printChar(const Frame *charSet, uint16 x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height) { +	printChar(charSet, &x, y, c, nextChar, width, height);  } -void DreamGenContext::printslow() { -	al = printslow(es.ptr(si, 0), di, bx, dl, (bool)(dl & 1)); +void DreamGenContext::printSlow() { +	al = printSlow(es.ptr(si, 0), di, bx, dl, (bool)(dl & 1));  } -uint8 DreamGenContext::printslow(const uint8 *string, uint16 x, uint16 y, uint8 maxWidth, bool centered) { +uint8 DreamGenContext::printSlow(const uint8 *string, uint16 x, uint16 y, uint8 maxWidth, bool centered) {  	data.byte(kPointerframe) = 1;  	data.byte(kPointermode) = 3;  	const Frame* charSet = (const Frame *)segRef(data.word(kCharset1)).ptr(0, 0);  	do {  		uint16 offset = x; -		uint16 charCount = getnumber(charSet, string, maxWidth, centered, &offset); +		uint16 charCount = getNumber(charSet, string, maxWidth, centered, &offset);  		do {  			uint8 c0 = string[0];  			uint8 c1 = string[1];  			uint8 c2 = string[2];  			c0 = engine->modifyChar(c0); -			printboth(charSet, &offset, y, c0, c1); +			printBoth(charSet, &offset, y, c0, c1);  			if ((c1 == 0) || (c1 == ':')) {  				return 0;  			} @@ -112,10 +112,10 @@ uint8 DreamGenContext::printslow(const uint8 *string, uint16 x, uint16 y, uint8  				c1 = engine->modifyChar(c1);  				data.word(kCharshift) = 91;  				uint16 offset2 = offset; -				printboth(charSet, &offset2, y, c1, c2); +				printBoth(charSet, &offset2, y, c1, c2);  				data.word(kCharshift) = 0;  				for (int i=0; i<2; ++i) { -					uint16 mouseState = waitframes(); +					uint16 mouseState = waitFrames();  					if (data.byte(kQuitrequested))  						return 0;  					if (mouseState == 0) @@ -133,26 +133,26 @@ uint8 DreamGenContext::printslow(const uint8 *string, uint16 x, uint16 y, uint8  	} while (true);  } -void DreamGenContext::printdirect() { +void DreamGenContext::printDirect() {  	uint16 y = bx;  	uint16 initialSi = si;  	const uint8 *initialString = es.ptr(si, 0);  	const uint8 *string = initialString; -	al = printdirect(&string, di, &y, dl, (bool)(dl & 1)); +	al = printDirect(&string, di, &y, dl, (bool)(dl & 1));  	si = initialSi + (string - initialString);  	bx = y;  } -uint8 DreamGenContext::printdirect(const uint8* string, uint16 x, uint16 y, uint8 maxWidth, bool centered) { -	return printdirect(&string, x, &y, maxWidth, centered); +uint8 DreamGenContext::printDirect(const uint8* string, uint16 x, uint16 y, uint8 maxWidth, bool centered) { +	return printDirect(&string, x, &y, maxWidth, centered);  } -uint8 DreamGenContext::printdirect(const uint8** string, uint16 x, uint16 *y, uint8 maxWidth, bool centered) { +uint8 DreamGenContext::printDirect(const uint8** string, uint16 x, uint16 *y, uint8 maxWidth, bool centered) {  	data.word(kLastxpos) = x;  	const Frame *charSet = (const Frame *)segRef(data.word(kCurrentset)).ptr(0, 0);  	while (true) {  		uint16 offset = x; -		uint8 charCount = getnumber(charSet, *string, maxWidth, centered, &offset); +		uint8 charCount = getNumber(charSet, *string, maxWidth, centered, &offset);  		uint16 i = offset;  		do {  			uint8 c = (*string)[0]; @@ -163,7 +163,7 @@ uint8 DreamGenContext::printdirect(const uint8** string, uint16 x, uint16 *y, ui  			}  			c = engine->modifyChar(c);  			uint8 width, height; -			printchar(charSet, &i, *y, c, nextChar, &width, &height); +			printChar(charSet, &i, *y, c, nextChar, &width, &height);  			data.word(kLastxpos) = i;  			--charCount;  		} while(charCount); @@ -171,18 +171,18 @@ uint8 DreamGenContext::printdirect(const uint8** string, uint16 x, uint16 *y, ui  	}  } -void DreamGenContext::getnumber() { +void DreamGenContext::getNumber() {  	uint16 offset = di; -	cl = getnumber((Frame *)ds.ptr(0, 0), es.ptr(si, 0), dl, (bool)(dl & 1), &offset); +	cl = getNumber((Frame *)ds.ptr(0, 0), es.ptr(si, 0), dl, (bool)(dl & 1), &offset);  	di = offset;  } -uint8 DreamGenContext::getnumber(const Frame *charSet, const uint8 *string, uint16 maxWidth, bool centered, uint16* offset) { +uint8 DreamGenContext::getNumber(const Frame *charSet, const uint8 *string, uint16 maxWidth, bool centered, uint16* offset) {  	uint8 totalWidth = 0;  	uint8 charCount = 0;  	while (true) {  		uint8 wordTotalWidth, wordCharCount; -		uint8 done = getnextword(charSet, string, &wordTotalWidth, &wordCharCount); +		uint8 done = getNextWord(charSet, string, &wordTotalWidth, &wordCharCount);  		string += wordCharCount;  		if (done == 1) { //endoftext @@ -217,7 +217,7 @@ uint8 DreamGenContext::getnumber(const Frame *charSet, const uint8 *string, uint  	}  } -uint8 DreamGenContext::kernchars(uint8 firstChar, uint8 secondChar, uint8 width) { +uint8 DreamGenContext::kernChars(uint8 firstChar, uint8 secondChar, uint8 width) {  	if ((firstChar == 'a') || (al == 'u')) {  		if ((secondChar == 'n') || (secondChar == 't') || (secondChar == 'r') || (secondChar == 'i') || (secondChar == 'l'))  			return width-1; @@ -225,23 +225,23 @@ uint8 DreamGenContext::kernchars(uint8 firstChar, uint8 secondChar, uint8 width)  	return width;  } -uint16 DreamGenContext::waitframes() { -	readmouse(); -	showpointer(); -	vsync(); -	dumppointer(); -	delpointer(); +uint16 DreamGenContext::waitFrames() { +	readMouse(); +	showPointer(); +	vSync(); +	dumpPointer(); +	delPointer();  	return data.word(kMousebutton);  } -void DreamGenContext::monprint() { +void DreamGenContext::monPrint() {  	uint16 originalBx = bx;  	const char *string = (const char *)es.ptr(bx, 0); -	const char *nextString = monprint(string); +	const char *nextString = monPrint(string);  	bx = originalBx + (nextString - string);  } -const char *DreamGenContext::monprint(const char *string) { +const char *DreamGenContext::monPrint(const char *string) {  	data.byte(kKerning) = 1;  	uint16 x = data.word(kMonadx);  	Frame *charset = tempCharset(); @@ -249,7 +249,7 @@ const char *DreamGenContext::monprint(const char *string) {  	bool done = false;  	while (!done) { -		uint16 count = getnumber(charset, (const uint8 *)iterator, 166, false, &x); +		uint16 count = getNumber(charset, (const uint8 *)iterator, 166, false, &x);  		do {	  			char c = *iterator++;  			if (c == ':') @@ -265,18 +265,18 @@ const char *DreamGenContext::monprint(const char *string) {  				break;  			}  			c = engine->modifyChar(c); -			printchar(charset, &x, data.word(kMonady), c, 0, NULL, NULL); +			printChar(charset, &x, data.word(kMonady), c, 0, NULL, NULL);  			data.word(kCurslocx) = x;  			data.word(kCurslocy) = data.word(kMonady);  			data.word(kMaintimer) = 1; -			printcurs(); -			vsync(); -			lockmon(); -			delcurs(); +			printCurs(); +			vSync(); +			lockMon(); +			delCurs();  		} while (--count);  		x = data.word(kMonadx); -		scrollmonitor(); +		scrollMonitor();  		data.word(kCurslocx) = data.word(kMonadx);  	} diff --git a/engines/dreamweb/saveload.cpp b/engines/dreamweb/saveload.cpp index 00e81ed645..83db639ff5 100644 --- a/engines/dreamweb/saveload.cpp +++ b/engines/dreamweb/saveload.cpp @@ -28,55 +28,55 @@  namespace DreamGen { -void DreamGenContext::loadgame() { +void DreamGenContext::loadGame() {  	if (data.byte(kCommandtype) != 246) {  		data.byte(kCommandtype) = 246; -		commandonly(41); +		commandOnly(41);  	}  	if (data.word(kMousebutton) == data.word(kOldbutton))  		return; // "noload"  	if (data.word(kMousebutton) == 1) {  		ax = 0xFFFF; -		doload(); +		doLoad();  	}  }  // input: ax = savegameId  // if -1, open menu to ask for slot to load  // if >= 0, directly load from that slot -void DreamGenContext::doload() { +void DreamGenContext::doLoad() {  	int savegameId = (int16)ax;  	data.byte(kLoadingorsave) = 1;  	if (ConfMan.getBool("dreamweb_originalsaveload") && savegameId == -1) { -		showopbox(); -		showloadops(); +		showOpBox(); +		showLoadOps();  		data.byte(kCurrentslot) = 0; -		showslots(); -		shownames(); +		showSlots(); +		showNames();  		data.byte(kPointerframe) = 0; -		worktoscreenm(); -		namestoold(); +		workToScreenM(); +		namesToOld();  		data.byte(kGetback) = 0;  		while (true) {  			if (quitRequested())  				return; -			delpointer(); -			readmouse(); -			showpointer(); -			vsync(); -			dumppointer(); -			dumptextline(); +			delPointer(); +			readMouse(); +			showPointer(); +			vSync(); +			dumpPointer(); +			dumpTextLine();  			RectWithCallback loadlist[] = { -				{ kOpsx+176,kOpsx+192,kOpsy+60,kOpsy+76,&DreamGenContext::getbacktoops }, -				{ kOpsx+128,kOpsx+190,kOpsy+12,kOpsy+100,&DreamGenContext::actualload }, -				{ kOpsx+2,kOpsx+92,kOpsy+4,kOpsy+81,&DreamGenContext::selectslot }, +				{ kOpsx+176,kOpsx+192,kOpsy+60,kOpsy+76,&DreamGenContext::getBackToOps }, +				{ kOpsx+128,kOpsx+190,kOpsy+12,kOpsy+100,&DreamGenContext::actualLoad }, +				{ kOpsx+2,kOpsx+92,kOpsy+4,kOpsy+81,&DreamGenContext::selectSlot },  				{ 0,320,0,200,&DreamGenContext::blank },  				{ 0xFFFF,0,0,0,0 }  			}; -			checkcoords(loadlist); +			checkCoords(loadlist);  			if (data.byte(kGetback) == 1)  				break;  			if (data.byte(kGetback) == 2) @@ -101,35 +101,35 @@ void DreamGenContext::doload() {  			return;  		} -		loadposition(savegameId); +		loadPosition(savegameId);  		data.byte(kGetback) = 1;  	}  	// kTempgraphics might not have been allocated if we bypassed all menus  	if (data.word(kTempgraphics) != 0xFFFF) -		getridoftemp(); +		getRidOfTemp();  	dx = data;  	es = dx;  	const Room *room = (Room *)cs.ptr(kMadeuproomdat, sizeof(Room)); -	startloading(room); -	loadroomssample(); +	startLoading(room); +	loadRoomsSample();  	data.byte(kRoomloaded) = 1;  	data.byte(kNewlocation) = 255; -	clearsprites(); -	initman(); -	initrain(); +	clearSprites(); +	initMan(); +	initRain();  	data.word(kTextaddressx) = 13;  	data.word(kTextaddressy) = 182;  	data.byte(kTextlen) = 240;  	startup(); -	worktoscreen(); +	workToScreen();  	data.byte(kGetback) = 4;  } -void DreamGenContext::savegame() { +void DreamGenContext::saveGame() {  	if (data.byte(kMandead) == 2) {  		blank();  		return; @@ -137,7 +137,7 @@ void DreamGenContext::savegame() {  	if (data.byte(kCommandtype) != 247) {  		data.byte(kCommandtype) = 247; -		commandonly(44); +		commandOnly(44);  	}  	if (data.word(kMousebutton) != 1)  		return; @@ -145,13 +145,13 @@ void DreamGenContext::savegame() {  	data.byte(kLoadingorsave) = 2;  	if (ConfMan.getBool("dreamweb_originalsaveload")) { -		showopbox(); -		showsaveops(); +		showOpBox(); +		showSaveOps();  		data.byte(kCurrentslot) = 0; -		showslots(); -		shownames(); -		worktoscreenm(); -		namestoold(); +		showSlots(); +		showNames(); +		workToScreenM(); +		namesToOld();  		data.word(kBufferin) = 0;  		data.word(kBufferout) = 0;  		data.byte(kGetback) = 0; @@ -159,22 +159,22 @@ void DreamGenContext::savegame() {  		while (true) {  			if (quitRequested())  				return; -			delpointer(); -			checkinput(); -			readmouse(); -			showpointer(); -			vsync(); -			dumppointer(); -			dumptextline(); +			delPointer(); +			checkInput(); +			readMouse(); +			showPointer(); +			vSync(); +			dumpPointer(); +			dumpTextLine();  			RectWithCallback savelist[] = { -				{ kOpsx+176,kOpsx+192,kOpsy+60,kOpsy+76,&DreamGenContext::getbacktoops }, -				{ kOpsx+128,kOpsx+190,kOpsy+12,kOpsy+100,&DreamGenContext::actualsave }, -				{ kOpsx+2,kOpsx+92,kOpsy+4,kOpsy+81,&DreamGenContext::selectslot }, +				{ kOpsx+176,kOpsx+192,kOpsy+60,kOpsy+76,&DreamGenContext::getBackToOps }, +				{ kOpsx+128,kOpsx+190,kOpsy+12,kOpsy+100,&DreamGenContext::actualSave }, +				{ kOpsx+2,kOpsx+92,kOpsy+4,kOpsy+81,&DreamGenContext::selectSlot },  				{ 0,320,0,200,&DreamGenContext::blank },  				{ 0xFFFF,0,0,0,0 }  			}; -			checkcoords(savelist); +			checkCoords(savelist);  			_cmp(data.byte(kGetback), 0);  			if (flags.z())  				continue; @@ -211,58 +211,58 @@ void DreamGenContext::savegame() {  		if (savegameId < 7)  			memcpy(data.ptr(kSavenames + 17*savegameId, 17), descbuf, 17); -		saveposition(savegameId, descbuf); +		savePosition(savegameId, descbuf);  		// TODO: The below is copied from actualsave -		getridoftemp(); -		restoreall(); // reels +		getRidOfTemp(); +		restoreAll(); // reels  		data.word(kTextaddressx) = 13;  		data.word(kTextaddressy) = 182;  		data.byte(kTextlen) = 240; -		redrawmainscrn(); -		worktoscreenm(); +		redrawMainScrn(); +		workToScreenM();  		data.byte(kGetback) = 4;  	}  } -void DreamGenContext::namestoold() { +void DreamGenContext::namesToOld() {  	memcpy(segRef(data.word(kBuffers)).ptr(kZoomspace, 0), cs.ptr(kSavenames, 0), 17*4);  } -void DreamGenContext::oldtonames() { +void DreamGenContext::oldToNames() {  	memcpy(cs.ptr(kSavenames, 0), segRef(data.word(kBuffers)).ptr(kZoomspace, 0), 17*4);  } -void DreamGenContext::saveload() { +void DreamGenContext::saveLoad() {  	if (data.word(kWatchingtime) || (data.byte(kPointermode) == 2)) {  		blank();  		return;  	}  	if (data.byte(kCommandtype) != 253) {  		data.byte(kCommandtype) = 253; -		commandonly(43); +		commandOnly(43);  	}  	if ((data.word(kMousebutton) != data.word(kOldbutton)) && (data.word(kMousebutton) & 1)) -		dosaveload(); +		doSaveLoad();  } -void DreamGenContext::showmainops() { -	showframe(tempGraphics(), kOpsx+10, kOpsy+10, 8, 0); -	showframe(tempGraphics(), kOpsx+59, kOpsy+30, 7, 0); -	showframe(tempGraphics(), kOpsx+128+4, kOpsy+12, 1, 0); +void DreamGenContext::showMainOps() { +	showFrame(tempGraphics(), kOpsx+10, kOpsy+10, 8, 0); +	showFrame(tempGraphics(), kOpsx+59, kOpsy+30, 7, 0); +	showFrame(tempGraphics(), kOpsx+128+4, kOpsy+12, 1, 0);  } -void DreamGenContext::showdiscops() { -	showframe(tempGraphics(), kOpsx+128+4, kOpsy+12, 1, 0); -	showframe(tempGraphics(), kOpsx+10, kOpsy+10, 9, 0); -	showframe(tempGraphics(), kOpsx+59, kOpsy+30, 10, 0); -	showframe(tempGraphics(), kOpsx+176+2, kOpsy+60-4, 5, 0); +void DreamGenContext::showDiscOps() { +	showFrame(tempGraphics(), kOpsx+128+4, kOpsy+12, 1, 0); +	showFrame(tempGraphics(), kOpsx+10, kOpsy+10, 9, 0); +	showFrame(tempGraphics(), kOpsx+59, kOpsy+30, 10, 0); +	showFrame(tempGraphics(), kOpsx+176+2, kOpsy+60-4, 5, 0);  } -void DreamGenContext::actualsave() { +void DreamGenContext::actualSave() {  	if (data.byte(kCommandtype) != 222) {  		data.byte(kCommandtype) = 222; -		commandonly(44); +		commandOnly(44);  	}  	if (!(data.word(kMousebutton) & 1)) @@ -274,22 +274,22 @@ void DreamGenContext::actualsave() {  	if (desc[1] == 0) // The actual description string starts at desc[1]  		return; -	saveposition(slot, desc); +	savePosition(slot, desc); -	getridoftemp(); -	restoreall(); // reels +	getRidOfTemp(); +	restoreAll(); // reels  	data.word(kTextaddressx) = 13;  	data.word(kTextaddressy) = 182;  	data.byte(kTextlen) = 240; -	redrawmainscrn(); -	worktoscreenm(); +	redrawMainScrn(); +	workToScreenM();  	data.byte(kGetback) = 4;  } -void DreamGenContext::actualload() { +void DreamGenContext::actualLoad() {  	if (data.byte(kCommandtype) != 221) {  		data.byte(kCommandtype) = 221; -		commandonly(41); +		commandOnly(41);  	}  	if (data.word(kMousebutton) == data.word(kOldbutton) || data.word(kMousebutton) != 1) @@ -301,11 +301,11 @@ void DreamGenContext::actualload() {  	if (desc[1] == 0) // The actual description string starts at desc[1]  		return; -	loadposition(data.byte(kCurrentslot)); +	loadPosition(data.byte(kCurrentslot));  	data.byte(kGetback) = 1;  } -void DreamGenContext::saveposition(unsigned int slot, const uint8 *descbuf) { +void DreamGenContext::savePosition(unsigned int slot, const uint8 *descbuf) {  	const Room *currentRoom = (const Room *)cs.ptr(kRoomdata + sizeof(Room)*data.byte(kLocation), sizeof(Room));  	Room *madeUpRoom = (Room *)cs.ptr(kMadeuproomdat, sizeof(Room)); @@ -319,8 +319,7 @@ void DreamGenContext::saveposition(unsigned int slot, const uint8 *descbuf) {  	madeUpRoom->facing = data.byte(kFacing);  	madeUpRoom->b27 = 255; - -	openforsave(slot); +	openForSave(slot);  	// fill length fields in savegame file header  	uint16 len[6] = { 17, kLengthofvars, kLengthofextra, @@ -335,16 +334,14 @@ void DreamGenContext::saveposition(unsigned int slot, const uint8 *descbuf) {  	engine->writeToSaveFile(segRef(data.word(kBuffers)).ptr(kListofchanges, len[3]), len[3]);  	engine->writeToSaveFile(data.ptr(kMadeuproomdat, len[4]), len[4]);  	engine->writeToSaveFile(data.ptr(kReelroutines, len[5]), len[5]); -	closefile(); - - +	closeFile();  } -void DreamGenContext::loadposition(unsigned int slot) { +void DreamGenContext::loadPosition(unsigned int slot) {  	data.word(kTimecount) = 0; -	clearchanges(); +	clearChanges(); -	openforload(slot); +	openForLoad(slot);  	engine->readFromSaveFile(cs.ptr(kFileheader, kHeaderlen), kHeaderlen); @@ -368,7 +365,7 @@ void DreamGenContext::loadposition(unsigned int slot) {  	engine->readFromSaveFile(data.ptr(kMadeuproomdat, len[4]), len[4]);  	engine->readFromSaveFile(cs.ptr(kReelroutines, len[5]), len[5]); -	closefile(); +	closeFile();  }  } /*namespace dreamgen */ diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp index 76f1dd34dd..2659f5b885 100644 --- a/engines/dreamweb/sprite.cpp +++ b/engines/dreamweb/sprite.cpp @@ -24,14 +24,14 @@  namespace DreamGen { -Sprite *DreamGenContext::spritetable() { +Sprite *DreamGenContext::spriteTable() {  	Sprite *sprite = (Sprite *)segRef(data.word(kBuffers)).ptr(kSpritetable, 16 * sizeof(Sprite));  	return sprite;  } -void DreamGenContext::printsprites() { +void DreamGenContext::printSprites() {  	for (size_t priority = 0; priority < 7; ++priority) { -		Sprite *sprites = spritetable(); +		Sprite *sprites = spriteTable();  		for (size_t j = 0; j < 16; ++j) {  			const Sprite &sprite = sprites[j];  			if (sprite.updateCallback() == 0x0ffff) @@ -40,12 +40,12 @@ void DreamGenContext::printsprites() {  				continue;  			if (sprite.hidden == 1)  				continue; -			printasprite(&sprite); +			printASprite(&sprite);  		}  	}  } -void DreamGenContext::printasprite(const Sprite *sprite) { +void DreamGenContext::printASprite(const Sprite *sprite) {  	uint16 x, y;  	if (sprite->y >= 220) {  		y = data.word(kMapady) - (256 - sprite->y); @@ -64,15 +64,15 @@ void DreamGenContext::printasprite(const Sprite *sprite) {  		c = 8;  	else  		c = 0; -	showframe((const Frame *)segRef(sprite->frameData()).ptr(0, 0), x, y, sprite->frameNumber, c); +	showFrame((const Frame *)segRef(sprite->frameData()).ptr(0, 0), x, y, sprite->frameNumber, c);  } -void DreamGenContext::clearsprites() { -	memset(spritetable(), 0xff, sizeof(Sprite) * 16); +void DreamGenContext::clearSprites() { +	memset(spriteTable(), 0xff, sizeof(Sprite) * 16);  } -Sprite *DreamGenContext::makesprite(uint8 x, uint8 y, uint16 updateCallback, uint16 frameData, uint16 somethingInDi) { -	Sprite *sprite = spritetable(); +Sprite *DreamGenContext::makeSprite(uint8 x, uint8 y, uint16 updateCallback, uint16 frameData, uint16 somethingInDi) { +	Sprite *sprite = spriteTable();  	while (sprite->frameNumber != 0xff) { // NB: No boundchecking in the original code either  		++sprite;  	} @@ -88,8 +88,8 @@ Sprite *DreamGenContext::makesprite(uint8 x, uint8 y, uint16 updateCallback, uin  	return sprite;  } -void DreamGenContext::spriteupdate() { -	Sprite *sprites = spritetable(); +void DreamGenContext::spriteUpdate() { +	Sprite *sprites = spriteTable();  	sprites[0].hidden = data.byte(kRyanon);  	Sprite *sprite = sprites; @@ -98,10 +98,10 @@ void DreamGenContext::spriteupdate() {  		if (updateCallback != 0xffff) {  			sprite->w24 = sprite->w2;  			if (updateCallback == addr_mainman) // NB : Let's consider the callback as an enum while more code is not ported to C++ -				mainman(sprite); +				mainMan(sprite);  			else {  				assert(updateCallback == addr_backobject); -				backobject(sprite); +				backObject(sprite);  			}  		} @@ -111,18 +111,18 @@ void DreamGenContext::spriteupdate() {  	}  } -void DreamGenContext::initman() { -	Sprite *sprite = makesprite(data.byte(kRyanx), data.byte(kRyany), addr_mainman, data.word(kMainsprites), 0); +void DreamGenContext::initMan() { +	Sprite *sprite = makeSprite(data.byte(kRyanx), data.byte(kRyany), addr_mainman, data.word(kMainsprites), 0);  	sprite->priority = 4;  	sprite->speed = 0;  	sprite->walkFrame = 0;  } -void DreamGenContext::mainman() { +void DreamGenContext::mainMan() {  	assert(false);  } -void DreamGenContext::mainman(Sprite *sprite) { +void DreamGenContext::mainMan(Sprite *sprite) {  	push(es);  	push(ds); @@ -147,12 +147,12 @@ void DreamGenContext::mainman(Sprite *sprite) {  	}  	sprite->speed = 0;  	if (data.byte(kTurntoface) != data.byte(kFacing)) { -		aboutturn(sprite); +		aboutTurn(sprite);  	} else {  		if ((data.byte(kTurndirection) != 0) && (data.byte(kLinepointer) == 254)) {  			data.byte(kReasseschanges) = 1;  			if (data.byte(kFacing) == data.byte(kLeavedirection)) -				checkforexit(); +				checkForExit();  		}  		data.byte(kTurndirection) = 0;  		if (data.byte(kLinepointer) == 254) { @@ -172,7 +172,7 @@ void DreamGenContext::mainman(Sprite *sprite) {  				if (data.byte(kTurntoface) == data.byte(kFacing)) {  					data.byte(kReasseschanges) = 1;  					if (data.byte(kFacing) == data.byte(kLeavedirection)) -						checkforexit(); +						checkForExit();  				}  			}  		} @@ -204,18 +204,18 @@ void DreamGenContext::walking(Sprite *sprite) {  	data.byte(kLinepointer) = 254;  	data.byte(kManspath) = data.byte(kDestination);  	if (data.byte(kDestination) == data.byte(kFinaldest)) { -		facerightway(); +		faceRightWay();  		return;  	}  	data.byte(kDestination) = data.byte(kFinaldest);  	push(es);  	push(bx); -	autosetwalk(); +	autoSetWalk();  	bx = pop();  	es = pop();  } -void DreamGenContext::aboutturn(Sprite *sprite) { +void DreamGenContext::aboutTurn(Sprite *sprite) {  	bool incdir = true;  	if (data.byte(kTurndirection) == 1) @@ -249,11 +249,11 @@ void DreamGenContext::aboutturn(Sprite *sprite) {  	}  } -void DreamGenContext::backobject() { +void DreamGenContext::backObject() {  	assert(false);  } -void DreamGenContext::backobject(Sprite *sprite) { +void DreamGenContext::backObject(Sprite *sprite) {  	SetObject *objData = (SetObject *)segRef(data.word(kSetdat)).ptr(sprite->objData(), 0);  	if (sprite->delay != 0) { @@ -263,13 +263,13 @@ void DreamGenContext::backobject(Sprite *sprite) {  	sprite->delay = objData->delay;  	if (objData->type == 6) -		widedoor(sprite, objData); +		wideDoor(sprite, objData);  	else if (objData->type == 5)  		random(sprite, objData);  	else if (objData->type == 4) -		lockeddoorway(sprite, objData); +		lockedDoorway(sprite, objData);  	else if (objData->type == 3) -		liftsprite(sprite, objData); +		liftSprite(sprite, objData);  	else if (objData->type == 2)  		doorway(sprite, objData);  	else if (objData->type == 1) @@ -289,23 +289,22 @@ void DreamGenContext::constant(Sprite *sprite, SetObject *objData) {  }  void DreamGenContext::random(Sprite *sprite, SetObject *objData) { -	randomnum1(); +	randomNum1();  	uint16 r = ax;  	sprite->frameNumber = objData->frames[r&7];  }  void DreamGenContext::doorway(Sprite *sprite, SetObject *objData) {  	Common::Rect check(-24, -30, 10, 10); -	dodoor(sprite, objData, check); +	doDoor(sprite, objData, check);  } -void DreamGenContext::widedoor(Sprite *sprite, SetObject *objData) { +void DreamGenContext::wideDoor(Sprite *sprite, SetObject *objData) {  	Common::Rect check(-24, -30, 24, 24); -	dodoor(sprite, objData, check); +	doDoor(sprite, objData, check);  } -void DreamGenContext::dodoor(Sprite *sprite, SetObject *objData, Common::Rect check) { - +void DreamGenContext::doDoor(Sprite *sprite, SetObject *objData, Common::Rect check) {  	int ryanx = data.byte(kRyanx);  	int ryany = data.byte(kRyany); @@ -326,7 +325,7 @@ void DreamGenContext::dodoor(Sprite *sprite, SetObject *objData, Common::Rect ch  				soundIndex = 13;  			else  				soundIndex = 0; -			playchannel1(soundIndex); +			playChannel1(soundIndex);  		}  		if (objData->frames[sprite->animFrame] == 255)  			--sprite->animFrame; @@ -343,7 +342,7 @@ void DreamGenContext::dodoor(Sprite *sprite, SetObject *objData, Common::Rect ch  				soundIndex = 13;  			else  				soundIndex = 1; -			playchannel1(soundIndex); +			playChannel1(soundIndex);  		}  		if (sprite->animFrame != 0)  			--sprite->animFrame; @@ -360,8 +359,7 @@ void DreamGenContext::steady(Sprite *sprite, SetObject *objData) {  	sprite->frameNumber = frame;  } -void DreamGenContext::lockeddoorway(Sprite *sprite, SetObject *objData) { - +void DreamGenContext::lockedDoorway(Sprite *sprite, SetObject *objData) {  	int ryanx = data.byte(kRyanx);  	int ryany = data.byte(kRyany); @@ -375,11 +373,11 @@ void DreamGenContext::lockeddoorway(Sprite *sprite, SetObject *objData) {  	if (openDoor) {  		if (sprite->animFrame == 1) { -			playchannel1(0); +			playChannel1(0);  		}  		if (sprite->animFrame == 6) -			turnpathon(data.byte(kDoorpath)); +			turnPathOn(data.byte(kDoorpath));  		if (data.byte(kThroughdoor) == 1 && sprite->animFrame == 0)  			sprite->animFrame = 6; @@ -396,7 +394,7 @@ void DreamGenContext::lockeddoorway(Sprite *sprite, SetObject *objData) {  		// shut door  		if (sprite->animFrame == 5) { -			playchannel1(1); +			playChannel1(1);  		}  		if (sprite->animFrame != 0) @@ -406,16 +404,16 @@ void DreamGenContext::lockeddoorway(Sprite *sprite, SetObject *objData) {  		sprite->frameNumber = objData->index = objData->frames[sprite->animFrame];  		if (sprite->animFrame == 0) { -			turnpathoff(data.byte(kDoorpath)); +			turnPathOff(data.byte(kDoorpath));  			data.byte(kLockstatus) = 1;  		}  	}  } -void DreamGenContext::liftsprite(Sprite *sprite, SetObject *objData) { +void DreamGenContext::liftSprite(Sprite *sprite, SetObject *objData) {  	uint8 liftFlag = data.byte(kLiftflag);  	if (liftFlag == 0) { //liftclosed -		turnpathoff(data.byte(kLiftpath)); +		turnPathOff(data.byte(kLiftpath));  		if (data.byte(kCounttoopen) != 0) {  			_dec(data.byte(kCounttoopen)); @@ -426,7 +424,7 @@ void DreamGenContext::liftsprite(Sprite *sprite, SetObject *objData) {  		sprite->frameNumber = objData->index = objData->frames[sprite->animFrame];  	}  	else if (liftFlag == 1) {  //liftopen -		turnpathon(data.byte(kLiftpath)); +		turnPathOn(data.byte(kLiftpath));  		if (data.byte(kCounttoclose) != 0) {  			_dec(data.byte(kCounttoclose)); @@ -444,7 +442,7 @@ void DreamGenContext::liftsprite(Sprite *sprite, SetObject *objData) {  		++sprite->animFrame;  		if (sprite->animFrame == 1) {  			al = 2; -			liftnoise(); +			liftNoise();  		}  		sprite->frameNumber = objData->index = objData->frames[sprite->animFrame];  	} else { //closeLift @@ -456,14 +454,14 @@ void DreamGenContext::liftsprite(Sprite *sprite, SetObject *objData) {  		--sprite->animFrame;  		if (sprite->animFrame == 11) {  			al = 3; -			liftnoise(); +			liftNoise();  		}  		sprite->frameNumber = objData->index = objData->frames[sprite->animFrame];  	}  } -void DreamGenContext::facerightway() { -	PathNode *paths = getroomspaths()->nodes; +void DreamGenContext::faceRightWay() { +	PathNode *paths = getRoomsPaths()->nodes;  	uint8 dir = paths[data.byte(kManspath)].dir;  	data.byte(kTurntoface) = dir;  	data.byte(kLeavedirection) = dir; @@ -473,7 +471,7 @@ void DreamGenContext::facerightway() {  // The return value is a pointer to the start of the segment.  // data.word(kCurrentframe) - data.word(kTakeoff) is the number of the frame  // inside that segment -Frame *DreamGenContext::findsource() { +Frame *DreamGenContext::findSource() {  	uint16 currentFrame = data.word(kCurrentframe);  	if (currentFrame < 160) {  		data.word(kTakeoff) = 0; @@ -487,41 +485,41 @@ Frame *DreamGenContext::findsource() {  	}  } -Reel *DreamGenContext::getreelstart() { +Reel *DreamGenContext::getReelStart() {  	Reel *reel = (Reel *)segRef(data.word(kReels)).ptr(kReellist + data.word(kReelpointer) * sizeof(Reel) * 8, sizeof(Reel));  	return reel;  } -void DreamGenContext::showreelframe(Reel *reel) { +void DreamGenContext::showReelFrame(Reel *reel) {  	uint16 x = reel->x + data.word(kMapadx);  	uint16 y = reel->y + data.word(kMapady);  	data.word(kCurrentframe) = reel->frame(); -	Frame *source = findsource(); +	Frame *source = findSource();  	uint16 frame = data.word(kCurrentframe) - data.word(kTakeoff); -	showframe(source, x, y, frame, 8); +	showFrame(source, x, y, frame, 8);  } -void DreamGenContext::showgamereel() { -	showgamereel((ReelRoutine *)es.ptr(bx, sizeof(ReelRoutine))); +void DreamGenContext::showGameReel() { +	showGameReel((ReelRoutine *)es.ptr(bx, sizeof(ReelRoutine)));  } -void DreamGenContext::showgamereel(ReelRoutine *routine) { -	uint16 reelpointer = routine->reelPointer(); -	if (reelpointer >= 512) +void DreamGenContext::showGameReel(ReelRoutine *routine) { +	uint16 reelPointer = routine->reelPointer(); +	if (reelPointer >= 512)  		return; -	data.word(kReelpointer) = reelpointer; -	plotreel(); +	data.word(kReelpointer) = reelPointer; +	plotReel();  	routine->setReelPointer(data.word(kReelpointer));  } -const Frame *DreamGenContext::getreelframeax(uint16 frame) { +const Frame *DreamGenContext::getReelFrameAX(uint16 frame) {  	data.word(kCurrentframe) = frame; -	Frame *source = findsource(); +	Frame *source = findSource();  	uint16 offset = data.word(kCurrentframe) - data.word(kTakeoff);  	return source + offset;  } -void DreamGenContext::showrain() { +void DreamGenContext::showRain() {  	Rain *rain = (Rain *)segRef(data.word(kBuffers)).ptr(kRainlist, 0);  	// Do nothing if there's no rain at all @@ -564,74 +562,74 @@ void DreamGenContext::showrain() {  		soundIndex = 4;  	else  		soundIndex = 7; -	playchannel1(soundIndex); +	playChannel1(soundIndex);  }  static void (DreamGenContext::*reelCallbacks[57])() = {  	NULL, NULL, -	NULL, &DreamGenContext::edeninbath, -	NULL, &DreamGenContext::smokebloke, -	&DreamGenContext::manasleep, &DreamGenContext::drunk, -	&DreamGenContext::receptionist, &DreamGenContext::malefan, -	&DreamGenContext::femalefan, &DreamGenContext::louis, -	&DreamGenContext::louischair, &DreamGenContext::soldier1, -	&DreamGenContext::bossman, &DreamGenContext::interviewer, -	&DreamGenContext::heavy, &DreamGenContext::manasleep2, -	&DreamGenContext::mansatstill, &DreamGenContext::drinker, +	NULL, &DreamGenContext::edenInBath, +	NULL, &DreamGenContext::smokeBloke, +	&DreamGenContext::manAsleep, &DreamGenContext::drunk, +	&DreamGenContext::receptionist, &DreamGenContext::maleFan, +	&DreamGenContext::femaleFan, &DreamGenContext::louis, +	&DreamGenContext::louisChair, &DreamGenContext::soldier1, +	&DreamGenContext::bossMan, &DreamGenContext::interviewer, +	&DreamGenContext::heavy, &DreamGenContext::manAsleep2, +	&DreamGenContext::manSatStill, &DreamGenContext::drinker,  	&DreamGenContext::bartender, NULL, -	&DreamGenContext::tattooman, &DreamGenContext::attendant, +	&DreamGenContext::tattooMan, &DreamGenContext::attendant,  	&DreamGenContext::keeper, &DreamGenContext::candles1, -	&DreamGenContext::smallcandle, &DreamGenContext::security, -	&DreamGenContext::copper, &DreamGenContext::poolguard, -	&DreamGenContext::rockstar, &DreamGenContext::businessman, +	&DreamGenContext::smallCandle, &DreamGenContext::security, +	&DreamGenContext::copper, &DreamGenContext::poolGuard, +	&DreamGenContext::rockstar, &DreamGenContext::businessMan,  	&DreamGenContext::train, &DreamGenContext::aide,  	&DreamGenContext::mugger, &DreamGenContext::helicopter, -	&DreamGenContext::intromagic1, &DreamGenContext::intromusic, -	&DreamGenContext::intromagic2, &DreamGenContext::candles2, -	&DreamGenContext::gates, &DreamGenContext::intromagic3, -	&DreamGenContext::intromonks1, &DreamGenContext::candles, -	&DreamGenContext::intromonks2, &DreamGenContext::handclap, -	&DreamGenContext::monkandryan, &DreamGenContext::endgameseq, +	&DreamGenContext::introMagic1, &DreamGenContext::introMusic, +	&DreamGenContext::introMagic2, &DreamGenContext::candles2, +	&DreamGenContext::gates, &DreamGenContext::introMagic3, +	&DreamGenContext::introMonks1, &DreamGenContext::candles, +	&DreamGenContext::introMonks2, &DreamGenContext::handClap, +	&DreamGenContext::monkAndRyan, &DreamGenContext::endGameSeq,  	&DreamGenContext::priest, &DreamGenContext::madman, -	&DreamGenContext::madmanstelly, &DreamGenContext::alleybarksound, -	&DreamGenContext::foghornsound, &DreamGenContext::carparkdrip, -	&DreamGenContext::carparkdrip, &DreamGenContext::carparkdrip, -	&DreamGenContext::carparkdrip +	&DreamGenContext::madmansTelly, &DreamGenContext::alleyBarkSound, +	&DreamGenContext::foghornSound, &DreamGenContext::carParkDrip, +	&DreamGenContext::carParkDrip, &DreamGenContext::carParkDrip, +	&DreamGenContext::carParkDrip  };  static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = { -	&DreamGenContext::gamer, &DreamGenContext::sparkydrip, -	&DreamGenContext::eden, /*&DreamGenContext::edeninbath*/NULL, -	&DreamGenContext::sparky, /*&DreamGenContext::smokebloke*/NULL, -	/*&DreamGenContext::manasleep*/NULL, /*&DreamGenContext::drunk*/NULL, -	/*&DreamGenContext::receptionist*/NULL, /*&DreamGenContext::malefan*/NULL, -	/*&DreamGenContext::femalefan*/NULL, /*&DreamGenContext::louis*/NULL, -	/*&DreamGenContext::louischair*/NULL, /*&DreamGenContext::soldier1*/NULL, -	/*&DreamGenContext::bossman*/NULL, /*&DreamGenContext::interviewer*/NULL, -	/*&DreamGenContext::heavy*/NULL, /*&DreamGenContext::manasleep2*/NULL, -	/*&DreamGenContext::mansatstill*/NULL, /*&DreamGenContext::drinker*/NULL, -	/*&DreamGenContext::bartender*/NULL, &DreamGenContext::othersmoker, -	/*&DreamGenContext::tattooman*/NULL, /*&DreamGenContext::attendant*/NULL, +	&DreamGenContext::gamer, &DreamGenContext::sparkyDrip, +	&DreamGenContext::eden, /*&DreamGenContext::edenInBath*/NULL, +	&DreamGenContext::sparky, /*&DreamGenContext::smokeBloke*/NULL, +	/*&DreamGenContext::manAsleep*/NULL, /*&DreamGenContext::drunk*/NULL, +	/*&DreamGenContext::receptionist*/NULL, /*&DreamGenContext::maleFan*/NULL, +	/*&DreamGenContext::femaleFan*/NULL, /*&DreamGenContext::louis*/NULL, +	/*&DreamGenContext::louisChair*/NULL, /*&DreamGenContext::soldier1*/NULL, +	/*&DreamGenContext::bossMan*/NULL, /*&DreamGenContext::interviewer*/NULL, +	/*&DreamGenContext::heavy*/NULL, /*&DreamGenContext::manAsleep2*/NULL, +	/*&DreamGenContext::manSatStill*/NULL, /*&DreamGenContext::drinker*/NULL, +	/*&DreamGenContext::bartender*/NULL, &DreamGenContext::otherSmoker, +	/*&DreamGenContext::tattooMan*/NULL, /*&DreamGenContext::attendant*/NULL,  	/*&DreamGenContext::keeper*/NULL, /*&DreamGenContext::candles1*/NULL,  	/*&DreamGenContext::smallcandle*/NULL, /*&DreamGenContext::security*/NULL, -	/*&DreamGenContext::copper*/NULL, /*&DreamGenContext::poolguard*/NULL, -	/*&DreamGenContext::rockstar*/NULL, /*&DreamGenContext::businessman*/NULL, +	/*&DreamGenContext::copper*/NULL, /*&DreamGenContext::poolGuard*/NULL, +	/*&DreamGenContext::rockstar*/NULL, /*&DreamGenContext::businessMan*/NULL,  	/*&DreamGenContext::train*/NULL, /*&DreamGenContext::aide*/NULL,  	/*&DreamGenContext::mugger*/NULL, /*&DreamGenContext::helicopter*/NULL, -	/*&DreamGenContext::intromagic1*/NULL, /*&DreamGenContext::intromusic*/NULL, -	/*&DreamGenContext::intromagic2*/NULL, /*&DreamGenContext::candles2*/NULL, -	/*&DreamGenContext::gates*/NULL, /*&DreamGenContext::intromagic3*/NULL, +	/*&DreamGenContext::introMagic1*/NULL, /*&DreamGenContext::introMusic*/NULL, +	/*&DreamGenContext::introMagic2*/NULL, /*&DreamGenContext::candles2*/NULL, +	/*&DreamGenContext::gates*/NULL, /*&DreamGenContext::introMagic3*/NULL,  	/*&DreamGenContext::intromonks1*/NULL, /*&DreamGenContext::candles*/NULL, -	/*&DreamGenContext::intromonks2*/NULL, /*&DreamGenContext::handclap*/NULL, -	/*&DreamGenContext::monkandryan*/NULL, /*&DreamGenContext::endgameseq*/NULL, +	/*&DreamGenContext::intromonks2*/NULL, /*&DreamGenContext::handClap*/NULL, +	/*&DreamGenContext::monkAndRyan*/NULL, /*&DreamGenContext::endGameSeq*/NULL,  	/*&DreamGenContext::priest*/NULL, /*&DreamGenContext::madman*/NULL, -	/*&DreamGenContext::madmanstelly*/NULL, /*&DreamGenContext::alleybarksound*/NULL, -	/*&DreamGenContext::foghornsound*/NULL, /*&DreamGenContext::carparkdrip*/NULL, -	/*&DreamGenContext::carparkdrip*/NULL, /*&DreamGenContext::carparkdrip*/NULL, -	/*&DreamGenContext::carparkdrip*/NULL +	/*&DreamGenContext::madmansTelly*/NULL, /*&DreamGenContext::alleyBarkSound*/NULL, +	/*&DreamGenContext::foghornSound*/NULL, /*&DreamGenContext::carParkDrip*/NULL, +	/*&DreamGenContext::carParkDrip*/NULL, /*&DreamGenContext::carParkDrip*/NULL, +	/*&DreamGenContext::carParkDrip*/NULL  }; -void DreamGenContext::updatepeople() { +void DreamGenContext::updatePeople() {  	data.word(kListpos) = kPeoplelist;  	memset(segRef(data.word(kBuffers)).ptr(kPeoplelist, 12 * sizeof(People)), 0xff, 12 * sizeof(People));  	++data.word(kMaintimer); @@ -658,7 +656,7 @@ void DreamGenContext::updatepeople() {  	}  } -void DreamGenContext::madmantext() { +void DreamGenContext::madmanText() {  	if (isCD()) {  		if (data.byte(kSpeechcount) >= 63)  			return; @@ -675,21 +673,21 @@ void DreamGenContext::madmantext() {  			return;  		al = data.byte(kCombatcount) / 4;  	} -	setuptimedtemp(47 + al, 82, 72, 80, 90, 1); +	setupTimedTemp(47 + al, 82, 72, 80, 90, 1);  }  void DreamGenContext::madman() {  	ReelRoutine *routine = (ReelRoutine *)es.ptr(bx, 0);  	data.word(kWatchingtime) = 2; -	if (checkspeed(routine)) { +	if (checkSpeed(routine)) {  		ax = routine->reelPointer();  		if (ax >= 364) {  			data.byte(kMandead) = 2; -			showgamereel(routine); +			showGameReel(routine);  			return;  		}  		if (ax == 10) { -			loadtemptext("DREAMWEB.T82"); +			loadTempText("DREAMWEB.T82");  			data.byte(kCombatcount) = (uint8)-1;  			data.byte(kSpeechcount) = 0;  		} @@ -700,7 +698,7 @@ void DreamGenContext::madman() {  			data.byte(kWongame) = 1;  			push(es);  			push(bx); -			getridoftemptext(); +			getRidOfTempText();  			bx = pop();  			es = pop();  			return; @@ -709,7 +707,7 @@ void DreamGenContext::madman() {  			++data.byte(kCombatcount);  			push(es);  			push(bx); -			madmantext(); +			madmanText();  			bx = pop();  			es = pop();  			ax = 53; @@ -728,12 +726,12 @@ void DreamGenContext::madman() {  		}  		routine->setReelPointer(ax);  	} -	showgamereel(routine); +	showGameReel(routine);  	routine->mapX = data.byte(kMapx); -	madmode(); +	madMode();  } -void DreamGenContext::madmode() { +void DreamGenContext::madMode() {  	data.word(kWatchingtime) = 2;  	data.byte(kPointermode) = 0;  	if (data.byte(kCombatcount) < (isCD() ? 65 : 63)) @@ -743,7 +741,7 @@ void DreamGenContext::madmode() {  	data.byte(kPointermode) = 2;  } -void DreamGenContext::movemap(uint8 param) { +void DreamGenContext::moveMap(uint8 param) {  	switch (param) {  	case 32:  		data.byte(kMapy) -= 20; @@ -764,9 +762,9 @@ void DreamGenContext::movemap(uint8 param) {  	data.byte(kNowinnewroom) = 1;  } -void DreamGenContext::checkone() { +void DreamGenContext::checkOne() {  	uint8 flag, flagEx, type, flagX, flagY; -	checkone(cl, ch, &flag, &flagEx, &type, &flagX, &flagY); +	checkOne(cl, ch, &flag, &flagEx, &type, &flagX, &flagY);  	cl = flag;  	ch = flagEx; @@ -775,7 +773,7 @@ void DreamGenContext::checkone() {  	al = type;  } -void DreamGenContext::checkone(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uint8 *type, uint8 *flagX, uint8 *flagY) { +void DreamGenContext::checkOne(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uint8 *type, uint8 *flagX, uint8 *flagY) {  	*flagX = x / 16;  	*flagY = y / 16;  	const uint8 *tileData = segRef(data.word(kBuffers)).ptr(kMapflags + (*flagY * 11 + *flagX) * 3, 3); @@ -784,24 +782,24 @@ void DreamGenContext::checkone(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uin  	*type = tileData[2];  } -void DreamGenContext::getblockofpixel() { -	al = getblockofpixel(cl, ch); +void DreamGenContext::getBlockOfPixel() { +	al = getBlockOfPixel(cl, ch);  } -uint8 DreamGenContext::getblockofpixel(uint8 x, uint8 y) { +uint8 DreamGenContext::getBlockOfPixel(uint8 x, uint8 y) {  	uint8 flag, flagEx, type, flagX, flagY; -	checkone(x + data.word(kMapxstart), y + data.word(kMapystart), &flag, &flagEx, &type, &flagX, &flagY); +	checkOne(x + data.word(kMapxstart), y + data.word(kMapystart), &flag, &flagEx, &type, &flagX, &flagY);  	if (flag & 1)  		return 0;  	else  		return type;  } -void DreamGenContext::addtopeoplelist() { -	addtopeoplelist((ReelRoutine *)es.ptr(bx, sizeof(ReelRoutine))); +void DreamGenContext::addToPeopleList() { +	addToPeopleList((ReelRoutine *)es.ptr(bx, sizeof(ReelRoutine)));  } -void DreamGenContext::addtopeoplelist(ReelRoutine *routine) { +void DreamGenContext::addToPeopleList(ReelRoutine *routine) {  	uint16 routinePointer = (const uint8 *)routine - cs.ptr(0, 0);  	People *people = (People *)segRef(data.word(kBuffers)).ptr(data.word(kListpos), sizeof(People)); @@ -811,10 +809,10 @@ void DreamGenContext::addtopeoplelist(ReelRoutine *routine) {  	data.word(kListpos) += sizeof(People);  } -Rain *DreamGenContext::splitintolines(uint8 x, uint8 y, Rain *rain) { +Rain *DreamGenContext::splitIntoLines(uint8 x, uint8 y, Rain *rain) {  	do {  		// Look for line start -		while (!getblockofpixel(x, y)) { +		while (!getBlockOfPixel(x, y)) {  			--x;  			++y;  			if (x == 0 || y >= data.byte(kMapysize)) @@ -827,7 +825,7 @@ Rain *DreamGenContext::splitintolines(uint8 x, uint8 y, Rain *rain) {  		uint8 length = 1;  		// Look for line end -		while (getblockofpixel(x, y)) { +		while (getBlockOfPixel(x, y)) {  			--x;  			++y;  			if (x == 0 || y >= data.byte(kMapysize)) @@ -882,7 +880,7 @@ static const RainLocation rainLocationList[] = {  	{ 255,0,0,0 }  }; -void DreamGenContext::initrain() { +void DreamGenContext::initRain() {  	const RainLocation *r = rainLocationList;  	Rain *rainList = (Rain *)segRef(data.word(kBuffers)).ptr(kRainlist, 0);  	Rain *rain = rainList; @@ -916,7 +914,7 @@ void DreamGenContext::initrain() {  		if (x >= data.byte(kMapxsize))  			break; -		rain = splitintolines(x, 0, rain); +		rain = splitIntoLines(x, 0, rain);  	} while (true);  	// start lines of rain from side of screen @@ -931,13 +929,13 @@ void DreamGenContext::initrain() {  		if (y >= data.byte(kMapysize))  			break; -		rain = splitintolines(data.byte(kMapxsize) - 1, y, rain); +		rain = splitIntoLines(data.byte(kMapxsize) - 1, y, rain);  	} while (true);  	rain->x = 0xff;  } -void DreamGenContext::textforend() { +void DreamGenContext::textForEnd() {  	if (data.byte(kIntrocount) == 20)  		al = 0;  	else if (data.byte(kIntrocount) == (isCD() ? 50 : 65)) @@ -952,10 +950,10 @@ void DreamGenContext::textforend() {  	cx = 60;  	dx = 1;  	ah = 83; -	setuptimedtemp(); +	setupTimedTemp();  } -void DreamGenContext::textformonk() { +void DreamGenContext::textForMonk() {  	if (data.byte(kIntrocount) == 1) {  		al = 19;  		bl = 68; @@ -1022,7 +1020,7 @@ void DreamGenContext::textformonk() {  		bh = 154;  		cx = 220;  	} else if (data.byte(kIntrocount) == 53) { -		fadescreendowns(); +		fadeScreenDowns();  		if (isCD()) {  			data.byte(kVolumeto) = 7;  			data.byte(kVolumedirection) = 1; @@ -1039,35 +1037,35 @@ void DreamGenContext::textformonk() {  		return;  	} -	setuptimedtemp(); +	setupTimedTemp();  } -void DreamGenContext::reelsonscreen() { +void DreamGenContext::reelsOnScreen() {  	reconstruct(); -	updatepeople(); -	watchreel(); -	showrain(); -	usetimedtext(); +	updatePeople(); +	watchReel(); +	showRain(); +	useTimedText();  }  void DreamGenContext::reconstruct() {  	if (data.byte(kHavedoneobs) == 0)  		return;  	data.byte(kNewobs) = 1; -	drawfloor(); -	spriteupdate(); -	printsprites(); +	drawFloor(); +	spriteUpdate(); +	printSprites();  	if ((data.byte(kForeignrelease) != 0) && (data.byte(kReallocation) == 20)) -		undertextline(); +		underTextLine();  	data.byte(kHavedoneobs) = 0;  } -void DreamGenContext::checkspeed() { +void DreamGenContext::checkSpeed() {  	ReelRoutine *routine = (ReelRoutine *)es.ptr(bx, sizeof(ReelRoutine)); -	flags._z = checkspeed(routine); +	flags._z = checkSpeed(routine);  } -bool DreamGenContext::checkspeed(ReelRoutine *routine) { +bool DreamGenContext::checkSpeed(ReelRoutine *routine) {  	if (data.byte(kLastweapon) != (uint8)-1)  		return true;  	++routine->counter; @@ -1077,18 +1075,18 @@ bool DreamGenContext::checkspeed(ReelRoutine *routine) {  	return true;  } -void DreamGenContext::sparkydrip(ReelRoutine &routine) { -	if (checkspeed(&routine)) -		playchannel0(14, 0); +void DreamGenContext::sparkyDrip(ReelRoutine &routine) { +	if (checkSpeed(&routine)) +		playChannel0(14, 0);  } -void DreamGenContext::othersmoker(ReelRoutine &routine) { -	showgamereel(&routine); -	addtopeoplelist(&routine); +void DreamGenContext::otherSmoker(ReelRoutine &routine) { +	showGameReel(&routine); +	addToPeopleList(&routine);  }  void DreamGenContext::gamer(ReelRoutine &routine) { -	if (checkspeed(&routine)) { +	if (checkSpeed(&routine)) {  		uint8 v;  		do {  			v = 20 + engine->randomNumber() % 5; @@ -1096,21 +1094,21 @@ void DreamGenContext::gamer(ReelRoutine &routine) {  		routine.setReelPointer(v);  	} -	showgamereel(&routine); -	addtopeoplelist(&routine); +	showGameReel(&routine); +	addToPeopleList(&routine);  }  void DreamGenContext::eden(ReelRoutine &routine) {  	if (data.byte(kGeneraldead))  		return; -	showgamereel(&routine); -	addtopeoplelist(&routine); +	showGameReel(&routine); +	addToPeopleList(&routine);  }  void DreamGenContext::sparky(ReelRoutine &routine) {  	if (data.word(kCard1money))  		routine.b7 = 3; -	if (checkspeed(&routine)) { +	if (checkSpeed(&routine)) {  		if (routine.reelPointer() != 34) {  			if (engine->randomNumber() < 30)  				routine.incReelPointer(); @@ -1123,8 +1121,8 @@ void DreamGenContext::sparky(ReelRoutine &routine) {  				routine.setReelPointer(27);  		}  	} -	showgamereel(&routine); -	addtopeoplelist(&routine); +	showGameReel(&routine); +	addToPeopleList(&routine);  	if (routine.b7 & 128)  		data.byte(kTalkedtosparky) = 1;  } diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 2d8faa7a58..46e849628a 100644 --- a/engines/dreamweb/stubs.cpp +++ b/engines/dreamweb/stubs.cpp @@ -40,22 +40,22 @@ void DreamGenContext::dreamweb() {  		break;  	} -	seecommandtail(); -	soundstartup(); -	setkeyboardint(); -	allocatebuffers(); -	setmouse(); -	fadedos(); -	gettime(); -	clearbuffers(); -	clearpalette(); -	set16colpalette(); -	readsetdata(); +	seeCommandTail(); +	soundStartup(); +	setKeyboardInt(); +	allocateBuffers(); +	setMouse(); +	fadeDOS(); +	getTime(); +	clearBuffers(); +	clearPalette(); +	set16ColPalette(); +	readSetData();  	data.byte(kWongame) = 0;  	dx = 1909; -	loadsample(); -	setsoundoff(); +	loadSample(); +	setSoundOff();  	bool firstLoop = true; @@ -63,7 +63,7 @@ void DreamGenContext::dreamweb() {  	while (true) { -		scanfornames(); +		scanForNames();  		bool startNewGame = true; @@ -72,32 +72,32 @@ void DreamGenContext::dreamweb() {  			// loading a savegame requested from launcher/command line  			cls(); -			setmode(); -			loadpalfromiff(); -			clearpalette(); +			setMode(); +			loadPalFromIFF(); +			clearPalette();  			ax = savegameId; -			doload(); -			worktoscreen(); -			fadescreenup(); +			doLoad(); +			workToScreen(); +			fadeScreenUp();  			startNewGame = false;  		} else if (al == 0 && firstLoop) {  			// no savegames found, and we're not restarting. -			setmode(); -			loadpalfromiff(); +			setMode(); +			loadPalFromIFF();  		} else { -			// "dodecisions" +			// "doDecisions"  			// Savegames found, so ask if we should load one.  			// (If we're restarting after game over, we also always show these  			// options.)  			cls(); -			setmode(); +			setMode();  			decide();  			if (quitRequested())  				return; // exit game @@ -110,7 +110,7 @@ void DreamGenContext::dreamweb() {  		firstLoop = false;  		if (startNewGame) { -			// "playgame" +			// "playGame"  			titles();  			if (quitRequested()) @@ -120,20 +120,20 @@ void DreamGenContext::dreamweb() {  			if (quitRequested())  				return; // exit game -			clearchanges(); -			setmode(); -			loadpalfromiff(); +			clearChanges(); +			setMode(); +			loadPalFromIFF();  			data.byte(kLocation) = 255;  			data.byte(kRoomafterdream) = 1;  			data.byte(kNewlocation) = 35;  			data.byte(kVolume) = 7; -			loadroom(); -			clearsprites(); -			initman(); -			entrytexts(); -			entryanims(); +			loadRoom(); +			clearSprites(); +			initMan(); +			entryTexts(); +			entryAnims();  			data.byte(kDestpos) = 3; -			initialinv(); +			initialInv();  			data.byte(kLastflag) = 32;  			startup1();  			data.byte(kVolumeto) = 0; @@ -148,18 +148,18 @@ void DreamGenContext::dreamweb() {  			if (quitRequested())  				return; // exit game -			screenupdate(); +			screenUpdate();  			if (quitRequested())  				return; // exit game  			if (data.byte(kWongame) != 0) {  				// "endofgame" -				clearbeforeload(); -				fadescreendowns(); -				hangon(200); -				endgame(); -				quickquit2(); +				clearBeforeLoad(); +				fadeScreenDowns(); +				hangOn(200); +				endGame(); +				quickQuit2();  				return;  			} @@ -172,32 +172,32 @@ void DreamGenContext::dreamweb() {  			}  			if (data.word(kWatchingtime) == 0) { -				// "notwatching" +				// "notWatching"  				if (data.byte(kMandead) == 4)  					break;  				if (data.byte(kNewlocation) != 255) { -					// "loadnew" -					clearbeforeload(); -					loadroom(); -					clearsprites(); -					initman(); -					entrytexts(); -					entryanims(); +					// "loadNew" +					clearBeforeLoad(); +					loadRoom(); +					clearSprites(); +					initMan(); +					entryTexts(); +					entryAnims();  					data.byte(kNewlocation) = 255;  					startup();  					data.byte(kCommandtype) = 255; -					worktoscreenm(); +					workToScreenM();  				}  			}  		} -		// "gameover" -		clearbeforeload(); -		showgun(); -		fadescreendown(); -		hangon(100); +		// "gameOver" +		clearBeforeLoad(); +		showGun(); +		fadeScreenDown(); +		hangOn(100);  	}  } @@ -206,92 +206,92 @@ bool DreamGenContext::quitRequested() {  	return data.byte(kQuitrequested);  } -void DreamGenContext::screenupdate() { -	newplace(); -	mainscreen(); +void DreamGenContext::screenUpdate() { +	newPlace(); +	mainScreen();  	if (quitRequested())  		return; -	animpointer(); +	animPointer(); -	showpointer(); +	showPointer();  	if ((data.word(kWatchingtime) == 0) && (data.byte(kNewlocation) != 0xff))  		return; -	vsync(); +	vSync();  	uint16 mouseState = 0;  	mouseState |= readMouseState(); -	dumppointer(); +	dumpPointer(); -	dumptextline(); -	delpointer(); -	autolook(); -	spriteupdate(); -	watchcount(); +	dumpTextLine(); +	delPointer(); +	autoLook(); +	spriteUpdate(); +	watchCount();  	zoom(); -	showpointer(); +	showPointer();  	if (data.byte(kWongame))  		return; -	vsync(); +	vSync();  	mouseState |= readMouseState(); -	dumppointer(); +	dumpPointer(); -	dumpzoom(); -	delpointer(); -	deleverything(); -	printsprites(); -	reelsonscreen(); -	afternewroom(); +	dumpZoom(); +	delPointer(); +	delEverything(); +	printSprites(); +	reelsOnScreen(); +	afterNewRoom(); -	showpointer(); -	vsync(); +	showPointer(); +	vSync();  	mouseState |= readMouseState(); -	dumppointer(); +	dumpPointer(); -	dumpmap(); -	dumptimedtext(); -	delpointer(); +	dumpMap(); +	dumpTimedText(); +	delPointer(); -	showpointer(); -	vsync(); +	showPointer(); +	vSync();  	data.word(kOldbutton) = data.word(kMousebutton);  	mouseState |= readMouseState();  	data.word(kMousebutton) = mouseState; -	dumppointer(); +	dumpPointer(); -	dumpwatch(); -	delpointer(); +	dumpWatch(); +	delPointer();  }  void DreamGenContext::startup() {  	data.byte(kCurrentkey) = 0;  	data.byte(kMainmode) = 0; -	createpanel(); +	createPanel();  	data.byte(kNewobs) = 1; -	drawfloor(); -	showicon(); -	getunderzoom(); -	spriteupdate(); -	printsprites(); -	undertextline(); -	reelsonscreen(); +	drawFloor(); +	showIcon(); +	getUnderZoom(); +	spriteUpdate(); +	printSprites(); +	underTextLine(); +	reelsOnScreen();  	atmospheres();  }  void DreamGenContext::startup1() { -	clearpalette(); +	clearPalette();  	data.byte(kThroughdoor) = 0;  	startup(); -	worktoscreen(); -	fadescreenup(); +	workToScreen(); +	fadeScreenUp();  } -void DreamGenContext::switchryanon() { +void DreamGenContext::switchRyanOn() {  	data.byte(kRyanon) = 255;  } -void DreamGenContext::switchryanoff() { +void DreamGenContext::switchRyanOff() {  	data.byte(kRyanon) = 1;  } @@ -304,65 +304,65 @@ uint8 *DreamGenContext::textUnder() {  	return segRef(data.word(kBuffers)).ptr(kTextunder, 0);  } -uint16 DreamGenContext::standardload(const char *fileName) { +uint16 DreamGenContext::standardLoad(const char *fileName) {  	engine->openFile(fileName);  	engine->readFromFile(cs.ptr(kFileheader, kHeaderlen), kHeaderlen);  	uint16 sizeInBytes = cs.word(kFiledata); -	uint16 result = allocatemem((sizeInBytes + 15) / 16); +	uint16 result = allocateMem((sizeInBytes + 15) / 16);  	engine->readFromFile(segRef(result).ptr(0, 0), sizeInBytes);  	engine->closeFile();  	return result;  } -void DreamGenContext::standardload() { -	ax = standardload((const char *)cs.ptr(dx, 0)); +void DreamGenContext::standardLoad() { +	ax = standardLoad((const char *)cs.ptr(dx, 0));  } -void DreamGenContext::loadintotemp() { -	loadintotemp((const char *)cs.ptr(dx, 0)); +void DreamGenContext::loadIntoTemp() { +	loadIntoTemp((const char *)cs.ptr(dx, 0));  } -void DreamGenContext::loadintotemp2() { -	loadintotemp2((const char *)cs.ptr(dx, 0)); +void DreamGenContext::loadIntoTemp2() { +	loadIntoTemp2((const char *)cs.ptr(dx, 0));  } -void DreamGenContext::loadintotemp3() { -	loadintotemp3((const char *)cs.ptr(dx, 0)); +void DreamGenContext::loadIntoTemp3() { +	loadIntoTemp3((const char *)cs.ptr(dx, 0));  } -void DreamGenContext::loadintotemp(const char *fileName) { -	data.word(kTempgraphics) = standardload(fileName); +void DreamGenContext::loadIntoTemp(const char *fileName) { +	data.word(kTempgraphics) = standardLoad(fileName);  } -void DreamGenContext::loadintotemp2(const char *fileName) { -	data.word(kTempgraphics2) = standardload(fileName); +void DreamGenContext::loadIntoTemp2(const char *fileName) { +	data.word(kTempgraphics2) = standardLoad(fileName);  } -void DreamGenContext::loadintotemp3(const char *fileName) { -	data.word(kTempgraphics3) = standardload(fileName); +void DreamGenContext::loadIntoTemp3(const char *fileName) { +	data.word(kTempgraphics3) = standardLoad(fileName);  } -void DreamGenContext::loadtempcharset() { -	loadtempcharset((const char *)cs.ptr(dx, 0)); +void DreamGenContext::loadTempCharset() { +	loadTempCharset((const char *)cs.ptr(dx, 0));  } -void DreamGenContext::loadtempcharset(const char *fileName) { -	data.word(kTempcharset) = standardload(fileName); +void DreamGenContext::loadTempCharset(const char *fileName) { +	data.word(kTempcharset) = standardLoad(fileName);  }  Frame *DreamGenContext::tempCharset() {  	return (Frame *)segRef(data.word(kTempcharset)).ptr(0, 0);  } -void DreamGenContext::hangoncurs(uint16 frameCount) { +void DreamGenContext::hangOnCurs(uint16 frameCount) {  	for (uint16 i = 0; i < frameCount; ++i) { -		printcurs(); -		vsync(); -		delcurs(); +		printCurs(); +		vSync(); +		delCurs();  	}  } -void DreamGenContext::seecommandtail() { +void DreamGenContext::seeCommandTail() {  	data.word(kSoundbaseadd) = 0x220;  	data.byte(kSoundint) = 5;  	data.byte(kSounddmachannel) = 1; @@ -370,29 +370,29 @@ void DreamGenContext::seecommandtail() {  	data.word(kHowmuchalloc) = 0x9360;  } -void DreamGenContext::randomnumber() { +void DreamGenContext::randomNumber() {  	al = engine->randomNumber();  } -void DreamGenContext::quickquit() { +void DreamGenContext::quickQuit() {  	engine->quit();  } -void DreamGenContext::quickquit2() { +void DreamGenContext::quickQuit2() {  	engine->quit();  } -void DreamGenContext::keyboardread() { +void DreamGenContext::keyboardRead() {  	::error("keyboardread"); //this keyboard int handler, must never be called  } -void DreamGenContext::resetkeyboard() { +void DreamGenContext::resetKeyboard() {  } -void DreamGenContext::setkeyboardint() { +void DreamGenContext::setKeyboardInt() {  } -void DreamGenContext::readfromfile() { +void DreamGenContext::readFromFile() {  	uint16 dst_offset = dx;  	uint16 size = cx;  	debug(1, "readfromfile(%04x:%u, %u)", (uint16)ds, dst_offset, size); @@ -400,38 +400,37 @@ void DreamGenContext::readfromfile() {  	flags._c = false;  } -void DreamGenContext::closefile() { +void DreamGenContext::closeFile() {  	engine->closeFile();  	data.byte(kHandle) = 0;  } -void DreamGenContext::openforsave(unsigned int slot) { +void DreamGenContext::openForSave(unsigned int slot) {  	//Common::String filename = ConfMan.getActiveDomainName() + Common::String::format(".d%02d", savegameId);  	Common::String filename = Common::String::format("DREAMWEB.D%02d", slot); -	debug(1, "openforsave(%s)", filename.c_str()); +	debug(1, "openForSave(%s)", filename.c_str());  	engine->openSaveFileForWriting(filename);  } -void DreamGenContext::openforload(unsigned int slot) { +void DreamGenContext::openForLoad(unsigned int slot) {  	//Common::String filename = ConfMan.getActiveDomainName() + Common::String::format(".d%02d", savegameId);  	Common::String filename = Common::String::format("DREAMWEB.D%02d", slot); -	debug(1, "openforload(%s)", filename.c_str()); +	debug(1, "openForLoad(%s)", filename.c_str());  	engine->openSaveFileForReading(filename);  } - -void DreamGenContext::openfilenocheck() { +void DreamGenContext::openFileNoCheck() {  	const char *name = (const char *)ds.ptr(dx, 13); -	debug(1, "checksavefile(%s)", name); +	debug(1, "checkSaveFile(%s)", name);  	bool ok = engine->openSaveFileForReading(name);  	flags._c = !ok;  } -void DreamGenContext::openfilefromc() { -	openfilenocheck(); +void DreamGenContext::openFileFromC() { +	openFileNoCheck();  } -void DreamGenContext::openfile() { +void DreamGenContext::openFile() {  	Common::String name = getFilename(*this);  	debug(1, "opening file: %s", name.c_str());  	engine->openFile(name); @@ -439,11 +438,11 @@ void DreamGenContext::openfile() {  	flags._c = false;  } -void DreamGenContext::createfile() { +void DreamGenContext::createFile() {  	::error("createfile");  } -void DreamGenContext::dontloadseg() { +void DreamGenContext::dontLoadSeg() {  	ax = es.word(di);  	_add(di, 2);  	dx = ax; @@ -454,7 +453,7 @@ void DreamGenContext::dontloadseg() {  	flags._c = false;  } -void DreamGenContext::mousecall() { +void DreamGenContext::mouseCall() {  	uint16 x, y, state;  	engine->mouseCall(&x, &y, &state);  	cx = x; @@ -462,7 +461,7 @@ void DreamGenContext::mousecall() {  	bx = state;  } -void DreamGenContext::readmouse() { +void DreamGenContext::readMouse() {  	data.word(kOldbutton) = data.word(kMousebutton);  	uint16 state = readMouseState();  	data.word(kMousebutton) = state; @@ -478,11 +477,11 @@ uint16 DreamGenContext::readMouseState() {  	return state;  } -void DreamGenContext::setmouse() { +void DreamGenContext::setMouse() {  	data.word(kOldpointerx) = 0xffff;  } -void DreamGenContext::dumptextline() { +void DreamGenContext::dumpTextLine() {  	if (data.byte(kNewtextline) != 1)  		return;  	data.byte(kNewtextline) = 0; @@ -490,39 +489,39 @@ void DreamGenContext::dumptextline() {  	uint16 y = data.word(kTextaddressy);  	if (data.byte(kForeignrelease) != 0)  		y -= 3; -	multidump(x, y, 228, 13); +	multiDump(x, y, 228, 13);  } -void DreamGenContext::getundertimed() { +void DreamGenContext::getUnderTimed() {  	uint16 y = data.byte(kTimedy);  	if (data.byte(kForeignrelease))  		y -= 3;  	ds = data.word(kBuffers);  	si = kUndertimedtext; -	multiget(ds.ptr(si, 0), data.byte(kTimedx), y, 240, kUndertimedysize); +	multiGet(ds.ptr(si, 0), data.byte(kTimedx), y, 240, kUndertimedysize);  } -void DreamGenContext::putundertimed() { +void DreamGenContext::putUnderTimed() {  	uint16 y = data.byte(kTimedy);  	if (data.byte(kForeignrelease))  		y -= 3;  	ds = data.word(kBuffers);  	si = kUndertimedtext; -	multiput(ds.ptr(si, 0), data.byte(kTimedx), y, 240, kUndertimedysize); +	multiPut(ds.ptr(si, 0), data.byte(kTimedx), y, 240, kUndertimedysize);  } -void DreamGenContext::usetimedtext() { +void DreamGenContext::useTimedText() {  	if (data.word(kTimecount) == 0)  		return;  	--data.word(kTimecount);  	if (data.word(kTimecount) == 0) { -		putundertimed(); +		putUnderTimed();  		data.byte(kNeedtodumptimed) = 1;  		return;  	}  	if (data.word(kTimecount) == data.word(kCounttotimed)) -		getundertimed(); +		getUnderTimed();  	else if (data.word(kTimecount) > data.word(kCounttotimed))  		return; @@ -530,15 +529,15 @@ void DreamGenContext::usetimedtext() {  	si = data.word(kTimedoffset);  	const uint8 *string = es.ptr(si, 0);  	uint16 y = data.byte(kTimedy); -	printdirect(&string, data.byte(kTimedx), &y, 237, true); +	printDirect(&string, data.byte(kTimedx), &y, 237, true);  	data.byte(kNeedtodumptimed) = 1;  } -void DreamGenContext::setuptimedtemp() { -	setuptimedtemp(al, ah, bl, bh, cx, dx); +void DreamGenContext::setupTimedTemp() { +	setupTimedTemp(al, ah, bl, bh, cx, dx);  } -void DreamGenContext::setuptimedtemp(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount) { +void DreamGenContext::setupTimedTemp(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount) {  #if 1 // if cd  	if (voiceIndex != 0) {  		push(ax); @@ -550,9 +549,9 @@ void DreamGenContext::setuptimedtemp(uint8 textIndex, uint8 voiceIndex, uint8 x,  		cl = 'T';  		ah = 0;  		al = textIndex; -		loadspeech(); +		loadSpeech();  		if (data.byte(kSpeechloaded) == 1) { -			playchannel1(50+12); +			playChannel1(50+12);  		}  		dx = pop();  		cx = pop(); @@ -576,21 +575,21 @@ void DreamGenContext::setuptimedtemp(uint8 textIndex, uint8 voiceIndex, uint8 x,  	data.word(kTimedseg) = data.word(kTextfile1);  	data.word(kTimedoffset) = kTextstart + segRef(data.word(kTextfile1)).word(textIndex * 2);  	const uint8 *string = segRef(data.word(kTextfile1)).ptr(data.word(kTimedoffset), 0); -	debug(1, "setuptimedtemp: (%d, %d) => '%s'", textIndex, voiceIndex, string); +	debug(1, "setupTimedTemp: (%d, %d) => '%s'", textIndex, voiceIndex, string);  } -void DreamGenContext::dumptimedtext() { +void DreamGenContext::dumpTimedText() {  	if (data.byte(kNeedtodumptimed) != 1)  		return;  	uint8 y = data.byte(kTimedy);  	if (data.byte(kForeignrelease) != 0)  		y -= 3; -	multidump(data.byte(kTimedx), y, 240, kUndertimedysize); +	multiDump(data.byte(kTimedx), y, 240, kUndertimedysize);  	data.byte(kNeedtodumptimed) = 0;  } -void DreamGenContext::gettime() { +void DreamGenContext::getTime() {  	TimeDate t;  	g_system->getTimeAndDate(t);  	debug(1, "\tgettime: %02d:%02d:%02d", t.tm_hour, t.tm_min, t.tm_sec); @@ -602,11 +601,11 @@ void DreamGenContext::gettime() {  	data.byte(kHourcount) = ch;  } -void DreamGenContext::allocatemem() { -	ax = allocatemem(bx); +void DreamGenContext::allocateMem() { +	ax = allocateMem(bx);  } -uint16 DreamGenContext::allocatemem(uint16 paragraphs) { +uint16 DreamGenContext::allocateMem(uint16 paragraphs) {  	uint size = (paragraphs + 2) * 16;  	debug(1, "allocate mem, %u bytes", size);  	flags._c = false; @@ -616,11 +615,11 @@ uint16 DreamGenContext::allocatemem(uint16 paragraphs) {  	return result;  } -void DreamGenContext::deallocatemem() { -	deallocatemem((uint16)es); +void DreamGenContext::deallocateMem() { +	deallocateMem((uint16)es);  } -void DreamGenContext::deallocatemem(uint16 segment) { +void DreamGenContext::deallocateMem(uint16 segment) {  	debug(1, "deallocating segment %04x", segment);  	deallocateSegment(segment); @@ -641,48 +640,48 @@ void DreamGenContext::deallocatemem(uint16 segment) {  	}  } -void DreamGenContext::soundstartup() {} -void DreamGenContext::soundend() {} -void DreamGenContext::interupttest() {} -void DreamGenContext::disablesoundint() {} -void DreamGenContext::enablesoundint() {} -void DreamGenContext::checksoundint() { +void DreamGenContext::soundStartup() {} +void DreamGenContext::soundEnd() {} +void DreamGenContext::interruptTest() {} +void DreamGenContext::disableSoundInt() {} +void DreamGenContext::enableSoundInt() {} +void DreamGenContext::checkSoundInt() {  	data.byte(kTestresult) = 1;  } -void DreamGenContext::setsoundoff() { +void DreamGenContext::setSoundOff() {  	warning("setsoundoff: STUB");  } -void DreamGenContext::loadsample() { +void DreamGenContext::loadSample() {  	engine->loadSounds(0, (const char *)data.ptr(dx, 13));  } -void DreamGenContext::loadsecondsample() { +void DreamGenContext::loadSecondSample() {  	uint8 ch0 = data.byte(kCh0playing);  	if (ch0 >= 12 && ch0 != 255) -		cancelch0(); +		cancelCh0();  	uint8 ch1 = data.byte(kCh1playing);  	if (ch1 >= 12) -		cancelch1(); +		cancelCh1();  	engine->loadSounds(1, (const char *)data.ptr(dx, 13));  } -void DreamGenContext::loadspeech() { -	cancelch1(); +void DreamGenContext::loadSpeech() { +	cancelCh1();  	data.byte(kSpeechloaded) = 0; -	createname(); +	createName();  	const char *name = (const char *)data.ptr(di, 13);  	//warning("name = %s", name);  	if (engine->loadSpeech(name))  		data.byte(kSpeechloaded) = 1;  } -void DreamGenContext::savefileread() { +void DreamGenContext::saveFileRead() {  	ax = engine->readFromSaveFile(ds.ptr(dx, cx), cx);  } -void DreamGenContext::loadseg() { +void DreamGenContext::loadSeg() {  	ax = es.word(di);  	di += 2; @@ -698,17 +697,16 @@ void DreamGenContext::error() {  	::error("error");  } -void DreamGenContext::generalerror() { -	::error("generalerror"); +void DreamGenContext::generalError() { +	::error("generalError");  } -void DreamGenContext::dosreturn() { - +void DreamGenContext::DOSReturn() {  	_cmp(data.byte(kCommandtype), 250);  	if (!flags.z()) {  		data.byte(kCommandtype) = 250;  		al = 46; -		commandonly(); +		commandOnly();  	}  	ax = data.word(kMousebutton); @@ -720,7 +718,7 @@ void DreamGenContext::dosreturn() {  	engine->quit();  } -void DreamGenContext::set16colpalette() { +void DreamGenContext::set16ColPalette() {  }  void DreamGenContext::mode640x480() { @@ -730,19 +728,19 @@ void DreamGenContext::mode640x480() {  	initGraphics(640, 480, true);  } -void DreamGenContext::showgroup() { +void DreamGenContext::showGroup() {  	engine->setPalette();  } -void DreamGenContext::fadedos() { +void DreamGenContext::fadeDOS() {  	engine->fadeDos();  } -void DreamGenContext::eraseoldobs() { +void DreamGenContext::eraseOldObs() {  	if (data.byte(kNewobs) == 0)  		return; -	Sprite *sprites = spritetable(); +	Sprite *sprites = spriteTable();  	for (size_t i = 0; i < 16; ++i) {  		Sprite &sprite = sprites[i];  		if (sprite.objData() != 0xffff) { @@ -751,11 +749,11 @@ void DreamGenContext::eraseoldobs() {  	}  } -void DreamGenContext::modifychar() { +void DreamGenContext::modifyChar() {  	al = engine->modifyChar(al);  } -void DreamGenContext::lockmon() { +void DreamGenContext::lockMon() {  	// Pressing space pauses text output in the monitor. We use the "hard"  	// key because calling readkey() drains characters from the input  	// buffer, we we want the user to be able to type ahead while the text @@ -764,42 +762,42 @@ void DreamGenContext::lockmon() {  		// Clear the keyboard buffer. Otherwise the space that caused  		// the pause will be read immediately unpause the game.  		do { -			readkey(); +			readKey();  		} while (data.byte(kCurrentkey) != 0); -		locklighton(); +		lockLightOn();  		while (!engine->shouldQuit()) {  			engine->waitForVSync(); -			readkey(); +			readKey();  			if (data.byte(kCurrentkey) == ' ')  				break;  		}  		// Forget the last "hard" key, otherwise the space that caused  		// the unpausing will immediately re-pause the game.  		data.byte(kLasthardkey) = 0; -		locklightoff(); +		lockLightOff();  	}  } -void DreamGenContext::cancelch0() { +void DreamGenContext::cancelCh0() {  	data.byte(kCh0repeat) = 0;  	data.word(kCh0blockstocopy) = 0;  	data.byte(kCh0playing) = 255;  	engine->stopSound(0);  } -void DreamGenContext::cancelch1() { +void DreamGenContext::cancelCh1() {  	data.word(kCh1blockstocopy) = 0;  	data.byte(kCh1playing) = 255;  	engine->stopSound(1);  } -void DreamGenContext::makebackob(SetObject *objData) { +void DreamGenContext::makeBackOb(SetObject *objData) {  	if (data.byte(kNewobs) == 0)  		return;  	uint8 priority = objData->priority;  	uint8 type = objData->type; -	Sprite *sprite = makesprite(data.word(kObjectx), data.word(kObjecty), addr_backobject, data.word(kSetframes), 0); +	Sprite *sprite = makeSprite(data.word(kObjectx), data.word(kObjecty), addr_backobject, data.word(kSetframes), 0);  	uint16 objDataOffset = (uint8 *)objData - segRef(data.word(kSetdat)).ptr(0, 0);  	assert(objDataOffset % sizeof(SetObject) == 0); @@ -814,16 +812,16 @@ void DreamGenContext::makebackob(SetObject *objData) {  	sprite->animFrame = 0;  } -void DreamGenContext::getroomdata() { -	Room *room = getroomdata(al); +void DreamGenContext::getRoomData() { +	Room *room = getRoomData(al);  	bx = (uint8 *)room - cs.ptr(0, 0);  } -Room *DreamGenContext::getroomdata(uint8 room) { +Room *DreamGenContext::getRoomData(uint8 room) {  	return (Room *)cs.ptr(kRoomdata, 0) + room;  } -void DreamGenContext::readheader() { +void DreamGenContext::readHeader() {  	ax = engine->readFromFile(cs.ptr(kFileheader, kHeaderlen), kHeaderlen);  	es = cs;  	di = kFiledata; @@ -831,7 +829,7 @@ void DreamGenContext::readheader() {  uint16 DreamGenContext::allocateAndLoad(unsigned int size) {  	// allocatemem adds 32 bytes, so it doesn't matter that size/16 rounds down -	uint16 result = allocatemem(size / 16); +	uint16 result = allocateMem(size / 16);  	engine->readFromFile(segRef(result).ptr(0, size), size);  	return result;  } @@ -844,7 +842,7 @@ void DreamGenContext::clearAndLoad(uint16 seg, uint8 c,  	engine->readFromFile(buf, size);  } -void DreamGenContext::startloading(const Room *room) { +void DreamGenContext::startLoading(const Room *room) {  	data.byte(kCombatcount) = 0;  	data.byte(kRoomssample) = room->roomsSample;  	data.byte(kMapx) = room->mapX; @@ -864,11 +862,11 @@ void DreamGenContext::startloading(const Room *room) {  	loadRoomData(room, false); -	findroominloc(); -	deletetaken(); -	setallchanges(); -	autoappear(); -	Room *newRoom = getroomdata(data.byte(kNewlocation)); +	findRoomInLoc(); +	deleteTaken(); +	setAllChanges(); +	autoAppear(); +	Room *newRoom = getRoomData(data.byte(kNewlocation));  	bx = (uint8 *)newRoom - cs.ptr(0, 0);  	data.byte(kLastweapon) = (uint8)-1;  	data.byte(kMandead) = 0; @@ -878,61 +876,61 @@ void DreamGenContext::startloading(const Room *room) {  	if (room->b27 != 255) {  		data.byte(kManspath) = room->b27;  		push(bx); -		autosetwalk(); +		autoSetWalk();  		bx = pop();  	} -	findxyfrompath(); +	findXYFromPath();  } -void DreamGenContext::fillspace() { +void DreamGenContext::fillSpace() {  	memset(ds.ptr(dx, cx), al, cx);  } -void DreamGenContext::dealwithspecial(uint8 firstParam, uint8 secondParam) { +void DreamGenContext::dealWithSpecial(uint8 firstParam, uint8 secondParam) {  	uint8 type = firstParam - 220;  	if (type == 0) { -		placesetobject(secondParam); +		placeSetObject(secondParam);  		data.byte(kHavedoneobs) = 1;  	} else if (type == 1) { -		removesetobject(secondParam); +		removeSetObject(secondParam);  		data.byte(kHavedoneobs) = 1;  	} else if (type == 2) {  		al = secondParam; -		placefreeobject(); +		placeFreeObject();  		data.byte(kHavedoneobs) = 1;  	} else if (type == 3) {  		al = secondParam; -		removefreeobject(); +		removeFreeObject();  		data.byte(kHavedoneobs) = 1;  	} else if (type == 4) { -		switchryanoff(); +		switchRyanOff();  	} else if (type == 5) {  		data.byte(kTurntoface) = secondParam;  		data.byte(kFacing) = secondParam; -		switchryanon(); +		switchRyanOn();  	} else if (type == 6) {  		data.byte(kNewlocation) = secondParam;  	} else { -		movemap(secondParam); +		moveMap(secondParam);  	}  } -void DreamGenContext::plotreel() { -	Reel *reel = getreelstart(); +void DreamGenContext::plotReel() { +	Reel *reel = getReelStart();  	while (reel->x >= 220 && reel->x != 255) { -		dealwithspecial(reel->x, reel->y); +		dealWithSpecial(reel->x, reel->y);  		++data.word(kReelpointer);  		reel += 8;  	}  	for (size_t i = 0; i < 8; ++i) {  		if (reel->frame() != 0xffff) -			showreelframe(reel); +			showReelFrame(reel);  		++reel;  	}  	push(es);  	push(bx); -	soundonreels(); +	soundOnReels();  	bx = pop();  	es = pop();  } @@ -945,46 +943,46 @@ void DreamGenContext::crosshair() {  		frame = 29;  	}  	const Frame *src = (const Frame *)segRef(data.word(kIcons1)).ptr(0, 0); -	showframe(src, kZoomx + 24, kZoomy + 19, frame, 0); +	showFrame(src, kZoomx + 24, kZoomy + 19, frame, 0);  } -void DreamGenContext::deltextline() { +void DreamGenContext::delTextLine() {  	uint16 x = data.word(kTextaddressx);  	uint16 y = data.word(kTextaddressy);  	if (data.byte(kForeignrelease) != 0)  		y -= 3; -	multiput(textUnder(), x, y, kUndertextsizex, kUndertextsizey); +	multiPut(textUnder(), x, y, kUndertextsizex, kUndertextsizey);  } -void DreamGenContext::commandonly() { -	commandonly(al);	 +void DreamGenContext::commandOnly() { +	commandOnly(al);	  } -void DreamGenContext::commandonly(uint8 command) { -	deltextline(); +void DreamGenContext::commandOnly(uint8 command) { +	delTextLine();  	uint16 index = command * 2;  	uint16 offset = kTextstart + segRef(data.word(kCommandtext)).word(index);  	uint16 y = data.word(kTextaddressy);  	const uint8 *string = segRef(data.word(kCommandtext)).ptr(offset, 0); -	printdirect(&string, data.word(kTextaddressx), &y, data.byte(kTextlen), (bool)(data.byte(kTextlen) & 1)); +	printDirect(&string, data.word(kTextaddressx), &y, data.byte(kTextlen), (bool)(data.byte(kTextlen) & 1));  	data.byte(kNewtextline) = 1;  } -void DreamGenContext::checkifperson() { -	flags._z = !checkifperson(al, ah); +void DreamGenContext::checkIfPerson() { +	flags._z = !checkIfPerson(al, ah);  } -bool DreamGenContext::checkifperson(uint8 x, uint8 y) { +bool DreamGenContext::checkIfPerson(uint8 x, uint8 y) {  	People *people = (People *)segRef(data.word(kBuffers)).ptr(kPeoplelist, 0);  	for (size_t i = 0; i < 12; ++i, ++people) {  		if (people->b4 == 255)  			continue;  		data.word(kReelpointer) = people->reelPointer(); -		Reel *reel = getreelstart(); +		Reel *reel = getReelStart();  		if (reel->frame() == 0xffff)  			++reel; -		const Frame *frame = getreelframeax(reel->frame()); +		const Frame *frame = getReelFrameAX(reel->frame());  		uint8 xmin = reel->x + frame->x;  		uint8 ymin = reel->y + frame->y;  		uint8 xmax = xmin + frame->width; @@ -998,45 +996,45 @@ bool DreamGenContext::checkifperson(uint8 x, uint8 y) {  		if (y >= ymax)  			continue;  		data.word(kPersondata) = people->routinePointer(); -		obname(people->b4, 5); +		obName(people->b4, 5);  		return true;  	}  	return false;  } -void DreamGenContext::checkiffree() { -	flags._z = !checkiffree(al, ah); +void DreamGenContext::checkIfFree() { +	flags._z = !checkIfFree(al, ah);  } -bool DreamGenContext::checkiffree(uint8 x, uint8 y) { +bool DreamGenContext::checkIfFree(uint8 x, uint8 y) {  	const ObjPos *freeList = (const ObjPos *)segRef(data.word(kBuffers)).ptr(kFreelist, 80 * sizeof(ObjPos));  	for (size_t i = 0; i < 80; ++i) {  		const ObjPos *objPos = freeList + 79 - i;  		if (objPos->index == 0xff || !objPos->contains(x,y))  			continue; -		obname(objPos->index, 2); +		obName(objPos->index, 2);  		return true;  	}  	return false;  } -void DreamGenContext::checkifex() { -	flags._z = !checkifex(al, ah); +void DreamGenContext::checkIfEx() { +	flags._z = !checkIfEx(al, ah);  } -bool DreamGenContext::checkifex(uint8 x, uint8 y) { +bool DreamGenContext::checkIfEx(uint8 x, uint8 y) {  	const ObjPos *exList = (const ObjPos *)segRef(data.word(kBuffers)).ptr(kExlist, 100 * sizeof(ObjPos));  	for (size_t i = 0; i < 100; ++i) {  		const ObjPos *objPos = exList + 99 - i;  		if (objPos->index == 0xff || !objPos->contains(x,y))  			continue; -		obname(objPos->index, 4); +		obName(objPos->index, 4);  		return true;  	}  	return false;  } -const uint8 *DreamGenContext::findobname(uint8 type, uint8 index) { +const uint8 *DreamGenContext::findObName(uint8 type, uint8 index) {  	if (type == 5) {  		uint16 i = 64 * 2 * (index & 127);  		uint16 offset = segRef(data.word(kPeople)).word(kPersontxtdat + i) + kPersontext; @@ -1056,12 +1054,12 @@ const uint8 *DreamGenContext::findobname(uint8 type, uint8 index) {  	}  } -void DreamGenContext::copyname() { -	copyname(ah, al, cs.ptr(di, 0)); +void DreamGenContext::copyName() { +	copyName(ah, al, cs.ptr(di, 0));  } -void DreamGenContext::copyname(uint8 type, uint8 index, uint8 *dst) { -	const uint8 *src = findobname(type, index); +void DreamGenContext::copyName(uint8 type, uint8 index, uint8 *dst) { +	const uint8 *src = findObName(type, index);  	size_t i;  	for (i = 0; i < 28; ++i) {   		char c = src[i]; @@ -1074,57 +1072,57 @@ void DreamGenContext::copyname(uint8 type, uint8 index, uint8 *dst) {  	dst[i] = 0;  } -void DreamGenContext::commandwithob() { -	commandwithob(al, bh, bl);  +void DreamGenContext::commandWithOb() { +	commandWithOb(al, bh, bl);   } -void DreamGenContext::commandwithob(uint8 command, uint8 type, uint8 index) { +void DreamGenContext::commandWithOb(uint8 command, uint8 type, uint8 index) {  	uint8 commandLine[64] = "OBJECT NAME ONE                         "; -	deltextline(); +	delTextLine();  	uint16 commandText = kTextstart + segRef(data.word(kCommandtext)).word(command * 2);  	uint8 textLen = data.byte(kTextlen);  	{  		const uint8 *string = segRef(data.word(kCommandtext)).ptr(commandText, 0); -		printdirect(string, data.word(kTextaddressx), data.word(kTextaddressy), textLen, (bool)(textLen & 1)); +		printDirect(string, data.word(kTextaddressx), data.word(kTextaddressy), textLen, (bool)(textLen & 1));  	} -	copyname(type, index, commandLine); +	copyName(type, index, commandLine);  	uint16 x = data.word(kLastxpos);  	if (command != 0)  		x += 5; -	printdirect(commandLine, x, data.word(kTextaddressy), textLen, (bool)(textLen & 1)); +	printDirect(commandLine, x, data.word(kTextaddressy), textLen, (bool)(textLen & 1));  	data.byte(kNewtextline) = 1;  } -void DreamGenContext::examineobtext() { -	commandwithob(1, data.byte(kCommandtype), data.byte(kCommand)); +void DreamGenContext::examineObText() { +	commandWithOb(1, data.byte(kCommandtype), data.byte(kCommand));  } -void DreamGenContext::showpanel() { +void DreamGenContext::showPanel() {  	Frame *frame = (Frame *)segRef(data.word(kIcons1)).ptr(0, sizeof(Frame)); -	showframe(frame, 72, 0, 19, 0); -	showframe(frame, 192, 0, 19, 0); +	showFrame(frame, 72, 0, 19, 0); +	showFrame(frame, 192, 0, 19, 0);  } -void DreamGenContext::blocknametext() { -	commandwithob(0, data.byte(kCommandtype), data.byte(kCommand)); +void DreamGenContext::blockNameText() { +	commandWithOb(0, data.byte(kCommandtype), data.byte(kCommand));  } -void DreamGenContext::personnametext() { -	commandwithob(2, data.byte(kCommandtype), data.byte(kCommand) & 127); +void DreamGenContext::personNameText() { +	commandWithOb(2, data.byte(kCommandtype), data.byte(kCommand) & 127);  } -void DreamGenContext::walktotext() { -	commandwithob(3, data.byte(kCommandtype), data.byte(kCommand)); +void DreamGenContext::walkToText() { +	commandWithOb(3, data.byte(kCommandtype), data.byte(kCommand));  } -void DreamGenContext::findormake() { +void DreamGenContext::findOrMake() {  	uint8 b0 = al;  	uint8 b2 = cl;  	uint8 b3 = ch; -	findormake(b0, b2, b3); +	findOrMake(b0, b2, b3);  } -void DreamGenContext::findormake(uint8 index, uint8 value, uint8 type) { +void DreamGenContext::findOrMake(uint8 index, uint8 value, uint8 type) {  	Change *change = (Change *)segRef(data.word(kBuffers)).ptr(kListofchanges, sizeof(Change));  	for (; change->index != 0xff; ++change) {  		if (index == change->index && data.byte(kReallocation) == change->location && type == change->type) { @@ -1139,65 +1137,65 @@ void DreamGenContext::findormake(uint8 index, uint8 value, uint8 type) {  	change->type = type;  } -void DreamGenContext::setallchanges() { +void DreamGenContext::setAllChanges() {  	Change *change = (Change *)segRef(data.word(kBuffers)).ptr(kListofchanges, sizeof(Change));  	for (; change->index != 0xff; ++change)  		if (change->location == data.byte(kReallocation)) -			dochange(change->index, change->value, change->type); +			doChange(change->index, change->value, change->type);  } -DynObject *DreamGenContext::getfreead(uint8 index) { +DynObject *DreamGenContext::getFreeAd(uint8 index) {  	return (DynObject *)segRef(data.word(kFreedat)).ptr(0, 0) + index;  } -DynObject *DreamGenContext::getexad(uint8 index) { +DynObject *DreamGenContext::getExAd(uint8 index) {  	return (DynObject *)segRef(data.word(kExtras)).ptr(kExdata, 0) + index;  } -DynObject *DreamGenContext::geteitheradCPP() { +DynObject *DreamGenContext::getEitherAdCPP() {  	if (data.byte(kObjecttype) == 4) -		return getexad(data.byte(kItemframe)); +		return getExAd(data.byte(kItemframe));  	else -		return getfreead(data.byte(kItemframe)); +		return getFreeAd(data.byte(kItemframe));  } -void *DreamGenContext::getanyad(uint8 *value1, uint8 *value2) { +void *DreamGenContext::getAnyAd(uint8 *value1, uint8 *value2) {  	if (data.byte(kObjecttype) == 4) { -		DynObject *exObject = getexad(data.byte(kCommand)); +		DynObject *exObject = getExAd(data.byte(kCommand));  		*value1 = exObject->b7;  		*value2 = exObject->b8;  		return exObject;  	} else if (data.byte(kObjecttype) == 2) { -		DynObject *freeObject = getfreead(data.byte(kCommand)); +		DynObject *freeObject = getFreeAd(data.byte(kCommand));  		*value1 = freeObject->b7;  		*value2 = freeObject->b8;  		return freeObject;  	} else { -		SetObject *setObject = getsetad(data.byte(kCommand)); +		SetObject *setObject = getSetAd(data.byte(kCommand));  		*value1 = setObject->b4;  		*value2 = setObject->priority;  		return setObject;  	}  } -void *DreamGenContext::getanyaddir(uint8 index, uint8 flag) { +void *DreamGenContext::getAnyAdDir(uint8 index, uint8 flag) {  	if (flag == 4) -		return getexad(index); +		return getExAd(index);  	else if (flag == 2) -		return getfreead(index); +		return getFreeAd(index);  	else -		return getsetad(index); +		return getSetAd(index);  } -SetObject *DreamGenContext::getsetad(uint8 index) { +SetObject *DreamGenContext::getSetAd(uint8 index) {  	return (SetObject *)segRef(data.word(kSetdat)).ptr(0, 0) + index;  } -void DreamGenContext::dochange(uint8 index, uint8 value, uint8 type) { +void DreamGenContext::doChange(uint8 index, uint8 value, uint8 type) {  	if (type == 0) { //object -		getsetad(index)->mapad[0] = value; -	} else if (type == 1) { //freeobject -		DynObject *freeObject = getfreead(index); +		getSetAd(index)->mapad[0] = value; +	} else if (type == 1) { //freeObject +		DynObject *freeObject = getFreeAd(index);  		if (freeObject->mapad[0] == 0xff)  			freeObject->mapad[0] = value;  	} else { //path @@ -1207,7 +1205,7 @@ void DreamGenContext::dochange(uint8 index, uint8 value, uint8 type) {  	}  } -void DreamGenContext::deletetaken() { +void DreamGenContext::deleteTaken() {  	const DynObject *extraObjects = (const DynObject *)segRef(data.word(kExtras)).ptr(kExdata, 0);  	DynObject *freeObjects = (DynObject *)segRef(data.word(kFreedat)).ptr(0, 0);  	for(size_t i = 0; i < kNumexobjects; ++i) { @@ -1219,7 +1217,7 @@ void DreamGenContext::deletetaken() {  	}  } -void DreamGenContext::getexpos() { +void DreamGenContext::getExPos() {  	es = data.word(kExtras);  	const DynObject *objects = (const DynObject *)segRef(data.word(kExtras)).ptr(kExdata, sizeof(DynObject));  	for (size_t i = 0; i < kNumexobjects; ++i) { @@ -1233,75 +1231,75 @@ void DreamGenContext::getexpos() {  	di = kExdata + kNumexobjects * sizeof(DynObject);  } -void DreamGenContext::placesetobject() { -	placesetobject(al); +void DreamGenContext::placeSetObject() { +	placeSetObject(al);  } -void DreamGenContext::placesetobject(uint8 index) { -	findormake(index, 0, 0); -	getsetad(index)->mapad[0] = 0; +void DreamGenContext::placeSetObject(uint8 index) { +	findOrMake(index, 0, 0); +	getSetAd(index)->mapad[0] = 0;  } -void DreamGenContext::removesetobject() { -	removesetobject(al); +void DreamGenContext::removeSetObject() { +	removeSetObject(al);  } -void DreamGenContext::removesetobject(uint8 index) { -	findormake(index, 0xff, 0); -	getsetad(index)->mapad[0] = 0xff; +void DreamGenContext::removeSetObject(uint8 index) { +	findOrMake(index, 0xff, 0); +	getSetAd(index)->mapad[0] = 0xff;  } -void DreamGenContext::finishedwalking() { -	flags._z = finishedwalkingCPP(); +void DreamGenContext::finishedWalking() { +	flags._z = finishedWalkingCPP();  } -bool DreamGenContext::finishedwalkingCPP() { +bool DreamGenContext::finishedWalkingCPP() {  	return (data.byte(kLinepointer) == 254) && (data.byte(kFacing) == data.byte(kTurntoface));  } -void DreamGenContext::getflagunderp() { +void DreamGenContext::getFlagUnderP() {  	uint8 flag, flagEx; -	getflagunderp(&flag, &flagEx); +	getFlagUnderP(&flag, &flagEx);  	cl = flag;  	ch = flagEx;  } -void DreamGenContext::getflagunderp(uint8 *flag, uint8 *flagEx) { +void DreamGenContext::getFlagUnderP(uint8 *flag, uint8 *flagEx) {  	uint8 type, flagX, flagY; -	checkone(data.word(kMousex) - data.word(kMapadx), data.word(kMousey) - data.word(kMapady), flag, flagEx, &type, &flagX, &flagY); +	checkOne(data.word(kMousex) - data.word(kMapadx), data.word(kMousey) - data.word(kMapady), flag, flagEx, &type, &flagX, &flagY);  	cl = data.byte(kLastflag) = *flag;  	ch = data.byte(kLastflagex) = *flagEx;  } -void DreamGenContext::walkandexamine() { -	if (!finishedwalkingCPP()) +void DreamGenContext::walkAndExamine() { +	if (!finishedWalkingCPP())  		return;  	data.byte(kCommandtype) = data.byte(kWalkexamtype);  	data.byte(kCommand) = data.byte(kWalkexamnum);  	data.byte(kWalkandexam) = 0;  	if (data.byte(kCommandtype) != 5) -		examineob(); +		examineOb();  } -void DreamGenContext::obname() { -	obname(al, ah); +void DreamGenContext::obName() { +	obName(al, ah);  } -void DreamGenContext::obname(uint8 command, uint8 commandType) { +void DreamGenContext::obName(uint8 command, uint8 commandType) {  	if (data.byte(kReasseschanges) == 0) {  		if ((commandType == data.byte(kCommandtype)) && (command == data.byte(kCommand))) {  			if (data.byte(kWalkandexam) == 1) { -				walkandexamine(); +				walkAndExamine();  				return;  			} else if (data.word(kMousebutton) == 0)  				return;  			else if ((data.byte(kCommandtype) == 3) && (data.byte(kLastflag) < 2))  				return;  			else if ((data.byte(kManspath) != data.byte(kPointerspath)) || (data.byte(kCommandtype) == 3)) { -				setwalk(); +				setWalk();  				data.byte(kReasseschanges) = 1;  				return; -			} else if (! finishedwalkingCPP()) +			} else if (! finishedWalkingCPP())  				return;  			else if (data.byte(kCommandtype) == 5) {  				if (data.word(kWatchingtime) == 0) @@ -1309,7 +1307,7 @@ void DreamGenContext::obname(uint8 command, uint8 commandType) {  				return;  			} else {  				if (data.word(kWatchingtime) == 0) -					examineob(); +					examineOb();  				return;  			}  		} @@ -1319,56 +1317,56 @@ void DreamGenContext::obname(uint8 command, uint8 commandType) {  	data.byte(kCommand) = command;  	data.byte(kCommandtype) = commandType;  	if ((data.byte(kLinepointer) != 254) || (data.word(kWatchingtime) != 0) || (data.byte(kFacing) != data.byte(kTurntoface))) { -		blocknametext(); +		blockNameText();  		return;  	} else if (data.byte(kCommandtype) != 3) {  		if (data.byte(kManspath) != data.byte(kPointerspath)) { -			walktotext(); +			walkToText();  			return;  		} else if (data.byte(kCommandtype) == 3) { -			blocknametext(); +			blockNameText();  			return;  		} else if (data.byte(kCommandtype) == 5) { -			personnametext(); +			personNameText();  			return;  		} else { -			examineobtext(); +			examineObText();  			return;  		}  	}  	if (data.byte(kManspath) == data.byte(kPointerspath)) {  		uint8 flag, flagEx, type, flagX, flagY; -		checkone(data.byte(kRyanx) + 12, data.byte(kRyany) + 12, &flag, &flagEx, &type, &flagX, &flagY); +		checkOne(data.byte(kRyanx) + 12, data.byte(kRyany) + 12, &flag, &flagEx, &type, &flagX, &flagY);  		if (flag < 2) { -			blocknametext(); +			blockNameText();  			return;  		}  	} -	getflagunderp(); +	getFlagUnderP();  	if (data.byte(kLastflag) < 2) { -		blocknametext(); +		blockNameText();  		return;  	} else if (data.byte(kLastflag) >= 128) { -		blocknametext(); +		blockNameText();  		return;  	} else { -		walktotext(); +		walkToText();  		return;  	}  } -void DreamGenContext::delpointer() { +void DreamGenContext::delPointer() {  	if (data.word(kOldpointerx) == 0xffff)  		return;  	data.word(kDelherex) = data.word(kOldpointerx);  	data.word(kDelherey) = data.word(kOldpointery);  	data.byte(kDelxs) = data.byte(kPointerxs);  	data.byte(kDelys) = data.byte(kPointerys); -	multiput(segRef(data.word(kBuffers)).ptr(kPointerback, 0), data.word(kDelherex), data.word(kDelherey), data.byte(kPointerxs), data.byte(kPointerys)); +	multiPut(segRef(data.word(kBuffers)).ptr(kPointerback, 0), data.word(kDelherex), data.word(kDelherey), data.byte(kPointerxs), data.byte(kPointerys));  } -void DreamGenContext::showblink() { +void DreamGenContext::showBlink() {  	if (data.byte(kManisoffscreen) == 1)  		return;  	++data.byte(kBlinkcount); @@ -1386,148 +1384,148 @@ void DreamGenContext::showblink() {  		blinkFrame = 6;  	static const uint8 blinkTab[] = { 16,18,18,17,16,16,16 };  	uint8 width, height; -	showframe((Frame *)segRef(data.word(kIcons1)).ptr(0, 0), 44, 32, blinkTab[blinkFrame], 0, &width, &height); +	showFrame((Frame *)segRef(data.word(kIcons1)).ptr(0, 0), 44, 32, blinkTab[blinkFrame], 0, &width, &height);  } -void DreamGenContext::dumpblink() { +void DreamGenContext::dumpBlink() {  	if (data.byte(kShadeson) != 0)  		return;  	if (data.byte(kBlinkcount) != 0)  		return;  	if (data.byte(kBlinkframe) >= 6)  		return; -	multidump(44, 32, 16, 12); +	multiDump(44, 32, 16, 12);  } -void DreamGenContext::dumppointer() { -	dumpblink(); -	multidump(data.word(kDelherex), data.word(kDelherey), data.byte(kDelxs), data.byte(kDelys)); +void DreamGenContext::dumpPointer() { +	dumpBlink(); +	multiDump(data.word(kDelherex), data.word(kDelherey), data.byte(kDelxs), data.byte(kDelys));  	if ((data.word(kOldpointerx) != data.word(kDelherex)) || (data.word(kOldpointery) != data.word(kDelherey))) -		multidump(data.word(kOldpointerx), data.word(kOldpointery), data.byte(kPointerxs), data.byte(kPointerys)); +		multiDump(data.word(kOldpointerx), data.word(kOldpointery), data.byte(kPointerxs), data.byte(kPointerys));  } -void DreamGenContext::checkcoords() { +void DreamGenContext::checkCoords() {  	// FIXME: Move all these lists to the callers  	switch ((uint16)bx) {  	case offset_talklist: { -		RectWithCallback talklist[] = { -			{ 273,320,157,198,&DreamGenContext::getback1 }, -			{ 240,290,2,44,&DreamGenContext::moretalk }, +		RectWithCallback talkList[] = { +			{ 273,320,157,198,&DreamGenContext::getBack1 }, +			{ 240,290,2,44,&DreamGenContext::moreTalk },  			{ 0,320,0,200,&DreamGenContext::blank },  			{ 0xFFFF,0,0,0,0 }  		}; -		checkcoords(talklist); +		checkCoords(talkList);  		break;  	}  	case offset_quitlist: { -		RectWithCallback quitlist[] = { -			{ 273,320,157,198,&DreamGenContext::getback1 }, +		RectWithCallback quitList[] = { +			{ 273,320,157,198,&DreamGenContext::getBack1 },  			{ 0,320,0,200,&DreamGenContext::blank },  			{ 0xFFFF,0,0,0,0 }  		}; -		checkcoords(quitlist); +		checkCoords(quitList);  		break;  	}  	case offset_destlist: { -		RectWithCallback destlist[] = { -			{ 238,258,4,44,&DreamGenContext::nextdest }, -			{ 104,124,4,44,&DreamGenContext::lastdest }, -			{ 280,308,4,44,&DreamGenContext::lookatplace }, -			{ 104,216,138,192,&DreamGenContext::destselect }, -			{ 273,320,157,198,&DreamGenContext::getback1 }, +		RectWithCallback destList[] = { +			{ 238,258,4,44,&DreamGenContext::nextDest }, +			{ 104,124,4,44,&DreamGenContext::lastDest }, +			{ 280,308,4,44,&DreamGenContext::lookAtPlace }, +			{ 104,216,138,192,&DreamGenContext::destSelect }, +			{ 273,320,157,198,&DreamGenContext::getBack1 },  			{ 0,320,0,200,&DreamGenContext::blank },  			{ 0xFFFF,0,0,0,0 }  		}; -		checkcoords(destlist); +		checkCoords(destList);  		break;  	}  	case offset_keypadlist: { -		RectWithCallback keypadlist[] = { -			{ kKeypadx+9,kKeypadx+30,kKeypady+9,kKeypady+22,&DreamGenContext::buttonone }, -			{ kKeypadx+31,kKeypadx+52,kKeypady+9,kKeypady+22,&DreamGenContext::buttontwo }, -			{ kKeypadx+53,kKeypadx+74,kKeypady+9,kKeypady+22,&DreamGenContext::buttonthree }, -			{ kKeypadx+9,kKeypadx+30,kKeypady+23,kKeypady+40,&DreamGenContext::buttonfour }, -			{ kKeypadx+31,kKeypadx+52,kKeypady+23,kKeypady+40,&DreamGenContext::buttonfive }, -			{ kKeypadx+53,kKeypadx+74,kKeypady+23,kKeypady+40,&DreamGenContext::buttonsix }, -			{ kKeypadx+9,kKeypadx+30,kKeypady+41,kKeypady+58,&DreamGenContext::buttonseven }, -			{ kKeypadx+31,kKeypadx+52,kKeypady+41,kKeypady+58,&DreamGenContext::buttoneight }, -			{ kKeypadx+53,kKeypadx+74,kKeypady+41,kKeypady+58,&DreamGenContext::buttonnine }, -			{ kKeypadx+9,kKeypadx+30,kKeypady+59,kKeypady+73,&DreamGenContext::buttonnought }, -			{ kKeypadx+31,kKeypadx+74,kKeypady+59,kKeypady+73,&DreamGenContext::buttonenter }, -			{ kKeypadx+72,kKeypadx+86,kKeypady+80,kKeypady+94,&DreamGenContext::quitkey }, +		RectWithCallback keypadList[] = { +			{ kKeypadx+9,kKeypadx+30,kKeypady+9,kKeypady+22,&DreamGenContext::buttonOne }, +			{ kKeypadx+31,kKeypadx+52,kKeypady+9,kKeypady+22,&DreamGenContext::buttonTwo }, +			{ kKeypadx+53,kKeypadx+74,kKeypady+9,kKeypady+22,&DreamGenContext::buttonThree }, +			{ kKeypadx+9,kKeypadx+30,kKeypady+23,kKeypady+40,&DreamGenContext::buttonFour }, +			{ kKeypadx+31,kKeypadx+52,kKeypady+23,kKeypady+40,&DreamGenContext::buttonFive }, +			{ kKeypadx+53,kKeypadx+74,kKeypady+23,kKeypady+40,&DreamGenContext::buttonSix }, +			{ kKeypadx+9,kKeypadx+30,kKeypady+41,kKeypady+58,&DreamGenContext::buttonSeven }, +			{ kKeypadx+31,kKeypadx+52,kKeypady+41,kKeypady+58,&DreamGenContext::buttonEight }, +			{ kKeypadx+53,kKeypadx+74,kKeypady+41,kKeypady+58,&DreamGenContext::buttonNine }, +			{ kKeypadx+9,kKeypadx+30,kKeypady+59,kKeypady+73,&DreamGenContext::buttonNought }, +			{ kKeypadx+31,kKeypadx+74,kKeypady+59,kKeypady+73,&DreamGenContext::buttonEnter }, +			{ kKeypadx+72,kKeypadx+86,kKeypady+80,kKeypady+94,&DreamGenContext::quitKey },  			{ 0,320,0,200,&DreamGenContext::blank },  			{ 0xFFFF,0,0,0,0 }  		}; -		checkcoords(keypadlist); +		checkCoords(keypadList);  		break;  	}  	case offset_menulist: { -		RectWithCallback menulist[] = { -			{ kMenux+54,kMenux+68,kMenuy+72,kMenuy+88,&DreamGenContext::quitkey }, +		RectWithCallback menuList[] = { +			{ kMenux+54,kMenux+68,kMenuy+72,kMenuy+88,&DreamGenContext::quitKey },  			{ 0,320,0,200,&DreamGenContext::blank },  			{ 0xFFFF,0,0,0,0 }  		}; -		checkcoords(menulist); +		checkCoords(menuList);  		break;  	}  	case offset_symbollist: { -		RectWithCallback symbollist[] = { -			{ kSymbolx+40,kSymbolx+64,kSymboly+2,kSymboly+16,&DreamGenContext::quitsymbol }, -			{ kSymbolx,kSymbolx+52,kSymboly+20,kSymboly+50,&DreamGenContext::settopleft }, -			{ kSymbolx+52,kSymbolx+104,kSymboly+20,kSymboly+50,&DreamGenContext::settopright }, -			{ kSymbolx,kSymbolx+52,kSymboly+50,kSymboly+80,&DreamGenContext::setbotleft }, -			{ kSymbolx+52,kSymbolx+104,kSymboly+50,kSymboly+80,&DreamGenContext::setbotright }, +		RectWithCallback symbolList[] = { +			{ kSymbolx+40,kSymbolx+64,kSymboly+2,kSymboly+16,&DreamGenContext::quitSymbol }, +			{ kSymbolx,kSymbolx+52,kSymboly+20,kSymboly+50,&DreamGenContext::setTopLeft }, +			{ kSymbolx+52,kSymbolx+104,kSymboly+20,kSymboly+50,&DreamGenContext::setTopRight }, +			{ kSymbolx,kSymbolx+52,kSymboly+50,kSymboly+80,&DreamGenContext::setBotLeft }, +			{ kSymbolx+52,kSymbolx+104,kSymboly+50,kSymboly+80,&DreamGenContext::setBotRight },  			{ 0,320,0,200,&DreamGenContext::blank },  			{ 0xFFFF,0,0,0,0 }  		}; -		checkcoords(symbollist); +		checkCoords(symbolList);  		break;  	}  	case offset_diarylist: { -		RectWithCallback diarylist[] = { -			{ kDiaryx+94,kDiaryx+110,kDiaryy+97,kDiaryy+113,&DreamGenContext::diarykeyn }, -			{ kDiaryx+151,kDiaryx+167,kDiaryy+71,kDiaryy+87,&DreamGenContext::diarykeyp }, -			{ kDiaryx+176,kDiaryx+192,kDiaryy+108,kDiaryy+124,&DreamGenContext::quitkey }, +		RectWithCallback diaryList[] = { +			{ kDiaryx+94,kDiaryx+110,kDiaryy+97,kDiaryy+113,&DreamGenContext::diaryKeyN }, +			{ kDiaryx+151,kDiaryx+167,kDiaryy+71,kDiaryy+87,&DreamGenContext::diaryKeyP }, +			{ kDiaryx+176,kDiaryx+192,kDiaryy+108,kDiaryy+124,&DreamGenContext::quitKey },  			{ 0,320,0,200,&DreamGenContext::blank },  			{ 0xFFFF,0,0,0,0 }  		}; -		checkcoords(diarylist); +		checkCoords(diaryList);  		break;  	}  	case offset_opslist: { -		RectWithCallback opslist[] = { -			{ kOpsx+59,kOpsx+114,kOpsy+30,kOpsy+76,&DreamGenContext::getbackfromops }, -			{ kOpsx+10,kOpsx+77,kOpsy+10,kOpsy+59,&DreamGenContext::dosreturn }, -			{ kOpsx+128,kOpsx+190,kOpsy+16,kOpsy+100,&DreamGenContext::discops }, +		RectWithCallback opsList[] = { +			{ kOpsx+59,kOpsx+114,kOpsy+30,kOpsy+76,&DreamGenContext::getBackFromOps }, +			{ kOpsx+10,kOpsx+77,kOpsy+10,kOpsy+59,&DreamGenContext::DOSReturn }, +			{ kOpsx+128,kOpsx+190,kOpsy+16,kOpsy+100,&DreamGenContext::discOps },  			{ 0,320,0,200,&DreamGenContext::blank },  			{ 0xFFFF,0,0,0,0 }  		}; -		checkcoords(opslist); +		checkCoords(opsList);  		break;  	}  	case offset_discopslist: { -		RectWithCallback discopslist[] = { -			{ kOpsx+59,kOpsx+114,kOpsy+30,kOpsy+76,&DreamGenContext::loadgame }, -			{ kOpsx+10,kOpsx+79,kOpsy+10,kOpsy+59,&DreamGenContext::savegame }, -			{ kOpsx+176,kOpsx+192,kOpsy+60,kOpsy+76,&DreamGenContext::getbacktoops }, +		RectWithCallback discOpsList[] = { +			{ kOpsx+59,kOpsx+114,kOpsy+30,kOpsy+76,&DreamGenContext::loadGame }, +			{ kOpsx+10,kOpsx+79,kOpsy+10,kOpsy+59,&DreamGenContext::saveGame }, +			{ kOpsx+176,kOpsx+192,kOpsy+60,kOpsy+76,&DreamGenContext::getBackToOps },  			{ 0,320,0,200,&DreamGenContext::blank },  			{ 0xFFFF,0,0,0,0 }  		}; -		checkcoords(discopslist); +		checkCoords(discOpsList);  		break;  	}  	case offset_decidelist: { -		RectWithCallback decidelist[] = { -			{ kOpsx+69,kOpsx+124,kOpsy+30,kOpsy+76,&DreamGenContext::newgame }, -			{ kOpsx+20,kOpsx+87,kOpsy+10,kOpsy+59,&DreamGenContext::dosreturn }, -			{ kOpsx+123,kOpsx+190,kOpsy+10,kOpsy+59,&DreamGenContext::loadold }, +		RectWithCallback decideList[] = { +			{ kOpsx+69,kOpsx+124,kOpsy+30,kOpsy+76,&DreamGenContext::newGame }, +			{ kOpsx+20,kOpsx+87,kOpsy+10,kOpsy+59,&DreamGenContext::DOSReturn }, +			{ kOpsx+123,kOpsx+190,kOpsy+10,kOpsy+59,&DreamGenContext::loadOld },  			{ 0,320,0,200,&DreamGenContext::blank },  			{ 0xFFFF,0,0,0,0 }  		}; -		checkcoords(decidelist); +		checkCoords(decideList);  		break;  	}  	default: @@ -1535,8 +1533,7 @@ void DreamGenContext::checkcoords() {  	}  } - -void DreamGenContext::checkcoords(const RectWithCallback *rectWithCallbacks) { +void DreamGenContext::checkCoords(const RectWithCallback *rectWithCallbacks) {  	if (data.byte(kNewlocation) != 0xff)  		return; @@ -1549,9 +1546,8 @@ void DreamGenContext::checkcoords(const RectWithCallback *rectWithCallbacks) {  	}  } - -void DreamGenContext::showpointer() { -	showblink(); +void DreamGenContext::showPointer() { +	showBlink();  	const Frame *icons1 = ((const Frame *)segRef(data.word(kIcons1)).ptr(0, 0));  	uint16 x = data.word(kMousex);  	data.word(kOldpointerx) = data.word(kMousex); @@ -1576,9 +1572,9 @@ void DreamGenContext::showpointer() {  		uint16 yMin = (y >= height / 2) ? y - height / 2 : 0;  		data.word(kOldpointerx) = xMin;  		data.word(kOldpointery) = yMin; -		multiget(segRef(data.word(kBuffers)).ptr(kPointerback, 0), xMin, yMin, width, height); -		showframe(frames, x, y, 3 * data.byte(kItemframe) + 1, 128); -		showframe(icons1, x, y, 3, 128); +		multiGet(segRef(data.word(kBuffers)).ptr(kPointerback, 0), xMin, yMin, width, height); +		showFrame(frames, x, y, 3 * data.byte(kItemframe) + 1, 128); +		showFrame(icons1, x, y, 3, 128);  	} else {  		const Frame *frame = icons1 + (data.byte(kPointerframe) + 20);  		uint8 width = frame->width; @@ -1589,12 +1585,12 @@ void DreamGenContext::showpointer() {  			height = 12;  		data.byte(kPointerxs) = width;  		data.byte(kPointerys) = height; -		multiget(segRef(data.word(kBuffers)).ptr(kPointerback, 0), x, y, width, height); -		showframe(icons1, x, y, data.byte(kPointerframe) + 20, 0); +		multiGet(segRef(data.word(kBuffers)).ptr(kPointerback, 0), x, y, width, height); +		showFrame(icons1, x, y, data.byte(kPointerframe) + 20, 0);  	}  } -void DreamGenContext::animpointer() { +void DreamGenContext::animPointer() {  	if (data.byte(kPointermode) == 2) {  		data.byte(kPointerframe) = 0; @@ -1624,7 +1620,7 @@ void DreamGenContext::animpointer() {  	if (data.byte(kPointerfirstpath) == 0)  		return;  	uint8 flag, flagEx; -	getflagunderp(&flag, &flagEx); +	getFlagUnderP(&flag, &flagEx);  	if (flag < 2)  		return;  	if (flag >= 128) @@ -1648,14 +1644,14 @@ void DreamGenContext::animpointer() {  	data.byte(kPointerframe) = 8;  } -void DreamGenContext::printmessage() { -	printmessage(di, bx, al, dl, (bool)(dl & 1)); +void DreamGenContext::printMessage() { +	printMessage(di, bx, al, dl, (bool)(dl & 1));  } -void DreamGenContext::printmessage(uint16 x, uint16 y, uint8 index, uint8 maxWidth, bool centered) { +void DreamGenContext::printMessage(uint16 x, uint16 y, uint8 index, uint8 maxWidth, bool centered) {  	uint16 offset = kTextstart + segRef(data.word(kCommandtext)).word(index * 2);  	const uint8 *string = segRef(data.word(kCommandtext)).ptr(offset, 0); -	printdirect(&string, x, &y, maxWidth, centered); +	printDirect(&string, x, &y, maxWidth, centered);  }  void DreamGenContext::compare() { @@ -1664,7 +1660,7 @@ void DreamGenContext::compare() {  }  bool DreamGenContext::compare(uint8 index, uint8 flag, const char id[4]) { -	void *ptr = getanyaddir(index, flag); +	void *ptr = getAnyAdDir(index, flag);  	const char *objId = (const char *)(((const uint8 *)ptr) + 12); // whether it is a DynObject or a SetObject  	for (size_t i = 0; i < 4; ++i) {  		if(id[i] != objId[i] + 'A') @@ -1673,7 +1669,7 @@ bool DreamGenContext::compare(uint8 index, uint8 flag, const char id[4]) {  	return true;  } -bool DreamGenContext::isitdescribed(const ObjPos *pos) { +bool DreamGenContext::isItDescribed(const ObjPos *pos) {  	uint16 offset = segRef(data.word(kSetdesc)).word(kSettextdat + pos->index * 2);  	uint8 result = segRef(data.word(kSetdesc)).byte(kSettext + offset);  	return result != 0; @@ -1687,59 +1683,59 @@ bool DreamGenContext::isCD() {  	return (data.byte(kSpeechloaded) == 1);  } -void DreamGenContext::showicon() { +void DreamGenContext::showIcon() {  	if (data.byte(kReallocation) < 50) { -		showpanel(); -		showman(); -		roomname(); -		panelicons1(); -		zoomicon(); +		showPanel(); +		showMan(); +		roomName(); +		panelIcons1(); +		zoomIcon();  	} else {  		Frame *tempSprites = (Frame *)segRef(data.word(kTempsprites)).ptr(0, 0); -		showframe(tempSprites, 72, 2, 45, 0); -		showframe(tempSprites, 72+47, 2, 46, 0); -		showframe(tempSprites, 69-10, 21, 49, 0); -		showframe(tempSprites, 160+88, 2, 45, 4 & 0xfe); -		showframe(tempSprites, 160+43, 2, 46, 4 & 0xfe); -		showframe(tempSprites, 160+101, 21, 49, 4 & 0xfe); -		middlepanel(); +		showFrame(tempSprites, 72, 2, 45, 0); +		showFrame(tempSprites, 72+47, 2, 46, 0); +		showFrame(tempSprites, 69-10, 21, 49, 0); +		showFrame(tempSprites, 160+88, 2, 45, 4 & 0xfe); +		showFrame(tempSprites, 160+43, 2, 46, 4 & 0xfe); +		showFrame(tempSprites, 160+101, 21, 49, 4 & 0xfe); +		middlePanel();  	}  } -void DreamGenContext::checkifset() { -	flags._z = !checkifset(al, ah); +void DreamGenContext::checkIfSet() { +	flags._z = !checkIfSet(al, ah);  } -bool DreamGenContext::checkifset(uint8 x, uint8 y) { +bool DreamGenContext::checkIfSet(uint8 x, uint8 y) {  	const ObjPos *setList = (const ObjPos *)segRef(data.word(kBuffers)).ptr(kSetlist, sizeof(ObjPos) * 128);  	for (size_t i = 0; i < 128; ++i) {  		const ObjPos *pos = setList + 127 - i;  		if (pos->index == 0xff || !pos->contains(x,y))  			continue; -		if (! pixelcheckset(pos, x, y)) +		if (! pixelCheckSet(pos, x, y))  			continue; -		if (! isitdescribed(pos)) +		if (! isItDescribed(pos))  			continue; -		obname(pos->index, 1); +		obName(pos->index, 1);  		return true;  	}  	return false;  } -void DreamGenContext::showryanpage() { +void DreamGenContext::showRyanPage() {  	Frame *icons1 = (Frame *)segRef(data.word(kIcons1)).ptr(0, 0); -	showframe(icons1, kInventx + 167, kInventy - 12, 12, 0); -	showframe(icons1, kInventx + 167 + 18 * data.byte(kRyanpage), kInventy - 12, 13 + data.byte(kRyanpage), 0); +	showFrame(icons1, kInventx + 167, kInventy - 12, 12, 0); +	showFrame(icons1, kInventx + 167 + 18 * data.byte(kRyanpage), kInventy - 12, 13 + data.byte(kRyanpage), 0);  } -void DreamGenContext::findallryan() { -	findallryan(es.ptr(di, 60)); +void DreamGenContext::findAllRyan() { +	findAllRyan(es.ptr(di, 60));  } -void DreamGenContext::findallryan(uint8 *inv) { +void DreamGenContext::findAllRyan(uint8 *inv) {  	memset(inv, 0xff, 60);  	for (size_t i = 0; i < kNumexobjects; ++i) { -		DynObject *extra = getexad(i); +		DynObject *extra = getExAd(i);  		if (extra->mapad[0] != 4)  			continue;  		if (extra->mapad[1] != 0xff) @@ -1751,83 +1747,82 @@ void DreamGenContext::findallryan(uint8 *inv) {  	}  } -void DreamGenContext::hangon() { -	hangon(cx); +void DreamGenContext::hangOn() { +	hangOn(cx);  } -void DreamGenContext::hangon(uint16 frameCount) { +void DreamGenContext::hangOn(uint16 frameCount) {  	while (frameCount) { -		vsync(); +		vSync();  		--frameCount;  		if (quitRequested())  			break;  	}  } - -void DreamGenContext::hangonw() { -	hangonw(cx); +void DreamGenContext::hangOnW() { +	hangOnW(cx);  } -void DreamGenContext::hangonw(uint16 frameCount) { +void DreamGenContext::hangOnW(uint16 frameCount) {  	while (frameCount) { -		delpointer(); -		readmouse(); -		animpointer(); -		showpointer(); -		vsync(); -		dumppointer(); +		delPointer(); +		readMouse(); +		animPointer(); +		showPointer(); +		vSync(); +		dumpPointer();  		--frameCount;  		if (quitRequested())  			break;  	}  } -void DreamGenContext::hangonp() { -	hangonp(cx); +void DreamGenContext::hangOnP() { +	hangOnP(cx);  } -void DreamGenContext::hangonp(uint16 count) { +void DreamGenContext::hangOnP(uint16 count) {  	data.word(kMaintimer) = 0;  	uint8 pointerFrame = data.byte(kPointerframe);  	uint8 pickup = data.byte(kPickup);  	data.byte(kPointermode) = 3;  	data.byte(kPickup) = 0;  	data.byte(kCommandtype) = 255; -	readmouse(); -	animpointer(); -	showpointer(); -	vsync(); -	dumppointer(); +	readMouse(); +	animPointer(); +	showPointer(); +	vSync(); +	dumpPointer();  	count *= 3;  	for (uint16 i = 0; i < count; ++i) { -		delpointer(); -		readmouse(); -		animpointer(); -		showpointer(); -		vsync(); -		dumppointer(); +		delPointer(); +		readMouse(); +		animPointer(); +		showPointer(); +		vSync(); +		dumpPointer();  		if (quitRequested())  			break;  		if (data.word(kMousebutton) != 0 && data.word(kMousebutton) != data.word(kOldbutton))  			break;  	} -	delpointer(); +	delPointer();  	data.byte(kPointerframe) = pointerFrame;  	data.byte(kPickup) = pickup;  	data.byte(kPointermode) = 0;  } -void DreamGenContext::findnextcolon() { +void DreamGenContext::findNextColon() {  	uint8 *initialString = es.ptr(si, 0);  	uint8 *string = initialString; -	al = findnextcolon(&string); +	al = findNextColon(&string);  	si += (string - initialString);  } -uint8 DreamGenContext::findnextcolon(uint8 **string) { +uint8 DreamGenContext::findNextColon(uint8 **string) {  	uint8 c;  	do {  		c = **string; @@ -1836,17 +1831,17 @@ uint8 DreamGenContext::findnextcolon(uint8 **string) {  	return c;  } -uint8 *DreamGenContext::getobtextstartCPP() { +uint8 *DreamGenContext::getObTextStartCPP() {  	push(es);  	push(si); -	getobtextstart(); +	getObTextStart();  	uint8 *result = es.ptr(si, 0);  	si = pop();  	es = pop();  	return result;  } -void DreamGenContext::zoomonoff() { +void DreamGenContext::zoomOnOff() {  	if (data.word(kWatchingtime) != 0) {  		blank();  		return; @@ -1857,27 +1852,27 @@ void DreamGenContext::zoomonoff() {  	}  	if (data.byte(kCommandtype) != 222) {  		data.byte(kCommandtype) = 222; -		commandonly(39); +		commandOnly(39);  	}  	if (data.word(kMousebutton) == data.word(kOldbutton))  		return;  	if ((data.word(kMousebutton) & 1) == 0)  		return;  	data.byte(kZoomon) ^= 1; -	createpanel(); +	createPanel();  	data.byte(kNewobs) = 0; -	drawfloor(); -	printsprites(); -	reelsonscreen(); -	showicon(); -	getunderzoom(); -	undertextline(); -	commandonly(39); -	readmouse(); -	worktoscreenm(); -} - -void DreamGenContext::sortoutmap() { +	drawFloor(); +	printSprites(); +	reelsOnScreen(); +	showIcon(); +	getUnderZoom(); +	underTextLine(); +	commandOnly(39); +	readMouse(); +	workToScreenM(); +} + +void DreamGenContext::sortOutMap() {  	const uint8 *src = workspace();  	uint8 *dst = (uint8 *)segRef(data.word(kMapdata)).ptr(0, 0);  	for (uint16 y = 0; y < kMaplength; ++y) { @@ -1887,57 +1882,57 @@ void DreamGenContext::sortoutmap() {  	}  } -void DreamGenContext::showcity() { -	clearwork(); -	showframe(tempGraphics(), 57, 32, 0, 0); -	showframe(tempGraphics(), 120+57, 32, 1, 0); +void DreamGenContext::showCity() { +	clearWork(); +	showFrame(tempGraphics(), 57, 32, 0, 0); +	showFrame(tempGraphics(), 120+57, 32, 1, 0);  } -void DreamGenContext::mainscreen() { +void DreamGenContext::mainScreen() {  	data.byte(kInmaparea) = 0;  	if (data.byte(kWatchon) == 1) { -		RectWithCallback mainlist[] = { +		RectWithCallback mainList[] = {  			{ 44,70,32,46,&DreamGenContext::look },  			{ 0,50,0,180,&DreamGenContext::inventory }, -			{ 226,244,10,26,&DreamGenContext::zoomonoff }, -			{ 226,244,26,40,&DreamGenContext::saveload }, -			{ 240,260,100,124,&DreamGenContext::madmanrun }, -			{ 0,320,0,200,&DreamGenContext::identifyob }, +			{ 226,244,10,26,&DreamGenContext::zoomOnOff }, +			{ 226,244,26,40,&DreamGenContext::saveLoad }, +			{ 240,260,100,124,&DreamGenContext::madmanRun }, +			{ 0,320,0,200,&DreamGenContext::identifyOb },  			{ 0xFFFF,0,0,0,0 }  		}; -		checkcoords(mainlist); +		checkCoords(mainList);  	} else { -		RectWithCallback mainlist2[] = { +		RectWithCallback mainList2[] = {  			{ 44,70,32,46,&DreamGenContext::look },  			{ 0,50,0,180,&DreamGenContext::inventory }, -			{ 226+48,244+48,10,26,&DreamGenContext::zoomonoff }, -			{ 226+48,244+48,26,40,&DreamGenContext::saveload }, -			{ 240,260,100,124,&DreamGenContext::madmanrun }, -			{ 0,320,0,200,&DreamGenContext::identifyob }, +			{ 226+48,244+48,10,26,&DreamGenContext::zoomOnOff }, +			{ 226+48,244+48,26,40,&DreamGenContext::saveLoad }, +			{ 240,260,100,124,&DreamGenContext::madmanRun }, +			{ 0,320,0,200,&DreamGenContext::identifyOb },  			{ 0xFFFF,0,0,0,0 }  		}; -		checkcoords(mainlist2); +		checkCoords(mainList2);  	}  	if (data.byte(kWalkandexam) != 0) -		walkandexamine(); +		walkAndExamine();  } -void DreamGenContext::showwatch() { +void DreamGenContext::showWatch() {  	if (data.byte(kWatchon)) { -		showframe((Frame *)segRef(data.word(kIcons1)).ptr(0, 0), 250, 1, 6, 0); -		showtime(); +		showFrame((Frame *)segRef(data.word(kIcons1)).ptr(0, 0), 250, 1, 6, 0); +		showTime();  	}  } -void DreamGenContext::dumpwatch() { +void DreamGenContext::dumpWatch() {  	if (data.byte(kWatchdump) != 1)  		return; -	multidump(256, 21, 40, 12); +	multiDump(256, 21, 40, 12);  	data.byte(kWatchdump) = 0;  } -void DreamGenContext::showtime() { +void DreamGenContext::showTime() {  	if (data.byte(kWatchon) == 0)  		return;  	Frame *charset = (Frame *)segRef(data.word(kCharset1)).ptr(0, 0); @@ -1946,24 +1941,24 @@ void DreamGenContext::showtime() {  	int minutes = data.byte(kMinutecount);  	int hours = data.byte(kHourcount); -	showframe(charset, 282+5, 21, 91*3+10 + seconds / 10, 0); -	showframe(charset, 282+9, 21, 91*3+10 + seconds % 10, 0); +	showFrame(charset, 282+5, 21, 91*3+10 + seconds / 10, 0); +	showFrame(charset, 282+9, 21, 91*3+10 + seconds % 10, 0); -	showframe(charset, 270+5, 21, 91*3 + minutes / 10, 0); -	showframe(charset, 270+11, 21, 91*3 + minutes % 10, 0); +	showFrame(charset, 270+5, 21, 91*3 + minutes / 10, 0); +	showFrame(charset, 270+11, 21, 91*3 + minutes % 10, 0); -	showframe(charset, 256+5, 21, 91*3 + hours / 10, 0); -	showframe(charset, 256+11, 21, 91*3 + hours % 10, 0); +	showFrame(charset, 256+5, 21, 91*3 + hours / 10, 0); +	showFrame(charset, 256+11, 21, 91*3 + hours % 10, 0); -	showframe(charset, 267+5, 21, 91*3+20, 0); +	showFrame(charset, 267+5, 21, 91*3+20, 0);  } -void DreamGenContext::watchcount() { +void DreamGenContext::watchCount() {  	if (data.byte(kWatchon) == 0)  		return;  	++data.byte(kTimercount);  	if (data.byte(kTimercount) == 9) { -		showframe((Frame *)segRef(data.word(kCharset1)).ptr(0, 0), 268+4, 21, 91*3+21, 0); +		showFrame((Frame *)segRef(data.word(kCharset1)).ptr(0, 0), 268+4, 21, 91*3+21, 0);  		data.byte(kWatchdump) = 1;  	} else if (data.byte(kTimercount) == 18) {  		data.byte(kTimercount) = 0; @@ -1978,13 +1973,13 @@ void DreamGenContext::watchcount() {  					data.byte(kHourcount) = 0;  			}  		} -		showtime(); +		showTime();  		data.byte(kWatchdump) = 1;  	}  } -void DreamGenContext::roomname() { -	printmessage(88, 18, 53, 240, false); +void DreamGenContext::roomName() { +	printMessage(88, 18, 53, 240, false);  	uint16 textIndex = data.byte(kRoomnum);  	if (textIndex >= 32)  		textIndex -= 32; @@ -1992,18 +1987,18 @@ void DreamGenContext::roomname() {  	uint8 maxWidth = (data.byte(kWatchon) == 1) ? 120 : 160;  	uint16 descOffset = segRef(data.word(kRoomdesc)).word(kIntextdat + textIndex * 2);  	const uint8 *string = segRef(data.word(kRoomdesc)).ptr(kIntext + descOffset, 0); -	printdirect(string, 88, 25, maxWidth, false); +	printDirect(string, 88, 25, maxWidth, false);  	data.word(kLinespacing) = 10; -	usecharset1(); +	useCharset1();  } -void DreamGenContext::zoomicon() { +void DreamGenContext::zoomIcon() {  	if (data.byte(kZoomon) == 0)  		return; -	showframe((Frame *)segRef(data.word(kIcons1)).ptr(0, 0), kZoomx, kZoomy-1, 8, 0); +	showFrame((Frame *)segRef(data.word(kIcons1)).ptr(0, 0), kZoomx, kZoomy-1, 8, 0);  } -void DreamGenContext::loadroom() { +void DreamGenContext::loadRoom() {  	data.byte(kRoomloaded) = 1;  	data.word(kTimecount) = 0;  	data.word(kMaintimer) = 0; @@ -2013,15 +2008,15 @@ void DreamGenContext::loadroom() {  	data.word(kTextaddressy) = 182;  	data.byte(kTextlen) = 240;  	data.byte(kLocation) = data.byte(kNewlocation); -	Room *room = getroomdata(data.byte(kNewlocation)); -	startloading(room); -	loadroomssample(); -	switchryanon(); -	drawflags(); -	getdimension(); +	Room *room = getRoomData(data.byte(kNewlocation)); +	startLoading(room); +	loadRoomsSample(); +	switchRyanOn(); +	drawFlags(); +	getDimension();  } -void DreamGenContext::loadroomssample() { +void DreamGenContext::loadRoomsSample() {  	uint8 sample = data.byte(kRoomssample);  	if (sample == 255 || data.byte(kCurrentsample) == sample) @@ -2031,16 +2026,16 @@ void DreamGenContext::loadroomssample() {  	cs.byte(kSamplename+10) = '0' + sample / 10;  	cs.byte(kSamplename+11) = '0' + sample % 10;  	dx = kSamplename; -	loadsecondsample(); +	loadSecondSample();  } -void DreamGenContext::readsetdata() { -	data.word(kCharset1) = standardload((const char *)cs.ptr(kCharacterset1, 0)); -	data.word(kIcons1) = standardload((const char *)cs.ptr(kIcongraphics0, 0)); -	data.word(kIcons2) = standardload((const char *)cs.ptr(kIcongraphics1, 0)); -	data.word(kMainsprites) = standardload((const char *)cs.ptr(kSpritename1, 0)); -	data.word(kPuzzletext) = standardload((const char *)cs.ptr(kPuzzletextname, 0)); -	data.word(kCommandtext) = standardload((const char *)cs.ptr(kCommandtextname, 0)); +void DreamGenContext::readSetData() { +	data.word(kCharset1) = standardLoad((const char *)cs.ptr(kCharacterset1, 0)); +	data.word(kIcons1) = standardLoad((const char *)cs.ptr(kIcongraphics0, 0)); +	data.word(kIcons2) = standardLoad((const char *)cs.ptr(kIcongraphics1, 0)); +	data.word(kMainsprites) = standardLoad((const char *)cs.ptr(kSpritename1, 0)); +	data.word(kPuzzletext) = standardLoad((const char *)cs.ptr(kPuzzletextname, 0)); +	data.word(kCommandtext) = standardLoad((const char *)cs.ptr(kCommandtextname, 0));  	ax = data.word(kCharset1);  	data.word(kCurrentset) = ax;  	if (data.byte(kSoundint) == 0xff) @@ -2064,7 +2059,7 @@ Frame * DreamGenContext::tempGraphics3() {  	return (Frame *)segRef(data.word(kTempgraphics3)).ptr(0, 0);  } -void DreamGenContext::playchannel0(uint8 index, uint8 repeat) { +void DreamGenContext::playChannel0(uint8 index, uint8 repeat) {  	if (data.byte(kSoundint) == 255)  		return; @@ -2087,11 +2082,11 @@ void DreamGenContext::playchannel0(uint8 index, uint8 repeat) {  	}  } -void DreamGenContext::playchannel0() { -	playchannel0(al, ah); +void DreamGenContext::playChannel0() { +	playChannel0(al, ah);  } -void DreamGenContext::playchannel1(uint8 index) { +void DreamGenContext::playChannel1(uint8 index) {  	if (data.byte(kSoundint) == 255)  		return;  	if (data.byte(kCh1playing) == 7) @@ -2110,18 +2105,18 @@ void DreamGenContext::playchannel1(uint8 index) {  	data.word(kCh1blockstocopy) = soundBank[index].blockCount();  } -void DreamGenContext::playchannel1() { -	playchannel1(al); +void DreamGenContext::playChannel1() { +	playChannel1(al);  } -void DreamGenContext::findroominloc() { +void DreamGenContext::findRoomInLoc() {  	uint8 x = data.byte(kMapx) / 11;  	uint8 y = data.byte(kMapy) / 10;  	uint8 roomNum = y * 6 + x;  	data.byte(kRoomnum) = roomNum;  } -void DreamGenContext::autolook() { +void DreamGenContext::autoLook() {  	if ((data.word(kMousex) != data.word(kOldx)) || (data.word(kMousey) != data.word(kOldy))) {  		data.word(kLookcounter) = 1000;  		return; @@ -2132,7 +2127,7 @@ void DreamGenContext::autolook() {  		return;  	if (data.word(kWatchingtime))  		return; -	dolook(); +	doLook();  }  void DreamGenContext::look() { @@ -2142,42 +2137,42 @@ void DreamGenContext::look() {  	}  	if (data.byte(kCommandtype) != 241) {  		data.byte(kCommandtype) = 241; -		commandonly(25); +		commandOnly(25);  	}  	if ((data.word(kMousebutton) == 1) && (data.word(kMousebutton) != data.word(kOldbutton))) -		dolook(); +		doLook();  } -void DreamGenContext::dolook() { -	createpanel(); -	showicon(); -	undertextline(); -	worktoscreenm(); +void DreamGenContext::doLook() { +	createPanel(); +	showIcon(); +	underTextLine(); +	workToScreenM();  	data.byte(kCommandtype) = 255; -	dumptextline(); +	dumpTextLine();  	uint8 index = data.byte(kRoomnum) & 31;  	uint16 offset = segRef(data.word(kRoomdesc)).word(kIntextdat + index * 2);  	uint8 *string = segRef(data.word(kRoomdesc)).ptr(kIntext, 0) + offset; -	findnextcolon(&string); +	findNextColon(&string);  	uint16 x;  	if (data.byte(kReallocation) < 50)  		x = 66;  	else  		x = 40; -	if (printslow(string, x, 80, 241, true) != 1) -		hangonp(400); +	if (printSlow(string, x, 80, 241, true) != 1) +		hangOnP(400);  	data.byte(kPointermode) = 0;  	data.byte(kCommandtype) = 0; -	redrawmainscrn(); -	worktoscreenm(); +	redrawMainScrn(); +	workToScreenM();  } -void DreamGenContext::usecharset1() { +void DreamGenContext::useCharset1() {  	data.word(kCurrentset) = data.word(kCharset1);  } -void DreamGenContext::usetempcharset() { +void DreamGenContext::useTempCharset() {  	data.word(kCurrentset) = data.word(kTempcharset);  } @@ -2186,7 +2181,7 @@ void DreamGenContext::loadRoomData(const Room* room, bool skipDat) {  	engine->openFile(room->name);  	cs.word(kHandle) = 1; //only one handle  	flags._c = false; -	readheader(); +	readHeader();  	// read segment lengths from room file header  	int len[15]; @@ -2195,7 +2190,7 @@ void DreamGenContext::loadRoomData(const Room* room, bool skipDat) {  	data.word(kBackdrop) = allocateAndLoad(len[0]);  	clearAndLoad(data.word(kWorkspace), 0, len[1], 132*66); // 132*66 = maplen -	sortoutmap(); +	sortOutMap();  	data.word(kSetframes) = allocateAndLoad(len[2]);  	if (!skipDat)  		clearAndLoad(data.word(kSetdat), 255, len[3], kSetdatlen); @@ -2219,25 +2214,25 @@ void DreamGenContext::loadRoomData(const Room* room, bool skipDat) {  		engine->skipBytes(len[13]);  	data.word(kFreedesc) = allocateAndLoad(len[14]); -	closefile(); +	closeFile();  } -void DreamGenContext::restoreall() { -	const Room *room = getroomdata(data.byte(kLocation)); +void DreamGenContext::restoreAll() { +	const Room *room = getRoomData(data.byte(kLocation));  	loadRoomData(room, true); -	setallchanges(); +	setAllChanges();  } -void DreamGenContext::restorereels() { +void DreamGenContext::restoreReels() {  	if (data.byte(kRoomloaded) == 0)  		return; -	const Room *room = getroomdata(data.byte(kReallocation)); +	const Room *room = getRoomData(data.byte(kReallocation));  	engine->openFile(room->name);  	cs.word(kHandle) = 1; //only one handle  	flags._c = false; -	readheader(); +	readHeader();  	// read segment lengths from room file header  	int len[15]; @@ -2252,50 +2247,50 @@ void DreamGenContext::restorereels() {  	data.word(kReel2) = allocateAndLoad(len[5]);  	data.word(kReel3) = allocateAndLoad(len[6]); -	closefile(); +	closeFile();  } -void DreamGenContext::loadfolder() { -	loadintotemp("DREAMWEB.G09"); -	loadintotemp2("DREAMWEB.G10"); -	loadintotemp3("DREAMWEB.G11"); -	loadtempcharset("DREAMWEB.C02"); -	loadtemptext("DREAMWEB.T50"); +void DreamGenContext::loadFolder() { +	loadIntoTemp("DREAMWEB.G09"); +	loadIntoTemp2("DREAMWEB.G10"); +	loadIntoTemp3("DREAMWEB.G11"); +	loadTempCharset("DREAMWEB.C02"); +	loadTempText("DREAMWEB.T50");  } -void DreamGenContext::showfolder() { +void DreamGenContext::showFolder() {  	data.byte(kCommandtype) = 255;  	if (data.byte(kFolderpage)) { -		usetempcharset(); -		createpanel2(); -		showframe(tempGraphics(), 0, 0, 0, 0); -		showframe(tempGraphics(), 143, 0, 1, 0); -		showframe(tempGraphics(), 0, 92, 2, 0); -		showframe(tempGraphics(), 143, 92, 3, 0); -		folderexit(); +		useTempCharset(); +		createPanel2(); +		showFrame(tempGraphics(), 0, 0, 0, 0); +		showFrame(tempGraphics(), 143, 0, 1, 0); +		showFrame(tempGraphics(), 0, 92, 2, 0); +		showFrame(tempGraphics(), 143, 92, 3, 0); +		folderExit();  		if (data.byte(kFolderpage) != 1) -			showleftpage(); +			showLeftPage();  		if (data.byte(kFolderpage) != 12) -			showrightpage(); -		usecharset1(); -		undertextline(); +			showRightPage(); +		useCharset1(); +		underTextLine();  	} else { -		createpanel2(); -		showframe(tempGraphics3(), 143-28, 0, 0, 0); -		showframe(tempGraphics3(), 143-28, 92, 1, 0); -		folderexit(); -		undertextline(); +		createPanel2(); +		showFrame(tempGraphics3(), 143-28, 0, 0, 0); +		showFrame(tempGraphics3(), 143-28, 92, 1, 0); +		folderExit(); +		underTextLine();  	}  } -void DreamGenContext::showleftpage() { -	showframe(tempGraphics2(), 0, 12, 3, 0); +void DreamGenContext::showLeftPage() { +	showFrame(tempGraphics2(), 0, 12, 3, 0);  	uint16 y = 12+5;  	for (size_t i = 0; i < 9; ++i) { -		showframe(tempGraphics2(), 0, y, 4, 0); +		showFrame(tempGraphics2(), 0, y, 4, 0);  		y += 16;  	} -	showframe(tempGraphics2(), 0, y, 5, 0); +	showFrame(tempGraphics2(), 0, y, 5, 0);  	data.word(kLinespacing) = 8;  	data.word(kCharshift) = 91;  	data.byte(kKerning) = 1; @@ -2305,7 +2300,7 @@ void DreamGenContext::showleftpage() {  	for (size_t i = 0; i < 2; ++i) {  		uint8 lastChar;  		do { -			lastChar = printdirect(&string, 2, &y, 140, false); +			lastChar = printDirect(&string, 2, &y, 140, false);  			y += data.word(kLinespacing);  		} while (lastChar != '\0');  	} @@ -2321,15 +2316,15 @@ void DreamGenContext::showleftpage() {  	}  } -void DreamGenContext::showrightpage() { -	showframe(tempGraphics2(), 143, 12, 0, 0); +void DreamGenContext::showRightPage() { +	showFrame(tempGraphics2(), 143, 12, 0, 0);  	uint16 y = 12+37;  	for (size_t i = 0; i < 7; ++i) { -		showframe(tempGraphics2(), 143, y, 1, 0); +		showFrame(tempGraphics2(), 143, y, 1, 0);  		y += 16;  	} -	showframe(tempGraphics2(), 143, y, 2, 0); +	showFrame(tempGraphics2(), 143, y, 2, 0);  	data.word(kLinespacing) = 8;  	data.byte(kKerning) = 1;  	uint8 pageIndex = data.byte(kFolderpage) - 1; @@ -2338,7 +2333,7 @@ void DreamGenContext::showrightpage() {  	for (size_t i = 0; i < 2; ++i) {  		uint8 lastChar;  		do { -			lastChar = printdirect(&string, 152, &y, 140, false); +			lastChar = printDirect(&string, 152, &y, 140, false);  			y += data.word(kLinespacing);  		} while (lastChar != '\0');  	} @@ -2346,21 +2341,20 @@ void DreamGenContext::showrightpage() {  	data.word(kLinespacing) = 10;  } - -uint8 DreamGenContext::getlocation(uint8 index) { +uint8 DreamGenContext::getLocation(uint8 index) {  	return data.byte(kRoomscango + index);  } -void DreamGenContext::getlocation() { -	al = getlocation(al); +void DreamGenContext::getLocation() { +	al = getLocation(al);  } -void DreamGenContext::setlocation(uint8 index) { +void DreamGenContext::setLocation(uint8 index) {  	data.byte(kRoomscango + index) = 1;  } -void DreamGenContext::setlocation() { -	setlocation(al); +void DreamGenContext::setLocation() { +	setLocation(al);  }  const uint8 *DreamGenContext::getTextInFile1(uint16 index) { @@ -2370,126 +2364,126 @@ const uint8 *DreamGenContext::getTextInFile1(uint16 index) {  }  void DreamGenContext::checkFolderCoords() { -	RectWithCallback folderlist[] = { -		{ 280,320,160,200,&DreamGenContext::quitkey }, -		{ 143,300,6,194,&DreamGenContext::nextfolder }, -		{ 0,143,6,194,&DreamGenContext::lastfolder }, -		{ 0,320,0,200,&DreamGenContext::blank }, -		{ 0xFFFF,0,0,0,0 } +	RectWithCallback folderList[] = { +		{ 280,320,160,200, &DreamGenContext::quitKey }, +		{ 143,300,6,194, &DreamGenContext::nextFolder }, +		{ 0,143,6,194, &DreamGenContext::lastFolder }, +		{ 0,320,0,200, &DreamGenContext::blank }, +		{ 0xFFFF,0,0,0, 0 }  	}; -	checkcoords(folderlist); +	checkCoords(folderList);  } -void DreamGenContext::nextfolder() { +void DreamGenContext::nextFolder() {  	if (data.byte(kFolderpage) == 12) {  		blank();  		return;  	}  	if (data.byte(kCommandtype) != 201) {  		data.byte(kCommandtype) = 201; -		commandonly(16); +		commandOnly(16);  	}  	if ((data.word(kMousebutton) == 1) && (data.word(kMousebutton) != data.word(kOldbutton))) {  		++data.byte(kFolderpage); -		folderhints(); -		delpointer(); -		showfolder(); +		folderHints(); +		delPointer(); +		showFolder();  		data.word(kMousebutton) = 0;  		checkFolderCoords(); -		worktoscreenm(); +		workToScreenM();  	}  } -void DreamGenContext::lastfolder() { +void DreamGenContext::lastFolder() {  	if (data.byte(kFolderpage) == 0) {  		blank();  		return;  	}  	if (data.byte(kCommandtype) != 202) {  		data.byte(kCommandtype) = 202; -		commandonly(17); +		commandOnly(17);  	}  	if ((data.word(kMousebutton) == 1) && (data.word(kMousebutton) != data.word(kOldbutton))) {  		--data.byte(kFolderpage); -		delpointer(); -		showfolder(); +		delPointer(); +		showFolder();  		data.word(kMousebutton) = 0;  		checkFolderCoords(); -		worktoscreenm(); +		workToScreenM();  	}  } -void DreamGenContext::folderhints() { +void DreamGenContext::folderHints() {  	if (data.byte(kFolderpage) == 5) { -		if ((data.byte(kAidedead) != 1) && (getlocation(13) != 1)) { -			setlocation(13); -			showfolder(); +		if ((data.byte(kAidedead) != 1) && (getLocation(13) != 1)) { +			setLocation(13); +			showFolder();  			const uint8 *string = getTextInFile1(30); -			printdirect(string, 0, 86, 141, true); -			worktoscreenm(); -			hangonp(200); +			printDirect(string, 0, 86, 141, true); +			workToScreenM(); +			hangOnP(200);  		}  	} else if (data.byte(kFolderpage) == 9) { -		if (getlocation(7) != 1) { -			setlocation(7); -			showfolder(); +		if (getLocation(7) != 1) { +			setLocation(7); +			showFolder();  			const uint8 *string = getTextInFile1(31); -			printdirect(string, 0, 86, 141, true); -			worktoscreenm(); -			hangonp(200); +			printDirect(string, 0, 86, 141, true); +			workToScreenM(); +			hangOnP(200);  		}  	}  } -void DreamGenContext::folderexit() { -	showframe(tempGraphics2(), 296, 178, 6, 0); +void DreamGenContext::folderExit() { +	showFrame(tempGraphics2(), 296, 178, 6, 0);  } -void DreamGenContext::loadtraveltext() { -	data.word(kTraveltext) = standardload("DREAMWEB.T81"); +void DreamGenContext::loadTravelText() { +	data.word(kTraveltext) = standardLoad("DREAMWEB.T81");  } -void DreamGenContext::loadtemptext() { -	loadtemptext((const char *)cs.ptr(dx, 0)); +void DreamGenContext::loadTempText() { +	loadTempText((const char *)cs.ptr(dx, 0));  } -void DreamGenContext::loadtemptext(const char *fileName) { -	data.word(kTextfile1) = standardload(fileName); +void DreamGenContext::loadTempText(const char *fileName) { +	data.word(kTextfile1) = standardLoad(fileName);  } -void DreamGenContext::drawfloor() { -	eraseoldobs(); -	drawflags(); -	calcmapad(); -	doblocks(); -	showallobs(); -	showallfree(); -	showallex(); -	paneltomap(); -	initrain(); +void DreamGenContext::drawFloor() { +	eraseOldObs(); +	drawFlags(); +	calcMapAd(); +	doBlocks(); +	showAllObs(); +	showAllFree(); +	showAllEx(); +	panelToMap(); +	initRain();  	data.byte(kNewobs) = 0;  } -void DreamGenContext::allocatebuffers() { -	data.word(kExtras) = allocatemem(kLengthofextra/16); -	data.word(kMapdata) = allocatemem(kLengthofmap/16); -	data.word(kBuffers) = allocatemem(kLengthofbuffer/16); -	data.word(kFreedat) = allocatemem(kFreedatlen/16); -	data.word(kSetdat) = allocatemem(kSetdatlen/16); -	data.word(kMapstore) = allocatemem(kLenofmapstore/16); -	allocatework(); -	data.word(kSounddata) = allocatemem(2048/16); -	data.word(kSounddata2) = allocatemem(2048/16); -} - -void DreamGenContext::worktoscreenm() { -	animpointer(); -	readmouse(); -	showpointer(); -	vsync(); -	worktoscreen(); -	delpointer(); +void DreamGenContext::allocateBuffers() { +	data.word(kExtras) = allocateMem(kLengthofextra/16); +	data.word(kMapdata) = allocateMem(kLengthofmap/16); +	data.word(kBuffers) = allocateMem(kLengthofbuffer/16); +	data.word(kFreedat) = allocateMem(kFreedatlen/16); +	data.word(kSetdat) = allocateMem(kSetdatlen/16); +	data.word(kMapstore) = allocateMem(kLenofmapstore/16); +	allocateWork(); +	data.word(kSounddata) = allocateMem(2048/16); +	data.word(kSounddata2) = allocateMem(2048/16); +} + +void DreamGenContext::workToScreenM() { +	animPointer(); +	readMouse(); +	showPointer(); +	vSync(); +	workToScreen(); +	delPointer();  }  } /*namespace dreamgen */ diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 974b61dc00..60231c4e6e 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -19,366 +19,366 @@   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.   *   */ -	void screenupdate(); +	void screenUpdate();  	bool quitRequested();  	void startup();  	void startup1(); -	void switchryanon(); -	void switchryanoff(); -	uint16 allocatemem(uint16 paragraphs); -	void deallocatemem(uint16 segment); +	void switchRyanOn(); +	void switchRyanOff(); +	uint16 allocateMem(uint16 paragraphs); +	void deallocateMem(uint16 segment);  	uint8 *workspace();  	uint8 *textUnder(); -	void allocatework(); -	void clearwork(); -	void standardload(); -	uint16 standardload(const char *fileName); // Returns a segment handle which needs to be freed with deallocatemem for symmetry -	void loadintotemp(); -	void loadintotemp2(); -	void loadintotemp3(); -	void loadintotemp(const char *fileName); -	void loadintotemp2(const char *fileName); -	void loadintotemp3(const char *fileName); -	void loadtempcharset(); -	void loadtempcharset(const char *fileName); +	void allocateWork(); +	void clearWork(); +	void standardLoad(); +	uint16 standardLoad(const char *fileName); // Returns a segment handle which needs to be freed with deallocatemem for symmetry +	void loadIntoTemp(); +	void loadIntoTemp2(); +	void loadIntoTemp3(); +	void loadIntoTemp(const char *fileName); +	void loadIntoTemp2(const char *fileName); +	void loadIntoTemp3(const char *fileName); +	void loadTempCharset(); +	void loadTempCharset(const char *fileName);  	Frame *tempCharset(); -	void saveload(); -	void printcurs(); -	void delcurs(); -	void hangoncurs(uint16 frameCount); -	void hangoncurs(); -	void multidump(); -	void multidump(uint16 x, uint16 y, uint8 width, uint8 height); -	void frameoutv(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, int16 x, int16 y); -	void frameoutnm(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y); -	void frameoutbh(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y); -	void frameoutfx(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y); -	void worktoscreen(); +	void saveLoad(); +	void printCurs(); +	void delCurs(); +	void hangOnCurs(uint16 frameCount); +	void hangOnCurs(); +	void multiDump(); +	void multiDump(uint16 x, uint16 y, uint8 width, uint8 height); +	void frameOutV(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, int16 x, int16 y); +	void frameOutNm(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y); +	void frameOutBh(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y); +	void frameOutFx(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y); +	void workToScreen();  	void workToScreenCPP(); -	void multiget(); -	void multiget(uint8 *dst, uint16 x, uint16 y, uint8 width, uint8 height); -	void convertkey(); +	void multiGet(); +	void multiGet(uint8 *dst, uint16 x, uint16 y, uint8 width, uint8 height); +	void convertKey();  	void cls(); -	void printsprites(); -	void quickquit(); -	void readoneblock(); -	void printundermon(); -	void seecommandtail(); -	void randomnumber(); -	void quickquit2(); -	uint8 getnextword(const Frame *charSet, const uint8 *string, uint8 *totalWidth, uint8 *charCount); -	void printboth(const Frame* charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar); -	void printchar(); -	void printchar(const Frame* charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height); -	void printchar(const Frame* charSet, uint16 x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height); -	void printdirect(); -	uint8 printdirect(const uint8** string, uint16 x, uint16 *y, uint8 maxWidth, bool centered); -	uint8 printdirect(const uint8* string, uint16 x, uint16 y, uint8 maxWidth, bool centered); -	void printmessage(uint16 x, uint16 y, uint8 index, uint8 maxWidth, bool centered); -	void printmessage(); -	void usetimedtext(); -	void dumptimedtext(); -	void setuptimedtemp(); -	void setuptimedtemp(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount); -	void getundertimed(); -	void putundertimed(); -	uint8 printslow(const uint8 *string, uint16 x, uint16 y, uint8 maxWidth, bool centered); -	void printslow(); -	void dumptextline(); -	void getnumber(); -	uint8 getnumber(const Frame *charSet, const uint8 *string, uint16 maxWidth, bool centered, uint16 *offset); -	uint8 kernchars(uint8 firstChar, uint8 secondChar, uint8 width); -	void oldtonames(); -	void namestoold(); -	void loadpalfromiff(); -	void getroomdata(); -	Room *getroomdata(uint8 room); -	void readheader(); -	void fillspace(); -	void startloading(const Room *room); -	Sprite *spritetable(); -	void showframe(); -	void showframe(const Frame *frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height); -	void showframe(const Frame *frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag); -	void printasprite(const Sprite *sprite); +	void printSprites(); +	void quickQuit(); +	void readOneBlock(); +	void printUnderMon(); +	void seeCommandTail(); +	void randomNumber(); +	void quickQuit2(); +	uint8 getNextWord(const Frame *charSet, const uint8 *string, uint8 *totalWidth, uint8 *charCount); +	void printBoth(const Frame* charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar); +	void printChar(); +	void printChar(const Frame* charSet, uint16 *x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height); +	void printChar(const Frame* charSet, uint16 x, uint16 y, uint8 c, uint8 nextChar, uint8 *width, uint8 *height); +	void printDirect(); +	uint8 printDirect(const uint8** string, uint16 x, uint16 *y, uint8 maxWidth, bool centered); +	uint8 printDirect(const uint8* string, uint16 x, uint16 y, uint8 maxWidth, bool centered); +	void printMessage(uint16 x, uint16 y, uint8 index, uint8 maxWidth, bool centered); +	void printMessage(); +	void useTimedText(); +	void dumpTimedText(); +	void setupTimedTemp(); +	void setupTimedTemp(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount); +	void getUnderTimed(); +	void putUnderTimed(); +	uint8 printSlow(const uint8 *string, uint16 x, uint16 y, uint8 maxWidth, bool centered); +	void printSlow(); +	void dumpTextLine(); +	void getNumber(); +	uint8 getNumber(const Frame *charSet, const uint8 *string, uint16 maxWidth, bool centered, uint16 *offset); +	uint8 kernChars(uint8 firstChar, uint8 secondChar, uint8 width); +	void oldToNames(); +	void namesToOld(); +	void loadPalFromIFF(); +	void getRoomData(); +	Room *getRoomData(uint8 room); +	void readHeader(); +	void fillSpace(); +	void startLoading(const Room *room); +	Sprite *spriteTable(); +	void showFrame(); +	void showFrame(const Frame *frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height); +	void showFrame(const Frame *frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag); +	void printASprite(const Sprite *sprite);  	void width160(); -	void multiput(const uint8 *src, uint16 x, uint16 y, uint8 width, uint8 height); -	void multiput(); -	void eraseoldobs(); -	void clearsprites(); -	Sprite *makesprite(uint8 x, uint8 y, uint16 updateCallback, uint16 frameData, uint16 somethingInDi); -	void spriteupdate(); -	void initman(); -	void mainman(Sprite *sprite); -	void facerightway(); +	void multiPut(const uint8 *src, uint16 x, uint16 y, uint8 width, uint8 height); +	void multiPut(); +	void eraseOldObs(); +	void clearSprites(); +	Sprite *makeSprite(uint8 x, uint8 y, uint16 updateCallback, uint16 frameData, uint16 somethingInDi); +	void spriteUpdate(); +	void initMan(); +	void mainMan(Sprite *sprite); +	void faceRightWay();  	void walking(Sprite *sprite); -	void autosetwalk(); -	void checkdest(const RoomPaths *roomsPaths); -	void aboutturn(Sprite *sprite); -	void backobject(Sprite *sprite); +	void autoSetWalk(); +	void checkDest(const RoomPaths *roomsPaths); +	void aboutTurn(Sprite *sprite); +	void backObject(Sprite *sprite);  	void constant(Sprite *sprite, SetObject *objData);  	void steady(Sprite *sprite, SetObject *objData);  	void random(Sprite *sprite, SetObject *objData); -	void dodoor(Sprite *sprite, SetObject *objData, Common::Rect check); +	void doDoor(Sprite *sprite, SetObject *objData, Common::Rect check);  	void doorway(Sprite *sprite, SetObject *objData); -	void widedoor(Sprite *sprite, SetObject *objData); -	void lockeddoorway(Sprite *sprite, SetObject *objData); -	void liftsprite(Sprite *sprite, SetObject *objData); -	Frame *findsource(); -	void showgamereel(); -	void showgamereel(ReelRoutine *routine); -	void showreelframe(Reel *reel); -	const Frame *getreelframeax(uint16 frame); -	void turnpathon(uint8 param); -	void turnpathoff(uint8 param); -	void turnpathon(); -	void turnpathoff(); -	void turnanypathon(uint8 param, uint8 room); -	void turnanypathoff(uint8 param, uint8 room); -	void turnanypathon(); -	void turnanypathoff(); -	RoomPaths *getroomspaths(); -	void makebackob(SetObject *objData); -	void modifychar(); -	void lockmon(); -	void cancelch0(); -	void cancelch1(); -	void plotreel(); -	Reel *getreelstart(); -	void dealwithspecial(uint8 firstParam, uint8 secondParam); +	void wideDoor(Sprite *sprite, SetObject *objData); +	void lockedDoorway(Sprite *sprite, SetObject *objData); +	void liftSprite(Sprite *sprite, SetObject *objData); +	Frame *findSource(); +	void showGameReel(); +	void showGameReel(ReelRoutine *routine); +	void showReelFrame(Reel *reel); +	const Frame *getReelFrameAX(uint16 frame); +	void turnPathOn(uint8 param); +	void turnPathOff(uint8 param); +	void turnPathOn(); +	void turnPathOff(); +	void turnAnyPathOn(uint8 param, uint8 room); +	void turnAnyPathOff(uint8 param, uint8 room); +	void turnAnyPathOn(); +	void turnAnyPathOff(); +	RoomPaths *getRoomsPaths(); +	void makeBackOb(SetObject *objData); +	void modifyChar(); +	void lockMon(); +	void cancelCh0(); +	void cancelCh1(); +	void plotReel(); +	Reel *getReelStart(); +	void dealWithSpecial(uint8 firstParam, uint8 secondParam);  	void zoom();  	void crosshair(); -	void showrain(); -	void deltextline(); -	void commandonly(); -	void commandonly(uint8 command); -	void doblocks(); -	void checkifperson(); -	bool checkifperson(uint8 x, uint8 y); -	void checkiffree(); -	bool checkiffree(uint8 x, uint8 y); -	void checkifex(); -	bool checkifex(uint8 x, uint8 y); -	const uint8 *findobname(uint8 type, uint8 index); -	void copyname(); -	void copyname(uint8 type, uint8 index, uint8 *dst); -	void commandwithob(); -	void commandwithob(uint8 command, uint8 type, uint8 index); -	void showpanel(); -	void updatepeople(); -	void madmantext(); -	void madmode(); -	void movemap(uint8 param); -	bool addalong(const uint8 *mapFlags); -	bool addlength(const uint8 *mapFlags); -	void getdimension(); -	void getdimension(uint8 *mapXstart, uint8 *mapYstart, uint8 *mapXsize, uint8 *mapYsize); -	void getmapad(); -	void calcmapad(); -	uint8 getmapad(const uint8 *setData); -	uint8 getxad(const uint8 *setData, uint8 *result); -	uint8 getyad(const uint8 *setData, uint8 *result); -	void calcfrframe(); -	void calcfrframe(uint8* width, uint8* height); -	void finalframe(); -	void finalframe(uint16 *x, uint16 *y); -	void showallobs(); -	void blocknametext(); -	void walktotext(); -	void personnametext(); -	void findxyfrompath(); -	void findormake(); -	void findormake(uint8 index, uint8 value, uint8 type); -	DynObject *getfreead(uint8 index); -	DynObject *getexad(uint8 index); -	DynObject *geteitheradCPP(); -	SetObject *getsetad(uint8 index); -	void *getanyad(uint8 *value1, uint8 *value2); -	void *getanyaddir(uint8 index, uint8 flag); -	void setallchanges(); -	void dochange(uint8 index, uint8 value, uint8 type); -	void deletetaken(); +	void showRain(); +	void delTextLine(); +	void commandOnly(); +	void commandOnly(uint8 command); +	void doBlocks(); +	void checkIfPerson(); +	bool checkIfPerson(uint8 x, uint8 y); +	void checkIfFree(); +	bool checkIfFree(uint8 x, uint8 y); +	void checkIfEx(); +	bool checkIfEx(uint8 x, uint8 y); +	const uint8 *findObName(uint8 type, uint8 index); +	void copyName(); +	void copyName(uint8 type, uint8 index, uint8 *dst); +	void commandWithOb(); +	void commandWithOb(uint8 command, uint8 type, uint8 index); +	void showPanel(); +	void updatePeople(); +	void madmanText(); +	void madMode(); +	void moveMap(uint8 param); +	bool addAlong(const uint8 *mapFlags); +	bool addLength(const uint8 *mapFlags); +	void getDimension(); +	void getDimension(uint8 *mapXstart, uint8 *mapYstart, uint8 *mapXsize, uint8 *mapYsize); +	void getMapAd(); +	void calcMapAd(); +	uint8 getMapAd(const uint8 *setData); +	uint8 getXAd(const uint8 *setData, uint8 *result); +	uint8 getYAd(const uint8 *setData, uint8 *result); +	void calcFrFrame(); +	void calcFrFrame(uint8* width, uint8* height); +	void finalFrame(); +	void finalFrame(uint16 *x, uint16 *y); +	void showAllObs(); +	void blockNameText(); +	void walkToText(); +	void personNameText(); +	void findXYFromPath(); +	void findOrMake(); +	void findOrMake(uint8 index, uint8 value, uint8 type); +	DynObject *getFreeAd(uint8 index); +	DynObject *getExAd(uint8 index); +	DynObject *getEitherAdCPP(); +	SetObject *getSetAd(uint8 index); +	void *getAnyAd(uint8 *value1, uint8 *value2); +	void *getAnyAdDir(uint8 index, uint8 flag); +	void setAllChanges(); +	void doChange(uint8 index, uint8 value, uint8 type); +	void deleteTaken();  	bool isCD(); -	void placesetobject(); -	void placesetobject(uint8 index); -	void removesetobject(); -	void removesetobject(uint8 index); -	void showallfree(); -	void showallex(); -	bool finishedwalkingCPP(); -	void finishedwalking(); -	void checkone(); -	void checkone(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uint8 *type, uint8 *flagX, uint8 *flagY); -	void getflagunderp(); -	void getflagunderp(uint8 *flag, uint8 *flagEx); -	void walkandexamine(); -	void obname(); -	void obname(uint8 command, uint8 commandType); -	void delpointer(); -	void showblink(); -	void dumpblink(); -	void dumppointer(); -	void showpointer(); -	void animpointer(); -	void checkcoords(); -	void checkcoords(const RectWithCallback *rectWithCallbacks); -	void readmouse(); +	void placeSetObject(); +	void placeSetObject(uint8 index); +	void removeSetObject(); +	void removeSetObject(uint8 index); +	void showAllFree(); +	void showAllEx(); +	bool finishedWalkingCPP(); +	void finishedWalking(); +	void checkOne(); +	void checkOne(uint8 x, uint8 y, uint8 *flag, uint8 *flagEx, uint8 *type, uint8 *flagX, uint8 *flagY); +	void getFlagUnderP(); +	void getFlagUnderP(uint8 *flag, uint8 *flagEx); +	void walkAndExamine(); +	void obName(); +	void obName(uint8 command, uint8 commandType); +	void delPointer(); +	void showBlink(); +	void dumpBlink(); +	void dumpPointer(); +	void showPointer(); +	void animPointer(); +	void checkCoords(); +	void checkCoords(const RectWithCallback *rectWithCallbacks); +	void readMouse();  	uint16 readMouseState(); -	uint16 waitframes(); -	void drawflags(); -	void addtopeoplelist(); -	void addtopeoplelist(ReelRoutine *routine); -	void getexpos(); -	void paneltomap(); -	void maptopanel(); -	void dumpmap(); -	void obpicture(); -	void transferinv(); -	void obicons(); +	uint16 waitFrames(); +	void drawFlags(); +	void addToPeopleList(); +	void addToPeopleList(ReelRoutine *routine); +	void getExPos(); +	void panelToMap(); +	void mapToPanel(); +	void dumpMap(); +	void obPicture(); +	void transferInv(); +	void obIcons();  	void compare();  	bool compare(uint8 index, uint8 flag, const char id[4]); -	bool pixelcheckset(const ObjPos *pos, uint8 x, uint8 y); -	bool isitdescribed(const ObjPos *objPos); -	void checkifset(); -	bool checkifset(uint8 x, uint8 y); -	void checkifpathison(); -	bool checkifpathison(uint8 index); -	void isitworn(); -	bool isitworn(const DynObject *object); -	void wornerror(); -	void makeworn(); -	void makeworn(DynObject *object); -	void obtoinv(); -	void obtoinv(uint8 index, uint8 flag, uint16 x, uint16 y); -	void showryanpage(); -	void findallryan(); -	void findallryan(uint8 *inv); -	void fillryan(); -	void useroutine(); -	void hangon(); -	void hangon(uint16 frameCount); -	void hangonw(); -	void hangonw(uint16 frameCount); -	void hangonp(); -	void hangonp(uint16 count); -	void showicon(); -	uint8 findnextcolon(uint8 **string); -	void findnextcolon(); -	uint8 *getobtextstartCPP(); -	void usetext(const uint8 *string); -	void usetext(); -	void getblockofpixel(); -	uint8 getblockofpixel(uint8 x, uint8 y); +	bool pixelCheckSet(const ObjPos *pos, uint8 x, uint8 y); +	bool isItDescribed(const ObjPos *objPos); +	void checkIfSet(); +	bool checkIfSet(uint8 x, uint8 y); +	void checkIfPathIsOn(); +	bool checkIfPathIsOn(uint8 index); +	void isItWorn(); +	bool isItWorn(const DynObject *object); +	void wornError(); +	void makeWorn(); +	void makeWorn(DynObject *object); +	void obToInv(); +	void obToInv(uint8 index, uint8 flag, uint16 x, uint16 y); +	void showRyanPage(); +	void findAllRyan(); +	void findAllRyan(uint8 *inv); +	void fillRyan(); +	void useRoutine(); +	void hangOn(); +	void hangOn(uint16 frameCount); +	void hangOnW(); +	void hangOnW(uint16 frameCount); +	void hangOnP(); +	void hangOnP(uint16 count); +	void showIcon(); +	uint8 findNextColon(uint8 **string); +	void findNextColon(); +	uint8 *getObTextStartCPP(); +	void useText(const uint8 *string); +	void useText(); +	void getBlockOfPixel(); +	uint8 getBlockOfPixel(uint8 x, uint8 y);  	void bresenhams(); -	void examineobtext(); -	void sortoutmap(); -	void showcity(); -	uint16 getpersframe(uint8 index); -	void convicons(); -	void examineob(bool examineAgain = true); -	void showwatch(); -	void dumpwatch(); -	void showtime(); -	void roomname(); -	void transfertext(); -	void initrain(); -	Rain *splitintolines(uint8 x, uint8 y, Rain *rain); +	void examineObText(); +	void sortOutMap(); +	void showCity(); +	uint16 getPersFrame(uint8 index); +	void convIcons(); +	void examineOb(bool examineAgain = true); +	void showWatch(); +	void dumpWatch(); +	void showTime(); +	void roomName(); +	void transferText(); +	void initRain(); +	Rain *splitIntoLines(uint8 x, uint8 y, Rain *rain);  	uint8 *mainPalette();  	uint8 *startPalette();  	uint8 *endPalette(); -	void clearstartpal(); -	void clearendpal(); -	void paltostartpal(); -	void endpaltostart(); -	void startpaltoend(); -	void paltoendpal(); -	void fadecalculation(); -	void watchcount(); -	void zoomicon(); -	void loadroom(); -	void getundermenu(); -	void putundermenu(); -	void textformonk(); -	void textforend(); -	void readsetdata(); -	void loadroomssample(); -	void fadeupyellows(); -	void fadeupmonfirst(); -	void printlogo(); -	void usemon(); -	void scrollmonitor(); -	void showcurrentfile(); +	void clearStartPal(); +	void clearEndPal(); +	void palToStartPal(); +	void endPalToStart(); +	void startPalToEnd(); +	void palToEndPal(); +	void fadeCalculation(); +	void watchCount(); +	void zoomIcon(); +	void loadRoom(); +	void getUnderMenu(); +	void putUnderMenu(); +	void textForMonk(); +	void textForEnd(); +	void readSetData(); +	void loadRoomsSample(); +	void fadeupYellows(); +	void fadeupMonFirst(); +	void printLogo(); +	void useMon(); +	void scrollMonitor(); +	void showCurrentFile();  	void input(); -	void monprint(); -	const char *monprint(const char *string); +	void monPrint(); +	const char *monPrint(const char *string);  	Frame *tempGraphics();  	Frame *tempGraphics2();  	Frame *tempGraphics3(); -	void accesslighton(); -	void accesslightoff(); -	void randomaccess(uint16 count); -	void randomaccess(); -	void monmessage(uint8 index); -	void monmessage(); -	void neterror(); -	void turnonpower(); -	void powerlighton(); -	void powerlightoff(); -	void playchannel0(); -	void playchannel0(uint8 index, uint8 repeat); -	void playchannel1(); -	void playchannel1(uint8 index); -	void showmainops(); -	void showdiscops(); -	void createpanel(); -	void createpanel2(); -	void findroominloc(); -	void reelsonscreen(); +	void accessLightOn(); +	void accessLightOff(); +	void randomAccess(uint16 count); +	void randomAccess(); +	void monMessage(uint8 index); +	void monMessage(); +	void netError(); +	void turnOnPower(); +	void powerLightOn(); +	void powerLightOff(); +	void playChannel0(); +	void playChannel0(uint8 index, uint8 repeat); +	void playChannel1(); +	void playChannel1(uint8 index); +	void showMainOps(); +	void showDiscOps(); +	void createPanel(); +	void createPanel2(); +	void findRoomInLoc(); +	void reelsOnScreen();  	void reconstruct();  	void look(); -	void autolook(); -	void dolook(); -	void usetempcharset(); -	void usecharset1(); -	void getbackfromob(); -	void showfirstuse(); -	void showseconduse(); -	void actualsave(); -	void actualload(); -	void loadposition(unsigned int slot); -	void saveposition(unsigned int slot, const uint8 *descbuf); -	void openforsave(unsigned int slot); -	void openforload(unsigned int slot); +	void autoLook(); +	void doLook(); +	void useTempCharset(); +	void useCharset1(); +	void getBackFromOb(); +	void showFirstUse(); +	void showSecondUse(); +	void actualSave(); +	void actualLoad(); +	void loadPosition(unsigned int slot); +	void savePosition(unsigned int slot, const uint8 *descbuf); +	void openForSave(unsigned int slot); +	void openForLoad(unsigned int slot);  	uint16 allocateAndLoad(unsigned int size);  	void clearAndLoad(uint16 seg, uint8 c, unsigned int size, unsigned int maxSize);  	void loadRoomData(const Room* room, bool skipDat); -	void restoreall(); -	void restorereels(); -	void viewfolder(); +	void restoreAll(); +	void restoreReels(); +	void viewFolder();  	void checkFolderCoords(); -	void loadfolder(); -	void showfolder(); -	void showleftpage(); -	void showrightpage(); -	void nextfolder(); -	void lastfolder(); -	void folderhints(); -	void folderexit(); -	uint8 getlocation(uint8 index); -	void getlocation(); -	void setlocation(uint8 index); -	void setlocation(); +	void loadFolder(); +	void showFolder(); +	void showLeftPage(); +	void showRightPage(); +	void nextFolder(); +	void lastFolder(); +	void folderHints(); +	void folderExit(); +	uint8 getLocation(uint8 index); +	void getLocation(); +	void setLocation(uint8 index); +	void setLocation();  	const uint8 *getTextInFile1(uint16 index); -	void loadtemptext(); -	void loadtemptext(const char *fileName); -	void loadtraveltext(); -	void drawfloor(); -	void allocatebuffers(); -	void worktoscreenm(); -	bool checkspeed(ReelRoutine *routine); -	void checkspeed(); -	void sparkydrip(ReelRoutine &routine); -	void othersmoker(ReelRoutine &routine); +	void loadTempText(); +	void loadTempText(const char *fileName); +	void loadTravelText(); +	void drawFloor(); +	void allocateBuffers(); +	void workToScreenM(); +	bool checkSpeed(ReelRoutine *routine); +	void checkSpeed(); +	void sparkyDrip(ReelRoutine &routine); +	void otherSmoker(ReelRoutine &routine);  	void gamer(ReelRoutine &routine);  	void eden(ReelRoutine &routine);  	void sparky(ReelRoutine &routine); diff --git a/engines/dreamweb/talk.cpp b/engines/dreamweb/talk.cpp index 78b296afe6..55178cb150 100644 --- a/engines/dreamweb/talk.cpp +++ b/engines/dreamweb/talk.cpp @@ -24,16 +24,16 @@  namespace DreamGen { -uint16 DreamGenContext::getpersframe(uint8 index) { +uint16 DreamGenContext::getPersFrame(uint8 index) {  	return segRef(data.word(kPeople)).word(kPersonframes + index * 2);  } -void DreamGenContext::convicons() { +void DreamGenContext::convIcons() {  	uint8 index = data.byte(kCharacter) & 127; -	data.word(kCurrentframe) = getpersframe(index); -	Frame *frame = findsource(); +	data.word(kCurrentframe) = getPersFrame(index); +	Frame *frame = findSource();  	uint16 frameNumber = (data.word(kCurrentframe) - data.word(kTakeoff)) & 0xff; -	showframe(frame, 234, 2, frameNumber, 0); +	showFrame(frame, 234, 2, frameNumber, 0);  }  } /*namespace dreamgen */ diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp index b64797e0cd..fa11967ffc 100644 --- a/engines/dreamweb/use.cpp +++ b/engines/dreamweb/use.cpp @@ -35,90 +35,90 @@ struct UseListEntry {  	const char *id;  }; -void DreamGenContext::useroutine() { +void DreamGenContext::useRoutine() {  	static const UseListEntry kUseList[] = { -		{ &DreamGenContext::usemon,            "NETW" }, -		{ &DreamGenContext::useelevator1,      "ELVA" }, -		{ &DreamGenContext::useelevator2,      "ELVB" }, -		{ &DreamGenContext::useelevator3,      "ELVC" }, -		{ &DreamGenContext::useelevator4,      "ELVE" }, -		{ &DreamGenContext::useelevator5,      "ELVF" }, -		{ &DreamGenContext::usechurchgate,     "CGAT" }, -		{ &DreamGenContext::usestereo,         "REMO" }, -		{ &DreamGenContext::usebuttona,        "BUTA" }, -		{ &DreamGenContext::usewinch,          "CBOX" }, -		{ &DreamGenContext::uselighter,        "LITE" }, -		{ &DreamGenContext::useplate,          "PLAT" }, -		{ &DreamGenContext::usecontrol,        "LIFT" }, -		{ &DreamGenContext::usewire,           "WIRE" }, -		{ &DreamGenContext::usehandle,         "HNDL" }, -		{ &DreamGenContext::usehatch,          "HACH" }, -		{ &DreamGenContext::useelvdoor,        "DOOR" }, -		{ &DreamGenContext::usecashcard,       "CSHR" }, -		{ &DreamGenContext::usegun,            "GUNA" }, -		{ &DreamGenContext::usecardreader1,    "CRAA" }, -		{ &DreamGenContext::usecardreader2,    "CRBB" }, -		{ &DreamGenContext::usecardreader3,    "CRCC" }, -		{ &DreamGenContext::sitdowninbar,      "SEAT" }, -		{ &DreamGenContext::usemenu,           "MENU" }, -		{ &DreamGenContext::usecooker,         "COOK" }, -		{ &DreamGenContext::callhotellift,     "ELCA" }, -		{ &DreamGenContext::calledenslift,     "EDCA" }, -		{ &DreamGenContext::calledensdlift,    "DDCA" }, -		{ &DreamGenContext::usealtar,          "ALTR" }, -		{ &DreamGenContext::openhoteldoor,     "LOKA" }, -		{ &DreamGenContext::openhoteldoor2,    "LOKB" }, -		{ &DreamGenContext::openlouis,         "ENTA" }, -		{ &DreamGenContext::openryan,          "ENTB" }, -		{ &DreamGenContext::openpoolboss,      "ENTE" }, -		{ &DreamGenContext::openyourneighbour, "ENTC" }, -		{ &DreamGenContext::openeden,          "ENTD" }, -		{ &DreamGenContext::opensarters,       "ENTH" }, -		{ &DreamGenContext::wearwatch,         "WWAT" }, -		{ &DreamGenContext::usepoolreader,     "POOL" }, -		{ &DreamGenContext::wearshades,        "WSHD" }, -		{ &DreamGenContext::grafittidoor,      "GRAF" }, -		{ &DreamGenContext::trapdoor,          "TRAP" }, -		{ &DreamGenContext::edenscdplayer,     "CDPE" }, -		{ &DreamGenContext::opentvdoor,        "DLOK" }, -		{ &DreamGenContext::usehole,           "HOLE" }, -		{ &DreamGenContext::usedryer,          "DRYR" }, -		{ &DreamGenContext::usechurchhole,     "HOLY" }, -		{ &DreamGenContext::usewall,           "WALL" }, -		{ &DreamGenContext::usediary,          "BOOK" }, -		{ &DreamGenContext::useaxe,            "AXED" }, -		{ &DreamGenContext::useshield,         "SHLD" }, -		{ &DreamGenContext::userailing,        "BCNY" }, -		{ &DreamGenContext::usecoveredbox,     "LIDC" }, -		{ &DreamGenContext::useclearbox,       "LIDU" }, -		{ &DreamGenContext::useopenbox,        "LIDO" }, -		{ &DreamGenContext::usepipe,           "PIPE" }, -		{ &DreamGenContext::usebalcony,        "BALC" }, -		{ &DreamGenContext::usewindow,         "WIND" }, -		{ &DreamGenContext::viewfolder,        "PAPR" }, -		{ &DreamGenContext::usetrainer,        "UWTA" }, -		{ &DreamGenContext::usetrainer,        "UWTB" }, -		{ &DreamGenContext::entersymbol,       "STAT" }, -		{ &DreamGenContext::opentomb,          "TLID" }, -		{ &DreamGenContext::useslab,           "SLAB" }, -		{ &DreamGenContext::usecart,           "CART" }, -		{ &DreamGenContext::usefullcart,       "FCAR" }, -		{ &DreamGenContext::slabdoora,         "SLBA" }, -		{ &DreamGenContext::slabdoorb,         "SLBB" }, -		{ &DreamGenContext::slabdoorc,         "SLBC" }, -		{ &DreamGenContext::slabdoord,         "SLBD" }, -		{ &DreamGenContext::slabdoore,         "SLBE" }, -		{ &DreamGenContext::slabdoorf,         "SLBF" }, -		{ &DreamGenContext::useplinth,         "PLIN" }, -		{ &DreamGenContext::useladder,         "LADD" }, -		{ &DreamGenContext::useladderb,        "LADB" }, +		{ &DreamGenContext::useMon,            "NETW" }, +		{ &DreamGenContext::useElevator1,      "ELVA" }, +		{ &DreamGenContext::useElevator2,      "ELVB" }, +		{ &DreamGenContext::useElevator3,      "ELVC" }, +		{ &DreamGenContext::useElevator4,      "ELVE" }, +		{ &DreamGenContext::useElevator5,      "ELVF" }, +		{ &DreamGenContext::useChurchGate,     "CGAT" }, +		{ &DreamGenContext::useStereo,         "REMO" }, +		{ &DreamGenContext::useButtonA,        "BUTA" }, +		{ &DreamGenContext::useWinch,          "CBOX" }, +		{ &DreamGenContext::useLighter,        "LITE" }, +		{ &DreamGenContext::usePlate,          "PLAT" }, +		{ &DreamGenContext::useControl,        "LIFT" }, +		{ &DreamGenContext::useWire,           "WIRE" }, +		{ &DreamGenContext::useHandle,         "HNDL" }, +		{ &DreamGenContext::useHatch,          "HACH" }, +		{ &DreamGenContext::useElvDoor,        "DOOR" }, +		{ &DreamGenContext::useCashCard,       "CSHR" }, +		{ &DreamGenContext::useGun,            "GUNA" }, +		{ &DreamGenContext::useCardReader1,    "CRAA" }, +		{ &DreamGenContext::useCardReader2,    "CRBB" }, +		{ &DreamGenContext::useCardReader3,    "CRCC" }, +		{ &DreamGenContext::sitDownInBar,      "SEAT" }, +		{ &DreamGenContext::useMenu,           "MENU" }, +		{ &DreamGenContext::useCooker,         "COOK" }, +		{ &DreamGenContext::callHotelLift,     "ELCA" }, +		{ &DreamGenContext::callEdensLift,     "EDCA" }, +		{ &DreamGenContext::callEdensDLift,    "DDCA" }, +		{ &DreamGenContext::useAltar,          "ALTR" }, +		{ &DreamGenContext::openHotelDoor,     "LOKA" }, +		{ &DreamGenContext::openHotelDoor2,    "LOKB" }, +		{ &DreamGenContext::openLouis,         "ENTA" }, +		{ &DreamGenContext::openRyan,          "ENTB" }, +		{ &DreamGenContext::openPoolBoss,      "ENTE" }, +		{ &DreamGenContext::openYourNeighbour, "ENTC" }, +		{ &DreamGenContext::openEden,          "ENTD" }, +		{ &DreamGenContext::openSarters,       "ENTH" }, +		{ &DreamGenContext::wearWatch,         "WWAT" }, +		{ &DreamGenContext::usePoolReader,     "POOL" }, +		{ &DreamGenContext::wearShades,        "WSHD" }, +		{ &DreamGenContext::grafittiDoor,      "GRAF" }, +		{ &DreamGenContext::trapDoor,          "TRAP" }, +		{ &DreamGenContext::edensCDPlayer,     "CDPE" }, +		{ &DreamGenContext::openTVDoor,        "DLOK" }, +		{ &DreamGenContext::useHole,           "HOLE" }, +		{ &DreamGenContext::useDryer,          "DRYR" }, +		{ &DreamGenContext::useChurchHole,     "HOLY" }, +		{ &DreamGenContext::useWall,           "WALL" }, +		{ &DreamGenContext::useDiary,          "BOOK" }, +		{ &DreamGenContext::useAxe,            "AXED" }, +		{ &DreamGenContext::useShield,         "SHLD" }, +		{ &DreamGenContext::useRailing,        "BCNY" }, +		{ &DreamGenContext::useCoveredBox,     "LIDC" }, +		{ &DreamGenContext::useClearBox,       "LIDU" }, +		{ &DreamGenContext::useOpenBox,        "LIDO" }, +		{ &DreamGenContext::usePipe,           "PIPE" }, +		{ &DreamGenContext::useBalcony,        "BALC" }, +		{ &DreamGenContext::useWindow,         "WIND" }, +		{ &DreamGenContext::viewFolder,        "PAPR" }, +		{ &DreamGenContext::useTrainer,        "UWTA" }, +		{ &DreamGenContext::useTrainer,        "UWTB" }, +		{ &DreamGenContext::enterSymbol,       "STAT" }, +		{ &DreamGenContext::openTomb,          "TLID" }, +		{ &DreamGenContext::useSLab,           "SLAB" }, +		{ &DreamGenContext::useCart,           "CART" }, +		{ &DreamGenContext::useFullCart,       "FCAR" }, +		{ &DreamGenContext::sLabDoorA,         "SLBA" }, +		{ &DreamGenContext::sLabDoorB,         "SLBB" }, +		{ &DreamGenContext::sLabDoorC,         "SLBC" }, +		{ &DreamGenContext::sLabDoorD,         "SLBD" }, +		{ &DreamGenContext::sLabDoorE,         "SLBE" }, +		{ &DreamGenContext::sLabDoorF,         "SLBF" }, +		{ &DreamGenContext::usePlinth,         "PLIN" }, +		{ &DreamGenContext::useLadder,         "LADD" }, +		{ &DreamGenContext::useLadderB,        "LADB" },  		{ &DreamGenContext::chewy,             "GUMA" }, -		{ &DreamGenContext::wheelsound,        "SQEE" }, -		{ &DreamGenContext::runtap,            "TAPP" }, -		{ &DreamGenContext::playguitar,        "GUIT" }, -		{ &DreamGenContext::hotelcontrol,      "CONT" }, -		{ &DreamGenContext::hotelbell,         "BELL" }, +		{ &DreamGenContext::wheelSound,        "SQEE" }, +		{ &DreamGenContext::runTap,            "TAPP" }, +		{ &DreamGenContext::playGuitar,        "GUIT" }, +		{ &DreamGenContext::hotelControl,      "CONT" }, +		{ &DreamGenContext::hotelBell,         "BELL" },  	};  	if (data.byte(kReallocation) >= 50) { @@ -127,7 +127,7 @@ void DreamGenContext::useroutine() {  		data.byte(kPointerpower) = 0;  	} -	getanyad(); +	getAnyAd();  	const uint8 *id = es.ptr(bx + 12, 4);  	for (size_t i = 0; i < sizeof(kUseList)/sizeof(UseListEntry); ++i) { @@ -138,89 +138,89 @@ void DreamGenContext::useroutine() {  		}  	} -	delpointer(); -	uint8 *obText = getobtextstartCPP(); -	if (findnextcolon(&obText) != 0) { -		if (findnextcolon(&obText) != 0) { +	delPointer(); +	uint8 *obText = getObTextStartCPP(); +	if (findNextColon(&obText) != 0) { +		if (findNextColon(&obText) != 0) {  			if (*obText != 0) { -				usetext(obText); -				hangonp(400); -				putbackobstuff(); +				useText(obText); +				hangOnP(400); +				putBackObStuff();  				return;  			}  		}  	} -	createpanel(); -	showpanel(); -	showman(); -	showexit(); -	obicons(); -	printmessage(33, 100, 63, 241, true); -	worktoscreenm(); -	hangonp(50); -	putbackobstuff(); +	createPanel(); +	showPanel(); +	showMan(); +	showExit(); +	obIcons(); +	printMessage(33, 100, 63, 241, true); +	workToScreenM(); +	hangOnP(50); +	putBackObStuff();  	data.byte(kCommandtype) = 255;  } -void DreamGenContext::usetext() { -	usetext(es.ptr(si, 0)); +void DreamGenContext::useText() { +	useText(es.ptr(si, 0));  } -void DreamGenContext::usetext(const uint8 *string) { -	createpanel(); -	showpanel(); -	showman(); -	showexit(); -	obicons(); -	printdirect(string, 36, 104, 241, true); -	worktoscreenm(); +void DreamGenContext::useText(const uint8 *string) { +	createPanel(); +	showPanel(); +	showMan(); +	showExit(); +	obIcons(); +	printDirect(string, 36, 104, 241, true); +	workToScreenM();  } -void DreamGenContext::showfirstuse() { -	uint8 *obText = getobtextstartCPP(); -	findnextcolon(&obText); -	findnextcolon(&obText); -	usetext(obText); -	hangonp(400); +void DreamGenContext::showFirstUse() { +	uint8 *obText = getObTextStartCPP(); +	findNextColon(&obText); +	findNextColon(&obText); +	useText(obText); +	hangOnP(400);  } -void DreamGenContext::showseconduse() { -	uint8 *obText = getobtextstartCPP(); -	findnextcolon(&obText); -	findnextcolon(&obText); -	findnextcolon(&obText); -	usetext(obText); -	hangonp(400); +void DreamGenContext::showSecondUse() { +	uint8 *obText = getObTextStartCPP(); +	findNextColon(&obText); +	findNextColon(&obText); +	findNextColon(&obText); +	useText(obText); +	hangOnP(400);  } -void DreamGenContext::viewfolder() { +void DreamGenContext::viewFolder() {  	data.byte(kManisoffscreen) = 1; -	getridofall(); -	loadfolder(); +	getRidOfAll(); +	loadFolder();  	data.byte(kFolderpage) = 0; -	showfolder(); -	worktoscreenm(); +	showFolder(); +	workToScreenM();  	data.byte(kGetback) = 0;  	do {  		if (quitRequested())  			break; -		delpointer(); -		readmouse(); -		showpointer(); -		vsync(); -		dumppointer(); -		dumptextline(); +		delPointer(); +		readMouse(); +		showPointer(); +		vSync(); +		dumpPointer(); +		dumpTextLine();  		checkFolderCoords();  	} while (data.byte(kGetback) == 0);  	data.byte(kManisoffscreen) = 0; -	getridoftemp(); -	getridoftemp2(); -	getridoftemp3(); -	getridoftempcharset(); -	restoreall(); -	redrawmainscrn(); -	worktoscreenm(); +	getRidOfTemp(); +	getRidOfTemp2(); +	getRidOfTemp3(); +	getRidOfTempCharset(); +	restoreAll(); +	redrawMainScrn(); +	workToScreenM();  }  } /*namespace dreamgen */ diff --git a/engines/dreamweb/vgafades.cpp b/engines/dreamweb/vgafades.cpp index c4c473f040..f0ed36620d 100644 --- a/engines/dreamweb/vgafades.cpp +++ b/engines/dreamweb/vgafades.cpp @@ -36,31 +36,31 @@ uint8 *DreamGenContext::endPalette() {  	return segRef(data.word(kBuffers)).ptr(kEndpal, 256*3);  } -void DreamGenContext::clearstartpal() { +void DreamGenContext::clearStartPal() {  	memset(startPalette(), 0, 256*3);  } -void DreamGenContext::clearendpal() { +void DreamGenContext::clearEndPal() {  	memset(endPalette(), 0, 256*3);  } -void DreamGenContext::paltostartpal() { +void DreamGenContext::palToStartPal() {  	memcpy(startPalette(), mainPalette(), 256*3);  } -void DreamGenContext::endpaltostart() { +void DreamGenContext::endPalToStart() {  	memcpy(startPalette(), endPalette(), 256*3);  } -void DreamGenContext::startpaltoend() { +void DreamGenContext::startPalToEnd() {  	memcpy(endPalette(), startPalette(), 256*3);  } -void DreamGenContext::paltoendpal() { +void DreamGenContext::palToEndPal() {  	memcpy(endPalette(), mainPalette(), 256*3);  } -void DreamGenContext::fadecalculation() { +void DreamGenContext::fadeCalculation() {  	if (data.byte(kFadecount) == 0) {  		data.byte(kFadedirection) = 0;  		return; @@ -83,29 +83,29 @@ void DreamGenContext::fadecalculation() {  	--data.byte(kFadecount);  } -void DreamGenContext::fadeupyellows() { -	paltoendpal(); +void DreamGenContext::fadeupYellows() { +	palToEndPal();  	memset(endPalette() + 231*3, 0, 8*3);  	memset(endPalette() + 246*3, 0, 1*3);  	data.byte(kFadedirection) = 1;  	data.byte(kFadecount) = 63;  	data.byte(kColourpos) = 0;  	data.byte(kNumtofade) = 128; -	hangon(128); +	hangOn(128);  } -void DreamGenContext::fadeupmonfirst() { -	paltostartpal(); -	paltoendpal(); +void DreamGenContext::fadeupMonFirst() { +	palToStartPal(); +	palToEndPal();  	memset(startPalette() + 231*3, 0, 8*3);  	memset(startPalette() + 246*3, 0, 1*3);  	data.byte(kFadedirection) = 1;  	data.byte(kFadecount) = 63;  	data.byte(kColourpos) = 0;  	data.byte(kNumtofade) = 128; -	hangon(64); -	playchannel1(26); -	hangon(64); +	hangOn(64); +	playChannel1(26); +	hangOn(64);  }  } /*namespace dreamgen */ diff --git a/engines/dreamweb/vgagrafx.cpp b/engines/dreamweb/vgagrafx.cpp index 658f45ed04..aee8417f70 100644 --- a/engines/dreamweb/vgagrafx.cpp +++ b/engines/dreamweb/vgagrafx.cpp @@ -31,18 +31,18 @@ uint8 *DreamGenContext::workspace() {  	return result;  } -void DreamGenContext::allocatework() { -	data.word(kWorkspace) = allocatemem(0x1000); +void DreamGenContext::allocateWork() { +	data.word(kWorkspace) = allocateMem(0x1000);  } -void DreamGenContext::multiget() { -	multiget(ds.ptr(si, 0), di, bx, cl, ch); +void DreamGenContext::multiGet() { +	multiGet(ds.ptr(si, 0), di, bx, cl, ch);  	si += cl * ch;  	di += bx * kScreenwidth + kScreenwidth * ch;  	cx = 0;  } -void DreamGenContext::multiget(uint8 *dst, uint16 x, uint16 y, uint8 w, uint8 h) { +void DreamGenContext::multiGet(uint8 *dst, uint16 x, uint16 y, uint8 w, uint8 h) {  	assert(x < 320);  	assert(y < 200);  	const uint8 *src = workspace() + x + y * kScreenwidth; @@ -50,7 +50,7 @@ void DreamGenContext::multiget(uint8 *dst, uint16 x, uint16 y, uint8 w, uint8 h)  		h = 200 - y;  	if (x + w > 320)  		w = 320 - x; -	//debug(1, "multiget %u,%u %ux%u -> segment: %04x->%04x", x, y, w, h, (uint16)ds, (uint16)es); +	//debug(1, "multiGet %u,%u %ux%u -> segment: %04x->%04x", x, y, w, h, (uint16)ds, (uint16)es);  	for(unsigned l = 0; l < h; ++l) {  		const uint8 *src_p = src + kScreenwidth * l;  		uint8 *dst_p = dst + w * l; @@ -58,14 +58,14 @@ void DreamGenContext::multiget(uint8 *dst, uint16 x, uint16 y, uint8 w, uint8 h)  	}  } -void DreamGenContext::multiput() { -	multiput(ds.ptr(si, 0), di, bx, cl, ch); +void DreamGenContext::multiPut() { +	multiPut(ds.ptr(si, 0), di, bx, cl, ch);  	si += cl * ch;  	di += bx * kScreenwidth + kScreenwidth * ch;  	cx = 0;  } -void DreamGenContext::multiput(const uint8 *src, uint16 x, uint16 y, uint8 w, uint8 h) { +void DreamGenContext::multiPut(const uint8 *src, uint16 x, uint16 y, uint8 w, uint8 h) {  	assert(x < 320);  	assert(y < 200);  	uint8 *dst = workspace() + x + y * kScreenwidth; @@ -73,7 +73,7 @@ void DreamGenContext::multiput(const uint8 *src, uint16 x, uint16 y, uint8 w, ui  		h = 200 - y;  	if (x + w > 320)  		w = 320 - x; -	//debug(1, "multiput %ux%u -> segment: %04x->%04x", w, h, (uint16)ds, (uint16)es); +	//debug(1, "multiPut %ux%u -> segment: %04x->%04x", w, h, (uint16)ds, (uint16)es);  	for(unsigned l = 0; l < h; ++l) {  		const uint8 *src_p = src + w * l;  		uint8 *dst_p = dst + kScreenwidth * l; @@ -81,14 +81,14 @@ void DreamGenContext::multiput(const uint8 *src, uint16 x, uint16 y, uint8 w, ui  	}  } -void DreamGenContext::multidump(uint16 x, uint16 y, uint8 width, uint8 height) { +void DreamGenContext::multiDump(uint16 x, uint16 y, uint8 width, uint8 height) {  	unsigned offset = x + y * kScreenwidth; -	//debug(1, "multidump %ux%u(segment: %04x) -> %d,%d(address: %d)", w, h, (uint16)ds, x, y, offset); +	//debug(1, "multiDump %ux%u(segment: %04x) -> %d,%d(address: %d)", w, h, (uint16)ds, x, y, offset);  	engine->blit(workspace() + offset, kScreenwidth, x, y, width, height);  } -void DreamGenContext::multidump() { -	multidump(di, bx, cl, ch); +void DreamGenContext::multiDump() { +	multiDump(di, bx, cl, ch);  	unsigned offset = di + bx * kScreenwidth;  	si = di = offset + ch * kScreenwidth;  	cx = 0; @@ -98,14 +98,14 @@ void DreamGenContext::workToScreenCPP() {  	engine->blit(workspace(), 320, 0, 0, 320, 200);  } -void DreamGenContext::worktoscreen() { +void DreamGenContext::workToScreen() {  	workToScreenCPP();  	uint size = 320 * 200;  	di = si = size;  	cx = 0;  } -void DreamGenContext::printundermon() { +void DreamGenContext::printUnderMon() {  	engine->printUnderMonitor();  } @@ -113,7 +113,7 @@ void DreamGenContext::cls() {  	engine->cls();  } -void DreamGenContext::frameoutnm(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y) { +void DreamGenContext::frameOutNm(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y) {  	dst += pitch * y + x;  	for (uint16 j = 0; j < height; ++j) { @@ -123,7 +123,7 @@ void DreamGenContext::frameoutnm(uint8 *dst, const uint8 *src, uint16 pitch, uin  	}  } -void DreamGenContext::frameoutbh(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y) { +void DreamGenContext::frameOutBh(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y) {  	uint16 stride = pitch - width;  	dst += y * pitch + x; @@ -139,7 +139,7 @@ void DreamGenContext::frameoutbh(uint8 *dst, const uint8 *src, uint16 pitch, uin  	}  } -void DreamGenContext::frameoutfx(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y) { +void DreamGenContext::frameOutFx(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, uint16 x, uint16 y) {  	uint16 stride = pitch - width;  	dst += y * pitch + x;  	dst -= width; @@ -156,7 +156,7 @@ void DreamGenContext::frameoutfx(uint8 *dst, const uint8 *src, uint16 pitch, uin  	}  } -void DreamGenContext::doshake() { +void DreamGenContext::doShake() {  	uint8 &counter = data.byte(kShakecounter);  	if (counter == 48)  		return; @@ -185,7 +185,7 @@ void DreamGenContext::doshake() {  	engine->setShakePos(offset >= 0 ? offset : -offset);  } -void DreamGenContext::vsync() { +void DreamGenContext::vSync() {  	push(ax);  	push(bx);  	push(cx); @@ -205,8 +205,8 @@ void DreamGenContext::vsync() {  	ax = pop();  } -void DreamGenContext::setmode() { -	vsync(); +void DreamGenContext::setMode() { +	vSync();  	initGraphics(320, 200, false);  } @@ -219,7 +219,7 @@ static Common::String getFilename(Context &context) {  	return name;  } -void DreamGenContext::showpcx() { +void DreamGenContext::showPCX() {  	Common::String name = getFilename(*this);  	Common::File pcxFile; @@ -228,7 +228,7 @@ void DreamGenContext::showpcx() {  		return;  	} -	uint8 *maingamepal; +	uint8 *mainGamePal;  	int i, j;  	// Read the 16-color palette into the 'maingamepal' buffer. Note that @@ -236,12 +236,12 @@ void DreamGenContext::showpcx() {  	pcxFile.seek(16, SEEK_SET);  	es = data.word(kBuffers); -	maingamepal = es.ptr(kMaingamepal, 768); -	pcxFile.read(maingamepal, 48); +	mainGamePal = es.ptr(kMaingamepal, 768); +	pcxFile.read(mainGamePal, 48); -	memset(maingamepal + 48, 0xff, 720); +	memset(mainGamePal + 48, 0xff, 720);  	for (i = 0; i < 48; i++) { -		maingamepal[i] >>= 2; +		mainGamePal[i] >>= 2;  	}  	// Decode the image data. @@ -289,7 +289,7 @@ void DreamGenContext::showpcx() {  	pcxFile.close();  } -void DreamGenContext::frameoutv(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, int16 x, int16 y) { +void DreamGenContext::frameOutV(uint8 *dst, const uint8 *src, uint16 pitch, uint16 width, uint16 height, int16 x, int16 y) {  	// NB : These resilience checks were not in the original engine, but did they result in undefined behaviour  	// or was something broken during porting to C++?  	assert(pitch == 320); @@ -331,12 +331,12 @@ void DreamGenContext::frameoutv(uint8 *dst, const uint8 *src, uint16 pitch, uint  	}  } -void DreamGenContext::showframe(const Frame *frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag) { +void DreamGenContext::showFrame(const Frame *frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag) {  	uint8 width, height; -	showframe(frameData, x, y, frameNumber, effectsFlag, &width, &height); +	showFrame(frameData, x, y, frameNumber, effectsFlag, &width, &height);  } -void DreamGenContext::showframe(const Frame *frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height) { +void DreamGenContext::showFrame(const Frame *frameData, uint16 x, uint16 y, uint16 frameNumber, uint8 effectsFlag, uint8 *width, uint8 *height) {  	const Frame *frame = frameData + frameNumber;  	if ((frame->width == 0) && (frame->height == 0)) {  		*width = 0; @@ -344,12 +344,12 @@ void DreamGenContext::showframe(const Frame *frameData, uint16 x, uint16 y, uint  		return;  	} -//notblankshow: +//notBlankShow:  	if ((effectsFlag & 128) == 0) {  		x += frame->x;  		y += frame->y;  	} -//skipoffsets: +//skipOffsets:  	*width = frame->width;  	*height = frame->height; @@ -360,45 +360,45 @@ void DreamGenContext::showframe(const Frame *frameData, uint16 x, uint16 y, uint  			x -= *width / 2;  			y -= *height / 2;  		} -		if (effectsFlag & 64) { //diffdest -			frameoutfx(es.ptr(0, dx * *height), pSrc, dx, *width, *height, x, y); +		if (effectsFlag & 64) { //diffDest +			frameOutFx(es.ptr(0, dx * *height), pSrc, dx, *width, *height, x, y);  			return;  		} -		if (effectsFlag & 8) { //printlist +		if (effectsFlag & 8) { //printList  			/*  			push(ax);  			al = x - data.word(kMapadx);  			ah = y - data.word(kMapady); -			//addtoprintlist(); // NB: Commented in the original asm +			//addToPrintList(); // NB: Commented in the original asm  			ax = pop();  			*/  		} -		if (effectsFlag & 4) { //flippedx -			frameoutfx(workspace(), pSrc, 320, *width, *height, x, y); +		if (effectsFlag & 4) { //flippedX +			frameOutFx(workspace(), pSrc, 320, *width, *height, x, y);  			return;  		} -		if (effectsFlag & 2) { //nomask -			frameoutnm(workspace(), pSrc, 320, *width, *height, x, y); +		if (effectsFlag & 2) { //noMask +			frameOutNm(workspace(), pSrc, 320, *width, *height, x, y);  			return;  		}  		if (effectsFlag & 32) { -			frameoutbh(workspace(), pSrc, 320, *width, *height, x, y); +			frameOutBh(workspace(), pSrc, 320, *width, *height, x, y);  			return;  		}  	} -//noeffects: -	frameoutv(workspace(), pSrc, 320, *width, *height, x, y); +//noEffects: +	frameOutV(workspace(), pSrc, 320, *width, *height, x, y);  	return;  } -void DreamGenContext::showframe() { +void DreamGenContext::showFrame() {  	uint8 width, height; -	showframe((Frame *)ds.ptr(0, 0), di, bx, ax & 0x1ff, ah & 0xfe, &width, &height); +	showFrame((Frame *)ds.ptr(0, 0), di, bx, ax & 0x1ff, ah & 0xfe, &width, &height);  	cl = width;  	ch = height;  } -void DreamGenContext::clearwork() { +void DreamGenContext::clearWork() {  	memset(workspace(), 0, 320*200);  } @@ -408,7 +408,7 @@ void DreamGenContext::zoom() {  	if (data.byte(kZoomon) != 1)  		return;  	if (data.byte(kCommandtype) >= 199) { -		putunderzoom(); +		putUnderZoom();  		return;  	}  	uint16 srcOffset = (data.word(kOldpointery) - 9) * 320 + (data.word(kOldpointerx) - 11); @@ -430,19 +430,19 @@ void DreamGenContext::zoom() {  	data.byte(kDidzoom) = 1;  } -void DreamGenContext::paneltomap() { -	multiget(segRef(data.word(kMapstore)).ptr(0, 0), data.word(kMapxstart) + data.word(kMapadx), data.word(kMapystart) + data.word(kMapady), data.byte(kMapxsize), data.byte(kMapysize)); +void DreamGenContext::panelToMap() { +	multiGet(segRef(data.word(kMapstore)).ptr(0, 0), data.word(kMapxstart) + data.word(kMapadx), data.word(kMapystart) + data.word(kMapady), data.byte(kMapxsize), data.byte(kMapysize));  } -void DreamGenContext::maptopanel() { -	multiput(segRef(data.word(kMapstore)).ptr(0, 0), data.word(kMapxstart) + data.word(kMapadx), data.word(kMapystart) + data.word(kMapady), data.byte(kMapxsize), data.byte(kMapysize)); +void DreamGenContext::mapToPanel() { +	multiPut(segRef(data.word(kMapstore)).ptr(0, 0), data.word(kMapxstart) + data.word(kMapadx), data.word(kMapystart) + data.word(kMapady), data.byte(kMapxsize), data.byte(kMapysize));  } -void DreamGenContext::dumpmap() { -	multidump(data.word(kMapxstart) + data.word(kMapadx), data.word(kMapystart) + data.word(kMapady), data.byte(kMapxsize), data.byte(kMapysize)); +void DreamGenContext::dumpMap() { +	multiDump(data.word(kMapxstart) + data.word(kMapadx), data.word(kMapystart) + data.word(kMapady), data.byte(kMapxsize), data.byte(kMapysize));  } -void DreamGenContext::transferinv() { +void DreamGenContext::transferInv() {  	const Frame *freeFrames = (const Frame *)segRef(data.word(kFreeframes)).ptr(kFrframedata, 0);  	const Frame *freeFrame = freeFrames + (3 * data.byte(kItemtotran) + 1);  	Frame *exFrames = (Frame *)segRef(data.word(kExtras)).ptr(kExframedata, 0); @@ -459,23 +459,23 @@ void DreamGenContext::transferinv() {  	data.word(kExframepos) += byteCount;  } -bool DreamGenContext::pixelcheckset(const ObjPos *pos, uint8 x, uint8 y) { +bool DreamGenContext::pixelCheckSet(const ObjPos *pos, uint8 x, uint8 y) {  	x -= pos->xMin;  	y -= pos->yMin; -	SetObject *setObject = getsetad(pos->index); +	SetObject *setObject = getSetAd(pos->index);  	Frame *frame = (Frame *)segRef(data.word(kSetframes)).ptr(kFramedata, 0) + setObject->index;  	const uint8 *ptr = segRef(data.word(kSetframes)).ptr(kFrames, 0) + frame->ptr() + y * frame->width + x;  	return *ptr != 0;  } -void DreamGenContext::loadpalfromiff() { +void DreamGenContext::loadPalFromIFF() {  	dx = kPalettescreen; -	openfile(); +	openFile();  	cx = 2000;  	ds = data.word(kMapstore);  	dx = 0; -	readfromfile(); -	closefile(); +	readFromFile(); +	closeFile();  	const uint8 *src = segRef(data.word(kMapstore)).ptr(0x30, 0);  	uint8 *dst = mainPalette(); @@ -492,19 +492,19 @@ void DreamGenContext::loadpalfromiff() {  	}  } -void DreamGenContext::createpanel() { +void DreamGenContext::createPanel() {  	Frame *icons = (Frame *)segRef(data.word(kIcons2)).ptr(0, 0); -	showframe(icons, 0, 8, 0, 2); -	showframe(icons, 160, 8, 0, 2); -	showframe(icons, 0, 104, 0, 2); -	showframe(icons, 160, 104, 0, 2); +	showFrame(icons, 0, 8, 0, 2); +	showFrame(icons, 160, 8, 0, 2); +	showFrame(icons, 0, 104, 0, 2); +	showFrame(icons, 160, 104, 0, 2);  } -void DreamGenContext::createpanel2() { -	createpanel(); +void DreamGenContext::createPanel2() { +	createPanel();  	Frame *icons = (Frame *)segRef(data.word(kIcons2)).ptr(0, 0); -	showframe(icons, 0, 0, 5, 2); -	showframe(icons, 160, 0, 5, 2); +	showFrame(icons, 0, 0, 5, 2); +	showFrame(icons, 160, 0, 5, 2);  }  } /*namespace dreamgen */  | 
