This commit is contained in:
Paul 2000-09-11 23:52:04 +00:00
parent 7318d3cc28
commit a19b480fa2
2 changed files with 178 additions and 0 deletions

118
source/paul/paul.cpp Normal file
View File

@ -0,0 +1,118 @@
/*=========================================================================
paul.cpp
Author: PKG
Created:
Project: Spongebob
Purpose:
Copyright (c) 2000 Climax Development Ltd
===========================================================================*/
/*----------------------------------------------------------------------
Includes
-------- */
#include "paul\paul.h"
#ifndef __SYSTEM_DBG_H__
#include "system\dbg.h"
#endif
#ifndef __GFX_FONT_H__
#include "gfx\font.h"
#endif
/* Std Lib
------- */
/* Data
---- */
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
/*----------------------------------------------------------------------
Function Prototypes
------------------- */
/*----------------------------------------------------------------------
Vars
---- */
static FontBank s_fontBank;
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CPaulScene::init()
{
setActiveDbgChannels(DC_PAUL);
PAUL_DBGMSG("this is a message..");
PAUL_DBGMSG("this is a message.. 2");
PAUL_DBGMSG("this is a message.. 3");
s_fontBank.initialise(&standardFont);
}
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CPaulScene::shutdown()
{
}
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CPaulScene::render()
{
int logCount;
int i,y,charHeight;
logCount=getNumberOfDbgLinesInLog();
y=20;
charHeight=s_fontBank.getCharHeight();
for(i=0;i<logCount;i++)
{
s_fontBank.print(20,y,getDbgLineFromLog(i));
y+=charHeight;
}
}
/*----------------------------------------------------------------------
Function:
Purpose:
Params:
Returns:
---------------------------------------------------------------------- */
void CPaulScene::think()
{
static int arse=0;
PAUL_DBGMSG("%d\n",arse++);
ASSERT(arse<100);
}
/*===========================================================================
end */

60
source/paul/paul.h Normal file
View File

@ -0,0 +1,60 @@
/*=========================================================================
paul.h
Author: PKG
Created:
Project: Spongebob
Purpose:
Copyright (c) 2000 Climax Development Ltd
===========================================================================*/
#ifndef __PAUL_PAUL_H__
#define __PAUL_PAUL_H__
/*----------------------------------------------------------------------
Includes
-------- */
#ifndef __SYSTEM_GSTATE_H__
#include "system\gstate.h"
#endif
/* Std Lib
------- */
/*----------------------------------------------------------------------
Tyepdefs && Defines
------------------- */
/*----------------------------------------------------------------------
Structure defintions
-------------------- */
class CPaulScene : public CScene
{
public:
void init();
void shutdown();
void render();
void think();
char *getSceneName() {return"PaulsScene";}
};
/*----------------------------------------------------------------------
Globals
------- */
/*----------------------------------------------------------------------
Functions
--------- */
/*---------------------------------------------------------------------- */
#endif /* __PAUL_PAUL_H__ */
/*===========================================================================
end */