diff options
| author | Gregory Montoir | 2004-01-11 14:11:36 +0000 | 
|---|---|---|
| committer | Gregory Montoir | 2004-01-11 14:11:36 +0000 | 
| commit | 6dc8407297fc11301c8abe6c7e0801f046567449 (patch) | |
| tree | 9ab212394c1443e14f8d6dcf4cffb1c18c136035 /queen/graphics.cpp | |
| parent | f2874733b0cee77307ef7abd59af9b5c4ac43c9f (diff) | |
| download | scummvm-rg350-6dc8407297fc11301c8abe6c7e0801f046567449.tar.gz scummvm-rg350-6dc8407297fc11301c8abe6c7e0801f046567449.tar.bz2 scummvm-rg350-6dc8407297fc11301c8abe6c7e0801f046567449.zip  | |
cleanup
svn-id: r12318
Diffstat (limited to 'queen/graphics.cpp')
| -rw-r--r-- | queen/graphics.cpp | 44 | 
1 files changed, 0 insertions, 44 deletions
diff --git a/queen/graphics.cpp b/queen/graphics.cpp index 14ede39b2a..0d009cd82b 100644 --- a/queen/graphics.cpp +++ b/queen/graphics.cpp @@ -32,14 +32,12 @@  namespace Queen { -  void BobSlot::curPos(int16 xx, int16 yy) {  	active = true;  	x = xx;  	y = yy;  } -  void BobSlot::move(int16 dstx, int16 dsty, int16 spd) {  	active = true;  	moving = true; @@ -78,7 +76,6 @@ void BobSlot::move(int16 dstx, int16 dsty, int16 spd) {  	moveOneStep();  } -  void BobSlot::moveOneStep() {  	if(xmajor) {  		if(x == endx) { @@ -107,7 +104,6 @@ void BobSlot::moveOneStep() {  	}  } -  void BobSlot::animOneStep() {  	if (anim.string.buffer != NULL) {  		--anim.speed; @@ -142,7 +138,6 @@ void BobSlot::animOneStep() {  	}  } -  void BobSlot::animString(const AnimFrame *animBuf) {  	active = true;  	animating = true; @@ -152,7 +147,6 @@ void BobSlot::animString(const AnimFrame *animBuf) {  	anim.speed = animBuf->speed / 4;  } -  void BobSlot::animNormal(uint16 firstFrame, uint16 lastFrame, uint16 spd, bool rebound, bool flip) {  	active = true;  	animating = true; @@ -167,7 +161,6 @@ void BobSlot::animNormal(uint16 firstFrame, uint16 lastFrame, uint16 spd, bool r  	xflip = flip;  } -  void BobSlot::clear() {  	active = false;  	xflip  = false; @@ -190,12 +183,10 @@ Graphics::Graphics(QueenEngine *vm)  	_shrinkBuffer.data = new uint8[ BOB_SHRINK_BUF_SIZE ];  } -  Graphics::~Graphics() {  	delete[] _shrinkBuffer.data;  } -  void Graphics::unpackControlBank() {  	_vm->bankMan()->load("control.BBK",17);  	_vm->bankMan()->unpack(1, 1, 17); // Mouse pointer @@ -204,13 +195,11 @@ void Graphics::unpackControlBank() {  	_vm->bankMan()->close(17);  } -  void Graphics::setupMouseCursor() {  	BobFrame *bf = _vm->bankMan()->fetchFrame(1);  	_vm->display()->setMouseCursor(bf->data, bf->width, bf->height);  } -  void Graphics::drawBob(const BobSlot *bs, int16 x, int16 y) {  	debug(9, "Graphics::drawBob(%d, %d, %d)", bs->frameNum, x, y); @@ -264,7 +253,6 @@ void Graphics::drawBob(const BobSlot *bs, int16 x, int16 y) {  	}  } -  void Graphics::drawInventoryItem(uint32 frameNum, uint16 x, uint16 y) {  	if (frameNum != 0) {  		BobFrame *bf = _vm->bankMan()->fetchFrame(frameNum); @@ -274,7 +262,6 @@ void Graphics::drawInventoryItem(uint32 frameNum, uint16 x, uint16 y) {  	}  } -  void Graphics::pasteBob(uint16 objNum, uint16 image) {  	GraphicData *pgd = _vm->logic()->graphicData(objNum);  	_vm->bankMan()->unpack(pgd->firstFrame, image, 15); @@ -283,7 +270,6 @@ void Graphics::pasteBob(uint16 objNum, uint16 image) {  	_vm->bankMan()->eraseFrame(image);  } -  void Graphics::shrinkFrame(const BobFrame *bf, uint16 percentage) {  	// computing new size, rounding to upper value  	uint16 new_w = (bf->width  * percentage + 50) / 100; @@ -328,7 +314,6 @@ void Graphics::shrinkFrame(const BobFrame *bf, uint16 percentage) {  	}  } -  void Graphics::clearBob(uint32 bobNum) {  	BobSlot *pbs = bob(bobNum);  	pbs->clear(); @@ -337,7 +322,6 @@ void Graphics::clearBob(uint32 bobNum) {  	}  } -  void Graphics::sortBobs() {  	_sortedBobsCount = 0; @@ -377,10 +361,8 @@ void Graphics::sortBobs() {  			SWAP(_sortedBobs[index], _sortedBobs[smallest]);  		}  	} -  } -  void Graphics::drawBobs() {  	int i;  	for (i = 0; i < _sortedBobsCount; ++i) { @@ -412,21 +394,18 @@ void Graphics::drawBobs() {  	}  } -  void Graphics::clearBobs() {  	for(int32 i = 0; i < ARRAYSIZE(_bobs); ++i) {  		clearBob(i);  	}  } -  void Graphics::stopBobs() {  	for(int32 i = 0; i < ARRAYSIZE(_bobs); ++i) {  		_bobs[i].moving = false;  	}  } -  BobSlot *Graphics::bob(int index) {  	if (index < MAX_BOBS_NUMBER)  		return _bobs + index; @@ -436,7 +415,6 @@ BobSlot *Graphics::bob(int index) {  	}  } -  void Graphics::setBobText(  		BobSlot *pbs,   		const char *text,  @@ -551,7 +529,6 @@ void Graphics::setBobText(  	}  } -  void Graphics::handleParallax(uint16 roomNum) {  	int i;  	uint16 screenScroll = _vm->display()->horizontalScroll(); @@ -619,7 +596,6 @@ void Graphics::handleParallax(uint16 roomNum) {  	}  } -  void Graphics::setupNewRoom(const char *room, uint16 roomNum, int16 *furniture, uint16 furnitureCount) {  	// reset sprites table (bounding box...)  	clearBobs(); @@ -638,7 +614,6 @@ void Graphics::setupNewRoom(const char *room, uint16 roomNum, int16 *furniture,  	}  } -  void Graphics::fillAnimBuffer(const char *anim, AnimFrame *af) {  	while (true) {  		sscanf(anim, "%3hu,%3hu", &af->frame, &af->speed); @@ -649,7 +624,6 @@ void Graphics::fillAnimBuffer(const char *anim, AnimFrame *af) {  	}  } -  uint16 Graphics::countAnimFrames(const char *anim) {  	AnimFrame afbuf[30];  	fillAnimBuffer(anim, afbuf); @@ -671,7 +645,6 @@ uint16 Graphics::countAnimFrames(const char *anim) {  	return count;  } -  void Graphics::setupObjectAnim(const GraphicData *gd, uint16 firstImage, uint16 bobNum, bool visible) {  	int16 tempFrames[20];  	memset(tempFrames, 0, sizeof(tempFrames)); @@ -747,7 +720,6 @@ void Graphics::setupObjectAnim(const GraphicData *gd, uint16 firstImage, uint16  	}  } -  uint16 Graphics::setupPersonAnim(const ActorData *ad, const char *anim, uint16 curImage) {  	debug(9, "Graphics::setupPersonAnim(%s, %d)", anim, curImage);  	_personFrames[ad->bobNum] = curImage + 1; @@ -795,14 +767,12 @@ uint16 Graphics::setupPersonAnim(const ActorData *ad, const char *anim, uint16 c  	return curImage;  } -  void Graphics::resetPersonAnim(uint16 bobNum) {  	if (_newAnim[bobNum][0].frame != 0) {  		bob(bobNum)->animString(_newAnim[bobNum]);  	}  } -  void Graphics::erasePersonAnim(uint16 bobNum) {  	_newAnim[bobNum][0].frame = 0;  	BobSlot *pbs = bob(bobNum); @@ -810,14 +780,12 @@ void Graphics::erasePersonAnim(uint16 bobNum) {  	pbs->anim.string.buffer = NULL;  } -  void Graphics::eraseAllAnims() {  	for (int i = 1; i <= 16; ++i) {  		_newAnim[i][0].frame = 0;  	}  } -  uint16 Graphics::refreshObject(uint16 obj) {  	debug(6, "Graphics::refreshObject(%X)", obj);  	uint16 curImage = _numFrames; @@ -903,7 +871,6 @@ uint16 Graphics::refreshObject(uint16 obj) {  	return curImage;  } -  void Graphics::setupRoomFurniture(int16 *furniture, uint16 furnitureCount) {  	uint16 i;  	uint16 curImage = 36 + FRAMES_JOE_XTRA; @@ -974,7 +941,6 @@ void Graphics::setupRoomFurniture(int16 *furniture, uint16 furnitureCount) {  	}  } -  void Graphics::setupRoomObjects() {  	uint16 i;  	// furniture frames are reserved in ::setupRoomFurniture(), we append objects  @@ -1085,7 +1051,6 @@ void Graphics::setupRoomObjects() {  	}  } -  uint16 Graphics::setupPerson(uint16 noun, uint16 curImage) {  	if (noun == 0) {  		warning("Trying to setup person 0"); @@ -1123,7 +1088,6 @@ uint16 Graphics::setupPerson(uint16 noun, uint16 curImage) {  	return curImage;  } -  uint16 Graphics::allocPerson(uint16 noun, uint16 curImage) {  	Person p;  	if (_vm->logic()->initPerson(noun, "", false, &p) && p.anim != NULL) { @@ -1133,7 +1097,6 @@ uint16 Graphics::allocPerson(uint16 noun, uint16 curImage) {  	return curImage;  } -  void Graphics::update(uint16 room) {  	sortBobs();  	if (_cameraBob >= 0) { @@ -1145,12 +1108,10 @@ void Graphics::update(uint16 room) {  } -  BamScene::BamScene(QueenEngine *vm)  	: _flag(F_STOP), _screenShaked(false), _fightData(_fight1Data), _vm(vm) {  } -  void BamScene::playSfx() {  	// FIXME - we don't play all sfx here. This is only necessary for  	// the fight bam, where the number of 'sfx bam frames' is too much  @@ -1163,7 +1124,6 @@ void BamScene::playSfx() {  	}  } -  void BamScene::prepareAnimation() {  	_obj1 = _vm->graphics()->bob(BOB_OBJ1);  	_obj1->clear(); @@ -1181,7 +1141,6 @@ void BamScene::prepareAnimation() {  	_lastSoundIndex = 0;  } -  void BamScene::updateCarAnimation() {  	if (_flag != F_STOP) {  		const BamDataBlock *bdb = &_carData[_index]; @@ -1215,7 +1174,6 @@ void BamScene::updateCarAnimation() {  	}  } -  void BamScene::updateFightAnimation() {  	if (_flag != F_STOP) {  		const BamDataBlock *bdb = &_fightData[_index]; @@ -1275,7 +1233,6 @@ void BamScene::updateFightAnimation() {  	}  } -  const BamScene::BamDataBlock BamScene::_carData[] = {  	{ { 310, 105, 1 }, { 314, 106, 17 }, { 366, 101,  1 },  0 },  	{ { 303, 105, 1 }, { 307, 106, 17 }, { 214,   0, 10 },  0 }, @@ -1543,6 +1500,5 @@ const BamScene::BamDataBlock BamScene::_fight3Data[] = {  	{ {  75, 96,  1 }, { 187,  96, -23 }, { 183,  41, 47 }, 99 }  }; -  } // End of namespace Queen  | 
