Module: main.cpp

Flat functions
 

Runvoid Run();
mainvoid main(int argc,char **argv)


/*
 * Racer - create environment to run in
 * (C) 2000 Dolphinity/RVG
 */

#include "main.h"
#pragma hdrstop
#include <qlib/dxsbuf.h>
#include <qlib/debug.h>
DEBUG_ENABLE

QDXSound *dxSound;

// Import
void Run();

void main(int argc,char **argv)
{
  QRect rShell(0,0,800,600);
  QRect rBC(0,0,20,20);
  QFullScreenSettings *fss;
  QInfo *infoGfx;

  infoGfx=new QInfo("gfx.ini");
  rShell.wid=infoGfx->GetInt("resolution.width",640);
  rShell.hgt=infoGfx->GetInt("resolution.height",480);

  app=new QApp("racer");
  app->PrefNoBC();
  app->PrefBCRect(&rBC);
  app->PrefUIRect(&rShell);
  if(infoGfx->GetInt("resolution.fullscreen",0))
    app->PrefFullScreen();
  fss=app->GetFullScreenSettings();
  fss->width=rShell.wid;
  fss->height=rShell.hgt;
  fss->bits=infoGfx->GetInt("resolution.bits",16);

  delete infoGfx;

  app->Create();
  Run();
}