/** * MouseDraw is used to force the mouse to display on the screen. * *<!-----------------------------------------------------------------------*/ T_void MouseDraw(T_void) { T_word16 mx, my ; T_screen was ; DebugRoutine("MouseDraw") ; // DebugCheck(G_bitmap != NULL) ; // Draw if we have a bitmap AND we are not in relative mouse mode if (G_bitmap) { IMouseGetUpperLeft(&mx, &my) ; /* First, save what is behind the mouse. */ IMouseTransfer(mx, my, GRAPHICS_ACTUAL_SCREEN, G_mouseScreen) ; if (MouseIsRelativeMode() == FALSE) { was = GrScreenGet() ; GrScreenSet(GRAPHICS_ACTUAL_SCREEN) ; GrDrawCompressedBitmapAndClipAndColor( PictureToBitmap((T_byte8 *)G_bitmap), mx, my, G_colorTable) ; G_lastDrawX = mx ; G_lastDrawY = my ; GrScreenSet(was) ; } } DebugEnd() ; }
/** * MouseErase removes the mouse from the display using the hidden data. * *<!-----------------------------------------------------------------------*/ T_void IMouseTransfer(T_word16 x, T_word16 y, T_screen from, T_screen to) { T_screen was ; T_sword16 top, bottom, left, right ; DebugRoutine("IMouseTransfer") ; DebugCheck(G_bitmap != NULL) ; /* Transfer the mouse */ was = GrScreenGet() ; GrScreenSet(from) ; top = y ; bottom = y + PictureGetHeight(G_bitmap)-1 ; left = x ; right = x + PictureGetWidth(G_bitmap)-1 ; if (top < 0) top = 0 ; if (bottom >= 200) bottom = 199 ; if (left < 0) left = 0 ; if (right >= 320) right = 319 ; GrTransferRectangle( to, left, top, right, bottom, left, top) ; GrScreenSet(was) ; DebugEnd() ; }
T_void HardFormUpdate(T_void) { DebugRoutine("HardFormUpdate"); if (G_currentForm < HARD_FORM_UNKNOWN) { GrScreenSet(GRAPHICS_ACTUAL_SCREEN); BannerUpdate(); StatsUpdatePlayerStatistics(); GraphicUpdateAllGraphics(); ScheduleUpdateEvents(); KeyboardUpdateEvents(); MouseUpdateEvents(); if (G_callbackGroups[G_currentForm].update != NULL ) G_callbackGroups[G_currentForm].update(); } DebugEnd(); }