Module: track.cpp

Flat functions
 

cbProgressstatic bool cbProgress(int cur,int total,cstring text)
rrTrackLoadbool rrTrackLoad(cstring tname)

Load a track, and keep a progress bar



/*
 * RacerU - tracks
 * 27-02-01: Created!
 * (c) Dolphinity/Ruud van Gaal
 */

#include <racer/racer.h>
#include <raceru/all.h>
#include <qlib/debug.h>
#pragma hdrstop
DEBUG_ENABLE

static bool cbProgress(int cur,int total,cstring text)
{
#ifdef FUTURE
  prg->SetProgress(cur,total);
#endif
  return TRUE;
}
bool rrTrackLoad(cstring tname)
// Load a track, and keep a progress bar
{
#ifdef FUTURE
  QRect r(100,100,400,150);
  QProgress *prg;

  prg=new QProgress(QSHELL,&r);
  track->SetLoadCallback(cbProgress);
  if(!track->Load())
    QMessageBox(sError,"Can't load track!");
  track->SetLoadCallback(0);
#endif

  RMGR->LoadTrack(tname);

  return TRUE;
}