diff --git a/source/PsxBoot/psxboot.cpp b/source/PsxBoot/psxboot.cpp index 4e4a62dc9..42fea48a6 100644 --- a/source/PsxBoot/psxboot.cpp +++ b/source/PsxBoot/psxboot.cpp @@ -237,7 +237,6 @@ int main() ShowScreen(LegalFilename,-1,0); CalcFilePos((int*)SCRATCH_RAM); int *Ptr=(int*)SCRATCH_RAM; -// for (int Loop=0;LoopOpen(); BigLump.Status = BLStatusOpen; diff --git a/source/fileio/fileio.h b/source/fileio/fileio.h index 5aa5faaaf..d22f507a3 100644 --- a/source/fileio/fileio.h +++ b/source/fileio/fileio.h @@ -5,7 +5,9 @@ #ifndef _FILEIO_HEADER_ #define _FILEIO_HEADER_ +#ifndef __FILE_EQUATES_H__ #include "BigLump.h" +#endif #include "fileio\filetab.h" /*****************************************************************************/ diff --git a/source/game/game.cpp b/source/game/game.cpp index 01c67c072..678a1e9e7 100644 --- a/source/game/game.cpp +++ b/source/game/game.cpp @@ -28,7 +28,8 @@ void CGameScene::Init() { s_genericFont=new ("CGameScene::Init") FontBank(); s_genericFont->initialise( &standardFont ); - s_genericFont->setColour( 128, 80, 100 ); + s_genericFont->setColour( 255, 255 , 0 ); + VidSetClearScreen(1); } /*****************************************************************************/ @@ -38,8 +39,23 @@ void CGameScene::Shutdown() } /*****************************************************************************/ +int X=512/2; +int Y=256/2; +int Dx=+7; +int Dy=-3; + void CGameScene::Render() { +char *Str="Sponge\nBob\nSquare\nPants"; + + X+=Dx; Y+=Dy; + if (X<0+64) {X=0+64; Dx=-Dx;} + if (X>512-64) {X=512-64; Dx=-Dx;} + if (Y<0+64) {Y=0+64; Dy=-Dy;} + if (Y>256-64) {Y=256-64; Dy=-Dy;} + + + s_genericFont->print(X,Y,(u8*)Str); } /*****************************************************************************/ diff --git a/source/gfx/fdata.cpp b/source/gfx/fdata.cpp index a4fe65eec..dbd82c94f 100644 --- a/source/gfx/fdata.cpp +++ b/source/gfx/fdata.cpp @@ -18,7 +18,9 @@ #include "gfx\fdata.h" +#ifndef __FILE_EQUATES_H__ #include "biglump.h" +#endif #include diff --git a/source/gfx/fdata.h b/source/gfx/fdata.h index e7e278de3..f5572607d 100644 --- a/source/gfx/fdata.h +++ b/source/gfx/fdata.h @@ -18,11 +18,14 @@ Includes -------- */ -#ifndef _GLOBAL_HEADER_ -#include "system\global.h" +#ifndef _GLOBAL_HEADER_ +#include "system\global.h" #endif +#ifndef __FILE_EQUATES_H__ #include +#endif + /* Std Lib ------- */ diff --git a/source/gfx/prim.h b/source/gfx/prim.h index 44b9db5b8..52bf820f4 100644 --- a/source/gfx/prim.h +++ b/source/gfx/prim.h @@ -8,10 +8,12 @@ #ifndef _GLOBAL_HEADER_ #include "system\global.h" #endif +#ifndef __TPAGE_H__ #include "gfx\tpage.h" +#endif #define MAX_OT (2048) -#define MAX_PRIMS (2048+512) +#define MAX_PRIMS (1024) #define USE_NTAGS 1 diff --git a/source/gfx/sprbank.cpp b/source/gfx/sprbank.cpp index c8b2dc0c0..5f1216001 100644 --- a/source/gfx/sprbank.cpp +++ b/source/gfx/sprbank.cpp @@ -61,8 +61,6 @@ static SpriteBankInstance *s_bankList = NULL; -//#define SPRITE_BANK_DEBUG - /*---------------------------------------------------------------------- Function: Purpose: @@ -71,9 +69,6 @@ static SpriteBankInstance *s_bankList = NULL; ---------------------------------------------------------------------- */ SpriteBankInstance::SpriteBankInstance( SpriteBankInstance *_next ) { -#ifdef SPRITE_BANK_DEBUG -printf("SpriteBankInstance()\n"); -#endif m_frameHdr=NULL; m_file=FileEquate( -1 ); m_refCount=0; @@ -88,9 +83,6 @@ printf("SpriteBankInstance()\n"); ---------------------------------------------------------------------- */ SpriteBankInstance::~SpriteBankInstance() { -#ifdef SPRITE_BANK_DEBUG -printf("~SpriteBankInstance() file=%d\n",m_file); -#endif ASSERT( !m_frameHdr ); } @@ -100,19 +92,13 @@ printf("~SpriteBankInstance() file=%d\n",m_file); Params: Returns: ---------------------------------------------------------------------- */ -int loadcount=0; + void SpriteBankInstance::load( FileEquate _file ) { -#ifdef SPRITE_BANK_DEBUG -printf("SpriteBankInstance::load() file=%d\n",_file); -#endif if( m_refCount ) { ASSERT( _file == m_file ); m_refCount++; -#ifdef SPRITE_BANK_DEBUG -printf(" loaded reference" ); -#endif } else { @@ -120,15 +106,8 @@ printf(" loaded reference" ); m_file=_file; m_refCount=1; -#ifdef SPRITE_BANK_DEBUG -printf(" loaded physical %d",m_file ); -#endif } -#ifdef SPRITE_BANK_DEBUG -printf(" - refcount=%d\n",m_refCount); -#endif -loadcount++; } /*---------------------------------------------------------------------- @@ -139,30 +118,17 @@ loadcount++; ---------------------------------------------------------------------- */ int SpriteBankInstance::dump() { -#ifdef SPRITE_BANK_DEBUG -printf("SpriteBankInstance::dump() file=%d\n",m_file); -#endif int ret=false; ASSERT(m_frameHdr); m_refCount--; -#ifdef SPRITE_BANK_DEBUG -printf(" refcount now %d",m_refCount); -#endif if( m_refCount == 0 ) { -#ifdef SPRITE_BANK_DEBUG -printf(" ..freeing\n"); -#endif TPFree(m_tpageDesc); MemFree(m_frameHdr); m_frameHdr=NULL; ret=true; } -#ifdef SPRITE_BANK_DEBUG -printf("\n"); -#endif -loadcount--; return ret; } diff --git a/source/gfx/tpage.cpp b/source/gfx/tpage.cpp index 661611bb0..abfd84532 100644 --- a/source/gfx/tpage.cpp +++ b/source/gfx/tpage.cpp @@ -176,14 +176,14 @@ sTPageInfo *Cache; if (TPage) // Is in cache, no need to load it again :o) { - DBG_MSG2("TPLoadTex Cached (%i,%i)",TPage,Half); +// DBG_MSG2("TPLoadTex Cached (%i,%i)",TPage,Half); s_TPCache[TPage].Info[Half].RefCount++; Cache=&s_TPCache[TPage].Info[Half]; FramePtr=&Cache->AnimTexFrame[0]; } else { // Better load it then - DBG_MSG0("TPLoadTex"); +// DBG_MSG0("TPLoadTex"); TPHdr=(sTPageHdr*)CFileIO::loadFile(Filename,"TPLoadTEX"); ASSERT(!TPHdr->NumOfSpareBoxes); FramePtr=(sFrameHdr*) MakePtr(TPHdr,sizeof(sTPageHdr)); @@ -230,13 +230,13 @@ int ReadLeft; if (TPage) // Found one!! { - DBG_MSG2("TPLoadTexWithHeaders Cached (%i,%i)",TPage,Half); +// DBG_MSG2("TPLoadTexWithHeaders Cached (%i,%i)",TPage,Half); s_TPCache[TPage].Info[Half].RefCount++; Cache=&s_TPCache[TPage].Info[Half]; } else { - DBG_MSG0("TPLoadTexWithHeaders"); +// DBG_MSG0("TPLoadTexWithHeaders"); CFileIO::OpenFile(Filename); // Load Main Header CFileIO::ReadFile((void*)&TPHdr,sizeof(sTPageHdr)); diff --git a/source/gfx/tpage.h b/source/gfx/tpage.h index f5aa852c1..113815bd3 100644 --- a/source/gfx/tpage.h +++ b/source/gfx/tpage.h @@ -2,10 +2,12 @@ /*** PSX Vram Stuff ***/ /**********************/ -#ifndef __VRAM_H__ -#define __VRAM_H__ +#ifndef __TPAGE_H__ +#define __TPAGE_H__ +#ifndef __FILE_EQUATES_H__ #include +#endif /*************************************************************************************************/ #define TPAGE_MAX_ANIM_TEX 8 diff --git a/source/locale/textdbase.cpp b/source/locale/textdbase.cpp index 7fd4b52ed..d7db73f33 100644 --- a/source/locale/textdbase.cpp +++ b/source/locale/textdbase.cpp @@ -28,16 +28,16 @@ /* Local ----- */ -#ifndef __MEMORY_HEADER__ -#include "mem\memory.h" +#ifndef __MEMORY_HEADER__ +#include "mem\memory.h" #endif -#ifndef __BigLump_H__ -#include +#ifndef __FILE_EQUATES_H__ +#include #endif -#ifndef _FILEIO_HEADER_ -#include "fileio\fileio.h" +#ifndef _FILEIO_HEADER_ +#include "fileio\fileio.h" #endif diff --git a/source/mem/memory.cpp b/source/mem/memory.cpp index 2667f9cac..6f826ad99 100644 --- a/source/mem/memory.cpp +++ b/source/mem/memory.cpp @@ -402,20 +402,6 @@ int BestNode,FirstNode; } Head = mem->Nodes[ Head ].Next; } -//-------------------- -#ifdef MemPrintx - if (Len>300000) - { - Head=mem->Head; - while (Head != 0xffff) - { - printf("%i %i\n",Head,(int)mem->Nodes[Head].Len); - Head = mem->Nodes[ Head ].Next; - } - } - if (FirstNode!=BestNode) - printf("Need %i, %i (%i) \t%i (%i) \n",(int)Len,FirstNode,(int)mem->Nodes[FirstNode].Len, BestNode,(int)mem->Nodes[BestNode].Len); -#endif //-------------------- // Alloc it diff --git a/source/pad/pads.cpp b/source/pad/pads.cpp index 4cbdf77f4..fb06294a6 100644 --- a/source/pad/pads.cpp +++ b/source/pad/pads.cpp @@ -303,8 +303,6 @@ int PortShift=Port<<4; } if ( Pad->Send==0 ) { -printf("%d,%d\n",Pad->Motor0,Pad->Motor1); - PadSetAct(PortShift,&(Pad->Motor0),2); if (Pad->Status == PadStateFindCTP1)