From 60ad167125a6e8395b725956822cd40fe06c04e5 Mon Sep 17 00:00:00 2001 From: Daveo Date: Tue, 31 Jul 2001 16:49:59 +0000 Subject: [PATCH] --- source/level/layertile.cpp | 11 ----------- source/level/layertile3d.cpp | 10 ---------- source/level/level.cpp | 19 +++++++++++++++---- 3 files changed, 15 insertions(+), 25 deletions(-) diff --git a/source/level/layertile.cpp b/source/level/layertile.cpp index fead94c17..d7e61ce53 100644 --- a/source/level/layertile.cpp +++ b/source/level/layertile.cpp @@ -19,10 +19,6 @@ static const int TILE2D_HEIGHT=12; static const int SCREEN_TILE2D_WIDTH=((512/TILE2D_WIDTH)+1); static const int SCREEN_TILE2D_HEIGHT=((256/TILE2D_HEIGHT)+1); -#ifdef __VERSION_DEBUG__ -extern int PretendToBeAPS2; -#endif - /*****************************************************************************/ /*****************************************************************************/ /*****************************************************************************/ @@ -114,13 +110,6 @@ int YPos=MapPos.vy>>MapXYShift; /*****************************************************************************/ void CLayerTile::render() { -#ifdef __VERSION_DEBUG__ -if(PretendToBeAPS2) -{ - return; -} -#endif - sTileMapElem *MapPtr=Map+GetMapOfs(); s16 TileX,TileY; sOT *ThisOT=OtPtr+LayerOT; diff --git a/source/level/layertile3d.cpp b/source/level/layertile3d.cpp index b43684060..b9e42ff32 100644 --- a/source/level/layertile3d.cpp +++ b/source/level/layertile3d.cpp @@ -35,10 +35,6 @@ static const int RENDER_Y_OFS =INGAME_SCREENOFS_Y-(SCREEN_TILE_ADJ_U*BLOCK_SIZ static const int DeltaTableSizeX=SCREEN_TILE3D_WIDTH+1; static const int DeltaTableSizeY=SCREEN_TILE3D_HEIGHT+1; -#ifdef __VERSION_DEBUG__ -int PretendToBeAPS2=false; -#endif - /*****************************************************************************/ // 0 LUF // 1 RUF @@ -279,12 +275,6 @@ s32 *OutPtr; /*****************************************************************************/ void CLayerTile3d::render() { -#ifdef __VERSION_DEBUG__ -if(PretendToBeAPS2) -{ - return; -} -#endif int MapOfs=GetMapOfs(); sTileMapElem *MapPtr=Map+MapOfs; u8 *RGBMapPtr=RGBMap+MapOfs; diff --git a/source/level/level.cpp b/source/level/level.cpp index 1736d6438..134ba880d 100644 --- a/source/level/level.cpp +++ b/source/level/level.cpp @@ -131,6 +131,9 @@ #include #include +#ifdef __VERSION_DEBUG__ +int PretendToBeAPS2=false; +#endif /*****************************************************************************/ sLvlTab LvlTable[]= @@ -665,10 +668,18 @@ void CLevel::shutdown() /*****************************************************************************/ void CLevel::render() { - for (int i=0; irender(); - } +#ifdef __VERSION_DEBUG__ +// Clever code to make code not so confusing!! +// Emulate a PS2 by forcing it to run in 50/60 fps...by not drawing much!! + VidSetClearScreen(PretendToBeAPS2); + if(!PretendToBeAPS2) +#endif +// Render Layers + for (int i=0; irender(); + } + #ifdef __SHOW_COLLISION__ if(CollisionLayer)