コード例 #1
0
ファイル: debugger.cpp プロジェクト: AReim1982/scummvm
void ScummDebugger::drawBox(int box) {
	BoxCoords coords;
	Common::Point r[4];

	coords = _vm->getBoxCoordinates(box);

	r[0] = coords.ul;
	r[1] = coords.ur;
	r[2] = coords.lr;
	r[3] = coords.ll;

	if (_vm->_game.version <= 2) {
		for (int i = 0; i < 4; ++i) {
			r[i].x *= V12_X_MULTIPLIER;
			r[i].y *= V12_Y_MULTIPLIER;
		}
	}

	// TODO - maybe use different colors for each box, and/or print the box number inside it?
	fillQuad(_vm, r, 13);

	VirtScreen *vs = _vm->findVirtScreen(coords.ul.y);
	if (vs != NULL)
		_vm->markRectAsDirty(vs->number, 0, vs->w, 0, vs->h);
	_vm->drawDirtyScreenParts();
	_vm->_system->updateScreen();
}
コード例 #2
0
ファイル: sb_mygui_skin.cpp プロジェクト: andryblack/sandbox
 void CopySubSkin::doRender(MyGUI::IRenderTarget* _target) {
     if (!mVisible || mEmptyView)
         return;
     
     _target->setTexture(getTexture());
     MyGUI::VertexQuad quad;
     
     fillQuad(quad, _target);
     
     // use premultiplied
     if (mAlign.isLeft()) {
         quad.vertex[MyGUI::VertexQuad::CornerLB].colour =
         quad.vertex[MyGUI::VertexQuad::CornerLT].colour = 0x00000000;
     }
     if (mAlign.isRight()) {
         quad.vertex[MyGUI::VertexQuad::CornerRB].colour =
         quad.vertex[MyGUI::VertexQuad::CornerRT].colour = 0x00000000;
     }
     if (mAlign.isTop()) {
         quad.vertex[MyGUI::VertexQuad::CornerLT].colour =
         quad.vertex[MyGUI::VertexQuad::CornerRT].colour = 0x00000000;
     }
     if (mAlign.isBottom()) {
         quad.vertex[MyGUI::VertexQuad::CornerLB].colour =
         quad.vertex[MyGUI::VertexQuad::CornerRB].colour = 0x00000000;
     }
     
     _target->addQuad(quad);
     
 }
コード例 #3
0
 void TurnedSubSkin::doRender(MyGUI::IRenderTarget* _target)
 {
     if (!mVisible || mEmptyView)
         return;
     
     _target->setTexture(getTexture());
     MyGUI::VertexQuad quad;
     
     fillQuad(quad, _target);
     
     _target->addQuad(quad);
 }
コード例 #4
0
void ScummDebugger::drawBox(int box) {
	BoxCoords coords;
	Common::Point r[4];

	_vm->getBoxCoordinates(box, &coords);

	r[0] = coords.ul;
	r[1] = coords.ur;
	r[2] = coords.lr;
	r[3] = coords.ll;

	// TODO - maybe use different colors for each box, and/or print the box number inside it?
	fillQuad(_vm, r, 13);

	VirtScreen *vs = _vm->findVirtScreen(coords.ul.y);
	if (vs != NULL)
		_vm->markRectAsDirty(vs->number, 0, vs->w, 0, vs->h);
	_vm->drawDirtyScreenParts();
	_vm->_system->updateScreen();
}