#include "objgfx30.h"
#include "objfont.h"
#include "ogSprite.h"
#include "ogBlit.h"

extern "C" {
int ogPrintf(char *s);
}

  TDPFont * font = 0x0;
  TGfx0 * buf    = 0x0;
  int screenRow  = 0x0;
  
int ogPrintf(char *s) {
  bool result;


 
  if (!buf) {
    font = new TDPFont();
    buf  = new TGfx0();
    // Creat Screen Object
    buf->ogCreate(800,600,DEF_PIXFMT_8BPP);
    // Set Our Font
    result = font->load("ROM8X14.DPF");
    // change the buffer pointer to screen mem
    buf->Buffer = (void *)0xE4000000;
    // Set Font Color To White
    font->setColor(255,255,255);
    }
  font->putText(*buf,0,screenRow,s);
  screenRow += 14;
  if (screenRow > 588) {
    buf->ogClear(0);
    screenRow = 0;
    }
  return 0;
} // ogPrintf
