//////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// !draw an sprite on screen @param nTid texture id @param nPx x position(the screen is normalized at 800x600) @param nPy y position(the screen is normalized at 800x600) @param w width @param h height @param nMode blending mode (the number must be s
| 1407 | @param v2 2nd v component of the texcoords |
| 1408 | */ |
| 1409 | int CScriptObjectSystem::DrawImageCoords(IFunctionHandler *pH) |
| 1410 | { |
| 1411 | CHECK_PARAMETERS(10); |
| 1412 | |
| 1413 | USER_DATA nTid; |
| 1414 | int nPx; |
| 1415 | int nPy; |
| 1416 | int w; |
| 1417 | int h; |
| 1418 | int nMode; |
| 1419 | float u1, v1, u2, v2; |
| 1420 | //pH->GetParam(1,nTid); |
| 1421 | int nCookie=0; |
| 1422 | pH->GetParamUDVal(1,nTid,nCookie); |
| 1423 | if(nTid && (nCookie==USER_DATA_TEXTURE)) |
| 1424 | { |
| 1425 | pH->GetParam(2,nPx); |
| 1426 | pH->GetParam(3,nPy); |
| 1427 | pH->GetParam(4,w); |
| 1428 | pH->GetParam(5,h); |
| 1429 | pH->GetParam(6,nMode); |
| 1430 | pH->GetParam(7,u1); |
| 1431 | pH->GetParam(8,v1); |
| 1432 | pH->GetParam(9,u2); |
| 1433 | pH->GetParam(10,v2); |
| 1434 | if (nMode!=0) |
| 1435 | m_pRenderer->SetState(GS_NODEPTHTEST | sGetBlendState(nMode)); |
| 1436 | |
| 1437 | m_pRenderer->Draw2dImage((float)nPx,(float)nPy,(float)w,(float)h,nTid, u1, v1, u2, v2); |
| 1438 | |
| 1439 | if (nMode!=0) |
| 1440 | m_pRenderer->SetState(GS_DEPTHWRITE); |
| 1441 | } |
| 1442 | return pH->EndFunction(); |
| 1443 | } |
| 1444 | |
| 1445 | ///////////////////////////////////////////////////////////////////////////////// |
| 1446 | ///////////////////////////////////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected