This commit is contained in:
Daveo 2001-06-21 19:19:15 +00:00
parent 9ee7f92dc0
commit a331544f95
20 changed files with 95 additions and 97 deletions

View File

@ -13,7 +13,7 @@
#include "FX\FXGeyser.h" #include "FX\FXGeyser.h"
int GeyserSpeed=4; static const int GeyserSpeed=4;
/*****************************************************************************/ /*****************************************************************************/
void CFXGeyser::init(DVECTOR const &_Pos) void CFXGeyser::init(DVECTOR const &_Pos)

View File

@ -3,6 +3,7 @@
/******************/ /******************/
#include "system\global.h" #include "system\global.h"
#include "system\vid.h"
#include <DStructs.h> #include <DStructs.h>
#include "utils\utils.h" #include "utils\utils.h"
#include "gfx\prim.h" #include "gfx\prim.h"
@ -16,7 +17,7 @@
int NRGX=32; int NRGX=32;
int NRGY=188; int NRGY=188;
int NRGW=512-64; int NRGW=INGAME_SCREENW-64;
/*****************************************************************************/ /*****************************************************************************/

View File

@ -169,18 +169,6 @@ int CGameScene::s_bossHasBeenKilled;
CGameScene GameScene; CGameScene GameScene;
/*****************************************************************************/
void CGameScene::AspectCorrectCamera()
{
const s32 Scale = (512<<12)/(256);
CamMtx.m[0][0] = ((s32)CamMtx.m[0][0] * Scale)>>12;
CamMtx.m[0][1] = ((s32)CamMtx.m[0][1] * Scale)>>12;
CamMtx.m[0][2] = ((s32)CamMtx.m[0][2] * Scale)>>12;
CamMtx.t[0] = (CamMtx.t[0] * Scale)>>12;
}
/*****************************************************************************/ /*****************************************************************************/
void CGameScene::init() void CGameScene::init()
{ {
@ -256,7 +244,7 @@ void CGameScene::render()
timerValue=m_timer/55; timerValue=m_timer/55;
if(timerValue<0)timerValue=0; if(timerValue<0)timerValue=0;
sprintf(buf,"%d",timerValue); sprintf(buf,"%d",timerValue);
m_scalableFont->print(256,30,buf); m_scalableFont->print(VidGetScrW()/2,30,buf);
} }
m_pauseMenu->render(); m_pauseMenu->render();

View File

@ -66,8 +66,6 @@ protected:
void initLevel(); void initLevel();
void shutdownLevel(); void shutdownLevel();
void AspectCorrectCamera();
CLevel Level; CLevel Level;
class CPauseMenu *m_pauseMenu; class CPauseMenu *m_pauseMenu;
class CPlayer *m_player; class CPlayer *m_player;

View File

@ -16,6 +16,7 @@
Includes Includes
-------- */ -------- */
#include "system\vid.h"
#include "game\pause.h" #include "game\pause.h"
#ifndef __GUI_GFRAME_H__ #ifndef __GUI_GFRAME_H__
@ -88,7 +89,7 @@ void CPauseMenu::init()
{ {
m_guiFrame=new ("Conversation GUI") CGUIControlFrame(); m_guiFrame=new ("Conversation GUI") CGUIControlFrame();
m_guiFrame->init(0); m_guiFrame->init(0);
m_guiFrame->setObjectXYWH((512-FRAME_WIDTH)/2,(256-FRAME_HEIGHT)/2,FRAME_WIDTH,FRAME_HEIGHT); m_guiFrame->setObjectXYWH((INGAME_SCREENW-FRAME_WIDTH)/2,(INGAME_SCREENH-FRAME_HEIGHT)/2,FRAME_WIDTH,FRAME_HEIGHT);
m_guiFrame->setOt(OT_POS); m_guiFrame->setOt(OT_POS);
m_guiFrame->setFlags(CGUIObject::FLAG_DRAWBORDER); m_guiFrame->setFlags(CGUIObject::FLAG_DRAWBORDER);

View File

@ -2,6 +2,7 @@
/*** Actor Bank ***/ /*** Actor Bank ***/
/******************/ /******************/
#include "system\vid.h"
#include "system\global.h" #include "system\global.h"
#include "mem\memory.h" #include "mem\memory.h"
#include "fileio\fileio.h" #include "fileio\fileio.h"
@ -523,7 +524,6 @@ void CActorGfx::setActor(sActorPool *ThisActor)
} }
/*****************************************************************************/ /*****************************************************************************/
int BBX=0;
POLY_FT4 *CActorGfx::Render(DVECTOR &Pos,int Anim,int Frame,bool XFlip,bool YFlip) POLY_FT4 *CActorGfx::Render(DVECTOR &Pos,int Anim,int Frame,bool XFlip,bool YFlip)
{ {
sPoolNode *ThisNode,*FindNode; sPoolNode *ThisNode,*FindNode;
@ -756,11 +756,14 @@ u8 V=Node->V;
} }
setXYWH(Ft4,X,Y,W,H); setXYWH(Ft4,X,Y,W,H);
#if INGAME_SCREENW==512
// Correct Aspect // Correct Aspect
Ft4->x0-=CurrentFrameGfx->AspectX0; Ft4->x0-=CurrentFrameGfx->AspectX0;
Ft4->x1+=CurrentFrameGfx->AspectX1; Ft4->x1+=CurrentFrameGfx->AspectX1;
Ft4->x2-=CurrentFrameGfx->AspectX0; Ft4->x2-=CurrentFrameGfx->AspectX0;
Ft4->x3+=CurrentFrameGfx->AspectX1; Ft4->x3+=CurrentFrameGfx->AspectX1;
#endif
} }
@ -791,9 +794,6 @@ void CModelGfx::SetModel(int Type)
} }
/*****************************************************************************/ /*****************************************************************************/
const int PXOfs=-16;
const int PYOfs=-8;
void CModelGfx::Render(DVECTOR &Pos,SVECTOR *Angle,VECTOR *Scale) void CModelGfx::Render(DVECTOR &Pos,SVECTOR *Angle,VECTOR *Scale)
{ {
#define BLOCK_MULT 16 #define BLOCK_MULT 16
@ -836,8 +836,8 @@ sTri *TList=&ModelTriList[Model->TriStart];
int ShiftX=(Pos.vx & 15); int ShiftX=(Pos.vx & 15);
int ShiftY=(Pos.vy & 15); int ShiftY=(Pos.vy & 15);
RenderPos.vx=(PXOfs*16)+((MapXY.vx*16)+ShiftX); RenderPos.vx=INGAME_SCREENOFS_X+((MapXY.vx*16)+ShiftX);
RenderPos.vy=(PYOfs*16)+((MapXY.vy*16)+ShiftY); RenderPos.vy=INGAME_SCREENOFS_Y+((MapXY.vy*16)+ShiftY);
gte_SetRotMatrix(&Mtx); gte_SetRotMatrix(&Mtx);
CMX_SetTransMtxXY(&RenderPos); CMX_SetTransMtxXY(&RenderPos);

View File

@ -30,6 +30,7 @@
#include "sound\sound.h" #include "sound\sound.h"
#endif #endif
#include "system\vid.h"
/* Std Lib /* Std Lib
------- */ ------- */
@ -138,7 +139,7 @@ void CFader::render()
POLY_F4 *f4; POLY_F4 *f4;
f4=GetPrimF4(); f4=GetPrimF4();
setXYWH(f4,0,0,512,256); setXYWH(f4,0,0,VidGetScrW(),VidGetScrH());
switch(s_fadeStyle) switch(s_fadeStyle)
{ {
case BLACK_FADE: case BLACK_FADE:

View File

@ -90,8 +90,8 @@ sVidScreen *Scr=VidGetDrawScreen();
Real.x+=Scr->Draw.clip.x; Real.x+=Scr->Draw.clip.x;
Real.y+=Scr->Draw.clip.y; Real.y+=Scr->Draw.clip.y;
int xLimit=512; int xLimit=VidGetScrW();
int yLimit=((FrameFlipFlag^1)+1)*256; int yLimit=((FrameFlipFlag^1)+1)*VidGetScrH();
if(Real.x+Real.w>xLimit)Real.w=xLimit-Real.x; if(Real.x+Real.w>xLimit)Real.w=xLimit-Real.x;
if(Real.y+Real.h>yLimit)Real.h=yLimit-Real.y; if(Real.y+Real.h>yLimit)Real.h=yLimit-Real.y;

View File

@ -350,7 +350,6 @@ inline int GetFrameClut(sFrameHdr *Fr) {return(Fr->Clut);}
inline int GetFrameTPage(sFrameHdr *Fr) {return(Fr->TPage);} inline int GetFrameTPage(sFrameHdr *Fr) {return(Fr->TPage);}
const int aspectX=4096+1024;//(512<<12)/320; const int aspectX=4096+1024;//(512<<12)/320;
//int aspectY=(256<<12)/320;
inline void CorrectAspect(POLY_FT4 *P) inline void CorrectAspect(POLY_FT4 *P)
{ {
int W=P->x1-P->x0; int W=P->x1-P->x0;

View File

@ -268,7 +268,6 @@ void SpriteBank::prepareFT4(POLY_FT4 *_ft4,sFrameHdr *_fh,int _x,int _y,bool _xF
setXYWH(_ft4,_x,_y,W,H); setXYWH(_ft4,_x,_y,W,H);
setUVTp(_fh,_ft4,_xFlip,_yFlip); setUVTp(_fh,_ft4,_xFlip,_yFlip);
//!! CorrectAspect(_ft4);
} }
/*---------------------------------------------------------------------- /*----------------------------------------------------------------------
@ -338,7 +337,6 @@ void SpriteBank::prepareFT4Scaled(POLY_FT4 *_ft4,sFrameHdr *_fh,int _x,int _y,bo
setXYWH(_ft4,_x,_y,W,H); setXYWH(_ft4,_x,_y,W,H);
setUVTp(_fh,_ft4,_xFlip,_yFlip); setUVTp(_fh,_ft4,_xFlip,_yFlip);
//!! CorrectAspect(_ft4);
} }
@ -354,7 +352,6 @@ void SpriteBank::prepareFT4RotatedScaled(POLY_FT4 *_ft4,sFrameHdr *_fh,int _xCen
int ca,sa; int ca,sa;
int cw,ch,sw,sh; int cw,ch,sw,sh;
int width,height; int width,height;
int aspect;
halfW=(_fh->W*_xScale)>>(12+1); halfW=(_fh->W*_xScale)>>(12+1);
halfH=(_fh->H*_yScale)>>(12+1); halfH=(_fh->H*_yScale)>>(12+1);
@ -365,10 +362,6 @@ void SpriteBank::prepareFT4RotatedScaled(POLY_FT4 *_ft4,sFrameHdr *_fh,int _xCen
sw=(sa*halfW)>>12; sw=(sa*halfW)>>12;
sh=(sa*halfH)>>12; sh=(sa*halfH)>>12;
// aspect=(512<<12)/384;//((_fh->H<<12)/_fh->W)/2;
// ch=(ch*aspect)>>12;
// sh=(sh*aspect)>>12;
_ft4->x0=_xCentre-cw+sh; _ft4->y0=_yCentre-sw-ch; _ft4->x0=_xCentre-cw+sh; _ft4->y0=_yCentre-sw-ch;
_ft4->x1=_xCentre+cw+sh; _ft4->y1=_yCentre+sw-ch; _ft4->x1=_xCentre+cw+sh; _ft4->y1=_yCentre+sw-ch;
_ft4->x2=_xCentre-cw-sh; _ft4->y2=_yCentre-sw+ch; _ft4->x2=_xCentre-cw-sh; _ft4->y2=_yCentre-sw+ch;
@ -413,7 +406,7 @@ void SpriteBank::prepareFT4RotatedScaled(POLY_FT4 *_ft4,sFrameHdr *_fh,int _xCen
_ft4->tpage=_fh->TPage; _ft4->tpage=_fh->TPage;
_ft4->clut=_fh->Clut; _ft4->clut=_fh->Clut;
//////////////////////////////// ////////////////////////////////
//!! CorrectAspect(_ft4);
} }

View File

@ -2,6 +2,7 @@
/*** Shade Layer Class ***/ /*** Shade Layer Class ***/
/*************************/ /*************************/
#include "system\vid.h"
#include "system\global.h" #include "system\global.h"
#include <DStructs.h> #include <DStructs.h>
#include "utils\utils.h" #include "utils\utils.h"
@ -86,8 +87,8 @@ sLayerShadeBackGfx *GfxList=Data->GfxList;
{ {
int PosX=(GfxList->PosX*BB)-XOfs; int PosX=(GfxList->PosX*BB)-XOfs;
int PosY=(GfxList->PosY*BB)-YOfs; int PosY=(GfxList->PosY*BB)-YOfs;
if (PosX>0-64 && PosX<512+64) if (PosX>0-64 && PosX<INGAME_SCREENW+64)
if (PosY>0-64 && PosY<256+64) if (PosY>0-64 && PosY<INGAME_SCREENH+64)
{ {
POLY_GT4 *sGt4,*Gt4=GetPrimGT4(); POLY_GT4 *sGt4,*Gt4=GetPrimGT4();
sLayerShadeBackGfxType &ThisType=Data->TypeList[GfxList->Type]; sLayerShadeBackGfxType &ThisType=Data->TypeList[GfxList->Type];
@ -127,7 +128,7 @@ sLayerShadeBackGfx *GfxList=Data->GfxList;
// if (ThisY<0) BandHeight=256; // if (ThisY<0) BandHeight=256;
for (i=0; i<BandCount; i++) for (i=0; i<BandCount; i++)
{ {
setXYWH(&Band[i],0,ThisY,512,BandHeight); setXYWH(&Band[i],0,ThisY,INGAME_SCREENW,BandHeight);
addPrim(ThisOT,&Band[i]); addPrim(ThisOT,&Band[i]);
ThisY+=BandHeight; ThisY+=BandHeight;
} }

View File

@ -3,6 +3,7 @@
/***************************/ /***************************/
#include "system\global.h" #include "system\global.h"
#include "system\vid.h"
#include <DStructs.h> #include <DStructs.h>
#include "utils\utils.h" #include "utils\utils.h"
#include "gfx\prim.h" #include "gfx\prim.h"
@ -18,6 +19,18 @@
static FontBank *Font; static FontBank *Font;
#endif #endif
int BLOCK_SIZE =16;
int SCREEN_TILE_ADJ_U =2;
int SCREEN_TILE_ADJ_D =2;
int SCREEN_TILE_ADJ_L =2;
int SCREEN_TILE_ADJ_R =3;
int SCREEN_TILE3D_WIDTH =(INGAME_SCREENW/BLOCK_SIZE)+SCREEN_TILE_ADJ_L+SCREEN_TILE_ADJ_R; //40;
int SCREEN_TILE3D_HEIGHT =(INGAME_SCREENH/BLOCK_SIZE)+SCREEN_TILE_ADJ_U+SCREEN_TILE_ADJ_D; //+18;
int RENDER_X_PIX_OFS =8;
int RENDER_Y_PIX_OFS =16;
int RENDER_X_OFS =INGAME_SCREENOFS_X-(SCREEN_TILE_ADJ_L*BLOCK_SIZE)+RENDER_X_PIX_OFS;
int RENDER_Y_OFS =INGAME_SCREENOFS_Y-(SCREEN_TILE_ADJ_U*BLOCK_SIZE)+RENDER_Y_PIX_OFS;
/*****************************************************************************/ /*****************************************************************************/
/*****************************************************************************/ /*****************************************************************************/
@ -67,8 +80,8 @@ void CLayerTile3d::think(DVECTOR &MapPos)
MapXY.vx=MapPos.vx>>4; MapXY.vx=MapPos.vx>>4;
MapXY.vy=MapPos.vy>>4; MapXY.vy=MapPos.vy>>4;
MapXY.vx-=SCREEN_TILE_ADJ_LEFT; MapXY.vx-=SCREEN_TILE_ADJ_L;
MapXY.vy-=SCREEN_TILE_ADJ_UP; MapXY.vy-=SCREEN_TILE_ADJ_U;
ShiftX=(MapPos.vx & 15); ShiftX=(MapPos.vx & 15);
ShiftY=(MapPos.vy & 15); ShiftY=(MapPos.vy & 15);
@ -76,12 +89,12 @@ void CLayerTile3d::think(DVECTOR &MapPos)
RenderOfs.vx=RenderOfs.vy=0; RenderOfs.vx=RenderOfs.vy=0;
if (MapXY.vx<0) if (MapXY.vx<0)
{ {
RenderOfs.vx=-MapXY.vx*BLOCK_MULT; RenderOfs.vx=-MapXY.vx*BLOCK_SIZE;
MapXY.vx=0; MapXY.vx=0;
} }
if (MapXY.vy<0) if (MapXY.vy<0)
{ {
RenderOfs.vy=-MapXY.vy*BLOCK_MULT; RenderOfs.vy=-MapXY.vy*BLOCK_SIZE;
MapXY.vy=0; MapXY.vy=0;
} }
@ -101,6 +114,10 @@ void CLayerTile3d::think(DVECTOR &MapPos)
/*****************************************************************************/ /*****************************************************************************/
void CLayerTile3d::render() void CLayerTile3d::render()
{ {
SCREEN_TILE3D_WIDTH =(INGAME_SCREENW/BLOCK_SIZE)+SCREEN_TILE_ADJ_L+SCREEN_TILE_ADJ_R; //40;
SCREEN_TILE3D_HEIGHT =(INGAME_SCREENH/BLOCK_SIZE)+SCREEN_TILE_ADJ_U+SCREEN_TILE_ADJ_D; //+18;
RENDER_X_OFS =INGAME_SCREENOFS_X-(SCREEN_TILE_ADJ_L*BLOCK_SIZE)+RENDER_X_PIX_OFS;
RENDER_Y_OFS =INGAME_SCREENOFS_Y-(SCREEN_TILE_ADJ_U*BLOCK_SIZE)+RENDER_Y_PIX_OFS;
sTileMapElem *MapPtr=GetMapPos(); sTileMapElem *MapPtr=GetMapPos();
u8 *PrimPtr=GetPrimPtr(); u8 *PrimPtr=GetPrimPtr();
@ -156,11 +173,11 @@ VECTOR BlkPos;
} }
} }
MapRow++; MapRow++;
BlkPos.vx+=BLOCK_MULT; BlkPos.vx+=BLOCK_SIZE;
} }
MapPtr+=MapWidth; MapPtr+=MapWidth;
BlkPos.vx=BlkXOld; BlkPos.vx=BlkXOld;
BlkPos.vy+=BLOCK_MULT; BlkPos.vy+=BLOCK_SIZE;
} }
SetPrimPtr((u8*)TPrimPtr); SetPrimPtr((u8*)TPrimPtr);

View File

@ -13,7 +13,7 @@ class CLayerTile3d : public CLayerTile
public: public:
CLayerTile3d(sLevelHdr *LevelHdr,sLayerHdr *Hdr); CLayerTile3d(sLevelHdr *LevelHdr,sLayerHdr *Hdr);
~CLayerTile3d(); ~CLayerTile3d();
/*
enum enum
{ {
TILE3D_WIDTH =16, TILE3D_WIDTH =16,
@ -30,7 +30,7 @@ public:
RENDER_Y_OFS =-(BLOCK_MULT*7)-(SCREEN_TILE_ADJ_UP*BLOCK_MULT)+RENDER_Y_PIX_OFS, RENDER_Y_OFS =-(BLOCK_MULT*7)-(SCREEN_TILE_ADJ_UP*BLOCK_MULT)+RENDER_Y_PIX_OFS,
}; };
*/
void init(DVECTOR &MapPos,int Shift); void init(DVECTOR &MapPos,int Shift);
void shutdown(); void shutdown();
void think(DVECTOR &MapPos); void think(DVECTOR &MapPos);

View File

@ -15,6 +15,8 @@
Includes Includes
-------- */ -------- */
#include "system\vid.h"
#ifndef __GFX_SPRBANK_H__ #ifndef __GFX_SPRBANK_H__
#include "gfx\sprbank.h" // Damnit.. include order! :( (pkg) #include "gfx\sprbank.h" // Damnit.. include order! :( (pkg)
#endif #endif
@ -152,15 +154,10 @@ void CBasePickup::render()
int visibilityRadius; int visibilityRadius;
CPickupThing::render(); CPickupThing::render();
if (canRender())
ofs=CLevel::getCameraPos();
pos.vx=Pos.vx-ofs.vx;
pos.vy=Pos.vy-ofs.vy;
visibilityRadius=getVisibilityRadius();
if(pos.vx>0-visibilityRadius&&pos.vx<512+visibilityRadius&&
pos.vy>0-visibilityRadius&&pos.vy<256+visibilityRadius)
{ {
renderPickup(&pos); DVECTOR &renderPos=getRenderPos();
renderPickup(&renderPos);
} }
} }
@ -436,17 +433,13 @@ void CBaseBouncingPickup::render()
int visibilityRadius; int visibilityRadius;
CPickupThing::render(); CPickupThing::render();
if (canRender())
ofs=CLevel::getCameraPos();
pos.vx=Pos.vx-ofs.vx;
pos.vy=Pos.vy-ofs.vy;
visibilityRadius=getVisibilityRadius();
if(pos.vx>0-visibilityRadius&&pos.vx<512+visibilityRadius&&
pos.vy>0-visibilityRadius&&pos.vy<256+visibilityRadius)
{ {
renderPickup(&pos); DVECTOR &renderPos=getRenderPos();
renderPickup(&renderPos);
} }
} }
} }
/*---------------------------------------------------------------------- /*----------------------------------------------------------------------

View File

@ -124,7 +124,7 @@ void CNpcFishHookPlatform::render()
m_modelGfx->Render(renderPos); m_modelGfx->Render(renderPos);
} }
// draw Line (Literally!!) // draw Line (Literally!!)
if (renderPos.vx>0 && renderPos.vx<512) if (renderPos.vx>0 && renderPos.vx<INGAME_SCREENW)
{ {
DVECTOR const &CamPos=CLevel::getCameraPos(); DVECTOR const &CamPos=CLevel::getCameraPos();

View File

@ -15,6 +15,7 @@
Includes Includes
-------- */ -------- */
#include "system\vid.h"
#include "player\player.h" #include "player\player.h"
#ifndef __PAD_PADS_H__ #ifndef __PAD_PADS_H__
@ -207,8 +208,8 @@ static const char *s_modeText[NUM_PLAYERMODES]=
int s_screenPos; int s_screenPos;
int m_cameraLookOffset; int m_cameraLookOffset;
int MAP2D_CENTRE_X=-256; int MAP2D_CENTRE_X=-(INGAME_SCREENW/2);
int MAP2D_CENTRE_Y=-170; int MAP2D_CENTRE_Y=-(INGAME_SCREENH/2)-64;
int MAP2D_BLOCKSTEPSIZE=16; int MAP2D_BLOCKSTEPSIZE=16;
CPlayerModeBase PLAYERMODE; CPlayerModeBase PLAYERMODE;

View File

@ -268,7 +268,7 @@ void DoAssert( const char * Txt, const char * file, const int line )
F.setOt( 0 ); F.setOt( 0 );
InitOTag(OtPtr, MAX_OT); InitOTag(OtPtr, MAX_OT);
F.print( (512 >> 1), (256 >> 1), Text ); F.print( (VidGetScrW() >> 1), (VidGetScrH() >> 1), Text );
VSync(0); VSync(0);
VidSwapDraw(); VidSwapDraw();
@ -278,7 +278,7 @@ void DoAssert( const char * Txt, const char * file, const int line )
while(DrawSync(1)); while(DrawSync(1));
InitOTag(OtPtr, MAX_OT); InitOTag(OtPtr, MAX_OT);
F.print( (512 >> 1), (256 >> 1), Text ); F.print( (VidGetScrW() >> 1), (VidGetScrH() >> 1), Text );
VSync(0); VSync(0);
VidSwapDraw(); VidSwapDraw();

View File

@ -204,7 +204,7 @@ void ClearVRam()
#if defined(__VERSION_DEBUG__) && !defined(__USER_CDBUILD__) #if defined(__VERSION_DEBUG__) && !defined(__USER_CDBUILD__)
RECT Rect; RECT Rect;
//Clear All Videoram //Clear All Videoram
setRECT(&Rect,512,0,512,512); setRECT(&Rect,INGAME_SCREENW,0,1024-INGAME_SCREENW,512);
ClearImage(&Rect,0,0,0); ClearImage(&Rect,0,0,0);
int X; int X;
@ -311,7 +311,7 @@ void VidInit()
InitGeom(); InitGeom();
SetGeomScreen(GEOM_SCREEN_H); SetGeomScreen(GEOM_SCREEN_H);
VidSetRes( 512, 256 ); VidSetRes( INGAME_SCREENW, INGAME_SCREENH);
DrawSync(0); DrawSync(0);
VidSwapDraw(); VidSwapDraw();
DrawSync(0); DrawSync(0);
@ -329,8 +329,6 @@ void VidInit()
} }
/*****************************************************************************/ /*****************************************************************************/
int pofx=0;
int pofy=0;
#ifdef __USER_paul__ #ifdef __USER_paul__
int ScreenClipBox=1; int ScreenClipBox=1;
#else #else
@ -349,8 +347,8 @@ int ScrH=VidGetScrH()*FrameFlipFlag;
Disp=&Screen[FrameFlipFlag].Disp; Disp=&Screen[FrameFlipFlag].Disp;
Disp->disp.x=0; Disp->disp.x=0;
Disp->disp.y=ScrH; Disp->disp.y=ScrH;
Disp->disp.w=512; Disp->disp.w=ScreenW;
Disp->disp.h=256; Disp->disp.h=ScreenH;
Disp->screen.x=ScreenXOfs; Disp->screen.x=ScreenXOfs;
Disp->screen.y=ScreenYOfs; Disp->screen.y=ScreenYOfs;
Disp->screen.w=256; Disp->screen.w=256;
@ -364,10 +362,10 @@ int ScrH=VidGetScrH()*FrameFlipFlag;
if(ScreenClipBox==1) if(ScreenClipBox==1)
{ {
DrawLine(15,25,512-15,25,255,0,0,0); DrawLine(15,25,ScreenW-15,25,255,0,0,0);
DrawLine(15,256-25,512-15,256-25,255,0,0,0); DrawLine(15,ScreenH-25,ScreenW-15,ScreenH-25,255,0,0,0);
DrawLine(15,25,15,256-25,255,0,0,0); DrawLine(15,25,15,ScreenH-25,255,0,0,0);
DrawLine(512-15,25,512-15,256-25,255,0,0,0); DrawLine(ScreenW-15,25,ScreenW-15,ScreenH-25,255,0,0,0);
DrawLine(0,0,511,0,0,255,0,0); DrawLine(0,0,511,0,0,255,0,0);
DrawLine(0,255,511,255,0,255,0,0); DrawLine(0,255,511,255,0,255,0,0);
@ -378,19 +376,19 @@ if(ScreenClipBox==2)
{ {
POLY_F4 *f4; POLY_F4 *f4;
f4=GetPrimF4(); f4=GetPrimF4();
setXYWH(f4,0,0,512,20); setXYWH(f4,0,0,ScreenW,20);
setRGB0(f4,50,50,50); setRGB0(f4,50,50,50);
AddPrimToList(f4,0); AddPrimToList(f4,0);
f4=GetPrimF4(); f4=GetPrimF4();
setXYWH(f4,0,256-20,512,20); setXYWH(f4,0,ScreenH-20,ScreenW,20);
setRGB0(f4,50,50,50); setRGB0(f4,50,50,50);
AddPrimToList(f4,0); AddPrimToList(f4,0);
f4=GetPrimF4(); f4=GetPrimF4();
setXYWH(f4,512-10,20,10,256-40); setXYWH(f4,ScreenW-10,20,10,ScreenH-40);
setRGB0(f4,50,50,50); setRGB0(f4,50,50,50);
AddPrimToList(f4,0); AddPrimToList(f4,0);
f4=GetPrimF4(); f4=GetPrimF4();
setXYWH(f4,0,20,10,256-40); setXYWH(f4,0,20,10,ScreenH-40);
setRGB0(f4,50,50,50); setRGB0(f4,50,50,50);
AddPrimToList(f4,0); AddPrimToList(f4,0);
} }
@ -436,9 +434,9 @@ int OldX=Scr->Disp.disp.x,OldY=Scr->Disp.disp.y;
#endif #endif
if(Pad&PAD_LEFT) if(Scr->Disp.disp.x) Scr->Disp.disp.x--; if(Pad&PAD_LEFT) if(Scr->Disp.disp.x) Scr->Disp.disp.x--;
if(Pad&PAD_RIGHT) if(Scr->Disp.disp.x<700) Scr->Disp.disp.x++; if(Pad&PAD_RIGHT) if(Scr->Disp.disp.x<1024-ScreenW) Scr->Disp.disp.x++;
if(Pad&PAD_UP) if(Scr->Disp.disp.y) Scr->Disp.disp.y--; if(Pad&PAD_UP) if(Scr->Disp.disp.y) Scr->Disp.disp.y--;
if(Pad&PAD_DOWN) if(Scr->Disp.disp.y<256) Scr->Disp.disp.y++; if(Pad&PAD_DOWN) if(Scr->Disp.disp.y<512-ScreenH) Scr->Disp.disp.y++;
PutDispEnv(&Scr->Disp); PutDispEnv(&Scr->Disp);
PutDrawEnv(&Scr->Draw); PutDrawEnv(&Scr->Draw);
} }

View File

@ -10,6 +10,12 @@
/*****************************************************************************/ /*****************************************************************************/
#define GEOM_SCREEN_H 350 #define GEOM_SCREEN_H 350
#define INGAME_SCREENW 512
#define INGAME_SCREENH 256
#define INGAME_SCREENOFS_X -(INGAME_SCREENW/2)
#define INGAME_SCREENOFS_Y -(INGAME_SCREENH/2)
/*****************************************************************************/ /*****************************************************************************/
typedef void (*VbFuncType)(void); typedef void (*VbFuncType)(void);

View File

@ -16,6 +16,7 @@
Includes Includes
-------- */ -------- */
#include "system\vid.h"
#include "thing\thing.h" #include "thing\thing.h"
#ifndef __PLAYER_PLAYER_H__ #ifndef __PLAYER_PLAYER_H__
@ -88,13 +89,13 @@
---- */ ---- */
static const int s_RenderBBoxX0=0; static const int s_RenderBBoxX0=0;
static const int s_RenderBBoxX1=512; static const int s_RenderBBoxX1=INGAME_SCREENW;
static const int s_RenderBBoxY0=0; static const int s_RenderBBoxY0=0;
static const int s_RenderBBoxY1=256; static const int s_RenderBBoxY1=INGAME_SCREENH;
static const int s_ThinkBBoxX0=0-256; static const int s_ThinkBBoxX0=0-(INGAME_SCREENW/2);
static const int s_ThinkBBoxX1=512+526; static const int s_ThinkBBoxX1=INGAME_SCREENW+(INGAME_SCREENW/2);
static const int s_ThinkBBoxY0=0-128; static const int s_ThinkBBoxY0=0-(INGAME_SCREENW/2);
static const int s_ThinkBBoxY1=256+128; static const int s_ThinkBBoxY1=INGAME_SCREENW+(INGAME_SCREENW/2);
CThing *CThingManager::s_thingLists[CThing::MAX_TYPE]; CThing *CThingManager::s_thingLists[CThing::MAX_TYPE];
CThing *CThingManager::s_CollisionLists[CThing::MAX_TYPE]; CThing *CThingManager::s_CollisionLists[CThing::MAX_TYPE];