Esempio n. 1
0
void CSVRenderer::drawBar(CSVElement *csvElement, int idx) {
	CSVDST cdst, cdst_next;
	CSVSRC csrc;

	// get Object
	CSVSelectData *current = CSVSelectList::getSongData(idx - csvElement->parent->barCenter);
	if (!current)
		return;

	// get DSTs
	if (!(csvElement->getDSTBar(&cdst, idx) && (csvElement->getDSTBar(&cdst_next, idx+1)))) {
		return;
	}
	
	// morphing X/Y coordination
	double a = CSVSelectList::moveProgress;
	cdst.setDSTX( cdst.getX() * (1-a)
		+ cdst_next.getX() * a );
	cdst.setDSTY( cdst.getY() * (1-a)
		+ cdst_next.getY() * a );

	// search BAR_BODY for SRC
	csvElement->srcNum = current->type;
	csvElement->getSRC(&csrc);

	// draw bar
	drawFunc(csvElement->src[csvElement->srcNum]->getImgNum(), 0, &csrc, &cdst);

	// draw BAR_FLASH
	// - this implemented in drawElement
	
	// draw BAR_LEVEL
	// only draws when type == SONG
	if (current->type == CSVSelectType::SONG) {
		CSVElement *cele_level = csvElement->parent->csvBarLevel;
		if (cele_level) {
			cele_level->srcNum = cele_level->dstNum = current->songData.difficulty;	// 0 means NONE
			cele_level->dstOffsetX = cdst.getX();
			cele_level->dstOffsetY = cdst.getY();
			drawNumber(cele_level, current->songData.level);
		}
	}

	// draw BAR_LAMP
		
	// draw BAR_MY_LAMP
		
	// draw BAR_RIVAL_LAMP
		
	// draws BAR_TITLE
	for (int i=0; i<csvElement->parent->csvBarTitle.size(); i++) {
		CSVElement *cele_title = csvElement->parent->csvBarTitle[i];
		cele_title->dstOffsetX = cdst.getX();
		cele_title->dstOffsetY = cdst.getY();
		drawText(cele_title, current->songData.title.c_str());
	}

	// restore everything to default
	csvElement->srcNum = 0;
}
Esempio n. 2
0
void CSVRenderer::drawImage(CSVElement *csvElement, CSVSRC *src, CSVDST *dst) {
	// convert negative height/width
	// cause CSV won't support this
	if (dst->getWidth() < 0) {
		dst->dst[2] = dst->getX() + dst->getWidth();
		dst->dst[4] = -dst->getWidth();
	}
	if (dst->getHeight() < 0) {
		dst->dst[3] = dst->getY() + dst->getHeight();
		dst->dst[5] = -dst->getHeight();
	}

	// draw image
	drawFunc(csvElement->src[csvElement->srcNum]->getImgNum(), 0, src, dst);
}
Esempio n. 3
0
void Draw_Scene(void (*drawFunc) (void))
{
#if defined(USE_OPENGL)
	Uint8          *keys;
	matrix_t        rotation;
	vec3_t          forward, right, up;
	qboolean        mouseGrabbed;
	qboolean		mouseGrabbedLastFrame;
	int             oldTime, newTime, deltaTime;	// for frame independent movement

	mouseGrabbed = qfalse;
	mouseGrabbedLastFrame = qfalse;

	oldTime = SDL_GetTicks();
	while(1)
	{
		SDL_Event       event;

		newTime = SDL_GetTicks();
		deltaTime = newTime - oldTime;

		//Sys_Printf(" deltaTime (%5.2f seconds)\n", (deltaTime / 1000.0));

		MatrixFromAngles(rotation, drawAngles[PITCH], drawAngles[YAW], drawAngles[ROLL]);
		MatrixToVectorsFRU(rotation, forward, right, up);

		while(SDL_PollEvent(&event))
		{
			switch (event.type)
			{
				case SDL_VIDEORESIZE:
				{
					drawScreen =
						SDL_SetVideoMode(event.resize.w, event.resize.h, drawVideo->vfmt->BitsPerPixel,
										 SDL_OPENGL | SDL_RESIZABLE);
					if(drawScreen)
					{
						Reshape(drawScreen->w, drawScreen->h);
					}
					else
					{
						/* Uh oh, we couldn't set the new video mode?? */ ;
					}
					break;
				}

				case SDL_MOUSEMOTION:
				{
					if(mouseGrabbed && !mouseGrabbedLastFrame)
					{
						drawAngles[PITCH] += event.motion.yrel;
						drawAngles[YAW] -= event.motion.xrel;
					}
					mouseGrabbedLastFrame = qfalse;
					break;
				}

				case SDL_MOUSEBUTTONDOWN:
				{
					switch (event.button.button)
					{
						case 3:
						{		// K_MOUSE2;
							if(!mouseGrabbed)
							{
								SDL_WM_GrabInput(SDL_GRAB_ON);
								SDL_ShowCursor(0);
								mouseGrabbed = qtrue;
								mouseGrabbedLastFrame = qtrue;
							}
							else
							{
								SDL_ShowCursor(1);
								SDL_WM_GrabInput(SDL_GRAB_OFF);
								mouseGrabbed = qfalse;
							}
							break;
						}

						default:
							break;
					}
					break;
				}

				case SDL_QUIT:
				{
					Draw_Shutdown();
					return;
				}

				default:
					break;
			}
		}


		keys = SDL_GetKeyState(NULL);

		if(keys[SDLK_ESCAPE])
		{
			Draw_Shutdown();
			return;
		}

		if(keys[SDLK_w])
		{
			if(SDL_GetModState() & KMOD_SHIFT)
			{
				VectorMA(drawOrigin, 0.5 * deltaTime, forward, drawOrigin);
			}
			else
			{
				VectorMA(drawOrigin, 1.0 * deltaTime, forward, drawOrigin);
			}
		}

		if(keys[SDLK_s])
		{
			if(SDL_GetModState() & KMOD_SHIFT)
			{
				VectorMA(drawOrigin, -0.5 * deltaTime, forward, drawOrigin);
			}
			else
			{
				VectorMA(drawOrigin, -1.0 * deltaTime, forward, drawOrigin);
			}
		}

		if(keys[SDLK_a])
		{
			if(SDL_GetModState() & KMOD_SHIFT)
			{
				VectorMA(drawOrigin, -0.5 * deltaTime, right, drawOrigin);
			}
			else
			{
				VectorMA(drawOrigin, -1.0 * deltaTime, right, drawOrigin);
			}
		}

		if(keys[SDLK_d])
		{
			if(SDL_GetModState() & KMOD_SHIFT)
			{
				VectorMA(drawOrigin, 0.5 * deltaTime, right, drawOrigin);
			}
			else
			{
				VectorMA(drawOrigin, 1.0 * deltaTime, right, drawOrigin);
			}
		}

		if(keys[SDLK_SPACE])
		{
			//drawOrigin[2] += 1.0 * deltaTime;
			if(SDL_GetModState() & KMOD_SHIFT)
			{
				VectorMA(drawOrigin, 0.5 * deltaTime, up, drawOrigin);
			}
			else
			{
				VectorMA(drawOrigin, 1.0 * deltaTime, up, drawOrigin);
			}
		}

		if(keys[SDLK_c])
		{
			//drawOrigin[2] -= 1.0 * deltaTime;
			if(SDL_GetModState() & KMOD_SHIFT)
			{
				VectorMA(drawOrigin, -0.5 * deltaTime, up, drawOrigin);
			}
			else
			{
				VectorMA(drawOrigin, -1.0 * deltaTime, up, drawOrigin);
			}
		}

		if(keys[SDLK_UP])
		{
			drawAngles[PITCH] -= 1.0 * deltaTime;
		}

		if(keys[SDLK_DOWN])
		{
			drawAngles[PITCH] += 1.0 * deltaTime;
		}

		if(keys[SDLK_LEFT])
		{
			drawAngles[YAW] += 1.0 * deltaTime;
		}

		if(keys[SDLK_RIGHT])
		{
			drawAngles[YAW] -= 1.0 * deltaTime;
		}

		// check to make sure the angles haven't wrapped
		if(drawAngles[PITCH] < -90)
		{
			drawAngles[PITCH] = -90;
		}
		else if(drawAngles[PITCH] > 90)
		{
			drawAngles[PITCH] = 90;
		}

		Draw_BeginScene();
		drawFunc();
		Draw_EndScene();

		oldTime = newTime;
	}
#endif // #if defined(USE_OPENGL)
}
Esempio n. 4
0
void LambdaView::draw()
{
	if (drawFunc) {
		drawFunc();
	}
}
Esempio n. 5
0
ui::Sprite* PerspRoot::getHit(const ci::Vec3f& point) {
	ui::Sprite*		s = nullptr;
	drawFunc([this, &point, &s](){s = mPicking.pickAt(point.xy(), *(mSprite.get()));});
	return s;
}
Esempio n. 6
0
void PerspRoot::drawServer(const DrawParams& p) {
	// Redirect to client draw for now
	drawFunc([this, &p](){mSprite->drawClient(ci::gl::getModelView(), p);});
}
Esempio n. 7
0
void PerspRoot::drawClient(const DrawParams& p, AutoDrawService* auto_draw) {
	drawFunc([this, &p](){mSprite->drawClient(ci::gl::getModelView(), p);});

	if (auto_draw) auto_draw->drawClient(ci::gl::getModelView(), p);
}
Esempio n. 8
0
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) 
{
	COLORREF color, newColor;
	int wmId, wmEvent;

	static COLORREF sinColor = RGB(255 * rand(), 255 * rand(), 255 * rand());
	static COLORREF cosColor = RGB(255 * rand(), 255 * rand(), 255 * rand());
	TCHAR buf[BUFLENGTH];

	TCHAR x1Lbl[] = L"X1";
	TCHAR x2Lbl[] = L"X2";
	TCHAR widthLbl[] = L"Line width";
	TCHAR colorsLbl[] = L"Colors";

	static int x1;
	static int x2;
	static int lineWidth;
	BOOL fError;

	switch (message) {
	case WM_CREATE:
		HWND hStart, hEnd, hWidth, hColorSin, hColorCos;
		hStart = CreateWindow(L"Edit", NULL, WS_BORDER | WS_CHILD | WS_VISIBLE | ES_LEFT | ES_NUMBER, 85, 10, 50, 20, hWnd, (HMENU)X1TEXT_ID, hInst, 0);
		hEnd = CreateWindow(L"Edit", NULL, WS_BORDER | WS_CHILD | WS_VISIBLE | ES_LEFT | ES_NUMBER, 85, 40, 50, 20, hWnd, (HMENU)X2TEXT_ID, hInst, 0);
		hWidth = CreateWindow(L"Edit", NULL, WS_BORDER | WS_CHILD | WS_VISIBLE | ES_LEFT | ES_NUMBER, 85, 70, 50, 20, hWnd, (HMENU)LINEWIDTH_ID, hInst, 0);
		hColorSin = CreateWindow(L"Button", NULL, WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 10, 132, 50, 20, hWnd, (HMENU)SINBUTTON_ID, hInst, 0);
		hColorCos = CreateWindow(L"Button", NULL, WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 85, 132, 50, 20, hWnd, (HMENU)COSBUTTON_ID, hInst, 0);
		
		SetWindowText(hStart, L"-10");
		SetWindowText(hEnd, L"10");
		SetWindowText(hWidth, L"1");
		SetWindowText(hColorSin, L"sin(x)");
		SetWindowText(hColorCos, L"cos(x)");
		break;
	case WM_PAINT:
		HDC hdc;
		PAINTSTRUCT ps;
		WINDOWINFO hwndInfo;
		POINT * arr;
		int height, width, lenght;
		double(*trig)(double);

		hdc = BeginPaint(hWnd, &ps);

		TextOut(hdc, 10, 12, x1Lbl, _tcslen(x1Lbl));
		TextOut(hdc, 10, 42, x2Lbl, _tcslen(x2Lbl));
		TextOut(hdc, 10, 72, widthLbl, _tcslen(widthLbl));
		TextOut(hdc, 52, 102, colorsLbl, _tcslen(colorsLbl));

		ZeroMemory(&hwndInfo, sizeof(WINDOWINFO));
		hwndInfo.cbSize = sizeof(WINDOWINFO);
		GetWindowInfo(hWnd, &hwndInfo);
		width = hwndInfo.rcClient.right - hwndInfo.rcClient.left;
		height = hwndInfo.rcClient.bottom - hwndInfo.rcClient.top;

		trig = sin;
		lenght = GenPointArray(&arr, x1, x2, width, height, (lineWidth-1)/2, trig);
		if (lenght == -1)
		{
			EndPaint(hWnd, &ps);
			break;
		}
		drawAxesText(hdc, width, height);
		drawFunc(hdc, width, height, arr, lenght, lineWidth, sinColor);
		free(arr);

		trig = cos;
		lenght = GenPointArray(&arr, x1, x2, width, height, (lineWidth - 1) / 2, trig);
		drawFunc(hdc, width, height, arr, lenght, lineWidth, cosColor);
		free(arr);

		drawAxes(hdc, width, height);

		EndPaint(hWnd, &ps);
		break;
	case WM_COMMAND:
		wmId = LOWORD(wParam);
		wmEvent = HIWORD(wParam);
		switch (wmId)
		{
			case SINBUTTON_ID:
				ChoosingColor(hWnd, sinColor);
				InvalidateRect(hWnd, NULL, TRUE);
				break;
			case COSBUTTON_ID:
				ChoosingColor(hWnd, cosColor);
				InvalidateRect(hWnd, NULL, TRUE);
				break;
			case X1TEXT_ID:
				if (wmEvent == EN_UPDATE)
					x1 = GetDlgItemInt(hWnd, X1TEXT_ID, &fError, TRUE);
				InvalidateRect(hWnd, NULL, TRUE);
				break;
			case X2TEXT_ID:
				if (wmEvent == EN_UPDATE)
					x2 = GetDlgItemInt(hWnd, X2TEXT_ID, &fError, TRUE);
				InvalidateRect(hWnd, NULL, TRUE);
				break;
			case LINEWIDTH_ID:
				if (wmEvent == EN_UPDATE)
					lineWidth = GetDlgItemInt(hWnd, LINEWIDTH_ID, &fError, FALSE);
				InvalidateRect(hWnd, NULL, TRUE);
				break;
			default:
				break;
		}
		break;
	case WM_DESTROY:
		PostQuitMessage(0);
		break;
	default:
		return DefWindowProc(hWnd, message, wParam, lParam);
	}
	return 0;
}
Esempio n. 9
0
void CSVRenderer::drawNumber(CSVElement *csvElement, int num) {
	// get DST first
	CSVDST cdst;
	if (csvElement->getDST(&cdst)) {
		// INFO
		// if src is duplication of 10
		// then align works
			
		// set startX, width per number
		int nWidth = cdst.getWidth();
		int orgX = cdst.getX();
		int sx = 0;
		int keta = csvElement->src[csvElement->srcNum]->getKeta();
		int numberSize = getNumberLength(num);	// how big this number is?
		int multiply = 10;	// basic
		CSVSRC *currentSRC = csvElement->src[csvElement->srcNum];

		if ((currentSRC->getdivX() * currentSRC->getdivY())%10 == 0) {
			// check align. left align is default
			if (currentSRC->getAlign() == 0) {			// right align
				sx = nWidth * (keta - numberSize);
			} else if (currentSRC->getAlign() == 2) {	// center align
				sx = nWidth * (keta - numberSize) / 2;
			}
			multiply = 10;
			sx += nWidth * numberSize;	// start drawing from right
		} else if ((currentSRC->getdivX() * currentSRC->getdivY()) % 11 == 0) {
			multiply = 11;
			sx += nWidth * keta;	// start drawing from right
		} else if ((currentSRC->getdivX() * currentSRC->getdivY()) % 24 == 0) {
			multiply = 24;
			sx += nWidth * keta;	// start drawing from right
		}

		// draw number
		CSVSRC csrc;
			
		// check negative number
		bool negative = (num<0);
		if (multiply == 24)
			sx += nWidth;		// for drawing sign
		else
			negative = false;	// negative is only for 24
		// convert negative number to positive
		if (num < 0) {
			num *= -1;
		}

		for (int i=0; i<keta; i++) {
			int currentNum = num%10;
			if (i >= numberSize) {
				if (multiply == 10)
					continue;
				else
					currentNum = -1;
			}
			csvElement->getNUMSRC(&csrc, currentNum, negative);
			sx -= nWidth;
			// set cdst again
			cdst.setDSTX(sx+orgX);
			drawFunc(currentSRC->getImgNum(), 0, &csrc, &cdst);

			num /= 10;
		}

		// if multiply == 24, then draw sign
		if (multiply == 24) {
			csvElement->getNUMSRC(&csrc, 0, negative, true);
			sx -= nWidth;
			cdst.setDSTX(sx+orgX);
			drawFunc(currentSRC->getImgNum(), 0, &csrc, &cdst);
		}
	}
}
Esempio n. 10
0
void CSVRenderer::drawText(CSVElement *csvElement, const TCHAR *text) {
	CSVDST cdst;
	if (csvElement->getDST(&cdst)) {
		drawFunc(0, text, csvElement->src[csvElement->srcNum], &cdst);
	}
}
Esempio n. 11
0
void CSVRenderer::drawElement(CSVElement *csvElement) {
	int type = csvElement->getType();
	CSVSRC *currentSRC = csvElement->src[csvElement->srcNum];

	if (type == CSVReader::CSVTYPE_IMAGE || 
		type == CSVReader::CSVTYPE_JUDGELINE) {
		// in case of IMG
		drawImage(csvElement);
	} else if (type == CSVReader::CSVTYPE_BUTTON) {
		// similar to IMG, but considers click
		CSVSRC csrc;
		CSVDST cdst;
		int idx = csvElement->getSRCIndex();
		if (csvElement->getCurrentSRC()->getClick() == 1) {
			idx += CSVButton::GetClick(csvElement->getCurrentSRC()->getButtonType());
		}
		csvElement->getSRCFromIdx(&csrc, idx);
		
		// INFO: we won't check SRC OP
		if (csvElement->getDST(&cdst)) {
			// convert negative height/width
			// cause CSV won't support this
			if (cdst.getWidth() < 0) {
				cdst.dst[2] = cdst.getX() + cdst.getWidth();
				cdst.dst[4] = -cdst.getWidth();
			}
			if (cdst.getHeight() < 0) {
				cdst.dst[3] = cdst.getY() + cdst.getHeight();
				cdst.dst[5] = -cdst.getHeight();
			}

			// draw image
			drawFunc(csvElement->getCurrentSRC()->getImgNum(), 0, &csrc, &cdst);
		
			// TODO: check ONMOUSE
			// (draw onmouse first)
			// route had moved to drawAll
			/*
			CSVElement *onmouse = csvElement->getRelatedElement();
			if (onmouse && isCursorInside(&cdst)) {
				drawImage(onmouse);
			}*/
		}
	} else if (type == CSVReader::CSVTYPE_ONMOUSE) {
		// check isCursorInside
		CSVDST *dst = csvElement->getCurrentLastDST();

		if (dst) {
			CSVSRC *src = csvElement->getCurrentSRC();
			CSVDST ndst;
			ndst.setDSTWidth( src->getONX2() );
			ndst.setDSTHeight( src->getONY2() );
			ndst.setDSTX( dst->getX()+src->getONX() );
			ndst.setDSTY( dst->getY()+src->getONY() );
			if (isCursorInside(&ndst))
				drawImage(csvElement);
		}
	} else if (type == CSVReader::CSVTYPE_TEXT) {
		// draw text
		drawText(csvElement);
	} else if (type == CSVReader::CSVTYPE_NUMBER) {
		// draw Number
		drawNumber(csvElement);
	} else if (type == CSVReader::CSVTYPE_BARGRAPH) {
		CSVSRC csrc;
		CSVDST cdst;

		csvElement->getSRC(&csrc);
		if (csvElement->getDST(&cdst)) {
			if (currentSRC->getMuki() == 0) {
				// change width
				cdst.setDSTWidth(cdst.getWidth() * CSVBargraph::getVal(currentSRC->getNum()));
			} else {
				// change height
				cdst.setDSTHeight(cdst.getHeight() * CSVBargraph::getVal(currentSRC->getNum()));
			}
			
			// convert negative height/width
			// cause CSV won't support this
			if (cdst.getWidth() < 0) {
				cdst.dst[2] = cdst.getX() + cdst.getWidth();
				cdst.dst[4] = -cdst.getWidth();
			}
			if (cdst.getHeight() < 0) {
				cdst.dst[3] = cdst.getY() + cdst.getHeight();
				cdst.dst[5] = -cdst.getHeight();
			}

			drawFunc(currentSRC->getImgNum(), 0, &csrc, &cdst);
		}
	} else if (type == CSVReader::CSVTYPE_GROOVEGUAGE) {
		// TODO: change algorithm for graph (blinking effect)
		// get guage
		int guage = CSVNumber::getNumber(CSVNumConst::PLAYER_1P_GUAGE);
		int addx = currentSRC->getOP1();
		int addy = currentSRC->getOP2();

		// draw 50
		CSVSRC csrc;
		CSVDST cdst;

		// TODO: if guage has no Alphablend ...? -> change it with preload...?
		// TODO: if 2P plays...?
		if (csvElement->getDST(&cdst)) {
			int orgX = cdst.getX();
			int orgY = cdst.getY();

			bool blink;

			for (int i=0; i<guage; i+=2) {
				// blinking effect - display faint when true
				blink = false;
				if (i != 0 && i != guage-2) {
					if (i == guage - 4) {
						if (rand() % 100 < 70)
							blink = true;
					} else if (i == guage - 6) {
						if (rand() % 100 < 50)
							blink = true;
					}
				}

				if (CSVOption::getOption(CSVOptionConst::PLAYER1_NORMAL_GUAGE)) {
					if (i >= 80) {
						if (!blink)
							csvElement->getSRCFromIdx(&csrc, 0);	// survival guage color
						else
							csvElement->getSRCFromIdx(&csrc, 2);
					} else {
						if (!blink)
							csvElement->getSRCFromIdx(&csrc, 1);
						else
							csvElement->getSRCFromIdx(&csrc, 3);
					}
				} else if (CSVOption::getOption(CSVOptionConst::PLAYER1_HARD_GUAGE)) {
					if (!blink)
						csvElement->getSRCFromIdx(&csrc, 0);
					else
						csvElement->getSRCFromIdx(&csrc, 2);
				}
				
				cdst.setDSTX(orgX);
				cdst.setDSTY(orgY);

				drawFunc(currentSRC->getImgNum(), 0, &csrc, &cdst);
				orgY += addy;
				orgX += addx;
			}
			for (int i=guage; i<100; i+=2) {
				if (CSVOption::getOption(CSVOptionConst::PLAYER1_NORMAL_GUAGE)) {
					if (i >= 80)
						csvElement->getSRCFromIdx(&csrc, 2);	// survival guage color
					else
						csvElement->getSRCFromIdx(&csrc, 3);
				} else if (CSVOption::getOption(CSVOptionConst::PLAYER1_HARD_GUAGE)) {
					csvElement->getSRCFromIdx(&csrc, 2);
				}
				
				cdst.setDSTX(orgX);
				cdst.setDSTY(orgY);

				drawFunc(currentSRC->getImgNum(), 0, &csrc, &cdst);

				orgY += addy;
				orgX += addx;
			}
		}
	} else if (type == CSVReader::CSVTYPE_NOWJUDGE_1P) {
		// TODO: support 2P
		// nowcombo is drawed with NOWJUDGE, so we won't make case for that.
		CSVSRC src_nowjudge;
		CSVDST dst_nowjudge, dst_nowcombo;

		// set judge case
		int judge = 0;
		if (CSVOption::getOption(CSVOptionConst::PLAY_1P_JUDGE_PGREAT))
			judge = 5;
		else if (CSVOption::getOption(CSVOptionConst::PLAY_1P_JUDGE_GREAT))
			judge = 4;
		else if (CSVOption::getOption(CSVOptionConst::PLAY_1P_JUDGE_GOOD))
			judge = 3;
		else if (CSVOption::getOption(CSVOptionConst::PLAY_1P_JUDGE_BAD))
			judge = 2;
		else if (CSVOption::getOption(CSVOptionConst::PLAY_1P_JUDGE_POOR))
			judge = 1;
		else if (CSVOption::getOption(CSVOptionConst::PLAY_1P_JUDGE_EMPTYPOOR))
			judge = 0;
		csvElement->srcNum = csvElement->dstNum = judge;

		csvElement->getSRC(&src_nowjudge);
		if (csvElement->getDST(&dst_nowjudge)) {
			// get nowcombo
			CSVElement *csvCombo = csvElement->parent->csvNowCombo1P;
			// TODO: set judge case
			csvCombo->srcNum = csvCombo->dstNum = judge;

			int width = 0;
			bool comboDrawable = false;

			// set combo
			int combo = CSVNumber::getNumber(CSVNumConst::PLAYER_COMBO);

			if (csvCombo->getDST(&dst_nowcombo)) {
				comboDrawable = true;
				// src op1 is noshift (dstOffset is 0)
				if (csvCombo->getCurrentSRC()->getOP1() == 0) {
					// get total number size
					width = dst_nowcombo.getWidth() * getNumberLength(combo);
				}
			}

			// draw image
			csvElement->dstOffsetX = -width/2;
			drawImage(csvElement);
			if (comboDrawable) {
				csvCombo->dstOffsetX = dst_nowjudge.getX()-width/2;
				csvCombo->dstOffsetY = dst_nowjudge.getY();
				drawNumber(csvCombo, combo);
				// it effects to next getDST, so init them
				csvCombo->dstOffsetX = 0;
				csvCombo->dstOffsetY = 0;
			}
			csvElement->dstOffsetX = 0;
		}
	} else if (type == CSVReader::CSVTYPE_SLIDER) {
		// muki - 0: top, 1:right, 2:bottom, 3:left
		CSVSRC *src = csvElement->getCurrentSRC();
		int muki = src->getSliderMuki();
		int offsetX, offsetY;
		offsetX = offsetY = CSVSlider::getSliderValue(src->getSliderType())
			* src->getSliderRange();
		switch (muki) {
		case 0:
			offsetX = 0;
			offsetY = src->getSliderRange() - offsetY;
			break;
		case 1:
			offsetY = 0;
			break;
		case 2:
			offsetX = 0;
			break;
		case 3:
			offsetX = src->getSliderRange() - offsetX;
			offsetY = 0;
			break;
		}
		csvElement->dstOffsetX = offsetX;
		csvElement->dstOffsetY = offsetY;
		drawImage(csvElement);
	} else if (type == CSVReader::CSVTYPE_BAR_BODY) {
		// calculate moving first
		CSVSelectList::CalculateMoving();

		// call drawbar with current argument
		for (int i=0; i<30; i++) {
			drawBar(csvElement, i);
		}

		// draw BAR_FLASH
		CSVSRC csrc;
		CSVDST cdst;
		csvElement->parent->csvFlash->getSRC(&csrc);
		if (csvElement->getDSTBar(&cdst, csvElement->parent->barCenter)) {
			csvElement->parent->csvFlash->dstOffsetX = cdst.getX();
			csvElement->parent->csvFlash->dstOffsetY = cdst.getY();
			drawImage(csvElement->parent->csvFlash);
		}
	} else if (type == CSVReader::CSVTYPE_NOTE) {
		// draw note/lnnote/mine/line
		if (notedrawFunc) {
			notedrawFunc();
		}
	}
}