diff --git a/source/level/layertile.cpp b/source/level/layertile.cpp index 3a8701105..4f1c5ef1f 100644 --- a/source/level/layertile.cpp +++ b/source/level/layertile.cpp @@ -61,16 +61,17 @@ int XPos=MapPos.vx>>MapXYShift; int YPos=MapPos.vy>>MapXYShift; MapXY.vx=XPos>>4; - MapXY.vy=YPos>>4; - + MapXY.vy=YPos/12; +#if 0 if (LayerHdr->SubType==1) // BODGE AND A HALF { /**/ MapXY.vx+=TileMapOfs.vx; /**/ MapXY.vy+=TileMapOfs.vy; } - +#endif ShiftX=XPos & 15; - ShiftY=YPos & 15; +// ShiftY=YPos & 15; + ShiftY=YPos%12; if (MapXY.vx+SCREEN_TILE_WIDTH<=MapWidth) RenderW=SCREEN_TILE_WIDTH; @@ -87,6 +88,49 @@ int YPos=MapPos.vy>>MapXYShift; /*****************************************************************************/ /*****************************************************************************/ /*****************************************************************************/ +#if 1 +void CLayerTile::render() +{ +sTileMapElem *MapPtr=GetMapPos(); +u8 *PrimPtr=GetPrimPtr(); +s16 TileX,TileY; +sOT *ThisOT=OtPtr+LayerOT; + +// Setup shift bits of pos + TileY=-ShiftY; + +// Render it!! + for (int Y=0; Yu0,Tile->v0,15,15); + Ft4->tpage=Tile->TPage; + Ft4->clut=Tile->Clut; + addPrimNoCheck(ThisOT,Ft4); + PrimPtr+=sizeof(POLY_FT4); + } + TileX+=TILE_WIDTH; + } + MapPtr+=MapWidth; + TileY+=TILE_HEIGHT; + } + SetPrimPtr(PrimPtr); + +} + +#else void CLayerTile::render() { sTileMapElem *MapPtr=GetMapPos(); @@ -129,3 +173,5 @@ sOT *ThisOT=OtPtr+LayerOT; } + +#endif \ No newline at end of file diff --git a/source/level/layertile.h b/source/level/layertile.h index a7f1c2c8f..038e010f6 100644 --- a/source/level/layertile.h +++ b/source/level/layertile.h @@ -28,9 +28,9 @@ public: enum { TILE_WIDTH=16, - TILE_HEIGHT=16, + TILE_HEIGHT=12, SCREEN_TILE_WIDTH=34, - SCREEN_TILE_HEIGHT=18, + SCREEN_TILE_HEIGHT=24, SCREEN_TILE_SIZE=SCREEN_TILE_WIDTH*SCREEN_TILE_HEIGHT }; diff --git a/source/level/layertile3d.cpp b/source/level/layertile3d.cpp index bfb39b8e3..de1d6b367 100644 --- a/source/level/layertile3d.cpp +++ b/source/level/layertile3d.cpp @@ -64,8 +64,6 @@ void CLayerTile3d::shutdown() { } -int GHV=256; - /*****************************************************************************/ void CLayerTile3d::think(DVECTOR &MapPos) @@ -103,9 +101,6 @@ int YPos=MapPos.vy>>MapXYShift; RenderH=SCREEN_TILE_HEIGHT3D; else RenderH=MapHeight-MapXY.vy; - - SetGeomScreen(GHV); - } /*****************************************************************************/ diff --git a/source/level/level.cpp b/source/level/level.cpp index 7241f5886..25b6cfc00 100644 --- a/source/level/level.cpp +++ b/source/level/level.cpp @@ -686,12 +686,6 @@ void CLevel::shutdown(bool CleanUp) /*****************************************************************************/ void CLevel::render() { -// Setup Constant Rot Matrix -MATRIX *Mtx=CGameScene::GetCamMtx(); - - SetRotMatrix(Mtx); - SetTransMatrix(Mtx); - // Setup dummy prim to ensure OtPos 0 is initialised (for fast add) for (int i=0;i<8; i++) {