Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- to limit the # of lines that need to be drawn
- DrawScrollPlane(2, &CopyOfCamera2, camDX, lineCountForBackGround);
- #endif
- #endif
- DrawObjects (CopyOfCamera2.currentTile, NumberOfTiles, RoadDistances,
- TileScreenPositionArray, SM);
- DrawPlayerLapFlag(2);
- #ifdef MARS
- if (SM == MASTER)
- #endif
- {
- Camera1Data = CopyOfCamera1;
- Camera2Data = CopyOfCamera2;
- }
- }
- else /* Not split screen. */
- {
- CopyOfCamera1 = Camera1Data; /* Copy the whole structure. */
- #ifdef DEBUGSPEED
- WindowWidth = SMALLWINDOWWIDTH;
- HalfWindowWidth = WindowWidth / 2;
- WindowX = SCREENWIDTH / 2 - HalfWindowWidth;
- WindowY = SCREENHEIGHT / 2 - SMALLWINDOWHEIGHT / 2;
- WindowHeight = SMALLWINDOWHEIGHT;
- WindowScaleFactor = 2;
- #else
- WindowX = WINDOWXMARGIN;
- WindowWidth = SCREENWIDTH - (WINDOWXMARGIN * 2);
- HalfWindowWidth = WindowWidth / 2;
- WindowY = 4;
- WindowHeight = SCREENHEIGHT - (WINDOWYMARGIN * 2) - 4;
- WindowScaleFactor = 1;
- #endif
- #ifdef PC
- /* PC background is a full screen and must be drawn first. */
- drawBackground (FALSE, 0, 0, SM);
- #endif
- NumberOfTiles = CalculateTileAndCameraPositions (TileScreenPositionArray,
- &CopyOfCamera1, &camDX, &camDY);
- // .......... calc the difference in absolute heights between the bike and camera
- heightDiffForHorizon =
- (CopyOfCamera1.SubjectBikeTileHeight + CopyOfCamera1.subjectBike->bottomY) -
- (CopyOfCamera1.absoluteTileHeight + CopyOfCamera1.yOffset);
- lineCountForBackGround = DrawGround (NumberOfTiles, RoadDistances,
- TileScreenPositionArray, SM);
- #ifdef MARS
- // .......... 32X background gets drawn after, to limit the # of lines that need to be drawn
- DrawScrollPlane(1, &CopyOfCamera1, camDX, lineCountForBackGround);
- #endif
- DrawObjects (CopyOfCamera1.currentTile, NumberOfTiles, RoadDistances,
- TileScreenPositionArray, SM);
- DrawPlayerLapFlag(1);
- #if 0
- ShowNum(heightDiffForHorizon);
- #endif
- #ifdef MARS
- if (SM == MASTER)
- #endif
- {
- Camera1Data = CopyOfCamera1;
- }
- }
- #if 0
- #ifdef DEBUG
- /* Print out the debug value. */
- if (SM == MASTER)
- {
- char TempString [40];
- #ifdef DEBUGSPEED
- #else
- IntToAscii ((int) DebugValue, TempString, 10);
- PutString (0, 0, "Debug value:", WHITECOLOUR);
- PutString (120, 0, TempString, WHITECOLOUR);
- #endif
- }
- #endif
- #endif
- }
- void ShowNum(int num)
- {
- char String1[100],String2[20];
- StringCopy (String1,"Number: ");
- IntToAscii (num, String2,10);
- StringCat(String1,String2);
- #ifdef MARS
- ColorAreaNOCLIP(50,50,100,20,0,0);
- #endif
- PutString(50,50,String1,100);
- }
- void ShowAbsoluteTileHeight(CameraDataRecord CopyOfCamera)
- {
- char String1[100],String2[20];
- StringCopy (String1,"TileHeight: ");
- IntToAscii ((int) CopyOfCamera.absoluteTileHeight, String2,10);
- StringCat(String1,String2);
- #ifdef MARS
- ColorAreaNOCLIP(90,30,100,20,0,0);
- #endif
- PutString(10,30,String1,100);
- }
- void ShowSegment(void)
- {
- trackTilePointer CurrentTilePtr;
- char String1[100],String2[20];
- CurrentTilePtr = GetTrackTileForNumber (Camera1Data.currentTile);
- StringCopy (String1,"Segment # ");
- IntToAscii ((int) CurrentTilePtr->segmentNumber, String2,10);
- StringCat(String1,String2);
- PutString(10,30,String1,100);
- }
- /****************************************************************************
- * Draw the race track and objects on it to the screen.
- */
- void Render (void)
- {
- RenderTrackAndObjectsToRamScreen ();
- DisplayStatusInfo ();
- //ShowSegment();
- sendBuffersToScreen ();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement