xboxscene.org forums

Author Topic: Displaying Text  (Read 50 times)

james_row

  • Archived User
  • Full Member
  • *
  • Posts: 117
Displaying Text
« on: September 07, 2003, 07:48:00 PM »

You copied the "Font.xpr" over to the Media folder, right? If not, then copy it. No need to copy the .tga and .abc files. You can also copy it over to another location but be sure to set the Media path using "XBUtil_SetMediaPath()"
Logged

Mental

  • Archived User
  • Newbie
  • *
  • Posts: 4
Displaying Text
« Reply #1 on: September 07, 2003, 07:55:00 PM »

I copied font.xpr to the same directory as the .xbe file.

I tried modifying my code to:
   xbFont = new CXBFont();
   XBUtil_SetMediaPath("");
   if (xbFont->Create("font.xpr", 0)==E_FAIL) {
      RebootToDash();
   }

Still doesn't work, RebootToDash() gets called...
Logged

Videogamebuyer14

  • Archived User
  • Hero Member
  • *
  • Posts: 724
Displaying Text
« Reply #2 on: September 07, 2003, 08:06:00 PM »

QUOTE (Mental @ Sep 8 2003, 04:55 AM)
I copied font.xpr to the same directory as the .xbe file.

I tried modifying my code to:
   xbFont = new CXBFont();
   XBUtil_SetMediaPath("");
   if (xbFont->Create("font.xpr", 0)==E_FAIL) {
      RebootToDash();
   }

Still doesn't work, RebootToDash() gets called...

Wouldn't it be:

QUOTE

   xbFont = new CXBFont();
   XBUtil_SetMediaPath();
   if (xbFont->Create("font.xpr", 0)==E_FAIL) {
  RebootToDash();
   }


?
Logged

Mental

  • Archived User
  • Newbie
  • *
  • Posts: 4
Displaying Text
« Reply #3 on: September 07, 2003, 08:25:00 PM »

Accually... this is the definition of XBUtil_SetMediaPath() from xbutil.h
VOID    XBUtil_SetMediaPath( const CHAR* strPath );

-> VOID XBUtil_SetMediaPath( VOID );
is not defined... all this function accually does is copying the value of strPath into another variable, which I assume is empty before I call this function... so yeah, a call like:

XBUtil_SetMediaPath("");
wouldn't be useful at all. Anyhow... this call:

XBUtil_SetMediaPath("F:\Apps\myFTP\");
didn't work either.

(this is the path to both ftp.xbe and font.xpr)
Logged

Mental

  • Archived User
  • Newbie
  • *
  • Posts: 4
Displaying Text
« Reply #4 on: September 07, 2003, 08:33:00 PM »

xbFont = new CXBFont();
   XBUtil_SetMediaPath("F:\Apps\myFTP\");
   if (XBUtil_FindMediaFile("","font.xpr")!=S_OK)
      RebootToDash();
   xbFont->Create("font.xpr", 0);

This code did not return to the dashboard, this tells me that XBUtil_FindMediaFile() found font.xpr in the mediadirectory. Anyhow, xbFont->Create("font.xpr", 0) still failed, and the application hung when I tried to call a WriteText() function.
Logged

Carcharius

  • Archived User
  • Sr. Member
  • *
  • Posts: 304
Displaying Text
« Reply #5 on: September 08, 2003, 12:43:00 AM »

Easiest way is to put the xpr in a MEDIA folder. The xbFont->Create call checks the media folder by default when loading the font.

If you really have an aversion to creating a MEDIA folder try using this line instead:

xbFont->Create("D:\font.xpr", 0);


When an xbe is started the location that it is in is automatically mapped to D:\


Hope that helps

Carcharius
Logged