static void DrawOrbitalDisplay (DRAW_ORBITAL_MODE Mode) { RECT r; SetContext (SpaceContext); GetContextClipRect (&r); BatchGraphics (); if (Mode != DRAW_ORBITAL_UPDATE) { SetTransitionSource (NULL); DrawSISFrame (); DrawSISMessage (NULL); DrawSISTitle (GLOBAL_SIS (PlanetName)); DrawStarBackGround (); DrawPlanetSurfaceBorder (); } if (Mode == DRAW_ORBITAL_WAIT) { STAMP s; SetContext (GetScanContext (NULL)); s.frame = CaptureDrawable (LoadGraphic (ORBENTER_PMAP_ANIM)); s.origin.x = -SAFE_X; s.origin.y = 0; DrawStamp (&s); DestroyDrawable (ReleaseDrawable (s.frame)); } else if (Mode == DRAW_ORBITAL_FULL) { DrawDefaultPlanetSphere (); } if (Mode != DRAW_ORBITAL_WAIT) { SetContext (GetScanContext (NULL)); DrawPlanet (0, BLACK_COLOR); } if (Mode != DRAW_ORBITAL_UPDATE) { ScreenTransition (3, &r); } UnbatchGraphics (); // for later RepairBackRect() // JMS_GFX if (RESOLUTION_FACTOR == 0) LoadIntoExtraScreen (&r); else LoadIntoExtraScreen_Fs (&r); }
static void DrawOrbitalDisplay (DRAW_ORBITAL_MODE Mode) { RECT r = { { SIS_ORG_X, SIS_ORG_Y }, { SIS_SCREEN_WIDTH, SIS_SCREEN_HEIGHT } }; BatchGraphics (); if (Mode != DRAW_ORBITAL_UPDATE) { SetTransitionSource (NULL); DrawSISFrame (); DrawSISMessage (NULL_PTR); DrawSISTitle (GLOBAL_SIS (PlanetName)); DrawStarBackGround (TRUE); } SetContext (SpaceContext); if (Mode == DRAW_ORBITAL_WAIT) { STAMP s; s.frame = CaptureDrawable ( LoadGraphic (ORBENTER_PMAP_ANIM)); s.origin.x = -SAFE_X; s.origin.y = SIS_SCREEN_HEIGHT - MAP_HEIGHT; DrawStamp (&s); DestroyDrawable (ReleaseDrawable (s.frame)); } else { DrawPlanet (SIS_SCREEN_WIDTH - MAP_WIDTH, SIS_SCREEN_HEIGHT - MAP_HEIGHT, 0, 0); } if (Mode != DRAW_ORBITAL_UPDATE) { ScreenTransition (3, &r); } UnbatchGraphics (); if (Mode != DRAW_ORBITAL_WAIT) { LoadIntoExtraScreen (&r); } }
void DoShipSpin (COUNT index, MUSIC_REF hMusic) { #ifdef WANT_SHIP_SPINS char buf[30]; BYTE clut_buf[1]; RECT old_r, r; SetGraphicUseOtherExtra (1); LoadIntoExtraScreen (0); clut_buf[0] = FadeAllToBlack; SleepThreadUntil (XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 4)); FlushColorXForms (); if (hMusic) StopMusic (); FreeHyperData (); sprintf (buf, "ship%02d", index); DoFMV (buf, "spin", FALSE); GetContextClipRect (&old_r); r.corner.x = r.corner.y = 0; r.extent.width = SCREEN_WIDTH; r.extent.height = SCREEN_HEIGHT; SetContextClipRect (&r); DrawFromExtraScreen (0); SetGraphicUseOtherExtra (0); SetContextClipRect (&old_r); if (hMusic) PlayMusic (hMusic, TRUE, 1); clut_buf[0] = FadeAllToColor; SleepThreadUntil (XFormColorMap ((COLORMAPPTR)clut_buf, ONE_SECOND / 4)); FlushColorXForms (); #else (void) index; /* Satisfy compiler */ (void) hMusic; /* Satisfy compiler */ #endif /* WANT_SHIP_SPINS */ }