void SetMousePos(UDWORD nowt,UDWORD x,UDWORD y) { POINT point; FRACT divX,divY; UDWORD scrX,scrY; UDWORD mXPos,mYPos; UNUSEDPARAMETER(nowt); if(pie_GetRenderEngine()==ENGINE_GLIDE) { scrX = GetSystemMetrics(SM_CXFULLSCREEN); scrY = GetSystemMetrics(SM_CYFULLSCREEN); divX = MAKEFRACT(x) / pie_GetVideoBufferWidth(); divY = MAKEFRACT(y) / pie_GetVideoBufferHeight(); mXPos = MAKEINT(divX*scrX); mYPos = MAKEINT(divY*scrY); SetCursorPos(mXPos,mYPos); } else { point.x = x; point.y = y; ClientToScreen(frameGetWinHandle(),&point); SetCursorPos(point.x,point.y); } }
// ------------------------------------------------------------------------------------ void processAVTile(UDWORD x, UDWORD y ) { FRACT time; MAPTILE *psTile; UDWORD newLevel; psTile = mapTile(x,y); if(psTile->level == UBYTE_MAX OR psTile->bMaxed) { return; } time = (MAKEFRACT(frameTime)/GAME_TICKS_PER_SEC); newLevel = MAKEINT(psTile->level + (time*FADE_IN_TIME)); if(newLevel >= psTile->illumination) { psTile->level = psTile->illumination; psTile->bMaxed = TRUE; } else { psTile->level =(UBYTE)newLevel; } }
TERM bpx_build_integer(BPLONG n) { return MAKEINT(n); }